Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/sys')
-rw-r--r--newlib/libc/sys/Makefile.am37
-rw-r--r--newlib/libc/sys/Makefile.in463
-rw-r--r--newlib/libc/sys/a29khif/Makefile.am48
-rw-r--r--newlib/libc/sys/a29khif/Makefile.in334
-rw-r--r--newlib/libc/sys/a29khif/_alloc.s55
-rw-r--r--newlib/libc/sys/a29khif/_close.s40
-rw-r--r--newlib/libc/sys/a29khif/_cycles.s39
-rw-r--r--newlib/libc/sys/a29khif/_exit.s39
-rw-r--r--newlib/libc/sys/a29khif/_fstat.s79
-rw-r--r--newlib/libc/sys/a29khif/_getpsiz.s38
-rw-r--r--newlib/libc/sys/a29khif/_gettz.s39
-rw-r--r--newlib/libc/sys/a29khif/_ioctl.s39
-rw-r--r--newlib/libc/sys/a29khif/_iostat.s43
-rw-r--r--newlib/libc/sys/a29khif/_iowait.s39
-rw-r--r--newlib/libc/sys/a29khif/_isatty.s22
-rw-r--r--newlib/libc/sys/a29khif/_lseek.s42
-rw-r--r--newlib/libc/sys/a29khif/_open.s39
-rw-r--r--newlib/libc/sys/a29khif/_query.s39
-rw-r--r--newlib/libc/sys/a29khif/_read.s38
-rw-r--r--newlib/libc/sys/a29khif/_sbrk.s30
-rw-r--r--newlib/libc/sys/a29khif/_setim.s39
-rw-r--r--newlib/libc/sys/a29khif/_settrap.s39
-rw-r--r--newlib/libc/sys/a29khif/_setvec.s38
-rw-r--r--newlib/libc/sys/a29khif/_tmpnam.s41
-rw-r--r--newlib/libc/sys/a29khif/_write.s40
-rw-r--r--newlib/libc/sys/a29khif/aclocal.m4366
-rw-r--r--newlib/libc/sys/a29khif/alloc.s64
-rw-r--r--newlib/libc/sys/a29khif/clock.s41
-rwxr-xr-xnewlib/libc/sys/a29khif/configure1880
-rw-r--r--newlib/libc/sys/a29khif/configure.in12
-rw-r--r--newlib/libc/sys/a29khif/crt0.s226
-rw-r--r--newlib/libc/sys/a29khif/getargs.s38
-rw-r--r--newlib/libc/sys/a29khif/getenv.s48
-rw-r--r--newlib/libc/sys/a29khif/getpid.c12
-rw-r--r--newlib/libc/sys/a29khif/kill.c21
-rw-r--r--newlib/libc/sys/a29khif/read.s54
-rw-r--r--newlib/libc/sys/a29khif/remove.s43
-rw-r--r--newlib/libc/sys/a29khif/rename.s41
-rw-r--r--newlib/libc/sys/a29khif/signal.s452
-rw-r--r--newlib/libc/sys/a29khif/stubs.s135
-rw-r--r--newlib/libc/sys/a29khif/sys/cpudef.h270
-rw-r--r--newlib/libc/sys/a29khif/sys/fpsymbol.h2970
-rw-r--r--newlib/libc/sys/a29khif/sys/intrinsi.h457
-rw-r--r--newlib/libc/sys/a29khif/sys/macros.h37
-rw-r--r--newlib/libc/sys/a29khif/sys/proreg.h60
-rw-r--r--newlib/libc/sys/a29khif/sys/romdcl.h392
-rw-r--r--newlib/libc/sys/a29khif/sys/smartmac.h1491
-rw-r--r--newlib/libc/sys/a29khif/sys/sysmac.h165
-rw-r--r--newlib/libc/sys/a29khif/systime.s44
-rw-r--r--newlib/libc/sys/a29khif/vec.s35
-rw-r--r--newlib/libc/sys/aclocal.m41223
-rw-r--r--newlib/libc/sys/arc/Makefile.am14
-rw-r--r--newlib/libc/sys/arc/Makefile.in329
-rw-r--r--newlib/libc/sys/arc/aclocal.m4366
-rwxr-xr-xnewlib/libc/sys/arc/configure1880
-rw-r--r--newlib/libc/sys/arc/configure.in12
-rw-r--r--newlib/libc/sys/arc/crt0.S75
-rw-r--r--newlib/libc/sys/arc/isatty.c17
-rw-r--r--newlib/libc/sys/arc/mem-layout.c21
-rw-r--r--newlib/libc/sys/arc/sbrk.c43
-rw-r--r--newlib/libc/sys/arc/sys/syscall.h53
-rw-r--r--newlib/libc/sys/arc/syscalls.c131
-rw-r--r--newlib/libc/sys/arm/Makefile.am24
-rw-r--r--newlib/libc/sys/arm/Makefile.in332
-rw-r--r--newlib/libc/sys/arm/aclocal.m4366
-rw-r--r--newlib/libc/sys/arm/aeabi_atexit.c10
-rwxr-xr-xnewlib/libc/sys/arm/configure1880
-rw-r--r--newlib/libc/sys/arm/configure.in12
-rw-r--r--newlib/libc/sys/arm/crt0.S289
-rw-r--r--newlib/libc/sys/arm/libcfunc.c40
-rw-r--r--newlib/libc/sys/arm/swi.h60
-rw-r--r--newlib/libc/sys/arm/sys/param.h19
-rw-r--r--newlib/libc/sys/arm/syscalls.c622
-rw-r--r--newlib/libc/sys/arm/trap.S93
-rwxr-xr-xnewlib/libc/sys/configure3429
-rw-r--r--newlib/libc/sys/configure.in32
-rw-r--r--newlib/libc/sys/d10v/Makefile.am14
-rw-r--r--newlib/libc/sys/d10v/Makefile.in329
-rw-r--r--newlib/libc/sys/d10v/aclocal.m4366
-rwxr-xr-xnewlib/libc/sys/d10v/configure1880
-rw-r--r--newlib/libc/sys/d10v/configure.in12
-rw-r--r--newlib/libc/sys/d10v/creat.c7
-rw-r--r--newlib/libc/sys/d10v/crt0.S63
-rw-r--r--newlib/libc/sys/d10v/sys/syscall.h38
-rw-r--r--newlib/libc/sys/d10v/syscalls.c216
-rw-r--r--newlib/libc/sys/d10v/trap.S296
-rw-r--r--newlib/libc/sys/decstation/Makefile.am45
-rw-r--r--newlib/libc/sys/decstation/Makefile.in341
-rw-r--r--newlib/libc/sys/decstation/_main.c6
-rw-r--r--newlib/libc/sys/decstation/aclocal.m4366
-rwxr-xr-xnewlib/libc/sys/decstation/configure1880
-rw-r--r--newlib/libc/sys/decstation/configure.in12
-rw-r--r--newlib/libc/sys/decstation/sys/dirent.h46
-rw-r--r--newlib/libc/sys/h8300hms/Makefile.am15
-rw-r--r--newlib/libc/sys/h8300hms/Makefile.in331
-rw-r--r--newlib/libc/sys/h8300hms/_exit.S17
-rw-r--r--newlib/libc/sys/h8300hms/aclocal.m4366
-rw-r--r--newlib/libc/sys/h8300hms/close.S17
-rwxr-xr-xnewlib/libc/sys/h8300hms/configure1880
-rw-r--r--newlib/libc/sys/h8300hms/configure.in12
-rw-r--r--newlib/libc/sys/h8300hms/crt0.S105
-rw-r--r--newlib/libc/sys/h8300hms/crt1.c18
-rw-r--r--newlib/libc/sys/h8300hms/fstat.S18
-rw-r--r--newlib/libc/sys/h8300hms/lseek.S18
-rw-r--r--newlib/libc/sys/h8300hms/misc.c34
-rw-r--r--newlib/libc/sys/h8300hms/open.S14
-rw-r--r--newlib/libc/sys/h8300hms/read.S18
-rw-r--r--newlib/libc/sys/h8300hms/sbrk.c28
-rw-r--r--newlib/libc/sys/h8300hms/setarch.h21
-rw-r--r--newlib/libc/sys/h8300hms/stat.S12
-rw-r--r--newlib/libc/sys/h8300hms/sys/file.h29
-rw-r--r--newlib/libc/sys/h8300hms/sys/syscall.h1
-rw-r--r--newlib/libc/sys/h8300hms/syscalls.c18
-rw-r--r--newlib/libc/sys/h8300hms/write.S17
-rw-r--r--newlib/libc/sys/h8500hms/Makefile.am14
-rw-r--r--newlib/libc/sys/h8500hms/Makefile.in329
-rw-r--r--newlib/libc/sys/h8500hms/aclocal.m4366
-rwxr-xr-xnewlib/libc/sys/h8500hms/configure1880
-rw-r--r--newlib/libc/sys/h8500hms/configure.in12
-rw-r--r--newlib/libc/sys/h8500hms/crt0.c32
-rw-r--r--newlib/libc/sys/h8500hms/misc.c29
-rw-r--r--newlib/libc/sys/h8500hms/syscalls.c129
-rw-r--r--newlib/libc/sys/linux/Makefile.am242
-rw-r--r--newlib/libc/sys/linux/Makefile.in603
-rw-r--r--newlib/libc/sys/linux/aclocal.m41223
-rw-r--r--newlib/libc/sys/linux/aio.c75
-rw-r--r--newlib/libc/sys/linux/aio64.c67
-rw-r--r--newlib/libc/sys/linux/argp/Makefile.am23
-rw-r--r--newlib/libc/sys/linux/argp/Makefile.in367
-rw-r--r--newlib/libc/sys/linux/argp/argp-ba.c26
-rw-r--r--newlib/libc/sys/linux/argp/argp-eexst.c32
-rw-r--r--newlib/libc/sys/linux/argp/argp-fmtstream.c430
-rw-r--r--newlib/libc/sys/linux/argp/argp-fmtstream.h297
-rw-r--r--newlib/libc/sys/linux/argp/argp-fs-xinl.c41
-rw-r--r--newlib/libc/sys/linux/argp/argp-help.c1863
-rw-r--r--newlib/libc/sys/linux/argp/argp-namefrob.h92
-rw-r--r--newlib/libc/sys/linux/argp/argp-parse.c966
-rw-r--r--newlib/libc/sys/linux/argp/argp-pv.c25
-rw-r--r--newlib/libc/sys/linux/argp/argp-pvh.c32
-rw-r--r--newlib/libc/sys/linux/argp/argp-xinl.c42
-rw-r--r--newlib/libc/sys/linux/bits/initspin.h28
-rw-r--r--newlib/libc/sys/linux/bits/libc-lock.h380
-rw-r--r--newlib/libc/sys/linux/bits/pthreadtypes.h152
-rw-r--r--newlib/libc/sys/linux/bits/typesizes.h66
-rw-r--r--newlib/libc/sys/linux/bp-checks.h129
-rw-r--r--newlib/libc/sys/linux/brk.c41
-rw-r--r--newlib/libc/sys/linux/calloc.c1
-rw-r--r--newlib/libc/sys/linux/callocr.c7
-rw-r--r--newlib/libc/sys/linux/cfreer.c7
-rw-r--r--newlib/libc/sys/linux/cfspeed.c88
-rw-r--r--newlib/libc/sys/linux/clock_getres.c94
-rw-r--r--newlib/libc/sys/linux/clock_gettime.c109
-rw-r--r--newlib/libc/sys/linux/clock_settime.c111
-rw-r--r--newlib/libc/sys/linux/cmath/Makefile.am28
-rw-r--r--newlib/libc/sys/linux/cmath/Makefile.in385
-rw-r--r--newlib/libc/sys/linux/cmath/math_private.h356
-rw-r--r--newlib/libc/sys/linux/cmath/s_cacos.c42
-rw-r--r--newlib/libc/sys/linux/cmath/s_cacosf.c38
-rw-r--r--newlib/libc/sys/linux/cmath/s_cacosh.c88
-rw-r--r--newlib/libc/sys/linux/cmath/s_cacoshf.c98
-rw-r--r--newlib/libc/sys/linux/cmath/s_cacoshl.c84
-rw-r--r--newlib/libc/sys/linux/cmath/s_cacosl.c38
-rw-r--r--newlib/libc/sys/linux/cmath/s_casin.c66
-rw-r--r--newlib/libc/sys/linux/cmath/s_casinf.c63
-rw-r--r--newlib/libc/sys/linux/cmath/s_casinh.c84
-rw-r--r--newlib/libc/sys/linux/cmath/s_casinhf.c80
-rw-r--r--newlib/libc/sys/linux/cmath/s_casinhl.c80
-rw-r--r--newlib/libc/sys/linux/cmath/s_casinl.c62
-rw-r--r--newlib/libc/sys/linux/cmath/s_catan.c89
-rw-r--r--newlib/libc/sys/linux/cmath/s_catanf.c85
-rw-r--r--newlib/libc/sys/linux/cmath/s_catanh.c84
-rw-r--r--newlib/libc/sys/linux/cmath/s_catanhf.c80
-rw-r--r--newlib/libc/sys/linux/cmath/s_catanhl.c80
-rw-r--r--newlib/libc/sys/linux/cmath/s_catanl.c85
-rw-r--r--newlib/libc/sys/linux/cmath/s_cbrtl.c15
-rw-r--r--newlib/libc/sys/linux/cmath/s_ccos.c80
-rw-r--r--newlib/libc/sys/linux/cmath/s_ccosf.c76
-rw-r--r--newlib/libc/sys/linux/cmath/s_ccosh.c105
-rw-r--r--newlib/libc/sys/linux/cmath/s_ccoshf.c101
-rw-r--r--newlib/libc/sys/linux/cmath/s_ccoshl.c101
-rw-r--r--newlib/libc/sys/linux/cmath/s_ccosl.c76
-rw-r--r--newlib/libc/sys/linux/cmath/s_cexp.c127
-rw-r--r--newlib/libc/sys/linux/cmath/s_cexpf.c123
-rw-r--r--newlib/libc/sys/linux/cmath/s_cexpl.c123
-rw-r--r--newlib/libc/sys/linux/cmath/s_clog.c65
-rw-r--r--newlib/libc/sys/linux/cmath/s_clog10.c65
-rw-r--r--newlib/libc/sys/linux/cmath/s_clog10f.c61
-rw-r--r--newlib/libc/sys/linux/cmath/s_clog10l.c61
-rw-r--r--newlib/libc/sys/linux/cmath/s_clogf.c61
-rw-r--r--newlib/libc/sys/linux/cmath/s_clogl.c61
-rw-r--r--newlib/libc/sys/linux/cmath/s_cpow.c34
-rw-r--r--newlib/libc/sys/linux/cmath/s_cpowf.c30
-rw-r--r--newlib/libc/sys/linux/cmath/s_cpowl.c30
-rw-r--r--newlib/libc/sys/linux/cmath/s_cproj.c51
-rw-r--r--newlib/libc/sys/linux/cmath/s_cprojf.c47
-rw-r--r--newlib/libc/sys/linux/cmath/s_cprojl.c48
-rw-r--r--newlib/libc/sys/linux/cmath/s_csin.c131
-rw-r--r--newlib/libc/sys/linux/cmath/s_csinf.c127
-rw-r--r--newlib/libc/sys/linux/cmath/s_csinh.c126
-rw-r--r--newlib/libc/sys/linux/cmath/s_csinhf.c122
-rw-r--r--newlib/libc/sys/linux/cmath/s_csinhl.c122
-rw-r--r--newlib/libc/sys/linux/cmath/s_csinl.c127
-rw-r--r--newlib/libc/sys/linux/cmath/s_csqrt.c114
-rw-r--r--newlib/libc/sys/linux/cmath/s_csqrtf.c110
-rw-r--r--newlib/libc/sys/linux/cmath/s_csqrtl.c110
-rw-r--r--newlib/libc/sys/linux/cmath/s_ctan.c74
-rw-r--r--newlib/libc/sys/linux/cmath/s_ctanf.c70
-rw-r--r--newlib/libc/sys/linux/cmath/s_ctanh.c74
-rw-r--r--newlib/libc/sys/linux/cmath/s_ctanhf.c70
-rw-r--r--newlib/libc/sys/linux/cmath/s_ctanhl.c70
-rw-r--r--newlib/libc/sys/linux/cmath/s_ctanl.c70
-rw-r--r--newlib/libc/sys/linux/config.h16
-rwxr-xr-xnewlib/libc/sys/linux/configure3473
-rw-r--r--newlib/libc/sys/linux/configure.in50
-rw-r--r--newlib/libc/sys/linux/confstr.c161
-rw-r--r--newlib/libc/sys/linux/confstr.h1
-rw-r--r--newlib/libc/sys/linux/crt1.c3
-rw-r--r--newlib/libc/sys/linux/ctermid.c16
-rw-r--r--newlib/libc/sys/linux/dl/Makefile.am25
-rw-r--r--newlib/libc/sys/linux/dl/Makefile.in378
-rw-r--r--newlib/libc/sys/linux/dl/abi-tag.h4
-rw-r--r--newlib/libc/sys/linux/dl/atomicity.h56
-rw-r--r--newlib/libc/sys/linux/dl/dl-addr.c101
-rw-r--r--newlib/libc/sys/linux/dl/dl-cache.c271
-rw-r--r--newlib/libc/sys/linux/dl/dl-cache.h140
-rw-r--r--newlib/libc/sys/linux/dl/dl-close.c334
-rw-r--r--newlib/libc/sys/linux/dl/dl-debug.c57
-rw-r--r--newlib/libc/sys/linux/dl/dl-deps.c561
-rw-r--r--newlib/libc/sys/linux/dl/dl-dst.h45
-rw-r--r--newlib/libc/sys/linux/dl/dl-error.c189
-rw-r--r--newlib/libc/sys/linux/dl/dl-fini.c172
-rw-r--r--newlib/libc/sys/linux/dl/dl-init.c149
-rw-r--r--newlib/libc/sys/linux/dl/dl-iteratephdr.c65
-rw-r--r--newlib/libc/sys/linux/dl/dl-libc.c156
-rw-r--r--newlib/libc/sys/linux/dl/dl-librecon.h87
-rw-r--r--newlib/libc/sys/linux/dl/dl-load.c1830
-rw-r--r--newlib/libc/sys/linux/dl/dl-lookup.c654
-rw-r--r--newlib/libc/sys/linux/dl/dl-lookupcfg.h22
-rw-r--r--newlib/libc/sys/linux/dl/dl-minimal.c250
-rw-r--r--newlib/libc/sys/linux/dl/dl-misc.c277
-rw-r--r--newlib/libc/sys/linux/dl/dl-object.c163
-rw-r--r--newlib/libc/sys/linux/dl/dl-open.c487
-rw-r--r--newlib/libc/sys/linux/dl/dl-osinfo.h108
-rw-r--r--newlib/libc/sys/linux/dl/dl-profile.c539
-rw-r--r--newlib/libc/sys/linux/dl/dl-profstub.c43
-rw-r--r--newlib/libc/sys/linux/dl/dl-reloc.c211
-rw-r--r--newlib/libc/sys/linux/dl/dl-runtime.c233
-rw-r--r--newlib/libc/sys/linux/dl/dl-support.c184
-rw-r--r--newlib/libc/sys/linux/dl/dl-sym.c158
-rw-r--r--newlib/libc/sys/linux/dl/dl-version.c385
-rw-r--r--newlib/libc/sys/linux/dl/dlfcn.h84
-rw-r--r--newlib/libc/sys/linux/dl/do-lookup.h200
-rw-r--r--newlib/libc/sys/linux/dl/do-rel.h120
-rw-r--r--newlib/libc/sys/linux/dl/dynamic-link.h257
-rw-r--r--newlib/libc/sys/linux/dl/kernel-features.h193
-rw-r--r--newlib/libc/sys/linux/dl/ldsodefs.h535
-rw-r--r--newlib/libc/sys/linux/dl/libintl.h2
-rw-r--r--newlib/libc/sys/linux/dl/trusted-dirs.h7
-rw-r--r--newlib/libc/sys/linux/dl/unsecvars.h19
-rw-r--r--newlib/libc/sys/linux/fclean.c7
-rw-r--r--newlib/libc/sys/linux/flockfile.c9
-rw-r--r--newlib/libc/sys/linux/fpathconf.c303
-rw-r--r--newlib/libc/sys/linux/free.c1
-rw-r--r--newlib/libc/sys/linux/freer.c7
-rw-r--r--newlib/libc/sys/linux/fstab.c195
-rw-r--r--newlib/libc/sys/linux/fstatvfs.c47
-rw-r--r--newlib/libc/sys/linux/fstatvfs64.c49
-rw-r--r--newlib/libc/sys/linux/ftok.c47
-rw-r--r--newlib/libc/sys/linux/ftw.c640
-rw-r--r--newlib/libc/sys/linux/ftw64.c30
-rw-r--r--newlib/libc/sys/linux/funlockfile.c9
-rw-r--r--newlib/libc/sys/linux/getdate.c325
-rw-r--r--newlib/libc/sys/linux/getdate_err.c18
-rw-r--r--newlib/libc/sys/linux/gethostid.c114
-rw-r--r--newlib/libc/sys/linux/gethostname.c31
-rw-r--r--newlib/libc/sys/linux/getlogin.c11
-rw-r--r--newlib/libc/sys/linux/getopt.c1249
-rw-r--r--newlib/libc/sys/linux/getopt1.c185
-rw-r--r--newlib/libc/sys/linux/getpwent.c30
-rw-r--r--newlib/libc/sys/linux/getreent.c12
-rw-r--r--newlib/libc/sys/linux/getrlimit64.c43
-rw-r--r--newlib/libc/sys/linux/getwd.c20
-rw-r--r--newlib/libc/sys/linux/hp-timing.h1
-rw-r--r--newlib/libc/sys/linux/iconv/Makefile.am27
-rw-r--r--newlib/libc/sys/linux/iconv/Makefile.in372
-rw-r--r--newlib/libc/sys/linux/iconv/categories.def344
-rw-r--r--newlib/libc/sys/linux/iconv/dummy-repertoire.c37
-rw-r--r--newlib/libc/sys/linux/iconv/gconv.c73
-rw-r--r--newlib/libc/sys/linux/iconv/gconv_builtin.c84
-rw-r--r--newlib/libc/sys/linux/iconv/gconv_builtin.h115
-rw-r--r--newlib/libc/sys/linux/iconv/gconv_cache.c459
-rw-r--r--newlib/libc/sys/linux/iconv/gconv_charset.h73
-rw-r--r--newlib/libc/sys/linux/iconv/gconv_close.c65
-rw-r--r--newlib/libc/sys/linux/iconv/gconv_conf.c680
-rw-r--r--newlib/libc/sys/linux/iconv/gconv_db.c803
-rw-r--r--newlib/libc/sys/linux/iconv/gconv_dl.c237
-rw-r--r--newlib/libc/sys/linux/iconv/gconv_int.h288
-rw-r--r--newlib/libc/sys/linux/iconv/gconv_open.c329
-rw-r--r--newlib/libc/sys/linux/iconv/gconv_simple.c1354
-rw-r--r--newlib/libc/sys/linux/iconv/gconv_trans.c230
-rw-r--r--newlib/libc/sys/linux/iconv/hash-string.h60
-rw-r--r--newlib/libc/sys/linux/iconv/iconv.c96
-rw-r--r--newlib/libc/sys/linux/iconv/iconv.h51
-rw-r--r--newlib/libc/sys/linux/iconv/iconv_charmap.c563
-rw-r--r--newlib/libc/sys/linux/iconv/iconv_close.c37
-rw-r--r--newlib/libc/sys/linux/iconv/iconv_open.c65
-rw-r--r--newlib/libc/sys/linux/iconv/iconvconfig.c1176
-rw-r--r--newlib/libc/sys/linux/iconv/iconvconfig.h67
-rw-r--r--newlib/libc/sys/linux/iconv/loadinfo.h100
-rw-r--r--newlib/libc/sys/linux/iconv/localeinfo.h209
-rw-r--r--newlib/libc/sys/linux/iconv/loop.c450
-rw-r--r--newlib/libc/sys/linux/iconv/skeleton.c696
-rw-r--r--newlib/libc/sys/linux/iconv/strtab.c341
-rw-r--r--newlib/libc/sys/linux/ids.c26
-rw-r--r--newlib/libc/sys/linux/include/argp.h570
-rw-r--r--newlib/libc/sys/linux/include/arpa/ftp.h109
-rw-r--r--newlib/libc/sys/linux/include/arpa/inet.h156
-rw-r--r--newlib/libc/sys/linux/include/arpa/nameser.h449
-rw-r--r--newlib/libc/sys/linux/include/arpa/nameser_compat.h182
-rw-r--r--newlib/libc/sys/linux/include/arpa/telnet.h342
-rw-r--r--newlib/libc/sys/linux/include/arpa/tftp.h83
-rw-r--r--newlib/libc/sys/linux/include/bp-sym.h6
-rw-r--r--newlib/libc/sys/linux/include/cmathcalls.h158
-rw-r--r--newlib/libc/sys/linux/include/complex.h108
-rw-r--r--newlib/libc/sys/linux/include/dl-hash.h74
-rw-r--r--newlib/libc/sys/linux/include/dlfcn.h65
-rw-r--r--newlib/libc/sys/linux/include/fnmatch.h59
-rw-r--r--newlib/libc/sys/linux/include/gconv.h175
-rw-r--r--newlib/libc/sys/linux/include/getopt.h27
-rw-r--r--newlib/libc/sys/linux/include/glob.h93
-rw-r--r--newlib/libc/sys/linux/include/hesiod.h98
-rw-r--r--newlib/libc/sys/linux/include/iconv.h51
-rw-r--r--newlib/libc/sys/linux/include/ifaddrs.h56
-rw-r--r--newlib/libc/sys/linux/include/libc_private.h72
-rw-r--r--newlib/libc/sys/linux/include/limits.h153
-rw-r--r--newlib/libc/sys/linux/include/link.h269
-rw-r--r--newlib/libc/sys/linux/include/ltdl.h361
-rw-r--r--newlib/libc/sys/linux/include/malloc.h266
-rw-r--r--newlib/libc/sys/linux/include/mcheck.h62
-rw-r--r--newlib/libc/sys/linux/include/mqueue.h36
-rw-r--r--newlib/libc/sys/linux/include/namespace.h153
-rw-r--r--newlib/libc/sys/linux/include/net/bpf.h326
-rw-r--r--newlib/libc/sys/linux/include/net/bpf_compat.h55
-rw-r--r--newlib/libc/sys/linux/include/net/bpfdesc.h120
-rw-r--r--newlib/libc/sys/linux/include/net/bridge.h114
-rw-r--r--newlib/libc/sys/linux/include/net/ethernet.h134
-rw-r--r--newlib/libc/sys/linux/include/net/fddi.h106
-rw-r--r--newlib/libc/sys/linux/include/net/if.h341
-rw-r--r--newlib/libc/sys/linux/include/net/if_arc.h148
-rw-r--r--newlib/libc/sys/linux/include/net/if_arp.h121
-rw-r--r--newlib/libc/sys/linux/include/net/if_atm.h107
-rw-r--r--newlib/libc/sys/linux/include/net/if_dl.h86
-rw-r--r--newlib/libc/sys/linux/include/net/if_gif.h92
-rw-r--r--newlib/libc/sys/linux/include/net/if_ieee80211.h273
-rw-r--r--newlib/libc/sys/linux/include/net/if_llc.h160
-rw-r--r--newlib/libc/sys/linux/include/net/if_media.h409
-rw-r--r--newlib/libc/sys/linux/include/net/if_mib.h170
-rw-r--r--newlib/libc/sys/linux/include/net/if_ppp.h137
-rw-r--r--newlib/libc/sys/linux/include/net/if_pppvar.h109
-rw-r--r--newlib/libc/sys/linux/include/net/if_slvar.h86
-rw-r--r--newlib/libc/sys/linux/include/net/if_sppp.h215
-rw-r--r--newlib/libc/sys/linux/include/net/if_stf.h38
-rw-r--r--newlib/libc/sys/linux/include/net/if_tap.h73
-rw-r--r--newlib/libc/sys/linux/include/net/if_tapvar.h66
-rw-r--r--newlib/libc/sys/linux/include/net/if_tun.h48
-rw-r--r--newlib/libc/sys/linux/include/net/if_tunvar.h56
-rw-r--r--newlib/libc/sys/linux/include/net/if_types.h251
-rw-r--r--newlib/libc/sys/linux/include/net/if_var.h469
-rw-r--r--newlib/libc/sys/linux/include/net/if_vlan_var.h82
-rw-r--r--newlib/libc/sys/linux/include/net/intrq.h45
-rw-r--r--newlib/libc/sys/linux/include/net/iso88025.h143
-rw-r--r--newlib/libc/sys/linux/include/net/net_osdep.h343
-rw-r--r--newlib/libc/sys/linux/include/net/netisr.h89
-rw-r--r--newlib/libc/sys/linux/include/net/pfil.h80
-rw-r--r--newlib/libc/sys/linux/include/net/pfkeyv2.h392
-rw-r--r--newlib/libc/sys/linux/include/net/ppp_comp.h151
-rw-r--r--newlib/libc/sys/linux/include/net/ppp_defs.h157
-rw-r--r--newlib/libc/sys/linux/include/net/radix.h170
-rw-r--r--newlib/libc/sys/linux/include/net/raw_cb.h84
-rw-r--r--newlib/libc/sys/linux/include/net/route.h301
-rw-r--r--newlib/libc/sys/linux/include/net/slcompress.h161
-rw-r--r--newlib/libc/sys/linux/include/net/slip.h62
-rw-r--r--newlib/libc/sys/linux/include/net/zlib.h1013
-rw-r--r--newlib/libc/sys/linux/include/netconfig.h96
-rw-r--r--newlib/libc/sys/linux/include/netdb.h277
-rw-r--r--newlib/libc/sys/linux/include/netinet/icmp6.h740
-rw-r--r--newlib/libc/sys/linux/include/netinet/icmp_var.h91
-rw-r--r--newlib/libc/sys/linux/include/netinet/if_atm.h47
-rw-r--r--newlib/libc/sys/linux/include/netinet/if_ether.h122
-rw-r--r--newlib/libc/sys/linux/include/netinet/igmp.h96
-rw-r--r--newlib/libc/sys/linux/include/netinet/igmp_var.h109
-rw-r--r--newlib/libc/sys/linux/include/netinet/in.h569
-rw-r--r--newlib/libc/sys/linux/include/netinet/in_gif.h42
-rw-r--r--newlib/libc/sys/linux/include/netinet/in_pcb.h335
-rw-r--r--newlib/libc/sys/linux/include/netinet/in_systm.h62
-rw-r--r--newlib/libc/sys/linux/include/netinet/in_var.h243
-rw-r--r--newlib/libc/sys/linux/include/netinet/ip.h190
-rw-r--r--newlib/libc/sys/linux/include/netinet/ip6.h308
-rw-r--r--newlib/libc/sys/linux/include/netinet/ip_dummynet.h361
-rw-r--r--newlib/libc/sys/linux/include/netinet/ip_ecn.h49
-rw-r--r--newlib/libc/sys/linux/include/netinet/ip_encap.h64
-rw-r--r--newlib/libc/sys/linux/include/netinet/ip_flow.h57
-rw-r--r--newlib/libc/sys/linux/include/netinet/ip_fw.h350
-rw-r--r--newlib/libc/sys/linux/include/netinet/ip_icmp.h192
-rw-r--r--newlib/libc/sys/linux/include/netinet/ip_mroute.h263
-rw-r--r--newlib/libc/sys/linux/include/netinet/ip_var.h206
-rw-r--r--newlib/libc/sys/linux/include/netinet/ipprotosw.h102
-rw-r--r--newlib/libc/sys/linux/include/netinet/tcp.h137
-rw-r--r--newlib/libc/sys/linux/include/netinet/tcp_debug.h83
-rw-r--r--newlib/libc/sys/linux/include/netinet/tcp_fsm.h114
-rw-r--r--newlib/libc/sys/linux/include/netinet/tcp_seq.h84
-rw-r--r--newlib/libc/sys/linux/include/netinet/tcp_timer.h139
-rw-r--r--newlib/libc/sys/linux/include/netinet/tcp_var.h486
-rw-r--r--newlib/libc/sys/linux/include/netinet/tcpip.h63
-rw-r--r--newlib/libc/sys/linux/include/netinet/udp.h51
-rw-r--r--newlib/libc/sys/linux/include/netinet/udp_var.h114
-rw-r--r--newlib/libc/sys/linux/include/netinet6/ah.h94
-rw-r--r--newlib/libc/sys/linux/include/netinet6/ah6.h52
-rw-r--r--newlib/libc/sys/linux/include/netinet6/esp.h109
-rw-r--r--newlib/libc/sys/linux/include/netinet6/esp6.h48
-rw-r--r--newlib/libc/sys/linux/include/netinet6/esp_rijndael.h39
-rw-r--r--newlib/libc/sys/linux/include/netinet6/icmp6.h4
-rw-r--r--newlib/libc/sys/linux/include/netinet6/in6.h651
-rw-r--r--newlib/libc/sys/linux/include/netinet6/in6_gif.h42
-rw-r--r--newlib/libc/sys/linux/include/netinet6/in6_ifattach.h46
-rw-r--r--newlib/libc/sys/linux/include/netinet6/in6_pcb.h111
-rw-r--r--newlib/libc/sys/linux/include/netinet6/in6_prefix.h91
-rw-r--r--newlib/libc/sys/linux/include/netinet6/in6_var.h608
-rw-r--r--newlib/libc/sys/linux/include/netinet6/ip6.h4
-rw-r--r--newlib/libc/sys/linux/include/netinet6/ip6_ecn.h41
-rw-r--r--newlib/libc/sys/linux/include/netinet6/ip6_fw.h231
-rw-r--r--newlib/libc/sys/linux/include/netinet6/ip6_mroute.h277
-rw-r--r--newlib/libc/sys/linux/include/netinet6/ip6_var.h354
-rw-r--r--newlib/libc/sys/linux/include/netinet6/ip6protosw.h163
-rw-r--r--newlib/libc/sys/linux/include/netinet6/ipcomp.h71
-rw-r--r--newlib/libc/sys/linux/include/netinet6/ipcomp6.h46
-rw-r--r--newlib/libc/sys/linux/include/netinet6/ipsec.h354
-rw-r--r--newlib/libc/sys/linux/include/netinet6/ipsec6.h83
-rw-r--r--newlib/libc/sys/linux/include/netinet6/mld6_var.h53
-rw-r--r--newlib/libc/sys/linux/include/netinet6/nd6.h404
-rw-r--r--newlib/libc/sys/linux/include/netinet6/pim6.h69
-rw-r--r--newlib/libc/sys/linux/include/netinet6/pim6_var.h70
-rw-r--r--newlib/libc/sys/linux/include/netinet6/raw_ip6.h54
-rw-r--r--newlib/libc/sys/linux/include/netinet6/scope6_var.h46
-rw-r--r--newlib/libc/sys/linux/include/netinet6/tcp6_var.h88
-rw-r--r--newlib/libc/sys/linux/include/netinet6/udp6_var.h82
-rw-r--r--newlib/libc/sys/linux/include/netns/idp.h52
-rw-r--r--newlib/libc/sys/linux/include/netns/idp_var.h55
-rw-r--r--newlib/libc/sys/linux/include/netns/ns.h154
-rw-r--r--newlib/libc/sys/linux/include/netns/ns_error.h96
-rw-r--r--newlib/libc/sys/linux/include/netns/ns_if.h89
-rw-r--r--newlib/libc/sys/linux/include/netns/ns_pcb.h85
-rw-r--r--newlib/libc/sys/linux/include/netns/sp.h58
-rw-r--r--newlib/libc/sys/linux/include/netns/spidp.h68
-rw-r--r--newlib/libc/sys/linux/include/netns/spp_debug.h65
-rw-r--r--newlib/libc/sys/linux/include/netns/spp_timer.h128
-rw-r--r--newlib/libc/sys/linux/include/netns/spp_var.h221
-rw-r--r--newlib/libc/sys/linux/include/nsswitch.h184
-rw-r--r--newlib/libc/sys/linux/include/paths.h74
-rw-r--r--newlib/libc/sys/linux/include/pthread.h682
-rw-r--r--newlib/libc/sys/linux/include/regex.h106
-rw-r--r--newlib/libc/sys/linux/include/resolv.h319
-rw-r--r--newlib/libc/sys/linux/include/rpc/Makefile37
-rw-r--r--newlib/libc/sys/linux/include/rpc/auth.h356
-rw-r--r--newlib/libc/sys/linux/include/rpc/auth_des.h126
-rw-r--r--newlib/libc/sys/linux/include/rpc/auth_kerb.h143
-rw-r--r--newlib/libc/sys/linux/include/rpc/auth_unix.h84
-rw-r--r--newlib/libc/sys/linux/include/rpc/clnt.h504
-rw-r--r--newlib/libc/sys/linux/include/rpc/clnt_soc.h106
-rw-r--r--newlib/libc/sys/linux/include/rpc/clnt_stat.h83
-rw-r--r--newlib/libc/sys/linux/include/rpc/des.h83
-rw-r--r--newlib/libc/sys/linux/include/rpc/des_crypt.h106
-rw-r--r--newlib/libc/sys/linux/include/rpc/nettype.h64
-rw-r--r--newlib/libc/sys/linux/include/rpc/pmap_clnt.h86
-rw-r--r--newlib/libc/sys/linux/include/rpc/pmap_prot.h107
-rw-r--r--newlib/libc/sys/linux/include/rpc/pmap_rmt.h65
-rw-r--r--newlib/libc/sys/linux/include/rpc/raw.h58
-rw-r--r--newlib/libc/sys/linux/include/rpc/rpc.h108
-rw-r--r--newlib/libc/sys/linux/include/rpc/rpc_com.h83
-rw-r--r--newlib/libc/sys/linux/include/rpc/rpc_msg.h214
-rw-r--r--newlib/libc/sys/linux/include/rpc/rpcb_clnt.h85
-rw-r--r--newlib/libc/sys/linux/include/rpc/rpcb_prot.h660
-rw-r--r--newlib/libc/sys/linux/include/rpc/rpcb_prot.x554
-rw-r--r--newlib/libc/sys/linux/include/rpc/rpcent.h69
-rw-r--r--newlib/libc/sys/linux/include/rpc/svc.h429
-rw-r--r--newlib/libc/sys/linux/include/rpc/svc_auth.h55
-rw-r--r--newlib/libc/sys/linux/include/rpc/svc_dg.h51
-rw-r--r--newlib/libc/sys/linux/include/rpc/svc_soc.h116
-rw-r--r--newlib/libc/sys/linux/include/rpc/types.h108
-rw-r--r--newlib/libc/sys/linux/include/rpc/xdr.h365
-rw-r--r--newlib/libc/sys/linux/include/rune.h67
-rw-r--r--newlib/libc/sys/linux/include/runetype.h113
-rw-r--r--newlib/libc/sys/linux/include/semaphore.h1
-rw-r--r--newlib/libc/sys/linux/include/setjmp.h41
-rw-r--r--newlib/libc/sys/linux/include/setlocale.h37
-rw-r--r--newlib/libc/sys/linux/include/stdint.h265
-rw-r--r--newlib/libc/sys/linux/include/time.h248
-rw-r--r--newlib/libc/sys/linux/include/un-namespace.h140
-rw-r--r--newlib/libc/sys/linux/include/unistd.h20
-rw-r--r--newlib/libc/sys/linux/include/wordexp.h40
-rw-r--r--newlib/libc/sys/linux/inode.c98
-rw-r--r--newlib/libc/sys/linux/internal_statvfs.c109
-rw-r--r--newlib/libc/sys/linux/intl/Makefile.am36
-rw-r--r--newlib/libc/sys/linux/intl/Makefile.in384
-rw-r--r--newlib/libc/sys/linux/intl/bindtextdom.c387
-rw-r--r--newlib/libc/sys/linux/intl/catgets.c142
-rw-r--r--newlib/libc/sys/linux/intl/catgetsinfo.h56
-rw-r--r--newlib/libc/sys/linux/intl/config.h29
-rw-r--r--newlib/libc/sys/linux/intl/dcgettext.c59
-rw-r--r--newlib/libc/sys/linux/intl/dcigettext.c1286
-rw-r--r--newlib/libc/sys/linux/intl/dcngettext.c61
-rw-r--r--newlib/libc/sys/linux/intl/dgettext.c62
-rw-r--r--newlib/libc/sys/linux/intl/dngettext.c64
-rw-r--r--newlib/libc/sys/linux/intl/explodename.c206
-rw-r--r--newlib/libc/sys/linux/intl/finddomain.c222
-rw-r--r--newlib/libc/sys/linux/intl/gettext.c75
-rw-r--r--newlib/libc/sys/linux/intl/gettext.h103
-rw-r--r--newlib/libc/sys/linux/intl/gettextP.h256
-rw-r--r--newlib/libc/sys/linux/intl/hash-string.h60
-rw-r--r--newlib/libc/sys/linux/intl/l10nflist.c423
-rw-r--r--newlib/libc/sys/linux/intl/loadinfo.h100
-rw-r--r--newlib/libc/sys/linux/intl/loadmsgcat.c564
-rw-r--r--newlib/libc/sys/linux/intl/locale.alias75
-rw-r--r--newlib/libc/sys/linux/intl/localealias.c445
-rw-r--r--newlib/libc/sys/linux/intl/ngettext.c77
-rw-r--r--newlib/libc/sys/linux/intl/open_catalog.c334
-rw-r--r--newlib/libc/sys/linux/intl/plural.c1319
-rw-r--r--newlib/libc/sys/linux/intl/plural.y406
-rw-r--r--newlib/libc/sys/linux/intl/stpcpy.c10
-rw-r--r--newlib/libc/sys/linux/intl/textdomain.c155
-rw-r--r--newlib/libc/sys/linux/io.c84
-rw-r--r--newlib/libc/sys/linux/io64.c68
-rw-r--r--newlib/libc/sys/linux/ipc.c87
-rw-r--r--newlib/libc/sys/linux/kernel_sigaction.h19
-rw-r--r--newlib/libc/sys/linux/libc-internal.h29
-rw-r--r--newlib/libc/sys/linux/libc-symbols.h352
-rw-r--r--newlib/libc/sys/linux/libc-tsd.h44
-rw-r--r--newlib/libc/sys/linux/libintl.h9
-rw-r--r--newlib/libc/sys/linux/linux.c14
-rw-r--r--newlib/libc/sys/linux/linux_fsinfo.h114
-rw-r--r--newlib/libc/sys/linux/linuxthreads/LICENSE501
-rw-r--r--newlib/libc/sys/linux/linuxthreads/Makefile.am142
-rw-r--r--newlib/libc/sys/linux/linuxthreads/Makefile.in685
-rw-r--r--newlib/libc/sys/linux/linuxthreads/aclocal.m41223
-rw-r--r--newlib/libc/sys/linux/linuxthreads/attr.c308
-rw-r--r--newlib/libc/sys/linux/linuxthreads/barrier.c125
-rw-r--r--newlib/libc/sys/linux/linuxthreads/bits/initspin.h28
-rw-r--r--newlib/libc/sys/linux/linuxthreads/bits/libc-lock.h297
-rw-r--r--newlib/libc/sys/linux/linuxthreads/bits/libc-tsd.h44
-rw-r--r--newlib/libc/sys/linux/linuxthreads/bits/local_lim.h77
-rw-r--r--newlib/libc/sys/linux/linuxthreads/bits/posix_opt.h141
-rw-r--r--newlib/libc/sys/linux/linuxthreads/bits/pthreadtypes.h142
-rw-r--r--newlib/libc/sys/linux/linuxthreads/bits/sigthread.h38
-rw-r--r--newlib/libc/sys/linux/linuxthreads/bp-sym.h26
-rw-r--r--newlib/libc/sys/linux/linuxthreads/cancel.c220
-rw-r--r--newlib/libc/sys/linux/linuxthreads/condvar.c301
-rw-r--r--newlib/libc/sys/linux/linuxthreads/config.h14
-rwxr-xr-xnewlib/libc/sys/linux/linuxthreads/configure3453
-rw-r--r--newlib/libc/sys/linux/linuxthreads/configure.in31
-rw-r--r--newlib/libc/sys/linux/linuxthreads/defs.awk27
-rw-r--r--newlib/libc/sys/linux/linuxthreads/ecmutex.c157
-rw-r--r--newlib/libc/sys/linux/linuxthreads/events.c37
-rw-r--r--newlib/libc/sys/linux/linuxthreads/getcpuclockid.c40
-rw-r--r--newlib/libc/sys/linux/linuxthreads/getreent.c11
-rw-r--r--newlib/libc/sys/linux/linuxthreads/internals.h576
-rw-r--r--newlib/libc/sys/linux/linuxthreads/join.c218
-rw-r--r--newlib/libc/sys/linux/linuxthreads/joinrace.c48
-rw-r--r--newlib/libc/sys/linux/linuxthreads/kernel-features.h193
-rw-r--r--newlib/libc/sys/linux/linuxthreads/libc-internal.h29
-rw-r--r--newlib/libc/sys/linux/linuxthreads/libc-symbols.h352
-rw-r--r--newlib/libc/sys/linux/linuxthreads/linuxthreads.texi1630
-rw-r--r--newlib/libc/sys/linux/linuxthreads/lockfile.c97
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/Makefile.am10
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/Makefile.in356
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/aclocal.m41223
-rwxr-xr-xnewlib/libc/sys/linux/linuxthreads/machine/configure3422
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/configure.in26
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/generic/generic-sysdep.h46
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.am26
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.in411
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/aclocal.m41223
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/bp-asm.h144
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/clone.S95
-rwxr-xr-xnewlib/libc/sys/linux/linuxthreads/machine/i386/configure3343
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/configure.in22
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.S60
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.h130
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/pspinlock.c97
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/pt-machine.h98
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/sigcontextinfo.h51
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/stackinfo.h28
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.S41
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.h291
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/useldt.h205
-rw-r--r--newlib/libc/sys/linux/linuxthreads/manager.c981
-rw-r--r--newlib/libc/sys/linux/linuxthreads/mq_notify.c106
-rw-r--r--newlib/libc/sys/linux/linuxthreads/mutex.c366
-rw-r--r--newlib/libc/sys/linux/linuxthreads/no-tsd.c34
-rw-r--r--newlib/libc/sys/linux/linuxthreads/oldsemaphore.c245
-rw-r--r--newlib/libc/sys/linux/linuxthreads/posix-timer.h210
-rw-r--r--newlib/libc/sys/linux/linuxthreads/prio.c65
-rw-r--r--newlib/libc/sys/linux/linuxthreads/proc_service.h70
-rw-r--r--newlib/libc/sys/linux/linuxthreads/pt-machine.c25
-rw-r--r--newlib/libc/sys/linux/linuxthreads/ptclock_gettime.c46
-rw-r--r--newlib/libc/sys/linux/linuxthreads/ptclock_settime.c33
-rw-r--r--newlib/libc/sys/linux/linuxthreads/ptfork.c120
-rw-r--r--newlib/libc/sys/linux/linuxthreads/pthread.c1248
-rw-r--r--newlib/libc/sys/linux/linuxthreads/ptlongjmp.c73
-rw-r--r--newlib/libc/sys/linux/linuxthreads/queue.h61
-rw-r--r--newlib/libc/sys/linux/linuxthreads/reent.c18
-rw-r--r--newlib/libc/sys/linux/linuxthreads/reqsyscalls.c20
-rw-r--r--newlib/libc/sys/linux/linuxthreads/restart.h49
-rw-r--r--newlib/libc/sys/linux/linuxthreads/rwlock.c658
-rw-r--r--newlib/libc/sys/linux/linuxthreads/semaphore.c304
-rw-r--r--newlib/libc/sys/linux/linuxthreads/semaphore.h89
-rw-r--r--newlib/libc/sys/linux/linuxthreads/shlib-compat.h84
-rw-r--r--newlib/libc/sys/linux/linuxthreads/signals.c243
-rw-r--r--newlib/libc/sys/linux/linuxthreads/specific.c228
-rw-r--r--newlib/libc/sys/linux/linuxthreads/spinlock.c774
-rw-r--r--newlib/libc/sys/linux/linuxthreads/spinlock.h218
-rw-r--r--newlib/libc/sys/linux/linuxthreads/sysctl.c43
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_init.c32
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_log.c32
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_symbol_list.c55
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_clear_event.c53
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_delete.c58
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_enable_stats.c35
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_event_addr.c73
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_event_getmsg.c128
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_get_nthreads.c42
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_get_ph.c36
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_get_stats.c35
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_map_id2thr.c66
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_map_lwp2thr.c81
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_new.c132
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_reset_stats.c35
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_set_event.c53
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_setconcurrency.c35
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_thr_iter.c142
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_ta_tsd_iter.c55
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_clear_event.c57
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_dbresume.c30
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_dbsuspend.c30
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_event_enable.c41
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_event_getmsg.c60
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_get_info.c76
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_getfpregs.c49
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_getgregs.c49
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_getxregs.c30
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_getxregsize.c30
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_set_event.c57
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_setfpregs.c46
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_setgregs.c46
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_setprio.c30
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_setsigpending.c31
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_setxregs.c30
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_sigsetmask.c30
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_tsd.c76
-rw-r--r--newlib/libc/sys/linux/linuxthreads/td_thr_validate.c57
-rw-r--r--newlib/libc/sys/linux/linuxthreads/testrtsig.h36
-rw-r--r--newlib/libc/sys/linux/linuxthreads/thread_db.h439
-rw-r--r--newlib/libc/sys/linux/linuxthreads/thread_dbP.h105
-rw-r--r--newlib/libc/sys/linux/linuxthreads/timer_create.c179
-rw-r--r--newlib/libc/sys/linux/linuxthreads/timer_delete.c70
-rw-r--r--newlib/libc/sys/linux/linuxthreads/timer_getoverr.c45
-rw-r--r--newlib/libc/sys/linux/linuxthreads/timer_gettime.c71
-rw-r--r--newlib/libc/sys/linux/linuxthreads/timer_routines.c584
-rw-r--r--newlib/libc/sys/linux/linuxthreads/timer_settime.c137
-rw-r--r--newlib/libc/sys/linux/linuxthreads/tst-cancel.c213
-rw-r--r--newlib/libc/sys/linux/linuxthreads/tst-context.c109
-rw-r--r--newlib/libc/sys/linux/linuxthreads/tststack.c72
-rw-r--r--newlib/libc/sys/linux/linuxthreads/unload.c45
-rw-r--r--newlib/libc/sys/linux/linuxthreads/weaks.c121
-rw-r--r--newlib/libc/sys/linux/linuxthreads/wrapsyscall.c251
-rw-r--r--newlib/libc/sys/linux/machine/Makefile.am21
-rw-r--r--newlib/libc/sys/linux/machine/Makefile.in371
-rw-r--r--newlib/libc/sys/linux/machine/aclocal.m41223
-rwxr-xr-xnewlib/libc/sys/linux/machine/configure3429
-rw-r--r--newlib/libc/sys/linux/machine/configure.in32
-rw-r--r--newlib/libc/sys/linux/machine/hp-timing.h83
-rw-r--r--newlib/libc/sys/linux/machine/i386/Makefile.am27
-rw-r--r--newlib/libc/sys/linux/machine/i386/Makefile.in413
-rw-r--r--newlib/libc/sys/linux/machine/i386/aclocal.m41223
-rwxr-xr-xnewlib/libc/sys/linux/machine/i386/configure3343
-rw-r--r--newlib/libc/sys/linux/machine/i386/configure.in22
-rw-r--r--newlib/libc/sys/linux/machine/i386/crt0.c45
-rw-r--r--newlib/libc/sys/linux/machine/i386/dl-machine.h420
-rw-r--r--newlib/libc/sys/linux/machine/i386/dl-procinfo.c38
-rw-r--r--newlib/libc/sys/linux/machine/i386/dl-procinfo.h132
-rw-r--r--newlib/libc/sys/linux/machine/i386/get_clockfreq.c117
-rw-r--r--newlib/libc/sys/linux/machine/i386/getpagesize.c6
-rw-r--r--newlib/libc/sys/linux/machine/i386/hp-timing.c24
-rw-r--r--newlib/libc/sys/linux/machine/i386/hp-timing.h187
-rw-r--r--newlib/libc/sys/linux/machine/i386/huge_val.h56
-rw-r--r--newlib/libc/sys/linux/machine/i386/i386mach.h83
-rw-r--r--newlib/libc/sys/linux/machine/i386/include/endian.h116
-rw-r--r--newlib/libc/sys/linux/machine/i386/include/param.h178
-rw-r--r--newlib/libc/sys/linux/machine/i386/include/setjmp.h6
-rw-r--r--newlib/libc/sys/linux/machine/i386/include/termios.h1
-rw-r--r--newlib/libc/sys/linux/machine/i386/setjmp.S91
-rw-r--r--newlib/libc/sys/linux/machine/i386/sigaction.c114
-rw-r--r--newlib/libc/sys/linux/machine/i386/sigstack.h14
-rw-r--r--newlib/libc/sys/linux/machine/i386/socketcall.h89
-rw-r--r--newlib/libc/sys/linux/machine/i386/syscall.h190
-rw-r--r--newlib/libc/sys/linux/machine/i386/sysdep.h1
-rw-r--r--newlib/libc/sys/linux/machine/i386/weakalias.h10
-rw-r--r--newlib/libc/sys/linux/malign.c1
-rw-r--r--newlib/libc/sys/linux/malignr.c7
-rw-r--r--newlib/libc/sys/linux/mallinfor.c7
-rw-r--r--newlib/libc/sys/linux/malloc.c5082
-rw-r--r--newlib/libc/sys/linux/mallocr.c7
-rw-r--r--newlib/libc/sys/linux/malloptr.c7
-rw-r--r--newlib/libc/sys/linux/mallstatsr.c7
-rw-r--r--newlib/libc/sys/linux/mcheck.c358
-rw-r--r--newlib/libc/sys/linux/mhooks.h12
-rw-r--r--newlib/libc/sys/linux/mmap.c20
-rw-r--r--newlib/libc/sys/linux/mntent.c79
-rw-r--r--newlib/libc/sys/linux/mntent_r.c256
-rw-r--r--newlib/libc/sys/linux/mq_close.c48
-rw-r--r--newlib/libc/sys/linux/mq_getattr.c52
-rw-r--r--newlib/libc/sys/linux/mq_notify.c22
-rw-r--r--newlib/libc/sys/linux/mq_open.c346
-rw-r--r--newlib/libc/sys/linux/mq_receive.c67
-rw-r--r--newlib/libc/sys/linux/mq_send.c72
-rw-r--r--newlib/libc/sys/linux/mq_setattr.c59
-rw-r--r--newlib/libc/sys/linux/mq_unlink.c73
-rw-r--r--newlib/libc/sys/linux/mqlocal.h47
-rw-r--r--newlib/libc/sys/linux/msize.c1
-rw-r--r--newlib/libc/sys/linux/msizer.c7
-rw-r--r--newlib/libc/sys/linux/mstats.c1
-rw-r--r--newlib/libc/sys/linux/mtrim.c1
-rw-r--r--newlib/libc/sys/linux/mtrimr.c7
-rw-r--r--newlib/libc/sys/linux/net/Makefile.am87
-rw-r--r--newlib/libc/sys/linux/net/Makefile.in447
-rw-r--r--newlib/libc/sys/linux/net/addr2ascii.3222
-rw-r--r--newlib/libc/sys/linux/net/addr2ascii.c86
-rw-r--r--newlib/libc/sys/linux/net/ascii2addr.c70
-rw-r--r--newlib/libc/sys/linux/net/base64.c315
-rw-r--r--newlib/libc/sys/linux/net/bindresvport.c160
-rw-r--r--newlib/libc/sys/linux/net/byteorder.384
-rw-r--r--newlib/libc/sys/linux/net/ether_addr.c231
-rw-r--r--newlib/libc/sys/linux/net/ethers.3197
-rw-r--r--newlib/libc/sys/linux/net/getaddrinfo.3620
-rw-r--r--newlib/libc/sys/linux/net/getaddrinfo.c1979
-rw-r--r--newlib/libc/sys/linux/net/gethostbydns.c815
-rw-r--r--newlib/libc/sys/linux/net/gethostbyht.c285
-rw-r--r--newlib/libc/sys/linux/net/gethostbyname.3380
-rw-r--r--newlib/libc/sys/linux/net/gethostbynis.c281
-rw-r--r--newlib/libc/sys/linux/net/gethostnamadr.c221
-rw-r--r--newlib/libc/sys/linux/net/getifaddrs.3164
-rw-r--r--newlib/libc/sys/linux/net/getifaddrs.c401
-rw-r--r--newlib/libc/sys/linux/net/getipnodebyname.3461
-rw-r--r--newlib/libc/sys/linux/net/getnameinfo.3311
-rw-r--r--newlib/libc/sys/linux/net/getnameinfo.c372
-rw-r--r--newlib/libc/sys/linux/net/getnetbydns.c327
-rw-r--r--newlib/libc/sys/linux/net/getnetbyht.c183
-rw-r--r--newlib/libc/sys/linux/net/getnetbynis.c190
-rw-r--r--newlib/libc/sys/linux/net/getnetent.3172
-rw-r--r--newlib/libc/sys/linux/net/getnetnamadr.c113
-rw-r--r--newlib/libc/sys/linux/net/getproto.c57
-rw-r--r--newlib/libc/sys/linux/net/getprotoent.3149
-rw-r--r--newlib/libc/sys/linux/net/getprotoent.c121
-rw-r--r--newlib/libc/sys/linux/net/getprotoname.c64
-rw-r--r--newlib/libc/sys/linux/net/getservbyname.c81
-rw-r--r--newlib/libc/sys/linux/net/getservbyport.c76
-rw-r--r--newlib/libc/sys/linux/net/getservent.3158
-rw-r--r--newlib/libc/sys/linux/net/getservent.c282
-rw-r--r--newlib/libc/sys/linux/net/herror.c103
-rw-r--r--newlib/libc/sys/linux/net/hesiod.3159
-rw-r--r--newlib/libc/sys/linux/net/hesiod.c600
-rw-r--r--newlib/libc/sys/linux/net/if_indextoname.3142
-rw-r--r--newlib/libc/sys/linux/net/ifname.c227
-rw-r--r--newlib/libc/sys/linux/net/inet.3271
-rw-r--r--newlib/libc/sys/linux/net/inet6_option_space.3445
-rw-r--r--newlib/libc/sys/linux/net/inet6_rthdr_space.3323
-rw-r--r--newlib/libc/sys/linux/net/inet_addr.c201
-rw-r--r--newlib/libc/sys/linux/net/inet_lnaof.c69
-rw-r--r--newlib/libc/sys/linux/net/inet_makeaddr.c72
-rw-r--r--newlib/libc/sys/linux/net/inet_net.3157
-rw-r--r--newlib/libc/sys/linux/net/inet_net_ntop.c148
-rw-r--r--newlib/libc/sys/linux/net/inet_net_pton.c214
-rw-r--r--newlib/libc/sys/linux/net/inet_neta.c92
-rw-r--r--newlib/libc/sys/linux/net/inet_netof.c68
-rw-r--r--newlib/libc/sys/linux/net/inet_network.c100
-rw-r--r--newlib/libc/sys/linux/net/inet_ntoa.c67
-rw-r--r--newlib/libc/sys/linux/net/inet_ntop.c200
-rw-r--r--newlib/libc/sys/linux/net/inet_pton.c222
-rw-r--r--newlib/libc/sys/linux/net/innetgr-stub.c7
-rw-r--r--newlib/libc/sys/linux/net/ip6opt.c387
-rw-r--r--newlib/libc/sys/linux/net/iso_addr.3113
-rw-r--r--newlib/libc/sys/linux/net/iso_addr.c119
-rw-r--r--newlib/libc/sys/linux/net/issetugid-stub.c5
-rw-r--r--newlib/libc/sys/linux/net/linkaddr.3140
-rw-r--r--newlib/libc/sys/linux/net/linkaddr.c160
-rw-r--r--newlib/libc/sys/linux/net/map_v4v6.c128
-rw-r--r--newlib/libc/sys/linux/net/name6.c1812
-rw-r--r--newlib/libc/sys/linux/net/namespace.h152
-rw-r--r--newlib/libc/sys/linux/net/ns.3133
-rw-r--r--newlib/libc/sys/linux/net/ns_addr.c239
-rw-r--r--newlib/libc/sys/linux/net/ns_name.c592
-rw-r--r--newlib/libc/sys/linux/net/ns_netint.c53
-rw-r--r--newlib/libc/sys/linux/net/ns_ntoa.c105
-rw-r--r--newlib/libc/sys/linux/net/ns_parse.c189
-rw-r--r--newlib/libc/sys/linux/net/ns_print.c744
-rw-r--r--newlib/libc/sys/linux/net/ns_ttl.c150
-rw-r--r--newlib/libc/sys/linux/net/nsap_addr.c113
-rw-r--r--newlib/libc/sys/linux/net/nsdispatch.3231
-rw-r--r--newlib/libc/sys/linux/net/nsdispatch.c266
-rw-r--r--newlib/libc/sys/linux/net/nslexer.c1712
-rw-r--r--newlib/libc/sys/linux/net/nslexer.l114
-rw-r--r--newlib/libc/sys/linux/net/nsparser.c541
-rw-r--r--newlib/libc/sys/linux/net/nsparser.h13
-rw-r--r--newlib/libc/sys/linux/net/nsparser.y178
-rw-r--r--newlib/libc/sys/linux/net/rcmd.3298
-rw-r--r--newlib/libc/sys/linux/net/rcmd.c779
-rw-r--r--newlib/libc/sys/linux/net/rcmdsh.3116
-rw-r--r--newlib/libc/sys/linux/net/rcmdsh.c169
-rw-r--r--newlib/libc/sys/linux/net/recv.c54
-rw-r--r--newlib/libc/sys/linux/net/res_comp.c268
-rw-r--r--newlib/libc/sys/linux/net/res_config.h10
-rw-r--r--newlib/libc/sys/linux/net/res_data.c82
-rw-r--r--newlib/libc/sys/linux/net/res_debug.c1003
-rw-r--r--newlib/libc/sys/linux/net/res_init.c585
-rw-r--r--newlib/libc/sys/linux/net/res_mkquery.c245
-rw-r--r--newlib/libc/sys/linux/net/res_mkupdate.c412
-rw-r--r--newlib/libc/sys/linux/net/res_query.c424
-rw-r--r--newlib/libc/sys/linux/net/res_send.c954
-rw-r--r--newlib/libc/sys/linux/net/res_update.c515
-rw-r--r--newlib/libc/sys/linux/net/resolver.3422
-rw-r--r--newlib/libc/sys/linux/net/rthdr.c319
-rw-r--r--newlib/libc/sys/linux/net/send.c54
-rw-r--r--newlib/libc/sys/linux/net/un-namespace.h134
-rw-r--r--newlib/libc/sys/linux/net/vars.c45
-rw-r--r--newlib/libc/sys/linux/ntp_gettime.c38
-rw-r--r--newlib/libc/sys/linux/pathconf.c300
-rw-r--r--newlib/libc/sys/linux/pread.c46
-rw-r--r--newlib/libc/sys/linux/pread64.c65
-rw-r--r--newlib/libc/sys/linux/process.c58
-rw-r--r--newlib/libc/sys/linux/prof-freq.c54
-rw-r--r--newlib/libc/sys/linux/profile.c12
-rw-r--r--newlib/libc/sys/linux/psignal.c15
-rw-r--r--newlib/libc/sys/linux/pvallocr.c7
-rw-r--r--newlib/libc/sys/linux/pwrite.c46
-rw-r--r--newlib/libc/sys/linux/pwrite64.c64
-rw-r--r--newlib/libc/sys/linux/raise.c3
-rw-r--r--newlib/libc/sys/linux/readdir64.c97
-rw-r--r--newlib/libc/sys/linux/realloc.c1
-rw-r--r--newlib/libc/sys/linux/reallocr.c7
-rw-r--r--newlib/libc/sys/linux/realpath.c92
-rw-r--r--newlib/libc/sys/linux/rename.c9
-rw-r--r--newlib/libc/sys/linux/resource.c17
-rw-r--r--newlib/libc/sys/linux/scandir64.c176
-rw-r--r--newlib/libc/sys/linux/sched.c26
-rw-r--r--newlib/libc/sys/linux/select.c17
-rw-r--r--newlib/libc/sys/linux/seteuid.c18
-rw-r--r--newlib/libc/sys/linux/sethostid.c2
-rw-r--r--newlib/libc/sys/linux/sethostname.c8
-rw-r--r--newlib/libc/sys/linux/setrlimit64.c43
-rw-r--r--newlib/libc/sys/linux/shared.ld15
-rw-r--r--newlib/libc/sys/linux/shm_open.c48
-rw-r--r--newlib/libc/sys/linux/shm_unlink.c28
-rw-r--r--newlib/libc/sys/linux/sig.c87
-rw-r--r--newlib/libc/sys/linux/sigaction.c77
-rw-r--r--newlib/libc/sys/linux/siglongjmp.c18
-rw-r--r--newlib/libc/sys/linux/signal.c54
-rw-r--r--newlib/libc/sys/linux/sigqueue.c56
-rw-r--r--newlib/libc/sys/linux/sigset.c98
-rw-r--r--newlib/libc/sys/linux/sigwait.c93
-rw-r--r--newlib/libc/sys/linux/sleep.c20
-rw-r--r--newlib/libc/sys/linux/socket.c32
-rw-r--r--newlib/libc/sys/linux/sockops.h27
-rw-r--r--newlib/libc/sys/linux/stack.c10
-rw-r--r--newlib/libc/sys/linux/statvfs.c47
-rw-r--r--newlib/libc/sys/linux/statvfs64.c50
-rw-r--r--newlib/libc/sys/linux/stdlib/COPYRIGHT56
-rw-r--r--newlib/libc/sys/linux/stdlib/Makefile.am44
-rw-r--r--newlib/libc/sys/linux/stdlib/Makefile.in377
-rw-r--r--newlib/libc/sys/linux/stdlib/cclass.h63
-rw-r--r--newlib/libc/sys/linux/stdlib/cname.h142
-rw-r--r--newlib/libc/sys/linux/stdlib/collate.c217
-rw-r--r--newlib/libc/sys/linux/stdlib/collate.h67
-rw-r--r--newlib/libc/sys/linux/stdlib/collcmp.c85
-rw-r--r--newlib/libc/sys/linux/stdlib/engine.c1140
-rw-r--r--newlib/libc/sys/linux/stdlib/fnmatch.3151
-rw-r--r--newlib/libc/sys/linux/stdlib/fnmatch.c233
-rw-r--r--newlib/libc/sys/linux/stdlib/glob.3466
-rw-r--r--newlib/libc/sys/linux/stdlib/glob.c910
-rw-r--r--newlib/libc/sys/linux/stdlib/reallocf.c41
-rw-r--r--newlib/libc/sys/linux/stdlib/regcomp.c2089
-rw-r--r--newlib/libc/sys/linux/stdlib/regerror.c179
-rw-r--r--newlib/libc/sys/linux/stdlib/regex.3701
-rw-r--r--newlib/libc/sys/linux/stdlib/regex2.h177
-rw-r--r--newlib/libc/sys/linux/stdlib/regexec.c183
-rw-r--r--newlib/libc/sys/linux/stdlib/regfree.c87
-rw-r--r--newlib/libc/sys/linux/stdlib/utils.h58
-rw-r--r--newlib/libc/sys/linux/stdlib/wordexp.c186
-rw-r--r--newlib/libc/sys/linux/stdlib/wordfree.c38
-rw-r--r--newlib/libc/sys/linux/strsignal.c63
-rw-r--r--newlib/libc/sys/linux/strverscmp.c113
-rw-r--r--newlib/libc/sys/linux/sys/_types.h51
-rw-r--r--newlib/libc/sys/linux/sys/cdefs.h238
-rw-r--r--newlib/libc/sys/linux/sys/dirent.h58
-rw-r--r--newlib/libc/sys/linux/sys/dlfcn.h64
-rw-r--r--newlib/libc/sys/linux/sys/elfclass.h14
-rw-r--r--newlib/libc/sys/linux/sys/errno.h34
-rw-r--r--newlib/libc/sys/linux/sys/event.h196
-rw-r--r--newlib/libc/sys/linux/sys/fcntl.h29
-rw-r--r--newlib/libc/sys/linux/sys/features.h16
-rw-r--r--newlib/libc/sys/linux/sys/file.h13
-rw-r--r--newlib/libc/sys/linux/sys/ioccom.h75
-rw-r--r--newlib/libc/sys/linux/sys/ioctl.h11
-rw-r--r--newlib/libc/sys/linux/sys/libc-tsd.h52
-rw-r--r--newlib/libc/sys/linux/sys/link.h4
-rw-r--r--newlib/libc/sys/linux/sys/linux_time.h76
-rw-r--r--newlib/libc/sys/linux/sys/lock.h36
-rw-r--r--newlib/libc/sys/linux/sys/param.h57
-rw-r--r--newlib/libc/sys/linux/sys/resource.h12
-rw-r--r--newlib/libc/sys/linux/sys/select.h13
-rw-r--r--newlib/libc/sys/linux/sys/signal.h56
-rw-r--r--newlib/libc/sys/linux/sys/socket.h471
-rw-r--r--newlib/libc/sys/linux/sys/sockio.h115
-rw-r--r--newlib/libc/sys/linux/sys/stat.h33
-rw-r--r--newlib/libc/sys/linux/sys/stdio.h21
-rw-r--r--newlib/libc/sys/linux/sys/string.h8
-rw-r--r--newlib/libc/sys/linux/sys/termios.h17
-rw-r--r--newlib/libc/sys/linux/sys/time.h94
-rw-r--r--newlib/libc/sys/linux/sys/types.h228
-rw-r--r--newlib/libc/sys/linux/sys/unistd.h145
-rw-r--r--newlib/libc/sys/linux/sys/utime.h14
-rw-r--r--newlib/libc/sys/linux/sys/utmp.h54
-rw-r--r--newlib/libc/sys/linux/sys/utsname.h23
-rw-r--r--newlib/libc/sys/linux/sys/wait.h40
-rw-r--r--newlib/libc/sys/linux/sysconf.c383
-rw-r--r--newlib/libc/sys/linux/sysctl.c42
-rw-r--r--newlib/libc/sys/linux/systat.c10
-rw-r--r--newlib/libc/sys/linux/system.c158
-rw-r--r--newlib/libc/sys/linux/tcdrain.c13
-rw-r--r--newlib/libc/sys/linux/tcsendbrk.c45
-rw-r--r--newlib/libc/sys/linux/termios.c72
-rw-r--r--newlib/libc/sys/linux/thread-m.h241
-rw-r--r--newlib/libc/sys/linux/time.c26
-rw-r--r--newlib/libc/sys/linux/ttyname_r.c192
-rw-r--r--newlib/libc/sys/linux/usleep.c20
-rw-r--r--newlib/libc/sys/linux/utimes.c44
-rw-r--r--newlib/libc/sys/linux/vallocr.c7
-rw-r--r--newlib/libc/sys/linux/versionsort.c11
-rw-r--r--newlib/libc/sys/linux/versionsort64.c11
-rw-r--r--newlib/libc/sys/linux/wait.c27
-rw-r--r--newlib/libc/sys/m88kbug/Makefile.am14
-rw-r--r--newlib/libc/sys/m88kbug/Makefile.in329
-rw-r--r--newlib/libc/sys/m88kbug/aclocal.m4366
-rwxr-xr-xnewlib/libc/sys/m88kbug/configure1880
-rw-r--r--newlib/libc/sys/m88kbug/configure.in12
-rw-r--r--newlib/libc/sys/m88kbug/crt0.c19
-rw-r--r--newlib/libc/sys/m88kbug/sys/systraps.h9
-rw-r--r--newlib/libc/sys/m88kbug/syscalls.c131
-rw-r--r--newlib/libc/sys/mmixware/Makefile.am18
-rw-r--r--newlib/libc/sys/mmixware/Makefile.in333
-rw-r--r--newlib/libc/sys/mmixware/_exit.c28
-rw-r--r--newlib/libc/sys/mmixware/access.c43
-rw-r--r--newlib/libc/sys/mmixware/aclocal.m4366
-rw-r--r--newlib/libc/sys/mmixware/chmod.c26
-rw-r--r--newlib/libc/sys/mmixware/chown.c26
-rw-r--r--newlib/libc/sys/mmixware/close.c38
-rwxr-xr-xnewlib/libc/sys/mmixware/configure1880
-rw-r--r--newlib/libc/sys/mmixware/configure.in12
-rw-r--r--newlib/libc/sys/mmixware/creat.c27
-rw-r--r--newlib/libc/sys/mmixware/crt0.c18
-rw-r--r--newlib/libc/sys/mmixware/execv.c26
-rw-r--r--newlib/libc/sys/mmixware/execve.c26
-rw-r--r--newlib/libc/sys/mmixware/fork.c26
-rw-r--r--newlib/libc/sys/mmixware/fstat.c26
-rw-r--r--newlib/libc/sys/mmixware/getpid.c22
-rw-r--r--newlib/libc/sys/mmixware/gettime.c27
-rw-r--r--newlib/libc/sys/mmixware/isatty.c23
-rw-r--r--newlib/libc/sys/mmixware/kill.c28
-rw-r--r--newlib/libc/sys/mmixware/link.c25
-rw-r--r--newlib/libc/sys/mmixware/lseek.c63
-rw-r--r--newlib/libc/sys/mmixware/open.c237
-rw-r--r--newlib/libc/sys/mmixware/pipe.c26
-rw-r--r--newlib/libc/sys/mmixware/read.c61
-rw-r--r--newlib/libc/sys/mmixware/sbrk.c43
-rw-r--r--newlib/libc/sys/mmixware/setjmp.S87
-rw-r--r--newlib/libc/sys/mmixware/stat.c27
-rw-r--r--newlib/libc/sys/mmixware/sys/syscall.h149
-rw-r--r--newlib/libc/sys/mmixware/time.c30
-rw-r--r--newlib/libc/sys/mmixware/times.c25
-rw-r--r--newlib/libc/sys/mmixware/unlink.c23
-rw-r--r--newlib/libc/sys/mmixware/utime.c28
-rw-r--r--newlib/libc/sys/mmixware/wait.c27
-rw-r--r--newlib/libc/sys/mmixware/write.c42
-rw-r--r--newlib/libc/sys/netware/Makefile.am16
-rw-r--r--newlib/libc/sys/netware/Makefile.in330
-rw-r--r--newlib/libc/sys/netware/aclocal.m4366
-rwxr-xr-xnewlib/libc/sys/netware/configure1880
-rw-r--r--newlib/libc/sys/netware/configure.in12
-rw-r--r--newlib/libc/sys/netware/crt0.c4
-rw-r--r--newlib/libc/sys/netware/getpid.c11
-rw-r--r--newlib/libc/sys/netware/link.c17
-rw-r--r--newlib/libc/sys/rtems/Makefile.am14
-rw-r--r--newlib/libc/sys/rtems/Makefile.in329
-rw-r--r--newlib/libc/sys/rtems/aclocal.m4366
-rwxr-xr-xnewlib/libc/sys/rtems/configure1880
-rw-r--r--newlib/libc/sys/rtems/configure.in12
-rw-r--r--newlib/libc/sys/rtems/crt0.c132
-rw-r--r--newlib/libc/sys/rtems/dummysys.c1
-rw-r--r--newlib/libc/sys/rtems/include/limits.h166
-rw-r--r--newlib/libc/sys/rtems/machine/limits.h6
-rw-r--r--newlib/libc/sys/rtems/machine/param.h92
-rw-r--r--newlib/libc/sys/rtems/sys/dirent.h58
-rw-r--r--newlib/libc/sys/rtems/sys/param.h241
-rw-r--r--newlib/libc/sys/rtems/sys/queue.h611
-rw-r--r--newlib/libc/sys/rtems/sys/syslimits.h64
-rw-r--r--newlib/libc/sys/rtems/sys/utime.h32
-rw-r--r--newlib/libc/sys/sh/Makefile.am14
-rw-r--r--newlib/libc/sys/sh/Makefile.in329
-rw-r--r--newlib/libc/sys/sh/aclocal.m4366
-rwxr-xr-xnewlib/libc/sys/sh/configure1880
-rw-r--r--newlib/libc/sys/sh/configure.in12
-rw-r--r--newlib/libc/sys/sh/creat.c7
-rw-r--r--newlib/libc/sys/sh/crt0.S119
-rw-r--r--newlib/libc/sys/sh/ftruncate.c9
-rw-r--r--newlib/libc/sys/sh/sys/syscall.h38
-rw-r--r--newlib/libc/sys/sh/syscalls.c221
-rw-r--r--newlib/libc/sys/sh/trap.S43
-rw-r--r--newlib/libc/sys/sh/truncate.c9
-rw-r--r--newlib/libc/sys/sparc64/Makefile.am119
-rw-r--r--newlib/libc/sys/sparc64/Makefile.in435
-rw-r--r--newlib/libc/sys/sparc64/_exit.S14
-rw-r--r--newlib/libc/sys/sparc64/_main.c6
-rw-r--r--newlib/libc/sys/sparc64/aclocal.m4366
-rw-r--r--newlib/libc/sys/sparc64/cerror.S29
-rw-r--r--newlib/libc/sys/sparc64/closedir.c58
-rwxr-xr-xnewlib/libc/sys/sparc64/configure1880
-rw-r--r--newlib/libc/sys/sparc64/configure.in12
-rw-r--r--newlib/libc/sys/sparc64/creat.c11
-rw-r--r--newlib/libc/sys/sparc64/crt0.S123
-rw-r--r--newlib/libc/sys/sparc64/dup2.S9
-rw-r--r--newlib/libc/sys/sparc64/execve.S27
-rw-r--r--newlib/libc/sys/sparc64/ieee.c115
-rw-r--r--newlib/libc/sys/sparc64/isatty.c17
-rw-r--r--newlib/libc/sys/sparc64/lstat.S5
-rw-r--r--newlib/libc/sys/sparc64/opendir.c80
-rw-r--r--newlib/libc/sys/sparc64/readdir.c72
-rw-r--r--newlib/libc/sys/sparc64/rewinddir.c49
-rw-r--r--newlib/libc/sys/sparc64/sbrk.S78
-rw-r--r--newlib/libc/sys/sparc64/scandir.c138
-rw-r--r--newlib/libc/sys/sparc64/seekdir.c52
-rw-r--r--newlib/libc/sys/sparc64/sigsetjmp.S77
-rw-r--r--newlib/libc/sys/sparc64/stat.S9
-rw-r--r--newlib/libc/sys/sparc64/sys/dirent.h48
-rw-r--r--newlib/libc/sys/sparc64/sys/fcntl.h178
-rw-r--r--newlib/libc/sys/sparc64/sys/file.h3
-rw-r--r--newlib/libc/sys/sparc64/sys/stat.h131
-rw-r--r--newlib/libc/sys/sparc64/sys/syscall.h346
-rw-r--r--newlib/libc/sys/sparc64/sys/syscallasm.h87
-rw-r--r--newlib/libc/sys/sparc64/sys/termios.h122
-rw-r--r--newlib/libc/sys/sparc64/sys/time.h22
-rw-r--r--newlib/libc/sys/sparc64/sys/utime.h13
-rw-r--r--newlib/libc/sys/sparc64/sys/utmp.h43
-rw-r--r--newlib/libc/sys/sparc64/sys/wait.h43
-rw-r--r--newlib/libc/sys/sparc64/telldir.c129
-rw-r--r--newlib/libc/sys/sparc64/template.S14
-rw-r--r--newlib/libc/sys/sparc64/template_r.S26
-rw-r--r--newlib/libc/sys/sparc64/utime.S10
-rw-r--r--newlib/libc/sys/sparc64/utime2.c26
-rw-r--r--newlib/libc/sys/sparc64/wait.S35
-rw-r--r--newlib/libc/sys/sun4/Makefile.am95
-rw-r--r--newlib/libc/sys/sun4/Makefile.in360
-rw-r--r--newlib/libc/sys/sun4/_main.c6
-rw-r--r--newlib/libc/sys/sun4/aclocal.m4366
-rwxr-xr-xnewlib/libc/sys/sun4/configure1880
-rw-r--r--newlib/libc/sys/sun4/configure.in12
-rw-r--r--newlib/libc/sys/sun4/ieee.c115
-rw-r--r--newlib/libc/sys/sun4/sys/dirent.h45
-rw-r--r--newlib/libc/sys/sun4/sys/file.h3
-rw-r--r--newlib/libc/sys/sun4/sys/termios.h122
-rw-r--r--newlib/libc/sys/sun4/sys/utime.h13
-rw-r--r--newlib/libc/sys/sun4/sys/utmp.h43
-rw-r--r--newlib/libc/sys/sun4/sys/wait.h43
-rw-r--r--newlib/libc/sys/sysmec/Makefile.am18
-rw-r--r--newlib/libc/sys/sysmec/Makefile.in333
-rw-r--r--newlib/libc/sys/sysmec/_exit.c34
-rw-r--r--newlib/libc/sys/sysmec/access.c33
-rw-r--r--newlib/libc/sys/sysmec/aclocal.m4366
-rw-r--r--newlib/libc/sys/sysmec/chmod.c16
-rw-r--r--newlib/libc/sys/sysmec/chown.c17
-rw-r--r--newlib/libc/sys/sysmec/close.c16
-rwxr-xr-xnewlib/libc/sys/sysmec/configure1880
-rw-r--r--newlib/libc/sys/sysmec/configure.in12
-rw-r--r--newlib/libc/sys/sysmec/creat.c17
-rw-r--r--newlib/libc/sys/sysmec/crt0.S65
-rw-r--r--newlib/libc/sys/sysmec/crt1.c16
-rw-r--r--newlib/libc/sys/sysmec/execv.c16
-rw-r--r--newlib/libc/sys/sysmec/execve.c16
-rw-r--r--newlib/libc/sys/sysmec/fork.c16
-rw-r--r--newlib/libc/sys/sysmec/fstat.c19
-rw-r--r--newlib/libc/sys/sysmec/getpid.c15
-rw-r--r--newlib/libc/sys/sysmec/gettime.c17
-rw-r--r--newlib/libc/sys/sysmec/isatty.c16
-rw-r--r--newlib/libc/sys/sysmec/kill.c16
-rw-r--r--newlib/libc/sys/sysmec/lseek.c19
-rw-r--r--newlib/libc/sys/sysmec/open.c17
-rw-r--r--newlib/libc/sys/sysmec/pipe.c16
-rw-r--r--newlib/libc/sys/sysmec/read.c17
-rw-r--r--newlib/libc/sys/sysmec/sbrk.c36
-rw-r--r--newlib/libc/sys/sysmec/stat.c17
-rw-r--r--newlib/libc/sys/sysmec/sys/syscall.h35
-rw-r--r--newlib/libc/sys/sysmec/time.c16
-rw-r--r--newlib/libc/sys/sysmec/times.c17
-rw-r--r--newlib/libc/sys/sysmec/trap.S13
-rw-r--r--newlib/libc/sys/sysmec/unlink.c16
-rw-r--r--newlib/libc/sys/sysmec/utime.c18
-rw-r--r--newlib/libc/sys/sysmec/wait.c17
-rw-r--r--newlib/libc/sys/sysmec/write.c18
-rw-r--r--newlib/libc/sys/sysnec810/Makefile.am14
-rw-r--r--newlib/libc/sys/sysnec810/Makefile.in329
-rw-r--r--newlib/libc/sys/sysnec810/aclocal.m4366
-rwxr-xr-xnewlib/libc/sys/sysnec810/configure1880
-rw-r--r--newlib/libc/sys/sysnec810/configure.in12
-rw-r--r--newlib/libc/sys/sysnec810/crt0.s22
-rw-r--r--newlib/libc/sys/sysnec810/io.s41
-rw-r--r--newlib/libc/sys/sysnec810/misc.c40
-rw-r--r--newlib/libc/sys/sysnec810/sbrk.c12
-rw-r--r--newlib/libc/sys/sysnec810/write.c36
-rw-r--r--newlib/libc/sys/sysnecv850/Makefile.am19
-rw-r--r--newlib/libc/sys/sysnecv850/Makefile.in333
-rw-r--r--newlib/libc/sys/sysnecv850/_exit.c34
-rw-r--r--newlib/libc/sys/sysnecv850/access.c33
-rw-r--r--newlib/libc/sys/sysnecv850/aclocal.m4366
-rw-r--r--newlib/libc/sys/sysnecv850/chmod.c16
-rw-r--r--newlib/libc/sys/sysnecv850/chown.c16
-rw-r--r--newlib/libc/sys/sysnecv850/close.c16
-rwxr-xr-xnewlib/libc/sys/sysnecv850/configure1880
-rw-r--r--newlib/libc/sys/sysnecv850/configure.in12
-rw-r--r--newlib/libc/sys/sysnecv850/creat.c17
-rw-r--r--newlib/libc/sys/sysnecv850/crt0.S67
-rw-r--r--newlib/libc/sys/sysnecv850/crt1.c16
-rw-r--r--newlib/libc/sys/sysnecv850/execv.c16
-rw-r--r--newlib/libc/sys/sysnecv850/execve.c16
-rw-r--r--newlib/libc/sys/sysnecv850/fork.c16
-rw-r--r--newlib/libc/sys/sysnecv850/fstat.c18
-rw-r--r--newlib/libc/sys/sysnecv850/getpid.c15
-rw-r--r--newlib/libc/sys/sysnecv850/gettime.c17
-rw-r--r--newlib/libc/sys/sysnecv850/isatty.c16
-rw-r--r--newlib/libc/sys/sysnecv850/kill.c19
-rw-r--r--newlib/libc/sys/sysnecv850/link.c16
-rw-r--r--newlib/libc/sys/sysnecv850/lseek.c18
-rw-r--r--newlib/libc/sys/sysnecv850/open.c17
-rw-r--r--newlib/libc/sys/sysnecv850/pipe.c16
-rw-r--r--newlib/libc/sys/sysnecv850/read.c17
-rw-r--r--newlib/libc/sys/sysnecv850/sbrk.c36
-rw-r--r--newlib/libc/sys/sysnecv850/stat.c17
-rw-r--r--newlib/libc/sys/sysnecv850/sys/syscall.h35
-rw-r--r--newlib/libc/sys/sysnecv850/time.c16
-rw-r--r--newlib/libc/sys/sysnecv850/times.c17
-rw-r--r--newlib/libc/sys/sysnecv850/trap.S10
-rw-r--r--newlib/libc/sys/sysnecv850/unlink.c16
-rw-r--r--newlib/libc/sys/sysnecv850/utime.c18
-rw-r--r--newlib/libc/sys/sysnecv850/wait.c17
-rw-r--r--newlib/libc/sys/sysnecv850/write.c18
-rw-r--r--newlib/libc/sys/sysvi386/Makefile.am23
-rw-r--r--newlib/libc/sys/sysvi386/Makefile.in338
-rw-r--r--newlib/libc/sys/sysvi386/_exit.s6
-rw-r--r--newlib/libc/sys/sysvi386/_longjmp.s31
-rw-r--r--newlib/libc/sys/sysvi386/_setjmp.s24
-rw-r--r--newlib/libc/sys/sysvi386/access.s8
-rw-r--r--newlib/libc/sys/sysvi386/aclocal.m4366
-rw-r--r--newlib/libc/sys/sysvi386/alarm.s5
-rw-r--r--newlib/libc/sys/sysvi386/brk.s8
-rw-r--r--newlib/libc/sys/sysvi386/cerror.s9
-rw-r--r--newlib/libc/sys/sysvi386/chdir.s9
-rw-r--r--newlib/libc/sys/sysvi386/chmod.s9
-rw-r--r--newlib/libc/sys/sysvi386/close.s9
-rw-r--r--newlib/libc/sys/sysvi386/closedir.c58
-rwxr-xr-xnewlib/libc/sys/sysvi386/configure1880
-rw-r--r--newlib/libc/sys/sysvi386/configure.in12
-rw-r--r--newlib/libc/sys/sysvi386/crt0.c127
-rw-r--r--newlib/libc/sys/sysvi386/dup.c6
-rw-r--r--newlib/libc/sys/sysvi386/dup2.c7
-rw-r--r--newlib/libc/sys/sysvi386/exec.c54
-rw-r--r--newlib/libc/sys/sysvi386/execve.s7
-rw-r--r--newlib/libc/sys/sysvi386/fcntl.s9
-rw-r--r--newlib/libc/sys/sysvi386/fork.s12
-rw-r--r--newlib/libc/sys/sysvi386/fpathconf.s6
-rw-r--r--newlib/libc/sys/sysvi386/fps.s18
-rw-r--r--newlib/libc/sys/sysvi386/fpx.c73
-rw-r--r--newlib/libc/sys/sysvi386/fstat.s9
-rw-r--r--newlib/libc/sys/sysvi386/getdents.s6
-rw-r--r--newlib/libc/sys/sysvi386/getegid.s9
-rw-r--r--newlib/libc/sys/sysvi386/geteuid.s9
-rw-r--r--newlib/libc/sys/sysvi386/getgid.s8
-rw-r--r--newlib/libc/sys/sysvi386/getgroups.s8
-rw-r--r--newlib/libc/sys/sysvi386/getpid.s9
-rw-r--r--newlib/libc/sys/sysvi386/getuid.s8
-rw-r--r--newlib/libc/sys/sysvi386/ioctl.s9
-rw-r--r--newlib/libc/sys/sysvi386/isatty.c11
-rw-r--r--newlib/libc/sys/sysvi386/kill.s9
-rw-r--r--newlib/libc/sys/sysvi386/link.s9
-rw-r--r--newlib/libc/sys/sysvi386/lseek.s8
-rw-r--r--newlib/libc/sys/sysvi386/mkdir.s9
-rw-r--r--newlib/libc/sys/sysvi386/open.s9
-rw-r--r--newlib/libc/sys/sysvi386/opendir.c80
-rw-r--r--newlib/libc/sys/sysvi386/pathconf.s6
-rw-r--r--newlib/libc/sys/sysvi386/pause.s6
-rw-r--r--newlib/libc/sys/sysvi386/pipe.s12
-rw-r--r--newlib/libc/sys/sysvi386/read.s8
-rw-r--r--newlib/libc/sys/sysvi386/readdir.c72
-rw-r--r--newlib/libc/sys/sysvi386/rename.s9
-rw-r--r--newlib/libc/sys/sysvi386/rewinddir.c49
-rw-r--r--newlib/libc/sys/sysvi386/rmdir.s9
-rw-r--r--newlib/libc/sys/sysvi386/sbrk.c21
-rw-r--r--newlib/libc/sys/sysvi386/scandir.c134
-rw-r--r--newlib/libc/sys/sysvi386/seekdir.c52
-rw-r--r--newlib/libc/sys/sysvi386/setgid.s9
-rw-r--r--newlib/libc/sys/sysvi386/setuid.s9
-rw-r--r--newlib/libc/sys/sysvi386/sigaction.s20
-rw-r--r--newlib/libc/sys/sysvi386/signal.s16
-rw-r--r--newlib/libc/sys/sysvi386/sigprocmask.s12
-rw-r--r--newlib/libc/sys/sysvi386/sleep.c12
-rw-r--r--newlib/libc/sys/sysvi386/speed.c24
-rw-r--r--newlib/libc/sys/sysvi386/stat.s9
-rw-r--r--newlib/libc/sys/sysvi386/sys/dirent.h36
-rw-r--r--newlib/libc/sys/sysvi386/sys/setjmp.h6
-rw-r--r--newlib/libc/sys/sysvi386/sys/termio.h82
-rw-r--r--newlib/libc/sys/sysvi386/sys/termios.h121
-rw-r--r--newlib/libc/sys/sysvi386/sys/utime.h12
-rw-r--r--newlib/libc/sys/sysvi386/sys/utmp.h43
-rw-r--r--newlib/libc/sys/sysvi386/sys/wait.h42
-rw-r--r--newlib/libc/sys/sysvi386/sysconf.s6
-rw-r--r--newlib/libc/sys/sysvi386/tcgetattr.c6
-rw-r--r--newlib/libc/sys/sysvi386/tcline.c84
-rw-r--r--newlib/libc/sys/sysvi386/tcsetattr.c7
-rw-r--r--newlib/libc/sys/sysvi386/telldir.c129
-rw-r--r--newlib/libc/sys/sysvi386/time.s8
-rw-r--r--newlib/libc/sys/sysvi386/times.s8
-rw-r--r--newlib/libc/sys/sysvi386/unlink.s9
-rw-r--r--newlib/libc/sys/sysvi386/utime.s8
-rw-r--r--newlib/libc/sys/sysvi386/wait.s13
-rw-r--r--newlib/libc/sys/sysvi386/waitpid.s18
-rw-r--r--newlib/libc/sys/sysvi386/write.s8
-rw-r--r--newlib/libc/sys/sysvnecv70/Makefile.am15
-rw-r--r--newlib/libc/sys/sysvnecv70/Makefile.in331
-rw-r--r--newlib/libc/sys/sysvnecv70/aclocal.m4366
-rw-r--r--newlib/libc/sys/sysvnecv70/cerror.s9
-rw-r--r--newlib/libc/sys/sysvnecv70/close.s10
-rwxr-xr-xnewlib/libc/sys/sysvnecv70/configure1880
-rw-r--r--newlib/libc/sys/sysvnecv70/configure.in12
-rw-r--r--newlib/libc/sys/sysvnecv70/crt0.s28
-rw-r--r--newlib/libc/sys/sysvnecv70/exit.s7
-rw-r--r--newlib/libc/sys/sysvnecv70/fps.s18
-rw-r--r--newlib/libc/sys/sysvnecv70/fpx.c73
-rw-r--r--newlib/libc/sys/sysvnecv70/fstat.s11
-rw-r--r--newlib/libc/sys/sysvnecv70/ioctl.s9
-rw-r--r--newlib/libc/sys/sysvnecv70/isatty.s19
-rw-r--r--newlib/libc/sys/sysvnecv70/lseek.s9
-rw-r--r--newlib/libc/sys/sysvnecv70/open.s10
-rw-r--r--newlib/libc/sys/sysvnecv70/read.s9
-rw-r--r--newlib/libc/sys/sysvnecv70/sbrk.s34
-rw-r--r--newlib/libc/sys/sysvnecv70/sysv60.s9
-rw-r--r--newlib/libc/sys/sysvnecv70/sysvnecv70.tex129
-rw-r--r--newlib/libc/sys/sysvnecv70/write.s9
-rw-r--r--newlib/libc/sys/tic80/Makefile.am19
-rw-r--r--newlib/libc/sys/tic80/Makefile.in341
-rw-r--r--newlib/libc/sys/tic80/aclocal.m4366
-rwxr-xr-xnewlib/libc/sys/tic80/configure1880
-rw-r--r--newlib/libc/sys/tic80/configure.in12
-rw-r--r--newlib/libc/sys/tic80/crt0.c22
-rw-r--r--newlib/libc/sys/w65/Makefile.am14
-rw-r--r--newlib/libc/sys/w65/Makefile.in329
-rw-r--r--newlib/libc/sys/w65/aclocal.m4366
-rwxr-xr-xnewlib/libc/sys/w65/configure1880
-rw-r--r--newlib/libc/sys/w65/configure.in12
-rw-r--r--newlib/libc/sys/w65/crt0.c16
-rw-r--r--newlib/libc/sys/w65/sys/syscall.h31
-rw-r--r--newlib/libc/sys/w65/syscalls.c191
-rw-r--r--newlib/libc/sys/w65/trap.c15
-rw-r--r--newlib/libc/sys/z8ksim/Makefile.am14
-rw-r--r--newlib/libc/sys/z8ksim/Makefile.in329
-rw-r--r--newlib/libc/sys/z8ksim/aclocal.m4366
-rwxr-xr-xnewlib/libc/sys/z8ksim/configure1880
-rw-r--r--newlib/libc/sys/z8ksim/configure.in12
-rw-r--r--newlib/libc/sys/z8ksim/crt0.c58
-rw-r--r--newlib/libc/sys/z8ksim/glue.c156
-rw-r--r--newlib/libc/sys/z8ksim/sys/syscall.h23
1285 files changed, 0 insertions, 257115 deletions
diff --git a/newlib/libc/sys/Makefile.am b/newlib/libc/sys/Makefile.am
deleted file mode 100644
index b67d0ecdf..000000000
--- a/newlib/libc/sys/Makefile.am
+++ /dev/null
@@ -1,37 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-SUBDIRS = $(sys_dir) .
-
-if HAVE_SYS_DIR
-SYSLIB = lib.a
-endif
-
-noinst_DATA = $(CRT0)
-
-if USE_LIBTOOL
-else
-noinst_LIBRARIES = $(SYSLIB)
-
-lib.a: $(sys_dir)/lib.a
- rm -f $@
- ln $(sys_dir)/lib.a $@ >/dev/null 2>/dev/null \
- || cp $(sys_dir)/lib.a $@
-endif # USE_LIBTOOL
-
-$(sys_dir)/libsys.$(aext): ; @true
-
-$(CRT0): $(sys_dir)/$(CRT0)
- rm -f $@
- ln $(sys_dir)/$(CRT0) $@ >/dev/null 2>/dev/null \
- || cp $(sys_dir)/$(CRT0) $@
-
-$(sys_dir)/$(CRT0): ; @true
-
-CLEANFILES = $(CRT0)
-
-doc:
-
-ACLOCAL_AMFLAGS = -I ../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/Makefile.in b/newlib/libc/sys/Makefile.in
deleted file mode 100644
index 22736301b..000000000
--- a/newlib/libc/sys/Makefile.in
+++ /dev/null
@@ -1,463 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-CRT0 = @CRT0@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-EXEEXT = @EXEEXT@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-SUBDIRS = $(sys_dir) .
-
-@HAVE_SYS_DIR_TRUE@SYSLIB = lib.a
-
-noinst_DATA = $(CRT0)
-
-@USE_LIBTOOL_FALSE@noinst_LIBRARIES = $(SYSLIB)
-
-CLEANFILES = $(CRT0)
-
-ACLOCAL_AMFLAGS = -I ../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_SOURCES = lib.a.c
-lib_a_OBJECTS = lib.a.$(OBJEXT)
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DATA = $(noinst_DATA)
-
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = lib.a.c
-OBJECTS = lib.a.$(OBJEXT)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in ../../acinclude.m4 \
- ../../aclocal.m4 ../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" != "." || dot_seen=yes; \
- done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- for subdir in $(SUBDIRS); do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- || exit 1; \
- fi; \
- done
-info-am:
-info: info-recursive
-dvi-am:
-dvi: dvi-recursive
-check-am:
-check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-info-am:
-install-info: install-info-recursive
-install-exec-am:
-install-exec: install-exec-recursive
-
-install-data-am:
-install-data: install-data-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am:
-uninstall: uninstall-recursive
-all-am: Makefile $(LIBRARIES) $(DATA)
-all-redirect: all-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
-
-
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-tags \
- mostlyclean-generic
-
-mostlyclean: mostlyclean-recursive
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-libtool clean-tags \
- clean-generic mostlyclean-am
-
-clean: clean-recursive
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-libtool distclean-tags distclean-generic \
- clean-am
- -rm -f libtool
-
-distclean: distclean-recursive
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool install-data-recursive \
-uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-info-am \
-install-info install-exec-am install-exec install-data-am install-data \
-install-am install uninstall-am uninstall all-redirect all-am all \
-installdirs-am installdirs mostlyclean-generic distclean-generic \
-clean-generic maintainer-clean-generic clean mostlyclean distclean \
-maintainer-clean
-
-
-@USE_LIBTOOL_FALSE@lib.a: $(sys_dir)/lib.a
-@USE_LIBTOOL_FALSE@ rm -f $@
-@USE_LIBTOOL_FALSE@ ln $(sys_dir)/lib.a $@ >/dev/null 2>/dev/null \
-@USE_LIBTOOL_FALSE@ || cp $(sys_dir)/lib.a $@
-
-$(sys_dir)/libsys.$(aext): ; @true
-
-$(CRT0): $(sys_dir)/$(CRT0)
- rm -f $@
- ln $(sys_dir)/$(CRT0) $@ >/dev/null 2>/dev/null \
- || cp $(sys_dir)/$(CRT0) $@
-
-$(sys_dir)/$(CRT0): ; @true
-
-doc:
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/a29khif/Makefile.am b/newlib/libc/sys/a29khif/Makefile.am
deleted file mode 100644
index 48f389695..000000000
--- a/newlib/libc/sys/a29khif/Makefile.am
+++ /dev/null
@@ -1,48 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = \
- _alloc.s \
- _close.s \
- _cycles.s \
- _exit.s \
- _getpsiz.s \
- _gettz.s \
- _ioctl.s \
- _iostat.s \
- _iowait.s \
- _lseek.s \
- _open.s \
- _query.s \
- _read.s \
- _setim.s \
- _settrap.s \
- _setvec.s \
- _tmpnam.s \
- _write.s \
- alloc.s \
- clock.s \
- getargs.s \
- getenv.s \
- read.s \
- remove.s \
- rename.s \
- signal.s \
- _sbrk.s \
- _fstat.s \
- _isatty.s \
- systime.s \
- vec.s \
- kill.c \
- getpid.c \
- stubs.s
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/a29khif/Makefile.in b/newlib/libc/sys/a29khif/Makefile.in
deleted file mode 100644
index 89a14a58c..000000000
--- a/newlib/libc/sys/a29khif/Makefile.in
+++ /dev/null
@@ -1,334 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = _alloc.s _close.s _cycles.s _exit.s _getpsiz.s _gettz.s _ioctl.s _iostat.s _iowait.s _lseek.s _open.s _query.s _read.s _setim.s _settrap.s _setvec.s _tmpnam.s _write.s alloc.s clock.s getargs.s getenv.s read.s remove.s rename.s signal.s _sbrk.s _fstat.s _isatty.s systime.s vec.s kill.c getpid.c stubs.s
-
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = _alloc.o _close.o _cycles.o _exit.o _getpsiz.o _gettz.o \
-_ioctl.o _iostat.o _iowait.o _lseek.o _open.o _query.o _read.o _setim.o \
-_settrap.o _setvec.o _tmpnam.o _write.o alloc.o clock.o getargs.o \
-getenv.o read.o remove.o rename.o signal.o _sbrk.o _fstat.o _isatty.o \
-systime.o vec.o kill.o getpid.o stubs.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/a29khif/_alloc.s b/newlib/libc/sys/a29khif/_alloc.s
deleted file mode 100644
index ecdd1ddb1..000000000
--- a/newlib/libc/sys/a29khif/_alloc.s
+++ /dev/null
@@ -1,55 +0,0 @@
-; @(#)_alloc.s 1.4 90/10/14 21:57:19, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1989, 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;
-; 07/06/89 (JS) Replaced call to const tav,HIF_macro @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1 to syscall macro,
-; and deleted call to reterr macro as a NULL needs to be
-; returned on failure.
-; _alloc.s
-; void *vp = _sysalloc( int size );
-;
- .file "_alloc.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00030000 ; Debugger tag word
- .global __sysalloc
-__sysalloc:
- const tav,HIF_alloc @ asneq V_SYSCALL,gr1,gr1
- jmpti tav, lr0
- const tpc, _errno
- consth tpc, _errno
- store 0, 0, tav, tpc
- jmpi lr0
- const v0, 0 ; return NULL on error.
-
-;
-; int errret = _sysfree( void *addr, int size );
-;
- .global __sysfree
-__sysfree:
- const tav,HIF_free @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/_close.s b/newlib/libc/sys/a29khif/_close.s
deleted file mode 100644
index 04f52ae00..000000000
--- a/newlib/libc/sys/a29khif/_close.s
+++ /dev/null
@@ -1,40 +0,0 @@
-; @(#)_close.s 1.4 90/10/14 21:57:20, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _close.s
-; int cc = _close( int fd );
-;
- .file "_close.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00030000 ; Debugger tag word
- .global __close
-;; syscalls used now -- .global _close
-
-__close:
-;; syscalls used now -- _close:
- const tav,HIF_close @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/_cycles.s b/newlib/libc/sys/a29khif/_cycles.s
deleted file mode 100644
index 94f9df3b4..000000000
--- a/newlib/libc/sys/a29khif/_cycles.s
+++ /dev/null
@@ -1,39 +0,0 @@
-; @(#)_cycles.s 1.2 90/10/14 21:57:21, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _cycles.s
-; struct { unsigned long low_ticks, long hi_ticks } = _cycles( );
-;
- .file "_cycles.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00020000 ; Debugger tag word
- .global __cycles
-
-__cycles:
- const tav,HIF_cycles @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/_exit.s b/newlib/libc/sys/a29khif/_exit.s
deleted file mode 100644
index 65b9b83e3..000000000
--- a/newlib/libc/sys/a29khif/_exit.s
+++ /dev/null
@@ -1,39 +0,0 @@
-; @(#)_exit.s 1.2 90/10/14 21:57:22, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _exit.s
-; _exit( int rc );
-;
- .file "_exit.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00030000 ; Debugger tag word
- .global __exit
-
-__exit:
- const tav,HIF_exit @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/_fstat.s b/newlib/libc/sys/a29khif/_fstat.s
deleted file mode 100644
index 0144d76d9..000000000
--- a/newlib/libc/sys/a29khif/_fstat.s
+++ /dev/null
@@ -1,79 +0,0 @@
- .file "_fstat.c"
- .sect .lit,lit
-gcc2_compiled.:
- .text
- .align 4
- .global __fstat
-;; syscalls used now -- .global _fstat
- .word 0x40000
-__fstat:
-;; syscalls used now -- _fstat:
- sub gr1,gr1,32
- asgeu V_SPILL,gr1,gr126
- add lr1,gr1,48
- sll lr5,lr10,0
- const gr116,__iostat
- consth gr116,__iostat
- calli lr0,gr116
- sll lr2,lr5,0
- sll lr10,gr96,0
- jmpt lr10,L8
- sll gr116,lr10,30
- jmpf gr116,L3
- add gr116,lr11,12
- add gr117,lr11,12
- const gr116,4096
- store 0,0,gr116,gr117
- add gr117,lr11,4
- const gr116,1
- jmp L4
- store 0,0,gr116,gr117
-L3:
- const gr117,8192
- store 0,0,gr117,gr116
- add gr116,lr11,4
- store 0,0,gr117,gr116
-L4:
- add gr117,lr11,20
- const gr116,0
- store 0,0,gr116,gr117
- store 0,0,gr116,lr11
- const gr116,_time
- consth gr116,_time
- calli lr0,gr116
- const lr2,0
- add gr116,lr11,16
- store 0,0,gr96,gr116
- sll lr2,lr5,0
- const lr3,0
- const lr7,__lseek
- consth lr7,__lseek
- calli lr0,lr7
- const lr4,1
- sll lr10,gr96,0
- constn lr6,65535
- cpneq gr116,lr10,lr6
- jmpf gr116,L7
- sll lr2,lr5,0
- const lr3,0
- calli lr0,lr7
- const lr4,2
- add gr116,lr11,8
- store 0,0,gr96,gr116
- cpneq gr96,gr96,lr6
- jmpf gr96,L7
- sll lr2,lr5,0
- sll lr3,lr10,0
- calli lr0,lr7
- const lr4,0
- cpneq gr96,gr96,lr6
- jmpt gr96,L8
- const gr96,0
-L7:
- constn gr96,65535
-L8:
- add gr1,gr1,32
- nop
- jmpi lr0
- asleu V_FILL,lr1,gr127
-
diff --git a/newlib/libc/sys/a29khif/_getpsiz.s b/newlib/libc/sys/a29khif/_getpsiz.s
deleted file mode 100644
index b9949a003..000000000
--- a/newlib/libc/sys/a29khif/_getpsiz.s
+++ /dev/null
@@ -1,38 +0,0 @@
-; @(#)_getpsiz.s 1.2 90/10/14 21:57:23, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _getpsiz.s
-; int size = _getpsiz( );
-;
- .file "_getpsiz.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00020000 ; Debugger tag word
- .global __getpsiz
-
-__getpsiz:
- const tav,HIF_getpagesize @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
- .end
diff --git a/newlib/libc/sys/a29khif/_gettz.s b/newlib/libc/sys/a29khif/_gettz.s
deleted file mode 100644
index 36cf1c702..000000000
--- a/newlib/libc/sys/a29khif/_gettz.s
+++ /dev/null
@@ -1,39 +0,0 @@
-; @(#)_gettz.s 2.2 90/10/14 21:57:24, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _gettz.s
-; _gettz( void );
-;
- .file "_gettz.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00020000 ; Debugger tag word
- .global __gettz
-
-__gettz:
- const tav,HIF_gettz @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/_ioctl.s b/newlib/libc/sys/a29khif/_ioctl.s
deleted file mode 100644
index 0ca51c504..000000000
--- a/newlib/libc/sys/a29khif/_ioctl.s
+++ /dev/null
@@ -1,39 +0,0 @@
-; @(#)_ioctl.s 1.2 90/10/14 21:57:25, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _ioctl.s
-; _ioctl( int fd );
-;
- .file "_ioctl.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00030000 ; Debugger tag word
- .global __ioctl
-
-__ioctl:
- const tav,HIF_ioctl @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/_iostat.s b/newlib/libc/sys/a29khif/_iostat.s
deleted file mode 100644
index ae97c5de5..000000000
--- a/newlib/libc/sys/a29khif/_iostat.s
+++ /dev/null
@@ -1,43 +0,0 @@
-;----------------------------------------------------------------------------
-;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _iostat.s
-; _iostat( int fd );
-;
- .file "_iostat.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00030000 ; Debugger tag word
- .global __iostat
- .global _iostat
-
-__iostat:
-_iostat:
- const tav,HIF_iostat @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
-
diff --git a/newlib/libc/sys/a29khif/_iowait.s b/newlib/libc/sys/a29khif/_iowait.s
deleted file mode 100644
index 3e2ad61cd..000000000
--- a/newlib/libc/sys/a29khif/_iowait.s
+++ /dev/null
@@ -1,39 +0,0 @@
-; @(#)_iowait.s 1.3 90/10/14 21:57:27, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _iowait.s
-; _iowait( int fd );
-;
- .file "_iowait.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00030000 ; Debugger tag word
- .global __iowait
-
-__iowait:
- const tav,HIF_iowait @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/_isatty.s b/newlib/libc/sys/a29khif/_isatty.s
deleted file mode 100644
index 55110e2fc..000000000
--- a/newlib/libc/sys/a29khif/_isatty.s
+++ /dev/null
@@ -1,22 +0,0 @@
- .file "isatty.c"
- .sect .lit,lit
-gcc2_compiled.:
- .text
- .align 4
- .global __isatty
- .global _isatty
- .word 0x30000
-__isatty:
-_isatty:
- sub gr1,gr1,16
- asgeu V_SPILL,gr1,gr126
- add lr1,gr1,28
- const gr116,__iostat
- consth gr116,__iostat
- calli lr0,gr116
- sll lr2,lr6,0
- sll gr96,gr96,30
- add gr1,gr1,16
- srl gr96,gr96,31
- jmpi lr0
- asleu V_FILL,lr1,gr127
diff --git a/newlib/libc/sys/a29khif/_lseek.s b/newlib/libc/sys/a29khif/_lseek.s
deleted file mode 100644
index 56a7fc6c9..000000000
--- a/newlib/libc/sys/a29khif/_lseek.s
+++ /dev/null
@@ -1,42 +0,0 @@
-; @(#)_lseek.s 1.4 90/10/14 21:57:28, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _lseek.s
-; int cc = _lseek( int fd, long offset, int whence );
-;
- .file "_lseek.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00050000 ; Debugger tag word
- .global __lseek
-;; syscalls used now -- .global _lseek
-
-
-__lseek:
-;; syscalls used now -- _lseek:
- const tav,HIF_lseek @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/_open.s b/newlib/libc/sys/a29khif/_open.s
deleted file mode 100644
index 3a9ed7e61..000000000
--- a/newlib/libc/sys/a29khif/_open.s
+++ /dev/null
@@ -1,39 +0,0 @@
-; @(#)_open.s 1.4 90/10/14 21:57:30, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _open.s
-; int fd = _open( char *path, int oflag [, int mode ] );
-;
- .file "_open.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00050000 ; Debugger tag word
- .global __open
-
-__open:
- const tav,HIF_open @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/_query.s b/newlib/libc/sys/a29khif/_query.s
deleted file mode 100644
index 6887bea93..000000000
--- a/newlib/libc/sys/a29khif/_query.s
+++ /dev/null
@@ -1,39 +0,0 @@
-; @(#)_query.s 2.2 90/10/14 21:57:31, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _query.s
-; _query( query_code );
-;
- .file "_query.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00030000 ; Debugger tag word
- .global __query
-
-__query:
- const tav,HIF_query @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/_read.s b/newlib/libc/sys/a29khif/_read.s
deleted file mode 100644
index 23ebbe732..000000000
--- a/newlib/libc/sys/a29khif/_read.s
+++ /dev/null
@@ -1,38 +0,0 @@
-; @(#)_read.s 1.4 90/10/14 21:57:32, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _read.s
-; int nread = _read( int fd, char *buf, int count );
-;
- .file "_read.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00050000 ; Debugger tag word
- .global __read
-
-__read:
- const tav,HIF_read @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
- .end
diff --git a/newlib/libc/sys/a29khif/_sbrk.s b/newlib/libc/sys/a29khif/_sbrk.s
deleted file mode 100644
index 33c1269cd..000000000
--- a/newlib/libc/sys/a29khif/_sbrk.s
+++ /dev/null
@@ -1,30 +0,0 @@
- .file "sbrk.c"
- .sect .lit,lit
-gcc2_compiled.:
- .text
- .align 4
- .global __sbrk
- .word 0x30000
-__sbrk:
- sub gr1,gr1,16
- asgeu V_SPILL,gr1,gr126
- add lr1,gr1,28
- sll lr2,lr6,0
- jmpt lr2,L4
- constn gr96,65535
- const gr116,__sysalloc
- consth gr116,__sysalloc
- calli lr0,gr116
- nop
- sll gr117,gr96,0
- cpneq gr116,gr117,0
- jmpf gr116,L4
- constn gr96,65535
- sll gr96,gr117,0
-L4:
- add gr1,gr1,16
- nop
- jmpi lr0
- asleu V_FILL,lr1,gr127
-
-
diff --git a/newlib/libc/sys/a29khif/_setim.s b/newlib/libc/sys/a29khif/_setim.s
deleted file mode 100644
index 0cf86aeda..000000000
--- a/newlib/libc/sys/a29khif/_setim.s
+++ /dev/null
@@ -1,39 +0,0 @@
-; @(#)_setim.s 2.2 90/10/14 21:57:33, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _setim.s
-; _setim( im, di );
-;
- .file "_setim.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00040000 ; Debugger tag word
- .global __setim
-
-__setim:
- const tav,HIF_setim @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/_settrap.s b/newlib/libc/sys/a29khif/_settrap.s
deleted file mode 100644
index 259097288..000000000
--- a/newlib/libc/sys/a29khif/_settrap.s
+++ /dev/null
@@ -1,39 +0,0 @@
-; @(#)_settrap.s 2.2 90/10/14 21:57:34, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _settrap.s
-; void *prevaddr = _settrap( int trapno, void *trapaddr );
-;
- .file "_settrap.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00040000 ; Debugger tag word
- .global __settrap
-
-__settrap:
- const tav,HIF_settrap @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/_setvec.s b/newlib/libc/sys/a29khif/_setvec.s
deleted file mode 100644
index 09d4076f5..000000000
--- a/newlib/libc/sys/a29khif/_setvec.s
+++ /dev/null
@@ -1,38 +0,0 @@
-; @(#)_setvec.s 1.2 90/10/14 21:57:35, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _setvec.s
-; int success = _setvec( int trap_no, void (*handler)( void ) );
-;
- .file "_setvec.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00040000 ; Debugger tag word
- .global __setvec
-
-__setvec:
- const tav,HIF_setvec @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
- .end
diff --git a/newlib/libc/sys/a29khif/_tmpnam.s b/newlib/libc/sys/a29khif/_tmpnam.s
deleted file mode 100644
index c7795e27a..000000000
--- a/newlib/libc/sys/a29khif/_tmpnam.s
+++ /dev/null
@@ -1,41 +0,0 @@
-; @(#)_tmpnam.s 1.2 90/10/14 21:57:36, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _tmpnam.s
-; char *cp = _khif_tmpnam( char *bufr );
-; /* same as ANSI tmpnam(), but NULL arg is not allowed */
-; NOTE - Will not work on BSD (no tmpnam sys call)
-;
- .file "_tmpnam.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00030000 ; Debugger tag word
- .global __khif_tmpnam
-
-__khif_tmpnam:
- const tav,HIF_tmpnam @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/_write.s b/newlib/libc/sys/a29khif/_write.s
deleted file mode 100644
index 21c0e5815..000000000
--- a/newlib/libc/sys/a29khif/_write.s
+++ /dev/null
@@ -1,40 +0,0 @@
-; @(#)_write.s 1.4 90/10/14 21:57:37, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _write.s
-; int written = _write( int fd, char *buf, int count );
-;
- .file "_write.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00050000 ; Debugger tag word
- .global __write
-;; syscalls used now -- .global _write
-
-__write:
-;; syscalls used now -- _write:
- const tav,HIF_write @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
- .end
diff --git a/newlib/libc/sys/a29khif/aclocal.m4 b/newlib/libc/sys/a29khif/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/a29khif/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/a29khif/alloc.s b/newlib/libc/sys/a29khif/alloc.s
deleted file mode 100644
index cd90022a5..000000000
--- a/newlib/libc/sys/a29khif/alloc.s
+++ /dev/null
@@ -1,64 +0,0 @@
-;
-;(#)_alloc.s 1.4 90/10/14 21:57:19, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1989, 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;
-; 07/06/89 (JS) Replaced call to const tav,HIF_macro
-; and deleted call to reterr macro as a NULL needs to be
-; returned on failure.
-; _alloc.s
-; void *vp = _sysalloc( int size );
-;
- .file "_alloc.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00030000 ; Debugger tag word
- .global __sysalloc
-__sysalloc:
- const tav,HIF_alloc
- asneq V_SYSCALL,gr1,gr1
- jmpti tav, lr0
- const tpc, _errno
- consth tpc, _errno
- store 0, 0, tav, tpc
- jmpi lr0
- const v0, 0 ; return NULL on error.
-
-;
-; int errret = _sysfree( void *addr, int size );
-;
- .global __sysfree
-__sysfree:
- const tav,HIF_free
- asneq V_SYSCALL,gr1,gr1
- jmpti tav,lr0
- const tpc,_errno
- consth tpc,_errno
- store 0,0,tav,tpc
- jmpi lr0
- constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/clock.s b/newlib/libc/sys/a29khif/clock.s
deleted file mode 100644
index 5cb26dff0..000000000
--- a/newlib/libc/sys/a29khif/clock.s
+++ /dev/null
@@ -1,41 +0,0 @@
-; @(#)clock.s 1.3 90/10/14 21:57:43, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; clock.s
-; long ticks = clock( );
-;
- .file "clock.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00020000 ; Debugger tag word
- .global _clock
- .global __clock
-
-_clock:
-__clock:
- const tav,HIF_clock @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/configure b/newlib/libc/sys/a29khif/configure
deleted file mode 100755
index 8315f6139..000000000
--- a/newlib/libc/sys/a29khif/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=_alloc.s
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/a29khif/configure.in b/newlib/libc/sys/a29khif/configure.in
deleted file mode 100644
index de247d3d3..000000000
--- a/newlib/libc/sys/a29khif/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/a29khif configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(_alloc.s)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/a29khif/crt0.s b/newlib/libc/sys/a29khif/crt0.s
deleted file mode 100644
index 8ae79f898..000000000
--- a/newlib/libc/sys/a29khif/crt0.s
+++ /dev/null
@@ -1,226 +0,0 @@
-; @(#)crt0.s 2.7 90/10/15 13:17:57, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1988, 1989, 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- .file "crt0.s"
-; crt0.s version 2.1-7
-;
-; This module gets control from the OS.
-; It saves away the Am29027 Mode register settings and
-; then sets up the pointers to the resident spill and fill
-; trap handlers. It then establishes argv and argc for passing
-; to main. It then calls _main. If main returns, it calls _exit.
-;
-; void = start( );
-; NOTE - not C callable (no lead underscore)
-;
- .include "sys/sysmac.h"
-;
-;
- .extern V_SPILL, V_FILL
- .comm __29027Mode, 8 ; A shadow of the mode register
- .comm __LibInit, 4
- .comm __environ, 4 ; Environment variables, currently none.
- .text
- .extern _main, _exit
- .extern _memset
-
- .word 0 ; Terminating tag word
- .global start
-start:
- sub gr1, gr1, 6 * 4
- asgeu V_SPILL, gr1, rab ; better not ever happen
- add lr1, gr1, 6 * 4
-;
-; Initialize the .bss section to zero by using the memset library function.
-; The .bss initialization section below has been commented out as it breaks
-; XRAY29K that has been released. The operators sizeof and startof create
-; new sections that are not recognized by XRAY29k, but will be implemented
-; in the next release (2.0).
-;
-; const lr4, $sizeof(.bss) ; get size of .bss section to zero out
-; consth lr4, $sizeof(.bss)
-; const lr2, $startof(.bss) ; Get start address of .bss section
-; consth lr2, $startof(.bss)
-; const lr0, _memset ; address of memset function
-; consth lr0, _memset
-; calli lr0, lr0 ; call memset function
-; const lr3, 0
-
-; Save the initial value of the Am29027's Mode register
-; If your const tav,HIF_does @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1 not enter crt0 with value for Am29027's Mode register
-; in gr96 and gr97, and also if the coprocessor is active uncomment the
-; next 4 lines.
-; const gr96, 0xfc00820
-; consth gr96, 0xfc00820
-; const gr97, 0x1375
-; store 1, 3, gr96, gr97
-;
- const gr98, __29027Mode
- consth gr98, __29027Mode
- store 0, 0, gr96, gr98
- add gr98, gr98, 4
- store 0, 0, gr97, gr98
-;
-; Now call the const tav,HIF_to @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1 setup the spill and fill trap handlers
-;
- const lr3, spill
- consth lr3, spill
- const lr2, V_SPILL
- const tav,HIF_setvec @ asneq V_SYSCALL,gr1,gr1
- const lr3, fill
- consth lr3, fill
- const lr2, V_FILL
- const tav,HIF_setvec @ asneq V_SYSCALL,gr1,gr1
-;
-; Set up dividu handler, since native one don't work?!
-; Set it up by hand (FIXME) since HIF_settrap doesn't work either!
-;
-; const lr3,Edividu
-; consth lr3,Edividu
-;
-; const lr2,35
-; const tav,HIF_settrap @ asneq V_SYSCALL,gr1,gr1
-; asge 0x50,gr121,0 ; check whether it failed
-; const lr2,0x8000008c ; abs addr of dividu trap handler on EB
-; consth lr2,0x8000008c
-; store 0,0,lr3,lr2 ; Clobber vector FIXME
-
-;
-; Get the argv base address and calculate argc.
-;
- const tav,HIF_getargs @ asneq V_SYSCALL,gr1,gr1
- add lr3, v0, 0 ; argv
- add lr4, v0, 0
- constn lr2, -1
-argcloop: ; scan for NULL terminator
- load 0, 0, gr97, lr4
- add lr4, lr4, 4
- cpeq gr97, gr97, 0
- jmpf gr97, argcloop
- add lr2, lr2, 1
-;
-; Now call LibInit, if there is one. To aid runtime libraries
-; that need to do some startup initialization, we have created
-; a bss variable called LibInit. If the library doesn't need
-; any run-time initialization, the variable is still 0. If the
-; library does need run-time initialization, the library will
-; contain a definition like
-; void (*_LibInit)(void) = LibInitFunction;
-; The linker will match up our bss LibInit with this data LibInit
-; and the variable will not be 0.
-;
- const lr0, __LibInit
- consth lr0, __LibInit
- load 0, 0, lr0, lr0
- cpeq gr96, lr0, 0
- jmpt gr96, NoLibInit
- nop
- calli lr0, lr0
- nop
-NoLibInit:
-;
-; call main, passing it 2 arguments. main( argc, argv )
-;
- const lr0, _main
- consth lr0, _main
- calli lr0, lr0
- nop
-;
-; call exit
-;
- const lr0, _exit
- consth lr0, _exit
- calli lr0, lr0
- add lr2, gr96, 0
-;
-; Should never get here, but just in case
-;
-loop:
- const tav,HIF_exit @ asneq V_SYSCALL,gr1,gr1
- jmp loop
- nop
- .sbttl "Spill and Fill trap handlers"
- .eject
-;
-; SPILL, FILL trap handlers
-;
-; Note that these Spill and Fill trap handlers allow the OS to
-; assume that the only registers of use are between gr1 and rfb.
-; Therefore, if the OS desires to, it may simply preserve from
-; lr0 for (rfb-gr1)/4 registers when doing a context save.
-;
-;
-; Here is the spill handler
-;
-; spill registers from [*gr1..*rab)
-; and move rab downto where gr1 points
-;
-; rab must change before rfb for signals to work
-;
-; On entry: rfb - rab = windowsize, gr1 < rab
-; Near the end: rfb - rab > windowsize, gr1 == rab
-; On exit: rfb - rab = windowsize, gr1 == rab
-;
- .global spill
-spill:
- sub tav, rab, gr1 ; tav = number of bytes to spill
- srl tav, tav, 2 ; change byte count to word count
- sub tav, tav, 1 ; make count zero based
- mtsr cr, tav ; set Count Remaining register
- sub tav, rab, gr1
- sub tav, rfb, tav ; pull down free bound and save it in rab
- add rab, gr1, 0 ; first pull down allocate bound
- storem 0, 0, lr0, tav ; store lr0..lr(tav) into rfb
- jmpi tpc ; return...
- add rfb, tav, 0
-;
-; Here is the fill handler
-;
-; fill registers from [*rfb..*lr1)
-; and move rfb upto where lr1 points.
-;
-; rab must change before rfb for signals to work
-;
-; On entry: rfb - rab = windowsize, lr1 > rfb
-; Near the end: rfb - rab < windowsize, lr1 == rab + windowsize
-; On exit: rfb - rab = windowsize, lr1 == rfb
-;
- .global fill
-fill:
- const tav, 0x80 << 2
- or tav, tav, rfb ; tav = ((rfb>>2) | 0x80)<<2 == [rfb]<<2
- mtsr ipa, tav ; ipa = [rfb]<<2 == 1st reg to fill
- ; gr0 is now the first reg to spill
- sub tav, lr1, rfb ; tav = number of bytes to spill
- add rab, rab, tav ; push up allocate bound
- srl tav, tav, 2 ; change byte count to word count
- sub tav, tav, 1 ; make count zero based
- mtsr cr, tav ; set Count Remaining register
- loadm 0, 0, gr0, rfb ; load registers
- jmpi tpc ; return...
- add rfb, lr1, 0 ; ... first pushing up free bound
-
- .end
diff --git a/newlib/libc/sys/a29khif/getargs.s b/newlib/libc/sys/a29khif/getargs.s
deleted file mode 100644
index aa1f9c442..000000000
--- a/newlib/libc/sys/a29khif/getargs.s
+++ /dev/null
@@ -1,38 +0,0 @@
-; @(#)getargs.s 1.2 90/10/14 21:57:44, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _getargs.s
-; void _getargs( void );
-;
- .file "_getargs.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00020000 ; Debugger tag word
- .global __getargs
-
-__getargs:
- const tav,HIF_getargs @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
- .end
diff --git a/newlib/libc/sys/a29khif/getenv.s b/newlib/libc/sys/a29khif/getenv.s
deleted file mode 100644
index 4351849a0..000000000
--- a/newlib/libc/sys/a29khif/getenv.s
+++ /dev/null
@@ -1,48 +0,0 @@
-; @(#)getenv.s 1.4 90/10/14 21:57:45, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; getenv.s
-; char *value = getenv( const char *name );
-;
- .file "getenv.s"
-
- .include "sys/sysmac.h"
-
- .text
- .word 0x00030000 ; Debugger tag word
- .global _getenv
- .global __getenv
-_getenv:
-__getenv:
- const tav,HIF_getenv @ asneq V_SYSCALL,gr1,gr1 ; HIF service trap
- jmpti tav, lr0 ; If tav is true, were finished, return.
- const tpc, _errno
- consth tpc, _errno ; Otherwise,
- store 0, 0, tav, tpc ; store error code in _errno,
- jmpi lr0 ; then return
- const v0, 0 ; with a value of 0 (NULL pointer).
-
- .end
diff --git a/newlib/libc/sys/a29khif/getpid.c b/newlib/libc/sys/a29khif/getpid.c
deleted file mode 100644
index 99d88bd39..000000000
--- a/newlib/libc/sys/a29khif/getpid.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Stub for getpid. */
-
-#include <_ansi.h>
-
-/* This should really return pid_t, but that doesn't seem to be in
- <sys/types.h>. */
-
-int
-_DEFUN_VOID (_getpid)
-{
- return 1;
-}
diff --git a/newlib/libc/sys/a29khif/kill.c b/newlib/libc/sys/a29khif/kill.c
deleted file mode 100644
index ff9fe5428..000000000
--- a/newlib/libc/sys/a29khif/kill.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Stub for kill. */
-
-#include <_ansi.h>
-#include <errno.h>
-
-/* The pid argument should be of type pid_t. */
-
-int
-_DEFUN (_kill, (pid, sig),
- int pid _AND
- int sig)
-{
- if (pid == 1 || pid < 0)
- {
- if (sig == 0)
- return 0;
- return raise (sig);
- }
- errno = EINVAL;
- return -1;
-}
diff --git a/newlib/libc/sys/a29khif/read.s b/newlib/libc/sys/a29khif/read.s
deleted file mode 100644
index 1a5daf301..000000000
--- a/newlib/libc/sys/a29khif/read.s
+++ /dev/null
@@ -1,54 +0,0 @@
-; @(#)_read.s 1.4 90/10/14 21:57:32, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _read.s
-; int nread = _read( int fd, char *buf, int count );
-;
- .file "_read.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00050000 ; Debugger tag word
- .global __read
-;; syscalls used now -- .global _read
-
-__read:
-;; syscalls used now -- _read:
- .ifdef _BSD_OS
-; BSD version - uses readv const tav,HIF_call @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
- sub msp, msp, 8
- store 0, 0, lr3, msp
- add tav, msp, 4
- add lr3, msp, 0
- store 0, 0, lr4, tav
- const lr4, 1
- const tav,HIF_readv @ asneq V_SYSCALL,gr1,gr1
- jmpti tav, lr0
- add msp, msp, 8
- const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
- .else
- const tav,HIF_read @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
- .endif
- .end
diff --git a/newlib/libc/sys/a29khif/remove.s b/newlib/libc/sys/a29khif/remove.s
deleted file mode 100644
index 948be04c2..000000000
--- a/newlib/libc/sys/a29khif/remove.s
+++ /dev/null
@@ -1,43 +0,0 @@
-; @(#)remove.s 1.3 90/10/14 21:57:53, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; remove.s
-; int cc = remove( char *path );
-;
- .file "remove.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00030000 ; Debugger tag word
- .global _remove
- .global __remove
- .global __unlink
-
-_remove:
-__remove:
-__unlink:
- const tav,HIF_remove @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/rename.s b/newlib/libc/sys/a29khif/rename.s
deleted file mode 100644
index 31da614e3..000000000
--- a/newlib/libc/sys/a29khif/rename.s
+++ /dev/null
@@ -1,41 +0,0 @@
-; @(#)rename.s 1.3 90/10/14 21:57:54, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; rename.s
-; int cc = rename( char *from, char *to );
-;
- .file "rename.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00040000 ; Debugger tag word
- .global _rename
- .global __rename
-
-_rename:
-__rename:
- const tav,HIF_rename @ asneq V_SYSCALL,gr1,gr1 @ jmpti tav,lr0 @ const tpc,_errno @ consth tpc,_errno @ store 0,0,tav,tpc @ jmpi lr0 @ constn v0,-1
-
- .end
diff --git a/newlib/libc/sys/a29khif/signal.s b/newlib/libc/sys/a29khif/signal.s
deleted file mode 100644
index 29273a0d3..000000000
--- a/newlib/libc/sys/a29khif/signal.s
+++ /dev/null
@@ -1,452 +0,0 @@
-;@(#)signal.s 2.15 90/10/14 21:57:55, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- .file "signal.s"
-
-; SigEntry is the address of an array of C-level user code signal handlers.
-; They must return to the top-level before doing a sigret() return function.
-; Nested signals are supported.
-
- .extern V_SPILL, V_FILL
- .extern fill ; In crt0.s
-
- .align 4
- .comm WindowSize, 4
- .data
-SigEntry:
- .word 0 ; reserved
- .word 0 ; adds. of #2 SIGINT handler
- .word 0 ; reserved
- .word 0 ; reserved
- .word 0 ; reserved
- .word 0 ; reserved
- .word 0 ; reserved
- .word 0 ; adds. of #8 SIGFPE handler
-
- .text
-
- .reg v0, gr96
- .reg v1, gr97
- .reg v2, gr98
- .reg v3, gr99
-
- .reg tav, gr121
- .reg tpc, gr122
- .reg lrp, gr123
- .reg slp, gr124
- .reg msp, gr125
- .reg rab, gr126
- .reg rfb, gr127
-
-;=================================================================== setjmp()
-; int
-; setjmp(label_t jmpbuf)
-; {
-; *jmpbuf = {gr1, msp, lr0, lr1};
-; return 0;
-; }
-;
- .global _setjmp
-_setjmp:
- store 0, 0, gr1, lr2
- add lr2, lr2, 4
- store 0, 0, msp, lr2
- add lr2, lr2, 4
- store 0, 0, lr0, lr2
- add lr2, lr2, 4
- store 0, 0, lr1, lr2
- jmpi lr0
- const v0, 0
-;
-;==================================================================== longjmp()
-; int
-; longjmp(label_t jmpbuf, int value)
-; {
-; /* BUG: check for this
-; if (msp > jmpbuf->msp || gr1 > jmpbuf->gr1)
-; longjmperror();
-; */
-;
-; gr1 = jmpbuf->gr1;
-; lr2addr = jmpbuf->gr1 + 8;
-; msp = jmpbuf->msp;
-;
-; /* saved lr1 is invalid if saved lr2addr > rfb */
-; if (lr2addr > rfb) {
-; /*
-; * None of the registers are useful.
-; * Set rfb to lr2addr - 512 & rab to rfb - 512.
-; * the FILL assert will take care of filling
-; */
-; lr1 = jmpbuf->lr1;
-; rab = lr2addr - windowsize;
-; rfb = lr2addr;
-; }
-;
-; lr0 = jmpbuf->lr0;
-; if (rfb < lr1)
-; raise V_FILL;
-; return value;
-; }
-;
- .global _longjmp
-_longjmp:
- load 0, 0, tav, lr2 ; copy in gr1
- add v1, lr2, 4 ; v1 points to msp
- ; make sure we return a non-zero value
- cpeq v0, lr3, 0
- srl v0, v0, 31
- or v0, lr3, v0
-
- add gr1, tav, 0 ; now update gr1
- add tav, tav, 8 ; calculate lr2addr
- load 0, 0, msp, v1 ; update msp from jmpbuf
- cpleu v3, tav, rfb ; if (lr2addr > rfb)
- jmpt v3, $1 ; {
- add v1, v1, 4 ; v1 points to lr0
- add v2, v1, 4 ; v2 points to lr1
- load 0, 0, lr1, v2 ; lr1 = value from jmpbuf
- sub v3, rfb, rab ;
- sub rab, tav, v3 ; rab = lr2addr - windowsize
- add rfb, tav, 0 ; rfb = lr2addr
-$1: ; }
- load 0, 0, lr0, v1
- jmpi lr0
- asgeu V_FILL, rfb, lr1 ; may fill from rfb to lr1
-;
-;================================================================== sigcode
-; About to deliver a signal to a user mode signal handler.
-; msp+(15*4) = signal_number
-; msp+(14*4) = gr1
-; msp+(13*4) = rab
-; msp+(12*4) = PC0
-; msp+(11*4) = PC1
-; msp+(10*4) = PC2
-; msp+( 9*4) = CHA
-; msp+( 8*4) = CHD
-; msp+( 7*4) = CHC
-; msp+( 6*4) = ALU
-; msp+( 5*4) = OPS
-; msp+( 4*4) = gr121
-; msp+( 3*4) = gr99
-; msp+( 2*4) = gr98
-; msp+( 1*4) = gr97
-; msp = gr96
-; The state of all the registers (except for msp, chc and rab)
-; is the same as when the process was interrupted.
-;
-; We must make the stack and window consistent before calling the handler
-; The orignal rab value is on the stack. The interrupt handler placed
-; rfb-Windowsize in rab. This is required to support nested interrupts.
-;
-; Note that the window becomes incosistent only during certain
-; critical sections in spill, fill, longjmp and sigcode.
-; rfb - rab > windowsize => we are in spill
-; rfb - rab < windowsize => we are in fill
-; gr1 + 8 > rfb => we are in long-longjmp case
-; In case of spill, fill and lonjmp; rab is modified first,
-; so if we are in one of these critical sections,
-; we set rab to rfb - WINDOWSIZE.
-;
- .equ SIGCTX_SIZE, (16)*4
- .equ SIGCTX_SIGNUMB, (15)*4
- .equ SIGCTX_GR1_OFFSET, (14)*4
- .equ SIGCTX_RAB_OFFSET, (13)*4
- .equ SIGCTX_PC0_OFFSET, (12)*4
- .equ SIGCTX_PC1_OFFSET, (11)*4
- .equ SIGCTX_PC2_OFFSET, (10)*4
- .equ SIGCTX_CHC_OFFSET, (7)*4
- .equ SIGCTX_OPS_OFFSET, (5)*4
- .equ SIGCTX_TAV_OFFSET, (4)*4
- .global sigcode
-sigcode:
-; -------------------------------------------------------- R-Stack fixup
- const v0, WindowSize ; get register cache size
- consth v0, WindowSize
- load 0, 0, v0, v0
- add v2, msp, SIGCTX_RAB_OFFSET
- load 0, 0, v2, v2 ; get interrupted rab value
- sub v1, rfb, v2 ; determine if rfb-rab <= WINDOW_SIZE
- cpgeu v1, v1, v0 ;
- jmpt v1, nfill ; jmp if spill or 'normal' interrupt
- add v1, gr1, 8
- cpgt v1, v1, rfb ; interrupted longjmp can look like fill
- jmpf v1, nfill ; test for long-longjmp interruption
- nop ; jmp if gr1+8 <= rfb
-; Fixup signal stack to re-start interrupted fill
-; backup pc1 -- this is needed for the partial fill case.
-; Clear chc so an interrupted load/store does not restart.
-; Reset rab to a window distance below rfb, rab shall be
-; decremented again on re-starting the interrupted fill.
-; The interrupt handler set rab=rfb-WindowSize.
-;
- add v0, msp, SIGCTX_RAB_OFFSET
- store 0, 0, rab, v0 ; re-store (rfb-WindowSize) for rab
- const v2, fill
- consth v2, fill
- add v0, msp, SIGCTX_PC1_OFFSET
- store 0, 0, v2, v0
- sub v2, v2, 4 ; determine pc0
- add v0, msp, SIGCTX_PC0_OFFSET
- store 0, 0, v2, v0
- const v2, 0 ; clear chc
- add v0, msp, SIGCTX_CHC_OFFSET
- store 0, 0, v2, v0
-
-nfill:
- cpgt v0, gr1, rfb ; if gr1 > rfb then gr1 = rfb
- jmpt v0, lower
- cplt v0, gr1, rab ; if gr1 < rab then gr1 = rab
- jmpt v0, raise
- nop
-; -------------------------------------------------------- save_regs
-sig1: sub msp, msp, (4+2+25)*4 ; reserve space for regs
- mfsr gr96, ipc
- mfsr gr97, ipa
- mfsr gr98, ipb
- mfsr gr99, q
- mtsrim cr, 4-1
- storem 0, 0, gr96, msp
-; "push" registers stack support
- add gr96, lr1, 0
- add gr97, rfb, 0
- mtsrim cr, 2-1
- add gr99, msp, 2*4
- storem 0, 0, gr96, gr99
-; "push" remaining global registers
- mtsrim cr, 25-1 ; gr100-gr124
- add gr96, msp, (4+2)*4
- storem 0, 0, gr100, gr96
-;
-; -------------------------------------------------------- Dummy Call
- .equ RALLOC, 4*4 ; make space for function calls
- add v0, rfb, 0 ; store original rfb
- sub gr1, gr1, RALLOC
- asgeu V_SPILL, gr1, rab
- add lr1, v0, 0 ; set lr1 = original rfb
- add v1, msp, (4+2+25)*4 + SIGCTX_SIGNUMB
- load 0, 0, lr2, v1 ; restore signal number
- sub v1, lr2, 1 ; get handler index
- sll v1, v1, 2 ; point to addresses
-;
-; -------------------------------------------------------- call C-level
-; Handler must not use HIF services other than the _sigret() type.
- const v0, SigEntry
- consth v0, SigEntry
- add v0, v0, v1
- load 0, 0, v0, v0 ; determine if handler registered
- cpeq v1, v0, 0
- jmpt v1, NoHandler
- nop
- calli lr0, v0 ; call C-level signal handler
- nop
-;
-; -------------------------------------------------------- default return
-NoHandler:
- jmp __sigdfl
- nop
-
-; -------------------------------------------------------- support bits
-lower: sll gr1, rfb, 0
- jmp sig1
- nop
-raise: sll gr1, rab, 0
- jmp sig1
- nop
-/*
-; -------------------------------------------------------- repair_regs
- mtsrim cr, 4-1
- loadm 0, 0, gr96, msp
- mtsr ipc, gr96
- mtsr ipa, gr97
- mtsr ipb, gr98
- mtsr Q, gr99
-; "pop" registers stack support
- mtsrim cr, 2-1
- add gr99, msp, 2*4
- loadm 0, 0, gr96, gr99
- add lr1, gr96, 0
- add rfb, gr97, 0
-; "pop" remaining global registers
- mtsrim cr, 25-1 ; gr100-gr124
- add gr96, msp, (4+2)*4
- loadm 0, 0, gr100, gr96
- add msp, msp, (4+2+25)*4 ; repair msp to save_regs entry value
-; -------------------------------------------------------- end repair
-*/
-
-; ======================================================== _sigret()
- .global __sigret
-__sigret:
-; repair_regs
-; -------------------------------------------------------- repair_regs
- mtsrim cr, 4-1
- loadm 0, 0, gr96, msp
- mtsr ipc, gr96
- mtsr ipa, gr97
- mtsr ipb, gr98
- mtsr q, gr99
-; "pop" registers stack support
- mtsrim cr, 2-1
- add gr99, msp, 2*4
- loadm 0, 0, gr96, gr99
- add lr1, gr96, 0
- add rfb, gr97, 0
-; "pop" remaining global registers
- mtsrim cr, 25-1 ; gr100-gr124
- add gr96, msp, (4+2)*4
- loadm 0, 0, gr100, gr96
- add msp, msp, (4+2+25)*4 ; repair msp to save_regs entry value
-; -------------------------------------------------------- end repair
- const tav, 323 ; HIF _sigret
- asneq 69, gr1,gr1
- halt ; commit suicide if returns
-
-; ======================================================== _sigdfl()
- .global __sigdfl
-__sigdfl:
-; repair_regs
-; -------------------------------------------------------- repair_regs
- mtsrim cr, 4-1
- loadm 0, 0, gr96, msp
- mtsr ipc, gr96
- mtsr ipa, gr97
- mtsr ipb, gr98
- mtsr q, gr99
-; "pop" registers stack support
- mtsrim cr, 2-1
- add gr99, msp, 2*4
- loadm 0, 0, gr96, gr99
- add lr1, gr96, 0
- add rfb, gr97, 0
-; "pop" remaining global registers
- mtsrim cr, 25-1 ; gr100-gr124
- add gr96, msp, (4+2)*4
- loadm 0, 0, gr100, gr96
- add msp, msp, (4+2+25)*4 ; repair msp to save_regs entry value
-; -------------------------------------------------------- end repair
- const tav, 322 ; HIF _sigdfl
- asneq 69, gr1,gr1
- halt ; commit suicide if returns
-
-; ======================================================== _sigrep()
-__sigrep:
- .global __sigrep
-; repair_regs
-; -------------------------------------------------------- repair_regs
- mtsrim cr, 4-1
- loadm 0, 0, gr96, msp
- mtsr ipc, gr96
- mtsr ipa, gr97
- mtsr ipb, gr98
- mtsr q, gr99
-; "pop" registers stack support
- mtsrim cr, 2-1
- add gr99, msp, 2*4
- loadm 0, 0, gr96, gr99
- add lr1, gr96, 0
- add rfb, gr97, 0
-; "pop" remaining global registers
- mtsrim cr, 25-1 ; gr100-gr124
- add gr96, msp, (4+2)*4
- loadm 0, 0, gr100, gr96
- add msp, msp, (4+2+25)*4 ; repair msp to save_regs entry value
-; -------------------------------------------------------- end repair
- const tav, 324 ; HIF _sigrep
- asneq 69, gr1,gr1
- halt ; commit suicide if returns
-
-; ======================================================== _sigskp()
- .global __sigskp
-__sigskp:
-; repair_regs
-; -------------------------------------------------------- repair_regs
- mtsrim cr, 4-1
- loadm 0, 0, gr96, msp
- mtsr ipc, gr96
- mtsr ipa, gr97
- mtsr ipb, gr98
- mtsr q, gr99
-; "pop" registers stack support
- mtsrim cr, 2-1
- add gr99, msp, 2*4
- loadm 0, 0, gr96, gr99
- add lr1, gr96, 0
- add rfb, gr97, 0
-; "pop" remaining global registers
- mtsrim cr, 25-1 ; gr100-gr124
- add gr96, msp, (4+2)*4
- loadm 0, 0, gr100, gr96
- add msp, msp, (4+2+25)*4 ; repair msp to save_regs entry value
-; -------------------------------------------------------- end repair
- const tav, 325 ; HIF _sigskp
- asneq 69, gr1,gr1
- halt ; commit suicide if returns
-
-; ======================================================== _sendsig()
-; lr2 = signal number
- .global _raise
- .global __sendsig
-_raise:
-__sendsig:
- const tav, 326 ; HIF sendsig
- asneq 69, gr1,gr1
- jmpi lr0
- nop
-
-;
-; ======================================================== signal()
-; lr2 = signal number
-; lr3 = handler address
- .global _signal
-_signal:
-; the memory variable WindowSize must be initalised at the
-; start when rfb and rab are a window size apart.
- const v0, WindowSize ; get register cache size
- consth v0, WindowSize
- load 0, 0, v1, v0
- cpeq v1, v1, 0
- jmpf v1, WindowSizeOK
- sub v1, rfb, rab ; rfb-rab = WINDOW_SIZE
- store 0, 0, v1, v0
-WindowSizeOK:
- const v1, SigEntry
- consth v1, SigEntry
- sub v3, lr2, 1 ; get handler index
- sll v3, v3, 2 ; pointer to addresses
- add v1, v1, v3
- store 0,0, lr3, v1 ; save new handler
-
- const lr2, sigcode
- consth lr2, sigcode
- ;Fall through to __signal
-; ======================================================== _signal()
- .global __signal
-__signal:
- const tav, 321 ; HIF signal
- asneq 69, gr1,gr1
- jmpi lr0
- nop
diff --git a/newlib/libc/sys/a29khif/stubs.s b/newlib/libc/sys/a29khif/stubs.s
deleted file mode 100644
index e0b29bc77..000000000
--- a/newlib/libc/sys/a29khif/stubs.s
+++ /dev/null
@@ -1,135 +0,0 @@
-;
-;
-; File of stubs so that unix applications can link into a HIF monitor
-;
-; sac@cygnus.com
-
- .text
-
- .global _sysalloc
-_sysalloc:
- const gr121,__sysalloc
- consth gr121,__sysalloc
- jmpi gr121
-
- .global _sysfree
-_sysfree:
- const gr121,__sysfree
- consth gr121,__sysfree
- jmpi gr121
-
-
- .global _cycles
-_cycles:
- const gr121,__cycles
- consth gr121,__cycles
- jmpi gr121
-
-; .global _exit
-;_exit:
-; const gr121,__exit
-; consth gr121,__exit
-; jmpi gr121
-
- .global _getpsiz
-_getpsiz:
- const gr121,__getpsiz
- consth gr121,__getpsiz
- jmpi gr121
-
- .global _gettz
-_gettz:
- const gr121,__gettz
- consth gr121,__gettz
- jmpi gr121
-
- .global _ioctl
-_ioctl:
- const gr121,__ioctl
- consth gr121,__ioctl
- jmpi gr121
-
-
- .global _iowait
-_iowait:
- const gr121,__iowait
- consth gr121,__iowait
- jmpi gr121
-
-
-;; syscalls used now -- .global _open
-;; syscalls used now -- _open:
-;; syscalls used now -- const gr121,__open
-;; syscalls used now -- consth gr121,__open
-;; syscalls used now -- jmpi gr121
-
- .global _query
-_query:
- const gr121,__query
- consth gr121,__query
- jmpi gr121
-
-
- .global _setim
-_setim:
- const gr121,__setim
- consth gr121,__setim
- jmpi gr121
-
- .global _settrap
-_settrap:
- const gr121,__settrap
- consth gr121,__settrap
- jmpi gr121
-
- .global _setvec
-_setvec:
- const gr121,__setvec
- consth gr121,__setvec
- jmpi gr121
-
- .global _getargs
-_getargs:
- const gr121,__getargs
- consth gr121,__getargs
- jmpi gr121
-
-;; syscalls used now -- .global _unlink
-;; syscalls used now -- _unlink:
-;; syscalls used now -- const gr121,__unlink
-;; syscalls used now -- consth gr121,__unlink
-;; syscalls used now -- jmpi gr121
-
- .global _sigret
-_sigret:
- const gr121,__sigret
- consth gr121,__sigret
- jmpi gr121
-
- .global _sigdfl
-_sigdfl:
- const gr121,__sigdfl
- consth gr121,__sigdfl
- jmpi gr121
-
- .global _sigrep
-_sigrep:
- const gr121,__sigrep
- consth gr121,__sigrep
- jmpi gr121
-
- .global _sigskp
-_sigskp:
- const gr121,__sigskp
- consth gr121,__sigskp
- jmpi gr121
-
- .global _sendsig
-_sendsig:
- const gr121,__sendsig
- consth gr121,__sendsig
- jmpi gr121
-
- ; fill this jmpi delay slot
- ; the others are not done since they do not matter
- constn lr0,-1
diff --git a/newlib/libc/sys/a29khif/sys/cpudef.h b/newlib/libc/sys/a29khif/sys/cpudef.h
deleted file mode 100644
index 4ec6ed39c..000000000
--- a/newlib/libc/sys/a29khif/sys/cpudef.h
+++ /dev/null
@@ -1,270 +0,0 @@
-; @(#)cpudef.h 2.3 90/10/14 20:55:56, Copyright 1989, 1990 AMD
-;-----------------------------------------------------------------------
-; Useful equates
-;-----------------------------------------------------------------------
-;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1989, 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- ; Processor status registers OPS (sr1) and CPS (sr2)
- .equ CA,0x8000 ; Coprocessor active
- .equ IP,0x4000 ; Interrupt pending
- .equ TE,0x2000 ; Trace enable
- .equ TP,0x1000 ; Trace pending
- .equ TU,0x0800 ; Trap unaligned access
- .equ FZ,0x0400 ; Freeze
- .equ LK,0x0200 ; Lock
- .equ RE,0x0100 ; ROM enable
- .equ WM,0x0080 ; Wait mode
- .equ PD,0x0040 ; No translation for Data
- .equ PI,0x0020 ; No translation for Instr
- .equ SM,0x0010 ; Supervisor mode
- .equ IM,0x000C ; Interrupt mask
- .equ IM1,0x0100 ; enable INTR0-1
- .equ IM2,0x1000 ; enable INTR0-2
- .equ IM3,0x1100 ; enable INTR0-3
- .equ DI,0x0002 ; Disable ints
- .equ DA,0x0001 ; Disable ints and traps
-
- ; Configuration register CFG (sr3)
- .equ PRL,0xFF000000 ; Processor release level
- .equ VF,0x10 ; Vector fetch
- .equ RV,0x08 ; ROM Vector area
- .equ BO,0x04 ; Byte order
- .equ CP,0x02 ; Coprocessor present
- .equ CD,0x01 ; BTC disable
-
- ; Channel control register CHC (sr6)
- .equ LS,0x8000 ; Load store
- .equ ML,0x4000 ; Multiple operation
- .equ ST,0x2000 ; Set
- .equ LA,0x1000 ; Lock active
- .equ TF,0x0400 ; Transaction faulted
- .equ TR,0x03FC ; Target register
- .equ NN,0x0002 ; Not needed
- .equ CV,0x0001 ; Contents valid
-
- ; Timer reload register TMR (sr9)
- .equ IE,0x01000000 ; timer int enable
- .equ IN,0x02000000 ; timer int pending
- .equ OV,0x04000000 ; timer Overflow
-
- ; MMU configuration register MMU (sr13)
- .equ PS,0x300 ; Page size
- .equ PID,0xFF ; Process identifier
-
- ; ALU status register ALU (sr132)
- .equ DF,0x800 ; Divide flag
- .equ V,0x400 ; Overflow
- .equ N,0x200 ; Negative
- .equ Z,0x100 ; Zero
- .equ C,0x080 ; Carry
-
- ; TLB entry
- .equ VTAG,0xFFFF8000 ; Virtual tag
- .equ VE,0x4000 ; Valid entry
- .equ SR,0x2000 ; Supervisor read
- .equ SW,0x1000 ; Supervisor write
- .equ SE,0x0800 ; Supervisor execute
- .equ UR,0x0400 ; User read
- .equ UW,0x0200 ; User write
- .equ UE,0x0100 ; User execute
- .equ TID,0x00FF ; Task identifier
- .equ RPN,0xFFFFFC00 ; Real page number
- .equ PGM,0x00C0 ; User programmable
- .equ U,0x0002 ; Usage
- .equ F,0x0001 ; Flag
-
-;-----------------------------------------------------------------------
-;Global registers
-;-----------------------------------------------------------------------
-
- .reg rsp, gr1 ; local register stack pointer
-
- ; System-wide statics
- .reg s0, gr64
- .reg spillreg, s0 ; pointer to user spill handler
- .reg s1, gr65
- .reg fillreg, s1 ; pointer to user fill handler
- .reg s2, gr66
- .reg heapptr, s2 ; pointer to heap area
- .reg s3, gr67
- .reg s4, gr68
- .reg s5, gr69
- .reg s6, gr70
- .reg s7, gr71
- .reg s8, gr72
- .reg s9, gr73
- .reg s10, gr74
- .reg s11, gr75
- .reg s12, gr76
- .reg s13, gr77
- .reg s14, gr78
- .reg s15, gr79
-
- ; Interrupt handler temporaries
- .reg i0, gr80
- .reg i1, gr81
- .reg i2, gr82
- .reg i3, gr83
- .reg i4, gr84
- .reg i5, gr85
- .reg i6, gr86
- .reg i7, gr87
- .reg i8, gr88
- .reg i9, gr89
- .reg i10, gr90
- .reg i11, gr91
- .reg i12, gr92
- .reg i13, gr93
- .reg i14, gr94
- .reg i15, gr95
-
- ; Subroutine/function temporaries
- ; also used for function return values
- .reg t0, gr96
- .reg rtn, t0
- .reg t1, gr97
- .reg t2, gr98
- .reg t3, gr99
- .reg t4, gr100
- .reg t5, gr101
- .reg t6, gr102
- .reg t7, gr103
- .reg t8, gr104
- .reg t9, gr105
- .reg t10, gr106
- .reg t11, gr107
- .reg t12, gr108
- .reg t13, gr109
- .reg t14, gr110
- .reg t15, gr111
-
- ; User process statics
- .reg u0, gr112
- .reg u1, gr113
- .reg u2, gr114
- .reg u3, gr115
-
- ; More subroutine/function temporaries
- .reg t16, gr116
- .reg t17, gr117
- .reg t18, gr118
- .reg t19, gr119
- .reg t20, gr120
-
- ; Older names for the same registers
- .reg tmp0, gr116
- .reg tmp1, gr117
- .reg tmp2, gr118
- .reg tmp3, gr119
- .reg tmp4, gr120
-
- ; Trap handler temporaries
- .reg tav, gr121 ; arg/temp
- .reg tpc, gr122 ; rtn/temp
-
- ; Linkage pointers
- .reg lrp, gr123 ; large rtn ptr
- .reg slp, gr124 ; static link ptr
- .reg msp, gr125 ; memory stack ptr
- .reg rab, gr126 ; register allocate bound
- .reg rfb, gr127 ; register free bound
-
-;-----------------------------------------------------------------------
-;Local compiler registers
-; (only valid if frame has been established)
-;-----------------------------------------------------------------------
-
- .reg p15, lr17 ; outgoing arg 16
- .reg p14, lr16 ; outgoing arg 15
- .reg p13, lr15 ; outgoing arg 14
- .reg p12, lr14 ; outgoing arg 13
- .reg p11, lr13 ; outgoing arg 12
- .reg p10, lr12 ; outgoing arg 11
- .reg p9, lr11 ; outgoing arg 10
- .reg p8, lr10 ; outgoing arg 9
- .reg p7, lr9 ; outgoing arg 8
- .reg p6, lr8 ; outgoing arg 7
- .reg p5, lr7 ; outgoing arg 6
- .reg p4, lr6 ; outgoing arg 5
- .reg p3, lr5 ; outgoing arg 4
- .reg p2, lr4 ; outgoing arg 3
- .reg p1, lr3 ; outgoing arg 2
- .reg p0, lr2 ; outgoing arg 1
- .reg fp, lr1 ; frame pointer
- .reg raddr, lr0 ; return address
-
-;-----------------------------------------------------------------------
-; Vectors
-;-----------------------------------------------------------------------
-
- .equ V_ILLEG, 0 ; Illegal opcode
- .equ V_ALIGN, 1 ; Unaligned access
- .equ V_RANGE, 2 ; Out of range
- .equ V_COPRE, 3 ; Coprocessor not present
- .equ V_COEXC, 4 ; Coprocessor exception
- .equ V_PROT, 5 ; Protection violation
- .equ V_INSTR, 6 ; Instruction access exception
- .equ V_DATA, 7 ; Data access exception
- .equ V_UITLB, 8 ; User-mode instruction TLB miss
- .equ V_UDTLB, 9 ; User-mode data TLB miss
- .equ V_SITLB, 10 ; Supervisor-mode instr TLB miss
- .equ V_SDTLB, 11 ; Supervisor-mode data TLB miss
- .equ V_ITLB, 12 ; Instruction TLB violation
- .equ V_DTLB, 13 ; Data TLB violation
- .equ V_TIMER, 14 ; Timer
- .equ V_TRACE, 15 ; Trace
- .equ V_INTR0, 16 ; Interrupt 0
- .equ V_INTR1, 17 ; Interrupt 1
- .equ V_INTR2, 18 ; Interrupt 2
- .equ V_INTR3, 19 ; Interrupt 3
- .equ V_TRAP0, 20 ; Trap 0
- .equ V_TRAP1, 21 ; Trap 1
-
-;-----------------------------------------------------------------------
-;constants for LOAD and STORE operations
-;-----------------------------------------------------------------------
-
-; CE operand values
- .equ CE, 0b1 ;coprocessor enable
- .equ ME, 0b0 ; memory enable
-
-; CNTL operand values
- .equ IO, 0b1000000 ;set for I/O
- .equ PA, 0b0100000 ;force physical addr
- .equ SB, 0b0010000 ;set for set BP
- .equ UA, 0b0001000 ;force user mode access
- .equ ROM, 0b0000100 ;ROM access
- .equ HWORD, 0b0000010 ;Half word access
- .equ BYTE, 0b0000001 ;Byte access
- .equ WORD, 0b0000000 ;Word access
-
-;-----------------------------------------------------------------------
-; stack alignment value
-;-----------------------------------------------------------------------
- .equ STKALIGN, 8 ; double word align
-
diff --git a/newlib/libc/sys/a29khif/sys/fpsymbol.h b/newlib/libc/sys/a29khif/sys/fpsymbol.h
deleted file mode 100644
index 3fc6ac88b..000000000
--- a/newlib/libc/sys/a29khif/sys/fpsymbol.h
+++ /dev/null
@@ -1,2970 +0,0 @@
-; @(#)fpsymbol.h 1.4 90/10/14 20:55:59, Copyright 1989, 1990 AMD
-; start of fpsymbol.h file
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1989, 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;
-; ______________________________________________________________________
-;|______________________________________________________________________|
-;| |
-;| SYMBOLS FOR DEFINING THE INSTRUCTION WORD |
-;| |
-;|______________________________________________________________________|
-;|______________________________________________________________________|
-;
-;
-; Revision Information:
-;------------------------------------------------------------------------
-; Date: March 31, 1989
-; Author: Roy Carlson per Bob Perlman and Richard Relph
-;
-; The symbols section describing transactions was modified to contain
-; several new symbol values. The reason for the change was to force the
-; CA bit to be set--and remain set--once code accesses the coprocessor.
-;
-; Future operating systems will use the Coprocessor Active (CA) bit in
-; the Old Processor Status Register to determine whether or not to save
-; coprocessor state, etc.. This means that the instruction control field
-; Set Coprocessor Active (SA) bit should be used as follows:
-;
-; (1) any coprocessor STORE must have its SA bit set to 1,
-; so as to set CA,
-;
-; and (2) any coprocessor LOAD must have its SA bit set to 0,
-; so as to prevent clearing CA.
-;------------------------------------------------------------------------
-; Date: 89/01/30 12:32:13; author: jim; lines added/del: 5/4
-; Corrected CP_IEEE_GRADUAL_UFLOW_MODE and CP_RMS_MASK.
-; Added CP_EXCPS_POSITION, the ls bit of the CP_XXX_EXCP ensemble.
-; fixed a few typos in comments.
-;------------------------------------------------------------------------
-; Date: 89/01/23 18:00:26; author: jim; lines added/del: 488/468
-; Richard O. Parker
-; January 5, 1989
-;
-; 1) The _cp_prec_field in the "cp_build_inst", "cp_build_inst_h"
-; and "cp_build_inst_l" macros was not being defined in the case
-; of Am29K-supported floating-point instructions (e.g., FADD, FSUB,
-; DADD, etc.).
-;
-; 2) The multiplexor select codes in the opcode table entries
-; associated with the "cp_build_inst", "cp_build_inst_h" and
-; "cp_build_inst_l" macros, pertaining to the CONVERT_F_TO_D
-; and CONVERT_D_TO_F instructions were incorrect.
-;------------------------------------------------------------------------
-; Date: 88/12/20 14:28:26; author: jim; lines added/del: 1/1
-; Larry Westerman corrected definition of CP_MOVE_P.
-; Version required for Release 1.1 of the Intrinsics shipped 12/12/88.
-;------------------------------------------------------------------------
-; Date: 88/11/18 15:44:45; author: law;
-; Initial revision
-;
-;
-;========================================================================
-;
-; The following mnemonics are used to specify the 14 LSBs of the
-; instruction word (fields SIP, SIQ, SIT, SIF, IF, and CO).
-;
-;========================================================================
-;
-; floating point operation codes.
-;
- .equ CP_PASS_P, 0x00000000 ; pass P
- .equ CP_MINUSP, 0x00000040 ; -P
- .equ CP_ABSP, 0x00000080 ; |P|
- .equ CP_SIGNT_TIMES_ABSP, 0x00000C00 ; SIGN(T) * |P|
-;
- .equ CP_P_PLUS_T, 0x00000001 ; P + T
- .equ CP_P_MINUS_T, 0x00000101 ; P - T
- .equ CP_MINUSP_PLUS_T, 0x00001001 ; -P + T
- .equ CP_MINUSP_MINUS_T, 0x00001101 ; -P - T
- .equ CP_ABS_P_PLUS_T, 0x00000081 ; |P + T|
- .equ CP_ABS_P_MINUS_T, 0x00000181 ; |P - T|
- .equ CP_ABSP_PLUS_ABST, 0x00002201 ; |P| + |T|
- .equ CP_ABSP_MINUS_ABST, 0x00002301 ; |P| - |T|
- .equ CP_ABS_ABSP_MINUS_ABST, 0x00002381 ; ||P| - |T||
-;
- .equ CP_P_TIMES_Q, 0x00000002 ; P * Q
- .equ CP_MINUSP_TIMES_Q, 0x00001002 ; -P * Q
- .equ CP_ABS_P_TIMES_Q, 0x00000082 ; |P * Q|
-;
- .equ CP_COMPARE_P_AND_T, 0x00000103 ; compare P and T
-;
- .equ CP_MAX_P_AND_T, 0x00000104 ; max P,T
- .equ CP_MAX_ABSP_AND_ABST, 0x00002304 ; max |P|, |T|
-;
- .equ CP_MIN_P_AND_T, 0x00001005 ; min P,T
- .equ CP_MIN_ABSP_AND_ABST, 0x00003205 ; min |P|,|T|
- .equ CP_LIMIT_P_TO_MAGT, 0x00003A05 ; limit P to magnitude of T
-;
- .equ CP_CONVERT_T_TO_INT, 0x00000006 ; convert T to integer
-;
- .equ CP_SCALE_T_TO_INT_BY_Q, 0x00000007 ; scale T to integer by Q
-;
- .equ CP_PQ_PLUS_T, 0x00000008 ; (P * Q) + T
- .equ CP_MINUSPQ_PLUS_T, 0x00001008 ; (-P * Q) + T
- .equ CP_PQ_MINUS_T, 0x00000108 ; (P * Q) - T
- .equ CP_MINUSPQ_MINUS_T, 0x00001108 ; (-P * Q) - T
- .equ CP_ABSPQ_PLUS_ABST, 0x00002A08 ; |(P * Q)| + T
- .equ CP_MINUSABSPQ_PLUS_ABST, 0x00003A08 ;-|(P * Q)| + T
- .equ CP_ABSPQ_MINUS_ABST, 0x00002B08 ; |(P * Q)| - |T|
-;
- .equ CP_ROUND_T_TO_INT, 0x00000009 ; round T to integral value
-;
- .equ CP_RECIPROCAL_OF_P, 0x0000000A ; reciprocal of P
-;
- .equ CP_CONVERT_T_TO_ALT, 0x0000000B ; convert T to alt. f.p. format
- .equ CP_CONVERT_T_FROM_ALT, 0x0000000C ; convert T to alt. f.p. format
-;
-;
-; integer operation codes.
-;
- .equ CP_I_PASS_P, 0x00000020 ; integer pass P
- .equ CP_I_MINUSP, 0x00000060 ; integer -P
- .equ CP_I_ABSP, 0x000000A0 ; integer |P|
- .equ CP_I_SIGNT_TIMES_ABSP, 0x00000C20 ; integer SIGN(T) * |P|
-;
- .equ CP_I_P_PLUS_T, 0x00000021 ; integer P + T
- .equ CP_I_P_MINUS_T, 0x00000121 ; integer P - T
- .equ CP_I_MINUSP_PLUS_T, 0x00001021 ; integer -P + T
- .equ CP_I_ABS_P_PLUS_T, 0x000000A1 ; integer |P + T|
- .equ CP_I_ABS_P_MINUS_T, 0x000001A1 ; integer |P - T|
-;
- .equ CP_I_P_TIMES_Q, 0x00000022 ; integer P * Q
-;
- .equ CP_I_COMPARE_P_AND_T, 0x00000123 ; integer compare P and T
-;
- .equ CP_I_MAX_P_AND_T, 0x00000124 ; integer max P,T
-;
- .equ CP_I_MIN_P_AND_T, 0x00001025 ; integer min P,T
-;
- .equ CP_I_CONVERT_T_TO_FLOAT, 0x00000026 ; integer convert T to f.p.
-;
- .equ CP_I_SCALE_T_TO_FLOAT_BY_Q, 0x00000027 ; integer scale T to f.p. by Q
-;
- .equ CP_I_P_OR_T, 0x00000030 ; integer P OR T
-;
- .equ CP_I_P_AND_T, 0x00000031 ; integer P AND T
-;
- .equ CP_I_P_XOR_T, 0x00000032 ; integer P XOR T
-;
- .equ CP_I_NOT_T, 0x00000032 ; integer NOT T
-;
- .equ CP_I_LSHIFT_P_BY_Q, 0x00000033 ; integer logical shift P by Q
-; places
-;
- .equ CP_I_ASHIFT_P_BY_Q, 0x00000034 ; integer arith. shift P by Q
-; places
-;
- .equ CP_I_FSHIFT_PT_BY_Q, 0x00000035 ; integer funnel shift PT by Q
-; places
-;
-;
-; move instruction (f.p. or integer)
-;
- .equ CP_MOVE_P, 0x00000018 ; move operand P
-;
-;
-;========================================================================
-;
-; precision codes for the the operands in registers R and S, and for
-; the result (instruction word fields IPR, RPR).
-;
-;========================================================================
-;
-;
- .equ CP_D_S, 0x00008000 ;Double result, single input(s)
- .equ CP_S_D, 0x00004000 ;Single result, double input(s)
- .equ CP_D_D, 0x00000000 ;Double result, double input(s)
- .equ CP_S_S, 0x0000C000 ;Single result, single input(s)
-;
-;========================================================================
-;
-; The following mnemonics are used to specify the 16 LSBs of an Am29027
-; instruction word for floating-point instructions supported by the
-; Am29000 instruction set.
-;
-;========================================================================
-;
- .equ CP_FADD, 0x0000C001
- .equ CP_DADD, 0x00000001
- .equ CP_FSUB, 0x0000C101
- .equ CP_DSUB, 0x00000101
- .equ CP_FMUL, 0x0000C002
- .equ CP_DMUL, 0x00000002
- .equ CP_FEQ, 0x0000C103
- .equ CP_DEQ, 0x00000103
- .equ CP_FGE, 0x0000C103
- .equ CP_DGE, 0x00000103
- .equ CP_FGT, 0x0000C103
- .equ CP_DGT, 0x00000103
- .equ CP_CONVERT_I_TO_F, 0x0000C026 ; CONVERT (int -> s.p.)
- .equ CP_CONVERT_I_TO_D, 0x00008026 ; CONVERT (int -> d.p.)
- .equ CP_CONVERT_F_TO_I, 0x0000C006 ; CONVERT (s.p.-> int)
- .equ CP_CONVERT_D_TO_I, 0x00004006 ; CONVERT (d.p.-> int)
- .equ CP_CONVERT_F_TO_D, 0x00008000 ; CONVERT (s.p.-> d.p.)
- .equ CP_CONVERT_D_TO_F, 0x00004000 ; CONVERT (d.p.-> s.p.)
-;
-;
-;========================================================================
-;
-; operand select codes (instruction word fields PMS, QMS, TMS).
-;
-;========================================================================
-;
-;
- .equ CP_P_EQ_R, 0x00000000
- .equ CP_P_EQ_S, 0x01000000
- .equ CP_P_EQ_0, 0x02000000
- .equ CP_P_EQ_ONE_HALF, 0x03000000
- .equ CP_P_EQ_IMINUS1, 0x03000000
- .equ CP_P_EQ_1, 0x04000000
- .equ CP_P_EQ_2, 0x05000000
- .equ CP_P_EQ_3, 0x06000000
- .equ CP_P_EQ_PI, 0x07000000
- .equ CP_P_EQ_IMINUSMAX, 0x07000000
- .equ CP_P_EQ_RF0, 0x08000000
- .equ CP_P_EQ_RF1, 0x09000000
- .equ CP_P_EQ_RF2, 0x0A000000
- .equ CP_P_EQ_RF3, 0x0B000000
- .equ CP_P_EQ_RF4, 0x0C000000
- .equ CP_P_EQ_RF5, 0x0D000000
- .equ CP_P_EQ_RF6, 0x0E000000
- .equ CP_P_EQ_RF7, 0x0F000000
-;
- .equ CP_Q_EQ_R, 0x00000000
- .equ CP_Q_EQ_S, 0x00100000
- .equ CP_Q_EQ_0, 0x00200000
- .equ CP_Q_EQ_ONE_HALF, 0x00300000
- .equ CP_Q_EQ_IMINUS1, 0x00300000
- .equ CP_Q_EQ_1, 0x00400000
- .equ CP_Q_EQ_2, 0x00500000
- .equ CP_Q_EQ_3, 0x00600000
- .equ CP_Q_EQ_PI, 0x00700000
- .equ CP_Q_EQ_IMINUSMAX, 0x00700000
- .equ CP_Q_EQ_RF0, 0x00800000
- .equ CP_Q_EQ_RF1, 0x00900000
- .equ CP_Q_EQ_RF2, 0x00A00000
- .equ CP_Q_EQ_RF3, 0x00B00000
- .equ CP_Q_EQ_RF4, 0x00C00000
- .equ CP_Q_EQ_RF5, 0x00D00000
- .equ CP_Q_EQ_RF6, 0x00E00000
- .equ CP_Q_EQ_RF7, 0x00F00000
-;
- .equ CP_T_EQ_R, 0x00000000
- .equ CP_T_EQ_S, 0x00010000
- .equ CP_T_EQ_0, 0x00020000
- .equ CP_T_EQ_ONE_HALF, 0x00030000
- .equ CP_T_EQ_IMINUS1, 0x00030000
- .equ CP_T_EQ_1, 0x00040000
- .equ CP_T_EQ_2, 0x00050000
- .equ CP_T_EQ_3, 0x00060000
- .equ CP_T_EQ_PI, 0x00070000
- .equ CP_T_EQ_IMINUSMAX, 0x00070000
- .equ CP_T_EQ_RF0, 0x00080000
- .equ CP_T_EQ_RF1, 0x00090000
- .equ CP_T_EQ_RF2, 0x000A0000
- .equ CP_T_EQ_RF3, 0x000B0000
- .equ CP_T_EQ_RF4, 0x000C0000
- .equ CP_T_EQ_RF5, 0x000D0000
- .equ CP_T_EQ_RF6, 0x000E0000
- .equ CP_T_EQ_RF7, 0x000F0000
-;
-;
-;========================================================================
-;
-; destination select codes (instruction word fields RF, RFS)
-;
-;========================================================================
-;
-;
- .equ CP_DEST_EQ_GP, 0x00000000
- .equ CP_DEST_EQ_RF0, 0x80000000
- .equ CP_DEST_EQ_RF1, 0x90000000
- .equ CP_DEST_EQ_RF2, 0xA0000000
- .equ CP_DEST_EQ_RF3, 0xB0000000
- .equ CP_DEST_EQ_RF4, 0xC0000000
- .equ CP_DEST_EQ_RF5, 0xD0000000
- .equ CP_DEST_EQ_RF6, 0xE0000000
- .equ CP_DEST_EQ_RF7, 0xF0000000
-;
-;
-; ______________________________________________________________________
-;|______________________________________________________________________|
-;| |
-;| SYMBOLS FOR DEFINING THE MODE REGISTER DOUBLE WORD |
-;| |
-;|______________________________________________________________________|
-;|______________________________________________________________________|
-;
-;
-;
- .equ CP_PFF_MASK, 0x00000003 ; primary f.p. format mask
- .equ CP_PFF_EQ_IEEE, 0x00000000 ; primary f.p. format = IEEE
- .equ CP_PFF_EQ_DECD, 0x00000001 ; primary f.p. format = DEC D
- .equ CP_PFF_EQ_DECG, 0x00000002 ; primary f.p. format = DEC G
- .equ CP_PFF_EQ_IBM, 0x00000003 ; primary f.p. format = IBM
- .equ CP_PFF_POSITION, 0
-;
- .equ CP_AFF_MASK, 0x0000000C ; alternate f.p. format mask
- .equ CP_AFF_EQ_IEEE, 0x00000000 ; alternate f.p. format = IEEE
- .equ CP_AFF_EQ_DECD, 0x00000004 ; alternate f.p. format = DEC D
- .equ CP_AFF_EQ_DECG, 0x00000008 ; alternate f.p. format = DEC G
- .equ CP_AFF_EQ_IBM, 0x0000000C ; alternate f.p. format = IBM
- .equ CP_AFF_POSITION, 2
-;
- .equ CP_SAT_MASK, 0x00000010 ; saturate mode (SAT) mask
- .equ CP_SATURATE_MODE, 0x00000010 ; enable saturate mode (SAT=1)
- .equ CP_SAT_POSITION, 4
-;
- .equ CP_AP_MASK, 0x00000020 ; affine/proj. mode (AP) mask
- .equ CP_AFFINE_MODE, 0x00000020 ; enable affine mode (AP=1)
- .equ CP_PROJECTIVE_MODE, 0x00000000 ; enable projective mode (AP=0)
- .equ CP_AP_POSITION, 5
-;
- .equ CP_TRP_MASK, 0x00000040 ; IEEE trap mode (TRP) mask
- .equ CP_IEEE_TRAPS_ENABLED, 0x00000040 ; IEEE trap mode enabled (TRP=1)
- .equ CP_IEEE_TRAPS_DISABLED, 0x00000000 ; IEEE trap mode disabled (TRP=0)
- .equ CP_TRP_POSITION, 6
-;
- .equ CP_SU_MASK, 0x00000080 ; IEEE sud. uflow (SU) mask
- .equ CP_IEEE_SUDDEN_UFLOW_MODE, 0x00000080 ; IEEE sud. uflow mode (SU=1)
- .equ CP_IEEE_GRADUAL_UFLOW_MODE,0x00000000 ; IEEE grad uflow mode (SU=0)
- .equ CP_SU_POSITION, 7
-;
- .equ CP_BS_MASK, 0x00000100 ; IBM sig. mask (BS)
- .equ CP_BS_POSITION, 8
-;
- .equ CP_BU_MASK, 0x00000200 ; IBM underflow mask (BU)
- .equ CP_BU_POSITION, 9
-;
- .equ CP_MS_MASK, 0x00000800 ; signed int. mpy (MS) mask
- .equ CP_SIGNED_INT_MPY_MODE, 0x00000800 ; signed int. mpy mode (MS=1)
- .equ CP_UNSIGNED_INT_MPY_MODE, 0x00000000 ; unsigned int. mpy mode (MS=0)
- .equ CP_MS_POSITION, 11
-;
- .equ CP_MF_MASK, 0x00003000 ; int. mult. fmt. mode (MF) mask
- .equ CP_MF_EQ_LSBS, 0x00000000 ; int. mult. fmt. = LSBs
- .equ CP_MF_EQ_LSBSFA, 0x00001000 ; int. mult. fmt. = LSBs,fmt. adj.
- .equ CP_MF_EQ_MSBS, 0x00002000 ; int. mult. fmt. = MSBs
- .equ CP_MF_EQ_MSBSFA, 0x00003000 ; int. mult. fmt. = MSBs,fmt. adj.
- .equ CP_MF_POSITION, 12
-;
- .equ CP_RMS_MASK, 0x0001C000 ; round mode (RMS) mask
- .equ CP_RMS_EQ_NEAREST, 0x00000000 ; round mode = to nearest
- .equ CP_RMS_EQ_MINUS_INF, 0x00004000 ; round mode = toward -oo
- .equ CP_RMS_EQ_PLUS_INF, 0x00008000 ; round mode = toward +oo
- .equ CP_RMS_EQ_ZERO, 0x0000C000 ; round mode = toward zero
- .equ CP_RMS_POSITION, 14
-;
- .equ CP_PL_MASK, 0x00100000 ; pipeline mode (PL) mask
- .equ CP_FLOWTHROUGH_MODE, 0x00000000 ; select flow-through mode
- .equ CP_PIPELINE_MODE, 0x00100000 ; select pipeline mode
- .equ CP_PL_POSITION, 20
-;
- .equ CP_INVALID_OP_EXCP_MASK, 0x00400000 ; invalid operation excp. mask(IM)
- .equ CP_RESERVED_OP_EXCP_MASK,0x00800000 ; reserved operand excp. mask(RM)
- .equ CP_OVERFLOW_EXCP_MASK, 0x01000000 ; overflow exception mask (VM)
- .equ CP_UNDERFLOW_EXCP_MASK, 0x02000000 ; underflow exception mask(UM)
- .equ CP_INEXACT_EXCP_MASK, 0x04000000 ; inexact result excp. mask(XM)
- .equ CP_ZERO_EXCP_MASK, 0x08000000 ; zero result exception mask (ZM)
- .equ CP_EXCPS_POSITION, 22
-;
- .equ CP_PLTC_MASK, 0x0000000F ; pipeline timer count (PLTC) mask
- .equ CP_PLTC_EQ_2, 0x00000002 ; pipeline timer count = 2
- .equ CP_PLTC_EQ_3, 0x00000003 ; pipeline timer count = 3
- .equ CP_PLTC_EQ_4, 0x00000004 ; pipeline timer count = 4
- .equ CP_PLTC_EQ_5, 0x00000005 ; pipeline timer count = 5
- .equ CP_PLTC_EQ_6, 0x00000006 ; pipeline timer count = 6
- .equ CP_PLTC_EQ_7, 0x00000007 ; pipeline timer count = 7
- .equ CP_PLTC_EQ_8, 0x00000008 ; pipeline timer count = 8
- .equ CP_PLTC_EQ_9, 0x00000009 ; pipeline timer count = 9
- .equ CP_PLTC_EQ_10, 0x0000000A ; pipeline timer count = 10
- .equ CP_PLTC_EQ_11, 0x0000000B ; pipeline timer count = 11
- .equ CP_PLTC_EQ_12, 0x0000000C ; pipeline timer count = 12
- .equ CP_PLTC_EQ_13, 0x0000000D ; pipeline timer count = 13
- .equ CP_PLTC_EQ_14, 0x0000000E ; pipeline timer count = 14
- .equ CP_PLTC_EQ_15, 0x0000000F ; pipeline timer count = 15
- .equ CP_PLTC_POSITION, 0
-;
- .equ CP_MATC_MASK, 0x000000F0 ; mpy-acc timer count (MATC) mask
- .equ CP_MATC_EQ_2, 0x00000020 ; mpy-acc timer count = 2
- .equ CP_MATC_EQ_3, 0x00000030 ; mpy-acc timer count = 3
- .equ CP_MATC_EQ_4, 0x00000040 ; mpy-acc timer count = 4
- .equ CP_MATC_EQ_5, 0x00000050 ; mpy-acc timer count = 5
- .equ CP_MATC_EQ_6, 0x00000060 ; mpy-acc timer count = 6
- .equ CP_MATC_EQ_7, 0x00000070 ; mpy-acc timer count = 7
- .equ CP_MATC_EQ_8, 0x00000080 ; mpy-acc timer count = 8
- .equ CP_MATC_EQ_9, 0x00000090 ; mpy-acc timer count = 9
- .equ CP_MATC_EQ_10, 0x000000A0 ; mpy-acc timer count = 10
- .equ CP_MATC_EQ_11, 0x000000B0 ; mpy-acc timer count = 11
- .equ CP_MATC_EQ_12, 0x000000C0 ; mpy-acc timer count = 12
- .equ CP_MATC_EQ_13, 0x000000D0 ; mpy-acc timer count = 13
- .equ CP_MATC_EQ_14, 0x000000E0 ; mpy-acc timer count = 14
- .equ CP_MATC_EQ_15, 0x000000F0 ; mpy-acc timer count = 15
- .equ CP_MATC_POSITION, 4
-;
- .equ CP_MVTC_MASK, 0x00000F00 ; MOVE P timer count (MVTC) mask
- .equ CP_MVTC_EQ_2, 0x00000200 ; MOVE P timer count = 2
- .equ CP_MVTC_EQ_3, 0x00000300 ; MOVE P timer count = 3
- .equ CP_MVTC_EQ_4, 0x00000400 ; MOVE P timer count = 4
- .equ CP_MVTC_EQ_5, 0x00000500 ; MOVE P timer count = 5
- .equ CP_MVTC_EQ_6, 0x00000600 ; MOVE P timer count = 6
- .equ CP_MVTC_EQ_7, 0x00000700 ; MOVE P timer count = 7
- .equ CP_MVTC_EQ_8, 0x00000800 ; MOVE P timer count = 8
- .equ CP_MVTC_EQ_9, 0x00000900 ; MOVE P timer count = 9
- .equ CP_MVTC_EQ_10, 0x00000A00 ; MOVE P timer count = 10
- .equ CP_MVTC_EQ_11, 0x00000B00 ; MOVE P timer count = 11
- .equ CP_MVTC_EQ_12, 0x00000C00 ; MOVE P timer count = 12
- .equ CP_MVTC_EQ_13, 0x00000D00 ; MOVE P timer count = 13
- .equ CP_MVTC_EQ_14, 0x00000E00 ; MOVE P timer count = 14
- .equ CP_MVTC_EQ_15, 0x00000F00 ; MOVE P timer count = 15
- .equ CP_MVTC_POSITION, 8
-;
- .equ CP_AD_MASK, 0x00001000 ;
- .equ CP_ADVANCE_DRDY_MODE, 0x00001000 ;
- .equ CP_NORMAL_DRDY_MODE, 0x00000000 ;
- .equ CP_AD_POSITION, 12
-;
- .equ CP_HE_MASK, 0x00002000 ; Halt-on-error mask (HE)
- .equ CP_HALT_ON_ERROR_ENABLED, 0x00002000 ; Halt-on-error enabled (HE=1)
- .equ CP_HALT_ON_ERROR_DISABLED,0x00000000 ; Halt-on-error disabled (HE=0)
- .equ CP_HE_POSITION, 13
-;
- .equ CP_EX_MASK, 0x00004000 ; EXCP enable mask (EX)
- .equ CP_EXCP_ENABLED, 0x00004000 ; EXCP enabled (EX=1)
- .equ CP_EXCP_DISABLED, 0x00000000 ; EXCP disabled (EX=0)
- .equ CP_EX_POSITION, 14
-;
-;
-;
-; ______________________________________________________________________
-;|______________________________________________________________________|
-;| |
-;| SYMBOLS FOR DEFINING THE STATUS REGISTER WORD |
-;| |
-;|______________________________________________________________________|
-;|______________________________________________________________________|
-;
-;
- .equ CP_INVALID_OP_EXCP, 0x00000001
- .equ CP_INVALID_OP_EXCP_POSITION, 0
-;
- .equ CP_RESERVED_OP_EXCP, 0x00000002
- .equ CP_RESERVED_OP_EXCP_POSITION, 1
-;
- .equ CP_OVERFLOW_EXCP, 0x00000004
- .equ CP_OVERFLOW_EXCP_POSITION, 2
-;
- .equ CP_UNDERFLOW_EXCP, 0x00000008
- .equ CP_UNDERFLOW_EXCP_POSITION, 3
-;
- .equ CP_INEXACT_EXCP, 0x00000010
- .equ CP_INEXACT_EXCP_POSITION, 4
-;
- .equ CP_ZERO_EXCP, 0x00000020
- .equ CP_ZERO_EXCP_POSITION, 5
-;
- .equ CP_EXCP_STATUS_MASK, 0x00000040
- .equ CP_EXCP_STATUS_FLAG_POSITION, 6
-;
- .equ CP_R_TEMP_VALID_MASK, 0x00000080
- .equ R_TEMP_VALID_POSITION, 7
-;
- .equ CP_S_TEMP_VALID_MASK, 0x00000100
- .equ CP_S_TEMP_VALID_POSITION, 8
-;
- .equ CP_I_TEMP_VALID_FLAG, 0x00000200
- .equ CP_I_TEMP_VALID_POSITION, 9
-;
- .equ CP_OPERATION_PENDING_MASK, 0x00000400
- .equ CP_OPERATION_PENDING_POSITION,10
-;
-;
-; ______________________________________________________________________
-;|______________________________________________________________________|
-;| |
-;| SYMBOLS FOR DEFINING THE FLAG REGISTER WORD |
-;| |
-;|______________________________________________________________________|
-;|______________________________________________________________________|
-;
-;
- .equ CP_INVALID_OP_FLAG, 0x00000001
- .equ CP_INVALID_OP_FLAG_POSITION, 0
-;
- .equ CP_CARRY_FLAG, 0x00000001
- .equ CP_CARRY_FLAG_POSITION, 0
-;
- .equ CP_RESERVED_OP_FLAG, 0x00000002
- .equ CP_RESERVED_OP_FLAG_POSITION, 1
-;
- .equ CP_OVERFLOW_FLAG, 0x00000004
- .equ CP_OVERFLOW_FLAG_POSITION, 2
-;
- .equ CP_UNORDERED_FLAG, 0x00000004
- .equ CP_UNORDERED_FLAG_POSITION, 2
-;
- .equ CP_UNDERFLOW_FLAG, 0x00000008
- .equ CP_UNDERFLOW_FLAG_POSITION, 3
-;
- .equ CP_LESS_THAN_FLAG, 0x00000008
- .equ CP_LESS_THAN_POSITION, 3
-;
- .equ CP_WINNER_FLAG, 0x00000008
- .equ CP_WINNER_FLAG_POSITION, 3
-;
- .equ CP_INEXACT_FLAG, 0x00000010
- .equ CP_INEXACT_FLAG_POSITION, 4
-;
- .equ CP_GREATER_THAN_FLAG, 0x00000010
- .equ CP_GREATER_THAN_FLAG_POSITION,4
-;
- .equ CP_ZERO_FLAG, 0x00000020
- .equ CP_ZERO_FLAG_POSITION, 5
-;
- .equ CP_EQUAL_FLAG, 0x00000020
- .equ CP_EQUAL_FLAG_POSITION, 5
-;
- .equ CP_SIGN_FLAG, 0x00000040
- .equ CP_SIGN_FLAG_POSITION, 6
-;
-;
-; ______________________________________________________________________
-;|______________________________________________________________________|
-;| |
-;| SYMBOLS FOR TRANSACTION REQUEST TYPES |
-;| |
-;|______________________________________________________________________|
-;|______________________________________________________________________|
-;
-;
-; write requests
-;
-; Note: Each WRITE_* transaction request, plus ADV_TEMPS sets the CA
-; (Coprocessor Active) bit in the 29000 Current Processor Status Register.
-;
- .equ CP_WRITE_R, 0x20 ;write sing or doub to R register
- .equ CP_WRITE_S, 0x21 ;write sing or doub to S register
- .equ CP_WRITE_RS, 0x22 ;write sing operands to R and S
- .equ CP_WRITE_MODE, 0x23 ;write mode double word to 29027
- .equ CP_WRITE_STATUS, 0x24 ;write status word to 29027
- .equ CP_WRITE_PREC, 0x25 ;write reg. file precision word
- ; to 29027
- .equ CP_WRITE_INST, 0x26 ;write instruction to 29027
- .equ CP_ADV_TEMPS, 0x27 ;move R-Temp, S-Temp into R,S
-;
-; read requests
-;
- .equ CP_READ_MSBS, 0x00 ;read sing result or MSB of doub
- .equ CP_READ_LSBS, 0x01 ;read LSB of doub result
- .equ CP_READ_FLAGS, 0x02 ;read 29027 flag register
- .equ CP_READ_STATUS, 0x03 ;read 29027 status register
- .equ CP_SAVE_STATE, 0x04 ;read one word of 29027 state
-;
-; "start operation" symbol; this is "OR"ed with a WRITE_R, WRITE_S,
-; WRITE_RS, or WRITE_INST symbol.
-;
-
- .equ CP_START, 0b1000000 ;bit to start 29027 operation
-;
-; "suppress exceptions reporting" symbol; this is "OR"ed with a ed
-;
-;
-
- .equ CP_NO_ERR, 0b1000000 ;suppress exception reporting
-; ; during load.
-; cp_write_r - transfers 32- or 64-bit operand to Am29027
-; register R
-; cp_write_s - transfers 32- or 64-bit operand to Am29027
-; register S
-; cp_write_rs - transfers two 32-bit floating-point operands to
-; Am29027 registers R and S
-; cp_write_prec - transfers a word to the Am29027 precision register
-; cp_write_status - transfers a word to the Am29027 status register
-; cp_write_inst - transfers an instruction to the Am29027
-; instruction register
-; cp_advance_temps - transfers the contents of the Am29027 temporary
-; registers to the corresponding working registers
-; cp_write_mode - transfers a mode specification the the Am29027
-; mode register
-; cp_read_dp - read a double-precision floating-point result
-; from the Am29027
-; cp_read_sp - read a single-precision floating-point result
-; from the Am29027
-; cp_read_int - read an integer result from the Am29027
-; cp_read_flags - read the contents of the Am29027 flag register
-; cp_read_status - read the contents of the Am29027 status register
-; cp_read_state_wd - read a single Am29027 state word
-; cp_save_state - save Am29027 state
-; cp_restore_state - restore Am29027 state
-; cp_build_inst - build an Am29027 instruction
-; cp_build_inst_h - build 16 MSBs of an Am29027 instruction
-; cp_build_inst_l - build 16 LSBs of an Am29027 instruction
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_write_r
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 16, 1988
-;
-; FUNCTION: Transfers a 32- or 64-bit operand to Am29027 input register R
-;
-; PARAMETERS:
-; reg - the Am29000 g.p. register containing the 32-bit operand to be
-; transferred, or the 32 MSBs of the 64-bit operand to be
-; transferred.
-;
-; LSB_reg - the Am29000 g.p. register containing the 32 LSBs of the
-; 64-bit operand to be transferred
-;
-; INT - indicates that the operand to be transferred is a 32-bit
-; integer
-;
-; START - indicates that a new Am29027 operation is to be started
-; once the operand has been transferred
-;
-;
-; USAGE:
-;
-; cp_write_r reg [,LSB_reg] [,START] for floating-point operands
-; or cp_write_r reg, INT [,START] for integer operands
-;
-; Transferring double-precision floating-point operands - Either of
-; two forms is acceptable:
-;
-; cp_write_r reg
-; or cp_write_r reg, LSB_reg
-;
-; If LSB_reg is omitted, the LSBs are taken from the next g.p.
-; register.
-;
-; Ex: cp_write_r lr2 Transfers the contents of lr2 to
-; the most-significant half of Am29027
-; register R, and the contents of lr3
-; to the least-significant half.
-;
-; cp_write_r lr2,lr5 Transfers the contents of lr2 to
-; the most-significant half of Am29027
-; register R, and the contents of lr5
-; to the least-significant half.
-;
-;
-; Transferring single-precision floating-point operands - Use the
-; form:
-;
-; cp_write_r reg
-;
-;
-; Ex: cp_write_r lr2 Transfers the contents of lr2 to
-; the most-significant half of Am29027
-; register R, (the contents of lr3
-; will be transferred to the least-
-; significant half of register R, but
-; these bits are don't cares).
-;
-;
-; Transferring integer operands - Use the form:
-;
-; cp_write_r reg,INT
-;
-;
-; Ex: cp_write_r lr2,INT Transfers the contents of lr2 to
-; the least-significant half of Am29027
-; register R, (the contents of lr2
-; will also be transferred to the most-
-; significant half of register R, but
-; these bits are don't cares).
-;
-;
-; Starting an Am29027 operation - Any of the forms above may be
-; appended with parameter START, e.g.:
-;
-; cp_write_r lr2,START
-;
-; cp_write_r lr2,lr5,START
-;
-; cp_write_r lr2,INT,START
-;
-;
-;============================================================================
-;
- .macro cp_write_r,p1,p2,p3
-;
- .if $narg==0
- .err
- .print "cp_WRITE_R: missing parameter(s)"
- .endif
-;
-;
- .if $narg==1
- store 1,CP_WRITE_R,p1,%%((&p1)+1)
- .exitm
- .endif
-;
-;
- .if $narg==2
-;
- .ifeqs "@p2@","INT"
- store 1,CP_WRITE_R,p1,p1
- .exitm
- .endif
-;
- .ifeqs "@p2@","START"
- store 1,CP_WRITE_R|CP_START,p1,%%((&p1)+1)
- .exitm
- .endif
-;
- store 1,CP_WRITE_R,p1,p2
- .exitm
-;
- .endif
-;
-;
- .if $narg==3
-;
- .ifeqs "@p2@","START"
- .ifeqs "@p3@","INT"
- store 1,CP_WRITE_R|CP_START,p1,p1
- .else
- .err
- .print "cp_write_r: bad parameter list"
- .endif
- .exitm
- .endif
-;
- .ifeqs "@p2@","INT"
- .ifeqs "@p3@","START"
- store 1,CP_WRITE_R|CP_START,p1,p1
- .else
- .err
- .print "cp_write_r: bad parameter list"
- .endif
- .exitm
- .endif
-;
- .ifeqs "@p3@","START"
- store 1,CP_WRITE_R|CP_START,p1,p2
- .else
- .err
- .print "cp_write_r: bad parameter list"
- .endif
- .exitm
-;
- .endif
-;
-;
- .if $narg>=4
- .err
- .print "cp_write_r: too many parameters"
- .endif
-;
- .endm
-;
-;
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_write_s
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 16, 1988
-;
-; FUNCTION: Transfers a 32- or 64-bit operand to Am29027 input register S
-;
-; PARAMETERS:
-; reg - the Am29000 g.p. register containing the 32-bit operand to be
-; transferred, or the 32 MSBs of the 64-bit operand to be
-; transferred.
-;
-; LSB_reg - the Am29000 g.p. register containing the 32 LSBs of the
-; 64-bit operand to be transferred
-;
-; INT - indicates that the operand to be transferred is a 32-bit
-; integer
-;
-; START - indicates that a new Am29027 operation is to be started
-; once the operand has been transferred
-;
-;
-; USAGE:
-;
-; cp_write_s reg [,LSB_reg] [,START] for floating-point operands
-; or cp_write_s reg, INT [,START] for integer operands
-;
-; Transferring double-precision floating-point operands - Either of
-; two forms is acceptable:
-;
-; cp_write_s reg
-; or cp_write_s reg, LSB_reg
-;
-; If LSB_reg is omitted, the LSBs are taken from the next g.p.
-; register.
-;
-; Ex: cp_write_s lr2 Transfers the contents of lr2 to
-; the most-significant half of Am29027
-; register S, and the contents of lr3
-; to the least-significant half.
-;
-; cp_write_s lr2,lr5 Transfers the contents of lr2 to
-; the most-significant half of Am29027
-; register S, and the contents of lr5
-; to the least-significant half.
-;
-;
-; Transferring single-precision floating-point operands - Use the
-; form:
-;
-; cp_write_s reg
-;
-;
-; Ex: cp_write_s lr2 Transfers the contents of lr2 to
-; the most-significant half of Am29027
-; register S, (the contents of lr3
-; will be transferred to the least-
-; significant half of register S, but
-; these bits are don't cares).
-;
-;
-; Transferring integer operands - Use the form:
-;
-; cp_write_s reg,INT
-;
-;
-; Ex: cp_write_s lr2,INT Transfers the contents of lr2 to
-; the least-significant half of Am29027
-; register S, (the contents of lr2
-; will also be transferred to the most-
-; significant half of register S, but
-; these bits are don't cares).
-;
-;
-; Starting an Am29027 operation - Any of the forms above may be
-; appended with parameter START, e.g.:
-;
-; cp_write_s lr2,START
-;
-; cp_write_s lr2,lr5,START
-;
-; cp_write_s lr2,INT,START
-;
-;
-;============================================================================
-;
- .macro cp_write_s,p1,p2,p3
-;
- .if $narg==0
- .err
- .print "cp_write_s: missing parameter(s)"
- .endif
-;
-;
- .if $narg==1
- store 1,CP_WRITE_S,p1,%%((&p1)+1)
- .exitm
- .endif
-;
-;
- .if $narg==2
-;
- .ifeqs "@p2@","INT"
- store 1,CP_WRITE_S,p1,p1
- .exitm
- .endif
-;
- .ifeqs "@p2@","START"
- store 1,CP_WRITE_S|CP_START,p1,%%((&p1)+1)
- .exitm
- .endif
-;
- store 1,CP_WRITE_S,p1,p2
- .exitm
-;
- .endif
-;
-;
- .if $narg==3
-;
- .ifeqs "@p2@","START"
- .ifeqs "@p3@","INT"
- store 1,CP_WRITE_S|CP_START,p1,p1
- .else
- .err
- .print "cp_write_s: bad parameter list"
- .endif
- .exitm
- .endif
-;
- .ifeqs "@p2@","INT"
- .ifeqs "@p3@","START"
- store 1,CP_WRITE_S|CP_START,p1,p1
- .else
- .err
- .print "cp_write_s: bad parameter list"
- .endif
- .exitm
- .endif
-;
- .ifeqs "@p3@","START"
- store 1,CP_WRITE_S|CP_START,p1,p2
- .else
- .err
- .print "cp_write_s: bad parameter list"
- .endif
- .exitm
-;
- .endif
-;
-;
- .if $narg>=4
- .err
- .print "cp_write_s: too many parameters"
- .endif
-;
- .endm
-;
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_write_rs
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 16, 1988
-;
-; FUNCTION: Transfers two 32-bit floating-point operands to Am29027
-; input registers R and S
-;
-; PARAMETERS:
-; reg1 - the Am29000 g.p. register containing the 32-bit operand to be
-; transferred to register R
-;
-; reg2 - the Am29000 g.p. register containing the 32-bit operand to be
-; transferred to register S
-;
-; START - indicates that a new Am29027 operation is to be started
-; once the operands have been transferred
-;
-;
-; USAGE:
-;
-; cp_write_rs reg1, reg2 [,START]
-;
-; Ex: cp_write_rs lr2,lr5 Transfers the contents of lr2 to
-; the most-significant half of Am29027
-; register R, and the contents of lr5
-; to the most-significant half of Am29027
-; register S.
-;
-; cp_write_rs lr2,lr5,START Transfers the contents of lr2 to
-; the most-significant half of Am29027
-; register R, and the contents of lr5
-; to the most-significant half of Am29027
-; register S; a new operation is started
-; once the transfer is complete.
-;
-;
-;
-;============================================================================
-;
- .macro cp_write_rs,p1,p2,p3
-;
-;
- .if $narg<=1
- .err
- .print "cp_write_rs: missing parameter(s)"
- .exitm
- .endif
-;
-;
- .if $narg==2
- .ifeqs "@p2@","START"
- .err
- .print "cp_write_rs: bad parameter list"
- .else
- store 1,CP_WRITE_RS,p1,p2
- .endif
- .exitm
- .endif
-;
-;
- .if $narg==3
- .ifeqs "@p3@","START"
- store 1,CP_WRITE_RS|CP_START,p1,p2
- .else
- .err
- .print "cp_write_rs: bad parameter list"
- .endif
- .exitm
- .endif
-;
-;
- .if $narg>=4
- .err
- .print "cp_write_rs: too many parameters"
- .exitm
- .endif
-;
- .endm
-;
-;
-;
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_write_prec
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 16, 1988
-;
-; FUNCTION: Transfers a word to the Am29027 precision register
-;
-; PARAMETERS:
-; reg - the Am29000 g.p. register containing the word to be
-; transferred to the Am29027 precision register
-;
-; USAGE:
-;
-; cp_write_prec reg
-;
-; Ex: cp_write_prec lr2 Transfers the contents of lr2 to
-; the Am29027 precision register.
-;
-;
-;============================================================================
-;
- .macro cp_write_prec,p1
-;
-;
- .if $narg!=1
- .err
- .print "cp_write_prec: bad parameter list"
- .else
- store 1,CP_WRITE_PREC,p1,0
- .endif
-;
- .endm
-;
-;
-;
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_write_status
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 16, 1988
-;
-; FUNCTION: Transfers a word to the Am29027 precision register
-;
-; PARAMETERS:
-; reg - the Am29000 g.p. register containing the word to be
-; transferred to the Am29027 status register
-;
-; RESTORE - indicates that this is the last step of a state restoration
-; sequence (flow-through mode only)
-;
-; INVALIDATE - indicates that the current contents of the ALU pipeline
-; register are to be invalidated (pipeline mode only)
-;
-; USAGE:
-;
-; cp_write_status reg [,RESTORE|INVALIDATE]
-;
-; Ex: cp_write_status lr2 Transfers the contents of lr2 to
-; the Am29027 status register.
-;
-;
-; cp_write_status lr2,RESTORE Transfers the contents of lr2 to
-; the Am29027 status register, and
-; completes the state restore
-; sequence
-;
-; cp_write_status lr2,INVALIDATE Transfers the contents of lr2 to
-; the Am29027 status register, and
-; invalidates the contents of the
-; ALU pipeline.
-;
-;
-;============================================================================
-;
- .macro cp_write_status,p1,p2
-;
- .if $narg==0
- .err
- .print "cp_write_status: missing parameter(s)"
- .endif
-;
-;
- .if $narg==1
- store 1,CP_WRITE_STATUS,p1,0
- .exitm
- .endif
-;
-;
- .if $narg==2
-;
- .ifeqs "@p2@","RESTORE"
- store 1,CP_WRITE_STATUS|CP_START,p1,0
- .exitm
- .endif
-;
- .ifeqs "@p2@","INVALIDATE"
- store 1,CP_WRITE_STATUS|CP_START,p1,0
- .exitm
- .endif
-;
- .err
- .print "cp_write_status: bad parameter list"
- .exitm
-;
- .endif
-;
-;
- .if $narg >=3
- .err
- .print "cp_write_status: too many parameters"
- .exitm
- .endif
-;
- .endm
-;
-;
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_write_inst
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 16, 1988
-;
-; FUNCTION: Transfers an instruction word to the Am29027 instruction
-; register
-;
-; PARAMETERS:
-; reg - the Am29000 g.p. register containing the word to be
-; transferred to the Am29027 instruction register
-;
-; START - indicates that a new Am29027 operation is to be started
-; once the instruction word has been transferred
-;
-; USAGE:
-;
-; cp_write_inst reg [,START]
-;
-; Ex: cp_write_inst lr2 Transfers the contents of lr2 to
-; the Am29027 instruction register.
-;
-;
-; cp_write_inst lr2,START Transfers the contents of lr2 to
-; the Am29027 status register; a
-; new operation is started once the
-; transfer is complete.
-;
-;
-;============================================================================
-;
- .macro cp_write_inst,p1,p2
-;
- .if $narg==0
- .err
- .print "cp_write_inst: missing parameter(s)"
- .endif
-;
-;
- .if $narg==1
- store 1,CP_WRITE_INST,p1,p1
- .exitm
- .endif
-;
-;
- .if $narg==2
-;
- .ifeqs "@p2@","START"
- store 1,CP_WRITE_INST|CP_START,p1,p1
- .else
- .err
- .print "cp_write_inst: bad parameter list"
- .endif
- .exitm
-;
- .endif
-;
-;
- .if $narg >=3
- .err
- .print "cp_write_inst: too many parameters"
- .exitm
- .endif
-;
- .endm
-;
-;
-;
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_advance_temps
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 17, 1988
-;
-; FUNCTION: Transfers the contents of Am29027 registers R-Temp, S-Temp,
-; and I-Temp to register R, register S, and the instruction
-; register, respectively.
-;
-; PARAMETERS: none
-;
-; USAGE:
-;
-; cp_advance_temps
-;
-;
-;
-;============================================================================
-;
- .macro cp_advance_temps
-;
-;
- .if $narg!=0
- .err
- .print "cp_advance_temp: takes no parameters"
- .else
- store 1,CP_ADV_TEMPS,gr1,0 ; use gr1 because it's never protected
- .endif
-;
- .endm
-;
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_write_mode
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 17, 1988
-;
-; FUNCTION: Transfers a 64-bit mode specification to the Am29027 mode
-; register
-;
-; PARAMETERS:
-; reg - the Am29000 g.p. register containing the 32 MSBs of the
-; 64-bit mode specification to be transferred.
-;
-; LSB_reg - the Am29000 g.p. register containing the 32 LSBs of the
-; 64-bit mode specification to be transferred.
-;
-; USAGE:
-;
-; cp_write_mode reg [,LSB_reg]
-;
-; Either of two forms is acceptable:
-;
-; cp_write_mode reg
-; or cp_write_mode reg, LSB_reg
-;
-; If LSB_reg is omitted, the LSBs are taken from the next g.p.
-; register.
-;
-; Ex: cp_write_mode lr2 Transfers the contents of lr2 to
-; the most-significant half of the Am29027
-; mode register, and the contents of lr3
-; to the least-significant half.
-;
-; cp_write_mode lr2,lr5 Transfers the contents of lr2 to
-; the most-significant half of the Am29027
-; mode register, and the contents of lr5
-; to the least-significant half.
-;
-;
-;
-;============================================================================
-;
- .macro cp_write_mode,p1,p2
-;
- .if $narg==0
- .err
- .print "cp_write_mode: missing parameter(s)"
- .endif
-;
-;
- .if $narg==1
- store 1,CP_WRITE_MODE,%%((&p1)+1),p1
- .exitm
- .endif
-;
-;
- .if $narg==2
- store 1,CP_WRITE_MODE,p2,p1
- .exitm
- .endif
-;
-;
- .if $narg>=3
- .err
- .print "cp_write_mode: too many parameters"
- .endif
-;
- .endm
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_read_dp
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 17, 1988
-;
-; FUNCTION: Transfers the current Am29027 double-precison floating-point
-; result to the Am29000
-;
-; PARAMETERS:
-; reg - the Am29000 g.p. register into which the 32 MSBs of the
-; current Am29027 result are to be written.
-;
-; LSB_reg - the Am29000 g.p. register into which the 32 LSBs of the
-; current Am29027 result are to be written.
-;
-; NO_ERR - indicates that exception reporting is to be suppressed for this
-; transfer.
-;
-; USAGE:
-;
-; cp_read_dp reg [,LSB_reg] [,START]
-;
-; Either of two forms is acceptable:
-;
-; cp_read_dp reg
-; or cp_read_dp reg, LSB_reg
-;
-; If LSB_reg is omitted, the LSBs are written to the next g.p. register.
-;
-; Ex: cp_read_dp lr2 Transfers the 32 MSBs of the current
-; Am29027 result to lr2, and the 32 LSBs
-; to lr3.
-;
-; cp_read_dp lr2,lr5 Transfers the 32 MSBs of the current
-; Am29027 result to lr2, and the 32 LSBs
-; to lr5.
-;
-; Exception reporting can be suppressed by appending NO_ERR to either
-; of the above, e.g.:
-;
-; cp_read_dp lr2,NO_ERR
-; cp_read_dp lr2,lr5,NO_ERR
-;
-;
-;============================================================================
-;
- .macro cp_read_dp,p1,p2,p3
-;
- .if $narg==0
- .err
- .print "cp_read_dp: missing parameter(s)"
- .endif
-;
-;
- .if $narg==1
- load 1,CP_READ_LSBS,%%((&p1)+1),0
- load 1,CP_READ_MSBS,p1,0
- .exitm
- .endif
-;
-;
- .if $narg==2
-;
- .ifeqs "@p2@","NO_ERR"
- load 1,CP_READ_LSBS|CP_NO_ERR,%%((&p1)+1),0
- load 1,CP_READ_MSBS|CP_NO_ERR,p1,0
- .exitm
- .endif
-;
- load 1,CP_READ_LSBS,p2,0
- load 1,CP_READ_MSBS,p1,0
- .exitm
-;
- .endif
-;
-;
- .if $narg==3
-;
- .ifeqs "@p3@","NO_ERR"
- load 1,CP_READ_LSBS|CP_NO_ERR,p2,0
- load 1,CP_READ_MSBS|CP_NO_ERR,p1,0
- .else
- .err
- .print "cp_read_dp: bad parameter list"
- .endif
- .exitm
-;
- .endif
-;
-;
- .if $narg>=4
- .err
- .print "cp_read_dp: too many parameters"
- .endif
-;
- .endm
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_read_sp
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 17, 1988
-;
-; FUNCTION: Transfers the current Am29027 single-precison floating-point
-; result to the Am29000
-;
-; PARAMETERS:
-; reg - the Am29000 g.p. register into which the current Am29027
-; result is to be written.
-;
-; NO_ERR - indicates that exception reporting is to be suppressed for this
-; transfer.
-;
-; USAGE:
-;
-; cp_read_sp reg [,START]
-;
-; Ex: cp_read_sp lr2 Transfers the current Am29027 result
-; to lr2.
-;
-; cp_read_sp lr2,NO_ERR Transfers the current Am29027 result
-; to lr2, and suppresses exception
-; reporting for this transfer.
-;
-;
-;============================================================================
-;
- .macro cp_read_sp,p1,p2
-;
- .if $narg==0
- .err
- .print "cp_read_sp: missing parameter(s)"
- .endif
-;
-;
- .if $narg==1
- load 1,CP_READ_MSBS,p1,0
- .exitm
- .endif
-;
-;
- .if $narg==2
-;
- .ifeqs "@p2@","NO_ERR"
- load 1,CP_READ_MSBS|CP_NO_ERR,p1,0
- .else
- .err
- .print "cp_read_sp: bad parameter list"
- .endif
- .exitm
-;
- .endif
-;
-;
- .if $narg>=3
- .err
- .print "cp_read_sp: too many parameters"
- .endif
-;
- .endm
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_read_int
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 17, 1988
-;
-; FUNCTION: Transfers the current Am29027 integer result to the Am29000
-;
-; PARAMETERS:
-; reg - the Am29000 g.p. register into which the current Am29027
-; result is to be written.
-;
-; NO_ERR - indicates that exception reporting is to be suppressed for this
-; transfer.
-;
-; USAGE:
-;
-; cp_read_int reg [,START]
-;
-; Ex: cp_read_int lr2 Transfers the current Am29027 result
-; to lr2.
-;
-; cp_read_int lr2,NO_ERR Transfers the current Am29027 result
-; to lr2, and suppresses exception
-; reporting for this transfer.
-;
-;
-;============================================================================
-;
- .macro cp_read_int,p1,p2
-;
- .if $narg==0
- .err
- .print "cp_read_int: missing parameter(s)"
- .endif
-;
-;
- .if $narg==1
- load 1,CP_READ_LSBS,p1,0
- nop ; leave a cycle for the MSBs to come out
- .exitm
- .endif
-;
-;
- .if $narg==2
-;
- .ifeqs "@p2@","NO_ERR"
- load 1,CP_READ_LSBS|CP_NO_ERR,p1,0
- nop ; leave a cycle for the MSBs to come out
- .else
- .err
- .print "cp_read_int: bad parameter list"
- .endif
- .exitm
-;
- .endif
-;
-;
- .if $narg>=3
- .err
- .print "cp_read_int: too many parameters"
- .endif
-;
- .endm
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_read_flags
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 17, 1988
-;
-; FUNCTION: Transfers the contents of the Am29027 flag register
-; to the Am29000
-;
-; PARAMETERS:
-; reg - the Am29000 g.p. register into which the current Am29027
-; flag register contents are to be written.
-;
-; NO_ERR - indicates that exception reporting is to be suppressed for this
-; transfer.
-;
-; USAGE:
-;
-; cp_read_flags reg [,START]
-;
-; Ex: cp_read_flags lr2 Transfers the Am29027 flag register
-; contents to lr2.
-;
-; cp_read_flags lr2,NO_ERR Transfers the Am29027 flag register
-; contents to lr2, and suppresses
-; exception reporting for this
-; transfer.
-;
-;
-;============================================================================
-;
- .macro cp_read_flags,p1,p2
-;
- .if $narg==0
- .err
- .print "cp_read_flags: missing parameter(s)"
- .endif
-;
-;
- .if $narg==1
- load 1,CP_READ_FLAGS,p1,0
- .exitm
- .endif
-;
-;
- .if $narg==2
-;
- .ifeqs "@p2@","NO_ERR"
- load 1,CP_READ_FLAGS|CP_NO_ERR,p1,0
- .else
- .err
- .print "cp_read_flags: bad parameter list"
- .endif
- .exitm
-;
- .endif
-;
-;
- .if $narg>=3
- .err
- .print "cp_read_flags: too many parameters"
- .endif
-;
- .endm
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_read_status
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 18, 1988
-;
-; FUNCTION: Transfers the contents of the Am29027 status register
-; to the Am29000
-;
-; PARAMETERS:
-; reg - the Am29000 g.p. register into which the current Am29027
-; status register contents are to be written.
-;
-; NO_ERR - indicates that exception reporting is to be suppressed for this
-; transfer.
-;
-; USAGE:
-;
-; cp_read_status reg [,START]
-;
-; Ex: cp_read_status lr2 Transfers the Am29027 status register
-; contents to lr2.
-;
-; cp_read_status lr2,NO_ERR Transfers the Am29027 status register
-; contents to lr2, and suppresses
-; exception reporting for this
-; transfer.
-;
-;
-;============================================================================
-;
- .macro cp_read_status,p1,p2
-;
- .if $narg==0
- .err
- .print "cp_read_status: missing parameter(s)"
- .endif
-;
-;
- .if $narg==1
- load 1,CP_READ_STATUS,p1,0
- .exitm
- .endif
-;
-;
- .if $narg==2
-;
- .ifeqs "@p2@","NO_ERR"
- load 1,CP_READ_STATUS|CP_NO_ERR,p1,0
- .else
- .err
- .print "cp_read_status: bad parameter list"
- .endif
- .exitm
-;
- .endif
-;
-;
- .if $narg>=3
- .err
- .print "cp_read_status: too many parameters"
- .endif
-;
- .endm
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_read_state_wd
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 18, 1988
-;
-; FUNCTION: Transfers the next Am29027 state word to the Am29000
-;
-; PARAMETERS:
-; reg - the Am29000 g.p. register into which the next Am29027
-; state word contents are to be written.
-;
-; USAGE:
-;
-; cp_read_state_wd reg
-;
-; Ex: cp_read_state_wd lr2 Transfers the next Am29027 state word
-; to lr2.
-;
-;============================================================================
-;
- .macro cp_read_state_wd,p1
-;
- .if $narg==0
- .err
- .print "cp_read_state_wd: missing parameter"
- .endif
-;
-;
- .if $narg==1
- load 1,CP_SAVE_STATE,p1,0
- .exitm
- .endif
-;
-;
- .if $narg>=2
- .err
- .print "cp_read_state_wd: too many parameters"
- .endif
-;
- .endm
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_save_state
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 18, 1988
-;
-; FUNCTION: Transfers the current Am29027 state to the Am29000
-;
-; PARAMETERS:
-; reg - the first of 30 Am29000 g.p. registers in which Am29027 state
-; is saved.
-;
-; USAGE:
-;
-; cp_save_state reg
-;
-; This macro transfers the current Am29027 state to a block of 30 Am29000
-; registers. State is stored in the following order:
-;
-; reg instruction register
-; reg+1 I-Temp
-; reg+2 R MSBs
-; reg+3 R LSBs
-; reg+4 S MSBs
-; reg+5 S LSBs
-; reg+6 R-Temp MSBs
-; reg+7 R-Temp LSBs
-; reg+8 S-Temp MSBs
-; reg+9 S-Temp LSBs
-; reg+10 status
-; reg+11 precision
-; reg+12 RF0 MSBs
-; reg+13 RF0 LSBs
-; . .
-; . .
-; . .
-; reg+26 RF7 MSBs
-; reg+27 RF7 LSBs
-; reg+28 mode MSBs
-; reg+29 mode LSBs
-;
-;
-; Ex: cp_save_state lr2 Transfers the current Am29027 state to
-; the Am29000, starting at lr2.
-;
-; NOTES:
-; 1) This macro stores all 64-bit quantities in "big-endian" order,
-; i.e. MSBs first. For example, the 32 MSBs of register R are
-; stored in reg+2, and the 32 LSBs are stored in reg+3. The Am29027
-; transfers these quantites in "little-endian" order; the macro
-; is responsible for swapping MS and LS words.
-;
-;============================================================================
-;
- .macro cp_save_state,p1
-;
- .if $narg==0
- .err
- .print "cp_save_state: missing parameter"
- .endif
-;
-;
- .if $narg==1
- cp_read_sp p1,NO_ERR
- ;guarantee that we're at beginning of
- ; save state sequence
- cp_read_state_wd %%((&p1)+ 0) ; instruction
- cp_read_state_wd %%((&p1)+ 1) ; I-Temp
- cp_read_state_wd %%((&p1)+ 3) ; R MSBs
- cp_read_state_wd %%((&p1)+ 2) ; R LSBs
- cp_read_state_wd %%((&p1)+ 5) ; S MSBs
- cp_read_state_wd %%((&p1)+ 4) ; S LSBs
- cp_read_state_wd %%((&p1)+ 7) ; R-Temp MSBs
- cp_read_state_wd %%((&p1)+ 6) ; R-Temp LSBs
- cp_read_state_wd %%((&p1)+ 9) ; S-Temp MSBs
- cp_read_state_wd %%((&p1)+ 8) ; S-Temp LSBs
- cp_read_state_wd %%((&p1)+10) ; status
- cp_read_state_wd %%((&p1)+11) ; precision
- cp_read_state_wd %%((&p1)+13) ; RF0 MSBs
- cp_read_state_wd %%((&p1)+12) ; RF0 LSBs
- cp_read_state_wd %%((&p1)+15) ; RF1 MSBs
- cp_read_state_wd %%((&p1)+14) ; RF1 LSBs
- cp_read_state_wd %%((&p1)+17) ; RF2 MSBs
- cp_read_state_wd %%((&p1)+16) ; RF2 LSBs
- cp_read_state_wd %%((&p1)+19) ; RF3 MSBs
- cp_read_state_wd %%((&p1)+18) ; RF3 LSBs
- cp_read_state_wd %%((&p1)+21) ; RF4 MSBs
- cp_read_state_wd %%((&p1)+20) ; RF4 LSBs
- cp_read_state_wd %%((&p1)+23) ; RF5 MSBs
- cp_read_state_wd %%((&p1)+22) ; RF5 LSBs
- cp_read_state_wd %%((&p1)+25) ; RF6 MSBs
- cp_read_state_wd %%((&p1)+24) ; RF6 LSBs
- cp_read_state_wd %%((&p1)+27) ; RF7 MSBs
- cp_read_state_wd %%((&p1)+26) ; RF7 LSBs
- cp_read_state_wd %%((&p1)+29) ; mode MSBs
- cp_read_state_wd %%((&p1)+28) ; mode LSBs
- .exitm
- .endif
-;
-;
- .if $narg>=2
- .err
- .print "cp_save_state: too many parameters"
- .endif
-;
- .endm
-;
-;
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_restore_state
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 18, 1988
-;
-; FUNCTION: Restores Am29027 state
-;
-; PARAMETERS:
-; reg - the first of 30 Am29000 g.p. registers containing Am29027
-; state.
-;
-; temp - a scratch register used by cp_restore_state
-;
-; USAGE:
-;
-; cp_restore_state reg,temp
-;
-; This macro restores Am29027 state by transferring 30 words to the
-; Am29027; these words are taken from a block of Am29000 g.p. registers
-; starting at "reg." The words are assumed to be stored in the following
-; order:
-;
-; reg instruction register
-; reg+1 I-Temp
-; reg+2 R MSBs
-; reg+3 R LSBs
-; reg+4 S MSBs
-; reg+5 S LSBs
-; reg+6 R-Temp MSBs
-; reg+7 R-Temp LSBs
-; reg+8 S-Temp MSBs
-; reg+9 S-Temp LSBs
-; reg+10 status
-; reg+11 precision
-; reg+12 RF0 MSBs
-; reg+13 RF0 LSBs
-; . .
-; . .
-; . .
-; reg+26 RF7 MSBs
-; reg+27 RF7 LSBs
-; reg+28 mode MSBs
-; reg+29 mode LSBs
-;
-;
-; Ex: cp_restore_state lr2,gr70 Restores Am29027 state by
-; transferring a block of 30 words
-; that begins at lr2. Register gr70
-; is used as scratch storage by this
-; macro.
-;
-;
-;============================================================================
-;
- .macro cp_restore_state,p1,p2
-;
- .if $narg<=1
- .err
- .print "cp_restore_state: missing parameter(s)"
- .endif
-;
-;
- .if $narg==2
-
- const p2,0 ;clear the status register
- cp_write_status p2
-;
- cp_write_mode %%((&p1)+28) ;restore the mode register
-;
- const p2,0x80000018 ; restore RF0
- consth p2,0x80000018
- cp_write_inst p2
- cp_write_r %%((&p1)+12),START
-;
- consth p2,0x90000018 ; restore RF1
- cp_write_inst p2
- cp_write_r %%((&p1)+14),START
-;
- consth p2,0xA0000018 ; restore RF2
- cp_write_inst p2
- cp_write_r %%((&p1)+16),START
-;
- consth p2,0xB0000018 ; restore RF3
- cp_write_inst p2
- cp_write_r %%((&p1)+18),START
-;
- consth p2,0xC0000018 ; restore RF4
- cp_write_inst p2
- cp_write_r %%((&p1)+20),START
-;
- consth p2,0xD0000018 ; restore RF5
- cp_write_inst p2
- cp_write_r %%((&p1)+22),START
-;
- consth p2,0xE0000018 ; restore RF6
- cp_write_inst p2
- cp_write_r %%((&p1)+24),START
-;
- consth p2,0xF0000018 ; restore RF7
- cp_write_inst p2
- cp_write_r %%((&p1)+26),START
-;
- cp_read_sp p2 ; do a dummy read, to guarantee that
- ; the last operation is complete
-;
- cp_write_prec %%((&p1)+11) ; restore precision
-;
- cp_write_r %%((&p1)+2) ; restore R
- cp_write_s %%((&p1)+4) ; restore S
- cp_write_inst %%((&p1)+0) ; restore instruction
- cp_advance_temps ; move R,S, and inst. to working registers
-;
- cp_write_r %%((&p1)+6) ; restore R-Temp
- cp_write_s %%((&p1)+8) ; restore S-Temp
- cp_write_inst %%((&p1)+1) ; restore I-Temp
-;
-; restore the status register, retime last operation
-;
- cp_write_status %%((&p1)+10),RESTORE
-;
- .exitm
- .endif
-;
-;
- .if $narg>=3
- .err
- .print "cp_restore_state: too many parameters"
- .endif
-;
- .endm
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_build_inst
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 24, 1988
-; : January 4, 1989 Rich Parker
-;
-; FUNCTION: Builds a 32-bit Am29027 instruction in an Am29000 g.p.
-; register.
-;
-; PARAMETERS:
-; reg - the Am29000 g.p. register into which the instruction word
-; is to be written
-;
-; op_code - mnemonic specifying the operation to be performed
-; (e.g. FADD, P_TIMES_Q)
-;
-; precision - precision specification for destination, source operands:
-; D_S - double-prec. result, single-prec. input(s)
-; D_D - double-prec. result, double-prec. input(s)
-; S_S - single-prec. result, single-prec. input(s)
-; S_D - single-prec. result, double-prec. input(s)
-;
-; dest - destination for the operation result:
-; RF0 - store result in Am29027 register file location RF0
-; RF1 - store result in Am29027 register file location RF1
-; RF2 - store result in Am29027 register file location RF2
-; RF3 - store result in Am29027 register file location RF3
-; RF4 - store result in Am29027 register file location RF4
-; RF5 - store result in Am29027 register file location RF5
-; RF6 - store result in Am29027 register file location RF6
-; RF7 - store result in Am29027 register file location RF7
-; GP - result is to be stored in an Am29000 g.p. register
-; with a read_dp, read_sp, or read_int macro.
-;
-; source1,
-; source2,
-; source3 - source operand specifications:
-; R - take source from Am29027 register R
-; S - take source from Am29027 register S
-; RF0 - take source from Am29027 register file location RF0
-; RF1 - take source from Am29027 register file location RF1
-; RF2 - take source from Am29027 register file location RF2
-; RF3 - take source from Am29027 register file location RF3
-; RF4 - take source from Am29027 register file location RF4
-; RF5 - take source from Am29027 register file location RF5
-; RF6 - take source from Am29027 register file location RF6
-; RF7 - take source from Am29027 register file location RF7
-; 0 - source is 0
-; ONE_HALF - source is constant .5 (f.p. operations only)
-; IMINUS1 - source is constant -1 (integer operations only)
-; 1 - source is constant 1
-; 2 - source is constant 2
-; 3 - source is constant 3
-; PI - source is constant pi (f.p. operations only)
-; IMINUSMAX - source is -(2**63) (integer operations only)
-;
-;
-; USAGE:
-;
-; cp_build_inst reg,op_code,[precision,]dest,source1[,source2][,source3]
-;
-; Op-codes fall into two categories: those that correspond to Am29000
-; floating-point op-codes, and for which the precision is implicit (e.g.
-; FADD, DMUL); and those that correspond to Am29027 base operations
-; (e.g. P_PLUS_T, P_TIMES_Q), and which require an explicit precision
-; specification.
-;
-; Every operation specified must have a destination; if the operation
-; does not write a result to the Am29027 register file, destination GP
-; must be specified. The number of source operands specified must agree
-; with the number of source operands required by the operation specified.
-;
-; Ex:
-;
-; cp_build_inst lr2,FADD,RF7,R,S
-; Builds an instruction word to
-; perform the operation:
-; RF7 <- R + S
-; where R, S, and RF7 are single-
-; precision f.p. operands. The
-; instruction word is placed in lr2.
-;
-; cp_build_inst gr119,DMUL,GP,R,ONE_HALF
-; Builds an instruction word to
-; perform the operation:
-; R * .5
-; where R, .5, and the result
-; are double-precision f.p. operands.
-; The result is not written to the
-; Am29027 register file. The
-; instruction word is written to
-; gr119.
-;
-;
-; cp_build_inst lr3,MIN_P_AND_T,S_D,RF7,R,S
-; Builds an instruction word to
-; perform the operation:
-; RF7 <- smaller of(R,S)
-; where R and S are double-precision
-; f.p. operands, and RF7 is a single-
-; precison f.p. operand. The
-; instruction word is written to
-; lr3.
-;
-;
-; cp_build_inst gr97,I_P_TIMES_Q,S_S,GP,R,2
-; Builds an instruction word to
-; perform the operation:
-; R * 2
-; where R, .5, and the result
-; are single-precision integer operands.
-; The result is not written to the
-; Am29027 register file. The
-; instruction word is written to
-; gr97
-;
-;
-; cp_build_inst lr7,ABS_P,D_D,RF6,S
-; Builds an instruction word to
-; perform the operation:
-; RF6 <- |S|
-; where S and RF7 are double-precision
-; f.p. operands. The instruction
-; word is written to gr7.
-;
-;
-; cp_build_inst gr127,PQ_PLUS_T,D_D,RF6,R,S,RF6
-; Builds an instruction word to
-; perform the operation:
-; RF6 <- (R * S) + RF6
-; where R, S and the result are
-; double-precision f.p. operands.
-; The instruction word is written
-; to gr127.
-;
-;
-;
-;============================================================================
-;
- .macro cp_build_inst,p1,p2,p3,p4,p5,p6,p7
-;
- .if $narg<=3
- .err
- .print "cp_build_inst: missing parameter(s)"
- .exitm
- .endif
-;
-; classify operation type
-;
- .set _cp_op_type,255
-
- _cp_set_op_params p2,FADD,1,5,4,0,5
- _cp_set_op_params p2,DADD,1,5,4,0,5
- _cp_set_op_params p2,FSUB,1,5,4,0,5
- _cp_set_op_params p2,DSUB,1,5,4,0,5
- _cp_set_op_params p2,FMUL,1,5,4,5,0
- _cp_set_op_params p2,DMUL,1,5,4,5,0
- _cp_set_op_params p2,FEQ,1,5,4,0,5
- _cp_set_op_params p2,DEQ,1,5,4,0,5
- _cp_set_op_params p2,FGE,1,5,4,0,5
- _cp_set_op_params p2,DGE,1,5,4,0,5
- _cp_set_op_params p2,FGT,1,5,4,0,5
- _cp_set_op_params p2,DGT,1,5,4,0,5
- _cp_set_op_params p2,CONVERT_I_TO_F,1,4,0,0,4
- _cp_set_op_params p2,CONVERT_I_TO_D,1,4,0,0,4
- _cp_set_op_params p2,CONVERT_F_TO_I,1,4,0,0,4
- _cp_set_op_params p2,CONVERT_D_TO_I,1,4,0,0,4
-;
-; The next two lines were corrected on 1-4-89, Rich Parker
-;
- _cp_set_op_params p2,CONVERT_F_TO_D,1,4,4,0,0
- _cp_set_op_params p2,CONVERT_D_TO_F,1,4,4,0,0
-;
- _cp_set_op_params p2,PASS_P,0,5,5,0,0
- _cp_set_op_params p2,MINUSP,0,5,5,0,0
- _cp_set_op_params p2,ABSP,0,5,5,0,0
- _cp_set_op_params p2,SIGNT_TIMES_ABSP,0,6,6,0,5
- _cp_set_op_params p2,P_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,P_MINUS_T,0,6,5,0,6
- _cp_set_op_params p2,MINUSP_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,MINUSP_MINUS_T,0,6,5,0,6
- _cp_set_op_params p2,ABS_P_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,ABS_P_MINUS_T,0,6,5,0,6
- _cp_set_op_params p2,ABSP_PLUS_ABST,0,6,5,0,6
- _cp_set_op_params p2,ABSP_MINUS_ABST,0,6,5,0,6
- _cp_set_op_params p2,ABS_ABSP_MINUS_ABST,0,6,5,0,6
- _cp_set_op_params p2,P_TIMES_Q,0,6,5,6,0
- _cp_set_op_params p2,MINUSP_TIMES_Q,0,6,5,6,0
- _cp_set_op_params p2,ABS_P_TIMES_Q,0,6,5,6,0
- _cp_set_op_params p2,COMPARE_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,MAX_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,MAX_ABSP_AND_ABST,0,6,5,0,6
- _cp_set_op_params p2,MIN_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,MIN_ABSP_AND_ABST,0,6,5,0,6
- _cp_set_op_params p2,LIMIT_P_TO_MAGT,0,6,5,0,6
- _cp_set_op_params p2,CONVERT_T_TO_INT,0,5,0,0,5
- _cp_set_op_params p2,SCALE_T_TO_INT_BY_Q,0,6,0,6,5
- _cp_set_op_params p2,PQ_PLUS_T,0,7,5,6,7
- _cp_set_op_params p2,MINUSPQ_PLUS_T,0,7,5,6,7
- _cp_set_op_params p2,PQ_MINUS_T,0,7,5,6,7
- _cp_set_op_params p2,MINUSPQ_MINUS_T,0,7,5,6,7
- _cp_set_op_params p2,ABSPQ_PLUS_ABST,0,7,5,6,7
- _cp_set_op_params p2,MINUSABSPQ_PLUS_ABST,0,7,5,6,7
- _cp_set_op_params p2,ABSPQ_MINUS_ABST,0,7,5,6,7
- _cp_set_op_params p2,ROUND_T_TO_INT,0,5,0,0,5
- _cp_set_op_params p2,RECIPROCAL_OF_P,0,5,5,0,0
- _cp_set_op_params p2,CONVERT_T_TO_ALT,0,5,0,0,5
- _cp_set_op_params p2,CONVERT_T_FROM_ALT,0,5,0,0,5
- _cp_set_op_params p2,I_PASS_P,0,5,5,0,0
- _cp_set_op_params p2,I_MINUSP,0,5,5,0,0
- _cp_set_op_params p2,I_ABSP,0,5,5,0,0
- _cp_set_op_params p2,I_SIGNT_TIMES_ABSP,0,6,6,0,5
- _cp_set_op_params p2,I_P_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,I_P_MINUS_T,0,6,5,0,6
- _cp_set_op_params p2,I_MINUSP_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,I_ABS_P_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,I_ABS_P_MINUS_T,0,6,5,0,6
- _cp_set_op_params p2,I_P_TIMES_Q,0,6,5,6,0
- _cp_set_op_params p2,I_COMPARE_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,I_MAX_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,I_MIN_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,I_CONVERT_T_TO_FLOAT,0,5,0,0,5
- _cp_set_op_params p2,I_SCALE_T_TO_FLOAT_BY_Q,0,6,0,6,5
- _cp_set_op_params p2,I_P_OR_T,0,6,5,0,6
- _cp_set_op_params p2,I_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,I_P_XOR_T,0,6,5,0,6
- _cp_set_op_params p2,I_NOT_T,0,5,0,0,5
- _cp_set_op_params p2,I_LSHIFT_P_BY_Q,0,6,5,6,0
- _cp_set_op_params p2,I_ASHIFT_P_BY_Q,0,6,5,6,0
- _cp_set_op_params p2,I_FSHIFT_PT_BY_Q,0,7,5,7,6
- _cp_set_op_params p2,MOVE_P,0,5,5,0,0
-;
-;
-; if we couldn't find the op_code, flag an error
-;
- .if _cp_op_type>=2
- .err
- .print "cp_build_inst: invalid Am29027 instruction mnemonic"
- .exitm
- .endif
-;
-; if number of parameters is incorrect, flag error
-;
- .if $narg!=_cp_no_params
- .err
- .print "cp_build_inst: incorrect number of parameters"
- .exitm
- .endif
-;
-; find correct value for precision field, if appropriate
-;
- .set _cp_prec_field,0 ; ** CORRECTION (1/4/89 ROP)
- .if _cp_op_type==0 ; need to look for precision
- .set _cp_found_precision,0
- .ifeqs "@p3@","D_D"
- .set _cp_prec_field,CP_@p3
- .set _cp_found_precision,1
- .endif
- .ifeqs "@p3@","D_S"
- .set _cp_prec_field,CP_@p3
- .set _cp_found_precision,1
- .endif
- .ifeqs "@p3@","S_D"
- .set _cp_prec_field,CP_@p3
- .set _cp_found_precision,1
- .endif
- .ifeqs "@p3@","S_S"
- .set _cp_prec_field,CP_@p3
- .set _cp_found_precision,1
- .endif
- .if _cp_found_precision==0
- .err
- .print "cp_build_inst: missing precision field"
- .exitm
- .endif
- .endif
-;
-; find value for destination field
-;
- .if _cp_op_type==0
- .set _cp_dest_field_val,CP_DEST_EQ_@p4
- .else
- .set _cp_dest_field_val,CP_DEST_EQ_@p3
- .endif
-;
-; find correct value for p select field
-;
- .if _cp_p_paramno==0
- .set _cp_p_field_val,0x00000000
- .endif
- .if _cp_p_paramno==4
- .set _cp_p_field_val,CP_P_EQ_@p4
- .endif
- .if _cp_p_paramno==5
- .set _cp_p_field_val,CP_P_EQ_@p5
- .endif
- .if _cp_p_paramno==6
- .set _cp_p_field_val,CP_P_EQ_@p6
- .endif
- .if _cp_p_paramno==7
- .set _cp_p_field_val,CP_P_EQ_@p7
- .endif
- .ifeqs "@p2@","I_NOT_T"
- .set _cp_p_field_val,CP_P_EQ_IMINUS1
- .endif
-;
-; find correct value for q select field
-;
- .if _cp_q_paramno==0
- .set _cp_q_field_val,0x00000000
- .endif
- .if _cp_q_paramno==4
- .set _cp_q_field_val,CP_Q_EQ_@p4
- .endif
- .if _cp_q_paramno==5
- .set _cp_q_field_val,CP_Q_EQ_@p5
- .endif
- .if _cp_q_paramno==6
- .set _cp_q_field_val,CP_Q_EQ_@p6
- .endif
- .if _cp_q_paramno==7
- .set _cp_q_field_val,CP_Q_EQ_@p7
- .endif
-;
-; find correct value for t select field
-;
- .if _cp_t_paramno==0
- .set _cp_t_field_val,0x00000000
- .endif
- .if _cp_t_paramno==4
- .set _cp_t_field_val,CP_T_EQ_@p4
- .endif
- .if _cp_t_paramno==5
- .set _cp_t_field_val,CP_T_EQ_@p5
- .endif
- .if _cp_t_paramno==6
- .set _cp_t_field_val,CP_T_EQ_@p6
- .endif
- .if _cp_t_paramno==7
- .set _cp_t_field_val,CP_T_EQ_@p7
- .endif
-;
-;
- .set _cp_inst_word,CP_@p2@|_cp_prec_field|_cp_dest_field_val
- .set _cp_inst_word,_cp_inst_word|_cp_p_field_val
- .set _cp_inst_word,_cp_inst_word|_cp_q_field_val
- .set _cp_inst_word,_cp_inst_word|_cp_t_field_val
-
- const p1,_cp_inst_word
- consth p1,_cp_inst_word
-;
- .endm
-;
-;
-;
- .macro _cp_set_op_params,par1,par2,par3,par4,par5,par6,par7
- .ifeqs "@par1@","@par2@"
- .set _cp_op_type,par3
- .set _cp_no_params,par4
- .set _cp_p_paramno,par5
- .set _cp_q_paramno,par6
- .set _cp_t_paramno,par7
- .endif
- .endm
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_build_inst_h
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 24, 1988
-; : January 4, 1989 Rich Parker
-;
-; FUNCTION: Builds a 16 MSBs of a 32-bit Am29027 instruction in an
-; Am29000 g.p. register.
-;
-; PARAMETERS:
-; reg - the Am29000 g.p. register into which the instruction word
-; is to be written
-;
-; op_code - mnemonic specifying the operation to be performed
-; (e.g. FADD, P_TIMES_Q)
-;
-; precision - precision specification for destination, source operands:
-; D_S - double-prec. result, single-prec. input(s)
-; D_D - double-prec. result, double-prec. input(s)
-; S_S - single-prec. result, single-prec. input(s)
-; S_D - single-prec. result, double-prec. input(s)
-;
-; dest - destination for the operation result:
-; RF0 - store result in Am29027 register file location RF0
-; RF1 - store result in Am29027 register file location RF1
-; RF2 - store result in Am29027 register file location RF2
-; RF3 - store result in Am29027 register file location RF3
-; RF4 - store result in Am29027 register file location RF4
-; RF5 - store result in Am29027 register file location RF5
-; RF6 - store result in Am29027 register file location RF6
-; RF7 - store result in Am29027 register file location RF7
-; GP - result is to be stored in an Am29000 g.p. register
-; with a read_dp, read_sp, or read_int macro.
-;
-; source1,
-; source2,
-; source3 - source operand specifications:
-; R - take source from Am29027 register R
-; S - take source from Am29027 register S
-; RF0 - take source from Am29027 register file location RF0
-; RF1 - take source from Am29027 register file location RF1
-; RF2 - take source from Am29027 register file location RF2
-; RF3 - take source from Am29027 register file location RF3
-; RF4 - take source from Am29027 register file location RF4
-; RF5 - take source from Am29027 register file location RF5
-; RF6 - take source from Am29027 register file location RF6
-; RF7 - take source from Am29027 register file location RF7
-; 0 - source is 0
-; ONE_HALF - source is constant .5 (f.p. operations only)
-; IMINUS1 - source is constant -1 (integer operations only)
-; 1 - source is constant 1
-; 2 - source is constant 2
-; 3 - source is constant 3
-; PI - source is constant pi (f.p. operations only)
-; IMINUSMAX - source is -(2**63) (integer operations only)
-;
-;
-; USAGE:
-;
-; cp_build_inst_h reg,op_code,[precision,]dest,source1[,source2][,source3]
-;
-; This macro is similar to cp_build_inst, but creates only the 16 MSBs
-; of the 32-bit Am29027 instruction word. This macro is useful in cases
-; where the 16 LSBs of instruction word, which specify the operation
-; to be performed, already exist in an Am29000 g.p. register, but where
-; the 16 MSBs, which specify operand sources and destination, must be
-; changed. In such cases, one Am29000 instruction can be saved by using
-; cp_build_inst_h instead of cp_build_inst.
-;
-; Syntax and usage are identical to that of cp_build_inst.
-;
-; NOTE: This macro references macro _cp_set_op_params, which appears
-; in the assembly listing for macro _cp_build_inst.
-;
-;
-;
-;
-;============================================================================
-;
- .macro cp_build_inst_h,p1,p2,p3,p4,p5,p6,p7
-;
- .if $narg<=3
- .err
- .print "cp_build_inst_h: missing parameter(s)"
- .exitm
- .endif
-;
-; classify operation type
-;
- .set _cp_op_type,255
-
- _cp_set_op_params p2,FADD,1,5,4,0,5
- _cp_set_op_params p2,DADD,1,5,4,0,5
- _cp_set_op_params p2,FSUB,1,5,4,0,5
- _cp_set_op_params p2,DSUB,1,5,4,0,5
- _cp_set_op_params p2,FMUL,1,5,4,5,0
- _cp_set_op_params p2,DMUL,1,5,4,5,0
- _cp_set_op_params p2,FEQ,1,5,4,0,5
- _cp_set_op_params p2,DEQ,1,5,4,0,5
- _cp_set_op_params p2,FGE,1,5,4,0,5
- _cp_set_op_params p2,DGE,1,5,4,0,5
- _cp_set_op_params p2,FGT,1,5,4,0,5
- _cp_set_op_params p2,DGT,1,5,4,0,5
- _cp_set_op_params p2,CONVERT_I_TO_F,1,4,0,0,4
- _cp_set_op_params p2,CONVERT_I_TO_D,1,4,0,0,4
- _cp_set_op_params p2,CONVERT_F_TO_I,1,4,0,0,4
- _cp_set_op_params p2,CONVERT_D_TO_I,1,4,0,0,4
-;
-; The next two lines were corrected on 1-4-89, Rich Parker
-;
- _cp_set_op_params p2,CONVERT_F_TO_D,1,4,4,0,0
- _cp_set_op_params p2,CONVERT_D_TO_F,1,4,4,0,0
-;
- _cp_set_op_params p2,PASS_P,0,5,5,0,0
- _cp_set_op_params p2,MINUSP,0,5,5,0,0
- _cp_set_op_params p2,ABSP,0,5,5,0,0
- _cp_set_op_params p2,SIGNT_TIMES_ABSP,0,6,6,0,5
- _cp_set_op_params p2,P_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,P_MINUS_T,0,6,5,0,6
- _cp_set_op_params p2,MINUSP_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,MINUSP_MINUS_T,0,6,5,0,6
- _cp_set_op_params p2,ABS_P_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,ABS_P_MINUS_T,0,6,5,0,6
- _cp_set_op_params p2,ABSP_PLUS_ABST,0,6,5,0,6
- _cp_set_op_params p2,ABSP_MINUS_ABST,0,6,5,0,6
- _cp_set_op_params p2,ABS_ABSP_MINUS_ABST,0,6,5,0,6
- _cp_set_op_params p2,P_TIMES_Q,0,6,5,6,0
- _cp_set_op_params p2,MINUSP_TIMES_Q,0,6,5,6,0
- _cp_set_op_params p2,ABS_P_TIMES_Q,0,6,5,6,0
- _cp_set_op_params p2,COMPARE_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,MAX_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,MAX_ABSP_AND_ABST,0,6,5,0,6
- _cp_set_op_params p2,MIN_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,MIN_ABSP_AND_ABST,0,6,5,0,6
- _cp_set_op_params p2,LIMIT_P_TO_MAGT,0,6,5,0,6
- _cp_set_op_params p2,CONVERT_T_TO_INT,0,5,0,0,5
- _cp_set_op_params p2,SCALE_T_TO_INT_BY_Q,0,6,0,6,5
- _cp_set_op_params p2,PQ_PLUS_T,0,7,5,6,7
- _cp_set_op_params p2,MINUSPQ_PLUS_T,0,7,5,6,7
- _cp_set_op_params p2,PQ_MINUS_T,0,7,5,6,7
- _cp_set_op_params p2,MINUSPQ_MINUS_T,0,7,5,6,7
- _cp_set_op_params p2,ABSPQ_PLUS_ABST,0,7,5,6,7
- _cp_set_op_params p2,MINUSABSPQ_PLUS_ABST,0,7,5,6,7
- _cp_set_op_params p2,ABSPQ_MINUS_ABST,0,7,5,6,7
- _cp_set_op_params p2,ROUND_T_TO_INT,0,5,0,0,5
- _cp_set_op_params p2,RECIPROCAL_OF_P,0,5,5,0,0
- _cp_set_op_params p2,CONVERT_T_TO_ALT,0,5,0,0,5
- _cp_set_op_params p2,CONVERT_T_FROM_ALT,0,5,0,0,5
- _cp_set_op_params p2,I_PASS_P,0,5,5,0,0
- _cp_set_op_params p2,I_MINUSP,0,5,5,0,0
- _cp_set_op_params p2,I_ABSP,0,5,5,0,0
- _cp_set_op_params p2,I_SIGNT_TIMES_ABSP,0,6,6,0,5
- _cp_set_op_params p2,I_P_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,I_P_MINUS_T,0,6,5,0,6
- _cp_set_op_params p2,I_MINUSP_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,I_ABS_P_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,I_ABS_P_MINUS_T,0,6,5,0,6
- _cp_set_op_params p2,I_P_TIMES_Q,0,6,5,6,0
- _cp_set_op_params p2,I_COMPARE_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,I_MAX_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,I_MIN_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,I_CONVERT_T_TO_FLOAT,0,5,0,0,5
- _cp_set_op_params p2,I_SCALE_T_TO_FLOAT_BY_Q,0,6,0,6,5
- _cp_set_op_params p2,I_P_OR_T,0,6,5,0,6
- _cp_set_op_params p2,I_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,I_P_XOR_T,0,6,5,0,6
- _cp_set_op_params p2,I_NOT_T,0,5,0,0,5
- _cp_set_op_params p2,I_LSHIFT_P_BY_Q,0,6,5,6,0
- _cp_set_op_params p2,I_ASHIFT_P_BY_Q,0,6,5,6,0
- _cp_set_op_params p2,I_FSHIFT_PT_BY_Q,0,7,5,7,6
- _cp_set_op_params p2,MOVE_P,0,5,5,0,0
-;
-;
-; if we couldn't find the op_code, flag an error
-;
- .if _cp_op_type>=2
- .err
- .print "cp_build_inst_h: invalid Am29027 instruction mnemonic"
- .exitm
- .endif
-;
-; if number of parameters is incorrect, flag error
-;
- .if $narg!=_cp_no_params
- .err
- .print "cp_build_inst_h: incorrect number of parameters"
- .exitm
- .endif
-;
-; find correct value for precision field, if appropriate
-;
- .set _cp_prec_field,0 ; ** CORRECTION (1-4-89 Rich Parker)
- .if _cp_op_type==0 ; need to look for precision
- .set _cp_found_precision,0
- .ifeqs "@p3@","D_D"
- .set _cp_prec_field,CP_@p3
- .set _cp_found_precision,1
- .endif
- .ifeqs "@p3@","D_S"
- .set _cp_prec_field,CP_@p3
- .set _cp_found_precision,1
- .endif
- .ifeqs "@p3@","S_D"
- .set _cp_prec_field,CP_@p3
- .set _cp_found_precision,1
- .endif
- .ifeqs "@p3@","S_S"
- .set _cp_prec_field,CP_@p3
- .set _cp_found_precision,1
- .endif
- .if _cp_found_precision==0
- .err
- .print "cp_build_inst_h: missing precision field"
- .exitm
- .endif
- .endif
-;
-; find value for destination field
-;
- .if _cp_op_type==0
- .set _cp_dest_field_val,CP_DEST_EQ_@p4
- .else
- .set _cp_dest_field_val,CP_DEST_EQ_@p3
- .endif
-;
-; find correct value for p select field
-;
- .if _cp_p_paramno==0
- .set _cp_p_field_val,0x00000000
- .endif
- .if _cp_p_paramno==4
- .set _cp_p_field_val,CP_P_EQ_@p4
- .endif
- .if _cp_p_paramno==5
- .set _cp_p_field_val,CP_P_EQ_@p5
- .endif
- .if _cp_p_paramno==6
- .set _cp_p_field_val,CP_P_EQ_@p6
- .endif
- .if _cp_p_paramno==7
- .set _cp_p_field_val,CP_P_EQ_@p7
- .endif
- .ifeqs "@p2@","I_NOT_T"
- .set _cp_p_field_val,CP_P_EQ_IMINUS1
- .endif
-;
-; find correct value for q select field
-;
- .if _cp_q_paramno==0
- .set _cp_q_field_val,0x00000000
- .endif
- .if _cp_q_paramno==4
- .set _cp_q_field_val,CP_Q_EQ_@p4
- .endif
- .if _cp_q_paramno==5
- .set _cp_q_field_val,CP_Q_EQ_@p5
- .endif
- .if _cp_q_paramno==6
- .set _cp_q_field_val,CP_Q_EQ_@p6
- .endif
- .if _cp_q_paramno==7
- .set _cp_q_field_val,CP_Q_EQ_@p7
- .endif
-;
-; find correct value for t select field
-;
- .if _cp_t_paramno==0
- .set _cp_t_field_val,0x00000000
- .endif
- .if _cp_t_paramno==4
- .set _cp_t_field_val,CP_T_EQ_@p4
- .endif
- .if _cp_t_paramno==5
- .set _cp_t_field_val,CP_T_EQ_@p5
- .endif
- .if _cp_t_paramno==6
- .set _cp_t_field_val,CP_T_EQ_@p6
- .endif
- .if _cp_t_paramno==7
- .set _cp_t_field_val,CP_T_EQ_@p7
- .endif
-;
-;
- .set _cp_inst_word,CP_@p2@|_cp_prec_field|_cp_dest_field_val
- .set _cp_inst_word,_cp_inst_word|_cp_p_field_val
- .set _cp_inst_word,_cp_inst_word|_cp_q_field_val
- .set _cp_inst_word,_cp_inst_word|_cp_t_field_val
-;
- consth p1,_cp_inst_word
-;
- .endm
-;
-;
-;
-;
-;============================================================================
-; MACRO NAME: cp_build_inst_l
-;
-; WRITTEN BY: Bob Perlman
-;
-; MOST RECENT UPDATE: April 24, 1988
-; : January 4, 1989 Rich Parker
-;
-; FUNCTION: Builds a 16 LSBs of a 32-bit Am29027 instruction in an
-; Am29000 g.p. register; the 16 MSBs of the register are
-; set to 0..
-;
-; PARAMETERS:
-; reg - the Am29000 g.p. register into which the instruction word
-; is to be written
-;
-; op_code - mnemonic specifying the operation to be performed
-; (e.g. FADD, P_TIMES_Q)
-;
-; precision - precision specification for destination, source operands:
-; D_S - double-prec. result, single-prec. input(s)
-; D_D - double-prec. result, double-prec. input(s)
-; S_S - single-prec. result, single-prec. input(s)
-; S_D - single-prec. result, double-prec. input(s)
-;
-; dest - destination for the operation result:
-; RF0 - store result in Am29027 register file location RF0
-; RF1 - store result in Am29027 register file location RF1
-; RF2 - store result in Am29027 register file location RF2
-; RF3 - store result in Am29027 register file location RF3
-; RF4 - store result in Am29027 register file location RF4
-; RF5 - store result in Am29027 register file location RF5
-; RF6 - store result in Am29027 register file location RF6
-; RF7 - store result in Am29027 register file location RF7
-; GP - result is to be stored in an Am29000 g.p. register
-; with a read_dp, read_sp, or read_int macro.
-;
-; source1,
-; source2,
-; source3 - source operand specifications:
-; R - take source from Am29027 register R
-; S - take source from Am29027 register S
-; RF0 - take source from Am29027 register file location RF0
-; RF1 - take source from Am29027 register file location RF1
-; RF2 - take source from Am29027 register file location RF2
-; RF3 - take source from Am29027 register file location RF3
-; RF4 - take source from Am29027 register file location RF4
-; RF5 - take source from Am29027 register file location RF5
-; RF6 - take source from Am29027 register file location RF6
-; RF7 - take source from Am29027 register file location RF7
-; 0 - source is 0
-; ONE_HALF - source is constant .5 (f.p. operations only)
-; IMINUS1 - source is constant -1 (integer operations only)
-; 1 - source is constant 1
-; 2 - source is constant 2
-; 3 - source is constant 3
-; PI - source is constant pi (f.p. operations only)
-; IMINUSMAX - source is -(2**63) (integer operations only)
-;
-;
-; USAGE:
-;
-; cp_build_inst_l reg,op_code,[precision,]dest,source1[,source2][,source3]
-;
-; This macro is similar to cp_build_inst, but creates only the 16 LSBs
-; of the 32-bit Am29027 instruction word; the 16 MSBs of the target
-; register are set to 0. This macro is useful in cases
-; where it is helpful to specify instruction LSBs and MSBs separately,
-; to improve instruction scheduling.
-;
-; Syntax and usage are identical to that of cp_build_inst.
-;
-; NOTE: This macro references macro _cp_set_op_params, which appears
-; in the assembly listing for macro _cp_build_inst.
-;
-;
-;============================================================================
-;
- .macro cp_build_inst_l,p1,p2,p3,p4,p5,p6,p7
-;
- .if $narg<=3
- .err
- .print "cp_build_inst_h: missing parameter(s)"
- .exitm
- .endif
-;
-; classify operation type
-;
- .set _cp_op_type,255
-
- _cp_set_op_params p2,FADD,1,5,4,0,5
- _cp_set_op_params p2,DADD,1,5,4,0,5
- _cp_set_op_params p2,FSUB,1,5,4,0,5
- _cp_set_op_params p2,DSUB,1,5,4,0,5
- _cp_set_op_params p2,FMUL,1,5,4,5,0
- _cp_set_op_params p2,DMUL,1,5,4,5,0
- _cp_set_op_params p2,FEQ,1,5,4,0,5
- _cp_set_op_params p2,DEQ,1,5,4,0,5
- _cp_set_op_params p2,FGE,1,5,4,0,5
- _cp_set_op_params p2,DGE,1,5,4,0,5
- _cp_set_op_params p2,FGT,1,5,4,0,5
- _cp_set_op_params p2,DGT,1,5,4,0,5
- _cp_set_op_params p2,CONVERT_I_TO_F,1,4,0,0,4
- _cp_set_op_params p2,CONVERT_I_TO_D,1,4,0,0,4
- _cp_set_op_params p2,CONVERT_F_TO_I,1,4,0,0,4
- _cp_set_op_params p2,CONVERT_D_TO_I,1,4,0,0,4
-;
-; The next two lines were corrected on 1-4-89, Rich Parker
-;
- _cp_set_op_params p2,CONVERT_F_TO_D,1,4,4,0,0
- _cp_set_op_params p2,CONVERT_D_TO_F,1,4,4,0,0
-;
- _cp_set_op_params p2,PASS_P,0,5,5,0,0
- _cp_set_op_params p2,MINUSP,0,5,5,0,0
- _cp_set_op_params p2,ABSP,0,5,5,0,0
- _cp_set_op_params p2,SIGNT_TIMES_ABSP,0,6,6,0,5
- _cp_set_op_params p2,P_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,P_MINUS_T,0,6,5,0,6
- _cp_set_op_params p2,MINUSP_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,MINUSP_MINUS_T,0,6,5,0,6
- _cp_set_op_params p2,ABS_P_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,ABS_P_MINUS_T,0,6,5,0,6
- _cp_set_op_params p2,ABSP_PLUS_ABST,0,6,5,0,6
- _cp_set_op_params p2,ABSP_MINUS_ABST,0,6,5,0,6
- _cp_set_op_params p2,ABS_ABSP_MINUS_ABST,0,6,5,0,6
- _cp_set_op_params p2,P_TIMES_Q,0,6,5,6,0
- _cp_set_op_params p2,MINUSP_TIMES_Q,0,6,5,6,0
- _cp_set_op_params p2,ABS_P_TIMES_Q,0,6,5,6,0
- _cp_set_op_params p2,COMPARE_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,MAX_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,MAX_ABSP_AND_ABST,0,6,5,0,6
- _cp_set_op_params p2,MIN_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,MIN_ABSP_AND_ABST,0,6,5,0,6
- _cp_set_op_params p2,LIMIT_P_TO_MAGT,0,6,5,0,6
- _cp_set_op_params p2,CONVERT_T_TO_INT,0,5,0,0,5
- _cp_set_op_params p2,SCALE_T_TO_INT_BY_Q,0,6,0,6,5
- _cp_set_op_params p2,PQ_PLUS_T,0,7,5,6,7
- _cp_set_op_params p2,MINUSPQ_PLUS_T,0,7,5,6,7
- _cp_set_op_params p2,PQ_MINUS_T,0,7,5,6,7
- _cp_set_op_params p2,MINUSPQ_MINUS_T,0,7,5,6,7
- _cp_set_op_params p2,ABSPQ_PLUS_ABST,0,7,5,6,7
- _cp_set_op_params p2,MINUSABSPQ_PLUS_ABST,0,7,5,6,7
- _cp_set_op_params p2,ABSPQ_MINUS_ABST,0,7,5,6,7
- _cp_set_op_params p2,ROUND_T_TO_INT,0,5,0,0,5
- _cp_set_op_params p2,RECIPROCAL_OF_P,0,5,5,0,0
- _cp_set_op_params p2,CONVERT_T_TO_ALT,0,5,0,0,5
- _cp_set_op_params p2,CONVERT_T_FROM_ALT,0,5,0,0,5
- _cp_set_op_params p2,I_PASS_P,0,5,5,0,0
- _cp_set_op_params p2,I_MINUSP,0,5,5,0,0
- _cp_set_op_params p2,I_ABSP,0,5,5,0,0
- _cp_set_op_params p2,I_SIGNT_TIMES_ABSP,0,6,6,0,5
- _cp_set_op_params p2,I_P_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,I_P_MINUS_T,0,6,5,0,6
- _cp_set_op_params p2,I_MINUSP_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,I_ABS_P_PLUS_T,0,6,5,0,6
- _cp_set_op_params p2,I_ABS_P_MINUS_T,0,6,5,0,6
- _cp_set_op_params p2,I_P_TIMES_Q,0,6,5,6,0
- _cp_set_op_params p2,I_COMPARE_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,I_MAX_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,I_MIN_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,I_CONVERT_T_TO_FLOAT,0,5,0,0,5
- _cp_set_op_params p2,I_SCALE_T_TO_FLOAT_BY_Q,0,6,0,6,5
- _cp_set_op_params p2,I_P_OR_T,0,6,5,0,6
- _cp_set_op_params p2,I_P_AND_T,0,6,5,0,6
- _cp_set_op_params p2,I_P_XOR_T,0,6,5,0,6
- _cp_set_op_params p2,I_NOT_T,0,5,0,0,5
- _cp_set_op_params p2,I_LSHIFT_P_BY_Q,0,6,5,6,0
- _cp_set_op_params p2,I_ASHIFT_P_BY_Q,0,6,5,6,0
- _cp_set_op_params p2,I_FSHIFT_PT_BY_Q,0,7,5,7,6
- _cp_set_op_params p2,MOVE_P,0,5,5,0,0
-;
-;
-; if we couldn't find the op_code, flag an error
-;
- .if _cp_op_type>=2
- .err
- .print "cp_build_inst_h: invalid Am29027 instruction mnemonic"
- .exitm
- .endif
-;
-; if number of parameters is incorrect, flag error
-;
- .if $narg!=_cp_no_params
- .err
- .print "cp_build_inst_h: incorrect number of parameters"
- .exitm
- .endif
-;
-; find correct value for precision field, if appropriate
-;
- .set _cp_prec_field,0 ; CORRECTION (1-4-89 Rich Parker)
- .if _cp_op_type==0 ; need to look for precision
- .set _cp_found_precision,0
- .ifeqs "@p3@","D_D"
- .set _cp_prec_field,CP_@p3
- .set _cp_found_precision,1
- .endif
- .ifeqs "@p3@","D_S"
- .set _cp_prec_field,CP_@p3
- .set _cp_found_precision,1
- .endif
- .ifeqs "@p3@","S_D"
- .set _cp_prec_field,CP_@p3
- .set _cp_found_precision,1
- .endif
- .ifeqs "@p3@","S_S"
- .set _cp_prec_field,CP_@p3
- .set _cp_found_precision,1
- .endif
- .if _cp_found_precision==0
- .err
- .print "cp_build_inst_h: missing precision field"
- .exitm
- .endif
- .endif
-;
-; find value for destination field
-;
- .if _cp_op_type==0
- .set _cp_dest_field_val,CP_DEST_EQ_@p4
- .else
- .set _cp_dest_field_val,CP_DEST_EQ_@p3
- .endif
-;
-; find correct value for p select field
-;
- .if _cp_p_paramno==0
- .set _cp_p_field_val,0x00000000
- .endif
- .if _cp_p_paramno==4
- .set _cp_p_field_val,CP_P_EQ_@p4
- .endif
- .if _cp_p_paramno==5
- .set _cp_p_field_val,CP_P_EQ_@p5
- .endif
- .if _cp_p_paramno==6
- .set _cp_p_field_val,CP_P_EQ_@p6
- .endif
- .if _cp_p_paramno==7
- .set _cp_p_field_val,CP_P_EQ_@p7
- .endif
- .ifeqs "@p2@","I_NOT_T"
- .set _cp_p_field_val,CP_P_EQ_IMINUS1
- .endif
-;
-; find correct value for q select field
-;
- .if _cp_q_paramno==0
- .set _cp_q_field_val,0x00000000
- .endif
- .if _cp_q_paramno==4
- .set _cp_q_field_val,CP_Q_EQ_@p4
- .endif
- .if _cp_q_paramno==5
- .set _cp_q_field_val,CP_Q_EQ_@p5
- .endif
- .if _cp_q_paramno==6
- .set _cp_q_field_val,CP_Q_EQ_@p6
- .endif
- .if _cp_q_paramno==7
- .set _cp_q_field_val,CP_Q_EQ_@p7
- .endif
-;
-; find correct value for t select field
-;
- .if _cp_t_paramno==0
- .set _cp_t_field_val,0x00000000
- .endif
- .if _cp_t_paramno==4
- .set _cp_t_field_val,CP_T_EQ_@p4
- .endif
- .if _cp_t_paramno==5
- .set _cp_t_field_val,CP_T_EQ_@p5
- .endif
- .if _cp_t_paramno==6
- .set _cp_t_field_val,CP_T_EQ_@p6
- .endif
- .if _cp_t_paramno==7
- .set _cp_t_field_val,CP_T_EQ_@p7
- .endif
-;
-;
- .set _cp_inst_word,CP_@p2@|_cp_prec_field|_cp_dest_field_val
- .set _cp_inst_word,_cp_inst_word|_cp_p_field_val
- .set _cp_inst_word,_cp_inst_word|_cp_q_field_val
- .set _cp_inst_word,_cp_inst_word|_cp_t_field_val
-;
- const p1,_cp_inst_word
-;
- .endm
-;
-; end of file fpsymbol.h
diff --git a/newlib/libc/sys/a29khif/sys/intrinsi.h b/newlib/libc/sys/a29khif/sys/intrinsi.h
deleted file mode 100644
index 1ae3a8b5c..000000000
--- a/newlib/libc/sys/a29khif/sys/intrinsi.h
+++ /dev/null
@@ -1,457 +0,0 @@
-; @(#)intrinsi.h 1.4 90/10/14 20:56:06, Copyright 1988, 1989, 1990 AMD
-; start of file intrinsi.h
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;
-;
- .title "QTC Intrinsics Header file"
-;
-; Floating point library package for AMD 29000 family
-;
-; Copyright 1988 Advanced Micro Devices, Inc.
-;
-; All rights reserved
-;
-; Developed for AMD by Quantitative Technology Corporation
-; 8700 SW Creekside Place Suite D
-; Beaverton OR 97005
-; (503) 626-3081
-;
-; Version information :
-;
-; Revision 1.6 89/06/29 16:08:51 jimh
-; Fixed two bugs regarding compatiblility with the fpsymbol file. The
-; definitions of ROUND_TO_PLUS/MINUS_INFINITY were reversed. Set_Rounding
-; _Mode was fixed to set the local copy (29000 resident) of rounding mode
-; in 29027 mode.
-;
-;
-; Revision 1.5 89/04/17 11:20:49 jim
-; replaced emfsr and emtsr macro calls with mfsr and mtsr instructions.
-;
-; Revision 1.4 89/02/24 15:18:04 jimh
-; Added the definitions of FP_ENV_MODE_1_DEFAULT, FP_ENV_MODE_2_DEFAULT,
-; FP_FLAGS_DEFAULT.
-; Added macro clear_Flags.
-; Changed the operation of set_Invalid_Op_flag, set_Reserved_Op_flag.
-;
-; Revision 1.3 89/02/01 18:30:12 jimh
-; Changed the way set_Rounding_Mode, extract_Rounding_Mode, set_Invalid_Op_flag
-; and set_Reserved_Op_flag are done. Changed save_FP_regs.
-;
-; Revision 1.2 89/01/31 10:01:54 jimh
-; Updated to the new standard. This includes moving in register
-; definitions, changing old symbols to reflect those in fpsymbol.h,
-; and changing the include file to smartmac.h.
-;
-;
- .include "../traps/fpenv.h" ; RPD 8/21/89
- .include "sys/smartmac.h"
-
- .equ DOUBLE_EXP_WIDTH, 11
- .equ DOUBLE_EXTENDED_WIDTH, 56
-
- .equ SIGNED, 0
- .equ UNSIGNED, 1
-
- .equ ROUND_TO_NEAREST, 0
- .equ ROUND_TO_MINUS_INFINITY, 1
- .equ ROUND_TO_PLUS_INFINITY, 2
- .equ ROUND_TO_ZERO, 3
- .equ ROUNDING_MODE_POSITION, 14
-
- .equ FORMAT_INTEGER, 0
- .equ FORMAT_SINGLE, 1
- .equ FORMAT_DOUBLE, 2
-
- .equ DOUBLE_MSB_MASK,0x00080000
-;
-; The following are definitions used in the smart macro package, defining
-; the 29000 shadow registers for the floating-point register file, and
-; some temporary registers used during the library routines
-;
- .reg FP0, gr96
- .reg FP1, gr98
- .reg FP2, gr100
- .reg FP3, gr102
- .reg FP4, gr104
- .reg FP5, gr106
- .reg FP6, gr108
- .reg FP7, gr110
-;
-; GR60 through GR6F are used to return the value of a function
-;
- .reg rtn0, gr96
- .reg rtn1, gr97
- .reg rtn2, gr98
- .reg rtn3, gr99
- .reg rtn4, gr100
- .reg rtn5, gr101
- .reg rtn6, gr102
- .reg rtn7, gr103
- .reg rtn8, gr104
- .reg rtn9, gr105
- .reg rtn10, gr106
- .reg rtn11, gr107
- .reg rtn12, gr108
- .reg rtn13, gr109
- .reg rtn14, gr110
- .reg rtn15, gr111
-;
-; GR74..GR78 (116-120) - temporaries
-;
- .reg t0, gr116
- .reg t1, gr117
- .reg t2, gr118
- .reg t3, gr119
- .reg t4, gr120
-;
-; FP_ENV_MODE_1 and FP_ENV_MODE_2 are based on 64-bit 29027 Mode register,
-; and thus the fpsymbol.h CP_ constants may be used directly.
-;
-; FP_ENV_MODE_1 (Bits 0-31)
-;
-; 0-3 - floating-point format select, always 0
-; 4 - Saturate enable
-; 5 - IEEE Affine/Projective mode (ignored by traps code)
-; 6 - IEEE Trap enable
-; 7 - IEEE Sudden underflow / FP Environment Fast Float Select
-; 8-10 - ignored
-; 11 - Integer multiplication signed/unsigned select
-; 12-13 - Integer multiplication format adjust
-; 14-16 - Rounding mode select
-; 17-19 - ignored
-; 20 - Pipeline mode select
-; 21 - ignored
-; 22 - Invalid operation mask bit
-; 23 - Reserved operand mask bit
-; 24 - Overflow mask bit
-; 25 - Underflow mask bit
-; 26 - Inexact result mask bit
-; 27 - Zero mask bit
-; 28-31 - ignored
-;
-; FP_ENV_MODE_2 (Bits 32-63) [Hardware configuration register, rarely modified]
-;
-; 32-35 - Pipeline timer count
-; 36-39 - Timer count for multiply-accumulate operation
-; 40-43 - Timer count for save state transaction request
-; 44-63 - ignored
-;
-; FP_ENV_MODE_1 definitions
-;
- .set FP_ENV_MODE_1_DEFAULT, CP_PFF_EQ_IEEE
- .set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_AFF_EQ_IEEE
- .set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_AFFINE_MODE
- .set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_IEEE_TRAPS_DISABLED
- .set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_IEEE_GRADUAL_UFLOW_MODE
- .set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_UNSIGNED_INT_MPY_MODE
- .set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_MF_EQ_LSBS
- .set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_RMS_EQ_NEAREST
- .set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_FLOWTHROUGH_MODE
- .set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_INVALID_OP_EXCP_MASK
- .set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_RESERVED_OP_EXCP_MASK
- .set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_OVERFLOW_EXCP_MASK
- .set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_UNDERFLOW_EXCP_MASK
- .set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_INEXACT_EXCP_MASK
- .set FP_ENV_MODE_1_DEFAULT,FP_ENV_MODE_1_DEFAULT|CP_ZERO_EXCP_MASK
-;
-; FP_ENV_MODE_2 definitions
-;
- .set FP_ENV_MODE_2_DEFAULT, CP_PLTC_EQ_6
- .set FP_ENV_MODE_2_DEFAULT,FP_ENV_MODE_2_DEFAULT|CP_MATC_EQ_9
- .set FP_ENV_MODE_2_DEFAULT,FP_ENV_MODE_2_DEFAULT|CP_MVTC_EQ_3
- .set FP_ENV_MODE_2_DEFAULT,FP_ENV_MODE_2_DEFAULT|CP_NORMAL_DRDY_MODE
- .set FP_ENV_MODE_2_DEFAULT,FP_ENV_MODE_2_DEFAULT|CP_HALT_ON_ERROR_DISABLED
- .set FP_ENV_MODE_2_DEFAULT,FP_ENV_MODE_2_DEFAULT|CP_EXCP_DISABLED
-;
-; FP_FLAGS_DEFAULT definitions
-;
- .equ FP_FLAGS_DEFAULT, 0x00000000 ; No flags set
-;
-; The following macros are used by transcendentals to access the environment.
-;
-; MACRO NAME: clear_Flags
-;
-; FUNCTION: to clear the flags on entry to a transcendental routine.
-;
-; INPUT PARAMETERS: reg - temporary working register
-; reg2 - temporary working register
-;
- .macro clear_Flags,reg,reg2
- .endm
-;
-; MACRO NAME: set_Invalid_Op_flag
-;
-; FUNCTION: to set the Invalid operation flag in the floating-point status
-; register
-;
-; INPUT PARAMETERS: reg - temporary working register
-; reg2 - 2nd temporary working register
-;
- .macro set_Invalid_Op_flag,reg,reg2
- .endm
-
-;
-; MACRO NAME: set_Reserved_Op_flag
-;
-; FUNCTION: to set the Reserved Op flag in the floating-point status register
-;
-; INPUT PARAMETERS: reg - temporary working register
-; reg2 - 2nd temporary working register
-;
- .macro set_Reserved_Op_flag,reg,reg2
- .endm
-
-;
-; MACRO NAME: extract_Rounding_Mode
-;
-; FUNCTION: to extract the Rounding Mode portion of the floating-point
-; invironment mode register, shift the value to the range of
-; 0-7, and leave it in a register
-;
-; INPUT PARAMETERS: reg - destination for the mode
-;
- .macro extract_Rounding_Mode,reg
- .ifdef _29027_MODE
- .extern __29027Mode
- const reg,__29027Mode
- consth reg,__29027Mode
- load 0,0,reg,reg
- srl reg,reg,CP_RMS_POSITION
- and reg,reg,CP_RMS_MASK >> CP_RMS_POSITION
- .else
- mfsr reg,FPE
- and reg,reg,FPE_FPRND_MASK
- srl reg,reg,FPE_FPRND_POSITION
- .endif
- .endm
-
-;
-; MACRO NAME: set_Rounding_Mode
-;
-; FUNCTION: to set the 29027 Rounding Mode to a given value
-;
-; INPUT PARAMETERS: reg - working register
-; reg2 - second working register
-; rounding_mode - value of the rounding mode
-; 0 - round to nearest
-; 1 - round to minus infinity
-; 2 - round to plus infinity
-; 3 - round to zero
-;
-; NOTES: rounding_mode value is not checked
-; 29027 Mode register is NOT written by this macro
-;
- .macro set_Rounding_Mode,reg,reg2,mode
- .ifdef _29027_MODE
- .extern __29027Mode
- const reg2,__29027Mode
- consth reg2,__29027Mode
- load 0,0,reg,reg2
- const reg2,CP_RMS_MASK
- consth reg2,CP_RMS_MASK
- andn reg,reg,reg2
- const reg2,mode
- sll reg2,reg2,CP_RMS_POSITION
- or reg,reg,reg2
- const reg2,__29027Mode
- consth reg2,__29027Mode
- store 0,0,reg,reg2
- add reg2,reg2,4
- load 0,0,reg2,reg2
- cp_write_mode reg2,reg
- .else
- mfsr reg,FPE
- andn reg,reg,FPE_FPRND_MASK
- const reg2,mode
- sll reg2,reg2,FPE_FPRND_POSITION
- or reg,reg,reg2
- mtsr FPE,reg
- .endif
- .endm
-;
-;
-; NOTE: The 29027 is the floating point coprocessor for the 29000.
-; It contains 8 floating point registers FP0 to FP7. Three of
-; these, FP0, FP1, and FP2, are currently designated as scratch,
-; that is, they will not be preserved across calls. The other
-; five contain values that must be saved whenever they are used
-; in code, and restored before the exit of the routine. The 29027
-; registers are tagged with a single bit indicating the precision
-; of the current value. When numbers are read into the 29027,
-; they are always stored in double precision, so that single
-; precision values are converted on input. Only the MOVE instruction
-; fails to do this automatic widening. If the result from calculations
-; in the 29027 ALU (determined by the result precision bit in the
-; instruction word) is to be single precision and the result saved in
-; an FP reg, the result precision bit from the instruction gets copied
-; into the precision bit for the register. If a single precision
-; SNaN is saved from the 29027, it will be converted to a double
-; precision QNaN. Along the way it will cause an unmasked exception
-; when read off the chip and cause changes to the status register.
-; So the preservation routine will need to modify the mode register to
-; mask off the exceptions, save the state of the status register before
-; saving the FP regs, and restore the status and mode registers to their
-; original settings when the save is complete.
-;
-; REFERENCE: The instructions to drive the Am29027 are described in the
-; Am29027 manual beginning on page 17. Table 4 describes the
-; operation codes and table 3 the multiplexer codes. Communication
-; with the 29000 is described on pages 11 and 12 of the Am29027
-; manual and chapters 6 and 8 of the Am29000 User's Manual
-;
-; MACRO NAME: save_FP_regs
-;
-; FUNCTION: to save the AMD 29027 floating point register values in the
-; 29000 general purpose registers
-;
-; INPUT PARAMETERS: fp_register, one of the 29027 registers FP3 - FP7
-;
-; REGISTER USAGE: the following registers are used in save_FP_regs
-;
-; rtn0 this register is used in setting the mode and status registers
-; rtn1 this register is used in setting the mode and status registers
-; rtn6 this register is used to store the MSW when FP3 is saved
-; rtn7 this register is used to store the LSW when FP3 is saved
-; rtn8 this register is used to store the MSW when FP4 is saved
-; rtn9 this register is used to store the LSW when FP4 is saved
-;
-
- .macro save_FP_regs,fp_register
- .ifdef _29027_MODE
- ;
- ; For 29027 mode, expand the macro into 29027 code to preserve FP register
- ;
- .ifeqs "@fp_register@","FP3"
- const rtn6,__29027Mode ; Load the address of FP mode
- consth rtn6,__29027Mode
- load 0,0,rtn0,rtn6 ; Load MSW of FP mode into rtn0
- add rtn6,rtn6,4 ; Increment rtn6 + 4
- load 0,0,rtn1,rtn6 ; Load LSW of FP mode into rtn1
- const rtn6,CP_RESERVED_OP_EXCP_MASK ; Load mask to disable exception
- consth rtn6,CP_RESERVED_OP_EXCP_MASK
- or rtn0,rtn0,rtn6 ; OR in disable of exception mask
- cp_write_mode rtn1, rtn0 ; Reset mode w/exception disabled
- cp_read_status rtn0 ; Read status and save in rtn1
- const rtn6,CP_PASS_P | CP_P_EQ_RF3 ; Instruction is PASS_P from RF3
- consth rtn6,CP_PASS_P | CP_P_EQ_RF3
- ; Load & execute the instruction
- ;
- store 1,CP_WRITE_INST | CP_START,rtn6,rtn6
- load 1,CP_READ_MSBS,rtn6,rtn6 ; Read the MSW to first register
- load 1,CP_READ_LSBS,rtn7,rtn7 ; Read the LSW to second register
- cp_write_status rtn0 ; Restore the original status
- const rtn1,__29027Mode ; Load the address of FP mode
- consth rtn1,__29027Mode
- load 0,0,rtn0,rtn1 ; Load MSW of FP mode into rtn0
- add rtn1,rtn1,4 ; Increment rtn6 to __29027Mode+4
- load 0,0,rtn1,rtn1 ; Load LSW of FP mode into rtn1
- cp_write_mode rtn1, rtn0 ; Restore the original write mode
- .endif
- .ifeqs "@fp_register@","FP4"
- const rtn8,__29027Mode ; Load the address of FP mode
- consth rtn8,__29027Mode
- load 0,0,rtn0,rtn8 ; Load MSW of FP mode into rtn0
- add rtn8,rtn8,4 ; Increment rtn6 + 4
- load 0,0,rtn1,rtn8 ; Load LSW of FP mode into rtn1
- const rtn8,CP_RESERVED_OP_EXCP_MASK ; Load mask to disable exception
- consth rtn8,CP_RESERVED_OP_EXCP_MASK
- or rtn0,rtn0,rtn8 ; OR in disable of exception mask
- cp_write_mode rtn1, rtn0 ; Reset mode w/exception disabled
- cp_read_status rtn0 ; Read status and save in rtn1
- const rtn8,CP_PASS_P | CP_P_EQ_RF4 ; Instruction is PASS_P from RF4
- consth rtn8,CP_PASS_P | CP_P_EQ_RF4
- ; Load & execute the instruction
- ;
- store 1,CP_WRITE_INST | CP_START,rtn8,rtn8
- load 1,CP_READ_MSBS,rtn8,rtn8 ; Read the MSW to first register
- load 1,CP_READ_LSBS,rtn9,rtn9 ; Read the LSW to second register
- cp_write_status rtn0 ; Restore the original status
- const rtn1,__29027Mode ; Load the address of FP mode
- consth rtn1,__29027Mode
- load 0,0,rtn0,rtn1 ; Load MSW of FP mode into rtn0
- add rtn1,rtn1,4 ; Increment rtn6 + 4
- load 0,0,rtn1,rtn1 ; Load LSW of FP mode into rtn1
- cp_write_mode rtn1, rtn0 ; Restore the original write mode
- .endif
- .else
- ;
- ; For 29000 mode, do nothing
- ;
- .endif
- .endm
-;
-; MACRO NAME: restore_FP_regs
-;
-; FUNCTION: to restore the AMD 29027 floating point register values from the
-; 29000 general purpose registers
-;
-; INPUT PARAMETERS: fp_register, one of the 29027 registers FP3 - FP7
-;
-; REGISTER USAGE: the following registers are used in restore_FP_regs
-;
-; rtn0 this register is used in setting the mode and status registers
-; rtn6 the value in this register is stored as the MSW of FP3
-; rtn7 the value in this register is stored as the LSW of FP3
-; rtn8 the value in this register is stored as the MSW of FP4
-; rtn9 the value in this register is stored as the LSW of FP4
-;
- .macro restore_FP_regs,fp_register
- .ifdef _29027_MODE
- ;
- ; For 29027 mode, move data from return registers to the correct FP register
- ;
- .ifeqs "@fp_register@","FP3"
- store 1,CP_WRITE_R ,rtn6,rtn7 ; Move the data to the R register
- ; Then create the instruction
- ;
- const rtn0,CP_MOVE_P|CP_D_D|CP_P_EQ_R|CP_DEST_EQ_RF3
- consth rtn0,CP_MOVE_P|CP_D_D|CP_P_EQ_R|CP_DEST_EQ_RF3
- ;
- ; Perform the write
- ;
- store 1,(CP_WRITE_INST | CP_START),rtn0,0
- .endif
- .ifeqs "@fp_register@","FP4"
- store 1,CP_WRITE_R ,rtn8,rtn9 ; Move the data to the R register
- ; Then create the instruction
- ;
- const rtn0,CP_MOVE_P|CP_D_D|CP_P_EQ_R|CP_DEST_EQ_RF4
- consth rtn0,CP_MOVE_P|CP_D_D|CP_P_EQ_R|CP_DEST_EQ_RF4
- ;
- ; Perform the write
- ;
- store 1,(CP_WRITE_INST | CP_START),rtn0,0
- .endif
- .else
- ;
- ; For 29000 mode, do nothing.
- ;
- .endif
- .endm
-;
-; end of file intrinsi.h
diff --git a/newlib/libc/sys/a29khif/sys/macros.h b/newlib/libc/sys/a29khif/sys/macros.h
deleted file mode 100644
index 3c832f033..000000000
--- a/newlib/libc/sys/a29khif/sys/macros.h
+++ /dev/null
@@ -1,37 +0,0 @@
-; @(#)macros.h 1.3 90/10/14 20:56:10, Copyright 1989, 1990 AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1989, 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;
-; macros.h
-; Short macros of general utility
-
- .macro mov, dest,src
- add dest, src, 0
- .endm
-
- .macro not, dest,src
- nand dest, src, src
- .endm
diff --git a/newlib/libc/sys/a29khif/sys/proreg.h b/newlib/libc/sys/a29khif/sys/proreg.h
deleted file mode 100644
index ca16b708c..000000000
--- a/newlib/libc/sys/a29khif/sys/proreg.h
+++ /dev/null
@@ -1,60 +0,0 @@
-; @(#)proreg.h 1.3 90/10/14 20:56:11, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1989, 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;
-; proreg.h
-;
- ; 16 function value return regs
- .reg v0, gr96
- .reg v1, gr97
- .reg v2, gr98
- .reg v3, gr99
- .reg v4, gr100
- .reg v5, gr101
- .reg v6, gr102
- .reg v7, gr103
- .reg v8, gr104
- .reg v9, gr105
- .reg v10, gr106
- .reg v11, gr107
- .reg v12, gr108
- .reg v13, gr109
- .reg v14, gr110
- .reg v15, gr111
-;
- .reg rsp, gr1 ; Register Stack Pointer
- .reg ret, gr96 ; First word of return value
- .reg rp0, gr112 ; Reserved for Programmer, #0
- .reg rp1, gr113 ; Reserved for Programmer, #1
- .reg rp2, gr114 ; Reserved for Programmer, #2
- .reg rp3, gr115 ; Reserved for Programmer, #3
- .reg tav, gr121 ; Temporary, Argument for Trap Handlers
- .reg tpc, gr122 ; Temporary, Return PC for Trap Handlers
- .reg lrp, gr123 ; Large Return Pointer
- .reg slp, gr124 ; Static Link Pointer
- .reg msp, gr125 ; Memory Stack Pointer
- .reg rab, gr126 ; Register Allocate Bound
- .reg rfb, gr127 ; Register Free Bound
diff --git a/newlib/libc/sys/a29khif/sys/romdcl.h b/newlib/libc/sys/a29khif/sys/romdcl.h
deleted file mode 100644
index d52ca0598..000000000
--- a/newlib/libc/sys/a29khif/sys/romdcl.h
+++ /dev/null
@@ -1,392 +0,0 @@
-; @(#)romdcl.h 1.4 90/10/14 20:56:12, Copyright 1988, 1989, 1990 AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- .sbttl "Register, Constant and Macro Declarations - v1.4"
-
-; Copyright 1988, Advanced Micro Devices
-; Written by Gibbons and Associates, Inc.
-
-;v1.4 JG correct FUNCTION macro - fault in register padding to even
-
-;-----------------------------------------------------------------------
-;Global registers
-;-----------------------------------------------------------------------
- .reg rsp, gr1 ;local reg. var. stack pointer
-
- .equ SYS_TEMP, 64 ;system temp registers
-
- .reg st0, gr64
- .reg st1, gr65
- .reg st2, gr66
- .reg st3, gr67
- .reg st4, gr68
- .reg st5, gr69
- .reg st6, gr70
- .reg st7, gr71
- .reg st8, gr72
- .reg st9, gr73
- .reg st10, gr74
- .reg st11, gr75
- .reg st12, gr76
- .reg st13, gr77
- .reg st14, gr78
- .reg st15, gr79
-
- .equ SYS_STAT, 80 ;system static registers
-
- .reg ss0, gr80
- .reg ss1, gr81
- .reg ss2, gr82
- .reg ss3, gr83
- .reg ss4, gr84
- .reg ss5, gr85
- .reg ss6, gr86
- .reg ss7, gr87
- .reg ss8, gr88
- .reg ss9, gr89
- .reg ss10, gr90
- .reg ss11, gr91
- .reg ss12, gr92
- .reg ss13, gr93
- .reg ss14, gr94
- .reg ss15, gr95
-
- .equ RET_VAL, 96 ;return registers
-
- .reg v0, gr96
- .reg v1, gr97
- .reg v2, gr98
- .reg v3, gr99
- .reg v4, gr100
- .reg v5, gr101
- .reg v6, gr102
- .reg v7, gr103
- .reg v8, gr104
- .reg v9, gr105
- .reg v10, gr106
- .reg v11, gr107
- .reg v12, gr108
- .reg v13, gr109
- .reg v14, gr110
- .reg v15, gr111
-
- .equ TEMP_REG, 96 ;temp registers
-
- .reg t0, gr96
- .reg t1, gr97
- .reg t2, gr98
- .reg t3, gr99
- .reg t4, gr100
- .reg t5, gr101
- .reg t6, gr102
- .reg t7, gr103
- .reg t8, gr104
- .reg t9, gr105
- .reg t10, gr106
- .reg t11, gr107
- .reg t12, gr108
- .reg t13, gr109
- .reg t14, gr110
- .reg t15, gr111
-
- .equ RES_REG, 112 ;reserved (for user)
-
- .reg r0, gr112
- .reg r1, gr113
- .reg r2, gr114
- .reg r3, gr115
-
- .equ TEMP_EXT, 116 ;temp extension (and shared)
-
- .reg x0, gr116
- .reg x1, gr117
- .reg x2, gr118
- .reg x3, gr119
- .reg x4, gr120
- .reg x5, gr121
- .reg x6, gr122
- .reg x7, gr123
- .reg x8, gr124
-
-;-----------------------------------------------------------------------
-;Global registers with special calling convention uses
-;-----------------------------------------------------------------------
-
- .reg tav, gr121 ;trap handler argument (also x6)
- .reg tpc, gr122 ;trap handler return (also x7)
- .reg lsrp, gr123 ;large return pointer (also x8)
- .reg slp, gr124 ;static link pointer (also x9)
- .reg msp, gr125 ;memory stack pointer
- .reg rab, gr126 ;register alloc bound
- .reg rfb, gr127 ;register frame bound
-
-;-----------------------------------------------------------------------
-;Local compiler registers - output parameters, etc.
-; (only valid if frame has been established)
-;-----------------------------------------------------------------------
-
- .reg p15, lr17 ;parameter registers
- .reg p14, lr16
- .reg p13, lr15
- .reg p12, lr14
- .reg p11, lr13
- .reg p10, lr12
- .reg p9, lr11
- .reg p8, lr10
- .reg p7, lr9
- .reg p6, lr8
- .reg p5, lr7
- .reg p4, lr6
- .reg p3, lr5
- .reg p2, lr4
- .reg p1, lr3
- .reg p0, lr2
-
-
-;-----------------------------------------------------------------------
-;TLB register count
-;-----------------------------------------------------------------------
-
- .equ TLB_CNT, 128
-
- .eject
-
-;-----------------------------------------------------------------------
-;constants for general use
-;-----------------------------------------------------------------------
- .equ WRD_SIZ, 4 ;word size
- .equ TRUE, 0x80000000 ;logical true -- bit 31
- .equ FALSE, 0x00000000 ;logical false -- 0
- .equ CHKPAT_a5, 0xa5a5a5a5 ;check pattern
-
-;-----------------------------------------------------------------------
-;constants for data access control
-;-----------------------------------------------------------------------
- .equ CE, 0b1 ;coprocessor enable
- .equ CD, 0b0 ;coprocessor disable
-
- .equ AS, 0b1000000 ;set for I/O
- .equ PA, 0b0100000 ;set for physical ad
- .equ SB, 0b0010000 ;set for set BP
- .equ UA, 0b0001000 ;set for user access
-
- .equ ROM_OPT, 0b100 ;OPT values for acc
- .equ DATA_OPT, 0b000
- .equ INST_OPT, 0b000
-
- .equ ROM_CTL, (PA + ROM_OPT) ;control field
- .equ DATA_CTL, (PA + DATA_OPT)
- .equ INST_CTL, (PA + INST_OPT)
- .equ IO_CTL, (AS + PA + DATA_OPT)
-
-
- .eject
-
-;-----------------------------------------------------------------------
-;defined vectors
-;-----------------------------------------------------------------------
-
- .equ V_IllegalOp, 0
- .equ V_Unaligned, 1
- .equ V_OutOfRange, 2
- .equ V_NoCoProc, 3
- .equ V_CoProcExcept, 4
- .equ V_ProtViol, 5
- .equ V_InstAccExcept, 6
- .equ V_DataAccExcept, 7
- .equ V_UserInstTLB, 8
- .equ V_UserDataTLB, 9
- .equ V_SupInstTLB, 10
- .equ V_SupDataTLB, 11
- .equ V_InstTLBProt, 12
- .equ V_DataTLBProt, 13
- .equ V_Timer, 14
- .equ V_Trace, 15
- .equ V_INTR0, 16
- .equ V_INTR1, 17
- .equ V_INTR2, 18
- .equ V_INTR3, 19
- .equ V_TRAP0, 20
- .equ V_TRAP1, 21
-
- ; 22 - 31 reserved
-
- .equ V_MULTIPLY, 32
- .equ V_DIVIDE, 33
- .equ V_MULTIPLU, 34
- .equ V_DIVIDU, 35
- .equ V_CONVERT, 36
-
- ; 37 - 41 reserved
-
- .equ V_FEQ, 42
- .equ V_DEQ, 43
- .equ V_FGT, 44
- .equ V_DGT, 45
- .equ V_FGE, 46
- .equ V_DGE, 47
- .equ V_FADD, 48
- .equ V_DADD, 49
- .equ V_FSUB, 50
- .equ V_DSUB, 51
- .equ V_FMUL, 52
- .equ V_DMUL, 53
- .equ V_FDIV, 54
- .equ V_DDIV, 55
-
- ; 56 - 63 reserved
-
- .equ V_SPILL, 64
- .equ V_FILL, 65
- .equ V_BSDCALL, 66
- .equ V_SYSVCALL, 67
- .equ V_BRKPNT, 68
- .equ V_EPI_OS, 69
-
- .eject
-
- .macro R_LEFT,REGVAR
-
- ;Rotate left
- ;
- ; Parameters: REGVAR register to rotate
-
- add REGVAR, REGVAR, REGVAR ;shift left by 1 bit, C = MSB
- addc REGVAR, REGVAR, 0 ;add C to LSB
-
- .endm
-;----------------------------------------------------------------------
-
-
- .macro FUNCTION,NAME,INCNT,LOCCNT,OUTCNT
-
- ;Introduces a non-leaf routine.
- ;
- ;This macro defines the standard tag word before the function,
- ;then establishes the statement label with the function's name
- ;and finally allocates a register stack frame. It may not be used
- ;if a memory stack frame is required.
- ;
- ;Note also that the size of the register stack frame is limited.
- ;Neither this nor the lack of a memory frame is considered to be
- ;a severe restriction in an assembly language environment. The
- ;assembler will report errors if the requested frame is too large
- ;for this macro.
- ;
- ;It may be good practice to allocate an even number of both output
- ;registers and local registers. This will help in maintaining
- ;double word alignment within these groups. The macro will assure
- ;double word alignment of the stack frame as a whole as required
- ;for correct linkage.
- ;
- ; Paramters: NAME the function name
- ; INCNT input parameter count
- ; LOCCNT local register count
- ; OUTCNT output parameter count
-
- .set ALLOC_CNT, ((2 + OUTCNT + LOCCNT) << 2)
- .set PAD_CNT, (ALLOC_CNT & 4)
- .set ALLOC_CNT, (ALLOC_CNT + PAD_CNT)
- .set REG_PAD, (PAD_CNT >> 2)
- .if (INCNT)
- .set IN_PRM, (4 + OUTCNT + REG_PAD + LOCCNT + 0x80)
- .endif
- .if (LOCCNT)
- .set LOC_REG, (2 + OUTCNT + REG_PAD + 0x80)
- .endif
- .if (OUTCNT)
- .set OUT_PRM, (2 + 0x80)
- .endif
-
- .word ((2 + OUTCNT + LOCCNT) << 16)
-NAME:
- sub rsp, rsp, ALLOC_CNT
- asgeu V_SPILL, rsp, rab
- add lr1, rsp, ((4 + OUTCNT + LOCCNT + REG_PAD + INCNT) << 2)
-
- .endm
-;----------------------------------------------------------------------
-
-
- .macro LEAF,NAME,INCNT
-
- ;Introduces a leaf routine
- ;
- ;This macro defines the standard tag word before the function,
- ;then establishes the statement label with the function's name.
- ;
- ; Paramters: NAME the function name
- ; INCNT input parameter count
-
- .if (INCNT)
- .set IN_PRM, (2 + 0x80)
- .endif
- .set ALLOC_CNT, 0
-
- .word 0
-NAME:
-
- .endm
-;----------------------------------------------------------------------
-
-
- .macro EPILOGUE
-
- ;De-allocates register stack frame (only and only if necessary).
-
- .if (ALLOC_CNT)
-
- add rsp, rsp, ALLOC_CNT
- nop
- jmpi lr0
- asleu V_FILL, lr1, rfb
-
- .else
-
- jmpi lr0
- nop
-
- .endif
-
- .set IN_PRM, (1024) ;illegal, to cause err on ref
- .set LOC_REG, (1024) ;illegal, to cause err on ref
- .set OUT_PRM, (1024) ;illegal, to cause err on ref
- .set ALLOC_CNT, (1024) ;illegal, to cause err on ref
-
- .endm
-;----------------------------------------------------------------------
-
-
-;Initial values for macro set variables to guard against misuse
-
- .set IN_PRM, (1024) ;illegal, to cause err on ref
- .set LOC_REG, (1024) ;illegal, to cause err on ref
- .set OUT_PRM, (1024) ;illegal, to cause err on ref
- .set ALLOC_CNT, (1024) ;illegal, to cause err on ref
-
-;......................................................................
-; end of romdcl.h
diff --git a/newlib/libc/sys/a29khif/sys/smartmac.h b/newlib/libc/sys/a29khif/sys/smartmac.h
deleted file mode 100644
index 2c870fa2a..000000000
--- a/newlib/libc/sys/a29khif/sys/smartmac.h
+++ /dev/null
@@ -1,1491 +0,0 @@
-; @(#)smartmac.h 1.2 90/10/14 20:56:14, AMD
-; start of smartmac.h file
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1988, 1989, 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;
-;
- .title "AM29000 Smart Macro Package"
-;
-; Floating point package for AMD 29000 family
-;
-; Copyright 1988 Advanced Micro Devices, Inc.
-;
-; All rights reserved
-;
-; Developed for AMD by Quantitative Technology Corporation
-; 8700 SW Creekside Place Suite D
-; Beaverton OR 97005
-; (503) 626-3081
-;
-; Version information :
-;
-; Version 1.0 - 1 June 1988 - Larry Westerman (smart_macros.h)
-;
-; Revision 1.4 89/02/01 18:26:03 jimh
-; Changed to relect the new symbols from Bob Perlman, and the new include file.s
-;
-; Revision 1.3 89/01/31 10:13:34 jimh
-; Updated to use symbols from Bob Perlmans fpsymbol.h file. This is
-; an extensive change.
-;
-; Revision 1.2 89/01/26 09:23:50 jimh
-; This version checked in previous to substituting Bob Perlman's floating
-; point symbols.
-;
-; Revision 1.1 89/01/24 13:23:29 jim
-; Initial revision
-; Replaces smart_macros.h ver 1.11.
-;
-;
-;
-;
-; NOTES:
-;
-; This package makes the following assumptions about the use of these
-; smart macros:
-;
-; 1. These macros will be after the entry code for a transcendental
-; routine. This entry code will move the original function arguments
-; (by value, if the target language is FORTRAN) into the global
-; registers t0/t1 and t2/t3 (t0 and t2 for single precision
-; routines).
-; 2. The sources of all operands will be one register from the
-; following list:
-; t0 or t2 - the source is one of the original input operands
-; rtn0 - the source is rtn0, which should be used as the
-; source for all constant values to be sent to the
-; AM29027 (when used)
-; FP0 - FP7 - the source is one of the fp registers
-; 3. The destination of all operations will be a register from the
-; following list:
-; rtn0 - the destination is the function return value
-; FP0 - FP7 - the destination is one of the fp registers
-; 4. The additional registers available for temporary use are
-; t4, lrp, and slp.
-;
-; These register definitions are all taken from the file "proregs.a"
-; which was supplied by AMD. NOTE that the FP0-FP7 registers, for the
-; Am29000 version of the file, overlap with the rtn0-rtn15 registers, so
-; that FP0 corresponds to rtn0/rtn1, FP1 to rtn2/rtn3, and so forth.
-;
- .equ ERROR,0
- .equ NO_ERROR,1
-
- .equ DOUBLE_FUNCTION,0
- .equ SINGLE_FUNCTION,1
-
- .equ T_OPERATION,0
- .equ Q_OPERATION,1
-
- .equ R_SOURCE_29000,0
- .equ R_SOURCE_29027,1
-
- .equ S_SOURCE_29000,0
- .equ S_SOURCE_29027,1
-
- .equ DESTINATION_29000, 0
- .equ DESTINATION_29027, 1
-
-;
-; SMART MACRO : mfadd
-;
-; FUNCTION : single-precision floating point addition
-;
-; Required arguments : destination - one of possible destinations
-; operand1 - one of possible sources
-; operand2 - one of possible sources
-;
- .macro mfadd,destination,operand1,operand2
-
- .if $narg!=3
- .err
- .print "mfadd: missing parameter(s)"
- .exitm
- .endif
-
- .ifdef _29027_MODE
- ;
- ; For 29027 mode, perform full suite of checking
- ;
- initialize_previous_instruction
- .set CURRENT_INSTRUCTION, CP_S_S | CP_P_PLUS_T
- .set OPERATION_TYPE, T_OPERATION
- perform_single_operation destination,operand1,operand2
- read_single_result destination
- ;
- ; Save the instruction for the next macro invocation
- ;
- .set PREVIOUS_INSTRUCTION, CURRENT_INSTRUCTION
-
- .else
- ;
- ; For 29000 mode, simply produce equivalent trap-inducing instruction
- ;
- fadd destination,operand1,operand2
-
- .endif
-
- .endm ; end of mfadd macro definition
-
-;
-; SMART MACRO : mfsub
-;
-; FUNCTION : single-precision floating point subtraction
-;
-; Required arguments : destination - one of possible destinations
-; operand1 - one of possible sources
-; operand2 - one of possible sources
-;
- .macro mfsub,destination,operand1,operand2
-
- .if $narg!=3
- .err
- .print "mfsub: missing parameter(s)"
- .exitm
- .endif
-
- .ifdef _29027_MODE
- ;
- ; For 29027 mode, perform full suite of checking
- ;
- initialize_previous_instruction
- .set CURRENT_INSTRUCTION, CP_S_S | CP_P_MINUS_T
- .set OPERATION_TYPE, T_OPERATION
- perform_single_operation destination,operand1,operand2
- read_single_result destination
- ;
- ; Save the instruction for the next macro invocation
- ;
- .set PREVIOUS_INSTRUCTION, CURRENT_INSTRUCTION
-
- .else
- ;
- ; For 29000 mode, simply produce equivalent trap-inducing instruction
- ;
- fsub destination,operand1,operand2
-
- .endif
-
- .endm ; end of mfsub macro definition
-
-;
-; SMART MACRO : mfmul
-;
-; FUNCTION : single-precision floating point multiplication
-;
-; Required arguments : destination - one of possible destinations
-; operand1 - one of possible sources
-; operand2 - one of possible sources
-;
- .macro mfmul,destination,operand1,operand2
-
- .if $narg!=3
- .err
- .print "mfmul: missing parameter(s)"
- .exitm
- .endif
-
- .ifdef _29027_MODE
- ;
- ; For 29027 mode, perform full suite of checking
- ;
- initialize_previous_instruction
- .set CURRENT_INSTRUCTION, CP_S_S | CP_P_TIMES_Q
- .set OPERATION_TYPE, Q_OPERATION
- perform_single_operation destination,operand1,operand2
- read_single_result destination
- ;
- ; Save the instruction for the next macro invocation
- ;
- .set PREVIOUS_INSTRUCTION, CURRENT_INSTRUCTION
-
- .else
- ;
- ; For 29000 mode, simply produce equivalent trap-inducing instruction
- ;
- fmul destination,operand1,operand2
-
- .endif
-
- .endm ; end of mfmul macro definition
-
-;
-; SMART MACRO : mfdiv
-;
-; FUNCTION : single-precision floating point divide
-;
-; Required arguments : destination - one of possible destinations
-; operand1 - one of possible sources
-; operand2 - one of possible sources
-;
- .macro mfdiv,destination,operand1,operand2
-
- .if $narg!=3
- .err
- .print "mfdiv: missing parameter(s)"
- .exitm
- .endif
-
- ;
- ; Generate the trap instruction in all cases
- ;
- fdiv destination, operand1, operand2
-
- .endm ; end of mfdiv macro definition
-
-
-;
-; SMART MACRO : mdadd
-;
-; FUNCTION : double-precision floating point addition
-;
-; Required arguments : destination - one of possible destinations
-; operand1 - one of possible sources
-; operand2 - one of possible sources
-;
- .macro mdadd,destination,operand1,operand2
-
- .if $narg!=3
- .err
- .print "mdadd: missing parameter(s)"
- .exitm
- .endif
-
- .ifdef _29027_MODE
- ;
- ; For 29027 mode, perform full suite of checking
- ;
- initialize_previous_instruction
- .set CURRENT_INSTRUCTION, CP_D_D | CP_P_PLUS_T
- .set OPERATION_TYPE, T_OPERATION
- perform_double_operation destination,operand1,operand2
- read_double_result destination
- ;
- ; Save the instruction for the next macro invocation
- ;
- .set PREVIOUS_INSTRUCTION, CURRENT_INSTRUCTION
-
- .else
- ;
- ; For 29000 mode, simply produce equivalent trap-inducing instruction
- ;
- dadd destination,operand1,operand2
-
- .endif
-
- .endm ; end of mdadd macro definition
-
-;
-; SMART MACRO : mdsub
-;
-; FUNCTION : double-precision floating point subtraction
-;
-; Required arguments : destination - one of possible destinations
-; operand1 - one of possible sources
-; operand2 - one of possible sources
-;
- .macro mdsub,destination,operand1,operand2
-
- .if $narg!=3
- .err
- .print "mdsub: missing parameter(s)"
- .exitm
- .endif
-
- .ifdef _29027_MODE
- ;
- ; For 29027 mode, perform full suite of checking
- ;
- initialize_previous_instruction
- .set CURRENT_INSTRUCTION, CP_D_D | CP_P_MINUS_T
- .set OPERATION_TYPE, T_OPERATION
- perform_double_operation destination,operand1,operand2
- read_double_result destination
- ;
- ; Save the instruction for the next macro invocation
- ;
- .set PREVIOUS_INSTRUCTION, CURRENT_INSTRUCTION
-
- .else
- ;
- ; For 29000 mode, simply produce equivalent trap-inducing instruction
- ;
- dsub destination,operand1,operand2
-
- .endif
-
- .endm ; end of mdsub macro definition
-
-;
-; SMART MACRO : mdmul
-;
-; FUNCTION : double-precision floating point multiplication
-;
-; Required arguments : destination - one of possible destinations
-; operand1 - one of possible sources
-; operand2 - one of possible sources
-;
- .macro mdmul,destination,operand1,operand2
-
- .if $narg!=3
- .err
- .print "mdmul: missing parameter(s)"
- .exitm
- .endif
-
- .ifdef _29027_MODE
- ;
- ; For 29027 mode, perform full suite of checking
- ;
- initialize_previous_instruction
- .set CURRENT_INSTRUCTION, CP_D_D | CP_P_TIMES_Q
- .set OPERATION_TYPE, Q_OPERATION
- perform_double_operation destination,operand1,operand2
- read_double_result destination
- ;
- ; Save the instruction for the next macro invocation
- ;
- .set PREVIOUS_INSTRUCTION, CURRENT_INSTRUCTION
-
- .else
- ;
- ; For 29000 mode, simply produce equivalent trap-inducing instruction
- ;
- dmul destination,operand1,operand2
-
- .endif
-
- .endm ; end of mdmul macro definition
-
-;
-; SMART MACRO : mddiv
-;
-; FUNCTION : double-precision floating point divide
-;
-; Required arguments : destination - one of possible destinations
-; operand1 - one of possible sources
-; operand2 - one of possible sources
-;
- .macro mddiv,destination,operand1,operand2
-
- .if $narg!=3
- .err
- .print "mddiv: missing parameter(s)"
- .exitm
- .endif
-
- ;
- ; Generate the trap instruction in all cases
- ;
- ddiv destination, operand1, operand2
-
- .endm ; end of mfdiv macro definition
-
-;
-; SMART MACRO: mconvert
-;
-; FUNCTION: Floating point/integer conversion
-;
-; PARAMETERS: destination - one of the possible destinations
-; source - one of the possible sources
-; sign_flag - one of SIGNED or UNSIGNED
-; rounding_mode - one of ROUND_TO_NEAREST, ROUND_TO_PLUS,
-; ROUND_TO_MINUS, ROUND_TO_ZERO
-; destination_precision - one of FORMAT_INTEGER, FORMAT_DOUBLE,
-; or FORMAT_SINGLE
-; source_precision - one of FORMAT_INTEGER, FORMAT_DOUBLE,
-; or FORMAT_SINGLE
-;
- .macro mconvert, destination, source, sign_flag, rounding_mode, destination_precision, source_precision
-
- .if $narg!=6
- .err
- .print "mconvert: missing parameter(s)"
- .exitm
- .endif
-
- .ifdef _29027_MODE
- ;
- ; Generate in line 29027 code
- ;
- initialize_previous_instruction
- .if ( destination_precision == FORMAT_INTEGER )
- .set CURRENT_INSTRUCTION, CP_CONVERT_T_TO_INT
- select_T_operand source
- .if ( source_precision == FORMAT_DOUBLE )
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_S_D
- .else
- .if ( source_precision == FORMAT_SINGLE )
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_S_S
- .else
- .err
- .print "mconvert: invalid source type"
- .exitm
- .endif
- .endif
- .else
- .if ( destination_precision == FORMAT_DOUBLE )
- .if ( source_precision == FORMAT_SINGLE )
- .set CURRENT_INSTRUCTION, CP_PASS_P | CP_P_EQ_R | CP_D_S
- select_P_operand source
- .else
- .if ( source_precision == FORMAT_INTEGER )
- .set CURRENT_INSTRUCTION, CP_I_CONVERT_T_TO_FLOAT | CP_D_S
- select_T_operand source
- .else
- .err
- .print "mconvert: invalid source type"
- .exitm
- .endif
- .endif
- .else
- .if ( destination_precision == FORMAT_SINGLE )
- .if ( source_precision == FORMAT_DOUBLE )
- .set CURRENT_INSTRUCTION, CP_PASS_P | CP_P_EQ_R | CP_S_D
- select_P_operand source
- .else
- .if ( source_precision == FORMAT_INTEGER )
- .set CURRENT_INSTRUCTION, CP_I_CONVERT_T_TO_FLOAT | CP_S_S
- select_T_operand source
- .else
- .err
- .print "mconvert: invalid source type"
- .exitm
- .endif
- .endif
- .else
- .err
- .print "mconvert: invalid destination type "
- .exitm
- .endif
- .endif
- .endif
- ;
- ; Perform the operation, using a 29027 dummy register as the second
- ; source operand, to avoid writing any data inappropriately to the
- ; 29027
- ;
- select_destination destination
- .set S_SOURCE, S_SOURCE_29027
- .if ( source_precision == FORMAT_DOUBLE )
- write_and_execute_double_operation source, FP0
- .else
- write_and_execute_single_operation source, FP0
- .endif
- .if ( destination_precision == FORMAT_DOUBLE )
- read_double_result destination
- .else
- .if ( destination_precision == FORMAT_SINGLE )
- read_single_result destination
- .else
- read_integer_result destination
- .endif
- .endif
- .else
- ;
- ; For 29000 mode (the default) just invoke the trap-inducing instruction
- ;
- convert destination,source,sign_flag,rounding_mode,destination_precision,source_precision
-
- .endif
-
- .endm ; end of mfeq macro definition
-
-;
-; SMART MACRO: mfeq
-;
-; FUNCTION: Single precision, floating point compare
-;
-; PARAMETERS: destination - one of the possible destinations
-; operand1 - one of the possible sources
-; operand2 - one of the possible sources
-;
- .macro mfeq, destination, operand1, operand2
-
- .if $narg!=3
- .err
- .print "mfeq: missing parameter(s)"
- .exitm
- .endif
-
- .ifdef _29027_MODE
- ;
- ; Generate in line 29027 code
- ;
- initialize_previous_instruction
- .set CURRENT_INSTRUCTION, CP_S_S | CP_COMPARE_P_AND_T
- .set OPERATION_TYPE, T_OPERATION
- select_destination destination
- ;
- ; 29027 registers are not valid destinations for compare operations
- ; If the destination is a 29000 register, write the appropriate
- ; Boolean value to that register.
- ;
- .if ( DESTINATION == DESTINATION_29027 )
- .err
- .print "29027 destinations invalid for compares - @destination@"
- .exitm
- .else
- perform_single_operation destination, operand1, operand2
- cp_read_flags destination
- srl destination, destination, CP_EQUAL_FLAG_POSITION
- sll destination, destination, 31
- .endif
-
- .else
- ;
- ; For 29000 mode (the default) just invoke the trap-inducing instruction
- ;
- feq destination,operand1,operand2
-
- .endif
-
- .endm ; end of mfeq macro definition
-
-;
-; SMART MACRO: mfge
-;
-; FUNCTION: Single precision, floating point compare
-;
-; PARAMETERS: destination - one of the possible destinations
-; operand1 - one of the possible sources
-; operand2 - one of the possible sources
-;
- .macro mfge, destination, operand1, operand2
-
- .if $narg!=3
- .err
- .print "mfge: missing parameter(s)"
- .exitm
- .endif
-
- .ifdef _29027_MODE
- ;
- ; Generate in line 29027 code
- ;
- initialize_previous_instruction
- .set CURRENT_INSTRUCTION, CP_S_S | CP_COMPARE_P_AND_T
- .set OPERATION_TYPE, T_OPERATION
- select_destination destination
- ;
- ; 29027 registers are not valid destinations for compare operations
- ; If the destination is a 29000 register, write the appropriate
- ; Boolean value to that register.
- ;
- .if ( DESTINATION == DESTINATION_29027 )
- .err
- .print "29027 destinations invalid for compares - @destination@"
- .exitm
- .else
- perform_single_operation destination, operand1, operand2
- cp_read_flags destination
- and destination, destination, CP_EQUAL_FLAG | CP_GREATER_THAN_FLAG
- cpneq destination, destination, 0x0
- .endif
-
- .else
- ;
- ; For 29000 mode (the default) just invoke the trap-inducing instruction
- ;
- fge destination,operand1,operand2
-
- .endif
-
- .endm ; end of mfge macro definition
-
-;
-; SMART MACRO: mfgt
-;
-; FUNCTION: Single precision, floating point compare
-;
-; PARAMETERS: destination - one of the possible destinations
-; operand1 - one of the possible sources
-; operand2 - one of the possible sources
-;
- .macro mfgt, destination, operand1, operand2
-
- .if $narg!=3
- .err
- .print "mfgt: missing parameter(s)"
- .exitm
- .endif
-
- .ifdef _29027_MODE
- ;
- ; Generate in line 29027 code
- ;
- initialize_previous_instruction
- .set CURRENT_INSTRUCTION, CP_S_S | CP_COMPARE_P_AND_T
- .set OPERATION_TYPE, T_OPERATION
- select_destination destination
- ;
- ; 29027 registers are not valid destinations for compare operations
- ; If the destination is a 29000 register, write the appropriate
- ; Boolean value to that register.
- ;
- .if ( DESTINATION == DESTINATION_29027 )
- .err
- .print "29027 destinations invalid for compares - @destination@"
- .exitm
- .else
- perform_single_operation destination, operand1, operand2
- cp_read_flags destination
- srl destination, destination, CP_GREATER_THAN_FLAG_POSITION
- sll destination, destination, 31
- .endif
-
- .else
- ;
- ; For 29000 mode (the default) just invoke the trap-inducing instruction
- ;
- fgt destination,operand1,operand2
-
- .endif
-
- .endm ; end of mfgt macro definition
-
-;
-; SMART MACRO: mdeq
-;
-; FUNCTION: Double precision, floating point compare
-;
-; PARAMETERS: destination - one of the possible destinations
-; operand1 - one of the possible sources
-; operand2 - one of the possible sources
-;
- .macro mdeq, destination, operand1, operand2
-
- .if $narg!=3
- .err
- .print "mdeq: missing parameter(s)"
- .exitm
- .endif
-
-
- .ifdef _29027_MODE
- ;
- ; Generate in line 29027 code
- ;
- initialize_previous_instruction
- .set CURRENT_INSTRUCTION, CP_D_D | CP_COMPARE_P_AND_T
- .set OPERATION_TYPE, T_OPERATION
- select_destination destination
- ;
- ; 29027 registers are not valid destinations for compare operations
- ; If the destination is a 29000 register, write the appropriate
- ; Boolean value to that register.
- ;
- .if ( DESTINATION == DESTINATION_29027 )
- .err
- .print "29027 destinations invalid for compare - @destination@"
- .exitm
- .else
- perform_double_operation destination, operand1, operand2
- cp_read_flags destination
- srl destination, destination, CP_EQUAL_FLAG_POSITION
- sll destination, destination, 31
- .endif
- .else
- ;
- ; For 29000 mode (the default) just invoke the trap-inducing instruction
- ;
- deq destination,operand1,operand2
-
- .endif
-
- .endm ; end of mdeq macro definition
-
-;
-; SMART MACRO: mdge
-;
-; FUNCTION: Double precision, floating point compare
-;
-; PARAMETERS: destination - one of the possible destinations
-; operand1 - one of the possible sources
-; operand2 - one of the possible sources
-;
- .macro mdge, destination, operand1, operand2
-
- .if $narg!=3
- .err
- .print "mdge: missing parameter(s)"
- .exitm
- .endif
-
-
- .ifdef _29027_MODE
- ;
- ; Generate in line 29027 code
- ;
- initialize_previous_instruction
- .set CURRENT_INSTRUCTION, CP_D_D | CP_COMPARE_P_AND_T
- .set OPERATION_TYPE, T_OPERATION
- select_destination destination
- ;
- ; 29027 registers are not valid destinations for compare operations
- ; If the destination is a 29000 register, write the appropriate
- ; Boolean value to that register.
- ;
- .if ( DESTINATION == DESTINATION_29027 )
- .err
- .print "29027 destinations invalid for compare - @destination@"
- .exitm
- .else
- perform_double_operation destination, operand1, operand2
- cp_read_flags destination
- and destination, destination, CP_EQUAL_FLAG | CP_GREATER_THAN_FLAG
- cpneq destination, destination, 0x0
- .endif
- .else
- ;
- ; For 29000 mode (the default) just invoke the trap-inducing instruction
- ;
- dge destination,operand1,operand2
-
- .endif
-
- .endm ; end of mdge macro definition
-
-;
-; SMART MACRO: mdgt
-;
-; FUNCTION: Double precision, floating point compare
-;
-; PARAMETERS: destination - one of the possible destinations
-; operand1 - one of the possible sources
-; operand2 - one of the possible sources
-;
- .macro mdgt, destination, operand1, operand2
-
- .if $narg!=3
- .err
- .print "mdgt: missing parameter(s)"
- .exitm
- .endif
-
-
- .ifdef _29027_MODE
- ;
- ; Generate in line 29027 code
- ;
- initialize_previous_instruction
- .set CURRENT_INSTRUCTION, CP_D_D | CP_COMPARE_P_AND_T
- .set OPERATION_TYPE, T_OPERATION
- select_destination destination
- ;
- ; 29027 registers are not valid destinations for compare operations
- ; If the destination is a 29000 register, write the appropriate
- ; Boolean value to that register.
- ;
- .if ( DESTINATION == DESTINATION_29027 )
- .err
- .print "29027 destinations invalid for compare - @destination@"
- .exitm
- .else
- perform_double_operation destination, operand1, operand2
- cp_read_flags destination
- srl destination, destination, CP_GREATER_THAN_FLAG_POSITION
- sll destination, destination, 31
- .endif
- .else
- ;
- ; For 29000 mode (the default) just invoke the trap-inducing instruction
- ;
- dgt destination,operand1,operand2
-
- .endif
-
- .endm ; end of mdgt macro definition
-
-;
-; MACRO NAME : perform_double_operation
-;
-; FUNCTION : After the instruction base is set up, do the appropriate checking
-; to send the instruction if necessary, send the double-precision
-; operands if necessary, and start the operation
-;
-; PARAMETERS : destination - one of possible destination operands
-; operand1 - one of possible source operands
-; operand2 - one of possible source operands
-;
- .macro perform_double_operation,destination,operand1,operand2
-
- .if $narg!=3
- .err
- .print "perform_double_operation: missing parameter(s)"
- .exitm
- .endif
-
- ;
- ; Start defining the instruction
- ;
- select_destination destination
- select_P_operand operand1
- select_S_operand operand2
-
- write_and_execute_double_operation operand1, operand2
-
- .endm ; End of perform_double_operation macro definition
-
-;
-; MACRO NAME : perform_single_operation
-;
-; FUNCTION : After the instruction base is set up, do the appropriate checking
-; to send the instruction if necessary, send the single-precision
-; operands if necessary and start the operation
-;
-; PARAMETERS : destination - one of possible destination operands
-; operand1 - one of possible source operands
-; operand2 - one of possible source operands
-;
- .macro perform_single_operation,destination,operand1,operand2
-
- ;
- ; Start defining the instruction
- ;
- select_destination destination
- select_P_operand operand1
- select_S_operand operand2
- write_and_execute_single_operation operand1,operand2
-
- .endm ; End of perform_single_operation macro definition
-
-;
-; MACRO NAME : write_and_execute_double_operation
-;
-; FUNCTION : Write the instruction and operands for a double-precision
-; operation, and start the operation
-;
-; PARAMETER : operand1 - first operand of double-precision operation
-; operand2 - second operand of operation
-;
- .macro write_and_execute_double_operation,operand1,operand2
- .if ( ( R_SOURCE == R_SOURCE_29027 ) && ( S_SOURCE == S_SOURCE_29027 ) )
- ;
- ; If both sources are within the 29027, write the instruction
- ; and start the operation
- ;
- const t4, CURRENT_INSTRUCTION
- consth t4, CURRENT_INSTRUCTION
- cp_write_inst t4, START
- .else
- ;
- ; One or both of the sources must be written first, so check the
- ; previous instruction
- ;
- const t4, CURRENT_INSTRUCTION
- consth t4, CURRENT_INSTRUCTION
- cp_write_inst t4
- .if ( R_SOURCE == R_SOURCE_29000 ) && ( S_SOURCE == S_SOURCE_29027 )
- .ifeqs "@operand1@","t0"
- cp_write_r t0, t1, START
- .else
- .ifeqs "@operand1@","t2"
- cp_write_r t2, t3, START
- .else
- .ifeqs "@operand1@","rtn0"
- cp_write_r rtn0, rtn1, START
- .else
- .err
- .print "Invalid source for double operation - @operand1@"
- .exitm
- .endif
- .endif
- .endif
- .endif
- .if ( R_SOURCE == R_SOURCE_29027 ) && ( S_SOURCE == S_SOURCE_29000 )
- .ifeqs "@operand2@","t0"
- cp_write_s t0, t1, START
- .else
- .ifeqs "@operand2@","t2"
- cp_write_s t2, t3, START
- .else
- .ifeqs "@operand2@","rtn0"
- cp_write_s rtn0, rtn1, START
- .else
- .err
- .print "Invalid source for double operation - @operand1@"
- .exitm
- .endif
- .endif
- .endif
- .endif
- .if ( R_SOURCE == R_SOURCE_29000 ) && ( S_SOURCE == S_SOURCE_29000 )
- .ifeqs "@operand1@","t0"
- cp_write_r t0, t1
- .else
- .ifeqs "@operand1@","t2"
- cp_write_r t2, t3
- .else
- .ifeqs "@operand1@","rtn0"
- cp_write_r rtn0, rtn1
- .else
- .err
- .print "Invalid source for double operation - @operand1@"
- .exitm
- .endif
- .endif
- .endif
- .ifeqs "@operand2@","t0"
- cp_write_s t0, t1, START
- .else
- .ifeqs "@operand2@","t2"
- cp_write_s t2, t3, START
- .else
- .ifeqs "@operand2@","rtn0"
- cp_write_s rtn0, rtn1, START
- .else
- .err
- .print "Invalid source for double operation - @operand1@"
- .exitm
- .endif
- .endif
- .endif
- .endif
- .endif
-
- .endm ; end of write_and_execute_double_operation macro definition
-
-;
-; MACRO NAME : write_and_execute_single_operation
-;
-; FUNCTION : If necessary, read the result from the 29027 into a
-; register on the 29000
-;
-; PARAMETER : operand1 - first source for single-precision operation
-; operand2 - second source for operation
-;
- .macro write_and_execute_single_operation,operand1,operand2
-
- .if ( ( R_SOURCE == R_SOURCE_29027 ) && ( S_SOURCE == S_SOURCE_29027 ) )
- ;
- ; If both sources are within the 29027, write the instruction
- ; and start the operation
- ;
- const t4, CURRENT_INSTRUCTION
- consth t4, CURRENT_INSTRUCTION
- cp_write_inst t4, START
- .else
- ;
- ; One or both of the sources must be written first, so check the
- ; previous instruction
- ;
- const t4,CURRENT_INSTRUCTION
- consth t4,CURRENT_INSTRUCTION
- cp_write_inst t4, START
- .if ( R_SOURCE == R_SOURCE_29000 ) && ( S_SOURCE == S_SOURCE_29027 )
- cp_write_r operand1, operand1, START
- .endif
- .if ( R_SOURCE == R_SOURCE_29027 ) && ( S_SOURCE == S_SOURCE_29000 )
- cp_write_s operand2, operand2, START
- .endif
- .if ( R_SOURCE == R_SOURCE_29000 ) && ( S_SOURCE == S_SOURCE_29000 )
- cp_write_rs operand1, operand2, START
- .endif
- .endif
-
- .endm ; End of write_and_execute_single_operation macro definition
-
-;
-; MACRO NAME : read_double_result
-;
-; FUNCTION : If necessary, read the result from the 29027 into a
-; register on the 29000
-;
-; PARAMETER : destination - one of the possible destination registers
-;
- .macro read_double_result,destination
- .if ( DESTINATION == DESTINATION_29000 )
- ;
- ; If the destination is not within the 29027 register file, read
- ; the result and store it into the correct register in the 29000
- ;
- .ifeqs "@destination@","rtn0"
- cp_read_dp rtn0, rtn1
- .else
- .err
- .print "Invalid destination for double result - @destination@"
- .exitm
- .endif
- .endif
-
- .endm ; End of read_double_result macro definition
-
-;
-; MACRO NAME : read_single_result
-;
-; FUNCTION : If necessary, read the result from the 29027 into a
-; register on the 29000
-;
-; PARAMETER : destination
-;
- .macro read_single_result,destination
-
- .if ( DESTINATION == DESTINATION_29000 )
- ;
- ; If the destination is not within the 29027 register file, read
- ; the result and store it into the correct register in the 29000
- ;
- .ifeqs "@destination@","rtn0"
- cp_read_sp rtn0
- .else
- .err
- .print "Invalid destination for single result - @destination@"
- .exitm
- .endif
- .endif
-
- .endm ; End of read_single_result macro definition
-
-;
-; MACRO NAME : read_integer_result
-;
-; FUNCTION : If necessary, read the result from the 29027 into a
-; register on the 29000
-;
-; PARAMETER : destination
-;
- .macro read_integer_result,destination
-
- .if ( DESTINATION == DESTINATION_29000 )
- ;
- ; If the destination is not within the 29027 register file, read
- ; the result and store it into the correct register in the 29000
- ;
- .ifeqs "@destination@","rtn0"
- cp_read_int rtn0
- .else
- .err
- .print "Invalid destination for single result - @destination@"
- .exitm
- .endif
- .endif
-
- .endm ; End of read_integer_result macro definition
-
-;
-; MACRO NAME : select_P_operand
-;
-; FUNCTION : Given an operand, determine if the operand is from the
-; register file, and if so, set the appropriate bits in
-; the current instruction word. In addition, set the
-; variable R_SOURCE to 0 for local register file, or 1 for
-; floating-point register file.
-;
-; PARAMETER : operand1 - one of the possible source operands
-;
- .macro select_P_operand,operand1
- .ifeqs "@operand1@","t0"
- .set R_SOURCE,R_SOURCE_29000
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_P_EQ_R
- .exitm
- .endif
- .ifeqs "@operand1@","t2"
- .set R_SOURCE,R_SOURCE_29000
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_P_EQ_R
- .exitm
- .endif
- .ifeqs "@operand1@","rtn0"
- .set R_SOURCE,R_SOURCE_29000
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_P_EQ_R
- .exitm
- .endif
- .ifeqs "@operand1@","FP0"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_P_EQ_RF0
- .exitm
- .endif
- .ifeqs "@operand1@","FP1"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_P_EQ_RF1
- .exitm
- .endif
- .ifeqs "@operand1@","FP2"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_P_EQ_RF2
- .exitm
- .endif
- .ifeqs "@operand1@","FP3"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_P_EQ_RF3
- .exitm
- .endif
- .ifeqs "@operand1@","FP4"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_P_EQ_RF4
- .exitm
- .endif
- .ifeqs "@operand1@","FP5"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_P_EQ_RF5
- .exitm
- .endif
- .ifeqs "@operand1@","FP6"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_P_EQ_RF6
- .exitm
- .endif
- .ifeqs "@operand1@","FP7"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_P_EQ_RF7
- .exitm
- .endif
- .err
- .print "@operand1@ - Invalid operand"
-
- .endm ; end of select_P_operand macro definition
-
-;
-; MACRO NAME : select_S_operand
-;
-; FUNCTION : Given an operand, determine if the operand is from the
-; register file, and if so, set the appropriate bits in
-; the current instruction word. In addition, set the
-; variable S_SOURCE to S_SOURCE_29000 or S_SOURCE_29027
-; as appropriate
-;
-; PARAMETER : operand2 - one of the possible source operands
-;
- .macro select_S_operand,operand2
- .ifeqs "@operand2@","t0"
- .set S_SOURCE,S_SOURCE_29000
- .if ( OPERATION_TYPE == T_OPERATION )
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_S
- .else
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_Q_EQ_S
- .endif
- .exitm
- .endif
- .ifeqs "@operand2@","t2"
- .set S_SOURCE,S_SOURCE_29000
- .if ( OPERATION_TYPE == T_OPERATION )
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_S
- .else
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_Q_EQ_S
- .endif
- .exitm
- .endif
- .ifeqs "@operand2@","rtn0"
- .set S_SOURCE,S_SOURCE_29000
- .if ( OPERATION_TYPE == T_OPERATION )
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_S
- .else
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_Q_EQ_S
- .endif
- .exitm
- .endif
- .ifeqs "@operand2@","FP0"
- .set S_SOURCE,S_SOURCE_29027
- .if ( OPERATION_TYPE == T_OPERATION )
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF0
- .else
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_Q_EQ_RF0
- .endif
- .exitm
- .endif
- .ifeqs "@operand2@","FP1"
- .set S_SOURCE,S_SOURCE_29027
- .if ( OPERATION_TYPE == T_OPERATION )
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF1
- .else
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_Q_EQ_RF1
- .endif
- .exitm
- .endif
- .ifeqs "@operand2@","FP2"
- .set S_SOURCE,S_SOURCE_29027
- .if ( OPERATION_TYPE == T_OPERATION )
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF2
- .else
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_Q_EQ_RF2
- .endif
- .exitm
- .endif
- .ifeqs "@operand2@","FP3"
- .set S_SOURCE,S_SOURCE_29027
- .if ( OPERATION_TYPE == T_OPERATION )
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF3
- .else
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_Q_EQ_RF3
- .endif
- .exitm
- .endif
- .ifeqs "@operand2@","FP4"
- .set S_SOURCE,S_SOURCE_29027
- .if ( OPERATION_TYPE == T_OPERATION )
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF4
- .else
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_Q_EQ_RF4
- .endif
- .exitm
- .endif
- .ifeqs "@operand2@","FP5"
- .set S_SOURCE,S_SOURCE_29027
- .if ( OPERATION_TYPE == T_OPERATION )
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF5
- .else
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_Q_EQ_RF5
- .endif
- .exitm
- .endif
- .ifeqs "@operand2@","FP6"
- .set S_SOURCE,S_SOURCE_29027
- .if ( OPERATION_TYPE == T_OPERATION )
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF6
- .else
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_Q_EQ_RF6
- .endif
- .exitm
- .endif
- .ifeqs "@operand2@","FP7"
- .set S_SOURCE,S_SOURCE_29027
- .if ( OPERATION_TYPE == T_OPERATION )
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF7
- .else
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_Q_EQ_RF7
- .endif
- .exitm
- .endif
- .err
- .print "@operand2@ - Invalid operand"
-
- .endm ; end of select_S_operand macro definition
-
-;
-; MACRO NAME : select_T_operand
-;
-; FUNCTION : Given an operand, determine if the operand is from the
-; register file, and if so, set the appropriate bits in
-; the current instruction word, to read the corresponding
-; source into the T operand. In addition, set the
-; variable R_SOURCE to 0 for local register file, or 1 for
-; floating-point register file.
-;
-; PARAMETER : operand1 - one of the possible source operands
-;
- .macro select_T_operand,operand1
- .ifeqs "@operand1@","t0"
- .set R_SOURCE,R_SOURCE_29000
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_R
- .exitm
- .endif
- .ifeqs "@operand1@","t2"
- .set R_SOURCE,R_SOURCE_29000
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_R
- .exitm
- .endif
- .ifeqs "@operand1@","rtn0"
- .set R_SOURCE,R_SOURCE_29000
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_R
- .exitm
- .endif
- .ifeqs "@operand1@","FP0"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF0
- .exitm
- .endif
- .ifeqs "@operand1@","FP1"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF1
- .exitm
- .endif
- .ifeqs "@operand1@","FP2"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF2
- .exitm
- .endif
- .ifeqs "@operand1@","FP3"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF3
- .exitm
- .endif
- .ifeqs "@operand1@","FP4"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF4
- .exitm
- .endif
- .ifeqs "@operand1@","FP5"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF5
- .exitm
- .endif
- .ifeqs "@operand1@","FP6"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF6
- .exitm
- .endif
- .ifeqs "@operand1@","FP7"
- .set R_SOURCE,R_SOURCE_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_T_EQ_RF7
- .exitm
- .endif
- .err
- .print "@operand1@ - Invalid operand"
-
- .endm ; end of select_T_operand macro definition
-
-;
-; MACRO NAME : select_destination
-;
-; FUNCTION : Given a destination, determine if the operand is from the
-; register file, and if so, set the appropriate bits in
-; the current instruction word. In addition, set the
-; variable DESTINATION to DESTINATION_29000 or
-; DESTINATION_29027 as appropriate
-;
-; PARAMETER : destination - one of the possible destination operands
-;
- .macro select_destination,destination
- .ifeqs "@destination@","rtn0"
- .set DESTINATION,DESTINATION_29000
- .exitm
- .endif
- .ifeqs "@destination@","FP0"
- .set DESTINATION,DESTINATION_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_DEST_EQ_RF0
- .exitm
- .endif
- .ifeqs "@destination@","FP1"
- .set DESTINATION,DESTINATION_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_DEST_EQ_RF1
- .exitm
- .endif
- .ifeqs "@destination@","FP2"
- .set DESTINATION,DESTINATION_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_DEST_EQ_RF2
- .exitm
- .endif
- .ifeqs "@destination@","FP3"
- .set DESTINATION,DESTINATION_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_DEST_EQ_RF3
- .exitm
- .endif
- .ifeqs "@destination@","FP4"
- .set DESTINATION,DESTINATION_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_DEST_EQ_RF4
- .exitm
- .endif
- .ifeqs "@destination@","FP5"
- .set DESTINATION,DESTINATION_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_DEST_EQ_RF5
- .exitm
- .endif
- .ifeqs "@destination@","FP6"
- .set DESTINATION,DESTINATION_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_DEST_EQ_RF6
- .exitm
- .endif
- .ifeqs "@destination@","FP7"
- .set DESTINATION,DESTINATION_29027
- .set CURRENT_INSTRUCTION, CURRENT_INSTRUCTION | CP_DEST_EQ_RF7
- .exitm
- .endif
- .err
- .print "@destination@ - Invalid operand"
-
- .endm ; end of select_destination macro definition
-
-; MACRO NAME : initialize_previous_instruction
-;
-; FUNCTION : Make sure the previous instruction is defined and set to zero
-;
- .macro initialize_previous_instruction
-
- .ifndef PREVIOUS_INSTRUCTION
- ;
- ; Make sure that the previous instruction variable is initialized
- ;
- .set PREVIOUS_INSTRUCTION,0
- .endif
-
- .endm ; end of initialize_previous_instruction macro definition
-
-
-; MACRO NAME : prepare_function_parameters
-;
-; FUNCTION : To place the input parameters into the correct position for
-; use by the function body. When the target language is
-; FORTRAN, the values of the input arguments are read from the
-; supplied addresses and moved to the t0-t3 temporary area.
-; When the target language is C or Pascal, the values of the
-; input arguments are simply moved to the t0-t3 temporary area.
-;
- .macro prepare_function_parameters,arg1,arg2
-
- .if $narg==0
- .err
- .print "Missing function argument(s)"
- .exitm
- .endif
-
- .if $narg>2
- .err
- .print "Too many function arguments
- .exitm
- .endif
-
- .if $narg>=1
- .if $isreg(@arg1)
- .ifdef FORTRAN
- load 0,0,t0,arg1
- .if ( FUNCTION_TYPE == DOUBLE_FUNCTION )
- add t1,arg1,4
- load 0,0,t1,t1
- .endif
- .else
- add t0,arg1,0
- .if ( FUNCTION_TYPE == DOUBLE_FUNCTION )
- add t1,%%(&arg1+1),0
- .endif
- .endif
- .else
- .err
- .print "Function argument not register - @arg1@"
- .endif
- .endif
- .if $narg==2
- .if $isreg (@arg2)
- .ifdef FORTRAN
- load 0,0,t2,arg2
- .if ( FUNCTION_TYPE == DOUBLE_FUNCTION )
- add t3,arg2,4
- load 0,0,t3,t3
- .endif
- .else
- add t2,arg2,0
- .if ( FUNCTION_TYPE == DOUBLE_FUNCTION )
- add t3,%%(&arg2+1),0
- .endif
- .endif
- .else
- .err
- .print "Function argument not register - @arg2@"
- .endif
- .endif
-
- .endm ; end of prepare_function_parameters macro definition
-
-; end of smartmac.h file
diff --git a/newlib/libc/sys/a29khif/sys/sysmac.h b/newlib/libc/sys/a29khif/sys/sysmac.h
deleted file mode 100644
index 01ff9eec2..000000000
--- a/newlib/libc/sys/a29khif/sys/sysmac.h
+++ /dev/null
@@ -1,165 +0,0 @@
-; @(#)sysmac.h 1.7 90/10/14 20:56:17, Copyright 1988, 1989, 1990 AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1988, 1989, 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;
-; sysmac.h
-;
- .include "sys/proreg.h"
-
-; Supported system call function numbers - BSD emulation
-
- .equ BSD_exit, 1
- .equ BSD_open, 5
- .equ BSD_close, 6
- .equ BSD_remove, 10
- .equ BSD_lseek, 19
- .equ BSD_sbrk, 69
- .equ BSD_readv, 120
- .equ BSD_writev, 121
- .equ BSD_rename, 128
-; Functions above 0x100 are handled by Am29000 code
- .equ BSD_alloc, 0x101
- .equ BSD_free, 0x102
- .equ BSD_getpagesize, 0x103
-
- .equ BSD_clock, 0x111
-
-; Supported system call function numbers - HIF version 2.0
-
- .equ HIF_exit, 0x01
-
- .equ HIF_open, 0x11
- .equ HIF_close, 0x12
- .equ HIF_read, 0x13
- .equ HIF_write, 0x14
- .equ HIF_lseek, 0x15
- .equ HIF_remove, 0x16
- .equ HIF_rename, 0x17
- .equ HIF_ioctl, 0x18
- .equ HIF_iowait, 0x19
- .equ HIF_iostat, 0x1a
-
- .equ HIF_tmpnam, 0x21
-
- .equ HIF_time, 0x31
-
- .equ HIF_getenv, 0x41
- .equ HIF_gettz, 0x43
-
- .equ HIF_sysalloc, 0x101
- .equ HIF_alloc, HIF_sysalloc ;Synonym.
- .equ HIF_sysfree, 0x102
- .equ HIF_free, HIF_sysfree ;Synonym.
- .equ HIF_getpsize, 0x103
- .equ HIF_getpagesize,HIF_getpsize ;Synonym.
- .equ HIF_getargs, 0x104
-
- .equ HIF_clock, 0x111
- .equ HIF_cycles, 0x112
-
- .equ HIF_setvec, 0x121
- .equ HIF_settrap, 0x122
- .equ HIF_setim, 0x123
-
- .equ HIF_query, 0x131
-
- .equ HIF_signal, 0x141
- .equ HIF_sigdfl, 0x142
- .equ HIF_sigret, 0x143
- .equ HIF_sigrep, 0x144
- .equ HIF_sigskp, 0x145
- .equ HIF_sendsig, 0x146
-
-;Maintain compatibility with HIF 1.0 code.
-
- .equ EPI_exit, HIF_exit
-
- .equ EPI_open, HIF_open
- .equ EPI_close, HIF_close
- .equ EPI_read, HIF_read
- .equ EPI_write, HIF_write
- .equ EPI_lseek, HIF_lseek
- .equ EPI_remove, HIF_remove
- .equ EPI_rename, HIF_rename
-
- .equ EPI_tmpnam, HIF_tmpnam
-
- .equ EPI_time, HIF_time
-
- .equ EPI_getenv, HIF_getenv
- .equ EPI_gettz, HIF_gettz
- .equ EPI_alloc, HIF_sysalloc
- .equ EPI_free, HIF_sysfree
- .equ EPI_getpagesize, HIF_getpsize
- .equ EPI_getargs, HIF_getargs
-
- .equ EPI_clock, HIF_clock
- .equ EPI_cycles, HIF_cycles
-
- .equ EPI_setvec, HIF_setvec
-
- .equ V_SYSCALL, 69
-
-; System call macros
-/* Now that source files have been sed'd to avoid these macros, they
- are just commented out. -- gnu@cygnus.com Oct 90
-
- .ifdef _BSD_OS
- .equ V_SYSCALL, 66
- .else
- .equ V_SYSCALL, 69
- .endif
-
- .macro syscall, name
- .ifdef _BSD_OS
- const tav, SYS_@name
- .else
- const tav, HIF_@name
- .endif
- asneq V_SYSCALL, gr1, gr1
- .endm
-
-; error return
-; set errno to the error value in tav.
-; return -1
-;
- .macro returnerr
-;; .extern _errno ; rather have undef'd sym than multiple def's
- const tpc, _errno
- consth tpc, _errno
- store 0, 0, tav, tpc
- jmpi lr0
- constn v0, -1
- .endm
-
-; package the most common case in one macro
-;
- .macro system, name
- syscall name
- jmpti tav, lr0
- returnerr
- .endm
- */
diff --git a/newlib/libc/sys/a29khif/systime.s b/newlib/libc/sys/a29khif/systime.s
deleted file mode 100644
index 95b193360..000000000
--- a/newlib/libc/sys/a29khif/systime.s
+++ /dev/null
@@ -1,44 +0,0 @@
-; @(#)systime.s 1.2 90/10/14 21:57:59, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; _time.s
-; time_t secs = time( time_t *secs );
-;
-; NOTE - Will not work on BSD (no time sys call)
-;
- .file "systime.s"
- .include "sys/sysmac.h"
- .text
- .word 0x00030000 ; Debugger tag word
- .global _time
-_time:
- const tav,HIF_time @ asneq V_SYSCALL,gr1,gr1
- cpeq gr97, lr2, 0
- jmpti gr97, lr0
- nop
- jmpi lr0
- store 0, 0, gr96, lr2
- .end
diff --git a/newlib/libc/sys/a29khif/vec.s b/newlib/libc/sys/a29khif/vec.s
deleted file mode 100644
index 5a7083a3c..000000000
--- a/newlib/libc/sys/a29khif/vec.s
+++ /dev/null
@@ -1,35 +0,0 @@
-; @(#)vec.s 1.2 90/10/14 21:58:01, AMD
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Copyright 1990 Advanced Micro Devices, Inc.
-;
-; This software is the property of Advanced Micro Devices, Inc (AMD) which
-; specifically grants the user the right to modify, use and distribute this
-; software provided this notice is not removed or altered. All other rights
-; are reserved by AMD.
-;
-; AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
-; SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
-; DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
-; USE OF THIS SOFTWARE.
-;
-; So that all may benefit from your experience, please report any problems
-; or suggestions about this software to the 29K Technical Support Center at
-; 800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
-; 0031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
-;
-; Advanced Micro Devices, Inc.
-; 29K Support Products
-; Mail Stop 573
-; 5900 E. Ben White Blvd.
-; Austin, TX 78741
-; 800-292-9263
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- .global V_SPILL, V_FILL
- .global V_EPI_OS, V_BSD_OS
-
- .equ V_SPILL, 64
- .equ V_FILL, 65
-
- .equ V_BSD_OS, 66
- .equ V_EPI_OS, 69
- .end
diff --git a/newlib/libc/sys/aclocal.m4 b/newlib/libc/sys/aclocal.m4
deleted file mode 100644
index c0a206827..000000000
--- a/newlib/libc/sys/aclocal.m4
+++ /dev/null
@@ -1,1223 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
-
-# serial 46 AC_PROG_LIBTOOL
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
- AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [AC_LIBTOOL_CXX],
- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
- AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [ifdef([AC_PROG_GCJ],
- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([A][M_PROG_GCJ],
- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([LT_AC_PROG_GCJ],
- [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])])])])])
-
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- AC_PATH_MAGIC
- fi
- ;;
-esac
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-AC_ARG_WITH(pic,
- [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
- pic_mode="$withval", pic_mode=default)
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_SAVE
- AC_LANG_C
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_RESTORE])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
- [AC_TRY_LINK([],
- [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);],
- [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
- [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
- ])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_LIBTOOL_PICMODE - implement the --with-pic flag
-# Usage: AC_LIBTOOL_PICMODE[(MODE)]
-# Where MODE is either `yes' or `no'. If omitted, it defaults to
-# `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)])
-
-
-# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="ifelse([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-])
-
-
-# AC_PATH_MAGIC - find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
-AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])
-
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- re_direlt=['/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])
-
-# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
-[lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-])
-
-# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependant libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.[012])
- lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd* )
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- ia64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
- else
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
- fi
- ;;
-
-newsos6)
- [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-[sysv5uw[78]* | sysv4*uw2*)]
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-])
-
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-convenience to the
-# configure arguments. Note that LIBLTDL and INCLTDL are not
-# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
-# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
-# with '${top_builddir}/' and INCLTDL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!). If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case $enable_ltdl_convenience in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-install to the configure
-# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
-# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
-# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
-# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
-# with '${top_srcdir}/' (note the single quotes!). If your package is
-# not flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-# If this macro is not defined by Autoconf, define it here.
-ifdef([AC_PROVIDE_IFELSE],
- [],
- [define([AC_PROVIDE_IFELSE],
- [ifdef([AC_PROVIDE_$1],
- [$2], [$3])])])
-
-# AC_LIBTOOL_CXX - enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
-
-AC_DEFUN([_AC_LIBTOOL_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
-LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
-lt_save_CC="$CC"
-lt_save_CFLAGS="$CFLAGS"
-dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
-dnl is set to the C++ compiler.
-AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
-CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-# AC_LIBTOOL_GCJ - enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
-
-AC_DEFUN([_AC_LIBTOOL_GCJ],
-[AC_REQUIRE([AC_PROG_LIBTOOL])
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
- [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
- [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
- [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
-lt_save_CC="$CC"
-lt_save_CFLAGS="$CFLAGS"
-dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
-dnl is set to the C++ compiler.
-AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
-CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-dnl old names
-AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)
-])
-
diff --git a/newlib/libc/sys/arc/Makefile.am b/newlib/libc/sys/arc/Makefile.am
deleted file mode 100644
index 7ef026eae..000000000
--- a/newlib/libc/sys/arc/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = isatty.c mem-layout.c sbrk.c syscalls.c
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/arc/Makefile.in b/newlib/libc/sys/arc/Makefile.in
deleted file mode 100644
index 9e1c0c1eb..000000000
--- a/newlib/libc/sys/arc/Makefile.in
+++ /dev/null
@@ -1,329 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = isatty.c mem-layout.c sbrk.c syscalls.c
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = isatty.o mem-layout.o sbrk.o syscalls.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/arc/aclocal.m4 b/newlib/libc/sys/arc/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/arc/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/arc/configure b/newlib/libc/sys/arc/configure
deleted file mode 100755
index 46148becd..000000000
--- a/newlib/libc/sys/arc/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=isatty.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/arc/configure.in b/newlib/libc/sys/arc/configure.in
deleted file mode 100644
index f715b1edd..000000000
--- a/newlib/libc/sys/arc/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/arc configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(isatty.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/arc/crt0.S b/newlib/libc/sys/arc/crt0.S
deleted file mode 100644
index 346339774..000000000
--- a/newlib/libc/sys/arc/crt0.S
+++ /dev/null
@@ -1,75 +0,0 @@
-; ARC start up file
-; In the absence of a custom linker script, go with something simple.
-; We do not support passing arguments to "main", but this is an embedded
-; system anyway.
-;
-; We call init/fini here without cpu prefixes because there is always
-; only one .init/.fini section per image.
-
- .section .text
- .align 4
-
- .global start
-start:
-
- mov sp,end ; Round "sp" up to page after "end".
- add sp,sp,4095
- and sp,sp,-4096
-
- ld r8,[stack_size] ; Add stack size to "sp".
- add sp,sp,r8
-
- st sp,[sbrk_start] ; Initialize malloc heap.
- st sp,[sbrk_loc]
-
- sub sp,sp,16 ; callee expects 16 bytes already "pushed".
- mov fp,0 ; Top of stack frame indicator.
-
- mov r0,edata ; Zero bss.
- mov r2,end
- sub r2,r2,r0
- mov r1,0
-
-#ifdef __base__
- bl.nd _memset
- bl.nd init ; .init section entry point.
- mov r0,%st(fini) ; .fini section entry point.
- bl.nd _atexit
- mov r0,0 ; argc
- mov r1,0 ; argv
- bl.nd _main
- bl.nd _exit
-#endif
-
-#ifdef __host__
- bl.nd _host_memset
- bl.nd init ; .init section entry point.
- mov r0,%st(fini) ; .fini section entry point.
- bl.nd _host_atexit
- mov r0,0 ; argc
- mov r1,0 ; argv
- bl.nd _host_main
- bl.nd _host_exit
-#endif
-
-#ifdef __graphics__
- bl.nd _graphics_memset
- bl.nd init ; .init section entry point.
- mov r0,%st(fini) ; .fini section entry point.
- bl.nd _graphics_atexit
- mov r0,0 ; argc
- mov r1,0 ; argv
- bl.nd _graphics_main
- bl.nd _graphics_exit
-#endif
-
-#ifdef __audio__
- bl.nd _audio_memset
- bl.nd init ; .init section entry point.
- mov r0,%st(fini) ; .fini section entry point.
- bl.nd _audio_atexit
- mov r0,0 ; argc
- mov r1,0 ; argv
- bl.nd _audio_main
- bl.nd _audio_exit
-#endif
diff --git a/newlib/libc/sys/arc/isatty.c b/newlib/libc/sys/arc/isatty.c
deleted file mode 100644
index 3c64647a9..000000000
--- a/newlib/libc/sys/arc/isatty.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* isatty.c */
-
-/* Dumb implementation so programs will at least run. */
-
-#include <sys/stat.h>
-
-int
-isatty (int fd)
-{
- struct stat buf;
-
- if (fstat (fd, &buf) < 0)
- return 0;
- if (S_ISCHR (buf.st_mode))
- return 1;
- return 0;
-}
diff --git a/newlib/libc/sys/arc/mem-layout.c b/newlib/libc/sys/arc/mem-layout.c
deleted file mode 100644
index e9c215220..000000000
--- a/newlib/libc/sys/arc/mem-layout.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Ideally this kind of stuff is specified in a linker script. It's not clear
- what the default linker script should do, so for now we have this. */
-
-/* Keep this file separate from sbrk.c so the programmer can supply his/her
- own _sbrk_r. This file could go in crt0.S, but I want to keep this in C.
- This is all just an experiment anyway. */
-
-#ifndef STACK_SIZE
-/* Cache lines recycle at 4096 I think, and 4096 is listed as the page size,
- so we make the stack size a multiple of it. Not that it's relevant or
- anything, but why not base it on *something*? */
-#define STACK_SIZE (4096 * 4)
-#endif
-
-int stack_size asm ("stack_size") = STACK_SIZE;
-
-#ifndef SBRK_SIZE
-#define SBRK_SIZE (4096 * 32)
-#endif
-
-int sbrk_size asm ("sbrk_size") = SBRK_SIZE;
diff --git a/newlib/libc/sys/arc/sbrk.c b/newlib/libc/sys/arc/sbrk.c
deleted file mode 100644
index 9f863cded..000000000
--- a/newlib/libc/sys/arc/sbrk.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* sbrk support */
-
-/* The current plan is to have one sbrk handler for all cpus.
- Hence use `asm' for each global variable here to avoid the cpu prefix.
- We can't intrude on the user's namespace (another reason to use asm). */
-
-#include <sys/types.h>
-#include <sys/syscall.h>
-#include <errno.h>
-#include <stddef.h>
-
-/* These variables are publicly accessible for debugging purposes.
- The user is also free to set sbrk_size to something different.
- See mem-layout.c. */
-
-extern int sbrk_size asm ("sbrk_size");
-
-caddr_t sbrk_start asm ("sbrk_start");
-caddr_t sbrk_loc asm ("sbrk_loc");
-
-/*caddr_t _sbrk_r (struct _reent *, size_t) asm ("__sbrk_r");*/
-
-/* FIXME: We need a semaphore here. */
-
-caddr_t
-_sbrk_r (struct _reent *r, size_t nbytes)
-{
- caddr_t result;
-
- if (
- /* Ensure we don't underflow. */
- sbrk_loc + nbytes < sbrk_start
- /* Ensure we don't overflow. */
- || sbrk_loc + nbytes > sbrk_start + sbrk_size)
- {
- errno = ENOMEM;
- return ((caddr_t) -1);
- }
-
- result = sbrk_loc;
- sbrk_loc += nbytes;
- return result;
-}
diff --git a/newlib/libc/sys/arc/sys/syscall.h b/newlib/libc/sys/arc/sys/syscall.h
deleted file mode 100644
index b5d8aa2e1..000000000
--- a/newlib/libc/sys/arc/sys/syscall.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* ARC system call interface */
-
-/* A special version of the flag insn is used to distinguish syscalls from
- breakpoints (a breakpoint might be set at the same place).
-
- The upper 23 bits of the argument to a flag insn are not currently used.
- By convention, bit 31 is one to indicate this is a specially coded operand.
- The next 15 bits (bits 30-16) can be used for software purposes.
- The format isn't documented yet, so the pattern we use here may change. */
-
-#define SYSCALL_MARKER 0x80010000
-#define SYSCALL_MAGIC 0x61082300
-
-/* Perform a system call.
-
- If ERR is 0, it succeeded. Otherwise it is a positive value for errno. */
-
-#define SYSCALL(op, rc, err, r0, r1, r2) \
-asm volatile ( "\
- mov r0,%2\n\t \
- mov r1,%3\n\t \
- mov r2,%4\n\t \
- mov r3,%5\n\t \
- mov r4,%6\n\t \
- flag %7\n\t \
- nop\n\t \
- nop\n\t \
- nop\n\t \
- mov %0,r0\n\t \
- mov %1,r1" \
- : "=r" (rc), "=r" (err) \
- : "i" (SYSCALL_MAGIC), "r" (op), "r" (r0), "r" (r1), "r" (r2), \
- "i" (1 | SYSCALL_MARKER) \
- : "r0", "r1", "r2", "r3", "r4");
-
-#define SYS_exit 1
-#define SYS_open 2
-#define SYS_close 3
-#define SYS_read 4
-#define SYS_write 5
-#define SYS_lseek 6
-#define SYS_link 7
-#define SYS_unlink 8
-#define SYS_chdir 9
-#define SYS_chmod 10
-#define SYS_stat 11
-#define SYS_fstat 12
-#define SYS_access 13
-#define SYS_getpid 14
-#define SYS_kill 15
-#define SYS_time 16
-
-#define SYS_MAX 17
diff --git a/newlib/libc/sys/arc/syscalls.c b/newlib/libc/sys/arc/syscalls.c
deleted file mode 100644
index 9c578451a..000000000
--- a/newlib/libc/sys/arc/syscalls.c
+++ /dev/null
@@ -1,131 +0,0 @@
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/syscall.h>
-#include <_ansi.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <reent.h>
-
-_ssize_t
-_read_r (struct _reent *r, int fd, void *buf, size_t nbytes)
-{
- int err;
- _ssize_t rc;
-
- SYSCALL (SYS_read, rc, err, fd, buf, nbytes);
- if (err)
- __errno_r (r) = err;
- return rc;
-}
-
-_ssize_t
-_write_r (struct _reent *r, int fd, const void *buf, size_t nbytes)
-{
- int err;
- _ssize_t rc;
-
- SYSCALL (SYS_write, rc, err, fd, buf, nbytes);
- if (err)
- __errno_r (r) = err;
- return rc;
-}
-
-/* FIXME: The prototype in <fcntl.h> for open() uses ...,
- but reent.h uses int. */
-
-int
-_open_r (struct _reent *r, const char *buf, int flags, int mode)
-{
- int rc,err;
-#if 0
- int mode;
- va_list ap;
-
- va_start (ap, flags);
- mode = va_arg (ap, int);
- va_end (ap);
-#endif
-
- SYSCALL (SYS_open, rc, err, buf, flags, mode);
- if (err)
- __errno_r (r) = err;
- return rc;
-}
-
-int
-_close_r (struct _reent *r, int fd)
-{
- int rc,err;
-
- SYSCALL (SYS_close, rc, err, fd, 0, 0);
- if (err)
- __errno_r (r) = err;
- return rc;
-}
-
-off_t
-_lseek_r (struct _reent *r, int fd, off_t offset, int whence)
-{
- int err;
- off_t rc;
-
- SYSCALL (SYS_lseek, rc, err, fd, offset, whence);
- if (err)
- __errno_r (r) = err;
- return rc;
-}
-
-int
-_fstat_r (struct _reent *r, int fd, struct stat *buf)
-{
- int rc,err;
-
- SYSCALL (SYS_fstat, rc, err, fd, buf, 0);
- if (err)
- __errno_r (r) = err;
- return rc;
-}
-
-/* FIXME: Shouldn't this be _exit_r? */
-
-void
-_exit (int ret)
-{
- int rc,err;
-
- SYSCALL (SYS_exit, rc, err, ret, 0, 0);
-
- /* If that failed, use an infinite loop. */
- while (1)
- continue;
-}
-
-time_t
-_time (time_t *timer)
-{
- return 0;
-}
-
-int
-_creat_r (struct _reent *r, const char *path, int mode)
-{
- return _open_r (r, path, O_CREAT | O_TRUNC, mode);
-}
-
-int
-_getpid_r (struct _reent *r)
-{
- return 42;
-}
-
-int
-_kill_r (struct _reent *r, int pid, int sig)
-{
- int rc,err;
-
- SYSCALL (SYS_kill, rc, err, pid, sig, 0);
- if (err)
- __errno_r (r) = err;
- return rc;
-}
diff --git a/newlib/libc/sys/arm/Makefile.am b/newlib/libc/sys/arm/Makefile.am
deleted file mode 100644
index 7749d4aff..000000000
--- a/newlib/libc/sys/arm/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-if MAY_SUPPLY_SYSCALLS
-extra_objs = libcfunc.o trap.o syscalls.o
-else
-extra_objs =
-endif
-
-lib_a_SOURCES = aeabi_atexit.c
-lib_a_LIBADD = $(extra_objs)
-lib_a_DEPENDENCIES = $(extra_objs)
-
-if MAY_SUPPLY_SYSCALLS
-all: crt0.o
-endif
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/arm/Makefile.in b/newlib/libc/sys/arm/Makefile.in
deleted file mode 100644
index 323db9c9b..000000000
--- a/newlib/libc/sys/arm/Makefile.in
+++ /dev/null
@@ -1,332 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-@MAY_SUPPLY_SYSCALLS_TRUE@extra_objs = libcfunc.o trap.o syscalls.o
-@MAY_SUPPLY_SYSCALLS_FALSE@extra_objs =
-
-lib_a_SOURCES = aeabi_atexit.c
-lib_a_LIBADD = $(extra_objs)
-lib_a_DEPENDENCIES = $(extra_objs)
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_OBJECTS = aeabi_atexit.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-@MAY_SUPPLY_SYSCALLS_TRUE@all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/arm/aclocal.m4 b/newlib/libc/sys/arm/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/arm/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/arm/aeabi_atexit.c b/newlib/libc/sys/arm/aeabi_atexit.c
deleted file mode 100644
index 4b600e250..000000000
--- a/newlib/libc/sys/arm/aeabi_atexit.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <stdlib.h>
-
-/* Register a function to be called by exit or when a shared library
- is unloaded. This routine is like __cxa_atexit, but uses the
- calling sequence required by the ARM EABI. */
-int
-__aeabi_atexit (void *arg, void (*func) (void *), void *d)
-{
- return __cxa_atexit (func, arg, d);
-}
diff --git a/newlib/libc/sys/arm/configure b/newlib/libc/sys/arm/configure
deleted file mode 100755
index 106d8eabf..000000000
--- a/newlib/libc/sys/arm/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=trap.S
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/arm/configure.in b/newlib/libc/sys/arm/configure.in
deleted file mode 100644
index eeac4889f..000000000
--- a/newlib/libc/sys/arm/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/arm configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(trap.S)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/arm/crt0.S b/newlib/libc/sys/arm/crt0.S
deleted file mode 100644
index 8a8372a88..000000000
--- a/newlib/libc/sys/arm/crt0.S
+++ /dev/null
@@ -1,289 +0,0 @@
-#include "newlib.h"
-#include "swi.h"
-
-/* ANSI concatenation macros. */
-#define CONCAT(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a ## b
-
-#ifdef __USER_LABEL_PREFIX__
-#define FUNCTION( name ) CONCAT (__USER_LABEL_PREFIX__, name)
-#else
-#error __USER_LABEL_PREFIX is not defined
-#endif
-
-#ifdef HAVE_INITFINI_ARRAY
-#define _init __libc_init_array
-#define _fini __libc_fini_array
-#endif
-
-/* .text is used instead of .section .text so it works with arm-aout too. */
- .text
- .code 32
- .align 0
-
- .global _mainCRTStartup
- .global _start
- .global start
-start:
-_start:
-_mainCRTStartup:
-#if defined(__ELF__) && !defined(__USING_SJLJ_EXCEPTIONS__)
- /* Annotation for EABI unwinding tables. */
- .fnstart
-#endif
-
-/* Start by setting up a stack */
-#ifdef ARM_RDP_MONITOR
- /* Issue Demon SWI to read stack info */
- swi SWI_GetEnv /* Returns command line in r0 */
- mov sp,r1 /* and the highest memory address in r1 */
- ldr sl, .LC2 /* stack limit is at end of data */
- add sl, sl, #256 /* allow slop for stack overflow handling */
- /* and small frames */
-#else
-#ifdef ARM_RDI_MONITOR
- /* Issue Angel SWI to read stack info */
- mov r0, #AngelSWI_Reason_HeapInfo
- adr r1, .LC0 /* point at ptr to 4 words to receive data */
- swi AngelSWI_ARM /* We are always in ARM mode for startup */
- ldr r0, .LC0 /* point at values read */
- ldr sp, [r0, #8]
- ldr sl, [r0, #12]
- add sl, sl, #256 /* allow slop for stack overflow handling */
- /* and small frames */
-#else
- /* Set up the stack pointer to a fixed value */
- ldr r3, .LC0
- mov sp, r3
- /* Setup a default stack-limit in-case the code has been
- compiled with "-mapcs-stack-check". Hard-wiring this value
- is not ideal, since there is currently no support for
- checking that the heap and stack have not collided, or that
- this default 64k is enough for the program being executed.
- However, it ensures that this simple crt0 world will not
- immediately cause an overflow event: */
- sub sl, sp, #64 << 10 /* Still assumes 256bytes below sl */
-#endif
-#endif
- /* Zero the memory in the .bss section. */
- mov a2, #0 /* Second arg: fill value */
- mov fp, a2 /* Null frame pointer */
- mov r7, a2 /* Null frame pointer for Thumb */
-
- ldr a1, .LC1 /* First arg: start of memory block */
- ldr a3, .LC2
- sub a3, a3, a1 /* Third arg: length of block */
-
-
-#ifdef __thumb__ /* Enter Thumb mode.... */
-
- add a4, pc, #1 /* Get the address of the Thumb block */
- bx a4 /* Go there and start Thumb decoding */
-
- .code 16
- .global __change_mode
- .thumb_func
-__change_mode:
-#endif
-
- bl FUNCTION (memset)
-#if !defined (ARM_RDP_MONITOR) && !defined (ARM_RDI_MONITOR)
- mov r0, #0 /* no arguments */
- mov r1, #0 /* no argv either */
-#else
- /* Need to set up standard file handles */
- bl FUNCTION (initialise_monitor_handles)
-
-#ifdef ARM_RDP_MONITOR
- swi SWI_GetEnv /* sets r0 to point to the command line */
- mov r1, r0
-#else
- mov r0, #AngelSWI_Reason_GetCmdLine
- adr r1, .LC30 /* Space for command line */
- swi AngelSWI
- ldr r1, .LC30
-#endif
- /* Parse string at r1 */
- mov r0, #0 /* count of arguments so far */
- /* Push a NULL argument onto the end of the list. */
-#ifdef __thumb__
- push {r0}
-#else
- stmfd sp!, {r0}
-#endif
-.LC10:
-/* Skip leading blanks */
-#ifdef __thumb__
- ldrb r3, [r1]
- add r1, #1
-#else
- ldrb r3, [r1], #1
-#endif
- cmp r3, #0
- beq .LC12
- cmp r3, #' '
- beq .LC10
-
-/* See whether we are scanning a string */
- cmp r3, #'"'
-#ifdef __thumb__
- beq .LC20
- cmp r3, #'\''
- bne .LC21
-.LC20:
- mov r2, r3
- b .LC22
-
-.LC21:
- mov r2, #' ' /* terminator type */
- sub r1, r1, #1 /* adjust back to point at start char */
-.LC22:
-#else
- cmpne r3, #'\''
- moveq r2, r3
- movne r2, #' ' /* terminator type */
- subne r1, r1, #1 /* adjust back to point at start char */
-#endif
-
-/* Stack a pointer to the current argument */
-#ifdef __thumb__
- push {r1}
-#else
- stmfd sp!, {r1}
-#endif
- add r0, r0, #1
-.LC11:
-#ifdef __thumb__
- ldrb r3, [r1]
- add r1, #1
-#else
- ldrb r3, [r1], #1
-#endif
- cmp r3, #0
- beq .LC12
- cmp r2, r3 /* reached terminator? */
- bne .LC11
- mov r2, #0
- sub r3, r1, #1
- strb r2, [r3] /* terminate the arg string */
- b .LC10
-
-.LC12:
- mov r1, sp /* point at stacked arg pointers */
- /* We've now got the stacked args in order reverse the */
-#ifdef __thumb__
- mov r2, r0
- lsl r2, #2
- add r2, sp
- mov r3, sp
-.LC15: cmp r2, r3
- bls .LC14
- sub r2, #4
- ldr r4, [r2]
- ldr r5, [r3]
- str r5, [r2]
- str r4, [r3]
- add r3, #4
- b .LC15
-.LC14:
- /* Ensure doubleword stack alignment. */
- mov r4, sp
- mov r5, #7
- bic r4, r5
- mov sp, r4
-#else
- add r2, sp, r0, LSL #2 /* End of args */
- mov r3, sp /* Start of args */
-.LC13: cmp r2, r3
- ldrhi r4,[r2, #-4] /* Reverse ends of list */
- ldrhi r5, [r3]
- strhi r5, [r2, #-4]!
- strhi r4, [r3], #4
- bhi .LC13
- /* Ensure doubleword stack alignment. */
- bic sp, sp, #7
-#endif
-#endif
-
-#ifdef __USES_INITFINI__
- /* Some arm/elf targets use the .init and .fini sections
- to create constructors and destructors, and for these
- targets we need to call the _init function and arrange
- for _fini to be called at program exit. */
- mov r4, r0
- mov r5, r1
- ldr r0, .Lfini
- bl FUNCTION (atexit)
- bl FUNCTION (_init)
- mov r0, r4
- mov r1, r5
-#endif
- bl FUNCTION (main)
-
- bl FUNCTION (exit) /* Should not return. */
-
-#ifdef __thumb__
- /* Come out of Thumb mode. This code should be redundant. */
-
- mov a4, pc
- bx a4
-
- .code 32
- .global change_back
-change_back:
- /* Halt the execution. This code should never be executed. */
- /* With no debug monitor, this probably aborts (eventually).
- With a Demon debug monitor, this halts cleanly.
- With an Angel debug monitor, this will report 'Unknown SWI'. */
- swi SWI_Exit
-#endif
-
- /* For Thumb, constants must be after the code since only
- positive offsets are supported for PC relative addresses. */
-
- .align 0
-.LC0:
-#ifdef ARM_RDI_MONITOR
- .word HeapBase
-#else
-#ifndef ARM_RDP_MONITOR
-#ifdef __pe__
- .word 0x800000
-#else
-/* .word 0x80000 */ /* Top of RAM on the PIE board. */
-#endif
-#endif
-#endif
-#if defined(__ELF__) && !defined(__USING_SJLJ_EXCEPTIONS__)
- /* Protect against unhandled exceptions. */
- .cantunwind
- .fnend
-#endif
-.LC1:
- .word __bss_start__
-.LC2:
- .word __bss_end__
-#ifdef __USES_INITFINI__
-.Lfini:
- .word FUNCTION(_fini)
-#endif
-#ifdef ARM_RDI_MONITOR
-.LC30:
- .word CommandLine
- .word 255
-
-/* Workspace for Angel calls. */
- .data
-/* Data returned by monitor SWI. */
-.global __stack_base__
-HeapBase: .word 0
-HeapLimit: .word 0
-__stack_base__: .word 0
-StackLimit: .word 0
-CommandLine: .space 256,0 /* Maximum length of 255 chars handled. */
-#endif
-
-#ifdef __pe__
- .section .idata$3
- .long 0,0,0,0,0,0,0,0
-#endif
diff --git a/newlib/libc/sys/arm/libcfunc.c b/newlib/libc/sys/arm/libcfunc.c
deleted file mode 100644
index ddc611f34..000000000
--- a/newlib/libc/sys/arm/libcfunc.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Support files for GNU libc. Files in the C namespace go here.
- Files in the system namespace (ie those that start with an underscore)
- go in syscalls.c.
-
- Note: These functions are in a seperate file so that OS providers can
- overrride the system call stubs (defined in syscalls.c) without having
- to provide libc funcitons as well. */
-#include "swi.h"
-
-#ifdef ARM_RDI_MONITOR
-
-static inline int
-do_AngelSWI (int reason, void * arg)
-{
- int value;
- asm volatile ("mov r0, %1; mov r1, %2; swi %a3; mov %0, r0"
- : "=r" (value) /* Outputs */
- : "r" (reason), "r" (arg), "i" (AngelSWI) /* Inputs */
- : "r0", "r1", "lr"
- /* Clobbers r0 and r1, and lr if in supervisor mode */);
- return value;
-}
-#endif /* ARM_RDI_MONITOR */
-
-
-void
-abort (void)
-{
-#ifdef ARM_RDI_MONITOR
- do_AngelSWI (AngelSWI_Reason_ReportException,
- (void *) ADP_Stopped_RunTimeError);
-#else
- asm ("mov r0,#17\nswi %a0" :: "i" (SWI_Exit));
-#endif
-}
-
-void
-alarm (void)
-{
-}
diff --git a/newlib/libc/sys/arm/swi.h b/newlib/libc/sys/arm/swi.h
deleted file mode 100644
index 15c3866a1..000000000
--- a/newlib/libc/sys/arm/swi.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* SWI numbers for RDP (Demon) monitor. */
-#define SWI_WriteC 0x0
-#define SWI_Write0 0x2
-#define SWI_ReadC 0x4
-#define SWI_CLI 0x5
-#define SWI_GetEnv 0x10
-#define SWI_Exit 0x11
-#define SWI_EnterOS 0x16
-
-#define SWI_GetErrno 0x60
-#define SWI_Clock 0x61
-#define SWI_Time 0x63
-#define SWI_Remove 0x64
-#define SWI_Rename 0x65
-#define SWI_Open 0x66
-
-#define SWI_Close 0x68
-#define SWI_Write 0x69
-#define SWI_Read 0x6a
-#define SWI_Seek 0x6b
-#define SWI_Flen 0x6c
-
-#define SWI_IsTTY 0x6e
-#define SWI_TmpNam 0x6f
-#define SWI_InstallHandler 0x70
-#define SWI_GenerateError 0x71
-
-
-/* Now the SWI numbers and reason codes for RDI (Angel) monitors. */
-#define AngelSWI_ARM 0x123456
-#ifdef __thumb__
-#define AngelSWI 0xAB
-#else
-#define AngelSWI AngelSWI_ARM
-#endif
-
-/* The reason codes: */
-#define AngelSWI_Reason_Open 0x01
-#define AngelSWI_Reason_Close 0x02
-#define AngelSWI_Reason_WriteC 0x03
-#define AngelSWI_Reason_Write0 0x04
-#define AngelSWI_Reason_Write 0x05
-#define AngelSWI_Reason_Read 0x06
-#define AngelSWI_Reason_ReadC 0x07
-#define AngelSWI_Reason_IsTTY 0x09
-#define AngelSWI_Reason_Seek 0x0A
-#define AngelSWI_Reason_FLen 0x0C
-#define AngelSWI_Reason_TmpNam 0x0D
-#define AngelSWI_Reason_Remove 0x0E
-#define AngelSWI_Reason_Rename 0x0F
-#define AngelSWI_Reason_Clock 0x10
-#define AngelSWI_Reason_Time 0x11
-#define AngelSWI_Reason_System 0x12
-#define AngelSWI_Reason_Errno 0x13
-#define AngelSWI_Reason_GetCmdLine 0x15
-#define AngelSWI_Reason_HeapInfo 0x16
-#define AngelSWI_Reason_EnterSVC 0x17
-#define AngelSWI_Reason_ReportException 0x18
-#define ADP_Stopped_ApplicationExit ((2 << 16) + 38)
-#define ADP_Stopped_RunTimeError ((2 << 16) + 35)
diff --git a/newlib/libc/sys/arm/sys/param.h b/newlib/libc/sys/arm/sys/param.h
deleted file mode 100644
index adc066e9a..000000000
--- a/newlib/libc/sys/arm/sys/param.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* ARM configuration file; HZ is 100 rather than the default 60 */
-
-#ifndef _SYS_PARAM_H
-# define _SYS_PARAM_H
-
-# define HZ (100)
-# define NOFILE (60)
-# define PATHSIZE (1024)
-
-#define BIG_ENDIAN 4321
-#define LITTLE_ENDIAN 1234
-
-#ifdef __ARMEB__
-#define BYTE_ORDER BIG_ENDIAN
-#else
-#define BYTE_ORDER LITTLE_ENDIAN
-#endif
-
-#endif
diff --git a/newlib/libc/sys/arm/syscalls.c b/newlib/libc/sys/arm/syscalls.c
deleted file mode 100644
index e89022806..000000000
--- a/newlib/libc/sys/arm/syscalls.c
+++ /dev/null
@@ -1,622 +0,0 @@
-/* Support files for GNU libc. Files in the system namespace go here.
- Files in the C namespace (ie those that do not start with an
- underscore) go in .c. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/fcntl.h>
-#include <stdio.h>
-#include <time.h>
-#include <sys/time.h>
-#include <sys/times.h>
-#include <errno.h>
-#include <reent.h>
-#include <unistd.h>
-#include "swi.h"
-
-/* Forward prototypes. */
-int _system _PARAMS ((const char *));
-int _rename _PARAMS ((const char *, const char *));
-int isatty _PARAMS ((int));
-clock_t _times _PARAMS ((struct tms *));
-int _gettimeofday _PARAMS ((struct timeval *, struct timezone *));
-void _raise _PARAMS ((void));
-int _unlink _PARAMS ((void));
-int _link _PARAMS ((void));
-int _stat _PARAMS ((const char *, struct stat *));
-int _fstat _PARAMS ((int, struct stat *));
-caddr_t _sbrk _PARAMS ((int));
-int _getpid _PARAMS ((int));
-int _kill _PARAMS ((int, int));
-void _exit _PARAMS ((int));
-int _close _PARAMS ((int));
-int _swiclose _PARAMS ((int));
-int _open _PARAMS ((const char *, int, ...));
-int _swiopen _PARAMS ((const char *, int));
-int _write _PARAMS ((int, char *, int));
-int _swiwrite _PARAMS ((int, char *, int));
-int _lseek _PARAMS ((int, int, int));
-int _swilseek _PARAMS ((int, int, int));
-int _read _PARAMS ((int, char *, int));
-int _swiread _PARAMS ((int, char *, int));
-void initialise_monitor_handles _PARAMS ((void));
-
-static int wrap _PARAMS ((int));
-static int error _PARAMS ((int));
-static int get_errno _PARAMS ((void));
-static int remap_handle _PARAMS ((int));
-static int do_AngelSWI _PARAMS ((int, void *));
-static int findslot _PARAMS ((int));
-
-/* Register name faking - works in collusion with the linker. */
-register char * stack_ptr asm ("sp");
-
-
-/* following is copied from libc/stdio/local.h to check std streams */
-extern void _EXFUN(__sinit,(struct _reent *));
-#define CHECK_INIT(ptr) \
- do \
- { \
- if ((ptr) && !(ptr)->__sdidinit) \
- __sinit (ptr); \
- } \
- while (0)
-
-/* Adjust our internal handles to stay away from std* handles. */
-#define FILE_HANDLE_OFFSET (0x20)
-
-static int monitor_stdin;
-static int monitor_stdout;
-static int monitor_stderr;
-
-/* Struct used to keep track of the file position, just so we
- can implement fseek(fh,x,SEEK_CUR). */
-typedef struct
-{
- int handle;
- int pos;
-}
-poslog;
-
-#define MAX_OPEN_FILES 20
-static poslog openfiles [MAX_OPEN_FILES];
-
-static int
-findslot (int fh)
-{
- int i;
- for (i = 0; i < MAX_OPEN_FILES; i ++)
- if (openfiles[i].handle == fh)
- break;
- return i;
-}
-
-#ifdef ARM_RDI_MONITOR
-
-static inline int
-do_AngelSWI (int reason, void * arg)
-{
- int value;
- asm volatile ("mov r0, %1; mov r1, %2; swi %a3; mov %0, r0"
- : "=r" (value) /* Outputs */
- : "r" (reason), "r" (arg), "i" (AngelSWI) /* Inputs */
- : "r0", "r1", "r2", "r3", "ip", "lr", "memory", "cc"
- /* Clobbers r0 and r1, and lr if in supervisor mode */);
- /* Accordingly to page 13-77 of ARM DUI 0040D other registers
- can also be clobbered. Some memory positions may also be
- changed by a system call, so they should not be kept in
- registers. Note: we are assuming the manual is right and
- Angel is respecting the APCS. */
- return value;
-}
-#endif /* ARM_RDI_MONITOR */
-
-/* Function to convert std(in|out|err) handles to internal versions. */
-static int
-remap_handle (int fh)
-{
- CHECK_INIT(_REENT);
-
- if (fh == STDIN_FILENO)
- return monitor_stdin;
- if (fh == STDOUT_FILENO)
- return monitor_stdout;
- if (fh == STDERR_FILENO)
- return monitor_stderr;
-
- return fh - FILE_HANDLE_OFFSET;
-}
-
-void
-initialise_monitor_handles (void)
-{
- int i;
-
-#ifdef ARM_RDI_MONITOR
- int volatile block[3];
-
- block[0] = (int) ":tt";
- block[2] = 3; /* length of filename */
- block[1] = 0; /* mode "r" */
- monitor_stdin = do_AngelSWI (AngelSWI_Reason_Open, (void *) block);
-
- block[0] = (int) ":tt";
- block[2] = 3; /* length of filename */
- block[1] = 4; /* mode "w" */
- monitor_stdout = monitor_stderr = do_AngelSWI (AngelSWI_Reason_Open, (void *) block);
-#else
- int fh;
- const char * name;
-
- name = ":tt";
- asm ("mov r0,%2; mov r1, #0; swi %a1; mov %0, r0"
- : "=r"(fh)
- : "i" (SWI_Open),"r"(name)
- : "r0","r1");
- monitor_stdin = fh;
-
- name = ":tt";
- asm ("mov r0,%2; mov r1, #4; swi %a1; mov %0, r0"
- : "=r"(fh)
- : "i" (SWI_Open),"r"(name)
- : "r0","r1");
- monitor_stdout = monitor_stderr = fh;
-#endif
-
- for (i = 0; i < MAX_OPEN_FILES; i ++)
- openfiles[i].handle = -1;
-
- openfiles[0].handle = monitor_stdin;
- openfiles[0].pos = 0;
- openfiles[1].handle = monitor_stdout;
- openfiles[1].pos = 0;
-}
-
-static int
-get_errno (void)
-{
-#ifdef ARM_RDI_MONITOR
- return do_AngelSWI (AngelSWI_Reason_Errno, NULL);
-#else
- asm ("swi %a0" :: "i" (SWI_GetErrno));
-#endif
-}
-
-static int
-error (int result)
-{
- errno = get_errno ();
- return result;
-}
-
-static int
-wrap (int result)
-{
- if (result == -1)
- return error (-1);
- return result;
-}
-
-/* Returns # chars not! written. */
-int
-_swiread (int file,
- char * ptr,
- int len)
-{
- int fh = remap_handle (file);
-#ifdef ARM_RDI_MONITOR
- int block[3];
-
- block[0] = fh;
- block[1] = (int) ptr;
- block[2] = len;
-
- return do_AngelSWI (AngelSWI_Reason_Read, block);
-#else
- asm ("mov r0, %1; mov r1, %2;mov r2, %3; swi %a0"
- : /* No outputs */
- : "i"(SWI_Read), "r"(fh), "r"(ptr), "r"(len)
- : "r0","r1","r2");
-#endif
-}
-
-int
-_read (int file,
- char * ptr,
- int len)
-{
- int slot = findslot (remap_handle (file));
- int x = _swiread (file, ptr, len);
-
- if (x < 0)
- return error (-1);
-
- if (slot != MAX_OPEN_FILES)
- openfiles [slot].pos += len - x;
-
- /* x == len is not an error, at least if we want feof() to work. */
- return len - x;
-}
-
-int
-_swilseek (int file,
- int ptr,
- int dir)
-{
- int res;
- int fh = remap_handle (file);
- int slot = findslot (fh);
-#ifdef ARM_RDI_MONITOR
- int block[2];
-#endif
-
- if (dir == SEEK_CUR)
- {
- if (slot == MAX_OPEN_FILES)
- return -1;
- ptr = openfiles[slot].pos + ptr;
- dir = SEEK_SET;
- }
-
-#ifdef ARM_RDI_MONITOR
- if (dir == SEEK_END)
- {
- block[0] = fh;
- ptr += do_AngelSWI (AngelSWI_Reason_FLen, block);
- }
-
- /* This code only does absolute seeks. */
- block[0] = remap_handle (file);
- block[1] = ptr;
- res = do_AngelSWI (AngelSWI_Reason_Seek, block);
-#else
- if (dir == SEEK_END)
- {
- asm ("mov r0, %2; swi %a1; mov %0, r0"
- : "=r" (res)
- : "i" (SWI_Flen), "r" (fh)
- : "r0");
- ptr += res;
- }
-
- /* This code only does absolute seeks. */
- asm ("mov r0, %2; mov r1, %3; swi %a1; mov %0, r0"
- : "=r" (res)
- : "i" (SWI_Seek), "r" (fh), "r" (ptr)
- : "r0", "r1");
-#endif
-
- if (slot != MAX_OPEN_FILES && res == 0)
- openfiles[slot].pos = ptr;
-
- /* This is expected to return the position in the file. */
- return res == 0 ? ptr : -1;
-}
-
-int
-_lseek (int file,
- int ptr,
- int dir)
-{
- return wrap (_swilseek (file, ptr, dir));
-}
-
-/* Returns #chars not! written. */
-int
-_swiwrite (
- int file,
- char * ptr,
- int len)
-{
- int fh = remap_handle (file);
-#ifdef ARM_RDI_MONITOR
- int block[3];
-
- block[0] = fh;
- block[1] = (int) ptr;
- block[2] = len;
-
- return do_AngelSWI (AngelSWI_Reason_Write, block);
-#else
- asm ("mov r0, %1; mov r1, %2;mov r2, %3; swi %a0"
- : /* No outputs */
- : "i"(SWI_Write), "r"(fh), "r"(ptr), "r"(len)
- : "r0","r1","r2");
-#endif
-}
-
-int
-_write (int file,
- char * ptr,
- int len)
-{
- int slot = findslot (remap_handle (file));
- int x = _swiwrite (file, ptr,len);
-
- if (x == -1 || x == len)
- return error (-1);
-
- if (slot != MAX_OPEN_FILES)
- openfiles[slot].pos += len - x;
-
- return len - x;
-}
-
-extern int strlen (const char *);
-
-int
-_swiopen (const char * path,
- int flags)
-{
- int aflags = 0, fh;
-#ifdef ARM_RDI_MONITOR
- int block[3];
-#endif
-
- int i = findslot (-1);
-
- if (i == MAX_OPEN_FILES)
- return -1;
-
- /* The flags are Unix-style, so we need to convert them. */
-#ifdef O_BINARY
- if (flags & O_BINARY)
- aflags |= 1;
-#endif
-
- if (flags & O_RDWR)
- aflags |= 2;
-
- if (flags & O_CREAT)
- aflags |= 4;
-
- if (flags & O_TRUNC)
- aflags |= 4;
-
- if (flags & O_APPEND)
- {
- aflags &= ~4; /* Can't ask for w AND a; means just 'a'. */
- aflags |= 8;
- }
-
-#ifdef ARM_RDI_MONITOR
- block[0] = (int) path;
- block[2] = strlen (path);
- block[1] = aflags;
-
- fh = do_AngelSWI (AngelSWI_Reason_Open, block);
-
-#else
- asm ("mov r0,%2; mov r1, %3; swi %a1; mov %0, r0"
- : "=r"(fh)
- : "i" (SWI_Open),"r"(path),"r"(aflags)
- : "r0","r1");
-#endif
-
- if (fh >= 0)
- {
- openfiles[i].handle = fh;
- openfiles[i].pos = 0;
- }
-
- return fh >= 0 ? fh + FILE_HANDLE_OFFSET : error (fh);
-}
-
-int
-_open (const char * path,
- int flags,
- ...)
-{
- return wrap (_swiopen (path, flags));
-}
-
-int
-_swiclose (int file)
-{
- int myhan = remap_handle (file);
- int slot = findslot (myhan);
-
- if (slot != MAX_OPEN_FILES)
- openfiles[slot].handle = -1;
-
-#ifdef ARM_RDI_MONITOR
- return do_AngelSWI (AngelSWI_Reason_Close, & myhan);
-#else
- asm ("mov r0, %1; swi %a0" :: "i" (SWI_Close),"r"(myhan):"r0");
-#endif
-}
-
-int
-_close (int file)
-{
- return wrap (_swiclose (file));
-}
-
-void
-_exit (int n)
-{
- /* FIXME: return code is thrown away. */
-
-#ifdef ARM_RDI_MONITOR
- do_AngelSWI (AngelSWI_Reason_ReportException,
- (void *) ADP_Stopped_ApplicationExit);
-#else
- asm ("swi %a0" :: "i" (SWI_Exit));
-#endif
- n = n;
-}
-
-int
-_kill (int n, int m)
-{
-#ifdef ARM_RDI_MONITOR
- return do_AngelSWI (AngelSWI_Reason_ReportException,
- (void *) ADP_Stopped_ApplicationExit);
-#else
- asm ("swi %a0" :: "i" (SWI_Exit));
-#endif
- n = n; m = m;
-}
-
-int
-_getpid (int n)
-{
- return 1;
- n = n;
-}
-
-caddr_t
-_sbrk (int incr)
-{
- extern char end asm ("end"); /* Defined by the linker. */
- static char * heap_end;
- char * prev_heap_end;
-
- if (heap_end == NULL)
- heap_end = & end;
-
- prev_heap_end = heap_end;
-
- if (heap_end + incr > stack_ptr)
- {
- /* Some of the libstdc++-v3 tests rely upon detecting
- out of memory errors, so do not abort here. */
-#if 0
- extern void abort (void);
-
- _write (1, "_sbrk: Heap and stack collision\n", 32);
-
- abort ();
-#else
- errno = ENOMEM;
- return (caddr_t) -1;
-#endif
- }
-
- heap_end += incr;
-
- return (caddr_t) prev_heap_end;
-}
-
-extern void memset (struct stat *, int, unsigned int);
-
-int
-_fstat (int file, struct stat * st)
-{
- memset (st, 0, sizeof (* st));
- st->st_mode = S_IFCHR;
- st->st_blksize = 1024;
- return 0;
- file = file;
-}
-
-int _stat (const char *fname, struct stat *st)
-{
- int file;
-
- /* The best we can do is try to open the file readonly. If it exists,
- then we can guess a few things about it. */
- if ((file = _open (fname, O_RDONLY)) < 0)
- return -1;
-
- memset (st, 0, sizeof (* st));
- st->st_mode = S_IFREG | S_IREAD;
- st->st_blksize = 1024;
- _swiclose (file); /* Not interested in the error. */
- return 0;
-}
-
-int
-_link (void)
-{
- return -1;
-}
-
-int
-_unlink (void)
-{
- return -1;
-}
-
-void
-_raise (void)
-{
- return;
-}
-
-int
-_gettimeofday (struct timeval * tp, struct timezone * tzp)
-{
-
- if (tp)
- {
- /* Ask the host for the seconds since the Unix epoch. */
-#ifdef ARM_RDI_MONITOR
- tp->tv_sec = do_AngelSWI (AngelSWI_Reason_Time,NULL);
-#else
- {
- int value;
- asm ("swi %a1; mov %0, r0" : "=r" (value): "i" (SWI_Time) : "r0");
- tp->tv_sec = value;
- }
-#endif
- tp->tv_usec = 0;
- }
-
- /* Return fixed data for the timezone. */
- if (tzp)
- {
- tzp->tz_minuteswest = 0;
- tzp->tz_dsttime = 0;
- }
-
- return 0;
-}
-
-/* Return a clock that ticks at 100Hz. */
-clock_t
-_times (struct tms * tp)
-{
- clock_t timeval;
-
-#ifdef ARM_RDI_MONITOR
- timeval = do_AngelSWI (AngelSWI_Reason_Clock,NULL);
-#else
- asm ("swi %a1; mov %0, r0" : "=r" (timeval): "i" (SWI_Clock) : "r0");
-#endif
-
- if (tp)
- {
- tp->tms_utime = timeval; /* user time */
- tp->tms_stime = 0; /* system time */
- tp->tms_cutime = 0; /* user time, children */
- tp->tms_cstime = 0; /* system time, children */
- }
-
- return timeval;
-};
-
-
-int
-isatty (int fd)
-{
- return 1;
- fd = fd;
-}
-
-int
-_system (const char *s)
-{
- if (s == NULL)
- return 0;
- errno = ENOSYS;
- return -1;
-}
-
-int
-_rename (const char * oldpath, const char * newpath)
-{
- errno = ENOSYS;
- return -1;
-}
diff --git a/newlib/libc/sys/arm/trap.S b/newlib/libc/sys/arm/trap.S
deleted file mode 100644
index 328fabca5..000000000
--- a/newlib/libc/sys/arm/trap.S
+++ /dev/null
@@ -1,93 +0,0 @@
- /* Run-time exception support */
-#include "swi.h"
-
-/* .text is used instead of .section .text so it works with arm-aout too. */
- .text
- .align 0
- .global __rt_stkovf_split_big
- .global __rt_stkovf_split_small
-
-/* The following functions are provided for software stack checking.
- If hardware stack-checking is being used then the code can be
- compiled without the PCS entry checks, and simply rely on VM
- management to extend the stack for a thread.
-
- The stack extension event occurs when the PCS function entry code
- would result in a stack-pointer beneath the stack-limit register
- value. The system relies on the following map:
-
- +-----------------------------------+ <-- end of stack block
- | ... |
- | ... |
- | active stack |
- | ... | <-- sp (stack-pointer) somewhere in here
- | ... |
- +-----------------------------------+ <-- sl (stack-limit)
- | stack-extension handler workspace |
- +-----------------------------------+ <-- base of stack block
-
- The "stack-extension handler workspace" is an amount of memory in
- which the stack overflow support code must execute. It must be
- large enough to deal with the worst case path through the extension
- code. At the moment the compiler expects this to be AT LEAST
- 256bytes. It uses this fact to code functions with small local
- data usage within the overflow space.
-
- In a true target environment We may need to increase the space
- between sl and the true limit to allow for the stack extension
- code, SWI handlers and for undefined instruction handlers of the
- target environment. */
-
-__rt_stkovf_split_small:
- mov ip,sp @ Ensure we can calculate the stack required
- @ and fall through to...
-__rt_stkovf_split_big:
- @ in: sp = current stack-pointer (beneath stack-limit)
- @ sl = current stack-limit
- @ ip = low stack point we require for the current function
- @ lr = return address into the current function
- @ fp = frame-pointer
- @ original sp --> +----------------------------------+
- @ | pc (12 ahead of PCS entry store) |
- @ current fp ---> +----------------------------------+
- @ | lr (on entry) pc (on exit) |
- @ +----------------------------------+
- @ | sp ("original sp" on entry) |
- @ +----------------------------------+
- @ | fp (on entry to function) |
- @ +----------------------------------+
- @ | |
- @ | ..argument and work registers.. |
- @ | |
- @ current sp ---> +----------------------------------+
- @
- @ The "current sl" is somewhere between "original sp" and "current sp"
- @ but above "true sl". The "current sl" should be at least 256bytes
- @ above the "true sl". The 256byte stack guard should be large enough
- @ to deal with the worst case function entry stacking (160bytes) plus
- @ the stack overflow handler stacking requirements, plus the stack
- @ required for the memory allocation routines.
- @
- @ Normal PCS entry (before stack overflow check) can stack 16
- @ standard registers (64bytes) and 8 floating point registers
- @ (96bytes). This gives a minimum stack guard of 160bytes (excluding
- @ the stack required for the code). (Actually only a maximum of
- @ 14standard registers are ever stacked on entry to a function).
- @
- @ NOTE: Structure returns are performed by the caller allocating a
- @ dummy space on the stack and passing in a "phantom" arg1 into
- @ the function. This means that we do not need to worry about
- @ preserving the stack under "sp" even on function return.
- @
- @ Code should never poke values beneath sp. The sp register
- @ should always be "dropped" first to cover the data. This
- @ protects the data against any events that may try and use
- @ the stack.
-
- SUB ip, sp, ip @ extra stack required for function
- @ Add stack extension code here. If desired a new stack chunk
- @ can be allocated, and the register state updated suitably.
-
- @ We now know how much extra stack the function requires.
- @ Terminate the program for the moment:
- swi SWI_Exit
diff --git a/newlib/libc/sys/configure b/newlib/libc/sys/configure
deleted file mode 100755
index 7013ea4ea..000000000
--- a/newlib/libc/sys/configure
+++ /dev/null
@@ -1,3429 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-shared[=PKGS] build shared libraries [default=yes]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=a29khif
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../.. $srcdir/../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../.. $srcdir/../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:590: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:643: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:700: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:733: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 738 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:766: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 771 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../.."
- fi
-else
- newlib_basedir="${srcdir}/../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:948: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:969: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:987: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1030: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1043: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1056: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1069: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1082: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1107: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1137: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1186: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1210: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1241: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1273: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1305: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1337: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1382: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1436: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1470: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-if test "${use_libtool}" = "yes"; then
-
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_shared=yes
-fi
-
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
- enableval="$enable_static"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_static=yes
-fi
-
-# Check whether --enable-fast-install or --disable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
- enableval="$enable_fast_install"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_fast_install=yes
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1655: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1685: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1736: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1779 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1810: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1815: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1843: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1886: checking for ld used by GCC" >&5
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1916: checking for GNU ld" >&5
-else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1919: checking for non-GNU ld" >&5
-fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
-echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1954: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi
-fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1971: checking for $LD option to reload object files" >&5
-if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-
-echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-
-echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1983: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi
-fi
-
-NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
-
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:2021: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
-else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:2042: checking how to recognise dependant libraries" >&5
-if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.012)
- lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd* )
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
- fi
- ;;
-
-newsos6)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-sysv5uw[78]* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-
-fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2215: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:2245: checking for ${ac_tool_prefix}file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:2307: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2378: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2410: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2445: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_STRIP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2477: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- STRIP=":"
-fi
-fi
-
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-
-libtool_flags="$libtool_flags --enable-win32-dll"
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
- :
-fi
-
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
-else
- pic_mode=default
-fi
-
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 2544 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2582: checking whether the C compiler needs -belf" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 2595 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_needs_belf=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
-fi
-rm -f conftest*
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-fi
-
-echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2632: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_DLLTOOL"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2664: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- DLLTOOL="false"
-fi
-fi
-
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2699: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AS"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2731: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AS="false"
-fi
-fi
-
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2766: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_OBJDUMP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2798: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- OBJDUMP="false"
-fi
-fi
-
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
-echo "configure:2834: checking if libtool should supply DllMain function" >&5
-if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2839 "configure"
-#include "confdefs.h"
-
-int main() {
-extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:2847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_need_dllmain=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_need_dllmain=yes
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_need_dllmain" 1>&6
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
-echo "configure:2868: checking how to link DLLs" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2873 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_dll_switch=-mdll
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_dll_switch=-dll
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
-
-esac
-
-
-# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
-
-# Reload cache, that may have been modified by ltconfig
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-
-
-
-
-
-
-fi
-
-if test -n "${sys_dir}"; then
- subdirs="${sys_dir}"
-
-fi
-
-CRT0=
-if test "x${have_crt0}" = "xyes"; then
- CRT0=crt0.o
-fi
-
-
-
-
-if test x${sys_dir} != x; then
- HAVE_SYS_DIR_TRUE=
- HAVE_SYS_DIR_FALSE='#'
-else
- HAVE_SYS_DIR_TRUE='#'
- HAVE_SYS_DIR_FALSE=
-fi
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-s%@LN_S@%$LN_S%g
-s%@STRIP@%$STRIP%g
-s%@DLLTOOL@%$DLLTOOL%g
-s%@OBJDUMP@%$OBJDUMP%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@subdirs@%$subdirs%g
-s%@CRT0@%$CRT0%g
-s%@HAVE_SYS_DIR_TRUE@%$HAVE_SYS_DIR_TRUE%g
-s%@HAVE_SYS_DIR_FALSE@%$HAVE_SYS_DIR_FALSE%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-if test "$no_recursion" != yes; then
-
- # Remove --cache-file and --srcdir arguments so they do not pile up.
- ac_sub_configure_args=
- ac_prev=
- for ac_arg in $ac_configure_args; do
- if test -n "$ac_prev"; then
- ac_prev=
- continue
- fi
- case "$ac_arg" in
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- ;;
- *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
- esac
- done
-
- for ac_config_dir in ${sys_dir}; do
-
- # Do not complain, so a configure script can configure whichever
- # parts of a large source tree are present.
- if test ! -d $srcdir/$ac_config_dir; then
- continue
- fi
-
- echo configuring in $ac_config_dir
-
- case "$srcdir" in
- .) ;;
- *)
- if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
- else
- { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
- fi
- ;;
- esac
-
- ac_popdir=`pwd`
- cd $ac_config_dir
-
- # A "../" for each directory in /$ac_config_dir.
- ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
- case "$srcdir" in
- .) # No --srcdir option. We are building in place.
- ac_sub_srcdir=$srcdir ;;
- /*) # Absolute path.
- ac_sub_srcdir=$srcdir/$ac_config_dir ;;
- *) # Relative path.
- ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
- esac
-
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_sub_srcdir/configure; then
- ac_sub_configure=$ac_sub_srcdir/configure
- elif test -f $ac_sub_srcdir/configure.in; then
- ac_sub_configure=$ac_configure
- else
- echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
- ac_sub_configure=
- fi
-
- # The recursion is here.
- if test -n "$ac_sub_configure"; then
-
- # Make the cache file name correct relative to the subdirectory.
- case "$cache_file" in
- /*) ac_sub_cache_file=$cache_file ;;
- *) # Relative path.
- ac_sub_cache_file="$ac_dots$cache_file" ;;
- esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
- # The eval makes quoting arguments work.
- if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
- then :
- else
- { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
- fi
- fi
-
- cd $ac_popdir
- done
-fi
-
diff --git a/newlib/libc/sys/configure.in b/newlib/libc/sys/configure.in
deleted file mode 100644
index 895bdb2a2..000000000
--- a/newlib/libc/sys/configure.in
+++ /dev/null
@@ -1,32 +0,0 @@
-dnl This is the newlib/libc/sys configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(a29khif)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../..)
-
-NEWLIB_CONFIGURE(../..)
-
-dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
-dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
-dnl line of the macro which fail because appropriate LDFLAGS are not set.
-if test "${use_libtool}" = "yes"; then
-AC_LIBTOOL_WIN32_DLL
-AM_PROG_LIBTOOL
-fi
-
-if test -n "${sys_dir}"; then
- AC_CONFIG_SUBDIRS(${sys_dir})
-fi
-
-CRT0=
-if test "x${have_crt0}" = "xyes"; then
- CRT0=crt0.o
-fi
-AC_SUBST(CRT0)
-
-AM_CONDITIONAL(HAVE_SYS_DIR, test x${sys_dir} != x)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/d10v/Makefile.am b/newlib/libc/sys/d10v/Makefile.am
deleted file mode 100644
index da89f1198..000000000
--- a/newlib/libc/sys/d10v/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = syscalls.c trap.S creat.c
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/d10v/Makefile.in b/newlib/libc/sys/d10v/Makefile.in
deleted file mode 100644
index 8a34fbd62..000000000
--- a/newlib/libc/sys/d10v/Makefile.in
+++ /dev/null
@@ -1,329 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = syscalls.c trap.S creat.c
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = syscalls.o trap.o creat.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/d10v/aclocal.m4 b/newlib/libc/sys/d10v/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/d10v/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/d10v/configure b/newlib/libc/sys/d10v/configure
deleted file mode 100755
index cf9254bff..000000000
--- a/newlib/libc/sys/d10v/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=creat.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/d10v/configure.in b/newlib/libc/sys/d10v/configure.in
deleted file mode 100644
index 5559c87c8..000000000
--- a/newlib/libc/sys/d10v/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/d10v configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(creat.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/d10v/creat.c b/newlib/libc/sys/d10v/creat.c
deleted file mode 100644
index 62ec5ead8..000000000
--- a/newlib/libc/sys/d10v/creat.c
+++ /dev/null
@@ -1,7 +0,0 @@
-int
-creat(path, mode)
- const char *path;
- int mode;
-{
- return _creat (path, mode);
-}
diff --git a/newlib/libc/sys/d10v/crt0.S b/newlib/libc/sys/d10v/crt0.S
deleted file mode 100644
index 9a2ed02fb..000000000
--- a/newlib/libc/sys/d10v/crt0.S
+++ /dev/null
@@ -1,63 +0,0 @@
- .text
- .global _start
- .type _start,@function
- .stabs "crt0.S",100,0,0,_start
- .stabs "int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0
- .stabs "_start:F(0,1)",36,0,1,_start
-
-_start:
-
-; R14 always contains memory base address (0)
-
- ldi r14,0
-
-; Set the USER and SYSTEM stack pointers.
-
- ldi r0, 0 ; zero arguments
- ldi r1, 0
- mvtc r0, psw ; select SPI and set it
- ldi sp, _stack
- ldi r10, 0x8000 ; select SPU/FP and set it
- mvtc r10, psw || ldi r11, 0; clear stack frame
- ldi sp, _stack - 0x200
- ldi r13, 0
-
-; Clear the BSS. Do it in two parts for efficiency: longwords first
-; for most of it, then the remaining 0 to 3 bytes.
-
- ldi r2, __bss_start ; R2 = start of BSS
- ldi r3, _end ; R3 = end of BSS + 1
- sub r3, r2 ; R3 = BSS size in bytes
- mv r4, r3
- srli r4, 2 ; R4 = BSS size in longwords (rounded down)
-loop1:
- cmpeqi r4, 0 ; more longords to zero out?
- brf0t.s endloop1 ; nope
- st2w r0, @r2+ ; yep, zero out another longword
- subi r4, 1 ; decrement count
- bra.l loop1 ; go do some more
-
-endloop1:
- and3 r4, r3, 3 ; get no. of remaining BSS bytes to clear
-loop2:
- cmpeqi r4, 0 ; more bytes to zero out?
- brf0t.s endloop2 ; nope
- stb r0, @r2 ; yep, zero out another byte
- addi r2, 1 ; bump address
- subi r4, 1 ; decrement count
- bra.s loop2 ; go do some more
-endloop2:
-; Call main, then stop simulator
- st r11, @-sp
- st r13, @-sp
- mv r11, sp
-
- bl main
- bl exit
- stop
-.Lstart:
- .size _start,.Lstart-_start
- .stabs "",36,0,0,.Lstart-_start
-
- .section .stack
-_stack: .long 1
diff --git a/newlib/libc/sys/d10v/sys/syscall.h b/newlib/libc/sys/d10v/sys/syscall.h
deleted file mode 100644
index 64e53a3d9..000000000
--- a/newlib/libc/sys/d10v/sys/syscall.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* syscall.h - definitions of system calls for D10V.
- *
- * This file must contain only pre-processor directives, and no C code,
- * because it's included by assembly language sources as well as C.
- */
-
-#define SYS_exit 1
-#define SYS_fork 2
-
-#define SYS_read 3
-#define SYS_write 4
-#define SYS_open 5
-#define SYS_close 6
-#define SYS_wait4 7
-#define SYS_creat 8
-#define SYS_link 9
-#define SYS_unlink 10
-#define SYS_execv 11
-#define SYS_chdir 12
-#define SYS_mknod 14
-#define SYS_chmod 15
-#define SYS_chown 16
-#define SYS_lseek 19
-#define SYS_getpid 20
-#define SYS_isatty 21
-#define SYS_fstat 22
-#define SYS_time 23
-
-
-#define SYS_ARG 24
-#define SYS_stat 38
-
-#define SYS_pipe 42
-#define SYS_execve 59
-#define SYS_kill 60
-
-#define SYS_utime 201 /* not really a system call */
-#define SYS_wait 202 /* nor is this */
diff --git a/newlib/libc/sys/d10v/syscalls.c b/newlib/libc/sys/d10v/syscalls.c
deleted file mode 100644
index 11192074a..000000000
--- a/newlib/libc/sys/d10v/syscalls.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/* syscalls.c - non-trap system calls for D10V
- *
- * This file contains system calls that cannot be implemented with
- * a simple "trap 15" instruction. The ones that can are in trap.S.
- */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#undef errno
-
-void _exit (int n); /* in trap.S */
-
-extern int _write (int fd, const void *ptr, size_t len);
-
-int errno;
-
-register char *stack_ptr asm ("sp");
-
-caddr_t
-_sbrk (int incr)
-{
- extern char end; /* Defined by the linker */
- static char *heap_end;
- char *prev_heap_end;
- char *sp = (char *)stack_ptr;
-
- if (heap_end == 0)
- {
- heap_end = (char *)((((unsigned short) &end) + 7) & ~7);
- }
- prev_heap_end = heap_end;
- if (heap_end + incr > sp)
- {
- _write (2, "Heap and stack collision\n", sizeof ("Heap and stack collision\n")-1);
- abort ();
- }
- heap_end += incr;
- if ((unsigned short)heap_end > 0xbfff
- || (heap_end < prev_heap_end && incr > 0)
- || (heap_end < (char *)((((unsigned short) &end) + 7) & ~7)))
- {
- _write (2, "Too much memory was allocated\n", sizeof ("Too much memory was allocated\n")-1);
- abort ();
- }
-
- return (caddr_t) prev_heap_end;
-}
-
-int
-_fstat (int file,
- struct stat *st)
-{
- st->st_mode = S_IFCHR;
- return 0;
-}
-
-int
-_unlink ()
-{
- errno = ENOSYS;
- return -1;
-}
-
-int
-isatty (int fd)
-{
- return 1;
-}
-
-void
-_raise ()
-{
-}
-
-/* If this library is compiled with -mint32, provide conversion functions for
- the system call traps. */
-
-#if __INT__==32
-extern short _read16 (short fd, void *ptr, short len);
-int
-_read (int fd, void *ptr, size_t len)
-{
- return _read16 ((short)fd, ptr, (short)len);
-}
-
-extern short _write16 (short fd, const void *ptr, short len);
-int
-_write (int fd, const void *ptr, size_t len)
-{
- return _write16 ((short)fd, ptr, (short)len);
-}
-
-extern short _lseek16 (short fd, long offset, short whence);
-int
-_lseek (int fd, off_t offset, int whence)
-{
- return _lseek16 ((short)fd, offset, (short)whence);
-}
-
-extern short _close16 (short fd);
-int
-_close (int fd)
-{
- return _close16 ((short)fd);
-}
-
-extern short _open16 (const char *name, short flags, short mode);
-int
-_open (const char *name, int flags, mode_t mode)
-{
- return _open16 (name, (short)flags, (short)mode);
-}
-
-extern short _creat16 (const char *name, mode_t mode);
-int
-_creat (const char *name, mode_t mode)
-{
- return _creat16 (name, mode);
-}
-
-extern void _exit16 (short status);
-void
-_exit (int status)
-{
- _exit16 ((short)status);
-}
-
-extern short _stat16 (const char *name, struct stat *stat_pkt);
-int
-_stat (const char *name, struct stat *stat_pkt)
-{
- return _stat16 (name, stat_pkt);
-}
-
-extern short _chmod16 (const char *name, short mode);
-int
-_chmod (const char *name, mode_t mode)
-{
- return _chmod16 (name, (short)mode);
-}
-
-extern short _chown16 (const char *name, short uid, short gid);
-int
-_chown (const char *name, uid_t uid, gid_t gid)
-{
- return _chown16 (name, (short)uid, (short)gid);
-}
-
-extern short _fork16 (void);
-int
-_fork (void)
-{
- return _fork16 ();
-}
-
-extern short _wait16 (short *status);
-int
-_wait (int *status)
-{
- if (status)
- {
- short status16;
- short ret = _wait16 (&status16);
- if (ret >= 0)
- *status = status16;
- return ret;
- }
- else
- return _wait16 ((short *)0);
-}
-
-extern short _execve16 (const char *filename, const char *argv [], const char *envp[]);
-int
-_execve (const char *filename, const char *argv [], const char *envp[])
-{
- return _execve16 (filename, argv, envp);
-}
-
-extern short _execv16 (const char *filename, const char *argv []);
-int
-_execv (const char *filename, const char *argv [])
-{
- return _execv16 (filename, argv);
-}
-
-extern short _pipe16 (short fds[]);
-int
-_pipe (int fds[])
-{
- short fds16[2];
- short ret = _pipe16 (fds16);
- if (ret >= 0)
- {
- fds[0] = fds16[0];
- fds[1] = fds16[1];
- }
-
- return ret;
-}
-
-extern short _getpid16 (void);
-int
-_getpid (void)
-{
- return _getpid16 ();
-}
-
-extern short _kill16 (short pid, short sig);
-int
-_kill (int pid, int sig)
-{
- return _kill16 ((short)pid, (short)sig);
-}
-#endif
diff --git a/newlib/libc/sys/d10v/trap.S b/newlib/libc/sys/d10v/trap.S
deleted file mode 100644
index 9aca42913..000000000
--- a/newlib/libc/sys/d10v/trap.S
+++ /dev/null
@@ -1,296 +0,0 @@
-#include "sys/syscall.h"
-
-#define SYSCALL(name) \
- .global name ; \
-name: ; \
- ldi r4, SYS ## name ; \
- bra __trap0
-
- .text
- .stabs "trap.S",100,0,0,__trap0
- .stabs "int:t(0,1)=r(0,1);-65536;65535;",128,0,0,0
- .stabs "long int:t(0,2)=r(0,1);0020000000000;0017777777777;",128,0,0,0
- .stabs "_trap0:F(0,1)",36,0,1,__trap0
- .stabs "arg1:P(0,1)",64,0,1,0
- .stabs "arg2:P(0,1)",64,0,1,1
- .stabs "arg3:P(0,1)",64,0,1,2
- .stabs "arg4:P(0,1)",64,0,1,3
- .stabs "number:P(0,1)",64,0,1,4
- .global __trap0
- .type __trap0,@function
-__trap0:
- trap 15 /* trap 15 returns result in r0, error code in r4 */
- cmpeqi r4,0 /* is error code zero? */
- brf0t ret /* yes, skip setting errno */
-#if __INT__==32
- st r4,@(errno+2,r14) /* no, set errno */
- srai r4,15 /* sign extend high word */
- st r4,@(errno,r14)
-#else
- st r4,@(errno,r14) /* no, set errno */
-#endif
-
-ret:
- jmp r13 /* return to caller */
-.Ltrap0:
- .size __trap0,.Ltrap0-__trap0
- .stabs "",36,0,0,.Ltrap0-__trap0
-
-#define CONCAT(a,b) a ## b
-#define STRING(a) #a
-#define XSTRING(a) STRING(a)
-#define XSTRING2(a,b) XSTRING(CONCAT(a,b))
-
-#if __INT__==32
-#define _read _read16
-#define _lseek _lseek16
-#define _write _write16
-#define _close _close16
-#define _open _open16
-#define _creat _creat16
-#define _exit _exit16
-#define _stat _stat16
-#define _chmod _chmod16
-#define _chown _chown16
-#define _fork _fork16
-#define _wait _wait16
-#define _execve _execve16
-#define _execv _execv16
-#define _pipe _pipe16
-#define _kill _kill16
-#define _getpid _getpid16
-#endif
-
-/* Until the assembler allows semicolon as a statement separator, */
-/* we cannot use the SYSCALL macro. So expand it manually for now. */
-
-/* #SYSCALL(_read) */
-/* #SYSCALL(_lseek) */
-/* #SYSCALL(_write) */
-/* #SYSCALL(_close) */
-/* #SYSCALL(_open) */
-/* #SYSCALL(_creat) */
-/* #SYSCALL(_exit) */
-/* #SYSCALL(_stat) */
-/* #SYSCALL(_chmod) */
-/* #SYSCALL(_chown) */
-/* #SYSCALL(_fork) */
-/* #SYSCALL(_wait) */
-/* #SYSCALL(_execve) */
-/* #SYSCALL(_execv) */
-/* #SYSCALL(_pipe) */
-/* #SYSCALL(_getpid) */
-/* #SYSCALL(_kill) */
-
- .global _read
- .type _read,@function
- .stabs XSTRING2(_read,:F(0,1)),36,0,2,_read
- .stabs "fd:P(0,1)",64,0,1,0
- .stabs "ptr:P(0,1)",64,0,1,1
- .stabs "len:P(0,1)",64,0,1,2
-_read:
- ldi r4, SYS_read
- bra __trap0
-.Lread:
- .size _read,.-_read
- .stabs "",36,0,0,.Lread-_read
-
- .global _lseek
- .type _lseek,@function
- .stabs XSTRING2(_lseek,:F(0,1)),36,0,3,_lseek
- .stabs "fd:P(0,1)",64,0,1,0
- .stabs "offset:P(0,1)",64,0,1,2
- .stabs "whence:p(0,1)",160,0,1,0
-_lseek:
- ldi r4, SYS_lseek
- bra __trap0
-.Llseek:
- .size _lseek,.Llseek-_lseek
- .stabs "",36,0,0,.Llseek-_lseek
-
- .global _write
- .type _write,@function
- .stabs XSTRING2(_write,:F(0,1)),36,0,4,_write
- .stabs "fd:P(0,1)",64,0,1,0
- .stabs "ptr:P(0,1)",64,0,1,1
- .stabs "len:P(0,1)",64,0,1,2
-_write:
- ldi r4, SYS_write
- bra __trap0
-.Lwrite:
- .size _write,.Lwrite-_write
- .stabs "",36,0,0,.Lwrite-_write
-
- .global _close
- .type _close,@function
- .stabs XSTRING2(_close,:F(0,1)),36,0,5,_close
- .stabs "fd:P(0,1)",64,0,1,0
-_close:
- ldi r4, SYS_close
- bra __trap0
-.Lclose:
- .size _close,.Lclose-_close
- .stabs "",36,0,0,.Lclose-_close
-
- .global _open
- .type _open,@function
- .stabs XSTRING2(_open,:F(0,1)),36,0,6,_open
- .stabs "name:P(0,1)",64,0,1,0
- .stabs "flags:P(0,1)",64,0,1,1
- .stabs "mode:P(0,1)",64,0,1,2
-_open:
- ldi r4, SYS_open
- bra __trap0
-.Lopen:
- .size _open,.Lopen-_open
- .stabs "",36,0,0,.Lopen-_open
-
- .global _creat
- .type _creat,@function
- .stabs XSTRING2(_creat,:F(0,1)),36,0,7,_creat
- .stabs "name:P(0,1)",64,0,1,0
- .stabs "mode:P(0,1)",64,0,1,1
-_creat:
- ldi r4, SYS_creat
- bra __trap0
-.Lcreat:
- .size _creat,.Lcreat-_creat
- .stabs "",36,0,0,.Lcreat-_creat
-
- .global _exit
- .type _exit,@function
- .stabs XSTRING2(_exit,:F(0,1)),36,0,8,_exit
- .stabs "status:P(0,1)",64,0,1,0
-_exit:
- ldi r4, SYS_exit
- bra __trap0
-.Lexit:
- .size _exit,.Lexit-_exit
- .stabs "",36,0,0,.Lexit-_exit
-
- .global _stat
- .type _stat,@function
- .stabs XSTRING2(_stat,:F(0,1)),36,0,9,_stat
- .stabs "name:P(0,1)",64,0,1,0
- .stabs "packet:P(0,1)",64,0,1,1
-_stat:
- ldi r4, SYS_stat
- bra __trap0
-.Lstat:
- .size _stat,.Lstat-_stat
- .stabs "",36,0,0,.Lstat-_stat
-
- .global _chmod
- .type _chmod,@function
- .stabs XSTRING2(_chmod,:F(0,1)),36,0,10,_chmod
- .stabs "name:P(0,1)",64,0,1,0
- .stabs "mode:P(0,1)",64,0,1,1
-_chmod:
- ldi r4, SYS_chmod
- bra __trap0
-.Lchmod:
- .size _chmod,.Lchmod-_chmod
- .stabs "",36,0,0,.Lchmod-_chmod
-
- .global _chown
- .type _chown,@function
- .stabs XSTRING2(_chown,:F(0,1)),36,0,11,_chown
- .stabs "name:P(0,1)",64,0,1,0
- .stabs "uid:P(0,1)",64,0,1,1
- .stabs "gid:P(0,1)",64,0,1,2
-_chown:
- ldi r4, SYS_chown
- bra __trap0
-.Lchown:
- .size _chown,.Lchown-_chown
- .stabs "",36,0,0,.Lchown-_chown
-
- .global _fork
- .type _fork,@function
- .stabs XSTRING2(_fork,:F(0,1)),36,0,12,_fork
-_fork:
- ldi r4, SYS_fork
- bra __trap0
-.Lfork:
- .size _fork,.Lfork-_fork
- .stabs "",36,0,0,.Lfork-_fork
-
- .global _wait
- .type _wait,@function
- .stabs "status:P(0,1)",64,0,1,0
- .stabs XSTRING2(_wait,:F(0,1)),36,0,13,_wait
-_wait:
- ldi r4, SYS_wait
- bra __trap0
-.Lwait:
- .size _wait,.Lwait-_wait
- .stabs "",36,0,0,.Lwait-_wait
-
- .global _execve
- .type _execve,@function
- .stabs "name:P(0,1)",64,0,1,0
- .stabs "argv:P(0,1)",64,0,1,1
- .stabs "envp:P(0,1)",64,0,1,2
- .stabs XSTRING2(_execve,:F(0,1)),36,0,14,_execve
-_execve:
- ldi r4, SYS_execve
- bra __trap0
-.Lexecve:
- .size _execve,.Lexecve-_execve
- .stabs "",36,0,0,.Lexecve-_execve
-
- .global _execv
- .type _execv,@function
- .stabs XSTRING2(_execv,:F(0,1)),36,0,15,_execv
- .stabs "name:P(0,1)",64,0,1,0
- .stabs "argv:P(0,1)",64,0,1,1
-_execv:
- ldi r4, SYS_execv
- bra __trap0
-.Lexecv:
- .size _execv,.Lexecv-_execv
- .stabs "",36,0,0,.Lexecv-_execv
-
- .global _pipe
- .type _pipe,@function
- .stabs XSTRING2(_pipe,:F(0,1)),36,0,16,_pipe
- .stabs "fds:P(0,1)",64,0,1,0
-_pipe:
- ldi r4, SYS_pipe
- bra __trap0
-.Lpipe:
- .size _pipe,.Lpipe-_pipe
- .stabs "",36,0,0,.Lpipe-_pipe
-
- .global time
- .type time,@function
- .stabs XSTRING2(time,:F(0,1)),36,0,17,time
- .stabs "ptr:P(0,1)",64,0,1,0
-time:
- ldi r4, SYS_time
- bra __trap0
-.Ltime:
- .size time,.Ltime-time
- .stabs "",36,0,0,.Ltime-time
-
- .global _kill
- .type _kill,@function
- .stabs XSTRING2(_kill,:F(0,1)),36,0,18,_kill
- .stabs "pid:P(0,1)",64,0,1,0
- .stabs "sig:P(0,1)",64,0,1,1
-_kill:
- ldi r4, SYS_kill
- bra __trap0
-.Lkill:
- .size _kill,.Lkill-_kill
- .stabs "",36,0,0,.Lkill-_kill
-
- .global _getpid
- .type _getpid,@function
- .stabs XSTRING2(_getpid,:F(0,1)),36,0,19,_getpid
-_getpid:
- ldi r4, SYS_getpid
- bra __trap0
-.Lgetpid:
- .size _getpid,.Lgetpid-_getpid
- .stabs "",36,0,0,.Lgetpid-_getpid
diff --git a/newlib/libc/sys/decstation/Makefile.am b/newlib/libc/sys/decstation/Makefile.am
deleted file mode 100644
index ad289976f..000000000
--- a/newlib/libc/sys/decstation/Makefile.am
+++ /dev/null
@@ -1,45 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-COPYOFILES = \
- read.o \
- open.o \
- _exit.o \
- write.o \
- lseek.o \
- close.o \
- sbrk.o \
- cerror.o \
- fork.o \
- isatty.o \
- ioctl.o \
- getpid.o \
- time.o \
- kill.o \
- wait.o \
- execve.o \
- gettimeofday.o \
- link.o \
- unlink.o \
- fstat.o \
- times.o \
- getrusage.o
-
-lib_a_SOURCES = _main.c
-lib_a_LIBADD = $(COPYOFILES)
-
-$(COPYOFILES):
- ar x /lib/libc.a $(COPYOFILES)
-
-all: crt0.o
-
-crt0.o:
- cp /lib/crt0.o crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/decstation/Makefile.in b/newlib/libc/sys/decstation/Makefile.in
deleted file mode 100644
index ab0546409..000000000
--- a/newlib/libc/sys/decstation/Makefile.in
+++ /dev/null
@@ -1,341 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-COPYOFILES = read.o open.o _exit.o write.o lseek.o close.o sbrk.o cerror.o fork.o isatty.o ioctl.o getpid.o time.o kill.o wait.o execve.o gettimeofday.o link.o unlink.o fstat.o times.o getrusage.o
-
-
-lib_a_SOURCES = _main.c
-lib_a_LIBADD = $(COPYOFILES)
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_DEPENDENCIES = read.o open.o _exit.o write.o lseek.o close.o \
-sbrk.o cerror.o fork.o isatty.o ioctl.o getpid.o time.o kill.o wait.o \
-execve.o gettimeofday.o link.o unlink.o fstat.o times.o getrusage.o
-lib_a_OBJECTS = _main.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-$(COPYOFILES):
- ar x /lib/libc.a $(COPYOFILES)
-
-all: crt0.o
-
-crt0.o:
- cp /lib/crt0.o crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/decstation/_main.c b/newlib/libc/sys/decstation/_main.c
deleted file mode 100644
index 64878088d..000000000
--- a/newlib/libc/sys/decstation/_main.c
+++ /dev/null
@@ -1,6 +0,0 @@
-
-__main()
-{
-
-
-}
diff --git a/newlib/libc/sys/decstation/aclocal.m4 b/newlib/libc/sys/decstation/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/decstation/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/decstation/configure b/newlib/libc/sys/decstation/configure
deleted file mode 100755
index 10e5797c8..000000000
--- a/newlib/libc/sys/decstation/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=_main.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/decstation/configure.in b/newlib/libc/sys/decstation/configure.in
deleted file mode 100644
index e2e2738bb..000000000
--- a/newlib/libc/sys/decstation/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/decstation configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(_main.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/decstation/sys/dirent.h b/newlib/libc/sys/decstation/sys/dirent.h
deleted file mode 100644
index c5a90e9fe..000000000
--- a/newlib/libc/sys/decstation/sys/dirent.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* FIXME: From sys/sysvi386/sys */
-#ifndef _SYS_DIRENT_H
-# define _SYS_DIRENT_H
-
-/*
- * This file was written to be compatible with the BSD directory
- * routines, so it looks like it. But it was written from scratch.
- * Sean Eric Fagan, sef@Kithrup.COM
- *
- * Modified by dje@cygnus.com for sun.
- * Modified by eichin@cygnus.com for decstation (ultrix 4.2)
- */
-
-typedef struct __dirdesc {
- int dd_fd;
- long dd_loc;
- long dd_size;
- long dd_bbase;
- long dd_entno;
- long dd_bsize;
- char *dd_buf;
-} DIR;
-
-# define __dirfd(dp) ((dp)->dd_fd)
-
-DIR *opendir (const char *);
-struct dirent *readdir (DIR *);
-void rewinddir (DIR *);
-int closedir (DIR *);
-
-#include <sys/types.h>
-
-#define MAXNAMLEN 255
-
-#define d_ino d_fileno /* compatibility */
-
-struct dirent {
- unsigned long d_fileno;
- unsigned short d_reclen;
- unsigned short d_namlen;
- char d_name[MAXNAMLEN + 1];
-};
-
-/* FIXME: include definition of DIRSIZ() ? */
-
-#endif
diff --git a/newlib/libc/sys/h8300hms/Makefile.am b/newlib/libc/sys/h8300hms/Makefile.am
deleted file mode 100644
index 4f47672fa..000000000
--- a/newlib/libc/sys/h8300hms/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = syscalls.c _exit.S sbrk.c misc.c crt1.c \
- close.S fstat.S lseek.S open.S read.S stat.S write.S
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/h8300hms/Makefile.in b/newlib/libc/sys/h8300hms/Makefile.in
deleted file mode 100644
index b18e64ea1..000000000
--- a/newlib/libc/sys/h8300hms/Makefile.in
+++ /dev/null
@@ -1,331 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = syscalls.c _exit.S sbrk.c misc.c crt1.c close.S fstat.S lseek.S open.S read.S stat.S write.S
-
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = syscalls.o _exit.o sbrk.o misc.o crt1.o close.o fstat.o \
-lseek.o open.o read.o stat.o write.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/h8300hms/_exit.S b/newlib/libc/sys/h8300hms/_exit.S
deleted file mode 100644
index 7fac3d344..000000000
--- a/newlib/libc/sys/h8300hms/_exit.S
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "setarch.h"
-
-/* `sleep' is passed an argument in r0 that indicates the reason
- the program is exiting. The format of r0 is defined in
- devo/include/wait.h. */
-
-/* extern void _exit (int rc); */
-
- .section .text
- .align 2
- .global __exit
-__exit:
- mov.w #0xdead,r1
- mov.w #0xbeef,r2
- mov.b r0l,r0h
- sub.b r0l,r0l
- sleep
diff --git a/newlib/libc/sys/h8300hms/aclocal.m4 b/newlib/libc/sys/h8300hms/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/h8300hms/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/h8300hms/close.S b/newlib/libc/sys/h8300hms/close.S
deleted file mode 100644
index f23142063..000000000
--- a/newlib/libc/sys/h8300hms/close.S
+++ /dev/null
@@ -1,17 +0,0 @@
-;int close(int fd);
-;Integer arguments have to be zero extended.
-
-#include "setarch.h"
-
- .section .text
- .align 2
- .global __close
-__close:
-#if defined(__H8300H__) || defined(__H8300S__) || defined (__H8300SX__)
-#if __INT_MAX__ == 32767
- extu.l er0
-#endif
-#endif
- jsr @@0xc9
- rts
- .end
diff --git a/newlib/libc/sys/h8300hms/configure b/newlib/libc/sys/h8300hms/configure
deleted file mode 100755
index c3fe7f351..000000000
--- a/newlib/libc/sys/h8300hms/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=crt1.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/h8300hms/configure.in b/newlib/libc/sys/h8300hms/configure.in
deleted file mode 100644
index 7f5b630f6..000000000
--- a/newlib/libc/sys/h8300hms/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/h8300hms configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(crt1.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/h8300hms/crt0.S b/newlib/libc/sys/h8300hms/crt0.S
deleted file mode 100644
index 6394f6841..000000000
--- a/newlib/libc/sys/h8300hms/crt0.S
+++ /dev/null
@@ -1,105 +0,0 @@
-; h8/300 and h8/300h start up file.
-
-#include "setarch.h"
-
-#ifdef __H8300__
-
- .section .text
- .global _start
-_start:
- mov.w #_stack,sp
- mov.w #_edata,r0
- mov.w #_end,r1
- sub.w r2,r2
-.Loop: mov.w r2,@r0
- adds #2,r0
- cmp r1,r0
- blo .Loop
-#ifdef __ELF__
- mov.l #__fini,r0
- jsr @_atexit
-#ifdef __SIMULATOR__
- jsr @0xcc
-#endif
- jsr @__init
-#else
-#ifdef __SIMULATOR__
- jsr @0xcc
-#endif
- jsr @___main
-#endif
- jsr @_main
- jsr @_exit
-
- .section .stack
-_stack: .word 1
-
-#endif
-
-#ifdef __H8300H__
-
- .section .text
- .global _start
-_start:
- mov.l #_stack,sp
- mov.l #_edata,er0
- mov.l #_end,er1
- sub.w r2,r2 ; not sure about alignment requirements
-.Loop: mov.w r2,@er0 ; playing it safe for now
- adds #2,er0
- cmp.l er1,er0
- blo .Loop
-#ifdef __ELF__
- mov.l #__fini,er0
- jsr @_atexit
-#ifdef __SIMULATOR__
- jsr @0xcc
-#endif
- jsr @__init
-#else
-#ifdef __SIMULATOR__
- jsr @0xcc
-#endif
- jsr @___main
-#endif
- jsr @_main
- jsr @_exit
-
- .section .stack
-_stack: .long 1
-
-#endif
-
-#if defined (__H8300S__) || defined (__H8300SX__)
-
- .section .text
- .global _start
-_start:
- mov.l #_stack,sp
- mov.l #_edata,er0
- mov.l #_end,er1
- sub.w r2,r2 ; not sure about alignment requirements
-.Loop: mov.w r2,@er0 ; playing it safe for now
- adds #2,er0
- cmp.l er1,er0
- blo .Loop
-#ifdef __ELF__
- mov.l #__fini,er0
- jsr @_atexit
-#ifdef __SIMULATOR__
- jsr @0xcc
-#endif
- jsr @__init
-#else
-#ifdef __SIMULATOR__
- jsr @0xcc
-#endif
- jsr @___main
-#endif
- jsr @_main
- jsr @_exit
-
- .section .stack
-_stack: .long 1
-
-#endif
diff --git a/newlib/libc/sys/h8300hms/crt1.c b/newlib/libc/sys/h8300hms/crt1.c
deleted file mode 100644
index bd4ccf2d8..000000000
--- a/newlib/libc/sys/h8300hms/crt1.c
+++ /dev/null
@@ -1,18 +0,0 @@
-void __main ()
-{
-#ifndef __ELF__
- static int initialized;
- if (! initialized)
- {
- typedef void (*pfunc) ();
- extern pfunc __ctors[];
- extern pfunc __ctors_end[];
- pfunc *p;
-
- initialized = 1;
- for (p = __ctors_end; p > __ctors; )
- (*--p) ();
-
- }
-#endif
-}
diff --git a/newlib/libc/sys/h8300hms/fstat.S b/newlib/libc/sys/h8300hms/fstat.S
deleted file mode 100644
index 1e1ca29c9..000000000
--- a/newlib/libc/sys/h8300hms/fstat.S
+++ /dev/null
@@ -1,18 +0,0 @@
-;int fstat(int filedes, struct stat *buf);
-;Integer arguments have to be zero extended.
-
-#include "setarch.h"
-
- .section .text
- .align 2
- .global __fstat
-__fstat:
-#if defined(__H8300H__) || defined(__H8300S__) || defined (__H8300SX__)
-#if __INT_MAX__ == 32767
- extu.l er0
-#endif
-#endif
- jsr @@0xcb
- rts
- .end
-
diff --git a/newlib/libc/sys/h8300hms/lseek.S b/newlib/libc/sys/h8300hms/lseek.S
deleted file mode 100644
index 4b3c26750..000000000
--- a/newlib/libc/sys/h8300hms/lseek.S
+++ /dev/null
@@ -1,18 +0,0 @@
-;off_t lseek(int fildes, off_t offset, int whence);
-;Integer arguments have to be zero extended.
-
-#include "setarch.h"
-
- .section .text
- .align 2
- .global __lseek
-__lseek:
-#if defined(__H8300H__) || defined(__H8300S__) || defined (__H8300SX__)
-#if __INT_MAX__ == 32767
- extu.l er0
- extu.l er2
-#endif
-#endif
- jsr @@0xc8
- rts
- .end
diff --git a/newlib/libc/sys/h8300hms/misc.c b/newlib/libc/sys/h8300hms/misc.c
deleted file mode 100644
index 6021b5cb6..000000000
--- a/newlib/libc/sys/h8300hms/misc.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Misc. operating system stubs. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-/* _raise(), getpid(), and kill() are required by abort().
- getpid/kill are prefixed with '_' because of MISSING_SYSCALL_NAMES. */
-
-int _DEFUN(_raise,(sig),
- int sig)
-{
- return 0;
-}
-
-int _DEFUN(_getpid,(),)
-{
- return 0;
-}
-
-int _DEFUN(_kill,(pid, sig),
- int pid _AND
- int sig)
-{
- if (pid == 0)
- {
- /* Narrow SIG down to a short, in case we're compiled with -mint32. */
- short sig2 = sig;
- /* This causes the simulator to indicate abort() was called.
- The format of r0 is defined by devo/include/wait.h. */
- asm ("mov.w %0,r0\n\tsleep" : : "r" (sig2) : "r0");
- }
- return 0;
-}
diff --git a/newlib/libc/sys/h8300hms/open.S b/newlib/libc/sys/h8300hms/open.S
deleted file mode 100644
index 0feaab217..000000000
--- a/newlib/libc/sys/h8300hms/open.S
+++ /dev/null
@@ -1,14 +0,0 @@
-;int open(const char *pathname, int flags);
-;Integer arguments have to be zero extended.
-;The second argument is taken from the stack,
-;hence it is not zero extended here.
-
-#include "setarch.h"
-
- .section .text
- .align 2
- .global __open
-__open:
- jsr @@0xc5
- rts
- .end
diff --git a/newlib/libc/sys/h8300hms/read.S b/newlib/libc/sys/h8300hms/read.S
deleted file mode 100644
index 20fc59b7f..000000000
--- a/newlib/libc/sys/h8300hms/read.S
+++ /dev/null
@@ -1,18 +0,0 @@
-;ssize_t read(int fd, void *buf, size_t count);
-;Integer arguments have to be zero extended.
-
-#include "setarch.h"
-
- .section .text
- .align 2
- .global __read
-__read:
-#if defined(__H8300H__) || defined(__H8300S__) || defined (__H8300SX__)
-#if __INT_MAX__ == 32767
- extu.l er0
-#endif
-#endif
- jsr @@0xc6
- rts
- .end
-
diff --git a/newlib/libc/sys/h8300hms/sbrk.c b/newlib/libc/sys/h8300hms/sbrk.c
deleted file mode 100644
index 1456a67eb..000000000
--- a/newlib/libc/sys/h8300hms/sbrk.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-register char *stack_ptr asm ("sp");
-
-caddr_t
- _sbrk(incr)
- int incr;
-{
- extern char end; /* Defined by the linker */
- static char *heap_end;
- char *prev_heap_end;
-
- if (heap_end == 0)
- {
- heap_end = &end;
- }
- prev_heap_end = heap_end;
- if (heap_end + incr > stack_ptr)
- {
- _write (1, "Heap and stack collision\n", 25);
- abort ();
- }
- heap_end += incr;
- return (caddr_t)prev_heap_end;
-}
-
diff --git a/newlib/libc/sys/h8300hms/setarch.h b/newlib/libc/sys/h8300hms/setarch.h
deleted file mode 100644
index 56bdaaf45..000000000
--- a/newlib/libc/sys/h8300hms/setarch.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifdef __H8300H__
-#ifdef __NORMAL_MODE__
- .h8300hn
-#else
- .h8300h
-#endif
-#endif
-#ifdef __H8300S__
-#ifdef __NORMAL_MODE__
- .h8300sn
-#else
- .h8300s
-#endif
-#endif
-#ifdef __H8300SX__
-#ifdef __NORMAL_MODE__
- .h8300sxn
-#else
- .h8300sx
-#endif
-#endif
diff --git a/newlib/libc/sys/h8300hms/stat.S b/newlib/libc/sys/h8300hms/stat.S
deleted file mode 100644
index dae23c470..000000000
--- a/newlib/libc/sys/h8300hms/stat.S
+++ /dev/null
@@ -1,12 +0,0 @@
-;int stat(const char *file_name, struct stat *buf);
-
-#include "setarch.h"
-
- .section .text
- .align 2
- .global __stat
-__stat:
- jsr @@0xca
- rts
- .end
-
diff --git a/newlib/libc/sys/h8300hms/sys/file.h b/newlib/libc/sys/h8300hms/sys/file.h
deleted file mode 100644
index dd87705fa..000000000
--- a/newlib/libc/sys/h8300hms/sys/file.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* This is file FILE.H */
-/*
- * Copyright (C) 1991 DJ Delorie
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms is permitted
- * provided that the above copyright notice and following paragraph are
- * duplicated in all such forms.
- *
- * This file is distributed WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef _FILE_H_
-#define _FILE_H_
-
-#include <fcntl.h>
-
-#define L_SET 0
-#define L_CURR 1
-#define L_XTND 2
-
-
-#define F_OK 0 /* does file exist */
-#define X_OK 1 /* is it executable by caller */
-#define W_OK 2 /* is it writable by caller */
-#define R_OK 4 /* is it readable by caller */
-
-#endif
diff --git a/newlib/libc/sys/h8300hms/sys/syscall.h b/newlib/libc/sys/h8300hms/sys/syscall.h
deleted file mode 100644
index fba03549c..000000000
--- a/newlib/libc/sys/h8300hms/sys/syscall.h
+++ /dev/null
@@ -1 +0,0 @@
-#define SYS_read 4
diff --git a/newlib/libc/sys/h8300hms/syscalls.c b/newlib/libc/sys/h8300hms/syscalls.c
deleted file mode 100644
index b716e62fc..000000000
--- a/newlib/libc/sys/h8300hms/syscalls.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Operating system stubs, set up for the MRI simulator */
-
-#include <_ansi.h>
-#include <errno.h>
-
-int isatty(file)
- int file;
-{
- return 1;
-}
-
-int
-_unlink (path)
- const char *path;
-{
- errno = EIO;
- return -1;
-}
diff --git a/newlib/libc/sys/h8300hms/write.S b/newlib/libc/sys/h8300hms/write.S
deleted file mode 100644
index e416b1521..000000000
--- a/newlib/libc/sys/h8300hms/write.S
+++ /dev/null
@@ -1,17 +0,0 @@
-;ssize_t write(int fd, const void *buf, size_t count);
-;Integer arguments have to be zero extended.
-
-#include "setarch.h"
-
- .section .text
- .align 2
- .global __write
-__write:
-#if defined(__H8300H__) || defined(__H8300S__) || defined (__H8300SX__)
-#if __INT_MAX__ == 32767
- extu.l er0
-#endif
-#endif
- jsr @@0xc7
- rts
- .end
diff --git a/newlib/libc/sys/h8500hms/Makefile.am b/newlib/libc/sys/h8500hms/Makefile.am
deleted file mode 100644
index 8febfd388..000000000
--- a/newlib/libc/sys/h8500hms/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = syscalls.c misc.c
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/h8500hms/Makefile.in b/newlib/libc/sys/h8500hms/Makefile.in
deleted file mode 100644
index d59bf40b6..000000000
--- a/newlib/libc/sys/h8500hms/Makefile.in
+++ /dev/null
@@ -1,329 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = syscalls.c misc.c
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = syscalls.o misc.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/h8500hms/aclocal.m4 b/newlib/libc/sys/h8500hms/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/h8500hms/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/h8500hms/configure b/newlib/libc/sys/h8500hms/configure
deleted file mode 100755
index d3f9dfcb6..000000000
--- a/newlib/libc/sys/h8500hms/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=misc.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/h8500hms/configure.in b/newlib/libc/sys/h8500hms/configure.in
deleted file mode 100644
index b050f4ed1..000000000
--- a/newlib/libc/sys/h8500hms/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/h8500hms configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(misc.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/h8500hms/crt0.c b/newlib/libc/sys/h8500hms/crt0.c
deleted file mode 100644
index fa7d1b93c..000000000
--- a/newlib/libc/sys/h8500hms/crt0.c
+++ /dev/null
@@ -1,32 +0,0 @@
-
-extern char _start_bss;
-extern char end;
-extern char stack;
-
-static zeroandrun();
-#pragma noprolog
-
-start()
-{
- asm("mov.w #%off(_stack),sp");
-/* asm("ldc.w #0x700,sr");*/
- asm("ldc.b #%page(_stack),tp");
- asm("ldc.b #%page(_stack),dp");
- asm("ldc.b #%page(_stack),ep");
- /* Can't have anything else in here, since the fp won't be set up
- so local variables won't work */
- zeroandrun();
-}
-
-static
-zeroandrun()
-{
- char *p;
- p = &_start_bss;
- while (p < &end)
- {
- *p++ = 0;
- }
- main();
- _exit();
-}
diff --git a/newlib/libc/sys/h8500hms/misc.c b/newlib/libc/sys/h8500hms/misc.c
deleted file mode 100644
index a791704a1..000000000
--- a/newlib/libc/sys/h8500hms/misc.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Misc. operating system stubs. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <signal.h>
-
-/* _raise(), getpid(), and kill() are required by abort().
- getpid/kill are prefixed with '_' because of MISSING_SYSCALL_NAMES. */
-
-int _DEFUN(_raise,(sig),
- int sig)
-{
- return 0;
-}
-
-int _DEFUN(_getpid,(),)
-{
- return 0;
-}
-
-int _DEFUN(_kill,(pid, sig),
- int pid _AND
- int sig)
-{
- if (sig == SIGABRT)
- asm ("mov.w #34,r3; trapa #15");
- return 0;
-}
diff --git a/newlib/libc/sys/h8500hms/syscalls.c b/newlib/libc/sys/h8500hms/syscalls.c
deleted file mode 100644
index bb0c3c0c7..000000000
--- a/newlib/libc/sys/h8500hms/syscalls.c
+++ /dev/null
@@ -1,129 +0,0 @@
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-int
-_read (file, ptr, len)
- int file;
- char *ptr;
- size_t len;
-
-{
- return 0;
-}
-
-
-int
-_lseek (file, ptr, dir)
- int file;
- int ptr;
- int dir;
-
-{
- return 0;
-
-}
-
-static
-writechar (c)
- char c;
-
-
-{
- register int n asm ("r3");
- n = c;
-asm ("clr.w r1;mov.w %0,r0; mov.w #6,r3; trapa #15": :"g" (n) : "r3","r1","r0");
-}
-
-
-
-int
-_write (file, ptr, len)
- int file;
- char *ptr;
- size_t len;
-{
-
- int todo;
-
- for (todo = 0; todo < len; todo++)
- {
- writechar (*ptr++);
- }
- return len;
-
-}
-
-
-
-int
-_close (file)
- int file;
-{
-
- return -1;
-}
-
-
-
-caddr_t
-_sbrk (incr)
- size_t incr;
-{
- extern char end; /* Defined by the linker */
- static char *heap_end;
- char *prev_heap_end;
-
- if (heap_end == 0)
- {
- heap_end = &end;
- }
- prev_heap_end = heap_end;
- if (heap_end + incr > stack_ptr)
- {
- _write (1, "Heap and stack collision\n", 25);
- abort ();
- }
- heap_end += incr;
- return (caddr_t) prev_heap_end;
-}
-
-
-
-int
-isatty (file)
- int file;
-{
- return 1;
-}
-
-
-
-int
-_fstat (file, stat)
- int file;
- struct stat *stat;
-
-{
- stat->st_mode = S_IFCHR;
- return 0;
-}
-
-int
-_open (path, flags)
- const char *path;
- int flags;
-
-{
- return 0;
-}
-
-
-void
-_exit (status)
- int status;
-{
- asm (" mov.w #33,r3; trapa #15");
-}
diff --git a/newlib/libc/sys/linux/Makefile.am b/newlib/libc/sys/linux/Makefile.am
deleted file mode 100644
index de11547a3..000000000
--- a/newlib/libc/sys/linux/Makefile.am
+++ /dev/null
@@ -1,242 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/include $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) $(INCLTDL)
-
-if ELIX_LEVEL_1
-argp_dir=
-ARGP_LIB=
-else
-argp_dir=argp
-ARGP_LIB=argp/libargp.la
-endif
-
-SUBDIRS = machine \
- $(argp_dir) \
- cmath \
- $(EXTRA_SUBDIRS)\
- .
-SUBLIBS = \
- $(ARGP_LIB) \
- cmath/libcmath.la \
- $(EXTRA_SUBLIBS) \
- $(LINUX_MACH_LIB)
-
-GENERAL_SOURCES = \
- aio.c \
- brk.c \
- calloc.c \
- callocr.c \
- cfreer.c \
- cfspeed.c \
- clock_getres.c \
- clock_gettime.c \
- clock_settime.c \
- flockfile.c \
- free.c \
- freer.c \
- ftok.c \
- funlockfile.c \
- getdate.c \
- getdate_err.c \
- gethostname.c \
- getreent.c \
- ids.c \
- inode.c \
- io.c \
- ipc.c \
- linux.c \
- mallinfor.c \
- mallocr.c \
- mallstatsr.c \
- mmap.c \
- mq_close.c \
- mq_getattr.c \
- mq_notify.c \
- mq_open.c \
- mq_receive.c \
- mq_send.c \
- mq_setattr.c \
- mq_unlink.c \
- msize.c \
- msizer.c \
- mstats.c \
- mtrim.c \
- mtrimr.c \
- ntp_gettime.c \
- pread.c \
- process.c \
- prof-freq.c \
- profile.c \
- psignal.c \
- pwrite.c \
- raise.c \
- realloc.c \
- reallocr.c \
- rename.c \
- resource.c \
- sched.c \
- select.c \
- seteuid.c \
- sethostname.c \
- shm_open.c \
- shm_unlink.c \
- sig.c \
- sigaction.c \
- sigqueue.c \
- signal.c \
- siglongjmp.c \
- sigset.c \
- sigwait.c \
- socket.c \
- sleep.c \
- strsignal.c \
- strverscmp.c \
- sysconf.c \
- sysctl.c \
- systat.c \
- tcdrain.c \
- tcsendbrk.c \
- termios.c \
- time.c \
- usleep.c \
- versionsort.c
-
-ELIX_2_OBJS = \
- aio64.$(oext) \
- confstr.$(oext) \
- ctermid.$(oext) \
- fclean.$(oext) \
- fpathconf.$(oext) \
- fstab.$(oext) \
- fstatvfs.$(oext) \
- fstatvfs64.$(oext) \
- ftw.$(oext) \
- ftw64.$(oext) \
- getopt.$(oext) \
- getopt1.$(oext) \
- getrlimit64.$(oext) \
- getwd.$(oext) \
- io64.$(oext) \
- malign.$(oext) \
- malignr.$(oext) \
- malloptr.$(oext) \
- mcheck.$(oext) \
- mntent.$(oext) \
- mntent_r.$(oext) \
- pathconf.$(oext) \
- pread64.$(oext) \
- pvallocr.$(oext) \
- pwrite64.$(oext) \
- readdir64.$(oext) \
- realpath.$(oext) \
- scandir64.$(oext) \
- setrlimit64.$(oext) \
- statvfs.$(oext) \
- statvfs64.$(oext) \
- ttyname_r.$(oext) \
- utimes.$(oext) \
- vallocr.$(oext) \
- versionsort64.$(oext)
-
-ELIX_3_OBJS = \
- system.$(oext) \
- wait.$(oext)
-
-ELIX_4_OBJS = \
- getlogin.$(oext) \
- getpwent.$(oext) \
- stack.$(oext)
-
-if ELIX_LEVEL_1
-LIB_OBJS =
-else
-if ELIX_LEVEL_2
-LIB_OBJS = $(ELIX_2_OBJS)
-else
-if ELIX_LEVEL_3
-LIB_OBJS = $(ELIX_2_OBJS) $(ELIX_3_OBJS)
-else
-LIB_OBJS = $(ELIX_2_OBJS) $(ELIX_3_OBJS) $(ELIX_4_OBJS)
-endif
-endif
-endif
-
-# This will handle both /usr/src/linux-2.4/include/asm/signal.h (in Red Hat Linux 7.1)
-# and also /usr/src/linux/include/asm/signal.h in older versions of Red Hat Linux
-SIGNAL_H = /usr/include/asm/signal.h
-
-liblinux_la_LDFLAGS = -Xcompiler -nostdlib
-
-ADD_OBJS = \
- malloc.$(oext) \
- gethostid.$(oext) \
- sethostid.$(oext) \
- $(LINUX_MACH_LIB)
-
-if USE_LIBTOOL
-noinst_LTLIBRARIES = liblinux.la
-liblinux_la_SOURCES = $(GENERAL_SOURCES)
-liblinux_la_LIBADD = $(ADD_OBJS) $(LIB_OBJS)
-liblinux_la_DEPENDENCIES = $(ADD_OBJS) $(LIB_OBJS)
-LIBC_COMPILE = $(LTCOMPILE)
-noinst_DATA = objectlist.awk.in
-else
-noinst_LIBRARIES = lib.a
-lib_a_SOURCES = $(GENERAL_SOURCES)
-lib_a_LIBADD = $(ADD_OBJS) $(LIB_OBJS)
-lib_a_DEPENDENCIES = $(ADD_OBJS) $(LIB_OBJS)
-LIBC_COMPILE = $(COMPILE)
-noinst_DATA =
-
-lib.a: $(ADD_OBJS) $(LIB_OBJS) $(lib_a_OBJECTS)
- rm -f $@
- rm -rf tmp
- mkdir tmp
- cd tmp; \
- for i in $(SUBLIBS); do \
- $(AR) x ../$$i; \
- done; \
- $(AR) $(AR_FLAGS) ../$@ *.o
- $(RANLIB) $@
- rm -rf tmp
-
-endif # USE_LIBTOOL
-
-objectlist.awk.in: $(noinst_LTLIBRARIES) $(SUBLIBS)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
- do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
- done
- for j in $(SUBLIBS) ; \
- do \
- export i=`echo $$j | sed -e 's,\(.*\)\/[^\/]*$$,\1,'`; \
- if test $$i != "." && test -f $$i/objectlist.awk.in; then \
- cat $$i/objectlist.awk.in >> objectlist.awk.in ; \
- fi; \
- done
-
-all: crt0.o crt1.o
-
-crt0.o: machine/crt0.o
- rm -f $@
- ln machine/crt0.o $@ >/dev/null 2>/dev/null || cp machine/crt0.o $@
-
-machine/crt0.o: ; @true
-
-sig.$(oext): siglist.inc
-
-siglist.inc:
- $(AWK) '{ max = 32 } \
- /#define.SIG.*[1-9][0-9]*/ { n[$$3] = $$2 } \
- /#define.NSIG.*[1-9][0-9]*/ { max = $$3 } \
- /#define.SIGUNUSED/ \
- { for (i = 0; i <= max; i++) print "\"" n[i] "\"," }' \
- < $(SIGNAL_H) > siglist.inc || \
- { rm -f siglist.inc; exit 1; }
-
-AM_CFLAGS = -I $(srcdir)/../../stdio
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/linux/Makefile.in b/newlib/libc/sys/linux/Makefile.in
deleted file mode 100644
index ead358265..000000000
--- a/newlib/libc/sys/linux/Makefile.in
+++ /dev/null
@@ -1,603 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-AWK = @AWK@
-CC = @CC@
-CPP = @CPP@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-EXEEXT = @EXEEXT@
-EXTRA_SUBDIRS = @EXTRA_SUBDIRS@
-EXTRA_SUBLIBS = @EXTRA_SUBLIBS@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBTOOL = @LIBTOOL@
-LINUX_MACH_LIB = @LINUX_MACH_LIB@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/include $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) $(INCLTDL)
-@ELIX_LEVEL_1_TRUE@argp_dir =
-@ELIX_LEVEL_1_FALSE@argp_dir = argp
-@ELIX_LEVEL_1_TRUE@ARGP_LIB =
-@ELIX_LEVEL_1_FALSE@ARGP_LIB = argp/libargp.la
-
-SUBDIRS = machine $(argp_dir) cmath $(EXTRA_SUBDIRS) .
-
-SUBLIBS = $(ARGP_LIB) cmath/libcmath.la $(EXTRA_SUBLIBS) $(LINUX_MACH_LIB)
-
-
-GENERAL_SOURCES = aio.c brk.c calloc.c callocr.c cfreer.c cfspeed.c clock_getres.c clock_gettime.c clock_settime.c flockfile.c free.c freer.c ftok.c funlockfile.c getdate.c getdate_err.c gethostname.c getreent.c ids.c inode.c io.c ipc.c linux.c mallinfor.c mallocr.c mallstatsr.c mmap.c mq_close.c mq_getattr.c mq_notify.c mq_open.c mq_receive.c mq_send.c mq_setattr.c mq_unlink.c msize.c msizer.c mstats.c mtrim.c mtrimr.c ntp_gettime.c pread.c process.c prof-freq.c profile.c psignal.c pwrite.c raise.c realloc.c reallocr.c rename.c resource.c sched.c select.c seteuid.c sethostname.c shm_open.c shm_unlink.c sig.c sigaction.c sigqueue.c signal.c siglongjmp.c sigset.c sigwait.c socket.c sleep.c strsignal.c strverscmp.c sysconf.c sysctl.c systat.c tcdrain.c tcsendbrk.c termios.c time.c usleep.c versionsort.c
-
-
-ELIX_2_OBJS = aio64.$(oext) confstr.$(oext) ctermid.$(oext) fclean.$(oext) fpathconf.$(oext) fstab.$(oext) fstatvfs.$(oext) fstatvfs64.$(oext) ftw.$(oext) ftw64.$(oext) getopt.$(oext) getopt1.$(oext) getrlimit64.$(oext) getwd.$(oext) io64.$(oext) malign.$(oext) malignr.$(oext) malloptr.$(oext) mcheck.$(oext) mntent.$(oext) mntent_r.$(oext) pathconf.$(oext) pread64.$(oext) pvallocr.$(oext) pwrite64.$(oext) readdir64.$(oext) realpath.$(oext) scandir64.$(oext) setrlimit64.$(oext) statvfs.$(oext) statvfs64.$(oext) ttyname_r.$(oext) utimes.$(oext) vallocr.$(oext) versionsort64.$(oext)
-
-
-ELIX_3_OBJS = system.$(oext) wait.$(oext)
-
-
-ELIX_4_OBJS = getlogin.$(oext) getpwent.$(oext) stack.$(oext)
-
-@ELIX_LEVEL_1_TRUE@LIB_OBJS =
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@LIB_OBJS = $(ELIX_2_OBJS)
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_TRUE@LIB_OBJS = $(ELIX_2_OBJS) $(ELIX_3_OBJS)
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@LIB_OBJS = $(ELIX_2_OBJS) $(ELIX_3_OBJS) $(ELIX_4_OBJS)
-
-# This will handle both /usr/src/linux-2.4/include/asm/signal.h (in Red Hat Linux 7.1)
-# and also /usr/src/linux/include/asm/signal.h in older versions of Red Hat Linux
-SIGNAL_H = /usr/include/asm/signal.h
-
-liblinux_la_LDFLAGS = -Xcompiler -nostdlib
-
-ADD_OBJS = malloc.$(oext) gethostid.$(oext) sethostid.$(oext) $(LINUX_MACH_LIB)
-
-
-@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = liblinux.la
-@USE_LIBTOOL_TRUE@liblinux_la_SOURCES = $(GENERAL_SOURCES)
-@USE_LIBTOOL_TRUE@liblinux_la_LIBADD = $(ADD_OBJS) $(LIB_OBJS)
-@USE_LIBTOOL_TRUE@liblinux_la_DEPENDENCIES = $(ADD_OBJS) $(LIB_OBJS)
-@USE_LIBTOOL_TRUE@LIBC_COMPILE = $(LTCOMPILE)
-@USE_LIBTOOL_FALSE@LIBC_COMPILE = $(COMPILE)
-@USE_LIBTOOL_TRUE@noinst_DATA = objectlist.awk.in
-@USE_LIBTOOL_FALSE@noinst_DATA =
-@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
-@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(GENERAL_SOURCES)
-@USE_LIBTOOL_FALSE@lib_a_LIBADD = $(ADD_OBJS) $(LIB_OBJS)
-@USE_LIBTOOL_FALSE@lib_a_DEPENDENCIES = $(ADD_OBJS) $(LIB_OBJS)
-
-AM_CFLAGS = -I $(srcdir)/../../stdio
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-@USE_LIBTOOL_FALSE@lib_a_OBJECTS = aio.$(OBJEXT) brk.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@calloc.$(OBJEXT) callocr.$(OBJEXT) cfreer.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@cfspeed.$(OBJEXT) clock_getres.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@clock_gettime.$(OBJEXT) clock_settime.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@flockfile.$(OBJEXT) free.$(OBJEXT) freer.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@ftok.$(OBJEXT) funlockfile.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@getdate.$(OBJEXT) getdate_err.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@gethostname.$(OBJEXT) getreent.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@ids.$(OBJEXT) inode.$(OBJEXT) io.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@ipc.$(OBJEXT) linux.$(OBJEXT) mallinfor.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@mallocr.$(OBJEXT) mallstatsr.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@mmap.$(OBJEXT) mq_close.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@mq_getattr.$(OBJEXT) mq_notify.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@mq_open.$(OBJEXT) mq_receive.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@mq_send.$(OBJEXT) mq_setattr.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@mq_unlink.$(OBJEXT) msize.$(OBJEXT) msizer.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@mstats.$(OBJEXT) mtrim.$(OBJEXT) mtrimr.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@ntp_gettime.$(OBJEXT) pread.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@process.$(OBJEXT) prof-freq.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@profile.$(OBJEXT) psignal.$(OBJEXT) pwrite.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@raise.$(OBJEXT) realloc.$(OBJEXT) reallocr.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@rename.$(OBJEXT) resource.$(OBJEXT) sched.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@select.$(OBJEXT) seteuid.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@sethostname.$(OBJEXT) shm_open.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@shm_unlink.$(OBJEXT) sig.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@sigaction.$(OBJEXT) sigqueue.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@signal.$(OBJEXT) siglongjmp.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@sigset.$(OBJEXT) sigwait.$(OBJEXT) socket.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@sleep.$(OBJEXT) strsignal.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@strverscmp.$(OBJEXT) sysconf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@sysctl.$(OBJEXT) systat.$(OBJEXT) tcdrain.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@tcsendbrk.$(OBJEXT) termios.$(OBJEXT) time.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@usleep.$(OBJEXT) versionsort.$(OBJEXT)
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-
-@USE_LIBTOOL_TRUE@liblinux_la_OBJECTS = aio.lo brk.lo calloc.lo \
-@USE_LIBTOOL_TRUE@callocr.lo cfreer.lo cfspeed.lo clock_getres.lo \
-@USE_LIBTOOL_TRUE@clock_gettime.lo clock_settime.lo flockfile.lo \
-@USE_LIBTOOL_TRUE@free.lo freer.lo ftok.lo funlockfile.lo getdate.lo \
-@USE_LIBTOOL_TRUE@getdate_err.lo gethostname.lo getreent.lo ids.lo \
-@USE_LIBTOOL_TRUE@inode.lo io.lo ipc.lo linux.lo mallinfor.lo \
-@USE_LIBTOOL_TRUE@mallocr.lo mallstatsr.lo mmap.lo mq_close.lo \
-@USE_LIBTOOL_TRUE@mq_getattr.lo mq_notify.lo mq_open.lo mq_receive.lo \
-@USE_LIBTOOL_TRUE@mq_send.lo mq_setattr.lo mq_unlink.lo msize.lo \
-@USE_LIBTOOL_TRUE@msizer.lo mstats.lo mtrim.lo mtrimr.lo ntp_gettime.lo \
-@USE_LIBTOOL_TRUE@pread.lo process.lo prof-freq.lo profile.lo \
-@USE_LIBTOOL_TRUE@psignal.lo pwrite.lo raise.lo realloc.lo reallocr.lo \
-@USE_LIBTOOL_TRUE@rename.lo resource.lo sched.lo select.lo seteuid.lo \
-@USE_LIBTOOL_TRUE@sethostname.lo shm_open.lo shm_unlink.lo sig.lo \
-@USE_LIBTOOL_TRUE@sigaction.lo sigqueue.lo signal.lo siglongjmp.lo \
-@USE_LIBTOOL_TRUE@sigset.lo sigwait.lo socket.lo sleep.lo strsignal.lo \
-@USE_LIBTOOL_TRUE@strverscmp.lo sysconf.lo sysctl.lo systat.lo \
-@USE_LIBTOOL_TRUE@tcdrain.lo tcsendbrk.lo termios.lo time.lo usleep.lo \
-@USE_LIBTOOL_TRUE@versionsort.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DATA = $(noinst_DATA)
-
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-DIST_SUBDIRS = machine argp cmath @EXTRA_SUBDIRS@ .
-SOURCES = $(lib_a_SOURCES) $(liblinux_la_SOURCES)
-OBJECTS = $(lib_a_OBJECTS) $(liblinux_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-mostlyclean-noinstLTLIBRARIES:
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-liblinux.la: $(liblinux_la_OBJECTS) $(liblinux_la_DEPENDENCIES)
- $(LINK) $(liblinux_la_LDFLAGS) $(liblinux_la_OBJECTS) $(liblinux_la_LIBADD) $(LIBS)
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" != "." || dot_seen=yes; \
- done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- for subdir in $(DIST_SUBDIRS); do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- || exit 1; \
- fi; \
- done
-info-am:
-info: info-recursive
-dvi-am:
-dvi: dvi-recursive
-check-am:
-check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-info-am:
-install-info: install-info-recursive
-install-exec-am:
-install-exec: install-exec-recursive
-
-install-data-am:
-install-data: install-data-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am:
-uninstall: uninstall-recursive
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA)
-all-redirect: all-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-noinstLTLIBRARIES \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-recursive
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-libtool \
- clean-noinstLTLIBRARIES clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-recursive
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-libtool distclean-noinstLTLIBRARIES \
- distclean-tags distclean-generic clean-am
- -rm -f libtool
-
-distclean: distclean-recursive
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool mostlyclean-noinstLTLIBRARIES \
-distclean-noinstLTLIBRARIES clean-noinstLTLIBRARIES \
-maintainer-clean-noinstLTLIBRARIES install-data-recursive \
-uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-info-am \
-install-info install-exec-am install-exec install-data-am install-data \
-install-am install uninstall-am uninstall all-redirect all-am all \
-installdirs-am installdirs mostlyclean-generic distclean-generic \
-clean-generic maintainer-clean-generic clean mostlyclean distclean \
-maintainer-clean
-
-
-@USE_LIBTOOL_FALSE@lib.a: $(ADD_OBJS) $(LIB_OBJS) $(lib_a_OBJECTS)
-@USE_LIBTOOL_FALSE@ rm -f $@
-@USE_LIBTOOL_FALSE@ rm -rf tmp
-@USE_LIBTOOL_FALSE@ mkdir tmp
-@USE_LIBTOOL_FALSE@ cd tmp; \
-@USE_LIBTOOL_FALSE@ for i in $(SUBLIBS); do \
-@USE_LIBTOOL_FALSE@ $(AR) x ../$$i; \
-@USE_LIBTOOL_FALSE@ done; \
-@USE_LIBTOOL_FALSE@ $(AR) $(AR_FLAGS) ../$@ *.o
-@USE_LIBTOOL_FALSE@ $(RANLIB) $@
-@USE_LIBTOOL_FALSE@ rm -rf tmp
-
-objectlist.awk.in: $(noinst_LTLIBRARIES) $(SUBLIBS)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
- do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
- done
- for j in $(SUBLIBS) ; \
- do \
- export i=`echo $$j | sed -e 's,\(.*\)\/[^\/]*$$,\1,'`; \
- if test $$i != "." && test -f $$i/objectlist.awk.in; then \
- cat $$i/objectlist.awk.in >> objectlist.awk.in ; \
- fi; \
- done
-
-all: crt0.o crt1.o
-
-crt0.o: machine/crt0.o
- rm -f $@
- ln machine/crt0.o $@ >/dev/null 2>/dev/null || cp machine/crt0.o $@
-
-machine/crt0.o: ; @true
-
-sig.$(oext): siglist.inc
-
-siglist.inc:
- $(AWK) '{ max = 32 } \
- /#define.SIG.*[1-9][0-9]*/ { n[$$3] = $$2 } \
- /#define.NSIG.*[1-9][0-9]*/ { max = $$3 } \
- /#define.SIGUNUSED/ \
- { for (i = 0; i <= max; i++) print "\"" n[i] "\"," }' \
- < $(SIGNAL_H) > siglist.inc || \
- { rm -f siglist.inc; exit 1; }
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/linux/aclocal.m4 b/newlib/libc/sys/linux/aclocal.m4
deleted file mode 100644
index c0a206827..000000000
--- a/newlib/libc/sys/linux/aclocal.m4
+++ /dev/null
@@ -1,1223 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
-
-# serial 46 AC_PROG_LIBTOOL
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
- AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [AC_LIBTOOL_CXX],
- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
- AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [ifdef([AC_PROG_GCJ],
- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([A][M_PROG_GCJ],
- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([LT_AC_PROG_GCJ],
- [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])])])])])
-
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- AC_PATH_MAGIC
- fi
- ;;
-esac
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-AC_ARG_WITH(pic,
- [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
- pic_mode="$withval", pic_mode=default)
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_SAVE
- AC_LANG_C
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_RESTORE])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
- [AC_TRY_LINK([],
- [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);],
- [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
- [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
- ])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_LIBTOOL_PICMODE - implement the --with-pic flag
-# Usage: AC_LIBTOOL_PICMODE[(MODE)]
-# Where MODE is either `yes' or `no'. If omitted, it defaults to
-# `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)])
-
-
-# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="ifelse([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-])
-
-
-# AC_PATH_MAGIC - find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
-AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])
-
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- re_direlt=['/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])
-
-# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
-[lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-])
-
-# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependant libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.[012])
- lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd* )
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- ia64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
- else
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
- fi
- ;;
-
-newsos6)
- [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-[sysv5uw[78]* | sysv4*uw2*)]
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-])
-
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-convenience to the
-# configure arguments. Note that LIBLTDL and INCLTDL are not
-# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
-# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
-# with '${top_builddir}/' and INCLTDL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!). If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case $enable_ltdl_convenience in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-install to the configure
-# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
-# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
-# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
-# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
-# with '${top_srcdir}/' (note the single quotes!). If your package is
-# not flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-# If this macro is not defined by Autoconf, define it here.
-ifdef([AC_PROVIDE_IFELSE],
- [],
- [define([AC_PROVIDE_IFELSE],
- [ifdef([AC_PROVIDE_$1],
- [$2], [$3])])])
-
-# AC_LIBTOOL_CXX - enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
-
-AC_DEFUN([_AC_LIBTOOL_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
-LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
-lt_save_CC="$CC"
-lt_save_CFLAGS="$CFLAGS"
-dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
-dnl is set to the C++ compiler.
-AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
-CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-# AC_LIBTOOL_GCJ - enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
-
-AC_DEFUN([_AC_LIBTOOL_GCJ],
-[AC_REQUIRE([AC_PROG_LIBTOOL])
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
- [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
- [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
- [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
-lt_save_CC="$CC"
-lt_save_CFLAGS="$CFLAGS"
-dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
-dnl is set to the C++ compiler.
-AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
-CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-dnl old names
-AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)
-])
-
diff --git a/newlib/libc/sys/linux/aio.c b/newlib/libc/sys/linux/aio.c
deleted file mode 100644
index de988ebfc..000000000
--- a/newlib/libc/sys/linux/aio.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* libc/sys/linux/aio.c - asychronous I/O */
-
-/* Copyright 2002, Red Hat Inc. */
-
-/* Currently asynchronous I/O is not implemented. */
-
-#include <sys/types.h>
-#include <aio.h>
-#include <errno.h>
-
-int
-aio_cancel (int fd, struct aiocb *cb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int
-aio_error (const struct aiocb *cb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int
-aio_fsync (int op, struct aiocb *cb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int
-aio_read (struct aiocb *cb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-ssize_t
-aio_return (struct aiocb *cb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int
-aio_suspend (const struct aiocb *const list[], int nent,
- const struct timespec *timeout)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int
-aio_write (struct aiocb *cb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int
-lio_listio (int mode, struct aiocb * const list[], int nent,
- struct sigevent *sig)
-{
- errno = ENOSYS;
- return -1;
-}
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 4
-void
-aio_init (const struct aioinit *INIT)
-{
- errno = ENOSYS;
-}
-#endif
diff --git a/newlib/libc/sys/linux/aio64.c b/newlib/libc/sys/linux/aio64.c
deleted file mode 100644
index 5a9cdd928..000000000
--- a/newlib/libc/sys/linux/aio64.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* libc/sys/linux/aio64.c - asychronous I/O */
-
-/* Copyright 2002, Red Hat Inc. */
-
-/* Currently asynchronous I/O is not implemented. */
-
-#include <sys/types.h>
-#include <aio.h>
-#include <errno.h>
-
-int
-aio_cancel64 (int fd, struct aiocb64 *cb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int
-aio_error64 (const struct aiocb64 *cb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int
-aio_fsync64 (int op, struct aiocb64 *cb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int
-aio_read64 (struct aiocb64 *cb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-ssize_t
-aio_return64 (struct aiocb64 *cb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int
-aio_suspend64 (const struct aiocb64 *const list[], int nent,
- const struct timespec *timeout)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int
-aio_write64 (struct aiocb64 *cb)
-{
- errno = ENOSYS;
- return -1;
-}
-
-int
-lio_listio64 (int mode, struct aiocb64 * const list[], int nent,
- struct sigevent *sig)
-{
- errno = ENOSYS;
- return -1;
-}
diff --git a/newlib/libc/sys/linux/argp/Makefile.am b/newlib/libc/sys/linux/argp/Makefile.am
deleted file mode 100644
index 95869fec5..000000000
--- a/newlib/libc/sys/linux/argp/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/../include $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = \
- argp-ba.c argp-eexst.c argp-fmtstream.c argp-fs-xinl.c \
- argp-help.c argp-parse.c argp-pv.c argp-pvh.c argp-xinl.c
-
-libargp_la_LDFLAGS = -Xcompiler -nostdlib
-
-if USE_LIBTOOL
-noinst_LTLIBRARIES = libargp.la
-libargp_la_SOURCES = $(LIB_SOURCES)
-noinst_DATA = objectlist.awk.in
-else
-noinst_LIBRARIES = lib.a
-lib_a_SOURCES = $(LIB_SOURCES)
-noinst_DATA =
-endif # USE_LIBTOOL
-
-include $(srcdir)/../../../../Makefile.shared
diff --git a/newlib/libc/sys/linux/argp/Makefile.in b/newlib/libc/sys/linux/argp/Makefile.in
deleted file mode 100644
index e04ae04a6..000000000
--- a/newlib/libc/sys/linux/argp/Makefile.in
+++ /dev/null
@@ -1,367 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-AWK = @AWK@
-CC = @CC@
-CPP = @CPP@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-EXEEXT = @EXEEXT@
-EXTRA_SUBDIRS = @EXTRA_SUBDIRS@
-EXTRA_SUBLIBS = @EXTRA_SUBLIBS@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBTOOL = @LIBTOOL@
-LINUX_MACH_LIB = @LINUX_MACH_LIB@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/../include $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = argp-ba.c argp-eexst.c argp-fmtstream.c argp-fs-xinl.c argp-help.c argp-parse.c argp-pv.c argp-pvh.c argp-xinl.c
-
-
-libargp_la_LDFLAGS = -Xcompiler -nostdlib
-
-@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libargp.la
-@USE_LIBTOOL_TRUE@libargp_la_SOURCES = $(LIB_SOURCES)
-@USE_LIBTOOL_TRUE@noinst_DATA = objectlist.awk.in
-@USE_LIBTOOL_FALSE@noinst_DATA =
-@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
-@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-@USE_LIBTOOL_FALSE@lib_a_OBJECTS = argp-ba.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@argp-eexst.$(OBJEXT) argp-fmtstream.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@argp-fs-xinl.$(OBJEXT) argp-help.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@argp-parse.$(OBJEXT) argp-pv.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@argp-pvh.$(OBJEXT) argp-xinl.$(OBJEXT)
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-
-libargp_la_LIBADD =
-@USE_LIBTOOL_TRUE@libargp_la_OBJECTS = argp-ba.lo argp-eexst.lo \
-@USE_LIBTOOL_TRUE@argp-fmtstream.lo argp-fs-xinl.lo argp-help.lo \
-@USE_LIBTOOL_TRUE@argp-parse.lo argp-pv.lo argp-pvh.lo argp-xinl.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DATA = $(noinst_DATA)
-
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES) $(libargp_la_SOURCES)
-OBJECTS = $(lib_a_OBJECTS) $(libargp_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/../../../../Makefile.shared
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus argp/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-mostlyclean-noinstLTLIBRARIES:
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-libargp.la: $(libargp_la_OBJECTS) $(libargp_la_DEPENDENCIES)
- $(LINK) $(libargp_la_LDFLAGS) $(libargp_la_OBJECTS) $(libargp_la_LIBADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = argp
-
-distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-noinstLTLIBRARIES \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-libtool \
- clean-noinstLTLIBRARIES clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-libtool distclean-noinstLTLIBRARIES \
- distclean-tags distclean-generic clean-am
- -rm -f libtool
-
-distclean: distclean-am
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool mostlyclean-noinstLTLIBRARIES \
-distclean-noinstLTLIBRARIES clean-noinstLTLIBRARIES \
-maintainer-clean-noinstLTLIBRARIES tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-objectlist.awk.in: $(noinst_LTLIBRARIES)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
- do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
- done
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/linux/argp/argp-ba.c b/newlib/libc/sys/linux/argp/argp-ba.c
deleted file mode 100644
index f5270c88d..000000000
--- a/newlib/libc/sys/linux/argp/argp-ba.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Default definition for ARGP_PROGRAM_BUG_ADDRESS.
- Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Miles Bader <miles@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* If set by the user program, it should point to string that is the
- bug-reporting address for the program. It will be printed by argp_help if
- the ARGP_HELP_BUG_ADDR flag is set (as it is by various standard help
- messages), embedded in a sentence that says something like `Report bugs to
- ADDR.'. */
-const char *argp_program_bug_address;
diff --git a/newlib/libc/sys/linux/argp/argp-eexst.c b/newlib/libc/sys/linux/argp/argp-eexst.c
deleted file mode 100644
index a94c34674..000000000
--- a/newlib/libc/sys/linux/argp/argp-eexst.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Default definition for ARGP_ERR_EXIT_STATUS
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Miles Bader <miles@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sysexits.h>
-
-#include <argp.h>
-
-/* The exit status that argp will use when exiting due to a parsing error.
- If not defined or set by the user program, this defaults to EX_USAGE from
- <sysexits.h>. */
-error_t argp_err_exit_status = EX_USAGE;
diff --git a/newlib/libc/sys/linux/argp/argp-fmtstream.c b/newlib/libc/sys/linux/argp/argp-fmtstream.c
deleted file mode 100644
index f783b803b..000000000
--- a/newlib/libc/sys/linux/argp/argp-fmtstream.c
+++ /dev/null
@@ -1,430 +0,0 @@
-/* Word-wrapping and line-truncating streams
- Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Miles Bader <miles@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* This package emulates glibc `line_wrap_stream' semantics for systems that
- don't have that. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <ctype.h>
-
-#include "argp-fmtstream.h"
-#include "argp-namefrob.h"
-
-#ifndef ARGP_FMTSTREAM_USE_LINEWRAP
-
-#ifndef isblank
-#define isblank(ch) ((ch)==' ' || (ch)=='\t')
-#endif
-
-#if defined _LIBC && defined USE_IN_LIBIO
-# include <wchar.h>
-# include <libio/libioP.h>
-# define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a)
-#endif
-
-#define INIT_BUF_SIZE 200
-#define PRINTF_SIZE_GUESS 150
-
-/* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines
- written on it with LMARGIN spaces and limits them to RMARGIN columns
- total. If WMARGIN >= 0, words that extend past RMARGIN are wrapped by
- replacing the whitespace before them with a newline and WMARGIN spaces.
- Otherwise, chars beyond RMARGIN are simply dropped until a newline.
- Returns NULL if there was an error. */
-argp_fmtstream_t
-__argp_make_fmtstream (FILE *stream,
- size_t lmargin, size_t rmargin, ssize_t wmargin)
-{
- argp_fmtstream_t fs;
-
- fs = (struct argp_fmtstream *) malloc (sizeof (struct argp_fmtstream));
- if (fs != NULL)
- {
- fs->stream = stream;
-
- fs->lmargin = lmargin;
- fs->rmargin = rmargin;
- fs->wmargin = wmargin;
- fs->point_col = 0;
- fs->point_offs = 0;
-
- fs->buf = (char *) malloc (INIT_BUF_SIZE);
- if (! fs->buf)
- {
- free (fs);
- fs = 0;
- }
- else
- {
- fs->p = fs->buf;
- fs->end = fs->buf + INIT_BUF_SIZE;
- }
- }
-
- return fs;
-}
-#ifdef weak_alias
-weak_alias (__argp_make_fmtstream, argp_make_fmtstream)
-#endif
-
-/* Flush FS to its stream, and free it (but don't close the stream). */
-void
-__argp_fmtstream_free (argp_fmtstream_t fs)
-{
- __argp_fmtstream_update (fs);
- if (fs->p > fs->buf)
- {
-#ifdef USE_IN_LIBIO
- if (_IO_fwide (fs->stream, 0) > 0)
- __fwprintf (fs->stream, L"%.*s", (int) (fs->p - fs->buf), fs->buf);
- else
-#endif
- fwrite (fs->buf, 1, fs->p - fs->buf, fs->stream);
- }
- free (fs->buf);
- free (fs);
-}
-#ifdef weak_alias
-weak_alias (__argp_fmtstream_free, argp_fmtstream_free)
-#endif
-
-/* Process FS's buffer so that line wrapping is done from POINT_OFFS to the
- end of its buffer. This code is mostly from glibc stdio/linewrap.c. */
-void
-__argp_fmtstream_update (argp_fmtstream_t fs)
-{
- char *buf, *nl;
- size_t len;
-
- /* Scan the buffer for newlines. */
- buf = fs->buf + fs->point_offs;
- while (buf < fs->p)
- {
- size_t r;
-
- if (fs->point_col == 0 && fs->lmargin != 0)
- {
- /* We are starting a new line. Print spaces to the left margin. */
- const size_t pad = fs->lmargin;
- if (fs->p + pad < fs->end)
- {
- /* We can fit in them in the buffer by moving the
- buffer text up and filling in the beginning. */
- memmove (buf + pad, buf, fs->p - buf);
- fs->p += pad; /* Compensate for bigger buffer. */
- memset (buf, ' ', pad); /* Fill in the spaces. */
- buf += pad; /* Don't bother searching them. */
- }
- else
- {
- /* No buffer space for spaces. Must flush. */
- size_t i;
- for (i = 0; i < pad; i++)
- {
-#ifdef USE_IN_LIBIO
- if (_IO_fwide (fs->stream, 0) > 0)
- putwc_unlocked (L' ', fs->stream);
- else
-#endif
- putc_unlocked (' ', fs->stream);
- }
- }
- fs->point_col = pad;
- }
-
- len = fs->p - buf;
- nl = memchr (buf, '\n', len);
-
- if (fs->point_col < 0)
- fs->point_col = 0;
-
- if (!nl)
- {
- /* The buffer ends in a partial line. */
-
- if (fs->point_col + len < fs->rmargin)
- {
- /* The remaining buffer text is a partial line and fits
- within the maximum line width. Advance point for the
- characters to be written and stop scanning. */
- fs->point_col += len;
- break;
- }
- else
- /* Set the end-of-line pointer for the code below to
- the end of the buffer. */
- nl = fs->p;
- }
- else if (fs->point_col + (nl - buf) < (ssize_t) fs->rmargin)
- {
- /* The buffer contains a full line that fits within the maximum
- line width. Reset point and scan the next line. */
- fs->point_col = 0;
- buf = nl + 1;
- continue;
- }
-
- /* This line is too long. */
- r = fs->rmargin - 1;
-
- if (fs->wmargin < 0)
- {
- /* Truncate the line by overwriting the excess with the
- newline and anything after it in the buffer. */
- if (nl < fs->p)
- {
- memmove (buf + (r - fs->point_col), nl, fs->p - nl);
- fs->p -= buf + (r - fs->point_col) - nl;
- /* Reset point for the next line and start scanning it. */
- fs->point_col = 0;
- buf += r + 1; /* Skip full line plus \n. */
- }
- else
- {
- /* The buffer ends with a partial line that is beyond the
- maximum line width. Advance point for the characters
- written, and discard those past the max from the buffer. */
- fs->point_col += len;
- fs->p -= fs->point_col - r;
- break;
- }
- }
- else
- {
- /* Do word wrap. Go to the column just past the maximum line
- width and scan back for the beginning of the word there.
- Then insert a line break. */
-
- char *p, *nextline;
- int i;
-
- p = buf + (r + 1 - fs->point_col);
- while (p >= buf && !isblank (*p))
- --p;
- nextline = p + 1; /* This will begin the next line. */
-
- if (nextline > buf)
- {
- /* Swallow separating blanks. */
- if (p >= buf)
- do
- --p;
- while (p >= buf && isblank (*p));
- nl = p + 1; /* The newline will replace the first blank. */
- }
- else
- {
- /* A single word that is greater than the maximum line width.
- Oh well. Put it on an overlong line by itself. */
- p = buf + (r + 1 - fs->point_col);
- /* Find the end of the long word. */
- do
- ++p;
- while (p < nl && !isblank (*p));
- if (p == nl)
- {
- /* It already ends a line. No fussing required. */
- fs->point_col = 0;
- buf = nl + 1;
- continue;
- }
- /* We will move the newline to replace the first blank. */
- nl = p;
- /* Swallow separating blanks. */
- do
- ++p;
- while (isblank (*p));
- /* The next line will start here. */
- nextline = p;
- }
-
- /* Note: There are a bunch of tests below for
- NEXTLINE == BUF + LEN + 1; this case is where NL happens to fall
- at the end of the buffer, and NEXTLINE is in fact empty (and so
- we need not be careful to maintain its contents). */
-
- if (nextline == buf + len + 1
- ? fs->end - nl < fs->wmargin + 1
- : nextline - (nl + 1) < fs->wmargin)
- {
- /* The margin needs more blanks than we removed. */
- if (fs->end - fs->p > fs->wmargin + 1)
- /* Make some space for them. */
- {
- size_t mv = fs->p - nextline;
- memmove (nl + 1 + fs->wmargin, nextline, mv);
- nextline = nl + 1 + fs->wmargin;
- len = nextline + mv - buf;
- *nl++ = '\n';
- }
- else
- /* Output the first line so we can use the space. */
- {
-#ifdef USE_IN_LIBIO
- if (_IO_fwide (fs->stream, 0) > 0)
- __fwprintf (fs->stream, L"%.*s\n",
- (int) (nl - fs->buf), fs->buf);
- else
-#endif
- {
- if (nl > fs->buf)
- fwrite (fs->buf, 1, nl - fs->buf, fs->stream);
- putc_unlocked ('\n', fs->stream);
- }
- len += buf - fs->buf;
- nl = buf = fs->buf;
- }
- }
- else
- /* We can fit the newline and blanks in before
- the next word. */
- *nl++ = '\n';
-
- if (nextline - nl >= fs->wmargin
- || (nextline == buf + len + 1 && fs->end - nextline >= fs->wmargin))
- /* Add blanks up to the wrap margin column. */
- for (i = 0; i < fs->wmargin; ++i)
- *nl++ = ' ';
- else
- for (i = 0; i < fs->wmargin; ++i)
-#ifdef USE_IN_LIBIO
- if (_IO_fwide (fs->stream, 0) > 0)
- putwc_unlocked (L' ', fs->stream);
- else
-#endif
- putc_unlocked (' ', fs->stream);
-
- /* Copy the tail of the original buffer into the current buffer
- position. */
- if (nl < nextline)
- memmove (nl, nextline, buf + len - nextline);
- len -= nextline - buf;
-
- /* Continue the scan on the remaining lines in the buffer. */
- buf = nl;
-
- /* Restore bufp to include all the remaining text. */
- fs->p = nl + len;
-
- /* Reset the counter of what has been output this line. If wmargin
- is 0, we want to avoid the lmargin getting added, so we set
- point_col to a magic value of -1 in that case. */
- fs->point_col = fs->wmargin ? fs->wmargin : -1;
- }
- }
-
- /* Remember that we've scanned as far as the end of the buffer. */
- fs->point_offs = fs->p - fs->buf;
-}
-
-/* Ensure that FS has space for AMOUNT more bytes in its buffer, either by
- growing the buffer, or by flushing it. True is returned iff we succeed. */
-int
-__argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount)
-{
- if ((size_t) (fs->end - fs->p) < amount)
- {
- ssize_t wrote;
-
- /* Flush FS's buffer. */
- __argp_fmtstream_update (fs);
-
-#ifdef USE_IN_LIBIO
- if (_IO_fwide (fs->stream, 0) > 0)
- {
- __fwprintf (fs->stream, L"%.*s", (int) (fs->p - fs->buf), fs->buf);
- wrote = fs->p - fs->buf;
- }
- else
-#endif
- wrote = fwrite (fs->buf, 1, fs->p - fs->buf, fs->stream);
- if (wrote == fs->p - fs->buf)
- {
- fs->p = fs->buf;
- fs->point_offs = 0;
- }
- else
- {
- fs->p -= wrote;
- fs->point_offs -= wrote;
- memmove (fs->buf, fs->buf + wrote, fs->p - fs->buf);
- return 0;
- }
-
- if ((size_t) (fs->end - fs->buf) < amount)
- /* Gotta grow the buffer. */
- {
- size_t new_size = fs->end - fs->buf + amount;
- char *new_buf = realloc (fs->buf, new_size);
-
- if (! new_buf)
- {
- __set_errno (ENOMEM);
- return 0;
- }
-
- fs->buf = new_buf;
- fs->end = new_buf + new_size;
- fs->p = fs->buf;
- }
- }
-
- return 1;
-}
-
-ssize_t
-__argp_fmtstream_printf (struct argp_fmtstream *fs, const char *fmt, ...)
-{
- int out;
- size_t avail;
- size_t size_guess = PRINTF_SIZE_GUESS; /* How much space to reserve. */
-
- do
- {
- va_list args;
-
- if (! __argp_fmtstream_ensure (fs, size_guess))
- return -1;
-
- va_start (args, fmt);
- avail = fs->end - fs->p;
- out = __vsnprintf (fs->p, avail, fmt, args);
- va_end (args);
- if (out >= avail)
- size_guess = out + 1;
- }
- while (out >= avail);
-
- fs->p += out;
-
- return out;
-}
-#ifdef weak_alias
-weak_alias (__argp_fmtstream_printf, argp_fmtstream_printf)
-#endif
-
-#endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */
diff --git a/newlib/libc/sys/linux/argp/argp-fmtstream.h b/newlib/libc/sys/linux/argp/argp-fmtstream.h
deleted file mode 100644
index 7a291e28c..000000000
--- a/newlib/libc/sys/linux/argp/argp-fmtstream.h
+++ /dev/null
@@ -1,297 +0,0 @@
-/* Word-wrapping and line-truncating streams.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Miles Bader <miles@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* This package emulates glibc `line_wrap_stream' semantics for systems that
- don't have that. If the system does have it, it is just a wrapper for
- that. This header file is only used internally while compiling argp, and
- shouldn't be installed. */
-
-#ifndef _ARGP_FMTSTREAM_H
-#define _ARGP_FMTSTREAM_H
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-#if (_LIBC - 0 && !defined (USE_IN_LIBIO)) \
- || (defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H))
-/* line_wrap_stream is available, so use that. */
-#define ARGP_FMTSTREAM_USE_LINEWRAP
-#endif
-
-#ifdef ARGP_FMTSTREAM_USE_LINEWRAP
-/* Just be a simple wrapper for line_wrap_stream; the semantics are
- *slightly* different, as line_wrap_stream doesn't actually make a new
- object, it just modifies the given stream (reversibly) to do
- line-wrapping. Since we control who uses this code, it doesn't matter. */
-
-#include <linewrap.h>
-
-typedef FILE *argp_fmtstream_t;
-
-#define argp_make_fmtstream line_wrap_stream
-#define __argp_make_fmtstream line_wrap_stream
-#define argp_fmtstream_free line_unwrap_stream
-#define __argp_fmtstream_free line_unwrap_stream
-
-#define __argp_fmtstream_putc(fs,ch) putc(ch,fs)
-#define argp_fmtstream_putc(fs,ch) putc(ch,fs)
-#define __argp_fmtstream_puts(fs,str) fputs(str,fs)
-#define argp_fmtstream_puts(fs,str) fputs(str,fs)
-#define __argp_fmtstream_write(fs,str,len) fwrite(str,1,len,fs)
-#define argp_fmtstream_write(fs,str,len) fwrite(str,1,len,fs)
-#define __argp_fmtstream_printf fprintf
-#define argp_fmtstream_printf fprintf
-
-#define __argp_fmtstream_lmargin line_wrap_lmargin
-#define argp_fmtstream_lmargin line_wrap_lmargin
-#define __argp_fmtstream_set_lmargin line_wrap_set_lmargin
-#define argp_fmtstream_set_lmargin line_wrap_set_lmargin
-#define __argp_fmtstream_rmargin line_wrap_rmargin
-#define argp_fmtstream_rmargin line_wrap_rmargin
-#define __argp_fmtstream_set_rmargin line_wrap_set_rmargin
-#define argp_fmtstream_set_rmargin line_wrap_set_rmargin
-#define __argp_fmtstream_wmargin line_wrap_wmargin
-#define argp_fmtstream_wmargin line_wrap_wmargin
-#define __argp_fmtstream_set_wmargin line_wrap_set_wmargin
-#define argp_fmtstream_set_wmargin line_wrap_set_wmargin
-#define __argp_fmtstream_point line_wrap_point
-#define argp_fmtstream_point line_wrap_point
-
-#else /* !ARGP_FMTSTREAM_USE_LINEWRAP */
-/* Guess we have to define our own version. */
-
-#ifndef __const
-#define __const const
-#endif
-
-struct argp_fmtstream
-{
- FILE *stream; /* The stream we're outputting to. */
-
- size_t lmargin, rmargin; /* Left and right margins. */
- ssize_t wmargin; /* Margin to wrap to, or -1 to truncate. */
-
- /* Point in buffer to which we've processed for wrapping, but not output. */
- size_t point_offs;
- /* Output column at POINT_OFFS, or -1 meaning 0 but don't add lmargin. */
- ssize_t point_col;
-
- char *buf; /* Output buffer. */
- char *p; /* Current end of text in BUF. */
- char *end; /* Absolute end of BUF. */
-};
-
-typedef struct argp_fmtstream *argp_fmtstream_t;
-
-/* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines
- written on it with LMARGIN spaces and limits them to RMARGIN columns
- total. If WMARGIN >= 0, words that extend past RMARGIN are wrapped by
- replacing the whitespace before them with a newline and WMARGIN spaces.
- Otherwise, chars beyond RMARGIN are simply dropped until a newline.
- Returns NULL if there was an error. */
-extern argp_fmtstream_t __argp_make_fmtstream (FILE *__stream,
- size_t __lmargin,
- size_t __rmargin,
- ssize_t __wmargin);
-extern argp_fmtstream_t argp_make_fmtstream (FILE *__stream,
- size_t __lmargin,
- size_t __rmargin,
- ssize_t __wmargin);
-
-/* Flush __FS to its stream, and free it (but don't close the stream). */
-extern void __argp_fmtstream_free (argp_fmtstream_t __fs);
-extern void argp_fmtstream_free (argp_fmtstream_t __fs);
-
-extern ssize_t __argp_fmtstream_printf (argp_fmtstream_t __fs,
- __const char *__fmt, ...)
- __attribute__ ((__format__ (printf, 2, 3)));
-extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs,
- __const char *__fmt, ...)
- __attribute__ ((__format__ (printf, 2, 3)));
-
-extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
-extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
-
-extern int __argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str);
-extern int argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str);
-
-extern size_t __argp_fmtstream_write (argp_fmtstream_t __fs,
- __const char *__str, size_t __len);
-extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
- __const char *__str, size_t __len);
-
-/* Access macros for various bits of state. */
-#define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin)
-#define argp_fmtstream_rmargin(__fs) ((__fs)->rmargin)
-#define argp_fmtstream_wmargin(__fs) ((__fs)->wmargin)
-#define __argp_fmtstream_lmargin argp_fmtstream_lmargin
-#define __argp_fmtstream_rmargin argp_fmtstream_rmargin
-#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
-
-/* Set __FS's left margin to LMARGIN and return the old value. */
-extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
- size_t __lmargin);
-extern size_t __argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
- size_t __lmargin);
-
-/* Set __FS's right margin to __RMARGIN and return the old value. */
-extern size_t argp_fmtstream_set_rmargin (argp_fmtstream_t __fs,
- size_t __rmargin);
-extern size_t __argp_fmtstream_set_rmargin (argp_fmtstream_t __fs,
- size_t __rmargin);
-
-/* Set __FS's wrap margin to __WMARGIN and return the old value. */
-extern size_t argp_fmtstream_set_wmargin (argp_fmtstream_t __fs,
- size_t __wmargin);
-extern size_t __argp_fmtstream_set_wmargin (argp_fmtstream_t __fs,
- size_t __wmargin);
-
-/* Return the column number of the current output point in __FS. */
-extern size_t argp_fmtstream_point (argp_fmtstream_t __fs);
-extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs);
-
-/* Internal routines. */
-extern void _argp_fmtstream_update (argp_fmtstream_t __fs);
-extern void __argp_fmtstream_update (argp_fmtstream_t __fs);
-extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
-extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
-
-#ifdef __OPTIMIZE__
-/* Inline versions of above routines. */
-
-#if !_LIBC
-#define __argp_fmtstream_putc argp_fmtstream_putc
-#define __argp_fmtstream_puts argp_fmtstream_puts
-#define __argp_fmtstream_write argp_fmtstream_write
-#define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin
-#define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin
-#define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin
-#define __argp_fmtstream_point argp_fmtstream_point
-#define __argp_fmtstream_update _argp_fmtstream_update
-#define __argp_fmtstream_ensure _argp_fmtstream_ensure
-#endif
-
-#ifndef ARGP_FS_EI
-#define ARGP_FS_EI extern inline
-#endif
-
-ARGP_FS_EI size_t
-__argp_fmtstream_write (argp_fmtstream_t __fs,
- __const char *__str, size_t __len)
-{
- if (__fs->p + __len <= __fs->end || __argp_fmtstream_ensure (__fs, __len))
- {
- memcpy (__fs->p, __str, __len);
- __fs->p += __len;
- return __len;
- }
- else
- return 0;
-}
-
-ARGP_FS_EI int
-__argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str)
-{
- size_t __len = strlen (__str);
- if (__len)
- {
- size_t __wrote = __argp_fmtstream_write (__fs, __str, __len);
- return __wrote == __len ? 0 : -1;
- }
- else
- return 0;
-}
-
-ARGP_FS_EI int
-__argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch)
-{
- if (__fs->p < __fs->end || __argp_fmtstream_ensure (__fs, 1))
- return *__fs->p++ = __ch;
- else
- return EOF;
-}
-
-/* Set __FS's left margin to __LMARGIN and return the old value. */
-ARGP_FS_EI size_t
-__argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, size_t __lmargin)
-{
- size_t __old;
- if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
- __argp_fmtstream_update (__fs);
- __old = __fs->lmargin;
- __fs->lmargin = __lmargin;
- return __old;
-}
-
-/* Set __FS's right margin to __RMARGIN and return the old value. */
-ARGP_FS_EI size_t
-__argp_fmtstream_set_rmargin (argp_fmtstream_t __fs, size_t __rmargin)
-{
- size_t __old;
- if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
- __argp_fmtstream_update (__fs);
- __old = __fs->rmargin;
- __fs->rmargin = __rmargin;
- return __old;
-}
-
-/* Set FS's wrap margin to __WMARGIN and return the old value. */
-ARGP_FS_EI size_t
-__argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, size_t __wmargin)
-{
- size_t __old;
- if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
- __argp_fmtstream_update (__fs);
- __old = __fs->wmargin;
- __fs->wmargin = __wmargin;
- return __old;
-}
-
-/* Return the column number of the current output point in __FS. */
-ARGP_FS_EI size_t
-__argp_fmtstream_point (argp_fmtstream_t __fs)
-{
- if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
- __argp_fmtstream_update (__fs);
- return __fs->point_col >= 0 ? __fs->point_col : 0;
-}
-
-#if !_LIBC
-#undef __argp_fmtstream_putc
-#undef __argp_fmtstream_puts
-#undef __argp_fmtstream_write
-#undef __argp_fmtstream_set_lmargin
-#undef __argp_fmtstream_set_rmargin
-#undef __argp_fmtstream_set_wmargin
-#undef __argp_fmtstream_point
-#undef __argp_fmtstream_update
-#undef __argp_fmtstream_ensure
-#endif
-
-#endif /* __OPTIMIZE__ */
-
-#endif /* ARGP_FMTSTREAM_USE_LINEWRAP */
-
-#endif /* argp-fmtstream.h */
diff --git a/newlib/libc/sys/linux/argp/argp-fs-xinl.c b/newlib/libc/sys/linux/argp/argp-fs-xinl.c
deleted file mode 100644
index 9b836d138..000000000
--- a/newlib/libc/sys/linux/argp/argp-fs-xinl.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Real definitions for extern inline functions in argp-fmtstream.h
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Miles Bader <miles@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#define ARGP_FS_EI
-#undef __OPTIMIZE__
-#define __OPTIMIZE__ 1
-#include "argp-fmtstream.h"
-
-/* Add weak aliases. */
-#if _LIBC - 0 && !defined (ARGP_FMTSTREAM_USE_LINEWRAP) && defined (weak_alias)
-
-weak_alias (__argp_fmtstream_putc, argp_fmtstream_putc)
-weak_alias (__argp_fmtstream_puts, argp_fmtstream_puts)
-weak_alias (__argp_fmtstream_write, argp_fmtstream_write)
-weak_alias (__argp_fmtstream_set_lmargin, argp_fmtstream_set_lmargin)
-weak_alias (__argp_fmtstream_set_rmargin, argp_fmtstream_set_rmargin)
-weak_alias (__argp_fmtstream_set_wmargin, argp_fmtstream_set_wmargin)
-weak_alias (__argp_fmtstream_point, argp_fmtstream_point)
-
-#endif
diff --git a/newlib/libc/sys/linux/argp/argp-help.c b/newlib/libc/sys/linux/argp/argp-help.c
deleted file mode 100644
index d1523693b..000000000
--- a/newlib/libc/sys/linux/argp/argp-help.c
+++ /dev/null
@@ -1,1863 +0,0 @@
-/* Hierarchial argument parsing help output
- Copyright (C) 1995-2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Miles Bader <miles@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifndef alloca
-# ifdef __GNUC__
-# define alloca __builtin_alloca
-# define HAVE_ALLOCA 1
-# else
-# if defined HAVE_ALLOCA_H || defined _LIBC
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca
-char *alloca ();
-# endif
-# endif
-# endif
-# endif
-#endif
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <stdarg.h>
-#include <malloc.h>
-#include <ctype.h>
-#ifdef USE_IN_LIBIO
-# include <wchar.h>
-#endif
-
-#ifndef _
-/* This is for other GNU distributions with internationalized messages. */
-# if defined HAVE_LIBINTL_H || defined _LIBC
-# include <libintl.h>
-# ifdef _LIBC
-# undef dgettext
-# define dgettext(domain, msgid) __dcgettext (domain, msgid, LC_MESSAGES)
-# endif
-# else
-# define dgettext(domain, msgid) (msgid)
-# endif
-#endif
-
-#include <argp.h>
-#include "argp-fmtstream.h"
-#include "argp-namefrob.h"
-
-/* User-selectable (using an environment variable) formatting parameters.
-
- These may be specified in an environment variable called `ARGP_HELP_FMT',
- with a contents like: VAR1=VAL1,VAR2=VAL2,BOOLVAR2,no-BOOLVAR2
- Where VALn must be a positive integer. The list of variables is in the
- UPARAM_NAMES vector, below. */
-
-/* Default parameters. */
-#define DUP_ARGS 0 /* True if option argument can be duplicated. */
-#define DUP_ARGS_NOTE 1 /* True to print a note about duplicate args. */
-#define SHORT_OPT_COL 2 /* column in which short options start */
-#define LONG_OPT_COL 6 /* column in which long options start */
-#define DOC_OPT_COL 2 /* column in which doc options start */
-#define OPT_DOC_COL 29 /* column in which option text starts */
-#define HEADER_COL 1 /* column in which group headers are printed */
-#define USAGE_INDENT 12 /* indentation of wrapped usage lines */
-#define RMARGIN 79 /* right margin used for wrapping */
-
-/* User-selectable (using an environment variable) formatting parameters.
- They must all be of type `int' for the parsing code to work. */
-struct uparams
-{
- /* If true, arguments for an option are shown with both short and long
- options, even when a given option has both, e.g. `-x ARG, --longx=ARG'.
- If false, then if an option has both, the argument is only shown with
- the long one, e.g., `-x, --longx=ARG', and a message indicating that
- this really means both is printed below the options. */
- int dup_args;
-
- /* This is true if when DUP_ARGS is false, and some duplicate arguments have
- been suppressed, an explanatory message should be printed. */
- int dup_args_note;
-
- /* Various output columns. */
- int short_opt_col;
- int long_opt_col;
- int doc_opt_col;
- int opt_doc_col;
- int header_col;
- int usage_indent;
- int rmargin;
-
- int valid; /* True when the values in here are valid. */
-};
-
-/* This is a global variable, as user options are only ever read once. */
-static struct uparams uparams = {
- DUP_ARGS, DUP_ARGS_NOTE,
- SHORT_OPT_COL, LONG_OPT_COL, DOC_OPT_COL, OPT_DOC_COL, HEADER_COL,
- USAGE_INDENT, RMARGIN,
- 0
-};
-
-/* A particular uparam, and what the user name is. */
-struct uparam_name
-{
- const char *name; /* User name. */
- int is_bool; /* Whether it's `boolean'. */
- size_t uparams_offs; /* Location of the (int) field in UPARAMS. */
-};
-
-/* The name-field mappings we know about. */
-static const struct uparam_name uparam_names[] =
-{
- { "dup-args", 1, offsetof (struct uparams, dup_args) },
- { "dup-args-note", 1, offsetof (struct uparams, dup_args_note) },
- { "short-opt-col", 0, offsetof (struct uparams, short_opt_col) },
- { "long-opt-col", 0, offsetof (struct uparams, long_opt_col) },
- { "doc-opt-col", 0, offsetof (struct uparams, doc_opt_col) },
- { "opt-doc-col", 0, offsetof (struct uparams, opt_doc_col) },
- { "header-col", 0, offsetof (struct uparams, header_col) },
- { "usage-indent", 0, offsetof (struct uparams, usage_indent) },
- { "rmargin", 0, offsetof (struct uparams, rmargin) },
- { 0 }
-};
-
-/* Read user options from the environment, and fill in UPARAMS appropiately. */
-static void
-fill_in_uparams (const struct argp_state *state)
-{
- const char *var = getenv ("ARGP_HELP_FMT");
-
-#define SKIPWS(p) do { while (isspace (*p)) p++; } while (0);
-
- if (var)
- /* Parse var. */
- while (*var)
- {
- SKIPWS (var);
-
- if (isalpha (*var))
- {
- size_t var_len;
- const struct uparam_name *un;
- int unspec = 0, val = 0;
- const char *arg = var;
-
- while (isalnum (*arg) || *arg == '-' || *arg == '_')
- arg++;
- var_len = arg - var;
-
- SKIPWS (arg);
-
- if (*arg == '\0' || *arg == ',')
- unspec = 1;
- else if (*arg == '=')
- {
- arg++;
- SKIPWS (arg);
- }
-
- if (unspec)
- {
- if (var[0] == 'n' && var[1] == 'o' && var[2] == '-')
- {
- val = 0;
- var += 3;
- var_len -= 3;
- }
- else
- val = 1;
- }
- else if (isdigit (*arg))
- {
- val = atoi (arg);
- while (isdigit (*arg))
- arg++;
- SKIPWS (arg);
- }
-
- for (un = uparam_names; un->name; un++)
- if (strlen (un->name) == var_len
- && strncmp (var, un->name, var_len) == 0)
- {
- if (unspec && !un->is_bool)
- __argp_failure (state, 0, 0,
- dgettext (state->root_argp->argp_domain, "\
-%.*s: ARGP_HELP_FMT parameter requires a value"),
- (int) var_len, var);
- else
- *(int *)((char *)&uparams + un->uparams_offs) = val;
- break;
- }
- if (! un->name)
- __argp_failure (state, 0, 0,
- dgettext (state->root_argp->argp_domain, "\
-%.*s: Unknown ARGP_HELP_FMT parameter"),
- (int) var_len, var);
-
- var = arg;
- if (*var == ',')
- var++;
- }
- else if (*var)
- {
- __argp_failure (state, 0, 0,
- dgettext (state->root_argp->argp_domain,
- "Garbage in ARGP_HELP_FMT: %s"), var);
- break;
- }
- }
-}
-
-/* Returns true if OPT hasn't been marked invisible. Visibility only affects
- whether OPT is displayed or used in sorting, not option shadowing. */
-#define ovisible(opt) (! ((opt)->flags & OPTION_HIDDEN))
-
-/* Returns true if OPT is an alias for an earlier option. */
-#define oalias(opt) ((opt)->flags & OPTION_ALIAS)
-
-/* Returns true if OPT is an documentation-only entry. */
-#define odoc(opt) ((opt)->flags & OPTION_DOC)
-
-/* Returns true if OPT is the end-of-list marker for a list of options. */
-#define oend(opt) __option_is_end (opt)
-
-/* Returns true if OPT has a short option. */
-#define oshort(opt) __option_is_short (opt)
-
-/*
- The help format for a particular option is like:
-
- -xARG, -yARG, --long1=ARG, --long2=ARG Documentation...
-
- Where ARG will be omitted if there's no argument, for this option, or
- will be surrounded by "[" and "]" appropiately if the argument is
- optional. The documentation string is word-wrapped appropiately, and if
- the list of options is long enough, it will be started on a separate line.
- If there are no short options for a given option, the first long option is
- indented slighly in a way that's supposed to make most long options appear
- to be in a separate column.
-
- For example, the following output (from ps):
-
- -p PID, --pid=PID List the process PID
- --pgrp=PGRP List processes in the process group PGRP
- -P, -x, --no-parent Include processes without parents
- -Q, --all-fields Don't elide unusable fields (normally if there's
- some reason ps can't print a field for any
- process, it's removed from the output entirely)
- -r, --reverse, --gratuitously-long-reverse-option
- Reverse the order of any sort
- --session[=SID] Add the processes from the session SID (which
- defaults to the sid of the current process)
-
- Here are some more options:
- -f ZOT, --foonly=ZOT Glork a foonly
- -z, --zaza Snit a zar
-
- -?, --help Give this help list
- --usage Give a short usage message
- -V, --version Print program version
-
- The struct argp_option array for the above could look like:
-
- {
- {"pid", 'p', "PID", 0, "List the process PID"},
- {"pgrp", OPT_PGRP, "PGRP", 0, "List processes in the process group PGRP"},
- {"no-parent", 'P', 0, 0, "Include processes without parents"},
- {0, 'x', 0, OPTION_ALIAS},
- {"all-fields",'Q', 0, 0, "Don't elide unusable fields (normally"
- " if there's some reason ps can't"
- " print a field for any process, it's"
- " removed from the output entirely)" },
- {"reverse", 'r', 0, 0, "Reverse the order of any sort"},
- {"gratuitously-long-reverse-option", 0, 0, OPTION_ALIAS},
- {"session", OPT_SESS, "SID", OPTION_ARG_OPTIONAL,
- "Add the processes from the session"
- " SID (which defaults to the sid of"
- " the current process)" },
-
- {0,0,0,0, "Here are some more options:"},
- {"foonly", 'f', "ZOT", 0, "Glork a foonly"},
- {"zaza", 'z', 0, 0, "Snit a zar"},
-
- {0}
- }
-
- Note that the last three options are automatically supplied by argp_parse,
- unless you tell it not to with ARGP_NO_HELP.
-
-*/
-
-/* Returns true if CH occurs between BEG and END. */
-static int
-find_char (char ch, char *beg, char *end)
-{
- while (beg < end)
- if (*beg == ch)
- return 1;
- else
- beg++;
- return 0;
-}
-
-struct hol_cluster; /* fwd decl */
-
-struct hol_entry
-{
- /* First option. */
- const struct argp_option *opt;
- /* Number of options (including aliases). */
- unsigned num;
-
- /* A pointers into the HOL's short_options field, to the first short option
- letter for this entry. The order of the characters following this point
- corresponds to the order of options pointed to by OPT, and there are at
- most NUM. A short option recorded in a option following OPT is only
- valid if it occurs in the right place in SHORT_OPTIONS (otherwise it's
- probably been shadowed by some other entry). */
- char *short_options;
-
- /* Entries are sorted by their group first, in the order:
- 1, 2, ..., n, 0, -m, ..., -2, -1
- and then alphabetically within each group. The default is 0. */
- int group;
-
- /* The cluster of options this entry belongs to, or 0 if none. */
- struct hol_cluster *cluster;
-
- /* The argp from which this option came. */
- const struct argp *argp;
-};
-
-/* A cluster of entries to reflect the argp tree structure. */
-struct hol_cluster
-{
- /* A descriptive header printed before options in this cluster. */
- const char *header;
-
- /* Used to order clusters within the same group with the same parent,
- according to the order in which they occurred in the parent argp's child
- list. */
- int index;
-
- /* How to sort this cluster with respect to options and other clusters at the
- same depth (clusters always follow options in the same group). */
- int group;
-
- /* The cluster to which this cluster belongs, or 0 if it's at the base
- level. */
- struct hol_cluster *parent;
-
- /* The argp from which this cluster is (eventually) derived. */
- const struct argp *argp;
-
- /* The distance this cluster is from the root. */
- int depth;
-
- /* Clusters in a given hol are kept in a linked list, to make freeing them
- possible. */
- struct hol_cluster *next;
-};
-
-/* A list of options for help. */
-struct hol
-{
- /* An array of hol_entry's. */
- struct hol_entry *entries;
- /* The number of entries in this hol. If this field is zero, the others
- are undefined. */
- unsigned num_entries;
-
- /* A string containing all short options in this HOL. Each entry contains
- pointers into this string, so the order can't be messed with blindly. */
- char *short_options;
-
- /* Clusters of entries in this hol. */
- struct hol_cluster *clusters;
-};
-
-/* Create a struct hol from the options in ARGP. CLUSTER is the
- hol_cluster in which these entries occur, or 0, if at the root. */
-static struct hol *
-make_hol (const struct argp *argp, struct hol_cluster *cluster)
-{
- char *so;
- const struct argp_option *o;
- const struct argp_option *opts = argp->options;
- struct hol_entry *entry;
- unsigned num_short_options = 0;
- struct hol *hol = malloc (sizeof (struct hol));
-
- assert (hol);
-
- hol->num_entries = 0;
- hol->clusters = 0;
-
- if (opts)
- {
- int cur_group = 0;
-
- /* The first option must not be an alias. */
- assert (! oalias (opts));
-
- /* Calculate the space needed. */
- for (o = opts; ! oend (o); o++)
- {
- if (! oalias (o))
- hol->num_entries++;
- if (oshort (o))
- num_short_options++; /* This is an upper bound. */
- }
-
- hol->entries = malloc (sizeof (struct hol_entry) * hol->num_entries);
- hol->short_options = malloc (num_short_options + 1);
-
- assert (hol->entries && hol->short_options);
-
- /* Fill in the entries. */
- so = hol->short_options;
- for (o = opts, entry = hol->entries; ! oend (o); entry++)
- {
- entry->opt = o;
- entry->num = 0;
- entry->short_options = so;
- entry->group = cur_group =
- o->group
- ? o->group
- : ((!o->name && !o->key)
- ? cur_group + 1
- : cur_group);
- entry->cluster = cluster;
- entry->argp = argp;
-
- do
- {
- entry->num++;
- if (oshort (o) && ! find_char (o->key, hol->short_options, so))
- /* O has a valid short option which hasn't already been used.*/
- *so++ = o->key;
- o++;
- }
- while (! oend (o) && oalias (o));
- }
- *so = '\0'; /* null terminated so we can find the length */
- }
-
- return hol;
-}
-
-/* Add a new cluster to HOL, with the given GROUP and HEADER (taken from the
- associated argp child list entry), INDEX, and PARENT, and return a pointer
- to it. ARGP is the argp that this cluster results from. */
-static struct hol_cluster *
-hol_add_cluster (struct hol *hol, int group, const char *header, int index,
- struct hol_cluster *parent, const struct argp *argp)
-{
- struct hol_cluster *cl = malloc (sizeof (struct hol_cluster));
- if (cl)
- {
- cl->group = group;
- cl->header = header;
-
- cl->index = index;
- cl->parent = parent;
- cl->argp = argp;
- cl->depth = parent ? parent->depth + 1 : 0;
-
- cl->next = hol->clusters;
- hol->clusters = cl;
- }
- return cl;
-}
-
-/* Free HOL and any resources it uses. */
-static void
-hol_free (struct hol *hol)
-{
- struct hol_cluster *cl = hol->clusters;
-
- while (cl)
- {
- struct hol_cluster *next = cl->next;
- free (cl);
- cl = next;
- }
-
- if (hol->num_entries > 0)
- {
- free (hol->entries);
- free (hol->short_options);
- }
-
- free (hol);
-}
-
-static inline int
-hol_entry_short_iterate (const struct hol_entry *entry,
- int (*func)(const struct argp_option *opt,
- const struct argp_option *real,
- const char *domain, void *cookie),
- const char *domain, void *cookie)
-{
- unsigned nopts;
- int val = 0;
- const struct argp_option *opt, *real = entry->opt;
- char *so = entry->short_options;
-
- for (opt = real, nopts = entry->num; nopts > 0 && !val; opt++, nopts--)
- if (oshort (opt) && *so == opt->key)
- {
- if (!oalias (opt))
- real = opt;
- if (ovisible (opt))
- val = (*func)(opt, real, domain, cookie);
- so++;
- }
-
- return val;
-}
-
-static inline int
-hol_entry_long_iterate (const struct hol_entry *entry,
- int (*func)(const struct argp_option *opt,
- const struct argp_option *real,
- const char *domain, void *cookie),
- const char *domain, void *cookie)
-{
- unsigned nopts;
- int val = 0;
- const struct argp_option *opt, *real = entry->opt;
-
- for (opt = real, nopts = entry->num; nopts > 0 && !val; opt++, nopts--)
- if (opt->name)
- {
- if (!oalias (opt))
- real = opt;
- if (ovisible (opt))
- val = (*func)(opt, real, domain, cookie);
- }
-
- return val;
-}
-
-/* Iterator that returns true for the first short option. */
-static inline int
-until_short (const struct argp_option *opt, const struct argp_option *real,
- const char *domain, void *cookie)
-{
- return oshort (opt) ? opt->key : 0;
-}
-
-/* Returns the first valid short option in ENTRY, or 0 if there is none. */
-static char
-hol_entry_first_short (const struct hol_entry *entry)
-{
- return hol_entry_short_iterate (entry, until_short,
- entry->argp->argp_domain, 0);
-}
-
-/* Returns the first valid long option in ENTRY, or 0 if there is none. */
-static const char *
-hol_entry_first_long (const struct hol_entry *entry)
-{
- const struct argp_option *opt;
- unsigned num;
- for (opt = entry->opt, num = entry->num; num > 0; opt++, num--)
- if (opt->name && ovisible (opt))
- return opt->name;
- return 0;
-}
-
-/* Returns the entry in HOL with the long option name NAME, or 0 if there is
- none. */
-static struct hol_entry *
-hol_find_entry (struct hol *hol, const char *name)
-{
- struct hol_entry *entry = hol->entries;
- unsigned num_entries = hol->num_entries;
-
- while (num_entries-- > 0)
- {
- const struct argp_option *opt = entry->opt;
- unsigned num_opts = entry->num;
-
- while (num_opts-- > 0)
- if (opt->name && ovisible (opt) && strcmp (opt->name, name) == 0)
- return entry;
- else
- opt++;
-
- entry++;
- }
-
- return 0;
-}
-
-/* If an entry with the long option NAME occurs in HOL, set it's special
- sort position to GROUP. */
-static void
-hol_set_group (struct hol *hol, const char *name, int group)
-{
- struct hol_entry *entry = hol_find_entry (hol, name);
- if (entry)
- entry->group = group;
-}
-
-/* Order by group: 0, 1, 2, ..., n, -m, ..., -2, -1.
- EQ is what to return if GROUP1 and GROUP2 are the same. */
-static int
-group_cmp (int group1, int group2, int eq)
-{
- if (group1 == group2)
- return eq;
- else if ((group1 < 0 && group2 < 0) || (group1 >= 0 && group2 >= 0))
- return group1 - group2;
- else
- return group2 - group1;
-}
-
-/* Compare clusters CL1 & CL2 by the order that they should appear in
- output. */
-static int
-hol_cluster_cmp (const struct hol_cluster *cl1, const struct hol_cluster *cl2)
-{
- /* If one cluster is deeper than the other, use its ancestor at the same
- level, so that finding the common ancestor is straightforward. */
- while (cl1->depth < cl2->depth)
- cl1 = cl1->parent;
- while (cl2->depth < cl1->depth)
- cl2 = cl2->parent;
-
- /* Now reduce both clusters to their ancestors at the point where both have
- a common parent; these can be directly compared. */
- while (cl1->parent != cl2->parent)
- cl1 = cl1->parent, cl2 = cl2->parent;
-
- return group_cmp (cl1->group, cl2->group, cl2->index - cl1->index);
-}
-
-/* Return the ancestor of CL that's just below the root (i.e., has a parent
- of 0). */
-static struct hol_cluster *
-hol_cluster_base (struct hol_cluster *cl)
-{
- while (cl->parent)
- cl = cl->parent;
- return cl;
-}
-
-/* Return true if CL1 is a child of CL2. */
-static int
-hol_cluster_is_child (const struct hol_cluster *cl1,
- const struct hol_cluster *cl2)
-{
- while (cl1 && cl1 != cl2)
- cl1 = cl1->parent;
- return cl1 == cl2;
-}
-
-/* Given the name of a OPTION_DOC option, modifies NAME to start at the tail
- that should be used for comparisons, and returns true iff it should be
- treated as a non-option. */
-static int
-canon_doc_option (const char **name)
-{
- int non_opt;
- /* Skip initial whitespace. */
- while (isspace (**name))
- (*name)++;
- /* Decide whether this looks like an option (leading `-') or not. */
- non_opt = (**name != '-');
- /* Skip until part of name used for sorting. */
- while (**name && !isalnum (**name))
- (*name)++;
- return non_opt;
-}
-
-/* Order ENTRY1 & ENTRY2 by the order which they should appear in a help
- listing. */
-static int
-hol_entry_cmp (const struct hol_entry *entry1,
- const struct hol_entry *entry2)
-{
- /* The group numbers by which the entries should be ordered; if either is
- in a cluster, then this is just the group within the cluster. */
- int group1 = entry1->group, group2 = entry2->group;
-
- if (entry1->cluster != entry2->cluster)
- {
- /* The entries are not within the same cluster, so we can't compare them
- directly, we have to use the appropiate clustering level too. */
- if (! entry1->cluster)
- /* ENTRY1 is at the `base level', not in a cluster, so we have to
- compare it's group number with that of the base cluster in which
- ENTRY2 resides. Note that if they're in the same group, the
- clustered option always comes laster. */
- return group_cmp (group1, hol_cluster_base (entry2->cluster)->group, -1);
- else if (! entry2->cluster)
- /* Likewise, but ENTRY2's not in a cluster. */
- return group_cmp (hol_cluster_base (entry1->cluster)->group, group2, 1);
- else
- /* Both entries are in clusters, we can just compare the clusters. */
- return hol_cluster_cmp (entry1->cluster, entry2->cluster);
- }
- else if (group1 == group2)
- /* The entries are both in the same cluster and group, so compare them
- alphabetically. */
- {
- int short1 = hol_entry_first_short (entry1);
- int short2 = hol_entry_first_short (entry2);
- int doc1 = odoc (entry1->opt);
- int doc2 = odoc (entry2->opt);
- const char *long1 = hol_entry_first_long (entry1);
- const char *long2 = hol_entry_first_long (entry2);
-
- if (doc1)
- doc1 = canon_doc_option (&long1);
- if (doc2)
- doc2 = canon_doc_option (&long2);
-
- if (doc1 != doc2)
- /* `documentation' options always follow normal options (or
- documentation options that *look* like normal options). */
- return doc1 - doc2;
- else if (!short1 && !short2 && long1 && long2)
- /* Only long options. */
- return __strcasecmp (long1, long2);
- else
- /* Compare short/short, long/short, short/long, using the first
- character of long options. Entries without *any* valid
- options (such as options with OPTION_HIDDEN set) will be put
- first, but as they're not displayed, it doesn't matter where
- they are. */
- {
- char first1 = short1 ? short1 : long1 ? *long1 : 0;
- char first2 = short2 ? short2 : long2 ? *long2 : 0;
-#ifdef _tolower
- int lower_cmp = _tolower (first1) - _tolower (first2);
-#else
- int lower_cmp = tolower (first1) - tolower (first2);
-#endif
- /* Compare ignoring case, except when the options are both the
- same letter, in which case lower-case always comes first. */
- return lower_cmp ? lower_cmp : first2 - first1;
- }
- }
- else
- /* Within the same cluster, but not the same group, so just compare
- groups. */
- return group_cmp (group1, group2, 0);
-}
-
-/* Version of hol_entry_cmp with correct signature for qsort. */
-static int
-hol_entry_qcmp (const void *entry1_v, const void *entry2_v)
-{
- return hol_entry_cmp (entry1_v, entry2_v);
-}
-
-/* Sort HOL by group and alphabetically by option name (with short options
- taking precedence over long). Since the sorting is for display purposes
- only, the shadowing of options isn't effected. */
-static void
-hol_sort (struct hol *hol)
-{
- if (hol->num_entries > 0)
- qsort (hol->entries, hol->num_entries, sizeof (struct hol_entry),
- hol_entry_qcmp);
-}
-
-/* Append MORE to HOL, destroying MORE in the process. Options in HOL shadow
- any in MORE with the same name. */
-static void
-hol_append (struct hol *hol, struct hol *more)
-{
- struct hol_cluster **cl_end = &hol->clusters;
- char *tmp;
-
- /* Steal MORE's cluster list, and add it to the end of HOL's. */
- while (*cl_end)
- cl_end = &(*cl_end)->next;
- *cl_end = more->clusters;
- more->clusters = 0;
-
- /* Merge entries. */
- if (more->num_entries > 0)
- {
- if (hol->num_entries == 0)
- {
- hol->num_entries = more->num_entries;
- hol->entries = more->entries;
- hol->short_options = more->short_options;
- more->num_entries = 0; /* Mark MORE's fields as invalid. */
- }
- else
- /* Append the entries in MORE to those in HOL, taking care to only add
- non-shadowed SHORT_OPTIONS values. */
- {
- unsigned left;
- char *so, *more_so;
- struct hol_entry *e;
- unsigned num_entries = hol->num_entries + more->num_entries;
- struct hol_entry *entries =
- malloc (num_entries * sizeof (struct hol_entry));
- unsigned hol_so_len = strlen (hol->short_options);
- char *short_options =
- malloc (hol_so_len + strlen (more->short_options) + 1);
-
- tmp = memcpy (entries, hol->entries,
- hol->num_entries * sizeof (struct hol_entry));
- tmp += hol->num_entries * sizeof (struct hol_entry);
- memcpy (tmp,
- more->entries,
- more->num_entries * sizeof (struct hol_entry));
-
- memcpy (short_options, hol->short_options, hol_so_len);
-
- /* Fix up the short options pointers from HOL. */
- for (e = entries, left = hol->num_entries; left > 0; e++, left--)
- e->short_options += (short_options - hol->short_options);
-
- /* Now add the short options from MORE, fixing up its entries
- too. */
- so = short_options + hol_so_len;
- more_so = more->short_options;
- for (left = more->num_entries; left > 0; e++, left--)
- {
- int opts_left;
- const struct argp_option *opt;
-
- e->short_options = so;
-
- for (opts_left = e->num, opt = e->opt; opts_left; opt++, opts_left--)
- {
- int ch = *more_so;
- if (oshort (opt) && ch == opt->key)
- /* The next short option in MORE_SO, CH, is from OPT. */
- {
- if (! find_char (ch, short_options,
- short_options + hol_so_len))
- /* The short option CH isn't shadowed by HOL's options,
- so add it to the sum. */
- *so++ = ch;
- more_so++;
- }
- }
- }
-
- *so = '\0';
-
- free (hol->entries);
- free (hol->short_options);
-
- hol->entries = entries;
- hol->num_entries = num_entries;
- hol->short_options = short_options;
- }
- }
-
- hol_free (more);
-}
-
-/* Inserts enough spaces to make sure STREAM is at column COL. */
-static void
-indent_to (argp_fmtstream_t stream, unsigned col)
-{
- int needed = col - __argp_fmtstream_point (stream);
- while (needed-- > 0)
- __argp_fmtstream_putc (stream, ' ');
-}
-
-/* Output to STREAM either a space, or a newline if there isn't room for at
- least ENSURE characters before the right margin. */
-static void
-space (argp_fmtstream_t stream, size_t ensure)
-{
- if (__argp_fmtstream_point (stream) + ensure
- >= __argp_fmtstream_rmargin (stream))
- __argp_fmtstream_putc (stream, '\n');
- else
- __argp_fmtstream_putc (stream, ' ');
-}
-
-/* If the option REAL has an argument, we print it in using the printf
- format REQ_FMT or OPT_FMT depending on whether it's a required or
- optional argument. */
-static void
-arg (const struct argp_option *real, const char *req_fmt, const char *opt_fmt,
- const char *domain, argp_fmtstream_t stream)
-{
- if (real->arg)
- {
- if (real->flags & OPTION_ARG_OPTIONAL)
- __argp_fmtstream_printf (stream, opt_fmt,
- dgettext (domain, real->arg));
- else
- __argp_fmtstream_printf (stream, req_fmt,
- dgettext (domain, real->arg));
- }
-}
-
-/* Helper functions for hol_entry_help. */
-
-/* State used during the execution of hol_help. */
-struct hol_help_state
-{
- /* PREV_ENTRY should contain the previous entry printed, or 0. */
- struct hol_entry *prev_entry;
-
- /* If an entry is in a different group from the previous one, and SEP_GROUPS
- is true, then a blank line will be printed before any output. */
- int sep_groups;
-
- /* True if a duplicate option argument was suppressed (only ever set if
- UPARAMS.dup_args is false). */
- int suppressed_dup_arg;
-};
-
-/* Some state used while printing a help entry (used to communicate with
- helper functions). See the doc for hol_entry_help for more info, as most
- of the fields are copied from its arguments. */
-struct pentry_state
-{
- const struct hol_entry *entry;
- argp_fmtstream_t stream;
- struct hol_help_state *hhstate;
-
- /* True if nothing's been printed so far. */
- int first;
-
- /* If non-zero, the state that was used to print this help. */
- const struct argp_state *state;
-};
-
-/* If a user doc filter should be applied to DOC, do so. */
-static const char *
-filter_doc (const char *doc, int key, const struct argp *argp,
- const struct argp_state *state)
-{
- if (argp->help_filter)
- /* We must apply a user filter to this output. */
- {
- void *input = __argp_input (argp, state);
- return (*argp->help_filter) (key, doc, input);
- }
- else
- /* No filter. */
- return doc;
-}
-
-/* Prints STR as a header line, with the margin lines set appropiately, and
- notes the fact that groups should be separated with a blank line. ARGP is
- the argp that should dictate any user doc filtering to take place. Note
- that the previous wrap margin isn't restored, but the left margin is reset
- to 0. */
-static void
-print_header (const char *str, const struct argp *argp,
- struct pentry_state *pest)
-{
- const char *tstr = dgettext (argp->argp_domain, str);
- const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_HEADER, argp, pest->state);
-
- if (fstr)
- {
- if (*fstr)
- {
- if (pest->hhstate->prev_entry)
- /* Precede with a blank line. */
- __argp_fmtstream_putc (pest->stream, '\n');
- indent_to (pest->stream, uparams.header_col);
- __argp_fmtstream_set_lmargin (pest->stream, uparams.header_col);
- __argp_fmtstream_set_wmargin (pest->stream, uparams.header_col);
- __argp_fmtstream_puts (pest->stream, fstr);
- __argp_fmtstream_set_lmargin (pest->stream, 0);
- __argp_fmtstream_putc (pest->stream, '\n');
- }
-
- pest->hhstate->sep_groups = 1; /* Separate subsequent groups. */
- }
-
- if (fstr != tstr)
- free ((char *) fstr);
-}
-
-/* Inserts a comma if this isn't the first item on the line, and then makes
- sure we're at least to column COL. If this *is* the first item on a line,
- prints any pending whitespace/headers that should precede this line. Also
- clears FIRST. */
-static void
-comma (unsigned col, struct pentry_state *pest)
-{
- if (pest->first)
- {
- const struct hol_entry *pe = pest->hhstate->prev_entry;
- const struct hol_cluster *cl = pest->entry->cluster;
-
- if (pest->hhstate->sep_groups && pe && pest->entry->group != pe->group)
- __argp_fmtstream_putc (pest->stream, '\n');
-
- if (cl && cl->header && *cl->header
- && (!pe
- || (pe->cluster != cl
- && !hol_cluster_is_child (pe->cluster, cl))))
- /* If we're changing clusters, then this must be the start of the
- ENTRY's cluster unless that is an ancestor of the previous one
- (in which case we had just popped into a sub-cluster for a bit).
- If so, then print the cluster's header line. */
- {
- int old_wm = __argp_fmtstream_wmargin (pest->stream);
- print_header (cl->header, cl->argp, pest);
- __argp_fmtstream_set_wmargin (pest->stream, old_wm);
- }
-
- pest->first = 0;
- }
- else
- __argp_fmtstream_puts (pest->stream, ", ");
-
- indent_to (pest->stream, col);
-}
-
-/* Print help for ENTRY to STREAM. */
-static void
-hol_entry_help (struct hol_entry *entry, const struct argp_state *state,
- argp_fmtstream_t stream, struct hol_help_state *hhstate)
-{
- unsigned num;
- const struct argp_option *real = entry->opt, *opt;
- char *so = entry->short_options;
- int have_long_opt = 0; /* We have any long options. */
- /* Saved margins. */
- int old_lm = __argp_fmtstream_set_lmargin (stream, 0);
- int old_wm = __argp_fmtstream_wmargin (stream);
- /* PEST is a state block holding some of our variables that we'd like to
- share with helper functions. */
- struct pentry_state pest = { entry, stream, hhstate, 1, state };
-
- if (! odoc (real))
- for (opt = real, num = entry->num; num > 0; opt++, num--)
- if (opt->name && ovisible (opt))
- {
- have_long_opt = 1;
- break;
- }
-
- /* First emit short options. */
- __argp_fmtstream_set_wmargin (stream, uparams.short_opt_col); /* For truly bizarre cases. */
- for (opt = real, num = entry->num; num > 0; opt++, num--)
- if (oshort (opt) && opt->key == *so)
- /* OPT has a valid (non shadowed) short option. */
- {
- if (ovisible (opt))
- {
- comma (uparams.short_opt_col, &pest);
- __argp_fmtstream_putc (stream, '-');
- __argp_fmtstream_putc (stream, *so);
- if (!have_long_opt || uparams.dup_args)
- arg (real, " %s", "[%s]", state->root_argp->argp_domain, stream);
- else if (real->arg)
- hhstate->suppressed_dup_arg = 1;
- }
- so++;
- }
-
- /* Now, long options. */
- if (odoc (real))
- /* A `documentation' option. */
- {
- __argp_fmtstream_set_wmargin (stream, uparams.doc_opt_col);
- for (opt = real, num = entry->num; num > 0; opt++, num--)
- if (opt->name && ovisible (opt))
- {
- comma (uparams.doc_opt_col, &pest);
- /* Calling gettext here isn't quite right, since sorting will
- have been done on the original; but documentation options
- should be pretty rare anyway... */
- __argp_fmtstream_puts (stream,
- dgettext (state->root_argp->argp_domain,
- opt->name));
- }
- }
- else
- /* A real long option. */
- {
- int first_long_opt = 1;
-
- __argp_fmtstream_set_wmargin (stream, uparams.long_opt_col);
- for (opt = real, num = entry->num; num > 0; opt++, num--)
- if (opt->name && ovisible (opt))
- {
- comma (uparams.long_opt_col, &pest);
- __argp_fmtstream_printf (stream, "--%s", opt->name);
- if (first_long_opt || uparams.dup_args)
- arg (real, "=%s", "[=%s]", state->root_argp->argp_domain,
- stream);
- else if (real->arg)
- hhstate->suppressed_dup_arg = 1;
- }
- }
-
- /* Next, documentation strings. */
- __argp_fmtstream_set_lmargin (stream, 0);
-
- if (pest.first)
- {
- /* Didn't print any switches, what's up? */
- if (!oshort (real) && !real->name)
- /* This is a group header, print it nicely. */
- print_header (real->doc, entry->argp, &pest);
- else
- /* Just a totally shadowed option or null header; print nothing. */
- goto cleanup; /* Just return, after cleaning up. */
- }
- else
- {
- const char *tstr = real->doc ? dgettext (state->root_argp->argp_domain,
- real->doc) : 0;
- const char *fstr = filter_doc (tstr, real->key, entry->argp, state);
- if (fstr && *fstr)
- {
- unsigned int col = __argp_fmtstream_point (stream);
-
- __argp_fmtstream_set_lmargin (stream, uparams.opt_doc_col);
- __argp_fmtstream_set_wmargin (stream, uparams.opt_doc_col);
-
- if (col > (unsigned int) (uparams.opt_doc_col + 3))
- __argp_fmtstream_putc (stream, '\n');
- else if (col >= (unsigned int) uparams.opt_doc_col)
- __argp_fmtstream_puts (stream, " ");
- else
- indent_to (stream, uparams.opt_doc_col);
-
- __argp_fmtstream_puts (stream, fstr);
- }
- if (fstr && fstr != tstr)
- free ((char *) fstr);
-
- /* Reset the left margin. */
- __argp_fmtstream_set_lmargin (stream, 0);
- __argp_fmtstream_putc (stream, '\n');
- }
-
- hhstate->prev_entry = entry;
-
-cleanup:
- __argp_fmtstream_set_lmargin (stream, old_lm);
- __argp_fmtstream_set_wmargin (stream, old_wm);
-}
-
-/* Output a long help message about the options in HOL to STREAM. */
-static void
-hol_help (struct hol *hol, const struct argp_state *state,
- argp_fmtstream_t stream)
-{
- unsigned num;
- struct hol_entry *entry;
- struct hol_help_state hhstate = { 0, 0, 0 };
-
- for (entry = hol->entries, num = hol->num_entries; num > 0; entry++, num--)
- hol_entry_help (entry, state, stream, &hhstate);
-
- if (hhstate.suppressed_dup_arg && uparams.dup_args_note)
- {
- const char *tstr = dgettext (state->root_argp->argp_domain, "\
-Mandatory or optional arguments to long options are also mandatory or \
-optional for any corresponding short options.");
- const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_DUP_ARGS_NOTE,
- state ? state->root_argp : 0, state);
- if (fstr && *fstr)
- {
- __argp_fmtstream_putc (stream, '\n');
- __argp_fmtstream_puts (stream, fstr);
- __argp_fmtstream_putc (stream, '\n');
- }
- if (fstr && fstr != tstr)
- free ((char *) fstr);
- }
-}
-
-/* Helper functions for hol_usage. */
-
-/* If OPT is a short option without an arg, append its key to the string
- pointer pointer to by COOKIE, and advance the pointer. */
-static int
-add_argless_short_opt (const struct argp_option *opt,
- const struct argp_option *real,
- const char *domain, void *cookie)
-{
- char **snao_end = cookie;
- if (!(opt->arg || real->arg)
- && !((opt->flags | real->flags) & OPTION_NO_USAGE))
- *(*snao_end)++ = opt->key;
- return 0;
-}
-
-/* If OPT is a short option with an arg, output a usage entry for it to the
- stream pointed at by COOKIE. */
-static int
-usage_argful_short_opt (const struct argp_option *opt,
- const struct argp_option *real,
- const char *domain, void *cookie)
-{
- argp_fmtstream_t stream = cookie;
- const char *arg = opt->arg;
- int flags = opt->flags | real->flags;
-
- if (! arg)
- arg = real->arg;
-
- if (arg && !(flags & OPTION_NO_USAGE))
- {
- arg = dgettext (domain, arg);
-
- if (flags & OPTION_ARG_OPTIONAL)
- __argp_fmtstream_printf (stream, " [-%c[%s]]", opt->key, arg);
- else
- {
- /* Manually do line wrapping so that it (probably) won't
- get wrapped at the embedded space. */
- space (stream, 6 + strlen (arg));
- __argp_fmtstream_printf (stream, "[-%c %s]", opt->key, arg);
- }
- }
-
- return 0;
-}
-
-/* Output a usage entry for the long option opt to the stream pointed at by
- COOKIE. */
-static int
-usage_long_opt (const struct argp_option *opt,
- const struct argp_option *real,
- const char *domain, void *cookie)
-{
- argp_fmtstream_t stream = cookie;
- const char *arg = opt->arg;
- int flags = opt->flags | real->flags;
-
- if (! arg)
- arg = real->arg;
-
- if (! (flags & OPTION_NO_USAGE))
- {
- if (arg)
- {
- arg = dgettext (domain, arg);
- if (flags & OPTION_ARG_OPTIONAL)
- __argp_fmtstream_printf (stream, " [--%s[=%s]]", opt->name, arg);
- else
- __argp_fmtstream_printf (stream, " [--%s=%s]", opt->name, arg);
- }
- else
- __argp_fmtstream_printf (stream, " [--%s]", opt->name);
- }
-
- return 0;
-}
-
-/* Print a short usage description for the arguments in HOL to STREAM. */
-static void
-hol_usage (struct hol *hol, argp_fmtstream_t stream)
-{
- if (hol->num_entries > 0)
- {
- unsigned nentries;
- struct hol_entry *entry;
- char *short_no_arg_opts = alloca (strlen (hol->short_options) + 1);
- char *snao_end = short_no_arg_opts;
-
- /* First we put a list of short options without arguments. */
- for (entry = hol->entries, nentries = hol->num_entries
- ; nentries > 0
- ; entry++, nentries--)
- hol_entry_short_iterate (entry, add_argless_short_opt,
- entry->argp->argp_domain, &snao_end);
- if (snao_end > short_no_arg_opts)
- {
- *snao_end++ = 0;
- __argp_fmtstream_printf (stream, " [-%s]", short_no_arg_opts);
- }
-
- /* Now a list of short options *with* arguments. */
- for (entry = hol->entries, nentries = hol->num_entries
- ; nentries > 0
- ; entry++, nentries--)
- hol_entry_short_iterate (entry, usage_argful_short_opt,
- entry->argp->argp_domain, stream);
-
- /* Finally, a list of long options (whew!). */
- for (entry = hol->entries, nentries = hol->num_entries
- ; nentries > 0
- ; entry++, nentries--)
- hol_entry_long_iterate (entry, usage_long_opt,
- entry->argp->argp_domain, stream);
- }
-}
-
-/* Make a HOL containing all levels of options in ARGP. CLUSTER is the
- cluster in which ARGP's entries should be clustered, or 0. */
-static struct hol *
-argp_hol (const struct argp *argp, struct hol_cluster *cluster)
-{
- const struct argp_child *child = argp->children;
- struct hol *hol = make_hol (argp, cluster);
- if (child)
- while (child->argp)
- {
- struct hol_cluster *child_cluster =
- ((child->group || child->header)
- /* Put CHILD->argp within its own cluster. */
- ? hol_add_cluster (hol, child->group, child->header,
- child - argp->children, cluster, argp)
- /* Just merge it into the parent's cluster. */
- : cluster);
- hol_append (hol, argp_hol (child->argp, child_cluster)) ;
- child++;
- }
- return hol;
-}
-
-/* Calculate how many different levels with alternative args strings exist in
- ARGP. */
-static size_t
-argp_args_levels (const struct argp *argp)
-{
- size_t levels = 0;
- const struct argp_child *child = argp->children;
-
- if (argp->args_doc && strchr (argp->args_doc, '\n'))
- levels++;
-
- if (child)
- while (child->argp)
- levels += argp_args_levels ((child++)->argp);
-
- return levels;
-}
-
-/* Print all the non-option args documented in ARGP to STREAM. Any output is
- preceded by a space. LEVELS is a pointer to a byte vector the length
- returned by argp_args_levels; it should be initialized to zero, and
- updated by this routine for the next call if ADVANCE is true. True is
- returned as long as there are more patterns to output. */
-static int
-argp_args_usage (const struct argp *argp, const struct argp_state *state,
- char **levels, int advance, argp_fmtstream_t stream)
-{
- char *our_level = *levels;
- int multiple = 0;
- const struct argp_child *child = argp->children;
- const char *tdoc = dgettext (argp->argp_domain, argp->args_doc), *nl = 0;
- const char *fdoc = filter_doc (tdoc, ARGP_KEY_HELP_ARGS_DOC, argp, state);
-
- if (fdoc)
- {
- const char *cp = fdoc;
- nl = strchr (cp, '\n');
- if (!nl)
- {
- nl = cp;
- while (*nl != '\0') nl++;
- }
-
- if (*nl != '\0')
- /* This is a `multi-level' args doc; advance to the correct position
- as determined by our state in LEVELS, and update LEVELS. */
- {
- int i;
- multiple = 1;
- for (i = 0; i < *our_level; i++)
- {
- cp = nl + 1;
- nl = strchr (cp, '\n');
- if (!nl)
- {
- nl = cp;
- while (*nl != '\0') nl++;
- }
- }
- (*levels)++;
- }
-
- /* Manually do line wrapping so that it (probably) won't get wrapped at
- any embedded spaces. */
- space (stream, 1 + nl - cp);
-
- __argp_fmtstream_write (stream, cp, nl - cp);
- }
- if (fdoc && fdoc != tdoc)
- free ((char *)fdoc); /* Free user's modified doc string. */
-
- if (child)
- while (child->argp)
- advance = !argp_args_usage ((child++)->argp, state, levels, advance, stream);
-
- if (advance && multiple)
- {
- /* Need to increment our level. */
- if (*nl)
- /* There's more we can do here. */
- {
- (*our_level)++;
- advance = 0; /* Our parent shouldn't advance also. */
- }
- else if (*our_level > 0)
- /* We had multiple levels, but used them up; reset to zero. */
- *our_level = 0;
- }
-
- return !advance;
-}
-
-/* Print the documentation for ARGP to STREAM; if POST is false, then
- everything preceeding a `\v' character in the documentation strings (or
- the whole string, for those with none) is printed, otherwise, everything
- following the `\v' character (nothing for strings without). Each separate
- bit of documentation is separated a blank line, and if PRE_BLANK is true,
- then the first is as well. If FIRST_ONLY is true, only the first
- occurrence is output. Returns true if anything was output. */
-static int
-argp_doc (const struct argp *argp, const struct argp_state *state,
- int post, int pre_blank, int first_only,
- argp_fmtstream_t stream)
-{
- const char *text;
- const char *inp_text;
- char *tmp_text;
- void *input = 0;
- int anything = 0;
- size_t inp_text_limit = 0;
- const char *doc = dgettext (argp->argp_domain, argp->doc);
- const struct argp_child *child = argp->children;
-
- if (doc)
- {
- char *vt = strchr (doc, '\v');
- inp_text = post ? (vt ? vt + 1 : 0) : doc;
- inp_text_limit = (!post && vt) ? (vt - doc) : 0;
- }
- else
- inp_text = 0;
-
- if (argp->help_filter)
- /* We have to filter the doc strings. */
- {
- if (inp_text_limit)
- {
- /* Copy INP_TEXT so that it's nul-terminated. */
- tmp_text = _malloc_r (_REENT, inp_text_limit);
- strncpy (tmp_text, inp_text, inp_text_limit);
- _free_r (_REENT, inp_text);
- inp_text = tmp_text;
- }
- input = __argp_input (argp, state);
- text =
- (*argp->help_filter) (post
- ? ARGP_KEY_HELP_POST_DOC
- : ARGP_KEY_HELP_PRE_DOC,
- inp_text, input);
- }
- else
- text = (const char *) inp_text;
-
- if (text)
- {
- if (pre_blank)
- __argp_fmtstream_putc (stream, '\n');
-
- if (text == inp_text && inp_text_limit)
- __argp_fmtstream_write (stream, inp_text, inp_text_limit);
- else
- __argp_fmtstream_puts (stream, text);
-
- if (__argp_fmtstream_point (stream) > __argp_fmtstream_lmargin (stream))
- __argp_fmtstream_putc (stream, '\n');
-
- anything = 1;
- }
-
- if (text && text != inp_text)
- free ((char *) text); /* Free TEXT returned from the help filter. */
- if (inp_text && inp_text_limit && argp->help_filter)
- free ((char *) inp_text); /* We copied INP_TEXT, so free it now. */
-
- if (post && argp->help_filter)
- /* Now see if we have to output a ARGP_KEY_HELP_EXTRA text. */
- {
- text = (*argp->help_filter) (ARGP_KEY_HELP_EXTRA, 0, input);
- if (text)
- {
- if (anything || pre_blank)
- __argp_fmtstream_putc (stream, '\n');
- __argp_fmtstream_puts (stream, text);
- free ((char *) text);
- if (__argp_fmtstream_point (stream)
- > __argp_fmtstream_lmargin (stream))
- __argp_fmtstream_putc (stream, '\n');
- anything = 1;
- }
- }
-
- if (child)
- while (child->argp && !(first_only && anything))
- anything |=
- argp_doc ((child++)->argp, state,
- post, anything || pre_blank, first_only,
- stream);
-
- return anything;
-}
-
-/* Output a usage message for ARGP to STREAM. If called from
- argp_state_help, STATE is the relevent parsing state. FLAGS are from the
- set ARGP_HELP_*. NAME is what to use wherever a `program name' is
- needed. */
-static void
-_help (const struct argp *argp, const struct argp_state *state, FILE *stream,
- unsigned flags, char *name)
-{
- int anything = 0; /* Whether we've output anything. */
- struct hol *hol = 0;
- argp_fmtstream_t fs;
-
- if (! stream)
- return;
-
- _flockfile (stream);
-
- if (! uparams.valid)
- fill_in_uparams (state);
-
- fs = __argp_make_fmtstream (stream, 0, uparams.rmargin, 0);
- if (! fs)
- {
- _funlockfile (stream);
- return;
- }
-
- if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG))
- {
- hol = argp_hol (argp, 0);
-
- /* If present, these options always come last. */
- hol_set_group (hol, "help", -1);
- hol_set_group (hol, "version", -1);
-
- hol_sort (hol);
- }
-
- if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE))
- /* Print a short `Usage:' message. */
- {
- int first_pattern = 1, more_patterns;
- size_t num_pattern_levels = argp_args_levels (argp);
- char *pattern_levels = alloca (num_pattern_levels);
-
- memset (pattern_levels, 0, num_pattern_levels);
-
- do
- {
- int old_lm;
- int old_wm = __argp_fmtstream_set_wmargin (fs, uparams.usage_indent);
- char *levels = pattern_levels;
-
- if (first_pattern)
- __argp_fmtstream_printf (fs, "%s %s",
- dgettext (argp->argp_domain, "Usage:"),
- name);
- else
- __argp_fmtstream_printf (fs, "%s %s",
- dgettext (argp->argp_domain, " or: "),
- name);
-
- /* We set the lmargin as well as the wmargin, because hol_usage
- manually wraps options with newline to avoid annoying breaks. */
- old_lm = __argp_fmtstream_set_lmargin (fs, uparams.usage_indent);
-
- if (flags & ARGP_HELP_SHORT_USAGE)
- /* Just show where the options go. */
- {
- if (hol->num_entries > 0)
- __argp_fmtstream_puts (fs, dgettext (argp->argp_domain,
- " [OPTION...]"));
- }
- else
- /* Actually print the options. */
- {
- hol_usage (hol, fs);
- flags |= ARGP_HELP_SHORT_USAGE; /* But only do so once. */
- }
-
- more_patterns = argp_args_usage (argp, state, &levels, 1, fs);
-
- __argp_fmtstream_set_wmargin (fs, old_wm);
- __argp_fmtstream_set_lmargin (fs, old_lm);
-
- __argp_fmtstream_putc (fs, '\n');
- anything = 1;
-
- first_pattern = 0;
- }
- while (more_patterns);
- }
-
- if (flags & ARGP_HELP_PRE_DOC)
- anything |= argp_doc (argp, state, 0, 0, 1, fs);
-
- if (flags & ARGP_HELP_SEE)
- {
- __argp_fmtstream_printf (fs, dgettext (argp->argp_domain, "\
-Try `%s --help' or `%s --usage' for more information.\n"),
- name, name);
- anything = 1;
- }
-
- if (flags & ARGP_HELP_LONG)
- /* Print a long, detailed help message. */
- {
- /* Print info about all the options. */
- if (hol->num_entries > 0)
- {
- if (anything)
- __argp_fmtstream_putc (fs, '\n');
- hol_help (hol, state, fs);
- anything = 1;
- }
- }
-
- if (flags & ARGP_HELP_POST_DOC)
- /* Print any documentation strings at the end. */
- anything |= argp_doc (argp, state, 1, anything, 0, fs);
-
- if ((flags & ARGP_HELP_BUG_ADDR) && argp_program_bug_address)
- {
- if (anything)
- __argp_fmtstream_putc (fs, '\n');
- __argp_fmtstream_printf (fs, dgettext (argp->argp_domain,
- "Report bugs to %s.\n"),
- argp_program_bug_address);
- anything = 1;
- }
-
- _funlockfile (stream);
-
- if (hol)
- hol_free (hol);
-
- __argp_fmtstream_free (fs);
-}
-
-/* Output a usage message for ARGP to STREAM. FLAGS are from the set
- ARGP_HELP_*. NAME is what to use wherever a `program name' is needed. */
-void __argp_help (const struct argp *argp, FILE *stream,
- unsigned flags, char *name)
-{
- _help (argp, 0, stream, flags, name);
-}
-#ifdef weak_alias
-weak_alias (__argp_help, argp_help)
-#endif
-
-/* Output, if appropriate, a usage message for STATE to STREAM. FLAGS are
- from the set ARGP_HELP_*. */
-void
-__argp_state_help (const struct argp_state *state, FILE *stream, unsigned flags)
-{
- if ((!state || ! (state->flags & ARGP_NO_ERRS)) && stream)
- {
- if (state && (state->flags & ARGP_LONG_ONLY))
- flags |= ARGP_HELP_LONG_ONLY;
-
- _help (state ? state->root_argp : 0, state, stream, flags,
- state ? state->name : program_invocation_short_name);
-
- if (!state || ! (state->flags & ARGP_NO_EXIT))
- {
- if (flags & ARGP_HELP_EXIT_ERR)
- exit (argp_err_exit_status);
- if (flags & ARGP_HELP_EXIT_OK)
- exit (0);
- }
- }
-}
-#ifdef weak_alias
-weak_alias (__argp_state_help, argp_state_help)
-#endif
-
-/* If appropriate, print the printf string FMT and following args, preceded
- by the program name and `:', to stderr, and followed by a `Try ... --help'
- message, then exit (1). */
-void
-__argp_error (const struct argp_state *state, const char *fmt, ...)
-{
- if (!state || !(state->flags & ARGP_NO_ERRS))
- {
- FILE *stream = state ? state->err_stream : stderr;
-
- if (stream)
- {
- va_list ap;
-
- _flockfile (stream);
-
- va_start (ap, fmt);
-
-#ifdef USE_IN_LIBIO
- if (_IO_fwide (stream, 0) > 0)
- {
- char *buf;
-
- __asprintf (&buf, fmt, ap);
-
- __fwprintf (stream, L"%s: %s\n",
- state ? state->name : program_invocation_short_name,
- buf);
-
- free (buf);
- }
- else
-#endif
- {
- fputs (state
- ? state->name : program_invocation_short_name,
- stream);
- putc_unlocked (':', stream);
- putc_unlocked (' ', stream);
-
- vfprintf (stream, fmt, ap);
-
- putc_unlocked ('\n', stream);
- }
-
- __argp_state_help (state, stream, ARGP_HELP_STD_ERR);
-
- va_end (ap);
-
- _funlockfile (stream);
- }
- }
-}
-#ifdef weak_alias
-weak_alias (__argp_error, argp_error)
-#endif
-
-/* Similar to the standard gnu error-reporting function error(), but will
- respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
- to STATE->err_stream. This is useful for argument parsing code that is
- shared between program startup (when exiting is desired) and runtime
- option parsing (when typically an error code is returned instead). The
- difference between this function and argp_error is that the latter is for
- *parsing errors*, and the former is for other problems that occur during
- parsing but don't reflect a (syntactic) problem with the input. */
-void
-__argp_failure (const struct argp_state *state, int status, int errnum,
- const char *fmt, ...)
-{
- if (!state || !(state->flags & ARGP_NO_ERRS))
- {
- FILE *stream = state ? state->err_stream : stderr;
-
- if (stream)
- {
- _flockfile (stream);
-
-#ifdef USE_IN_LIBIO
- if (_IO_fwide (stream, 0) > 0)
- __fwprintf (stream, L"%s",
- state ? state->name : program_invocation_short_name);
- else
-#endif
- fputs (state
- ? state->name : program_invocation_short_name,
- stream);
-
- if (fmt)
- {
- va_list ap;
-
- va_start (ap, fmt);
-#ifdef USE_IN_LIBIO
- if (_IO_fwide (stream, 0) > 0)
- {
- char *buf;
-
- __asprintf (&buf, fmt, ap);
-
- __fwprintf (stream, L": %s", buf);
-
- free (buf);
- }
- else
-#endif
- {
- putc_unlocked (':', stream);
- putc_unlocked (' ', stream);
-
- vfprintf (stream, fmt, ap);
- }
-
- va_end (ap);
- }
-
- if (errnum)
- {
- char buf[200];
-
-#ifdef USE_IN_LIBIO
- if (_IO_fwide (stream, 0) > 0)
- __fwprintf (stream, L": %s",
- strerror_r (errnum, buf, sizeof (buf)));
- else
-#endif
- {
- putc_unlocked (':', stream);
- putc_unlocked (' ', stream);
- fputs (strerror_r (errnum, buf, sizeof (buf)), stream);
- }
- }
-
-#ifdef USE_IN_LIBIO
- if (_IO_fwide (stream, 0) > 0)
- putwc_unlocked (L'\n', stream);
- else
-#endif
- putc_unlocked ('\n', stream);
-
- _funlockfile (stream);
-
- if (status && (!state || !(state->flags & ARGP_NO_EXIT)))
- exit (status);
- }
- }
-}
-#ifdef weak_alias
-weak_alias (__argp_failure, argp_failure)
-#endif
diff --git a/newlib/libc/sys/linux/argp/argp-namefrob.h b/newlib/libc/sys/linux/argp/argp-namefrob.h
deleted file mode 100644
index 668f35d0d..000000000
--- a/newlib/libc/sys/linux/argp/argp-namefrob.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Name frobnication for compiling argp outside of glibc
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Miles Bader <miles@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#if !_LIBC
-/* This code is written for inclusion in gnu-libc, and uses names in the
- namespace reserved for libc. If we're not compiling in libc, define those
- names to be the normal ones instead. */
-
-/* argp-parse functions */
-#undef __argp_parse
-#define __argp_parse argp_parse
-#undef __option_is_end
-#define __option_is_end _option_is_end
-#undef __option_is_short
-#define __option_is_short _option_is_short
-#undef __argp_input
-#define __argp_input _argp_input
-
-/* argp-help functions */
-#undef __argp_help
-#define __argp_help argp_help
-#undef __argp_error
-#define __argp_error argp_error
-#undef __argp_failure
-#define __argp_failure argp_failure
-#undef __argp_state_help
-#define __argp_state_help argp_state_help
-#undef __argp_usage
-#define __argp_usage argp_usage
-
-/* argp-fmtstream functions */
-#undef __argp_make_fmtstream
-#define __argp_make_fmtstream argp_make_fmtstream
-#undef __argp_fmtstream_free
-#define __argp_fmtstream_free argp_fmtstream_free
-#undef __argp_fmtstream_putc
-#define __argp_fmtstream_putc argp_fmtstream_putc
-#undef __argp_fmtstream_puts
-#define __argp_fmtstream_puts argp_fmtstream_puts
-#undef __argp_fmtstream_write
-#define __argp_fmtstream_write argp_fmtstream_write
-#undef __argp_fmtstream_printf
-#define __argp_fmtstream_printf argp_fmtstream_printf
-#undef __argp_fmtstream_set_lmargin
-#define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin
-#undef __argp_fmtstream_set_rmargin
-#define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin
-#undef __argp_fmtstream_set_wmargin
-#define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin
-#undef __argp_fmtstream_point
-#define __argp_fmtstream_point argp_fmtstream_point
-#undef __argp_fmtstream_update
-#define __argp_fmtstream_update _argp_fmtstream_update
-#undef __argp_fmtstream_ensure
-#define __argp_fmtstream_ensure _argp_fmtstream_ensure
-#undef __argp_fmtstream_lmargin
-#define __argp_fmtstream_lmargin argp_fmtstream_lmargin
-#undef __argp_fmtstream_rmargin
-#define __argp_fmtstream_rmargin argp_fmtstream_rmargin
-#undef __argp_fmtstream_wmargin
-#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
-
-/* normal libc functions we call */
-#undef __sleep
-#define __sleep sleep
-#undef __strcasecmp
-#define __strcasecmp strcasecmp
-#undef __vsnprintf
-#define __vsnprintf vsnprintf
-
-#endif /* !_LIBC */
-
-#ifndef __set_errno
-#define __set_errno(e) (errno = (e))
-#endif
diff --git a/newlib/libc/sys/linux/argp/argp-parse.c b/newlib/libc/sys/linux/argp/argp-parse.c
deleted file mode 100644
index 38211e3e2..000000000
--- a/newlib/libc/sys/linux/argp/argp-parse.c
+++ /dev/null
@@ -1,966 +0,0 @@
-/* Hierarchial argument parsing, layered over getopt
- Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Miles Bader <miles@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <limits.h>
-#include <getopt.h>
-
-#ifndef _
-/* This is for other GNU distributions with internationalized messages.
- When compiling libc, the _ macro is predefined. */
-# if defined HAVE_LIBINTL_H || defined _LIBC
-# include <libintl.h>
-# ifdef _LIBC
-# undef dgettext
-# define dgettext(domain, msgid) __dcgettext (domain, msgid, LC_MESSAGES)
-# endif
-# else
-# define dgettext(domain, msgid) (msgid)
-# define gettext(msgid) (msgid)
-# endif
-#endif
-#ifndef N_
-# define N_(msgid) (msgid)
-#endif
-
-#if _LIBC - 0
-#include <bits/libc-lock.h>
-#else
-#ifdef HAVE_CTHREADS_H
-#include <cthreads.h>
-#endif
-#endif /* _LIBC */
-
-#include <argp.h>
-#include "argp-namefrob.h"
-
-/* Getopt return values. */
-#define KEY_END (-1) /* The end of the options. */
-#define KEY_ARG 1 /* A non-option argument. */
-#define KEY_ERR '?' /* An error parsing the options. */
-
-/* The meta-argument used to prevent any further arguments being interpreted
- as options. */
-#define QUOTE "--"
-
-/* The number of bits we steal in a long-option value for our own use. */
-#define GROUP_BITS CHAR_BIT
-
-/* The number of bits available for the user value. */
-#define USER_BITS ((sizeof ((struct option *)0)->val * CHAR_BIT) - GROUP_BITS)
-#define USER_MASK ((1 << USER_BITS) - 1)
-
-/* EZ alias for ARGP_ERR_UNKNOWN. */
-#define EBADKEY ARGP_ERR_UNKNOWN
-
-/* Default options. */
-
-/* When argp is given the --HANG switch, _ARGP_HANG is set and argp will sleep
- for one second intervals, decrementing _ARGP_HANG until it's zero. Thus
- you can force the program to continue by attaching a debugger and setting
- it to 0 yourself. */
-volatile int _argp_hang;
-
-#define OPT_PROGNAME -2
-#define OPT_USAGE -3
-#define OPT_HANG -4
-
-static const struct argp_option argp_default_options[] =
-{
- {"help", '?', 0, 0, N_("Give this help list"), -1},
- {"usage", OPT_USAGE, 0, 0, N_("Give a short usage message")},
- {"program-name",OPT_PROGNAME,"NAME", OPTION_HIDDEN, N_("Set the program name")},
- {"HANG", OPT_HANG, "SECS", OPTION_ARG_OPTIONAL | OPTION_HIDDEN,
- N_("Hang for SECS seconds (default 3600)")},
- {0, 0}
-};
-
-static error_t
-argp_default_parser (int key, char *arg, struct argp_state *state)
-{
- switch (key)
- {
- case '?':
- __argp_state_help (state, state->out_stream, ARGP_HELP_STD_HELP);
- break;
- case OPT_USAGE:
- __argp_state_help (state, state->out_stream,
- ARGP_HELP_USAGE | ARGP_HELP_EXIT_OK);
- break;
-
- case OPT_PROGNAME: /* Set the program name. */
- program_invocation_name = arg;
-
- /* [Note that some systems only have PROGRAM_INVOCATION_SHORT_NAME (aka
- __PROGNAME), in which case, PROGRAM_INVOCATION_NAME is just defined
- to be that, so we have to be a bit careful here.] */
- arg = strrchr (arg, '/');
- if (arg)
- program_invocation_short_name = arg + 1;
- else
- program_invocation_short_name = program_invocation_name;
-
- /* Update what we use for messages. */
- state->name = program_invocation_short_name;
-
- if ((state->flags & (ARGP_PARSE_ARGV0 | ARGP_NO_ERRS))
- == ARGP_PARSE_ARGV0)
- /* Update what getopt uses too. */
- state->argv[0] = program_invocation_name;
-
- break;
-
- case OPT_HANG:
- _argp_hang = atoi (arg ? arg : "3600");
- while (_argp_hang-- > 0)
- __sleep (1);
- break;
-
- default:
- return EBADKEY;
- }
- return 0;
-}
-
-static const struct argp argp_default_argp =
- {argp_default_options, &argp_default_parser, NULL, NULL, NULL, NULL, "libc"};
-
-
-static const struct argp_option argp_version_options[] =
-{
- {"version", 'V', 0, 0, N_("Print program version"), -1},
- {0, 0}
-};
-
-static error_t
-argp_version_parser (int key, char *arg, struct argp_state *state)
-{
- switch (key)
- {
- case 'V':
- if (argp_program_version_hook)
- (*argp_program_version_hook) (state->out_stream, state);
- else if (argp_program_version)
- fprintf (state->out_stream, "%s\n", argp_program_version);
- else
- __argp_error (state, dgettext (state->root_argp->argp_domain,
- "(PROGRAM ERROR) No version known!?"));
- if (! (state->flags & ARGP_NO_EXIT))
- exit (0);
- break;
- default:
- return EBADKEY;
- }
- return 0;
-}
-
-static const struct argp argp_version_argp =
- {argp_version_options, &argp_version_parser, NULL, NULL, NULL, NULL, "libc"};
-
-/* Returns the offset into the getopt long options array LONG_OPTIONS of a
- long option with called NAME, or -1 if none is found. Passing NULL as
- NAME will return the number of options. */
-static int
-find_long_option (struct option *long_options, const char *name)
-{
- struct option *l = long_options;
- while (l->name != NULL)
- if (name != NULL && strcmp (l->name, name) == 0)
- return l - long_options;
- else
- l++;
- if (name == NULL)
- return l - long_options;
- else
- return -1;
-}
-
-/* If we can, we regulate access to getopt, which is non-reentrant, with a
- mutex. Since the case we're trying to guard against is two different
- threads interfering, and it's possible that someone might want to call
- argp_parse recursively (they're careful), we use a recursive lock if
- possible. */
-
-#if _LIBC - 0
-
-__libc_lock_define_initialized_recursive (static, getopt_lock)
-#define LOCK_GETOPT __libc_lock_lock_recursive (getopt_lock)
-#define UNLOCK_GETOPT __libc_lock_unlock_recursive (getopt_lock)
-
-#else /* !_LIBC */
-#ifdef HAVE_CTHREADS_H
-
-static struct mutex getopt_lock = MUTEX_INITIALIZER;
-#define LOCK_GETOPT mutex_lock (&getopt_lock)
-#define UNLOCK_GETOPT mutex_unlock (&getopt_lock)
-
-#else /* !HAVE_CTHREADS_H */
-
-#define LOCK_GETOPT (void)0
-#define UNLOCK_GETOPT (void)0
-
-#endif /* HAVE_CTHREADS_H */
-#endif /* _LIBC */
-
-/* This hack to allow programs that know what's going on to call argp
- recursively. If someday argp is changed not to use the non-reentrant
- getopt interface, we can get rid of this shit. XXX */
-void
-_argp_unlock_xxx (void)
-{
- UNLOCK_GETOPT;
-}
-
-/* The state of a `group' during parsing. Each group corresponds to a
- particular argp structure from the tree of such descending from the top
- level argp passed to argp_parse. */
-struct group
-{
- /* This group's parsing function. */
- argp_parser_t parser;
-
- /* Which argp this group is from. */
- const struct argp *argp;
-
- /* Points to the point in SHORT_OPTS corresponding to the end of the short
- options for this group. We use it to determine from which group a
- particular short options is from. */
- char *short_end;
-
- /* The number of non-option args sucessfully handled by this parser. */
- unsigned args_processed;
-
- /* This group's parser's parent's group. */
- struct group *parent;
- unsigned parent_index; /* And the our position in the parent. */
-
- /* These fields are swapped into and out of the state structure when
- calling this group's parser. */
- void *input, **child_inputs;
- void *hook;
-};
-
-/* Call GROUP's parser with KEY and ARG, swapping any group-specific info
- from STATE before calling, and back into state afterwards. If GROUP has
- no parser, EBADKEY is returned. */
-static error_t
-group_parse (struct group *group, struct argp_state *state, int key, char *arg)
-{
- if (group->parser)
- {
- error_t err;
- state->hook = group->hook;
- state->input = group->input;
- state->child_inputs = group->child_inputs;
- state->arg_num = group->args_processed;
- err = (*group->parser)(key, arg, state);
- group->hook = state->hook;
- return err;
- }
- else
- return EBADKEY;
-}
-
-struct parser
-{
- const struct argp *argp;
-
- /* SHORT_OPTS is the getopt short options string for the union of all the
- groups of options. */
- char *short_opts;
- /* LONG_OPTS is the array of getop long option structures for the union of
- all the groups of options. */
- struct option *long_opts;
-
- /* States of the various parsing groups. */
- struct group *groups;
- /* The end of the GROUPS array. */
- struct group *egroup;
- /* An vector containing storage for the CHILD_INPUTS field in all groups. */
- void **child_inputs;
-
- /* True if we think using getopt is still useful; if false, then
- remaining arguments are just passed verbatim with ARGP_KEY_ARG. This is
- cleared whenever getopt returns KEY_END, but may be set again if the user
- moves the next argument pointer backwards. */
- int try_getopt;
-
- /* State block supplied to parsing routines. */
- struct argp_state state;
-
- /* Memory used by this parser. */
- void *storage;
-};
-
-/* The next usable entries in the various parser tables being filled in by
- convert_options. */
-struct parser_convert_state
-{
- struct parser *parser;
- char *short_end;
- struct option *long_end;
- void **child_inputs_end;
-};
-
-/* Converts all options in ARGP (which is put in GROUP) and ancestors
- into getopt options stored in SHORT_OPTS and LONG_OPTS; SHORT_END and
- CVT->LONG_END are the points at which new options are added. Returns the
- next unused group entry. CVT holds state used during the conversion. */
-static struct group *
-convert_options (const struct argp *argp,
- struct group *parent, unsigned parent_index,
- struct group *group, struct parser_convert_state *cvt)
-{
- /* REAL is the most recent non-alias value of OPT. */
- const struct argp_option *real = argp->options;
- const struct argp_child *children = argp->children;
-
- if (real || argp->parser)
- {
- const struct argp_option *opt;
-
- if (real)
- for (opt = real; !__option_is_end (opt); opt++)
- {
- if (! (opt->flags & OPTION_ALIAS))
- /* OPT isn't an alias, so we can use values from it. */
- real = opt;
-
- if (! (real->flags & OPTION_DOC))
- /* A real option (not just documentation). */
- {
- if (__option_is_short (opt))
- /* OPT can be used as a short option. */
- {
- *cvt->short_end++ = opt->key;
- if (real->arg)
- {
- *cvt->short_end++ = ':';
- if (real->flags & OPTION_ARG_OPTIONAL)
- *cvt->short_end++ = ':';
- }
- *cvt->short_end = '\0'; /* keep 0 terminated */
- }
-
- if (opt->name
- && find_long_option (cvt->parser->long_opts, opt->name) < 0)
- /* OPT can be used as a long option. */
- {
- cvt->long_end->name = opt->name;
- cvt->long_end->has_arg =
- (real->arg
- ? (real->flags & OPTION_ARG_OPTIONAL
- ? optional_argument
- : required_argument)
- : no_argument);
- cvt->long_end->flag = 0;
- /* we add a disambiguating code to all the user's
- values (which is removed before we actually call
- the function to parse the value); this means that
- the user loses use of the high 8 bits in all his
- values (the sign of the lower bits is preserved
- however)... */
- cvt->long_end->val =
- ((opt->key | real->key) & USER_MASK)
- + (((group - cvt->parser->groups) + 1) << USER_BITS);
-
- /* Keep the LONG_OPTS list terminated. */
- (++cvt->long_end)->name = NULL;
- }
- }
- }
-
- group->parser = argp->parser;
- group->argp = argp;
- group->short_end = cvt->short_end;
- group->args_processed = 0;
- group->parent = parent;
- group->parent_index = parent_index;
- group->input = 0;
- group->hook = 0;
- group->child_inputs = 0;
-
- if (children)
- /* Assign GROUP's CHILD_INPUTS field some space from
- CVT->child_inputs_end.*/
- {
- unsigned num_children = 0;
- while (children[num_children].argp)
- num_children++;
- group->child_inputs = cvt->child_inputs_end;
- cvt->child_inputs_end += num_children;
- }
-
- parent = group++;
- }
- else
- parent = 0;
-
- if (children)
- {
- unsigned index = 0;
- while (children->argp)
- group =
- convert_options (children++->argp, parent, index++, group, cvt);
- }
-
- return group;
-}
-
-/* Find the merged set of getopt options, with keys appropiately prefixed. */
-static void
-parser_convert (struct parser *parser, const struct argp *argp, int flags)
-{
- struct parser_convert_state cvt;
-
- cvt.parser = parser;
- cvt.short_end = parser->short_opts;
- cvt.long_end = parser->long_opts;
- cvt.child_inputs_end = parser->child_inputs;
-
- if (flags & ARGP_IN_ORDER)
- *cvt.short_end++ = '-';
- else if (flags & ARGP_NO_ARGS)
- *cvt.short_end++ = '+';
- *cvt.short_end = '\0';
-
- cvt.long_end->name = NULL;
-
- parser->argp = argp;
-
- if (argp)
- parser->egroup = convert_options (argp, 0, 0, parser->groups, &cvt);
- else
- parser->egroup = parser->groups; /* No parsers at all! */
-}
-
-/* Lengths of various parser fields which we will allocated. */
-struct parser_sizes
-{
- size_t short_len; /* Getopt short options string. */
- size_t long_len; /* Getopt long options vector. */
- size_t num_groups; /* Group structures we allocate. */
- size_t num_child_inputs; /* Child input slots. */
-};
-
-/* For ARGP, increments the NUM_GROUPS field in SZS by the total number of
- argp structures descended from it, and the SHORT_LEN & LONG_LEN fields by
- the maximum lengths of the resulting merged getopt short options string and
- long-options array, respectively. */
-static void
-calc_sizes (const struct argp *argp, struct parser_sizes *szs)
-{
- const struct argp_child *child = argp->children;
- const struct argp_option *opt = argp->options;
-
- if (opt || argp->parser)
- {
- szs->num_groups++;
- if (opt)
- {
- int num_opts = 0;
- while (!__option_is_end (opt++))
- num_opts++;
- szs->short_len += num_opts * 3; /* opt + up to 2 `:'s */
- szs->long_len += num_opts;
- }
- }
-
- if (child)
- while (child->argp)
- {
- calc_sizes ((child++)->argp, szs);
- szs->num_child_inputs++;
- }
-}
-
-/* Initializes PARSER to parse ARGP in a manner described by FLAGS. */
-static error_t
-parser_init (struct parser *parser, const struct argp *argp,
- int argc, char **argv, int flags, void *input)
-{
- error_t err = 0;
- struct group *group;
- struct parser_sizes szs;
-
- szs.short_len = (flags & ARGP_NO_ARGS) ? 0 : 1;
- szs.long_len = 0;
- szs.num_groups = 0;
- szs.num_child_inputs = 0;
-
- if (argp)
- calc_sizes (argp, &szs);
-
- /* Lengths of the various bits of storage used by PARSER. */
-#define GLEN (szs.num_groups + 1) * sizeof (struct group)
-#define CLEN (szs.num_child_inputs * sizeof (void *))
-#define LLEN ((szs.long_len + 1) * sizeof (struct option))
-#define SLEN (szs.short_len + 1)
-
- parser->storage = malloc (GLEN + CLEN + LLEN + SLEN);
- if (! parser->storage)
- return ENOMEM;
-
- parser->groups = parser->storage;
- parser->child_inputs = parser->storage + GLEN;
- parser->long_opts = parser->storage + GLEN + CLEN;
- parser->short_opts = parser->storage + GLEN + CLEN + LLEN;
-
- memset (parser->child_inputs, 0, szs.num_child_inputs * sizeof (void *));
- parser_convert (parser, argp, flags);
-
- memset (&parser->state, 0, sizeof (struct argp_state));
- parser->state.root_argp = parser->argp;
- parser->state.argc = argc;
- parser->state.argv = argv;
- parser->state.flags = flags;
- parser->state.err_stream = stderr;
- parser->state.out_stream = stdout;
- parser->state.next = 0; /* Tell getopt to initialize. */
- parser->state.pstate = parser;
-
- parser->try_getopt = 1;
-
- /* Call each parser for the first time, giving it a chance to propagate
- values to child parsers. */
- if (parser->groups < parser->egroup)
- parser->groups->input = input;
- for (group = parser->groups;
- group < parser->egroup && (!err || err == EBADKEY);
- group++)
- {
- if (group->parent)
- /* If a child parser, get the initial input value from the parent. */
- group->input = group->parent->child_inputs[group->parent_index];
-
- if (!group->parser
- && group->argp->children && group->argp->children->argp)
- /* For the special case where no parsing function is supplied for an
- argp, propagate its input to its first child, if any (this just
- makes very simple wrapper argps more convenient). */
- group->child_inputs[0] = group->input;
-
- err = group_parse (group, &parser->state, ARGP_KEY_INIT, 0);
- }
- if (err == EBADKEY)
- err = 0; /* Some parser didn't understand. */
-
- if (err)
- return err;
-
- /* Getopt is (currently) non-reentrant. */
- LOCK_GETOPT;
-
- if (parser->state.flags & ARGP_NO_ERRS)
- {
- opterr = 0;
- if (parser->state.flags & ARGP_PARSE_ARGV0)
- /* getopt always skips ARGV[0], so we have to fake it out. As long
- as OPTERR is 0, then it shouldn't actually try to access it. */
- parser->state.argv--, parser->state.argc++;
- }
- else
- opterr = 1; /* Print error messages. */
-
- if (parser->state.argv == argv && argv[0])
- /* There's an argv[0]; use it for messages. */
- {
- char *short_name = strrchr (argv[0], '/');
- parser->state.name = short_name ? short_name + 1 : argv[0];
- }
- else
- parser->state.name = program_invocation_short_name;
-
- return 0;
-}
-
-/* Free any storage consumed by PARSER (but not PARSER itself). */
-static error_t
-parser_finalize (struct parser *parser,
- error_t err, int arg_ebadkey, int *end_index)
-{
- struct group *group;
-
- UNLOCK_GETOPT;
-
- if (err == EBADKEY && arg_ebadkey)
- /* Suppress errors generated by unparsed arguments. */
- err = 0;
-
- if (! err)
- {
- if (parser->state.next == parser->state.argc)
- /* We successfully parsed all arguments! Call all the parsers again,
- just a few more times... */
- {
- for (group = parser->groups;
- group < parser->egroup && (!err || err==EBADKEY);
- group++)
- if (group->args_processed == 0)
- err = group_parse (group, &parser->state, ARGP_KEY_NO_ARGS, 0);
- for (group = parser->egroup - 1;
- group >= parser->groups && (!err || err==EBADKEY);
- group--)
- err = group_parse (group, &parser->state, ARGP_KEY_END, 0);
-
- if (err == EBADKEY)
- err = 0; /* Some parser didn't understand. */
-
- /* Tell the user that all arguments are parsed. */
- if (end_index)
- *end_index = parser->state.next;
- }
- else if (end_index)
- /* Return any remaining arguments to the user. */
- *end_index = parser->state.next;
- else
- /* No way to return the remaining arguments, they must be bogus. */
- {
- if (!(parser->state.flags & ARGP_NO_ERRS)
- && parser->state.err_stream)
- fprintf (parser->state.err_stream,
- dgettext (parser->argp->argp_domain,
- "%s: Too many arguments\n"),
- parser->state.name);
- err = EBADKEY;
- }
- }
-
- /* Okay, we're all done, with either an error or success; call the parsers
- to indicate which one. */
-
- if (err)
- {
- /* Maybe print an error message. */
- if (err == EBADKEY)
- /* An appropriate message describing what the error was should have
- been printed earlier. */
- __argp_state_help (&parser->state, parser->state.err_stream,
- ARGP_HELP_STD_ERR);
-
- /* Since we didn't exit, give each parser an error indication. */
- for (group = parser->groups; group < parser->egroup; group++)
- group_parse (group, &parser->state, ARGP_KEY_ERROR, 0);
- }
- else
- /* Notify parsers of success, and propagate back values from parsers. */
- {
- /* We pass over the groups in reverse order so that child groups are
- given a chance to do there processing before passing back a value to
- the parent. */
- for (group = parser->egroup - 1
- ; group >= parser->groups && (!err || err == EBADKEY)
- ; group--)
- err = group_parse (group, &parser->state, ARGP_KEY_SUCCESS, 0);
- if (err == EBADKEY)
- err = 0; /* Some parser didn't understand. */
- }
-
- /* Call parsers once more, to do any final cleanup. Errors are ignored. */
- for (group = parser->egroup - 1; group >= parser->groups; group--)
- group_parse (group, &parser->state, ARGP_KEY_FINI, 0);
-
- if (err == EBADKEY)
- err = EINVAL;
-
- free (parser->storage);
-
- return err;
-}
-
-/* Call the user parsers to parse the non-option argument VAL, at the current
- position, returning any error. The state NEXT pointer is assumed to have
- been adjusted (by getopt) to point after this argument; this function will
- adjust it correctly to reflect however many args actually end up being
- consumed. */
-static error_t
-parser_parse_arg (struct parser *parser, char *val)
-{
- /* Save the starting value of NEXT, first adjusting it so that the arg
- we're parsing is again the front of the arg vector. */
- int index = --parser->state.next;
- error_t err = EBADKEY;
- struct group *group;
- int key = 0; /* Which of ARGP_KEY_ARG[S] we used. */
-
- /* Try to parse the argument in each parser. */
- for (group = parser->groups
- ; group < parser->egroup && err == EBADKEY
- ; group++)
- {
- parser->state.next++; /* For ARGP_KEY_ARG, consume the arg. */
- key = ARGP_KEY_ARG;
- err = group_parse (group, &parser->state, key, val);
-
- if (err == EBADKEY)
- /* This parser doesn't like ARGP_KEY_ARG; try ARGP_KEY_ARGS instead. */
- {
- parser->state.next--; /* For ARGP_KEY_ARGS, put back the arg. */
- key = ARGP_KEY_ARGS;
- err = group_parse (group, &parser->state, key, 0);
- }
- }
-
- if (! err)
- {
- if (key == ARGP_KEY_ARGS)
- /* The default for ARGP_KEY_ARGS is to assume that if NEXT isn't
- changed by the user, *all* arguments should be considered
- consumed. */
- parser->state.next = parser->state.argc;
-
- if (parser->state.next > index)
- /* Remember that we successfully processed a non-option
- argument -- but only if the user hasn't gotten tricky and set
- the clock back. */
- (--group)->args_processed += (parser->state.next - index);
- else
- /* The user wants to reparse some args, give getopt another try. */
- parser->try_getopt = 1;
- }
-
- return err;
-}
-
-/* Call the user parsers to parse the option OPT, with argument VAL, at the
- current position, returning any error. */
-static error_t
-parser_parse_opt (struct parser *parser, int opt, char *val)
-{
- /* The group key encoded in the high bits; 0 for short opts or
- group_number + 1 for long opts. */
- int group_key = opt >> USER_BITS;
- error_t err = EBADKEY;
-
- if (group_key == 0)
- /* A short option. By comparing OPT's position in SHORT_OPTS to the
- various starting positions in each group's SHORT_END field, we can
- determine which group OPT came from. */
- {
- struct group *group;
- char *short_index = strchr (parser->short_opts, opt);
-
- if (short_index)
- for (group = parser->groups; group < parser->egroup; group++)
- if (group->short_end > short_index)
- {
- err = group_parse (group, &parser->state, opt, optarg);
- break;
- }
- }
- else
- /* A long option. We use shifts instead of masking for extracting
- the user value in order to preserve the sign. */
- err =
- group_parse (&parser->groups[group_key - 1], &parser->state,
- (opt << GROUP_BITS) >> GROUP_BITS, optarg);
-
- if (err == EBADKEY)
- /* At least currently, an option not recognized is an error in the
- parser, because we pre-compute which parser is supposed to deal
- with each option. */
- {
- static const char bad_key_err[] =
- N_("(PROGRAM ERROR) Option should have been recognized!?");
- if (group_key == 0)
- __argp_error (&parser->state, "-%c: %s", opt,
- dgettext (parser->argp->argp_domain, bad_key_err));
- else
- {
- struct option *long_opt = parser->long_opts;
- while (long_opt->val != opt && long_opt->name)
- long_opt++;
- __argp_error (&parser->state, "--%s: %s",
- long_opt->name ? long_opt->name : "???",
- dgettext (parser->argp->argp_domain, bad_key_err));
- }
- }
-
- return err;
-}
-
-/* Parse the next argument in PARSER (as indicated by PARSER->state.next).
- Any error from the parsers is returned, and *ARGP_EBADKEY indicates
- whether a value of EBADKEY is due to an unrecognized argument (which is
- generally not fatal). */
-static error_t
-parser_parse_next (struct parser *parser, int *arg_ebadkey)
-{
- int opt;
- error_t err = 0;
-
- if (parser->state.quoted && parser->state.next < parser->state.quoted)
- /* The next argument pointer has been moved to before the quoted
- region, so pretend we never saw the quoting `--', and give getopt
- another chance. If the user hasn't removed it, getopt will just
- process it again. */
- parser->state.quoted = 0;
-
- if (parser->try_getopt && !parser->state.quoted)
- /* Give getopt a chance to parse this. */
- {
- optind = parser->state.next; /* Put it back in OPTIND for getopt. */
- optopt = KEY_END; /* Distinguish KEY_ERR from a real option. */
- if (parser->state.flags & ARGP_LONG_ONLY)
- opt = getopt_long_only (parser->state.argc, parser->state.argv,
- parser->short_opts, parser->long_opts, 0);
- else
- opt = getopt_long (parser->state.argc, parser->state.argv,
- parser->short_opts, parser->long_opts, 0);
- parser->state.next = optind; /* And see what getopt did. */
-
- if (opt == KEY_END)
- /* Getopt says there are no more options, so stop using
- getopt; we'll continue if necessary on our own. */
- {
- parser->try_getopt = 0;
- if (parser->state.next > 1
- && strcmp (parser->state.argv[parser->state.next - 1], QUOTE)
- == 0)
- /* Not only is this the end of the options, but it's a
- `quoted' region, which may have args that *look* like
- options, so we definitely shouldn't try to use getopt past
- here, whatever happens. */
- parser->state.quoted = parser->state.next;
- }
- else if (opt == KEY_ERR && optopt != KEY_END)
- /* KEY_ERR can have the same value as a valid user short
- option, but in the case of a real error, getopt sets OPTOPT
- to the offending character, which can never be KEY_END. */
- {
- *arg_ebadkey = 0;
- return EBADKEY;
- }
- }
- else
- opt = KEY_END;
-
- if (opt == KEY_END)
- {
- /* We're past what getopt considers the options. */
- if (parser->state.next >= parser->state.argc
- || (parser->state.flags & ARGP_NO_ARGS))
- /* Indicate that we're done. */
- {
- *arg_ebadkey = 1;
- return EBADKEY;
- }
- else
- /* A non-option arg; simulate what getopt might have done. */
- {
- opt = KEY_ARG;
- optarg = parser->state.argv[parser->state.next++];
- }
- }
-
- if (opt == KEY_ARG)
- /* A non-option argument; try each parser in turn. */
- err = parser_parse_arg (parser, optarg);
- else
- err = parser_parse_opt (parser, opt, optarg);
-
- if (err == EBADKEY)
- *arg_ebadkey = (opt == KEY_END || opt == KEY_ARG);
-
- return err;
-}
-
-/* Parse the options strings in ARGC & ARGV according to the argp in ARGP.
- FLAGS is one of the ARGP_ flags above. If END_INDEX is non-NULL, the
- index in ARGV of the first unparsed option is returned in it. If an
- unknown option is present, EINVAL is returned; if some parser routine
- returned a non-zero value, it is returned; otherwise 0 is returned. */
-error_t
-__argp_parse (const struct argp *argp, int argc, char **argv, unsigned flags,
- int *end_index, void *input)
-{
- error_t err;
- struct parser parser;
-
- /* If true, then err == EBADKEY is a result of a non-option argument failing
- to be parsed (which in some cases isn't actually an error). */
- int arg_ebadkey = 0;
-
- if (! (flags & ARGP_NO_HELP))
- /* Add our own options. */
- {
- struct argp_child *child = alloca (4 * sizeof (struct argp_child));
- struct argp *top_argp = alloca (sizeof (struct argp));
-
- /* TOP_ARGP has no options, it just serves to group the user & default
- argps. */
- memset (top_argp, 0, sizeof (*top_argp));
- top_argp->children = child;
-
- memset (child, 0, 4 * sizeof (struct argp_child));
-
- if (argp)
- (child++)->argp = argp;
- (child++)->argp = &argp_default_argp;
- if (argp_program_version || argp_program_version_hook)
- (child++)->argp = &argp_version_argp;
- child->argp = 0;
-
- argp = top_argp;
- }
-
- /* Construct a parser for these arguments. */
- err = parser_init (&parser, argp, argc, argv, flags, input);
-
- if (! err)
- /* Parse! */
- {
- while (! err)
- err = parser_parse_next (&parser, &arg_ebadkey);
- err = parser_finalize (&parser, err, arg_ebadkey, end_index);
- }
-
- return err;
-}
-#ifdef weak_alias
-weak_alias (__argp_parse, argp_parse)
-#endif
-
-/* Return the input field for ARGP in the parser corresponding to STATE; used
- by the help routines. */
-void *
-__argp_input (const struct argp *argp, const struct argp_state *state)
-{
- if (state)
- {
- struct group *group;
- struct parser *parser = state->pstate;
-
- for (group = parser->groups; group < parser->egroup; group++)
- if (group->argp == argp)
- return group->input;
- }
-
- return 0;
-}
-#ifdef weak_alias
-weak_alias (__argp_input, _argp_input)
-#endif
diff --git a/newlib/libc/sys/linux/argp/argp-pv.c b/newlib/libc/sys/linux/argp/argp-pv.c
deleted file mode 100644
index 5987956a9..000000000
--- a/newlib/libc/sys/linux/argp/argp-pv.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Default definition for ARGP_PROGRAM_VERSION.
- Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Miles Bader <miles@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* If set by the user program to a non-zero value, then a default option
- --version is added (unless the ARGP_NO_HELP flag is used), which will
- print this this string followed by a newline and exit (unless the
- ARGP_NO_EXIT flag is used). Overridden by ARGP_PROGRAM_VERSION_HOOK. */
-const char *argp_program_version;
diff --git a/newlib/libc/sys/linux/argp/argp-pvh.c b/newlib/libc/sys/linux/argp/argp-pvh.c
deleted file mode 100644
index 8a8fd309d..000000000
--- a/newlib/libc/sys/linux/argp/argp-pvh.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Default definition for ARGP_PROGRAM_VERSION_HOOK.
- Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Miles Bader <miles@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <argp.h>
-
-/* If set by the user program to a non-zero value, then a default option
- --version is added (unless the ARGP_NO_HELP flag is used), which calls
- this function with a stream to print the version to and a pointer to the
- current parsing state, and then exits (unless the ARGP_NO_EXIT flag is
- used). This variable takes precedent over ARGP_PROGRAM_VERSION. */
-void (*argp_program_version_hook) (FILE *stream, struct argp_state *state);
diff --git a/newlib/libc/sys/linux/argp/argp-xinl.c b/newlib/libc/sys/linux/argp/argp-xinl.c
deleted file mode 100644
index 644836d30..000000000
--- a/newlib/libc/sys/linux/argp/argp-xinl.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Real definitions for extern inline functions in argp.h
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Miles Bader <miles@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <features.h>
-
-#ifndef __USE_EXTERN_INLINES
-# define __USE_EXTERN_INLINES 1
-#endif
-#define ARGP_EI
-#undef __OPTIMIZE__
-#define __OPTIMIZE__ 1
-#include <argp.h>
-
-/* Add weak aliases. */
-#if _LIBC - 0 && defined (weak_alias)
-
-weak_alias (__argp_usage, argp_usage)
-weak_alias (__option_is_short, _option_is_short)
-weak_alias (__option_is_end, _option_is_end)
-
-#endif
diff --git a/newlib/libc/sys/linux/bits/initspin.h b/newlib/libc/sys/linux/bits/initspin.h
deleted file mode 100644
index a19ec077e..000000000
--- a/newlib/libc/sys/linux/bits/initspin.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Generic definitions for spinlock initializers.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Initial value of a spinlock. Most platforms should use zero,
- unless they only implement a "test and clear" operation instead of
- the usual "test and set". */
-#define __LT_SPINLOCK_INIT 0
-
-/* Macros for lock initializers, using the above definition. */
-#define __LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT }
-#define __ALT_LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT }
-#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_INIT }
diff --git a/newlib/libc/sys/linux/bits/libc-lock.h b/newlib/libc/sys/linux/bits/libc-lock.h
deleted file mode 100644
index 2b170444b..000000000
--- a/newlib/libc/sys/linux/bits/libc-lock.h
+++ /dev/null
@@ -1,380 +0,0 @@
-/* libc-internal interface for mutex locks. LinuxThreads version.
- Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _BITS_LIBC_LOCK_H
-#define _BITS_LIBC_LOCK_H 1
-
-#include <pthread.h>
-
-#if defined _LIBC && !defined NOT_IN_libc
-#include <linuxthreads/internals.h>
-#endif
-
-/* Mutex type. */
-#if defined(_LIBC) || defined(_IO_MTSAFE_IO)
-typedef pthread_mutex_t __libc_lock_t;
-typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t;
-# ifdef __USE_UNIX98
-typedef pthread_rwlock_t __libc_rwlock_t;
-# else
-typedef struct __libc_rwlock_opaque__ __libc_rwlock_t;
-# endif
-typedef __libc_lock_recursive_t __rtld_lock_recursive_t;
-#else
-typedef struct __libc_lock_opaque__ __libc_lock_t;
-typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
-typedef struct __libc_rwlock_opaque__ __libc_rwlock_t;
-#endif
-
-/* Type for key to thread-specific data. */
-typedef pthread_key_t __libc_key_t;
-
-/* Define a lock variable NAME with storage class CLASS. The lock must be
- initialized with __libc_lock_init before it can be used (or define it
- with __libc_lock_define_initialized, below). Use `extern' for CLASS to
- declare a lock defined in another module. In public structure
- definitions you must use a pointer to the lock structure (i.e., NAME
- begins with a `*'), because its storage size will not be known outside
- of libc. */
-#define __libc_lock_define(CLASS,NAME) \
- CLASS __libc_lock_t NAME;
-#define __libc_rwlock_define(CLASS,NAME) \
- CLASS __libc_rwlock_t NAME;
-#define __libc_lock_define_recursive(CLASS,NAME) \
- CLASS __libc_lock_recursive_t NAME;
-#define __rtld_lock_define_recursive(CLASS,NAME) \
- CLASS __rtld_lock_recursive_t NAME;
-
-/* Define an initialized lock variable NAME with storage class CLASS.
-
- For the C library we take a deeper look at the initializer. For
- this implementation all fields are initialized to zero. Therefore
- we don't initialize the variable which allows putting it into the
- BSS section. (Except on PA-RISC and other odd architectures, where
- initialized locks must be set to one due to the lack of normal
- atomic operations.) */
-
-#if __LT_SPINLOCK_INIT == 0
-# define __libc_lock_define_initialized(CLASS,NAME) \
- CLASS __libc_lock_t NAME;
-#else
-# define __libc_lock_define_initialized(CLASS,NAME) \
- CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER;
-#endif
-
-#define __libc_rwlock_define_initialized(CLASS,NAME) \
- CLASS __libc_rwlock_t NAME = PTHREAD_RWLOCK_INITIALIZER;
-
-/* Define an initialized recursive lock variable NAME with storage
- class CLASS. */
-#define __libc_lock_define_initialized_recursive(CLASS,NAME) \
- CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER;
-#define _LIBC_LOCK_RECURSIVE_INITIALIZER \
- {PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP}
-
-#define __rtld_lock_define_initialized_recursive(CLASS,NAME) \
- CLASS __rtld_lock_recursive_t NAME = _RTLD_LOCK_RECURSIVE_INITIALIZER;
-#define _RTLD_LOCK_RECURSIVE_INITIALIZER \
- {PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP}
-
-#if defined _LIBC && defined IS_IN_libpthread
-# define __libc_maybe_call(FUNC, ARGS, ELSE) FUNC ARGS
-#else
-# if defined __PIC__ || (defined _LIBC && defined SHARED)
-# define __libc_maybe_call(FUNC, ARGS, ELSE) \
- (__extension__ ({ __typeof (FUNC) *_fn = (FUNC); \
- _fn != NULL ? (*_fn) ARGS : ELSE; }))
-# else
-# define __libc_maybe_call(FUNC, ARGS, ELSE) \
- (FUNC != NULL ? FUNC ARGS : ELSE)
-# endif
-#endif
-#if defined _LIBC && !defined NOT_IN_libc && defined SHARED
-# define __libc_maybe_call2(FUNC, ARGS, ELSE) \
- ({__builtin_expect (__libc_pthread_functions.ptr_##FUNC != NULL, 0) \
- ? __libc_pthread_functions.ptr_##FUNC ARGS : ELSE; })
-#else
-# define __libc_maybe_call2(FUNC, ARGS, ELSE) __libc_maybe_call (__##FUNC, ARGS, ELSE)
-#endif
-
-/* Initialize the named lock variable, leaving it in a consistent, unlocked
- state. */
-#if defined _LIBC && !defined NOT_IN_libc && defined SHARED
-#define __libc_lock_init(NAME) \
- ({ \
- (NAME).__m_count = 0; \
- (NAME).__m_owner = NULL; \
- (NAME).__m_kind = PTHREAD_MUTEX_TIMED_NP; \
- (NAME).__m_lock.__status = 0; \
- (NAME).__m_lock.__spinlock = __LT_SPINLOCK_INIT; \
- 0; })
-#else
-#define __libc_lock_init(NAME) \
- (__libc_maybe_call2 (pthread_mutex_init, (&(NAME), NULL), 0))
-#endif
-#define __libc_rwlock_init(NAME) \
- (__libc_maybe_call (__pthread_rwlock_init, (&(NAME), NULL), 0));
-
-/* Same as last but this time we initialize a recursive mutex. */
-#if defined _LIBC && !defined NOT_IN_libc && defined SHARED
-#define __libc_lock_init_recursive(NAME) \
- ({ \
- (NAME).mutex.__m_count = 0; \
- (NAME).mutex.__m_owner = NULL; \
- (NAME).mutex.__m_kind = PTHREAD_MUTEX_RECURSIVE_NP; \
- (NAME).mutex.__m_lock.__status = 0; \
- (NAME).mutex.__m_lock.__spinlock = __LT_SPINLOCK_INIT; \
- 0; })
-#else
-#define __libc_lock_init_recursive(NAME) \
- do { \
- if (__pthread_mutex_init != NULL) \
- { \
- pthread_mutexattr_t __attr; \
- __pthread_mutexattr_init (&__attr); \
- __pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \
- __pthread_mutex_init (&(NAME).mutex, &__attr); \
- __pthread_mutexattr_destroy (&__attr); \
- } \
- } while (0);
-#endif
-#define __rtld_lock_init_recursive(NAME) \
- __libc_lock_init_recursive (NAME)
-
-/* Finalize the named lock variable, which must be locked. It cannot be
- used again until __libc_lock_init is called again on it. This must be
- called on a lock variable before the containing storage is reused. */
-#define __libc_lock_fini(NAME) \
- (__libc_maybe_call2 (pthread_mutex_destroy, (&(NAME)), 0));
-#define __libc_rwlock_fini(NAME) \
- (__libc_maybe_call (__pthread_rwlock_destroy, (&(NAME)), 0));
-
-/* Finalize recursive named lock. */
-#define __libc_lock_fini_recursive(NAME) __libc_lock_fini ((NAME).mutex)
-#define __rtld_lock_fini_recursive(NAME) __libc_lock_fini_recursive (NAME)
-
-/* Lock the named lock variable. */
-#define __libc_lock_lock(NAME) \
- (__libc_maybe_call2 (pthread_mutex_lock, (&(NAME)), 0));
-#define __libc_rwlock_rdlock(NAME) \
- (__libc_maybe_call (__pthread_rwlock_rdlock, (&(NAME)), 0));
-#define __libc_rwlock_wrlock(NAME) \
- (__libc_maybe_call (__pthread_rwlock_wrlock, (&(NAME)), 0));
-
-/* Lock the recursive named lock variable. */
-#define __libc_lock_lock_recursive(NAME) __libc_lock_lock ((NAME).mutex)
-
-/* Try to lock the named lock variable. */
-#define __libc_lock_trylock(NAME) \
- (__libc_maybe_call2 (pthread_mutex_trylock, (&(NAME)), 0))
-#define __libc_rwlock_tryrdlock(NAME) \
- (__libc_maybe_call (__pthread_rwlock_tryrdlock, (&(NAME)), 0))
-#define __libc_rwlock_trywrlock(NAME) \
- (__libc_maybe_call (__pthread_rwlock_trywrlock, (&(NAME)), 0))
-
-/* Try to lock the recursive named lock variable. */
-#define __libc_lock_trylock_recursive(NAME) __libc_lock_trylock ((NAME).mutex)
-#define __rtld_lock_trylock_recursive(NAME) \
- __libc_lock_trylock_recursive (NAME)
-
-/* Unlock the named lock variable. */
-#define __libc_lock_unlock(NAME) \
- (__libc_maybe_call2 (pthread_mutex_unlock, (&(NAME)), 0));
-#define __libc_rwlock_unlock(NAME) \
- (__libc_maybe_call (__pthread_rwlock_unlock, (&(NAME)), 0));
-
-/* Unlock the recursive named lock variable. */
-#define __libc_lock_unlock_recursive(NAME) __libc_lock_unlock ((NAME).mutex)
-
-#if defined _LIBC && defined SHARED
-# define __rtld_lock_default_lock_recursive(lock) \
- ++((pthread_mutex_t *)(lock))->__m_count;
-
-# define __rtld_lock_default_unlock_recursive(lock) \
- --((pthread_mutex_t *)(lock))->__m_count;
-
-# define __rtld_lock_lock_recursive(NAME) \
- GL(dl_rtld_lock_recursive) (&(NAME).mutex)
-
-# define __rtld_lock_unlock_recursive(NAME) \
- GL(dl_rtld_unlock_recursive) (&(NAME).mutex)
-#else
-#define __rtld_lock_lock_recursive(NAME) __libc_lock_lock_recursive (NAME)
-#define __rtld_lock_unlock_recursive(NAME) __libc_lock_unlock_recursive (NAME)
-#endif
-
-/* Define once control variable. */
-#if PTHREAD_ONCE_INIT == 0
-/* Special case for static variables where we can avoid the initialization
- if it is zero. */
-# define __libc_once_define(CLASS, NAME) \
- CLASS pthread_once_t NAME
-#else
-# define __libc_once_define(CLASS, NAME) \
- CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT
-#endif
-
-/* Call handler iff the first call. */
-#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \
- do { \
- if (__pthread_once != NULL) \
- __pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \
- else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) { \
- INIT_FUNCTION (); \
- (ONCE_CONTROL) = 2; \
- } \
- } while (0)
-
-
-/* Start critical region with cleanup. */
-#define __libc_cleanup_region_start(DOIT, FCT, ARG) \
- { struct _pthread_cleanup_buffer _buffer; \
- int _avail = (DOIT) && _pthread_cleanup_push_defer != NULL; \
- if (_avail) { \
- _pthread_cleanup_push_defer (&_buffer, (FCT), (ARG)); \
- }
-
-/* End critical region with cleanup. */
-#define __libc_cleanup_region_end(DOIT) \
- if (_avail) { \
- _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \
- } \
- }
-
-/* Sometimes we have to exit the block in the middle. */
-#define __libc_cleanup_end(DOIT) \
- if (_avail) { \
- _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \
- }
-
-#define __libc_cleanup_push(fct, arg) \
- { struct _pthread_cleanup_buffer _buffer; \
- __libc_maybe_call (_pthread_cleanup_push, (&_buffer, (fct), (arg)), 0)
-
-#define __libc_cleanup_pop(execute) \
- __libc_maybe_call (_pthread_cleanup_pop, (&_buffer, execute), 0); \
- }
-
-/* Create thread-specific key. */
-#define __libc_key_create(KEY, DESTRUCTOR) \
- (__libc_maybe_call (__pthread_key_create, (KEY, DESTRUCTOR), 1))
-
-/* Get thread-specific data. */
-#define __libc_getspecific(KEY) \
- (__libc_maybe_call (__pthread_getspecific, (KEY), NULL))
-
-/* Set thread-specific data. */
-#define __libc_setspecific(KEY, VALUE) \
- (__libc_maybe_call (__pthread_setspecific, (KEY, VALUE), 0))
-
-
-/* Register handlers to execute before and after `fork'. */
-#define __libc_atfork(PREPARE, PARENT, CHILD) \
- (__libc_maybe_call (__pthread_atfork, (PREPARE, PARENT, CHILD), 0))
-
-/* Functions that are used by this file and are internal to the GNU C
- library. */
-
-extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
- __const pthread_mutexattr_t *__mutex_attr);
-
-extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
-
-extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex);
-
-extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
-
-extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
-
-extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr);
-
-extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr);
-
-extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr,
- int __kind);
-
-#ifdef __USE_UNIX98
-extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
- __const pthread_rwlockattr_t *__attr);
-
-extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
-
-extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock);
-
-extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock);
-
-extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock);
-
-extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock);
-
-extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock);
-#endif
-
-extern int __pthread_key_create (pthread_key_t *__key,
- void (*__destr_function) (void *));
-
-extern int __pthread_setspecific (pthread_key_t __key,
- __const void *__pointer);
-
-extern void *__pthread_getspecific (pthread_key_t __key);
-
-extern int __pthread_once (pthread_once_t *__once_control,
- void (*__init_routine) (void));
-
-extern int __pthread_atfork (void (*__prepare) (void),
- void (*__parent) (void),
- void (*__child) (void));
-
-
-
-/* Make the pthread functions weak so that we can elide them from
- single-threaded processes. */
-#ifndef __NO_WEAK_PTHREAD_ALIASES
-# pragma weak __pthread_mutex_init
-# pragma weak __pthread_mutex_destroy
-# pragma weak __pthread_mutex_lock
-# pragma weak __pthread_mutex_trylock
-# pragma weak __pthread_mutex_unlock
-# pragma weak __pthread_mutexattr_init
-# pragma weak __pthread_mutexattr_destroy
-# pragma weak __pthread_mutexattr_settype
-# pragma weak __pthread_rwlock_destroy
-# pragma weak __pthread_rwlock_rdlock
-# pragma weak __pthread_rwlock_tryrdlock
-# pragma weak __pthread_rwlock_wrlock
-# pragma weak __pthread_rwlock_trywrlock
-# pragma weak __pthread_rwlock_unlock
-# pragma weak __pthread_key_create
-# pragma weak __pthread_setspecific
-# pragma weak __pthread_getspecific
-# pragma weak __pthread_once
-# pragma weak __pthread_initialize
-# pragma weak __pthread_atfork
-# pragma weak _pthread_cleanup_push_defer
-# pragma weak _pthread_cleanup_pop_restore
-# pragma weak _pthread_cleanup_push
-# pragma weak _pthread_cleanup_pop
-#endif
-
-/* We need portable names for some functions. E.g., when they are
- used as argument to __libc_cleanup_region_start. */
-#define __libc_mutex_unlock __pthread_mutex_unlock
-
-#endif /* bits/libc-lock.h */
diff --git a/newlib/libc/sys/linux/bits/pthreadtypes.h b/newlib/libc/sys/linux/bits/pthreadtypes.h
deleted file mode 100644
index d1daef07a..000000000
--- a/newlib/libc/sys/linux/bits/pthreadtypes.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-#if !defined _BITS_TYPES_H && !defined _PTHREAD_H
-# error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead."
-#endif
-
-#ifndef _BITS_PTHREADTYPES_H
-#define _BITS_PTHREADTYPES_H 1
-
-#define __need_schedparam
-#include <bits/sched.h>
-
-/* Fast locks (not abstract because mutexes and conditions aren't abstract). */
-struct _pthread_fastlock
-{
- long int __status; /* "Free" or "taken" or head of waiting list */
- int __spinlock; /* Used by compare_and_swap emulation. Also,
- adaptive SMP lock stores spin count here. */
-};
-
-#ifndef _PTHREAD_DESCR_DEFINED
-/* Thread descriptors */
-typedef struct _pthread_descr_struct *_pthread_descr;
-# define _PTHREAD_DESCR_DEFINED
-#endif
-
-
-/* Attributes for threads. */
-typedef struct __pthread_attr_s
-{
- int __detachstate;
- int __schedpolicy;
- struct __sched_param __schedparam;
- int __inheritsched;
- int __scope;
- size_t __guardsize;
- int __stackaddr_set;
- void *__stackaddr;
- size_t __stacksize;
-} pthread_attr_t;
-
-
-/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */
-
-#ifdef __GLIBC_HAVE_LONG_LONG
-__extension__ typedef long long __pthread_cond_align_t;
-#else
-typedef long __pthread_cond_align_t;
-#endif
-
-typedef struct
-{
- struct _pthread_fastlock __c_lock; /* Protect against concurrent access */
- _pthread_descr __c_waiting; /* Threads waiting on this condition */
- char __padding[48 - sizeof (struct _pthread_fastlock)
- - sizeof (_pthread_descr) - sizeof (__pthread_cond_align_t)];
- __pthread_cond_align_t __align;
-} pthread_cond_t;
-
-
-/* Attribute for conditionally variables. */
-typedef struct
-{
- int __dummy;
-} pthread_condattr_t;
-
-/* Keys for thread-specific data */
-typedef unsigned int pthread_key_t;
-
-
-/* Mutexes (not abstract because of PTHREAD_MUTEX_INITIALIZER). */
-/* (The layout is unnatural to maintain binary compatibility
- with earlier releases of LinuxThreads.) */
-typedef struct
-{
- int __m_reserved; /* Reserved for future use */
- int __m_count; /* Depth of recursive locking */
- _pthread_descr __m_owner; /* Owner thread (if recursive or errcheck) */
- int __m_kind; /* Mutex kind: fast, recursive or errcheck */
- struct _pthread_fastlock __m_lock; /* Underlying fast lock */
-} pthread_mutex_t;
-
-
-/* Attribute for mutex. */
-typedef struct
-{
- int __mutexkind;
-} pthread_mutexattr_t;
-
-
-/* Once-only execution */
-typedef int pthread_once_t;
-
-
-#if defined __USE_UNIX98 || defined __USE_XOPEN2K
-/* Read-write locks. */
-typedef struct _pthread_rwlock_t
-{
- struct _pthread_fastlock __rw_lock; /* Lock to guarantee mutual exclusion */
- int __rw_readers; /* Number of readers */
- _pthread_descr __rw_writer; /* Identity of writer, or NULL if none */
- _pthread_descr __rw_read_waiting; /* Threads waiting for reading */
- _pthread_descr __rw_write_waiting; /* Threads waiting for writing */
- int __rw_kind; /* Reader/Writer preference selection */
- int __rw_pshared; /* Shared between processes or not */
-} pthread_rwlock_t;
-
-
-/* Attribute for read-write locks. */
-typedef struct
-{
- int __lockkind;
- int __pshared;
-} pthread_rwlockattr_t;
-#endif
-
-#ifdef __USE_XOPEN2K
-/* POSIX spinlock data type. */
-typedef volatile int pthread_spinlock_t;
-
-/* POSIX barrier. */
-typedef struct {
- struct _pthread_fastlock __ba_lock; /* Lock to guarantee mutual exclusion */
- int __ba_required; /* Threads needed for completion */
- int __ba_present; /* Threads waiting */
- _pthread_descr __ba_waiting; /* Queue of waiting threads */
-} pthread_barrier_t;
-
-/* barrier attribute */
-typedef struct {
- int __pshared;
-} pthread_barrierattr_t;
-
-#endif
-
-
-/* Thread identifiers */
-typedef unsigned long int pthread_t;
-
-#endif /* bits/pthreadtypes.h */
diff --git a/newlib/libc/sys/linux/bits/typesizes.h b/newlib/libc/sys/linux/bits/typesizes.h
deleted file mode 100644
index 45264ac9c..000000000
--- a/newlib/libc/sys/linux/bits/typesizes.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* bits/typesizes.h -- underlying types for *_t. Generic version.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _BITS_TYPES_H
-# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
-#endif
-
-#ifndef _BITS_TYPESIZES_H
-#define _BITS_TYPESIZES_H 1
-
-/* See <bits/types.h> for the meaning of these macros. This file exists so
- that <bits/types.h> need not vary across different GNU platforms. */
-
-#define __DEV_T_TYPE __UQUAD_TYPE
-#define __UID_T_TYPE __U32_TYPE
-#define __GID_T_TYPE __U32_TYPE
-#define __INO_T_TYPE __ULONGWORD_TYPE
-#define __INO64_T_TYPE __UQUAD_TYPE
-#define __MODE_T_TYPE __U32_TYPE
-#define __NLINK_T_TYPE __UWORD_TYPE
-#define __OFF_T_TYPE __SLONGWORD_TYPE
-#define __OFF64_T_TYPE __SQUAD_TYPE
-#define __PID_T_TYPE __S32_TYPE
-#define __RLIM_T_TYPE __ULONGWORD_TYPE
-#define __RLIM64_T_TYPE __UQUAD_TYPE
-#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
-#define __BLKCNT64_T_TYPE __SQUAD_TYPE
-#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
-#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
-#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
-#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
-#define __ID_T_TYPE __U32_TYPE
-#define __CLOCK_T_TYPE __SLONGWORD_TYPE
-#define __TIME_T_TYPE __SLONGWORD_TYPE
-#define __USECONDS_T_TYPE __U32_TYPE
-#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
-#define __DADDR_T_TYPE __S32_TYPE
-#define __SWBLK_T_TYPE __SLONGWORD_TYPE
-#define __KEY_T_TYPE __S32_TYPE
-#define __CLOCKID_T_TYPE __S32_TYPE
-#define __TIMER_T_TYPE __S32_TYPE
-#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
-#define __FSID_T_TYPE struct { int __val[2]; }
-#define __SSIZE_T_TYPE __SWORD_TYPE
-
-/* Number of descriptors that can fit in an `fd_set'. */
-#define __FD_SETSIZE 1024
-
-
-#endif /* bits/typesizes.h */
diff --git a/newlib/libc/sys/linux/bp-checks.h b/newlib/libc/sys/linux/bp-checks.h
deleted file mode 100644
index efbb84716..000000000
--- a/newlib/libc/sys/linux/bp-checks.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Bounded-pointer checking macros for C.
- Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Greg McGary <greg@mcgary.org>
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _bp_checks_h_
-#define _bp_checks_h_ 1
-
-#if __BOUNDED_POINTERS__
-
-# define BOUNDS_VIOLATED (__builtin_trap (), 0)
-
-/* Verify that pointer's value >= low. Return pointer value. */
-# define CHECK_BOUNDS_LOW(ARG) \
- (((__ptrvalue (ARG) < __ptrlow (ARG)) && BOUNDS_VIOLATED), \
- __ptrvalue (ARG))
-
-/* Verify that pointer's value < high. Return pointer value. */
-# define CHECK_BOUNDS_HIGH(ARG) \
- (((__ptrvalue (ARG) > __ptrhigh (ARG)) && BOUNDS_VIOLATED), \
- __ptrvalue (ARG))
-
-# define _CHECK_N(ARG, N, COND) \
- (((COND) \
- && (__ptrvalue (ARG) < __ptrlow (ARG) \
- || __ptrvalue (ARG) + (N) > __ptrhigh (ARG)) \
- && BOUNDS_VIOLATED), \
- __ptrvalue (ARG))
-
-extern void *__unbounded __ubp_memchr (const void *__unbounded, int, unsigned);
-
-# define _CHECK_STRING(ARG, COND) \
- (((COND) \
- && (__ptrvalue (ARG) < __ptrlow (ARG) \
- || !__ubp_memchr (__ptrvalue (ARG), '\0', \
- (__ptrhigh (ARG) - __ptrvalue (ARG)))) \
- && BOUNDS_VIOLATED), \
- __ptrvalue (ARG))
-
-/* Check bounds of a pointer seated to an array of N objects. */
-# define CHECK_N(ARG, N) _CHECK_N ((ARG), (N), 1)
-/* Same as CHECK_N, but tolerate ARG == NULL. */
-# define CHECK_N_NULL_OK(ARG, N) _CHECK_N ((ARG), (N), __ptrvalue (ARG))
-
-/* Check bounds of a pointer seated to a single object. */
-# define CHECK_1(ARG) CHECK_N ((ARG), 1)
-/* Same as CHECK_1, but tolerate ARG == NULL. */
-# define CHECK_1_NULL_OK(ARG) CHECK_N_NULL_OK ((ARG), 1)
-
-/* Check for NUL-terminator within string's bounds. */
-# define CHECK_STRING(ARG) _CHECK_STRING ((ARG), 1)
-/* Same as CHECK_STRING, but tolerate ARG == NULL. */
-# define CHECK_STRING_NULL_OK(ARG) _CHECK_STRING ((ARG), __ptrvalue (ARG))
-
-/* Check bounds of signal syscall args with type sigset_t. */
-# define CHECK_SIGSET(SET) CHECK_N ((SET), _NSIG / (8 * sizeof *(SET)))
-/* Same as CHECK_SIGSET, but tolerate SET == NULL. */
-# define CHECK_SIGSET_NULL_OK(SET) CHECK_N_NULL_OK ((SET), _NSIG / (8 * sizeof *(SET)))
-
-# if defined (_IOC_SIZESHIFT) && defined (_IOC_SIZEBITS)
-/* Extract the size of the ioctl data and check its bounds. */
-# define CHECK_IOCTL(ARG, CMD) \
- CHECK_N ((const char *) (ARG), \
- (((CMD) >> _IOC_SIZESHIFT) & ((1 << _IOC_SIZEBITS) - 1)))
-# else
-/* We don't know the size of the ioctl data, so the best we can do
- is check that the first byte is within bounds. */
-# define CHECK_IOCTL(ARG, CMD) CHECK_1 ((const char *) ARG)
-# endif
-
-/* Check bounds of `struct flock *' for the locking fcntl commands. */
-# define CHECK_FCNTL(ARG, CMD) \
- (((CMD) == F_GETLK || (CMD) == F_SETLK || (CMD) == F_SETLKW) \
- ? CHECK_1 ((struct flock *) ARG) : (unsigned long) (ARG))
-
-/* Check bounds of an array of mincore residency-status flags that
- cover a region of NBYTES. Such a vector occupies one byte per page
- of memory. */
-# define CHECK_N_PAGES(ARG, NBYTES) \
- ({ int _page_size_ = sysconf (_SC_PAGE_SIZE); \
- CHECK_N ((const char *) (ARG), \
- ((NBYTES) + _page_size_ - 1) / _page_size_); })
-
-/* Return a bounded pointer with value PTR that satisfies CHECK_N (PTR, N). */
-# define BOUNDED_N(PTR, N) \
- ({ __typeof (PTR) __bounded _p_; \
- __ptrvalue _p_ = __ptrlow _p_ = __ptrvalue (PTR); \
- __ptrhigh _p_ = __ptrvalue _p_ + (N); \
- _p_; })
-
-#else /* !__BOUNDED_POINTERS__ */
-
-/* Do nothing if not compiling with -fbounded-pointers. */
-
-# define BOUNDS_VIOLATED
-# define CHECK_BOUNDS_LOW(ARG) (ARG)
-# define CHECK_BOUNDS_HIGH(ARG) (ARG)
-# define CHECK_1(ARG) (ARG)
-# define CHECK_1_NULL_OK(ARG) (ARG)
-# define CHECK_N(ARG, N) (ARG)
-# define CHECK_N_NULL_OK(ARG, N) (ARG)
-# define CHECK_STRING(ARG) (ARG)
-# define CHECK_SIGSET(SET) (SET)
-# define CHECK_SIGSET_NULL_OK(SET) (SET)
-# define CHECK_IOCTL(ARG, CMD) (ARG)
-# define CHECK_FCNTL(ARG, CMD) (ARG)
-# define CHECK_N_PAGES(ARG, NBYTES) (ARG)
-# define BOUNDED_N(PTR, N) (PTR)
-
-#endif /* !__BOUNDED_POINTERS__ */
-
-#define BOUNDED_1(PTR) BOUNDED_N (PTR, 1)
-
-#endif /* _bp_checks_h_ */
diff --git a/newlib/libc/sys/linux/brk.c b/newlib/libc/sys/linux/brk.c
deleted file mode 100644
index 91bb367e7..000000000
--- a/newlib/libc/sys/linux/brk.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* libc/sys/linux/brk.c - Change data segment size */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#include <stddef.h> /* for NULL */
-#include <sys/types.h>
-#include <sys/unistd.h>
-#include <machine/syscall.h>
-
-
-static char *curr_brk = NULL;
-
-
-#define __NR___brk __NR_brk /* Linux brk ain't no brk(2) */
-
-static _syscall1(void *,__brk,void *,end_data_segment)
-
-
-int brk(void *end_data_segment)
-{
- char *new_brk;
-
- new_brk = __brk(end_data_segment);
- if (new_brk != end_data_segment) return -1;
- curr_brk = new_brk;
- return 0;
-}
-
-
-void *sbrk(ptrdiff_t increment) /* SHOULD be ptrdiff_t */
-{
- char *old_brk,*new_brk;
-
- if (!curr_brk) curr_brk = __brk(NULL);
- new_brk = __brk(curr_brk+increment);
- if (new_brk != curr_brk+increment) return (void *) -1;
- old_brk = curr_brk;
- curr_brk = new_brk;
- return old_brk;
-}
diff --git a/newlib/libc/sys/linux/calloc.c b/newlib/libc/sys/linux/calloc.c
deleted file mode 100644
index 818e05a75..000000000
--- a/newlib/libc/sys/linux/calloc.c
+++ /dev/null
@@ -1 +0,0 @@
-/* dummy file to override one object in stdlib directory */
diff --git a/newlib/libc/sys/linux/callocr.c b/newlib/libc/sys/linux/callocr.c
deleted file mode 100644
index bff43b8c3..000000000
--- a/newlib/libc/sys/linux/callocr.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdlib.h>
-
-void *
-_calloc_r (struct _reent *ptr, size_t size, size_t len)
-{
- return calloc (size, len);
-}
diff --git a/newlib/libc/sys/linux/cfreer.c b/newlib/libc/sys/linux/cfreer.c
deleted file mode 100644
index c7e6c2564..000000000
--- a/newlib/libc/sys/linux/cfreer.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdlib.h>
-
-void
-_cfree_r (struct _reent *ptr, void *mem)
-{
- return cfree (mem);
-}
diff --git a/newlib/libc/sys/linux/cfspeed.c b/newlib/libc/sys/linux/cfspeed.c
deleted file mode 100644
index e935bf178..000000000
--- a/newlib/libc/sys/linux/cfspeed.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* `struct termios' speed frobnication functions. Linux version.
- Copyright (C) 1991, 92, 93, 95, 96, 97, 98, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Modified by Jeff Johnston, May 27, 2002 to remove kernel hack
- as we simply ignore a cfisetspeed of 0 instead of treating it specially */
-
-#include <stddef.h>
-#include <errno.h>
-#include <termios.h>
-
-/* Return the output baud rate stored in *TERMIOS_P. */
-speed_t
-cfgetospeed (termios_p)
- const struct termios *termios_p;
-{
- return termios_p->c_cflag & (CBAUD | CBAUDEX);
-}
-
-/* Return the input baud rate stored in *TERMIOS_P.
- For Linux there is no difference between input and output
- speed. */
-speed_t
-cfgetispeed (termios_p)
- const struct termios *termios_p;
-{
- return termios_p->c_cflag & (CBAUD | CBAUDEX);
-}
-
-/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
-int
-cfsetospeed (termios_p, speed)
- struct termios *termios_p;
- speed_t speed;
-{
- if ((speed & ~CBAUD) != 0
- && (speed < B57600 || speed > __MAX_BAUD))
- {
- errno = (EINVAL);
- return -1;
- }
-
- termios_p->c_cflag &= ~(CBAUD | CBAUDEX);
- termios_p->c_cflag |= speed;
-
- return 0;
-}
-
-/* Set the input baud rate stored in *TERMIOS_P to SPEED.
- Although for Linux there is no difference between input and output
- speed, the numerical 0 is a special case for the input baud rate. It
- should set the input baud rate to the output baud rate so we do
- nothing. */
-int
-cfsetispeed (termios_p, speed)
- struct termios *termios_p;
- speed_t speed;
-{
- if ((speed & ~CBAUD) != 0
- && (speed < B57600 || speed > __MAX_BAUD))
- {
- errno = (EINVAL);
- return -1;
- }
-
- if (speed != 0)
- {
- termios_p->c_cflag &= ~(CBAUD | CBAUDEX);
- termios_p->c_cflag |= speed;
- }
-
- return 0;
-}
diff --git a/newlib/libc/sys/linux/clock_getres.c b/newlib/libc/sys/linux/clock_getres.c
deleted file mode 100644
index 8bf648f51..000000000
--- a/newlib/libc/sys/linux/clock_getres.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <stdint.h>
-#include <time.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <libc-internal.h>
-
-
-#if HP_TIMING_AVAIL
-/* Clock frequency of the processor. */
-static long int nsec;
-#endif
-
-
-/* Get resolution of clock. */
-int
-clock_getres (clockid_t clock_id, struct timespec *res)
-{
- int retval = -1;
-
- switch (clock_id)
- {
- case CLOCK_REALTIME:
- {
- long int clk_tck = sysconf (_SC_CLK_TCK);
-
- if (__builtin_expect (clk_tck != -1, 1))
- {
- /* This implementation assumes that the realtime clock has a
- resolution higher than 1 second. This is the case for any
- reasonable implementation. */
- res->tv_sec = 0;
- res->tv_nsec = 1000000000 / clk_tck;
-
- retval = 0;
- }
- }
- break;
-
-#if HP_TIMING_AVAIL
- case CLOCK_PROCESS_CPUTIME_ID:
- case CLOCK_THREAD_CPUTIME_ID:
- {
- if (__builtin_expect (nsec == 0, 0))
- {
- hp_timing_t freq;
-
- /* This can only happen if we haven't initialized the `freq'
- variable yet. Do this now. We don't have to protect this
- code against multiple execution since all of them should
- lead to the same result. */
- freq = __get_clockfreq ();
- if (__builtin_expect (freq == 0, 0))
- /* Something went wrong. */
- break;
-
- nsec = MAX (UINT64_C (1000000000) / freq, 1);
- }
-
- /* File in the values. The seconds are always zero (unless we
- have a 1Hz machine). */
- res->tv_sec = 0;
- res->tv_nsec = nsec;
-
- retval = 0;
- }
- break;
-#endif
-
- default:
- __set_errno (EINVAL);
- break;
- }
-
- return retval;
-}
diff --git a/newlib/libc/sys/linux/clock_gettime.c b/newlib/libc/sys/linux/clock_gettime.c
deleted file mode 100644
index a86786bb2..000000000
--- a/newlib/libc/sys/linux/clock_gettime.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <stdint.h>
-#include <time.h>
-#include <sys/time.h>
-#include <libc-internal.h>
-#include <hp-timing.h>
-
-
-#if HP_TIMING_AVAIL
-/* Clock frequency of the processor. We make it a 64-bit variable
- because some jokers are already playing with processors with more
- than 4GHz. */
-static hp_timing_t freq;
-
-
-/* We need the starting time for the process. */
-extern hp_timing_t _dl_cpuclock_offset;
-
-
-/* This function is defined in the thread library. */
-extern int __pthread_clock_gettime (hp_timing_t freq, struct timespec *tp)
- __attribute__ ((__weak__));
-#endif
-
-
-/* Get current value of CLOCK and store it in TP. */
-int
-clock_gettime (clockid_t clock_id, struct timespec *tp)
-{
- struct timeval tv;
- int retval = -1;
-
- switch (clock_id)
- {
- case CLOCK_REALTIME:
- retval = gettimeofday (&tv, NULL);
- if (retval == 0)
- /* Convert into `timespec'. */
- TIMEVAL_TO_TIMESPEC (&tv, tp);
- break;
-
-#if HP_TIMING_AVAIL
- case CLOCK_PROCESS_CPUTIME_ID:
- case CLOCK_THREAD_CPUTIME_ID:
- {
- hp_timing_t tsc;
-
- if (__builtin_expect (freq == 0, 0))
- {
- /* This can only happen if we haven't initialized the `freq'
- variable yet. Do this now. We don't have to protect this
- code against multiple execution since all of them should
- lead to the same result. */
- freq = __get_clockfreq ();
- if (__builtin_expect (freq == 0, 0))
- /* Something went wrong. */
- break;
- }
-
- if (clock_id == CLOCK_THREAD_CPUTIME_ID
- && __pthread_clock_gettime != NULL)
- {
- retval = __pthread_clock_gettime (freq, tp);
- break;
- }
-
- /* Get the current counter. */
- HP_TIMING_NOW (tsc);
-
- /* Compute the offset since the start time of the process. */
- tsc -= _dl_cpuclock_offset;
-
- /* Compute the seconds. */
- tp->tv_sec = tsc / freq;
-
- /* And the nanoseconds. This computation should be stable until
- we get machines with about 16GHz frequency. */
- tp->tv_nsec = ((tsc % freq) * UINT64_C (1000000000)) / freq;
-
- retval = 0;
- }
- break;
-#endif
-
- default:
- __set_errno (EINVAL);
- break;
- }
-
- return retval;
-}
diff --git a/newlib/libc/sys/linux/clock_settime.c b/newlib/libc/sys/linux/clock_settime.c
deleted file mode 100644
index 79a9b564a..000000000
--- a/newlib/libc/sys/linux/clock_settime.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <time.h>
-#include <sys/time.h>
-#include <libc-internal.h>
-
-
-#if HP_TIMING_AVAIL
-/* Clock frequency of the processor. We make it a 64-bit variable
- because some jokers are already playing with processors with more
- than 4GHz. */
-static hp_timing_t freq;
-
-
-/* We need the starting time for the process. */
-extern hp_timing_t _dl_cpuclock_offset;
-
-
-/* This function is defined in the thread library. */
-extern void __pthread_clock_settime (hp_timing_t offset)
- __attribute__ ((__weak__));
-#endif
-
-
-/* Set CLOCK to value TP. */
-int
-clock_settime (clockid_t clock_id, const struct timespec *tp)
-{
- struct timeval tv;
- int retval;
-
- /* Make sure the time cvalue is OK. */
- if (tp->tv_nsec < 0 || tp->tv_nsec >= 1000000000)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- switch (clock_id)
- {
- case CLOCK_REALTIME:
- TIMESPEC_TO_TIMEVAL (&tv, tp);
-
- retval = settimeofday (&tv, NULL);
- break;
-
-#if HP_TIMING_AVAIL
- case CLOCK_PROCESS_CPUTIME_ID:
- case CLOCK_THREAD_CPUTIME_ID:
- {
- hp_timing_t tsc;
- hp_timing_t usertime;
-
- /* First thing is to get the current time. */
- HP_TIMING_NOW (tsc);
-
- if (__builtin_expect (freq == 0, 0))
- {
- /* This can only happen if we haven't initialized the `freq'
- variable yet. Do this now. We don't have to protect this
- code against multiple execution since all of them should
- lead to the same result. */
- freq = __get_clockfreq ();
- if (__builtin_expect (freq == 0, 0))
- {
- /* Something went wrong. */
- retval = -1;
- break;
- }
- }
-
- /* Convert the user-provided time into CPU ticks. */
- usertime = tp->tv_sec * freq + (tp->tv_nsec * freq) / 1000000000ull;
-
- /* Determine the offset and use it as the new base value. */
- if (clock_id != CLOCK_THREAD_CPUTIME_ID
- || __pthread_clock_settime == NULL)
- _dl_cpuclock_offset = tsc - usertime;
- else
- __pthread_clock_settime (tsc - usertime);
-
- retval = 0;
- }
- break;
-#endif
-
- default:
- __set_errno (EINVAL);
- retval = -1;
- break;
- }
-
- return retval;
-}
diff --git a/newlib/libc/sys/linux/cmath/Makefile.am b/newlib/libc/sys/linux/cmath/Makefile.am
deleted file mode 100644
index 6c47f2149..000000000
--- a/newlib/libc/sys/linux/cmath/Makefile.am
+++ /dev/null
@@ -1,28 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/../include $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = \
- s_cacos.c s_casinf.c s_catanh.c s_ccosh.c s_clog.c s_cpowf.c s_csinh.c s_ctan.c \
- s_cacosf.c s_casinh.c s_catanhf.c s_ccoshf.c s_clog10.c s_csinhf.c s_ctanf.c \
- s_cacosh.c s_casinhf.c s_clog10f.c s_cproj.c s_ctanh.c \
- s_cacoshf.c s_cprojf.c s_ctanhf.c \
- s_cexp.c s_clogf.c s_csqrt.c \
- s_catan.c s_ccos.c s_cexpf.c s_csin.c s_csqrtf.c \
- s_casin.c s_catanf.c s_ccosf.c s_cpow.c s_csinf.c
-
-libcmath_la_LDFLAGS = -Xcompiler -nostdlib
-
-if USE_LIBTOOL
-noinst_LTLIBRARIES = libcmath.la
-libcmath_la_SOURCES = $(LIB_SOURCES)
-noinst_DATA = objectlist.awk.in
-else
-noinst_LIBRARIES = lib.a
-lib_a_SOURCES = $(LIB_SOURCES)
-noinst_DATA =
-endif # USE_LIBTOOL
-
-include $(srcdir)/../../../../Makefile.shared
diff --git a/newlib/libc/sys/linux/cmath/Makefile.in b/newlib/libc/sys/linux/cmath/Makefile.in
deleted file mode 100644
index 88a40e455..000000000
--- a/newlib/libc/sys/linux/cmath/Makefile.in
+++ /dev/null
@@ -1,385 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-AWK = @AWK@
-CC = @CC@
-CPP = @CPP@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-EXEEXT = @EXEEXT@
-EXTRA_SUBDIRS = @EXTRA_SUBDIRS@
-EXTRA_SUBLIBS = @EXTRA_SUBLIBS@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBTOOL = @LIBTOOL@
-LINUX_MACH_LIB = @LINUX_MACH_LIB@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/../include $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = s_cacos.c s_casinf.c s_catanh.c s_ccosh.c s_clog.c s_cpowf.c s_csinh.c s_ctan.c s_cacosf.c s_casinh.c s_catanhf.c s_ccoshf.c s_clog10.c s_csinhf.c s_ctanf.c s_cacosh.c s_casinhf.c s_clog10f.c s_cproj.c s_ctanh.c s_cacoshf.c s_cprojf.c s_ctanhf.c s_cexp.c s_clogf.c s_csqrt.c s_catan.c s_ccos.c s_cexpf.c s_csin.c s_csqrtf.c s_casin.c s_catanf.c s_ccosf.c s_cpow.c s_csinf.c
-
-
-libcmath_la_LDFLAGS = -Xcompiler -nostdlib
-
-@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libcmath.la
-@USE_LIBTOOL_TRUE@libcmath_la_SOURCES = $(LIB_SOURCES)
-@USE_LIBTOOL_TRUE@noinst_DATA = objectlist.awk.in
-@USE_LIBTOOL_FALSE@noinst_DATA =
-@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
-@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-@USE_LIBTOOL_FALSE@lib_a_OBJECTS = s_cacos.$(OBJEXT) s_casinf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_catanh.$(OBJEXT) s_ccosh.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_clog.$(OBJEXT) s_cpowf.$(OBJEXT) s_csinh.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_ctan.$(OBJEXT) s_cacosf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_casinh.$(OBJEXT) s_catanhf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_ccoshf.$(OBJEXT) s_clog10.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_csinhf.$(OBJEXT) s_ctanf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_cacosh.$(OBJEXT) s_casinhf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_clog10f.$(OBJEXT) s_cproj.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_ctanh.$(OBJEXT) s_cacoshf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_cprojf.$(OBJEXT) s_ctanhf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_cexp.$(OBJEXT) s_clogf.$(OBJEXT) s_csqrt.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_catan.$(OBJEXT) s_ccos.$(OBJEXT) s_cexpf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_csin.$(OBJEXT) s_csqrtf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_casin.$(OBJEXT) s_catanf.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@s_ccosf.$(OBJEXT) s_cpow.$(OBJEXT) s_csinf.$(OBJEXT)
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-
-libcmath_la_LIBADD =
-@USE_LIBTOOL_TRUE@libcmath_la_OBJECTS = s_cacos.lo s_casinf.lo \
-@USE_LIBTOOL_TRUE@s_catanh.lo s_ccosh.lo s_clog.lo s_cpowf.lo \
-@USE_LIBTOOL_TRUE@s_csinh.lo s_ctan.lo s_cacosf.lo s_casinh.lo \
-@USE_LIBTOOL_TRUE@s_catanhf.lo s_ccoshf.lo s_clog10.lo s_csinhf.lo \
-@USE_LIBTOOL_TRUE@s_ctanf.lo s_cacosh.lo s_casinhf.lo s_clog10f.lo \
-@USE_LIBTOOL_TRUE@s_cproj.lo s_ctanh.lo s_cacoshf.lo s_cprojf.lo \
-@USE_LIBTOOL_TRUE@s_ctanhf.lo s_cexp.lo s_clogf.lo s_csqrt.lo \
-@USE_LIBTOOL_TRUE@s_catan.lo s_ccos.lo s_cexpf.lo s_csin.lo s_csqrtf.lo \
-@USE_LIBTOOL_TRUE@s_casin.lo s_catanf.lo s_ccosf.lo s_cpow.lo \
-@USE_LIBTOOL_TRUE@s_csinf.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DATA = $(noinst_DATA)
-
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES) $(libcmath_la_SOURCES)
-OBJECTS = $(lib_a_OBJECTS) $(libcmath_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/../../../../Makefile.shared
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus cmath/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-mostlyclean-noinstLTLIBRARIES:
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-libcmath.la: $(libcmath_la_OBJECTS) $(libcmath_la_DEPENDENCIES)
- $(LINK) $(libcmath_la_LDFLAGS) $(libcmath_la_OBJECTS) $(libcmath_la_LIBADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = cmath
-
-distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-noinstLTLIBRARIES \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-libtool \
- clean-noinstLTLIBRARIES clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-libtool distclean-noinstLTLIBRARIES \
- distclean-tags distclean-generic clean-am
- -rm -f libtool
-
-distclean: distclean-am
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool mostlyclean-noinstLTLIBRARIES \
-distclean-noinstLTLIBRARIES clean-noinstLTLIBRARIES \
-maintainer-clean-noinstLTLIBRARIES tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-objectlist.awk.in: $(noinst_LTLIBRARIES)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
- do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
- done
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/linux/cmath/math_private.h b/newlib/libc/sys/linux/cmath/math_private.h
deleted file mode 100644
index 148376c44..000000000
--- a/newlib/libc/sys/linux/cmath/math_private.h
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-/*
- * from: @(#)fdlibm.h 5.1 93/09/24
- * $Id$
- */
-
-#ifndef _MATH_PRIVATE_H_
-#define _MATH_PRIVATE_H_
-
-#include <endian.h>
-#include <sys/types.h>
-#include <machine/weakalias.h>
-#include <machine/huge_val.h>
-
-#define INFINITY HUGE_VALF
-
-#define __nan nan
-#define __isnan isnan
-#define __isinf isinf
-#define __copysignf copysignf
-#define __copysign copysign
-#define __isnanf isnanf
-#define __isinff isinff
-#define __nanf nanf
-#define feraiseexcept(x) /* nothing */
-#define __sincos sincos
-#define __sincosf sincosf
-
-int __signbitd (double x);
-int __signbitf (float x);
-
-/* The original fdlibm code used statements like:
- n0 = ((*(int*)&one)>>29)^1; * index of high word *
- ix0 = *(n0+(int*)&x); * high word of x *
- ix1 = *((1-n0)+(int*)&x); * low word of x *
- to dig two 32 bit words out of the 64 bit IEEE floating point
- value. That is non-ANSI, and, moreover, the gcc instruction
- scheduler gets it wrong. We instead use the following macros.
- Unlike the original code, we determine the endianness at compile
- time, not at run time; I don't see much benefit to selecting
- endianness at run time. */
-
-/* A union which permits us to convert between a double and two 32 bit
- ints. */
-
-#if __FLOAT_WORD_ORDER == BIG_ENDIAN
-
-typedef union
-{
- double value;
- struct
- {
- u_int32_t msw;
- u_int32_t lsw;
- } parts;
-} ieee_double_shape_type;
-
-#endif
-
-#if __FLOAT_WORD_ORDER == LITTLE_ENDIAN
-
-typedef union
-{
- double value;
- struct
- {
- u_int32_t lsw;
- u_int32_t msw;
- } parts;
-} ieee_double_shape_type;
-
-#endif
-
-/* Get two 32 bit ints from a double. */
-
-#define EXTRACT_WORDS(ix0,ix1,d) \
-do { \
- ieee_double_shape_type ew_u; \
- ew_u.value = (d); \
- (ix0) = ew_u.parts.msw; \
- (ix1) = ew_u.parts.lsw; \
-} while (0)
-
-/* Get the more significant 32 bit int from a double. */
-
-#define GET_HIGH_WORD(i,d) \
-do { \
- ieee_double_shape_type gh_u; \
- gh_u.value = (d); \
- (i) = gh_u.parts.msw; \
-} while (0)
-
-/* Get the less significant 32 bit int from a double. */
-
-#define GET_LOW_WORD(i,d) \
-do { \
- ieee_double_shape_type gl_u; \
- gl_u.value = (d); \
- (i) = gl_u.parts.lsw; \
-} while (0)
-
-/* Set a double from two 32 bit ints. */
-
-#define INSERT_WORDS(d,ix0,ix1) \
-do { \
- ieee_double_shape_type iw_u; \
- iw_u.parts.msw = (ix0); \
- iw_u.parts.lsw = (ix1); \
- (d) = iw_u.value; \
-} while (0)
-
-/* Set the more significant 32 bits of a double from an int. */
-
-#define SET_HIGH_WORD(d,v) \
-do { \
- ieee_double_shape_type sh_u; \
- sh_u.value = (d); \
- sh_u.parts.msw = (v); \
- (d) = sh_u.value; \
-} while (0)
-
-/* Set the less significant 32 bits of a double from an int. */
-
-#define SET_LOW_WORD(d,v) \
-do { \
- ieee_double_shape_type sl_u; \
- sl_u.value = (d); \
- sl_u.parts.lsw = (v); \
- (d) = sl_u.value; \
-} while (0)
-
-/* A union which permits us to convert between a float and a 32 bit
- int. */
-
-typedef union
-{
- float value;
- u_int32_t word;
-} ieee_float_shape_type;
-
-/* Get a 32 bit int from a float. */
-
-#define GET_FLOAT_WORD(i,d) \
-do { \
- ieee_float_shape_type gf_u; \
- gf_u.value = (d); \
- (i) = gf_u.word; \
-} while (0)
-
-/* Set a float from a 32 bit int. */
-
-#define SET_FLOAT_WORD(d,i) \
-do { \
- ieee_float_shape_type sf_u; \
- sf_u.word = (i); \
- (d) = sf_u.value; \
-} while (0)
-
-#if 0
-/* ieee style elementary functions */
-extern double __ieee754_sqrt (double);
-extern double __ieee754_acos (double);
-extern double __ieee754_acosh (double);
-extern double __ieee754_log (double);
-extern double __ieee754_atanh (double);
-extern double __ieee754_asin (double);
-extern double __ieee754_atan2 (double,double);
-extern double __ieee754_exp (double);
-extern double __ieee754_exp2 (double);
-extern double __ieee754_exp10 (double);
-extern double __ieee754_cosh (double);
-extern double __ieee754_fmod (double,double);
-extern double __ieee754_pow (double,double);
-extern double __ieee754_lgamma_r (double,int *);
-extern double __ieee754_gamma_r (double,int *);
-extern double __ieee754_lgamma (double);
-extern double __ieee754_gamma (double);
-extern double __ieee754_log10 (double);
-extern double __ieee754_log2 (double);
-extern double __ieee754_sinh (double);
-extern double __ieee754_hypot (double,double);
-extern double __ieee754_j0 (double);
-extern double __ieee754_j1 (double);
-extern double __ieee754_y0 (double);
-extern double __ieee754_y1 (double);
-extern double __ieee754_jn (int,double);
-extern double __ieee754_yn (int,double);
-extern double __ieee754_remainder (double,double);
-extern int32_t __ieee754_rem_pio2 (double,double*);
-extern double __ieee754_scalb (double,double);
-#endif
-
-/* This is necessary because the hardware accelerated version of libm
- does not provide the __ieee754 functions. */
-#define __ieee754_sinh sinh
-#define __ieee754_hypot hypot
-#define __ieee754_hypotf hypotf
-#define __ieee754_logf logf
-#define __ieee754_log10 log10
-#define __ieee754_exp exp
-#define __ieee754_cosh cosh
-#define __ieee754_expf expf
-#define __ieee754_log10f log10f
-#define __ieee754_atan2 atan2
-#define __ieee754_sqrtf sqrtf
-#define __ieee754_sinhf sinhf
-#define __ieee754_log log
-#define __ieee754_sqrt sqrt
-#define __ieee754_coshf coshf
-#define __ieee754_atan2f atan2f
-
-/* fdlibm kernel function */
-extern double __kernel_standard (double,double,int);
-extern double __kernel_sin (double,double,int);
-extern double __kernel_cos (double,double);
-extern double __kernel_tan (double,double,int);
-extern int __kernel_rem_pio2 (double*,double*,int,int,int, const int32_t*);
-
-/* internal functions. */
-extern double __copysign (double x, double __y);
-
-
-/* ieee style elementary float functions */
-extern float __ieee754_sqrtf (float);
-extern float __ieee754_acosf (float);
-extern float __ieee754_acoshf (float);
-extern float __ieee754_logf (float);
-extern float __ieee754_atanhf (float);
-extern float __ieee754_asinf (float);
-extern float __ieee754_atan2f (float,float);
-extern float __ieee754_expf (float);
-extern float __ieee754_exp2f (float);
-extern float __ieee754_exp10f (float);
-extern float __ieee754_coshf (float);
-extern float __ieee754_fmodf (float,float);
-extern float __ieee754_powf (float,float);
-extern float __ieee754_lgammaf_r (float,int *);
-extern float __ieee754_gammaf_r (float,int *);
-extern float __ieee754_lgammaf (float);
-extern float __ieee754_gammaf (float);
-extern float __ieee754_log10f (float);
-extern float __ieee754_log2f (float);
-extern float __ieee754_sinhf (float);
-extern float __ieee754_hypotf (float,float);
-extern float __ieee754_j0f (float);
-extern float __ieee754_j1f (float);
-extern float __ieee754_y0f (float);
-extern float __ieee754_y1f (float);
-extern float __ieee754_jnf (int,float);
-extern float __ieee754_ynf (int,float);
-extern float __ieee754_remainderf (float,float);
-extern int32_t __ieee754_rem_pio2f (float,float*);
-extern float __ieee754_scalbf (float,float);
-
-
-/* float versions of fdlibm kernel functions */
-extern float __kernel_sinf (float,float,int);
-extern float __kernel_cosf (float,float);
-extern float __kernel_tanf (float,float,int);
-extern int __kernel_rem_pio2f (float*,float*,int,int,int, const int32_t*);
-
-
-/* ieee style elementary long double functions */
-extern long double __ieee754_sqrtl (long double);
-extern long double __ieee754_acosl (long double);
-extern long double __ieee754_acoshl (long double);
-extern long double __ieee754_logl (long double);
-extern long double __ieee754_atanhl (long double);
-extern long double __ieee754_asinl (long double);
-extern long double __ieee754_atan2l (long double,long double);
-extern long double __ieee754_expl (long double);
-extern long double __ieee754_exp2l (long double);
-extern long double __ieee754_exp10l (long double);
-extern long double __ieee754_coshl (long double);
-extern long double __ieee754_fmodl (long double,long double);
-extern long double __ieee754_powl (long double,long double);
-extern long double __ieee754_lgammal_r (long double,int *);
-extern long double __ieee754_gammal_r (long double,int *);
-extern long double __ieee754_lgammal (long double);
-extern long double __ieee754_gammal (long double);
-extern long double __ieee754_log10l (long double);
-extern long double __ieee754_log2l (long double);
-extern long double __ieee754_sinhl (long double);
-extern long double __ieee754_hypotl (long double,long double);
-extern long double __ieee754_j0l (long double);
-extern long double __ieee754_j1l (long double);
-extern long double __ieee754_y0l (long double);
-extern long double __ieee754_y1l (long double);
-extern long double __ieee754_jnl (int,long double);
-extern long double __ieee754_ynl (int,long double);
-extern long double __ieee754_remainderl (long double,long double);
-extern int __ieee754_rem_pio2l (long double,long double*);
-extern long double __ieee754_scalbl (long double,long double);
-
-/* long double versions of fdlibm kernel functions */
-extern long double __kernel_sinl (long double,long double,int);
-extern long double __kernel_cosl (long double,long double);
-extern long double __kernel_tanl (long double,long double,int);
-extern void __kernel_sincosl (long double,long double,
- long double *,long double *, int);
-extern int __kernel_rem_pio2l (long double*,long double*,int,int,
- int,const int*);
-
-#ifndef NO_LONG_DOUBLE
-/* prototypes required to compile the ldbl-96 support without warnings */
-extern int __finitel (long double);
-extern int __ilogbl (long double);
-extern int __isinfl (long double);
-extern int __isnanl (long double);
-extern long double __atanl (long double);
-extern long double __copysignl (long double, long double);
-extern long double __expm1l (long double);
-extern long double __floorl (long double);
-extern long double __frexpl (long double, int *);
-extern long double __ldexpl (long double, int);
-extern long double __log1pl (long double);
-extern long double __nanl (const char *);
-extern long double __rintl (long double);
-extern long double __scalbnl (long double, int);
-extern long double __sqrtl (long double x);
-extern long double fabsl (long double x);
-extern void __sincosl (long double, long double *, long double *);
-extern long double __logbl (long double x);
-extern long double __significandl (long double x);
-#endif
-
-/* Prototypes for functions of the IBM Accurate Mathematical Library. */
-extern double __exp1 (double __x, double __xx, double __error);
-extern double __sin (double __x);
-extern double __cos (double __x);
-extern int __branred (double __x, double *__a, double *__aa);
-extern void __doasin (double __x, double __dx, double __v[]);
-extern void __dubsin (double __x, double __dx, double __v[]);
-extern void __dubcos (double __x, double __dx, double __v[]);
-extern double __halfulp (double __x, double __y);
-extern double __sin32 (double __x, double __res, double __res1);
-extern double __cos32 (double __x, double __res, double __res1);
-extern double __mpsin (double __x, double __dx);
-extern double __mpcos (double __x, double __dx);
-extern double __mpsin1 (double __x);
-extern double __mpcos1 (double __x);
-extern double __slowexp (double __x);
-extern double __slowpow (double __x, double __y, double __z);
-extern void __docos (double __x, double __dx, double __v[]);
-
-#endif /* _MATH_PRIVATE_H_ */
diff --git a/newlib/libc/sys/linux/cmath/s_cacos.c b/newlib/libc/sys/linux/cmath/s_cacos.c
deleted file mode 100644
index f9864472b..000000000
--- a/newlib/libc/sys/linux/cmath/s_cacos.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Return cosine of complex double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ double
-__cacos (__complex__ double x)
-{
- __complex__ double y;
- __complex__ double res;
-
- y = __casin (x);
-
- __real__ res = (double) M_PI_2 - __real__ y;
- __imag__ res = -__imag__ y;
-
- return res;
-}
-weak_alias (__cacos, cacos)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cacos, __cacosl)
-weak_alias (__cacos, cacosl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_cacosf.c b/newlib/libc/sys/linux/cmath/s_cacosf.c
deleted file mode 100644
index bf01890ad..000000000
--- a/newlib/libc/sys/linux/cmath/s_cacosf.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Return cosine of complex float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ float
-__cacosf (__complex__ float x)
-{
- __complex__ float y;
- __complex__ float res;
-
- y = __casinf (x);
-
- __real__ res = (float) M_PI_2 - __real__ y;
- __imag__ res = -__imag__ y;
-
- return res;
-}
-weak_alias (__cacosf, cacosf)
diff --git a/newlib/libc/sys/linux/cmath/s_cacosh.c b/newlib/libc/sys/linux/cmath/s_cacosh.c
deleted file mode 100644
index 6ca3426b5..000000000
--- a/newlib/libc/sys/linux/cmath/s_cacosh.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* Return arc hyperbole cosine for double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ double
-__cacosh (__complex__ double x)
-{
- __complex__ double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = HUGE_VAL;
-
- if (rcls == FP_NAN)
- __imag__ res = __nan ("");
- else
- __imag__ res = __copysign ((rcls == FP_INFINITE
- ? (__real__ x < 0.0
- ? M_PI - M_PI_4 : M_PI_4)
- : M_PI_2), __imag__ x);
- }
- else if (rcls == FP_INFINITE)
- {
- __real__ res = HUGE_VAL;
-
- if (icls >= FP_ZERO)
- __imag__ res = __copysign (signbit (__real__ x) ? M_PI : 0.0,
- __imag__ x);
- else
- __imag__ res = __nan ("");
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- __real__ res = 0.0;
- __imag__ res = __copysign (M_PI_2, __imag__ x);
- }
- else
- {
- __complex__ double y;
-
- __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) - 1.0;
- __imag__ y = 2.0 * __real__ x * __imag__ x;
-
- y = __csqrt (y);
-
- __real__ y += __real__ x;
- __imag__ y += __imag__ x;
-
- res = __clog (y);
- }
-
- return res;
-}
-weak_alias (__cacosh, cacosh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cacosh, __cacoshl)
-weak_alias (__cacosh, cacoshl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_cacoshf.c b/newlib/libc/sys/linux/cmath/s_cacoshf.c
deleted file mode 100644
index 69054cde3..000000000
--- a/newlib/libc/sys/linux/cmath/s_cacoshf.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/* Return arc hyperbole cosine for float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ float
-__cacoshf (__complex__ float x)
-{
- __complex__ float res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = HUGE_VALF;
-
- if (rcls == FP_NAN)
- __imag__ res = __nanf ("");
- else
- __imag__ res = __copysignf ((rcls == FP_INFINITE
- ? (__real__ x < 0.0
- ? M_PI - M_PI_4 : M_PI_4)
- : M_PI_2), __imag__ x);
- }
- else if (rcls == FP_INFINITE)
- {
- __real__ res = HUGE_VALF;
-
- if (icls >= FP_ZERO)
- __imag__ res = __copysignf (signbit (__real__ x) ? M_PI : 0.0,
- __imag__ x);
- else
- __imag__ res = __nanf ("");
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- __real__ res = 0.0;
- __imag__ res = __copysignf (M_PI_2, __imag__ x);
- }
- else
- {
-#if 1
- __complex__ float y;
-
- __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) - 1.0;
- __imag__ y = 2.0 * __real__ x * __imag__ x;
-
- y = __csqrtf (y);
-
- __real__ y += __real__ x;
- __imag__ y += __imag__ x;
-
- res = __clogf (y);
-#else
- float re2 = __real__ x * __real__ x;
- float im2 = __imag__ x * __imag__ x;
- float sq = re2 - im2 - 1.0;
- float ro = __ieee754_sqrtf (sq * sq + 4 * re2 * im2);
- float a = __ieee754_sqrtf ((sq + ro) / 2.0);
- float b = __ieee754_sqrtf ((-sq + ro) / 2.0);
-
- __real__ res = 0.5 * __ieee754_logf (re2 + __real__ x * 2 * a
- + im2 + __imag__ x * 2 * b
- + ro);
- __imag__ res = __ieee754_atan2f (__imag__ x + b, __real__ x + a);
-#endif
- }
-
- return res;
-}
-weak_alias (__cacoshf, cacoshf)
diff --git a/newlib/libc/sys/linux/cmath/s_cacoshl.c b/newlib/libc/sys/linux/cmath/s_cacoshl.c
deleted file mode 100644
index 3d0cd7f2a..000000000
--- a/newlib/libc/sys/linux/cmath/s_cacoshl.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Return arc hyperbole cosine for long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ long double
-__cacoshl (__complex__ long double x)
-{
- __complex__ long double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = HUGE_VALL;
-
- if (rcls == FP_NAN)
- __imag__ res = __nanl ("");
- else
- __imag__ res = __copysignl ((rcls == FP_INFINITE
- ? (__real__ x < 0.0
- ? M_PIl - M_PI_4l : M_PI_4l)
- : M_PI_2l), __imag__ x);
- }
- else if (rcls == FP_INFINITE)
- {
- __real__ res = HUGE_VALL;
-
- if (icls >= FP_ZERO)
- __imag__ res = __copysignl (signbit (__real__ x) ? M_PIl : 0.0,
- __imag__ x);
- else
- __imag__ res = __nanl ("");
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- __real__ res = 0.0;
- __imag__ res = __copysignl (M_PI_2l, __imag__ x);
- }
- else
- {
- __complex__ long double y;
-
- __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) - 1.0;
- __imag__ y = 2.0 * __real__ x * __imag__ x;
-
- y = __csqrtl (y);
-
- __real__ y += __real__ x;
- __imag__ y += __imag__ x;
-
- res = __clogl (y);
- }
-
- return res;
-}
-weak_alias (__cacoshl, cacoshl)
diff --git a/newlib/libc/sys/linux/cmath/s_cacosl.c b/newlib/libc/sys/linux/cmath/s_cacosl.c
deleted file mode 100644
index d4bbfec87..000000000
--- a/newlib/libc/sys/linux/cmath/s_cacosl.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Return cosine of complex long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ long double
-__cacosl (__complex__ long double x)
-{
- __complex__ long double y;
- __complex__ long double res;
-
- y = __casinl (x);
-
- __real__ res = M_PI_2l - __real__ y;
- __imag__ res = -__imag__ y;
-
- return res;
-}
-weak_alias (__cacosl, cacosl)
diff --git a/newlib/libc/sys/linux/cmath/s_casin.c b/newlib/libc/sys/linux/cmath/s_casin.c
deleted file mode 100644
index 4c164b534..000000000
--- a/newlib/libc/sys/linux/cmath/s_casin.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Return arc sine of complex double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ double
-__casin (__complex__ double x)
-{
- __complex__ double res;
-
- if (isnan (__real__ x) || isnan (__imag__ x))
- {
- if (__real__ x == 0.0)
- {
- res = x;
- }
- else if (__isinf (__real__ x) || __isinf (__imag__ x))
- {
- __real__ res = __nan ("");
- __imag__ res = __copysign (HUGE_VAL, __imag__ x);
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
- }
- }
- else
- {
- __complex__ double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- y = __casinh (y);
-
- __real__ res = __imag__ y;
- __imag__ res = -__real__ y;
- }
-
- return res;
-}
-weak_alias (__casin, casin)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__casin, __casinl)
-weak_alias (__casin, casinl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_casinf.c b/newlib/libc/sys/linux/cmath/s_casinf.c
deleted file mode 100644
index 09e52b400..000000000
--- a/newlib/libc/sys/linux/cmath/s_casinf.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Return arc sine of complex float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-
-__complex__ float
-__casinf (__complex__ float x)
-{
- __complex__ float res;
-
- if (isnan (__real__ x) || isnan (__imag__ x))
- {
- if (__real__ x == 0.0)
- {
- res = x;
- }
- else if (__isinff (__real__ x) || __isinff (__imag__ x))
- {
- __real__ res = __nanf ("");
- __imag__ res = __copysignf (HUGE_VALF, __imag__ x);
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
- }
- }
- else
- {
- __complex__ float y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- y = __casinhf (y);
-
- __real__ res = __imag__ y;
- __imag__ res = -__real__ y;
- }
-
- return res;
-}
-weak_alias (__casinf, casinf)
diff --git a/newlib/libc/sys/linux/cmath/s_casinh.c b/newlib/libc/sys/linux/cmath/s_casinh.c
deleted file mode 100644
index 30b9dbb18..000000000
--- a/newlib/libc/sys/linux/cmath/s_casinh.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Return arc hyperbole sine for double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ double
-__casinh (__complex__ double x)
-{
- __complex__ double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = __copysign (HUGE_VAL, __real__ x);
-
- if (rcls == FP_NAN)
- __imag__ res = __nan ("");
- else
- __imag__ res = __copysign (rcls >= FP_ZERO ? M_PI_2 : M_PI_4,
- __imag__ x);
- }
- else if (rcls <= FP_INFINITE)
- {
- __real__ res = __real__ x;
- if ((rcls == FP_INFINITE && icls >= FP_ZERO)
- || (rcls == FP_NAN && icls == FP_ZERO))
- __imag__ res = __copysign (0.0, __imag__ x);
- else
- __imag__ res = __nan ("");
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- __complex__ double y;
-
- __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) + 1.0;
- __imag__ y = 2.0 * __real__ x * __imag__ x;
-
- y = __csqrt (y);
-
- __real__ y += __real__ x;
- __imag__ y += __imag__ x;
-
- res = __clog (y);
- }
-
- return res;
-}
-weak_alias (__casinh, casinh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__casinh, __casinhl)
-weak_alias (__casinh, casinhl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_casinhf.c b/newlib/libc/sys/linux/cmath/s_casinhf.c
deleted file mode 100644
index f9fc4e73c..000000000
--- a/newlib/libc/sys/linux/cmath/s_casinhf.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Return arc hyperbole sine for float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ float
-__casinhf (__complex__ float x)
-{
- __complex__ float res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = __copysignf (HUGE_VALF, __real__ x);
-
- if (rcls == FP_NAN)
- __imag__ res = __nanf ("");
- else
- __imag__ res = __copysignf (rcls >= FP_ZERO ? M_PI_2 : M_PI_4,
- __imag__ x);
- }
- else if (rcls <= FP_INFINITE)
- {
- __real__ res = __real__ x;
- if ((rcls == FP_INFINITE && icls >= FP_ZERO)
- || (rcls == FP_NAN && icls == FP_ZERO))
- __imag__ res = __copysignf (0.0, __imag__ x);
- else
- __imag__ res = __nanf ("");
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- __complex__ float y;
-
- __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) + 1.0;
- __imag__ y = 2.0 * __real__ x * __imag__ x;
-
- y = __csqrtf (y);
-
- __real__ y += __real__ x;
- __imag__ y += __imag__ x;
-
- res = __clogf (y);
- }
-
- return res;
-}
-weak_alias (__casinhf, casinhf)
diff --git a/newlib/libc/sys/linux/cmath/s_casinhl.c b/newlib/libc/sys/linux/cmath/s_casinhl.c
deleted file mode 100644
index b48c60932..000000000
--- a/newlib/libc/sys/linux/cmath/s_casinhl.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Return arc hyperbole sine for long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ long double
-__casinhl (__complex__ long double x)
-{
- __complex__ long double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = __copysignl (HUGE_VALL, __real__ x);
-
- if (rcls == FP_NAN)
- __imag__ res = __nanl ("");
- else
- __imag__ res = __copysignl (rcls >= FP_ZERO ? M_PI_2l : M_PI_4l,
- __imag__ x);
- }
- else if (rcls <= FP_INFINITE)
- {
- __real__ res = __real__ x;
- if ((rcls == FP_INFINITE && icls >= FP_ZERO)
- || (rcls == FP_NAN && icls == FP_ZERO))
- __imag__ res = __copysignl (0.0, __imag__ x);
- else
- __imag__ res = __nanl ("");
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- __complex__ long double y;
-
- __real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) + 1.0;
- __imag__ y = 2.0 * __real__ x * __imag__ x;
-
- y = __csqrtl (y);
-
- __real__ y += __real__ x;
- __imag__ y += __imag__ x;
-
- res = __clogl (y);
- }
-
- return res;
-}
-weak_alias (__casinhl, casinhl)
diff --git a/newlib/libc/sys/linux/cmath/s_casinl.c b/newlib/libc/sys/linux/cmath/s_casinl.c
deleted file mode 100644
index d6b7a8087..000000000
--- a/newlib/libc/sys/linux/cmath/s_casinl.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Return arc sine of complex long double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ long double
-__casinl (__complex__ long double x)
-{
- __complex__ long double res;
-
- if (isnan (__real__ x) || isnan (__imag__ x))
- {
- if (__real__ x == 0.0)
- {
- res = x;
- }
- else if (__isinfl (__real__ x) || __isinfl (__imag__ x))
- {
- __real__ res = __nanl ("");
- __imag__ res = __copysignl (HUGE_VALL, __imag__ x);
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
- }
- }
- else
- {
- __complex__ long double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- y = __casinhl (y);
-
- __real__ res = __imag__ y;
- __imag__ res = -__real__ y;
- }
-
- return res;
-}
-weak_alias (__casinl, casinl)
diff --git a/newlib/libc/sys/linux/cmath/s_catan.c b/newlib/libc/sys/linux/cmath/s_catan.c
deleted file mode 100644
index 1d0673ad6..000000000
--- a/newlib/libc/sys/linux/cmath/s_catan.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Return arc tangent of complex double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__catan (__complex__ double x)
-{
- __complex__ double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (rcls == FP_INFINITE)
- {
- __real__ res = __copysign (M_PI_2, __real__ x);
- __imag__ res = __copysign (0.0, __imag__ x);
- }
- else if (icls == FP_INFINITE)
- {
- if (rcls >= FP_ZERO)
- __real__ res = __copysign (M_PI_2, __real__ x);
- else
- __real__ res = __nan ("");
- __imag__ res = __copysign (0.0, __imag__ x);
- }
- else if (icls == FP_ZERO || icls == FP_INFINITE)
- {
- __real__ res = __nan ("");
- __imag__ res = __copysign (0.0, __imag__ x);
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- double r2, num, den;
-
- r2 = __real__ x * __real__ x;
-
- den = 1 - r2 - __imag__ x * __imag__ x;
-
- __real__ res = 0.5 * __ieee754_atan2 (2.0 * __real__ x, den);
-
- num = __imag__ x + 1.0;
- num = r2 + num * num;
-
- den = __imag__ x - 1.0;
- den = r2 + den * den;
-
- __imag__ res = 0.25 * __ieee754_log (num / den);
- }
-
- return res;
-}
-weak_alias (__catan, catan)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__catan, __catanl)
-weak_alias (__catan, catanl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_catanf.c b/newlib/libc/sys/linux/cmath/s_catanf.c
deleted file mode 100644
index cc9e5ea7a..000000000
--- a/newlib/libc/sys/linux/cmath/s_catanf.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Return arc tangent of complex float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__catanf (__complex__ float x)
-{
- __complex__ float res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (rcls == FP_INFINITE)
- {
- __real__ res = __copysignf (M_PI_2, __real__ x);
- __imag__ res = __copysignf (0.0, __imag__ x);
- }
- else if (icls == FP_INFINITE)
- {
- if (rcls >= FP_ZERO)
- __real__ res = __copysignf (M_PI_2, __real__ x);
- else
- __real__ res = __nanf ("");
- __imag__ res = __copysignf (0.0, __imag__ x);
- }
- else if (icls == FP_ZERO || icls == FP_INFINITE)
- {
- __real__ res = __nanf ("");
- __imag__ res = __copysignf (0.0, __imag__ x);
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- float r2, num, den;
-
- r2 = __real__ x * __real__ x;
-
- den = 1 - r2 - __imag__ x * __imag__ x;
-
- __real__ res = 0.5 * __ieee754_atan2f (2.0 * __real__ x, den);
-
- num = __imag__ x + 1.0;
- num = r2 + num * num;
-
- den = __imag__ x - 1.0;
- den = r2 + den * den;
-
- __imag__ res = 0.25 * __ieee754_logf (num / den);
- }
-
- return res;
-}
-weak_alias (__catanf, catanf)
diff --git a/newlib/libc/sys/linux/cmath/s_catanh.c b/newlib/libc/sys/linux/cmath/s_catanh.c
deleted file mode 100644
index e15c073f9..000000000
--- a/newlib/libc/sys/linux/cmath/s_catanh.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Return arc hyperbole tangent for double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__catanh (__complex__ double x)
-{
- __complex__ double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = __copysign (0.0, __real__ x);
- __imag__ res = __copysign (M_PI_2, __imag__ x);
- }
- else if (rcls == FP_INFINITE || rcls == FP_ZERO)
- {
- __real__ res = __copysign (0.0, __real__ x);
- if (icls >= FP_ZERO)
- __imag__ res = __copysign (M_PI_2, __imag__ x);
- else
- __imag__ res = __nan ("");
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- double i2, num, den;
-
- i2 = __imag__ x * __imag__ x;
-
- num = 1.0 + __real__ x;
- num = i2 + num * num;
-
- den = 1.0 - __real__ x;
- den = i2 + den * den;
-
- __real__ res = 0.25 * (__ieee754_log (num) - __ieee754_log (den));
-
- den = 1 - __real__ x * __real__ x - i2;
-
- __imag__ res = 0.5 * __ieee754_atan2 (2.0 * __imag__ x, den);
- }
-
- return res;
-}
-weak_alias (__catanh, catanh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__catanh, __catanhl)
-weak_alias (__catanh, catanhl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_catanhf.c b/newlib/libc/sys/linux/cmath/s_catanhf.c
deleted file mode 100644
index 30a5a1b8a..000000000
--- a/newlib/libc/sys/linux/cmath/s_catanhf.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Return arc hyperbole tangent for float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__catanhf (__complex__ float x)
-{
- __complex__ float res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = __copysignf (0.0, __real__ x);
- __imag__ res = __copysignf (M_PI_2, __imag__ x);
- }
- else if (rcls == FP_INFINITE || rcls == FP_ZERO)
- {
- __real__ res = __copysignf (0.0, __real__ x);
- if (icls >= FP_ZERO)
- __imag__ res = __copysignf (M_PI_2, __imag__ x);
- else
- __imag__ res = __nanf ("");
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- float i2, num, den;
-
- i2 = __imag__ x * __imag__ x;
-
- num = 1.0 + __real__ x;
- num = i2 + num * num;
-
- den = 1.0 - __real__ x;
- den = i2 + den * den;
-
- __real__ res = 0.25 * (__ieee754_logf (num) - __ieee754_logf (den));
-
- den = 1 - __real__ x * __real__ x - i2;
-
- __imag__ res = 0.5 * __ieee754_atan2f (2.0 * __imag__ x, den);
- }
-
- return res;
-}
-weak_alias (__catanhf, catanhf)
diff --git a/newlib/libc/sys/linux/cmath/s_catanhl.c b/newlib/libc/sys/linux/cmath/s_catanhl.c
deleted file mode 100644
index c3fb0ce5f..000000000
--- a/newlib/libc/sys/linux/cmath/s_catanhl.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Return arc hyperbole tangent for long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__catanhl (__complex__ long double x)
-{
- __complex__ long double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = __copysignl (0.0, __real__ x);
- __imag__ res = __copysignl (M_PI_2l, __imag__ x);
- }
- else if (rcls == FP_INFINITE || rcls == FP_ZERO)
- {
- __real__ res = __copysignl (0.0, __real__ x);
- if (icls >= FP_ZERO)
- __imag__ res = __copysignl (M_PI_2l, __imag__ x);
- else
- __imag__ res = __nanl ("");
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- long double i2, num, den;
-
- i2 = __imag__ x * __imag__ x;
-
- num = 1.0 + __real__ x;
- num = i2 + num * num;
-
- den = 1.0 - __real__ x;
- den = i2 + den * den;
-
- __real__ res = 0.25 * (__ieee754_logl (num) - __ieee754_logl (den));
-
- den = 1 - __real__ x * __real__ x - i2;
-
- __imag__ res = 0.5 * __ieee754_atan2l (2.0 * __imag__ x, den);
- }
-
- return res;
-}
-weak_alias (__catanhl, catanhl)
diff --git a/newlib/libc/sys/linux/cmath/s_catanl.c b/newlib/libc/sys/linux/cmath/s_catanl.c
deleted file mode 100644
index 6cb45e5be..000000000
--- a/newlib/libc/sys/linux/cmath/s_catanl.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Return arc tangent of complex long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__catanl (__complex__ long double x)
-{
- __complex__ long double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (rcls == FP_INFINITE)
- {
- __real__ res = __copysignl (M_PI_2l, __real__ x);
- __imag__ res = __copysignl (0.0, __imag__ x);
- }
- else if (icls == FP_INFINITE)
- {
- if (rcls >= FP_ZERO)
- __real__ res = __copysignl (M_PI_2l, __real__ x);
- else
- __real__ res = __nanl ("");
- __imag__ res = __copysignl (0.0, __imag__ x);
- }
- else if (icls == FP_ZERO || icls == FP_INFINITE)
- {
- __real__ res = __nanl ("");
- __imag__ res = __copysignl (0.0, __imag__ x);
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
- }
- }
- else if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- res = x;
- }
- else
- {
- long double r2, num, den;
-
- r2 = __real__ x * __real__ x;
-
- den = 1 - r2 - __imag__ x * __imag__ x;
-
- __real__ res = 0.5 * __ieee754_atan2l (2.0 * __real__ x, den);
-
- num = __imag__ x + 1.0;
- num = r2 + num * num;
-
- den = __imag__ x - 1.0;
- den = r2 + den * den;
-
- __imag__ res = 0.25 * __ieee754_logl (num / den);
- }
-
- return res;
-}
-weak_alias (__catanl, catanl)
diff --git a/newlib/libc/sys/linux/cmath/s_cbrtl.c b/newlib/libc/sys/linux/cmath/s_cbrtl.c
deleted file mode 100644
index d668e377a..000000000
--- a/newlib/libc/sys/linux/cmath/s_cbrtl.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <math.h>
-#include <stdio.h>
-#include <errno.h>
-
-long double
-__cbrtl(long double x)
-{
- fputs ("__cbrtl not implemented\n", stderr);
- __set_errno (ENOSYS);
- return 0.0;
-}
-
-weak_alias (__cbrtl, cbrtl)
-stub_warning (cbrtl)
-#include <stub-tag.h>
diff --git a/newlib/libc/sys/linux/cmath/s_ccos.c b/newlib/libc/sys/linux/cmath/s_ccos.c
deleted file mode 100644
index e65ea38a5..000000000
--- a/newlib/libc/sys/linux/cmath/s_ccos.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* Return cosine of complex double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ double
-__ccos (__complex__ double x)
-{
- __complex__ double res;
-
- if (!isfinite (__real__ x) || __isnan (__imag__ x))
- {
- if (__real__ x == 0.0 || __imag__ x == 0.0)
- {
- __real__ res = __nan ("");
- __imag__ res = 0.0;
-
-#ifdef FE_INVALID
- if (__isinf (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else if (__isinf (__imag__ x))
- {
- __real__ res = HUGE_VAL;
- __imag__ res = __nan ("");
-
-#ifdef FE_INVALID
- if (__isinf (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
-
-#ifdef FE_INVALID
- if (isfinite (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __complex__ double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- res = __ccosh (y);
- }
-
- return res;
-}
-weak_alias (__ccos, ccos)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__ccos, __ccosl)
-weak_alias (__ccos, ccosl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_ccosf.c b/newlib/libc/sys/linux/cmath/s_ccosf.c
deleted file mode 100644
index 016d8062b..000000000
--- a/newlib/libc/sys/linux/cmath/s_ccosf.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Return cosine of complex float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ float
-__ccosf (__complex__ float x)
-{
- __complex__ float res;
-
- if (!isfinite (__real__ x) || __isnanf (__imag__ x))
- {
- if (__real__ x == 0.0 || __imag__ x == 0.0)
- {
- __real__ res = __nanf ("");
- __imag__ res = 0.0;
-
-#ifdef FE_INVALID
- if (__isinff (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else if (__isinff (__imag__ x))
- {
- __real__ res = HUGE_VALF;
- __imag__ res = __nanf ("");
-
-#ifdef FE_INVALID
- if (__isinff (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
-
-#ifdef FE_INVALID
- if (isfinite (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __complex__ float y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- res = __ccoshf (y);
- }
-
- return res;
-}
-weak_alias (__ccosf, ccosf)
diff --git a/newlib/libc/sys/linux/cmath/s_ccosh.c b/newlib/libc/sys/linux/cmath/s_ccosh.c
deleted file mode 100644
index f5b29db24..000000000
--- a/newlib/libc/sys/linux/cmath/s_ccosh.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Complex cosine hyperbole function for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__ccosh (__complex__ double x)
-{
- __complex__ double retval;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- double sinh_val = __ieee754_sinh (__real__ x);
- double cosh_val = __ieee754_cosh (__real__ x);
- double sinix, cosix;
-
- __sincos (__imag__ x, &sinix, &cosix);
-
- __real__ retval = cosh_val * cosix;
- __imag__ retval = sinh_val * sinix;
- }
- else
- {
- __imag__ retval = __real__ x == 0.0 ? 0.0 : __nan ("");
- __real__ retval = __nan ("") + __nan ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VAL;
- __imag__ retval = __imag__ x * __copysign (1.0, __real__ x);
- }
- else if (icls > FP_ZERO)
- {
- /* Imaginary part is finite. */
- double sinix, cosix;
-
- __sincos (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysign (HUGE_VAL, cosix);
- __imag__ retval = (__copysign (HUGE_VAL, sinix)
- * __copysign (1.0, __real__ x));
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VAL;
- __imag__ retval = __nan ("") + __nan ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __real__ retval = __nan ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nan ("");
- }
-
- return retval;
-}
-weak_alias (__ccosh, ccosh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__ccosh, __ccoshl)
-weak_alias (__ccosh, ccoshl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_ccoshf.c b/newlib/libc/sys/linux/cmath/s_ccoshf.c
deleted file mode 100644
index 339b6bc1c..000000000
--- a/newlib/libc/sys/linux/cmath/s_ccoshf.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/* Complex cosine hyperbole function for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__ccoshf (__complex__ float x)
-{
- __complex__ float retval;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- float sinh_val = __ieee754_sinhf (__real__ x);
- float cosh_val = __ieee754_coshf (__real__ x);
- float sinix, cosix;
-
- __sincosf (__imag__ x, &sinix, &cosix);
-
- __real__ retval = cosh_val * cosix;
- __imag__ retval = sinh_val * sinix;
- }
- else
- {
- __imag__ retval = __real__ x == 0.0 ? 0.0 : __nanf ("");
- __real__ retval = __nanf ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VALF;
- __imag__ retval = __imag__ x * __copysignf (1.0, __real__ x);
- }
- else if (icls > FP_ZERO)
- {
- /* Imaginary part is finite. */
- float sinix, cosix;
-
- __sincosf (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysignf (HUGE_VALF, cosix);
- __imag__ retval = (__copysignf (HUGE_VALF, sinix)
- * __copysignf (1.0, __real__ x));
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VALF;
- __imag__ retval = __nanf ("") + __nanf ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __real__ retval = __nanf ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nanf ("");
- }
-
- return retval;
-}
-weak_alias (__ccoshf, ccoshf)
diff --git a/newlib/libc/sys/linux/cmath/s_ccoshl.c b/newlib/libc/sys/linux/cmath/s_ccoshl.c
deleted file mode 100644
index 61ffb49ca..000000000
--- a/newlib/libc/sys/linux/cmath/s_ccoshl.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/* Complex cosine hyperbole function for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__ccoshl (__complex__ long double x)
-{
- __complex__ long double retval;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- long double sinh_val = __ieee754_sinhl (__real__ x);
- long double cosh_val = __ieee754_coshl (__real__ x);
- long double sinix, cosix;
-
- __sincosl (__imag__ x, &sinix, &cosix);
-
- __real__ retval = cosh_val * cosix;
- __imag__ retval = sinh_val * sinix;
- }
- else
- {
- __imag__ retval = __real__ x == 0.0 ? 0.0 : __nanl ("");
- __real__ retval = __nanl ("") + __nanl ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VALL;
- __imag__ retval = __imag__ x * __copysignl (1.0, __real__ x);
- }
- else if (icls > FP_ZERO)
- {
- /* Imaginary part is finite. */
- long double sinix, cosix;
-
- __sincosl (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysignl (HUGE_VALL, cosix);
- __imag__ retval = (__copysignl (HUGE_VALL, sinix)
- * __copysignl (1.0, __real__ x));
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VALL;
- __imag__ retval = __nanl ("") + __nanl ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __real__ retval = __nanl ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nanl ("");
- }
-
- return retval;
-}
-weak_alias (__ccoshl, ccoshl)
diff --git a/newlib/libc/sys/linux/cmath/s_ccosl.c b/newlib/libc/sys/linux/cmath/s_ccosl.c
deleted file mode 100644
index 4ebe2c347..000000000
--- a/newlib/libc/sys/linux/cmath/s_ccosl.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Return cosine of complex long double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-
-__complex__ long double
-__ccosl (__complex__ long double x)
-{
- __complex__ long double res;
-
- if (!isfinite (__real__ x) || __isnanl (__imag__ x))
- {
- if (__real__ x == 0.0 || __imag__ x == 0.0)
- {
- __real__ res = __nanl ("");
- __imag__ res = 0.0;
-
-#ifdef FE_INVALID
- if (__isinfl (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else if (__isinfl (__imag__ x))
- {
- __real__ res = HUGE_VALL;
- __imag__ res = __nanl ("");
-
-#ifdef FE_INVALID
- if (__isinfl (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
-
-#ifdef FE_INVALID
- if (isfinite (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __complex__ long double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- res = __ccoshl (y);
- }
-
- return res;
-}
-weak_alias (__ccosl, ccosl)
diff --git a/newlib/libc/sys/linux/cmath/s_cexp.c b/newlib/libc/sys/linux/cmath/s_cexp.c
deleted file mode 100644
index 5a299b768..000000000
--- a/newlib/libc/sys/linux/cmath/s_cexp.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Return value of complex exponential function for double complex value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__cexp (__complex__ double x)
-{
- __complex__ double retval;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- double exp_val = __ieee754_exp (__real__ x);
- double sinix, cosix;
-
- __sincos (__imag__ x, &sinix, &cosix);
-
- if (isfinite (exp_val))
- {
- __real__ retval = exp_val * cosix;
- __imag__ retval = exp_val * sinix;
- }
- else
- {
- __real__ retval = __copysign (exp_val, cosix);
- __imag__ retval = __copysign (exp_val, sinix);
- }
- }
- else
- {
- /* If the imaginary part is +-inf or NaN and the real part
- is not +-inf the result is NaN + iNaN. */
- __real__ retval = __nan ("");
- __imag__ retval = __nan ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- double value = signbit (__real__ x) ? 0.0 : HUGE_VAL;
-
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = value;
- __imag__ retval = __imag__ x;
- }
- else
- {
- double sinix, cosix;
-
- __sincos (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysign (value, cosix);
- __imag__ retval = __copysign (value, sinix);
- }
- }
- else if (signbit (__real__ x) == 0)
- {
- __real__ retval = HUGE_VAL;
- __imag__ retval = __nan ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = 0.0;
- __imag__ retval = __copysign (0.0, __imag__ x);
- }
- }
- else
- {
- /* If the real part is NaN the result is NaN + iNaN. */
- __real__ retval = __nan ("");
- __imag__ retval = __nan ("");
-
-#ifdef FE_INVALID
- if (rcls != FP_NAN || icls != FP_NAN)
- feraiseexcept (FE_INVALID);
-#endif
- }
-
- return retval;
-}
-weak_alias (__cexp, cexp)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cexp, __cexpl)
-weak_alias (__cexp, cexpl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_cexpf.c b/newlib/libc/sys/linux/cmath/s_cexpf.c
deleted file mode 100644
index 93bfe2049..000000000
--- a/newlib/libc/sys/linux/cmath/s_cexpf.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/* Return value of complex exponential function for float complex value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__cexpf (__complex__ float x)
-{
- __complex__ float retval;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- float exp_val = __ieee754_expf (__real__ x);
- float sinix, cosix;
-
- __sincosf (__imag__ x, &sinix, &cosix);
-
- if (isfinite (exp_val))
- {
- __real__ retval = exp_val * cosix;
- __imag__ retval = exp_val * sinix;
- }
- else
- {
- __real__ retval = __copysignf (exp_val, cosix);
- __imag__ retval = __copysignf (exp_val, sinix);
- }
- }
- else
- {
- /* If the imaginary part is +-inf or NaN and the real part
- is not +-inf the result is NaN + iNaN. */
- __real__ retval = __nanf ("");
- __imag__ retval = __nanf ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- float value = signbit (__real__ x) ? 0.0 : HUGE_VALF;
-
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = value;
- __imag__ retval = __imag__ x;
- }
- else
- {
- float sinix, cosix;
-
- __sincosf (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysignf (value, cosix);
- __imag__ retval = __copysignf (value, sinix);
- }
- }
- else if (signbit (__real__ x) == 0)
- {
- __real__ retval = HUGE_VALF;
- __imag__ retval = __nanf ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = 0.0;
- __imag__ retval = __copysignf (0.0, __imag__ x);
- }
- }
- else
- {
- /* If the real part is NaN the result is NaN + iNaN. */
- __real__ retval = __nanf ("");
- __imag__ retval = __nanf ("");
-
-#ifdef FE_INVALID
- if (rcls != FP_NAN || icls != FP_NAN)
- feraiseexcept (FE_INVALID);
-#endif
- }
-
- return retval;
-}
-weak_alias (__cexpf, cexpf)
diff --git a/newlib/libc/sys/linux/cmath/s_cexpl.c b/newlib/libc/sys/linux/cmath/s_cexpl.c
deleted file mode 100644
index cf6bc974a..000000000
--- a/newlib/libc/sys/linux/cmath/s_cexpl.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/* Return value of complex exponential function for long double complex value.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__cexpl (__complex__ long double x)
-{
- __complex__ long double retval;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- long double exp_val = __ieee754_expl (__real__ x);
- long double sinix, cosix;
-
- __sincosl (__imag__ x, &sinix, &cosix);
-
- if (isfinite (exp_val))
- {
- __real__ retval = exp_val * cosix;
- __imag__ retval = exp_val * sinix;
- }
- else
- {
- __real__ retval = __copysignl (exp_val, cosix);
- __imag__ retval = __copysignl (exp_val, sinix);
- }
- }
- else
- {
- /* If the imaginary part is +-inf or NaN and the real part
- is not +-inf the result is NaN + iNaN. */
- __real__ retval = __nanl ("");
- __imag__ retval = __nanl ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- long double value = signbit (__real__ x) ? 0.0 : HUGE_VALL;
-
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = value;
- __imag__ retval = __imag__ x;
- }
- else
- {
- long double sinix, cosix;
-
- __sincosl (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysignl (value, cosix);
- __imag__ retval = __copysignl (value, sinix);
- }
- }
- else if (signbit (__real__ x) == 0)
- {
- __real__ retval = HUGE_VALL;
- __imag__ retval = __nanl ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = 0.0;
- __imag__ retval = __copysignl (0.0, __imag__ x);
- }
- }
- else
- {
- /* If the real part is NaN the result is NaN + iNaN. */
- __real__ retval = __nanl ("");
- __imag__ retval = __nanl ("");
-
-#ifdef FE_INVALID
- if (rcls != FP_NAN || icls != FP_NAN)
- feraiseexcept (FE_INVALID);
-#endif
- }
-
- return retval;
-}
-weak_alias (__cexpl, cexpl)
diff --git a/newlib/libc/sys/linux/cmath/s_clog.c b/newlib/libc/sys/linux/cmath/s_clog.c
deleted file mode 100644
index f796024b4..000000000
--- a/newlib/libc/sys/linux/cmath/s_clog.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Compute complex natural logarithm.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__clog (__complex__ double x)
-{
- __complex__ double result;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- /* Real and imaginary part are 0.0. */
- __imag__ result = signbit (__real__ x) ? M_PI : 0.0;
- __imag__ result = __copysign (__imag__ result, __imag__ x);
- /* Yes, the following line raises an exception. */
- __real__ result = -1.0 / fabs (__real__ x);
- }
- else if (rcls != FP_NAN && icls != FP_NAN)
- {
- /* Neither real nor imaginary part is NaN. */
- __real__ result = __ieee754_log (__ieee754_hypot (__real__ x,
- __imag__ x));
- __imag__ result = __ieee754_atan2 (__imag__ x, __real__ x);
- }
- else
- {
- __imag__ result = __nan ("");
- if (rcls == FP_INFINITE || icls == FP_INFINITE)
- /* Real or imaginary part is infinite. */
- __real__ result = HUGE_VAL;
- else
- __real__ result = __nan ("");
- }
-
- return result;
-}
-weak_alias (__clog, clog)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__clog, __clogl)
-weak_alias (__clog, clogl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_clog10.c b/newlib/libc/sys/linux/cmath/s_clog10.c
deleted file mode 100644
index 62c2ca724..000000000
--- a/newlib/libc/sys/linux/cmath/s_clog10.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Compute complex base 10 logarithm.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__clog10 (__complex__ double x)
-{
- __complex__ double result;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- /* Real and imaginary part are 0.0. */
- __imag__ result = signbit (__real__ x) ? M_PI : 0.0;
- __imag__ result = __copysign (__imag__ result, __imag__ x);
- /* Yes, the following line raises an exception. */
- __real__ result = -1.0 / fabs (__real__ x);
- }
- else if (rcls != FP_NAN && icls != FP_NAN)
- {
- /* Neither real nor imaginary part is NaN. */
- __real__ result = __ieee754_log10 (__ieee754_hypot (__real__ x,
- __imag__ x));
- __imag__ result = M_LOG10E * __ieee754_atan2 (__imag__ x, __real__ x);
- }
- else
- {
- __imag__ result = __nan ("");
- if (rcls == FP_INFINITE || icls == FP_INFINITE)
- /* Real or imaginary part is infinite. */
- __real__ result = HUGE_VAL;
- else
- __real__ result = __nan ("");
- }
-
- return result;
-}
-weak_alias (__clog10, clog10)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__clog10, __clog10l)
-weak_alias (__clog10, clog10l)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_clog10f.c b/newlib/libc/sys/linux/cmath/s_clog10f.c
deleted file mode 100644
index 6d60c5fc2..000000000
--- a/newlib/libc/sys/linux/cmath/s_clog10f.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Compute complex base 10 logarithm.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__clog10f (__complex__ float x)
-{
- __complex__ float result;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- /* Real and imaginary part are 0.0. */
- __imag__ result = signbit (__real__ x) ? M_PI : 0.0;
- __imag__ result = __copysignf (__imag__ result, __imag__ x);
- /* Yes, the following line raises an exception. */
- __real__ result = -1.0 / fabsf (__real__ x);
- }
- else if (rcls != FP_NAN && icls != FP_NAN)
- {
- /* Neither real nor imaginary part is NaN. */
- __real__ result = __ieee754_log10f (__ieee754_hypotf (__real__ x,
- __imag__ x));
- __imag__ result = M_LOG10E * __ieee754_atan2f (__imag__ x, __real__ x);
- }
- else
- {
- __imag__ result = __nanf ("");
- if (rcls == FP_INFINITE || icls == FP_INFINITE)
- /* Real or imaginary part is infinite. */
- __real__ result = HUGE_VALF;
- else
- __real__ result = __nanf ("");
- }
-
- return result;
-}
-weak_alias (__clog10f, clog10f)
diff --git a/newlib/libc/sys/linux/cmath/s_clog10l.c b/newlib/libc/sys/linux/cmath/s_clog10l.c
deleted file mode 100644
index f901543d0..000000000
--- a/newlib/libc/sys/linux/cmath/s_clog10l.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Compute complex base 10 logarithm.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__clog10l (__complex__ long double x)
-{
- __complex__ long double result;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- /* Real and imaginary part are 0.0. */
- __imag__ result = signbit (__real__ x) ? M_PIl : 0.0;
- __imag__ result = __copysignl (__imag__ result, __imag__ x);
- /* Yes, the following line raises an exception. */
- __real__ result = -1.0 / fabsl (__real__ x);
- }
- else if (rcls != FP_NAN && icls != FP_NAN)
- {
- /* Neither real nor imaginary part is NaN. */
- __real__ result = __ieee754_log10l (__ieee754_hypotl (__real__ x,
- __imag__ x));
- __imag__ result = M_LOG10El * __ieee754_atan2l (__imag__ x, __real__ x);
- }
- else
- {
- __imag__ result = __nanl ("");
- if (rcls == FP_INFINITE || icls == FP_INFINITE)
- /* Real or imaginary part is infinite. */
- __real__ result = HUGE_VALL;
- else
- __real__ result = __nanl ("");
- }
-
- return result;
-}
-weak_alias (__clog10l, clog10l)
diff --git a/newlib/libc/sys/linux/cmath/s_clogf.c b/newlib/libc/sys/linux/cmath/s_clogf.c
deleted file mode 100644
index c7151f2e5..000000000
--- a/newlib/libc/sys/linux/cmath/s_clogf.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Compute complex natural logarithm.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__clogf (__complex__ float x)
-{
- __complex__ float result;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- /* Real and imaginary part are 0.0. */
- __imag__ result = signbit (__real__ x) ? M_PI : 0.0;
- __imag__ result = __copysignf (__imag__ result, __imag__ x);
- /* Yes, the following line raises an exception. */
- __real__ result = -1.0 / fabsf (__real__ x);
- }
- else if (rcls != FP_NAN && icls != FP_NAN)
- {
- /* Neither real nor imaginary part is NaN. */
- __real__ result = __ieee754_logf (__ieee754_hypotf (__real__ x,
- __imag__ x));
- __imag__ result = __ieee754_atan2f (__imag__ x, __real__ x);
- }
- else
- {
- __imag__ result = __nanf ("");
- if (rcls == FP_INFINITE || icls == FP_INFINITE)
- /* Real or imaginary part is infinite. */
- __real__ result = HUGE_VALF;
- else
- __real__ result = __nanf ("");
- }
-
- return result;
-}
-weak_alias (__clogf, clogf)
diff --git a/newlib/libc/sys/linux/cmath/s_clogl.c b/newlib/libc/sys/linux/cmath/s_clogl.c
deleted file mode 100644
index 43118f768..000000000
--- a/newlib/libc/sys/linux/cmath/s_clogl.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Compute complex natural logarithm.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__clogl (__complex__ long double x)
-{
- __complex__ long double result;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls == FP_ZERO && icls == FP_ZERO)
- {
- /* Real and imaginary part are 0.0. */
- __imag__ result = signbit (__real__ x) ? M_PIl : 0.0;
- __imag__ result = __copysignl (__imag__ result, __imag__ x);
- /* Yes, the following line raises an exception. */
- __real__ result = -1.0 / fabsl (__real__ x);
- }
- else if (rcls != FP_NAN && icls != FP_NAN)
- {
- /* Neither real nor imaginary part is NaN. */
- __real__ result = __ieee754_logl (__ieee754_hypotl (__real__ x,
- __imag__ x));
- __imag__ result = __ieee754_atan2l (__imag__ x, __real__ x);
- }
- else
- {
- __imag__ result = __nanl ("");
- if (rcls == FP_INFINITE || icls == FP_INFINITE)
- /* Real or imaginary part is infinite. */
- __real__ result = HUGE_VALL;
- else
- __real__ result = __nanl ("");
- }
-
- return result;
-}
-weak_alias (__clogl, clogl)
diff --git a/newlib/libc/sys/linux/cmath/s_cpow.c b/newlib/libc/sys/linux/cmath/s_cpow.c
deleted file mode 100644
index 9018a8a65..000000000
--- a/newlib/libc/sys/linux/cmath/s_cpow.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Complex power of double values.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ double
-__cpow (__complex__ double x, __complex__ double c)
-{
- return __cexp (c * __clog (x));
-}
-weak_alias (__cpow, cpow)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cpow, __cpowl)
-weak_alias (__cpow, cpowl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_cpowf.c b/newlib/libc/sys/linux/cmath/s_cpowf.c
deleted file mode 100644
index b0c032422..000000000
--- a/newlib/libc/sys/linux/cmath/s_cpowf.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Complex power of float values.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ float
-__cpowf (__complex__ float x, __complex__ float c)
-{
- return __cexpf (c * __clogf (x));
-}
-weak_alias (__cpowf, cpowf)
diff --git a/newlib/libc/sys/linux/cmath/s_cpowl.c b/newlib/libc/sys/linux/cmath/s_cpowl.c
deleted file mode 100644
index 4c358b3eb..000000000
--- a/newlib/libc/sys/linux/cmath/s_cpowl.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Complex power of long double values.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-
-__complex__ long double
-__cpowl (__complex__ long double x, __complex__ long double c)
-{
- return __cexpl (c * __clogl (x));
-}
-weak_alias (__cpowl, cpowl)
diff --git a/newlib/libc/sys/linux/cmath/s_cproj.c b/newlib/libc/sys/linux/cmath/s_cproj.c
deleted file mode 100644
index 6c9e41704..000000000
--- a/newlib/libc/sys/linux/cmath/s_cproj.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Compute projection of complex double value to Riemann sphere.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ double
-__cproj (__complex__ double x)
-{
- __complex__ double res;
-
- if (isnan (__real__ x) && isnan (__imag__ x))
- return x;
- else if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- __real__ res = INFINITY;
- __imag__ res = __copysign (0.0, __imag__ x);
- }
- else
- {
- double den = __real__ x * __real__ x + __imag__ x * __imag__ x + 1.0;
-
- __real__ res = (2.0 * __real__ x) / den;
- __imag__ res = (2.0 * __imag__ x) / den;
- }
-
- return res;
-}
-weak_alias (__cproj, cproj)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__cproj, __cprojl)
-weak_alias (__cproj, cprojl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_cprojf.c b/newlib/libc/sys/linux/cmath/s_cprojf.c
deleted file mode 100644
index a302078b5..000000000
--- a/newlib/libc/sys/linux/cmath/s_cprojf.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Compute projection of complex float value to Riemann sphere.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-#include "math_private.h"
-
-__complex__ float
-__cprojf (__complex__ float x)
-{
- __complex__ float res;
-
- if (isnan (__real__ x) && isnan (__imag__ x))
- return x;
- else if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- __real__ res = INFINITY;
- __imag__ res = __copysignf (0.0, __imag__ x);
- }
- else
- {
- float den = __real__ x * __real__ x + __imag__ x * __imag__ x + 1.0;
-
- __real__ res = (2.0 * __real__ x) / den;
- __imag__ res = (2.0 * __imag__ x) / den;
- }
-
- return res;
-}
-weak_alias (__cprojf, cprojf)
diff --git a/newlib/libc/sys/linux/cmath/s_cprojl.c b/newlib/libc/sys/linux/cmath/s_cprojl.c
deleted file mode 100644
index c70cdc47d..000000000
--- a/newlib/libc/sys/linux/cmath/s_cprojl.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Compute projection of complex long double value to Riemann sphere.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-
-__complex__ long double
-__cprojl (__complex__ long double x)
-{
- __complex__ long double res;
-
- if (isnan (__real__ x) && isnan (__imag__ x))
- return x;
- else if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- __real__ res = INFINITY;
- __imag__ res = __copysignl (0.0, __imag__ x);
- }
- else
- {
- long double den = (__real__ x * __real__ x + __imag__ x * __imag__ x
- + 1.0);
-
- __real__ res = (2.0 * __real__ x) / den;
- __imag__ res = (2.0 * __imag__ x) / den;
- }
-
- return res;
-}
-weak_alias (__cprojl, cprojl)
diff --git a/newlib/libc/sys/linux/cmath/s_csin.c b/newlib/libc/sys/linux/cmath/s_csin.c
deleted file mode 100644
index eb380e2c3..000000000
--- a/newlib/libc/sys/linux/cmath/s_csin.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/* Complex sine function for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__csin (__complex__ double x)
-{
- __complex__ double retval;
- int negate = signbit (__real__ x);
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- __real__ x = fabs (__real__ x);
-
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- double sinh_val = __ieee754_sinh (__imag__ x);
- double cosh_val = __ieee754_cosh (__imag__ x);
- double sinix, cosix;
-
- __sincos (__real__ x, &sinix, &cosix);
-
- __real__ retval = cosh_val * sinix;
- __imag__ retval = sinh_val * cosix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = __nan ("");
- __imag__ retval = __imag__ x;
-
-#ifdef FE_INVALID
- if (rcls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = __nan ("");
- __imag__ retval = __nan ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- }
- else if (icls == FP_INFINITE)
- {
- /* Imaginary part is infinite. */
- if (rcls == FP_ZERO)
- {
- /* Real part is 0.0. */
- __real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = __imag__ x;
- }
- else if (rcls > FP_ZERO)
- {
- /* Real part is finite. */
- double sinix, cosix;
-
- __sincos (__real__ x, &sinix, &cosix);
-
- __real__ retval = __copysign (HUGE_VAL, sinix);
- __imag__ retval = __copysign (HUGE_VAL, cosix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- if (signbit (__imag__ x))
- __imag__ retval = -__imag__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = __nan ("");
- __imag__ retval = HUGE_VAL;
-
-#ifdef FE_INVALID
- if (rcls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- if (rcls == FP_ZERO)
- __real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
- else
- __real__ retval = __nan ("");
- __imag__ retval = __nan ("");
- }
-
- return retval;
-}
-weak_alias (__csin, csin)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__csin, __csinl)
-weak_alias (__csin, csinl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_csinf.c b/newlib/libc/sys/linux/cmath/s_csinf.c
deleted file mode 100644
index b7278810d..000000000
--- a/newlib/libc/sys/linux/cmath/s_csinf.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Complex sine function for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__csinf (__complex__ float x)
-{
- __complex__ float retval;
- int negate = signbit (__real__ x);
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- __real__ x = fabsf (__real__ x);
-
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- float sinh_val = __ieee754_sinhf (__imag__ x);
- float cosh_val = __ieee754_coshf (__imag__ x);
- float sinix, cosix;
-
- __sincosf (__real__ x, &sinix, &cosix);
-
- __real__ retval = cosh_val * sinix;
- __imag__ retval = sinh_val * cosix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = __nanf ("");
- __imag__ retval = __imag__ x;
-
-#ifdef FE_INVALID
- if (rcls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = __nanf ("");
- __imag__ retval = __nanf ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- }
- else if (icls == FP_INFINITE)
- {
- /* Imaginary part is infinite. */
- if (rcls == FP_ZERO)
- {
- /* Real part is 0.0. */
- __real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = __imag__ x;
- }
- else if (rcls > FP_ZERO)
- {
- /* Real part is finite. */
- float sinix, cosix;
-
- __sincosf (__real__ x, &sinix, &cosix);
-
- __real__ retval = __copysignf (HUGE_VALF, sinix);
- __imag__ retval = __copysignf (HUGE_VALF, cosix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- if (signbit (__imag__ x))
- __imag__ retval = -__imag__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = __nanf ("");
- __imag__ retval = HUGE_VALF;
-
-#ifdef FE_INVALID
- if (rcls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- if (rcls == FP_ZERO)
- __real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
- else
- __real__ retval = __nanf ("");
- __imag__ retval = __nanf ("");
- }
-
- return retval;
-}
-weak_alias (__csinf, csinf)
diff --git a/newlib/libc/sys/linux/cmath/s_csinh.c b/newlib/libc/sys/linux/cmath/s_csinh.c
deleted file mode 100644
index f0e0cc61f..000000000
--- a/newlib/libc/sys/linux/cmath/s_csinh.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Complex sine hyperbole function for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__csinh (__complex__ double x)
-{
- __complex__ double retval;
- int negate = signbit (__real__ x);
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- __real__ x = fabs (__real__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- double sinh_val = __ieee754_sinh (__real__ x);
- double cosh_val = __ieee754_cosh (__real__ x);
- double sinix, cosix;
-
- __sincos (__imag__ x, &sinix, &cosix);
-
- __real__ retval = sinh_val * cosix;
- __imag__ retval = cosh_val * sinix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (rcls == FP_ZERO)
- {
- /* Real part is 0.0. */
- __real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = __nan ("") + __nan ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = __nan ("");
- __imag__ retval = __nan ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = negate ? -HUGE_VAL : HUGE_VAL;
- __imag__ retval = __imag__ x;
- }
- else if (icls > FP_ZERO)
- {
- /* Imaginary part is finite. */
- double sinix, cosix;
-
- __sincos (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysign (HUGE_VAL, cosix);
- __imag__ retval = __copysign (HUGE_VAL, sinix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VAL;
- __imag__ retval = __nan ("") + __nan ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __real__ retval = __nan ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nan ("");
- }
-
- return retval;
-}
-weak_alias (__csinh, csinh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__csinh, __csinhl)
-weak_alias (__csinh, csinhl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_csinhf.c b/newlib/libc/sys/linux/cmath/s_csinhf.c
deleted file mode 100644
index 5cf80d0f9..000000000
--- a/newlib/libc/sys/linux/cmath/s_csinhf.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/* Complex sine hyperbole function for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__csinhf (__complex__ float x)
-{
- __complex__ float retval;
- int negate = signbit (__real__ x);
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- __real__ x = fabsf (__real__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- float sinh_val = __ieee754_sinhf (__real__ x);
- float cosh_val = __ieee754_coshf (__real__ x);
- float sinix, cosix;
-
- __sincosf (__imag__ x, &sinix, &cosix);
-
- __real__ retval = sinh_val * cosix;
- __imag__ retval = cosh_val * sinix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (rcls == FP_ZERO)
- {
- /* Real part is 0.0. */
- __real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = __nanf ("") + __nanf ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = __nanf ("");
- __imag__ retval = __nanf ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = negate ? -HUGE_VALF : HUGE_VALF;
- __imag__ retval = __imag__ x;
- }
- else if (icls > FP_ZERO)
- {
- /* Imaginary part is finite. */
- float sinix, cosix;
-
- __sincosf (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysignf (HUGE_VALF, cosix);
- __imag__ retval = __copysignf (HUGE_VALF, sinix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VALF;
- __imag__ retval = __nanf ("") + __nanf ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __real__ retval = __nanf ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nanf ("");
- }
-
- return retval;
-}
-weak_alias (__csinhf, csinhf)
diff --git a/newlib/libc/sys/linux/cmath/s_csinhl.c b/newlib/libc/sys/linux/cmath/s_csinhl.c
deleted file mode 100644
index 226075634..000000000
--- a/newlib/libc/sys/linux/cmath/s_csinhl.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/* Complex sine hyperbole function for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__csinhl (__complex__ long double x)
-{
- __complex__ long double retval;
- int negate = signbit (__real__ x);
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- __real__ x = fabsl (__real__ x);
-
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- long double sinh_val = __ieee754_sinhl (__real__ x);
- long double cosh_val = __ieee754_coshl (__real__ x);
- long double sinix, cosix;
-
- __sincosl (__imag__ x, &sinix, &cosix);
-
- __real__ retval = sinh_val * cosix;
- __imag__ retval = cosh_val * sinix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (rcls == FP_ZERO)
- {
- /* Real part is 0.0. */
- __real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = __nanl ("") + __nanl ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = __nanl ("");
- __imag__ retval = __nanl ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- }
- else if (rcls == FP_INFINITE)
- {
- /* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = negate ? -HUGE_VALL : HUGE_VALL;
- __imag__ retval = __imag__ x;
- }
- else if (icls > FP_ZERO)
- {
- /* Imaginary part is finite. */
- long double sinix, cosix;
-
- __sincosl (__imag__ x, &sinix, &cosix);
-
- __real__ retval = __copysignl (HUGE_VALL, cosix);
- __imag__ retval = __copysignl (HUGE_VALL, sinix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = HUGE_VALL;
- __imag__ retval = __nanl ("") + __nanl ("");
-
-#ifdef FE_INVALID
- if (icls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __real__ retval = __nanl ("");
- __imag__ retval = __imag__ x == 0.0 ? __imag__ x : __nanl ("");
- }
-
- return retval;
-}
-weak_alias (__csinhl, csinhl)
diff --git a/newlib/libc/sys/linux/cmath/s_csinl.c b/newlib/libc/sys/linux/cmath/s_csinl.c
deleted file mode 100644
index f7a1c4360..000000000
--- a/newlib/libc/sys/linux/cmath/s_csinl.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* Complex sine function for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__csinl (__complex__ long double x)
-{
- __complex__ long double retval;
- int negate = signbit (__real__ x);
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- __real__ x = fabsl (__real__ x);
-
- if (icls >= FP_ZERO)
- {
- /* Imaginary part is finite. */
- if (rcls >= FP_ZERO)
- {
- /* Real part is finite. */
- long double sinh_val = __ieee754_sinhl (__imag__ x);
- long double cosh_val = __ieee754_coshl (__imag__ x);
- long double sinix, cosix;
-
- __sincosl (__real__ x, &sinix, &cosix);
-
- __real__ retval = cosh_val * sinix;
- __imag__ retval = sinh_val * cosix;
-
- if (negate)
- __real__ retval = -__real__ retval;
- }
- else
- {
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = __nanl ("");
- __imag__ retval = __imag__ x;
-
-#ifdef FE_INVALID
- if (rcls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ retval = __nanl ("");
- __imag__ retval = __nanl ("");
-
-#ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- }
- else if (icls == FP_INFINITE)
- {
- /* Imaginary part is infinite. */
- if (rcls == FP_ZERO)
- {
- /* Real part is 0.0. */
- __real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
- __imag__ retval = __imag__ x;
- }
- else if (rcls > FP_ZERO)
- {
- /* Real part is finite. */
- long double sinix, cosix;
-
- __sincosl (__real__ x, &sinix, &cosix);
-
- __real__ retval = __copysignl (HUGE_VALL, sinix);
- __imag__ retval = __copysignl (HUGE_VALL, cosix);
-
- if (negate)
- __real__ retval = -__real__ retval;
- if (signbit (__imag__ x))
- __imag__ retval = -__imag__ retval;
- }
- else
- {
- /* The addition raises the invalid exception. */
- __real__ retval = __nanl ("");
- __imag__ retval = HUGE_VALL;
-
-#ifdef FE_INVALID
- if (rcls == FP_INFINITE)
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- if (rcls == FP_ZERO)
- __real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
- else
- __real__ retval = __nanl ("");
- __imag__ retval = __nanl ("");
- }
-
- return retval;
-}
-weak_alias (__csinl, csinl)
diff --git a/newlib/libc/sys/linux/cmath/s_csqrt.c b/newlib/libc/sys/linux/cmath/s_csqrt.c
deleted file mode 100644
index 0bb6690b1..000000000
--- a/newlib/libc/sys/linux/cmath/s_csqrt.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/* Complex square root of double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__csqrt (__complex__ double x)
-{
- __complex__ double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = HUGE_VAL;
- __imag__ res = __imag__ x;
- }
- else if (rcls == FP_INFINITE)
- {
- if (__real__ x < 0.0)
- {
- __real__ res = icls == FP_NAN ? __nan ("") : 0;
- __imag__ res = __copysign (HUGE_VAL, __imag__ x);
- }
- else
- {
- __real__ res = __real__ x;
- __imag__ res = (icls == FP_NAN
- ? __nan ("") : __copysign (0.0, __imag__ x));
- }
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
- }
- }
- else
- {
- if (icls == FP_ZERO)
- {
- if (__real__ x < 0.0)
- {
- __real__ res = 0.0;
- __imag__ res = __copysign (__ieee754_sqrt (-__real__ x),
- __imag__ x);
- }
- else
- {
- __real__ res = fabs (__ieee754_sqrt (__real__ x));
- __imag__ res = __copysign (0.0, __imag__ x);
- }
- }
- else if (rcls == FP_ZERO)
- {
- double r = __ieee754_sqrt (0.5 * fabs (__imag__ x));
-
- __real__ res = __copysign (r, __imag__ x);
- __imag__ res = r;
- }
- else
- {
- double d, r, s;
-
- d = __ieee754_hypot (__real__ x, __imag__ x);
- /* Use the identity 2 Re res Im res = Im x
- to avoid cancellation error in d +/- Re x. */
- if (__real__ x > 0)
- {
- r = __ieee754_sqrt (0.5 * d + 0.5 * __real__ x);
- s = (0.5 * __imag__ x) / r;
- }
- else
- {
- s = __ieee754_sqrt (0.5 * d - 0.5 * __real__ x);
- r = fabs ((0.5 * __imag__ x) / s);
- }
-
- __real__ res = r;
- __imag__ res = __copysign (s, __imag__ x);
- }
- }
-
- return res;
-}
-weak_alias (__csqrt, csqrt)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__csqrt, __csqrtl)
-weak_alias (__csqrt, csqrtl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_csqrtf.c b/newlib/libc/sys/linux/cmath/s_csqrtf.c
deleted file mode 100644
index f7b18368b..000000000
--- a/newlib/libc/sys/linux/cmath/s_csqrtf.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Complex square root of float value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__csqrtf (__complex__ float x)
-{
- __complex__ float res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = HUGE_VALF;
- __imag__ res = __imag__ x;
- }
- else if (rcls == FP_INFINITE)
- {
- if (__real__ x < 0.0)
- {
- __real__ res = icls == FP_NAN ? __nanf ("") : 0;
- __imag__ res = __copysignf (HUGE_VALF, __imag__ x);
- }
- else
- {
- __real__ res = __real__ x;
- __imag__ res = (icls == FP_NAN
- ? __nanf ("") : __copysignf (0.0, __imag__ x));
- }
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
- }
- }
- else
- {
- if (icls == FP_ZERO)
- {
- if (__real__ x < 0.0)
- {
- __real__ res = 0.0;
- __imag__ res = __copysignf (__ieee754_sqrtf (-__real__ x),
- __imag__ x);
- }
- else
- {
- __real__ res = fabsf (__ieee754_sqrtf (__real__ x));
- __imag__ res = __copysignf (0.0, __imag__ x);
- }
- }
- else if (rcls == FP_ZERO)
- {
- float r = __ieee754_sqrtf (0.5 * fabsf (__imag__ x));
-
- __real__ res = __copysignf (r, __imag__ x);
- __imag__ res = r;
- }
- else
- {
- float d, r, s;
-
- d = __ieee754_hypotf (__real__ x, __imag__ x);
- /* Use the identity 2 Re res Im res = Im x
- to avoid cancellation error in d +/- Re x. */
- if (__real__ x > 0)
- {
- r = __ieee754_sqrtf (0.5f * d + 0.5f * __real__ x);
- s = (0.5f * __imag__ x) / r;
- }
- else
- {
- s = __ieee754_sqrtf (0.5f * d - 0.5f * __real__ x);
- r = fabsf ((0.5f * __imag__ x) / s);
- }
-
- __real__ res = r;
- __imag__ res = __copysignf (s, __imag__ x);
- }
- }
-
- return res;
-}
-weak_alias (__csqrtf, csqrtf)
diff --git a/newlib/libc/sys/linux/cmath/s_csqrtl.c b/newlib/libc/sys/linux/cmath/s_csqrtl.c
deleted file mode 100644
index 8e27750a0..000000000
--- a/newlib/libc/sys/linux/cmath/s_csqrtl.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* Complex square root of long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__csqrtl (__complex__ long double x)
-{
- __complex__ long double res;
- int rcls = fpclassify (__real__ x);
- int icls = fpclassify (__imag__ x);
-
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
- {
- if (icls == FP_INFINITE)
- {
- __real__ res = HUGE_VALL;
- __imag__ res = __imag__ x;
- }
- else if (rcls == FP_INFINITE)
- {
- if (__real__ x < 0.0)
- {
- __real__ res = icls == FP_NAN ? __nanl ("") : 0;
- __imag__ res = __copysignl (HUGE_VALL, __imag__ x);
- }
- else
- {
- __real__ res = __real__ x;
- __imag__ res = (icls == FP_NAN
- ? __nanl ("") : __copysignl (0.0, __imag__ x));
- }
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
- }
- }
- else
- {
- if (icls == FP_ZERO)
- {
- if (__real__ x < 0.0)
- {
- __real__ res = 0.0;
- __imag__ res = __copysignl (__ieee754_sqrtl (-__real__ x),
- __imag__ x);
- }
- else
- {
- __real__ res = fabsl (__ieee754_sqrtl (__real__ x));
- __imag__ res = __copysignl (0.0, __imag__ x);
- }
- }
- else if (rcls == FP_ZERO)
- {
- long double r = __ieee754_sqrtl (0.5 * fabsl (__imag__ x));
-
- __real__ res = __copysignl (r, __imag__ x);
- __imag__ res = r;
- }
- else
- {
- long double d, r, s;
-
- d = __ieee754_hypotl (__real__ x, __imag__ x);
- /* Use the identity 2 Re res Im res = Im x
- to avoid cancellation error in d +/- Re x. */
- if (__real__ x > 0)
- {
- r = __ieee754_sqrtl (0.5L * d + 0.5L * __real__ x);
- s = (0.5L * __imag__ x) / r;
- }
- else
- {
- s = __ieee754_sqrtl (0.5L * d - 0.5L * __real__ x);
- r = fabsl ((0.5L * __imag__ x) / s);
- }
-
- __real__ res = r;
- __imag__ res = __copysignl (s, __imag__ x);
- }
- }
-
- return res;
-}
-weak_alias (__csqrtl, csqrtl)
diff --git a/newlib/libc/sys/linux/cmath/s_ctan.c b/newlib/libc/sys/linux/cmath/s_ctan.c
deleted file mode 100644
index 6a09fe465..000000000
--- a/newlib/libc/sys/linux/cmath/s_ctan.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Complex tangent function for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__ctan (__complex__ double x)
-{
- __complex__ double res;
-
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- if (__isinf (__imag__ x))
- {
- __real__ res = __copysign (0.0, __real__ x);
- __imag__ res = __copysign (1.0, __imag__ x);
- }
- else if (__real__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
-
-#ifdef FE_INVALID
- if (__isinf (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- double sin2rx, cos2rx;
- double den;
-
- __sincos (2.0 * __real__ x, &sin2rx, &cos2rx);
-
- den = cos2rx + __ieee754_cosh (2.0 * __imag__ x);
-
- __real__ res = sin2rx / den;
- __imag__ res = __ieee754_sinh (2.0 * __imag__ x) / den;
- }
-
- return res;
-}
-weak_alias (__ctan, ctan)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__ctan, __ctanl)
-weak_alias (__ctan, ctanl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_ctanf.c b/newlib/libc/sys/linux/cmath/s_ctanf.c
deleted file mode 100644
index 89bc84741..000000000
--- a/newlib/libc/sys/linux/cmath/s_ctanf.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Complex tangent function for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__ctanf (__complex__ float x)
-{
- __complex__ float res;
-
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- if (__isinff (__imag__ x))
- {
- __real__ res = __copysignf (0.0, __real__ x);
- __imag__ res = __copysignf (1.0, __imag__ x);
- }
- else if (__real__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
-
-#ifdef FE_INVALID
- if (__isinff (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- float sin2rx, cos2rx;
- float den;
-
- __sincosf (2.0 * __real__ x, &sin2rx, &cos2rx);
-
- den = cos2rx + __ieee754_coshf (2.0 * __imag__ x);
-
- __real__ res = sin2rx / den;
- __imag__ res = __ieee754_sinhf (2.0 * __imag__ x) / den;
- }
-
- return res;
-}
-weak_alias (__ctanf, ctanf)
diff --git a/newlib/libc/sys/linux/cmath/s_ctanh.c b/newlib/libc/sys/linux/cmath/s_ctanh.c
deleted file mode 100644
index 971cd9040..000000000
--- a/newlib/libc/sys/linux/cmath/s_ctanh.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Complex hyperbole tangent for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ double
-__ctanh (__complex__ double x)
-{
- __complex__ double res;
-
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- if (__isinf (__real__ x))
- {
- __real__ res = __copysign (1.0, __real__ x);
- __imag__ res = __copysign (0.0, __imag__ x);
- }
- else if (__imag__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
-
-#ifdef FE_INVALID
- if (__isinf (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- double sin2ix, cos2ix;
- double den;
-
- __sincos (2.0 * __imag__ x, &sin2ix, &cos2ix);
-
- den = (__ieee754_cosh (2.0 * __real__ x) + cos2ix);
-
- __real__ res = __ieee754_sinh (2.0 * __real__ x) / den;
- __imag__ res = sin2ix / den;
- }
-
- return res;
-}
-weak_alias (__ctanh, ctanh)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__ctanh, __ctanhl)
-weak_alias (__ctanh, ctanhl)
-#endif
diff --git a/newlib/libc/sys/linux/cmath/s_ctanhf.c b/newlib/libc/sys/linux/cmath/s_ctanhf.c
deleted file mode 100644
index b9e3c57fc..000000000
--- a/newlib/libc/sys/linux/cmath/s_ctanhf.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Complex hyperbole tangent for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ float
-__ctanhf (__complex__ float x)
-{
- __complex__ float res;
-
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- if (__isinff (__real__ x))
- {
- __real__ res = __copysignf (1.0, __real__ x);
- __imag__ res = __copysignf (0.0, __imag__ x);
- }
- else if (__imag__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
-
-#ifdef FE_INVALID
- if (__isinff (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- float sin2ix, cos2ix;
- float den;
-
- __sincosf (2.0 * __imag__ x, &sin2ix, &cos2ix);
-
- den = (__ieee754_coshf (2.0 * __real__ x) + cos2ix);
-
- __real__ res = __ieee754_sinhf (2.0 * __real__ x) / den;
- __imag__ res = sin2ix / den;
- }
-
- return res;
-}
-weak_alias (__ctanhf, ctanhf)
diff --git a/newlib/libc/sys/linux/cmath/s_ctanhl.c b/newlib/libc/sys/linux/cmath/s_ctanhl.c
deleted file mode 100644
index 7bf6b3919..000000000
--- a/newlib/libc/sys/linux/cmath/s_ctanhl.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Complex hyperbole tangent for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__ctanhl (__complex__ long double x)
-{
- __complex__ long double res;
-
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- if (__isinfl (__real__ x))
- {
- __real__ res = __copysignl (1.0, __real__ x);
- __imag__ res = __copysignl (0.0, __imag__ x);
- }
- else if (__imag__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
-
-#ifdef FE_INVALID
- if (__isinfl (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- long double sin2ix, cos2ix;
- long double den;
-
- __sincosl (2.0 * __imag__ x, &sin2ix, &cos2ix);
-
- den = (__ieee754_coshl (2.0 * __real__ x) + cos2ix);
-
- __real__ res = __ieee754_sinhl (2.0 * __real__ x) / den;
- __imag__ res = sin2ix / den;
- }
-
- return res;
-}
-weak_alias (__ctanhl, ctanhl)
diff --git a/newlib/libc/sys/linux/cmath/s_ctanl.c b/newlib/libc/sys/linux/cmath/s_ctanl.c
deleted file mode 100644
index fa153e9b3..000000000
--- a/newlib/libc/sys/linux/cmath/s_ctanl.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Complex tangent function for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <complex.h>
-#include <fenv.h>
-#include <math.h>
-
-#include "math_private.h"
-
-
-__complex__ long double
-__ctanl (__complex__ long double x)
-{
- __complex__ long double res;
-
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
- {
- if (__isinfl (__imag__ x))
- {
- __real__ res = __copysignl (0.0, __real__ x);
- __imag__ res = __copysignl (1.0, __imag__ x);
- }
- else if (__real__ x == 0.0)
- {
- res = x;
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
-
-#ifdef FE_INVALID
- if (__isinfl (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- long double sin2rx, cos2rx;
- long double den;
-
- __sincosl (2.0 * __real__ x, &sin2rx, &cos2rx);
-
- den = cos2rx + __ieee754_coshl (2.0 * __imag__ x);
-
- __real__ res = sin2rx / den;
- __imag__ res = __ieee754_sinhl (2.0 * __imag__ x) / den;
- }
-
- return res;
-}
-weak_alias (__ctanl, ctanl)
diff --git a/newlib/libc/sys/linux/config.h b/newlib/libc/sys/linux/config.h
deleted file mode 100644
index 76b438c85..000000000
--- a/newlib/libc/sys/linux/config.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#define HAVE_WEAK_SYMBOLS 1
-#define HAVE_GNU_LD 1
-#define HAVE_ELF 1
-#define __ASSUME_REALTIME_SIGNALS 1
-#define ASM_GLOBAL_DIRECTIVE .global
-
-#define TEMP_FAILURE_RETRY(expression) \
- (__extension__ \
- ({ long int __result; \
- do __result = (long int) (expression); \
- while (__result == -1L && errno == EINTR); \
- __result; }))
-
-#define UINT32_C(c) c ## U
-
-#include <machine/sysdep.h>
diff --git a/newlib/libc/sys/linux/configure b/newlib/libc/sys/linux/configure
deleted file mode 100755
index 88451ffb1..000000000
--- a/newlib/libc/sys/linux/configure
+++ /dev/null
@@ -1,3473 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-shared[=PKGS] build shared libraries [default=yes]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=linux.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:590: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:643: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:700: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:733: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 738 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:766: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 771 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:948: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:969: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:987: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1030: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1043: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1056: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1069: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1082: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1107: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1137: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1186: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1210: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1241: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1273: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1305: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1337: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1382: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1436: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1470: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-
-if test "${use_libtool}" = "yes"; then
-
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_shared=yes
-fi
-
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
- enableval="$enable_static"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_static=yes
-fi
-
-# Check whether --enable-fast-install or --disable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
- enableval="$enable_fast_install"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_fast_install=yes
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1656: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1686: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1737: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1769: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1780 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1811: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1816: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1844: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1887: checking for ld used by GCC" >&5
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1917: checking for GNU ld" >&5
-else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1920: checking for non-GNU ld" >&5
-fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
-echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1955: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi
-fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1972: checking for $LD option to reload object files" >&5
-if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-
-echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-
-echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1984: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi
-fi
-
-NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
-
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:2022: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
-else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:2043: checking how to recognise dependant libraries" >&5
-if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.012)
- lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd* )
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
- fi
- ;;
-
-newsos6)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-sysv5uw[78]* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-
-fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2216: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:2246: checking for ${ac_tool_prefix}file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:2308: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2379: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2411: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2446: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_STRIP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2478: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- STRIP=":"
-fi
-fi
-
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-
-libtool_flags="$libtool_flags --enable-win32-dll"
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
- :
-fi
-
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
-else
- pic_mode=default
-fi
-
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 2545 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2583: checking whether the C compiler needs -belf" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 2596 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_needs_belf=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
-fi
-rm -f conftest*
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-fi
-
-echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2633: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_DLLTOOL"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2665: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- DLLTOOL="false"
-fi
-fi
-
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2700: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AS"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2732: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AS="false"
-fi
-fi
-
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2767: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_OBJDUMP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2799: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- OBJDUMP="false"
-fi
-fi
-
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
-echo "configure:2835: checking if libtool should supply DllMain function" >&5
-if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2840 "configure"
-#include "confdefs.h"
-
-int main() {
-extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:2848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_need_dllmain=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_need_dllmain=yes
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_need_dllmain" 1>&6
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
-echo "configure:2869: checking how to link DLLs" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2874 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_dll_switch=-mdll
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_dll_switch=-dll
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
-
-esac
-
-
-# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
-
-# Reload cache, that may have been modified by ltconfig
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-
-
-
-
-
-
-for ac_prog in mawk gawk nawk awk
-do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2995: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AWK="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AWK="$ac_cv_prog_AWK"
-if test -n "$AWK"; then
- echo "$ac_t""$AWK" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-test -n "$AWK" && break
-done
-
-fi
-
-LINUX_MACH_LIB=
-if test -n "${machine_dir}"; then
- if test "${use_libtool}" = "yes"; then
- LINUX_MACH_LIB=machine/${machine_dir}/liblinux${machine_dir}.${aext}
- else
- LINUX_MACH_LIB=machine/lib.${aext}
- fi
-fi
-
-
-EXTRA_SUBDIRS=
-EXTRA_SUBLIBS=
-
-if test "${newlib_multithread}" = "yes"; then
-EXTRA_CONFIG_DIRS=linuxthreads
-fi
-if test "x${newlib_elix_level}" = "x1"; then
-EXTRA_SUBDIRS=linuxthreads net
-else
-EXTRA_SUBDIRS="linuxthreads net intl stdlib iconv dl"
-EXTRA_SUBLIBS="net/libnet.la intl/libintl.la stdlib/libstdlib.la iconv/libiconv.la dl/libdl.la"
-fi
-
-
-
-
-subdirs="machine $EXTRA_CONFIG_DIRS"
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile intl/Makefile net/Makefile stdlib/Makefile iconv/Makefile dl/Makefile cmath/Makefile argp/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-s%@LN_S@%$LN_S%g
-s%@STRIP@%$STRIP%g
-s%@DLLTOOL@%$DLLTOOL%g
-s%@OBJDUMP@%$OBJDUMP%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@AWK@%$AWK%g
-s%@LINUX_MACH_LIB@%$LINUX_MACH_LIB%g
-s%@EXTRA_SUBDIRS@%$EXTRA_SUBDIRS%g
-s%@EXTRA_SUBLIBS@%$EXTRA_SUBLIBS%g
-s%@subdirs@%$subdirs%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile intl/Makefile net/Makefile stdlib/Makefile iconv/Makefile dl/Makefile cmath/Makefile argp/Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-if test "$no_recursion" != yes; then
-
- # Remove --cache-file and --srcdir arguments so they do not pile up.
- ac_sub_configure_args=
- ac_prev=
- for ac_arg in $ac_configure_args; do
- if test -n "$ac_prev"; then
- ac_prev=
- continue
- fi
- case "$ac_arg" in
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- ;;
- *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
- esac
- done
-
- for ac_config_dir in machine $EXTRA_CONFIG_DIRS; do
-
- # Do not complain, so a configure script can configure whichever
- # parts of a large source tree are present.
- if test ! -d $srcdir/$ac_config_dir; then
- continue
- fi
-
- echo configuring in $ac_config_dir
-
- case "$srcdir" in
- .) ;;
- *)
- if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
- else
- { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
- fi
- ;;
- esac
-
- ac_popdir=`pwd`
- cd $ac_config_dir
-
- # A "../" for each directory in /$ac_config_dir.
- ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
- case "$srcdir" in
- .) # No --srcdir option. We are building in place.
- ac_sub_srcdir=$srcdir ;;
- /*) # Absolute path.
- ac_sub_srcdir=$srcdir/$ac_config_dir ;;
- *) # Relative path.
- ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
- esac
-
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_sub_srcdir/configure; then
- ac_sub_configure=$ac_sub_srcdir/configure
- elif test -f $ac_sub_srcdir/configure.in; then
- ac_sub_configure=$ac_configure
- else
- echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
- ac_sub_configure=
- fi
-
- # The recursion is here.
- if test -n "$ac_sub_configure"; then
-
- # Make the cache file name correct relative to the subdirectory.
- case "$cache_file" in
- /*) ac_sub_cache_file=$cache_file ;;
- *) # Relative path.
- ac_sub_cache_file="$ac_dots$cache_file" ;;
- esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
- # The eval makes quoting arguments work.
- if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
- then :
- else
- { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
- fi
- fi
-
- cd $ac_popdir
- done
-fi
-
diff --git a/newlib/libc/sys/linux/configure.in b/newlib/libc/sys/linux/configure.in
deleted file mode 100644
index e03bcd960..000000000
--- a/newlib/libc/sys/linux/configure.in
+++ /dev/null
@@ -1,50 +0,0 @@
-dnl This is the newlib/libc/sys/linux configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(linux.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
-dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
-dnl line of the macro which fail because appropriate LDFLAGS are not set.
-
-if test "${use_libtool}" = "yes"; then
-AC_LIBTOOL_WIN32_DLL
-AM_PROG_LIBTOOL
-AC_PROG_AWK
-fi
-
-LINUX_MACH_LIB=
-if test -n "${machine_dir}"; then
- if test "${use_libtool}" = "yes"; then
- LINUX_MACH_LIB=machine/${machine_dir}/liblinux${machine_dir}.${aext}
- else
- LINUX_MACH_LIB=machine/lib.${aext}
- fi
-fi
-AC_SUBST(LINUX_MACH_LIB)
-
-EXTRA_SUBDIRS=
-EXTRA_SUBLIBS=
-
-if test "${newlib_multithread}" = "yes"; then
-EXTRA_CONFIG_DIRS=linuxthreads
-fi
-if test "x${newlib_elix_level}" = "x1"; then
-EXTRA_SUBDIRS=linuxthreads net
-else
-EXTRA_SUBDIRS="linuxthreads net intl stdlib iconv dl"
-EXTRA_SUBLIBS="net/libnet.la intl/libintl.la stdlib/libstdlib.la iconv/libiconv.la dl/libdl.la"
-fi
-
-AC_SUBST(EXTRA_SUBDIRS)
-AC_SUBST(EXTRA_SUBLIBS)
-
-AC_CONFIG_SUBDIRS(machine $EXTRA_CONFIG_DIRS)
-
-AC_OUTPUT(Makefile intl/Makefile net/Makefile stdlib/Makefile iconv/Makefile dl/Makefile cmath/Makefile argp/Makefile)
diff --git a/newlib/libc/sys/linux/confstr.c b/newlib/libc/sys/linux/confstr.c
deleted file mode 100644
index 6b566b308..000000000
--- a/newlib/libc/sys/linux/confstr.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/* Copyright (C) 1991, 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#define _GNU_SOURCE 1
-
-#include <stddef.h>
-#include <errno.h>
-#include <unistd.h>
-#include <string.h>
-#include <confstr.h>
-
-/* If BUF is not NULL and LEN > 0, fill in at most LEN - 1 bytes
- of BUF with the value corresponding to NAME and zero-terminate BUF.
- Return the number of bytes required to hold NAME's entire value. */
-size_t
-confstr (name, buf, len)
- int name;
- char *buf;
- size_t len;
-{
- const char *string;
- size_t string_len;
-
- switch (name)
- {
- case _CS_PATH:
- {
- static const char cs_path[] = CS_PATH;
- string = cs_path;
- string_len = sizeof (cs_path);
- }
- break;
-
- case _CS_V6_WIDTH_RESTRICTED_ENVS:
- /* We have to return a newline-separated list of named of
- programming environements in which the widths of blksize_t,
- cc_t, mode_t, nfds_t, pid_t, ptrdiff_t, size_t, speed_t,
- ssize_t, suseconds_t, tcflag_t, useconds_t, wchar_t, and
- wint_t types are no greater than the width of type long.
-
- Currently this means all environment which the system allows. */
- {
- static const char restenvs[] =
-#if _POSIX_V6_ILP32_OFF32 > 0
- "_POSIX_V6_ILP32_OFF32"
-#endif
-#if _POSIX_V6_ILP32_OFFBIG > 0
-# if _POSIX_V6_ILP32_OFF32 > 0
- "\n"
-# endif
- "_POSIX_V6_ILP32_OFFBIG"
-#endif
-#if _POSIX_V6_LP64_OFF64 > 0
-# if _POSIX_V6_ILP32_OFF32 > 0 || _POSIX_V6_ILP32_OFFBIG > 0
- "\n"
-# endif
- "_POSIX_V6_LP64_OFF64"
-#endif
-#if _POSIX_V6_LPBIG_OFFBIG > 0
-# if _POSIX_V6_ILP32_OFF32 > 0 || _POSIX_V6_ILP32_OFFBIG > 0 \
- || _POSIX_V6_LP64_OFF64 > 0
- "\n"
-# endif
- "_POSIX_V6_LPBIG_OFFBIG"
-#endif
- ;
- string = restenvs;
- string_len = sizeof (restenvs);
- }
- break;
-
- case _CS_XBS5_ILP32_OFFBIG_CFLAGS:
- case _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS:
- case _CS_LFS_CFLAGS:
-#if _XBS5_LP64_OFF64 == -1 && _XBS5_LPBIG_OFFBIG == -1 && _XBS5_ILP32_OFFBIG == 1
- /* Signal that we want the new ABI. */
- {
- static const char file_offset[] = "-D_FILE_OFFSET_BITS=64";
- string = file_offset;
- string_len = sizeof (file_offset);
- }
- break;
-#endif
- /* FALLTHROUGH */
-
- case _CS_LFS_LINTFLAGS:
- case _CS_LFS_LDFLAGS:
- case _CS_LFS_LIBS:
- case _CS_LFS64_CFLAGS:
- case _CS_LFS64_LINTFLAGS:
- case _CS_LFS64_LDFLAGS:
- case _CS_LFS64_LIBS:
-
- case _CS_XBS5_ILP32_OFF32_CFLAGS:
- case _CS_XBS5_ILP32_OFF32_LDFLAGS:
- case _CS_XBS5_ILP32_OFF32_LIBS:
- case _CS_XBS5_ILP32_OFF32_LINTFLAGS:
- case _CS_XBS5_ILP32_OFFBIG_LDFLAGS:
- case _CS_XBS5_ILP32_OFFBIG_LIBS:
- case _CS_XBS5_ILP32_OFFBIG_LINTFLAGS:
- case _CS_XBS5_LP64_OFF64_CFLAGS:
- case _CS_XBS5_LP64_OFF64_LDFLAGS:
- case _CS_XBS5_LP64_OFF64_LIBS:
- case _CS_XBS5_LP64_OFF64_LINTFLAGS:
- case _CS_XBS5_LPBIG_OFFBIG_CFLAGS:
- case _CS_XBS5_LPBIG_OFFBIG_LDFLAGS:
- case _CS_XBS5_LPBIG_OFFBIG_LIBS:
- case _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS:
-
- case _CS_POSIX_V6_ILP32_OFF32_CFLAGS:
- case _CS_POSIX_V6_ILP32_OFF32_LDFLAGS:
- case _CS_POSIX_V6_ILP32_OFF32_LIBS:
- case _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS:
- case _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS:
- case _CS_POSIX_V6_ILP32_OFFBIG_LIBS:
- case _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS:
- case _CS_POSIX_V6_LP64_OFF64_CFLAGS:
- case _CS_POSIX_V6_LP64_OFF64_LDFLAGS:
- case _CS_POSIX_V6_LP64_OFF64_LIBS:
- case _CS_POSIX_V6_LP64_OFF64_LINTFLAGS:
- case _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS:
- case _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS:
- case _CS_POSIX_V6_LPBIG_OFFBIG_LIBS:
- case _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS:
- /* GNU libc does not require special actions to use LFS functions. */
- string = "";
- string_len = 1;
- break;
-
- default:
- __set_errno (EINVAL);
- return 0;
- }
-
- if (len > 0 && buf != NULL)
- {
- if (string_len <= len)
- memcpy (buf, string, string_len);
- else
- {
- memcpy (buf, string, len - 1);
- buf[len - 1] = '\0';
- }
- }
- return string_len;
-}
diff --git a/newlib/libc/sys/linux/confstr.h b/newlib/libc/sys/linux/confstr.h
deleted file mode 100644
index 15859c3b2..000000000
--- a/newlib/libc/sys/linux/confstr.h
+++ /dev/null
@@ -1 +0,0 @@
-#define CS_PATH "/bin:/usr/bin"
diff --git a/newlib/libc/sys/linux/crt1.c b/newlib/libc/sys/linux/crt1.c
deleted file mode 100644
index 018e9a2d4..000000000
--- a/newlib/libc/sys/linux/crt1.c
+++ /dev/null
@@ -1,3 +0,0 @@
-/* dummy crt1.c file to override the one normally used by
- gcc which refers to glibc variables that don't exist in
- newlib. */
diff --git a/newlib/libc/sys/linux/ctermid.c b/newlib/libc/sys/linux/ctermid.c
deleted file mode 100644
index 05914ffad..000000000
--- a/newlib/libc/sys/linux/ctermid.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/* ctermid */
-
-#include <stdio.h>
-#include <string.h>
-
-static char devname[] = "/dev/tty";
-
-char *
-_DEFUN (ctermid, (buf),
- char *buf)
-{
- if (buf == NULL)
- return devname;
-
- return strcpy (buf, "/dev/tty");
-}
diff --git a/newlib/libc/sys/linux/dl/Makefile.am b/newlib/libc/sys/linux/dl/Makefile.am
deleted file mode 100644
index 9c73a1367..000000000
--- a/newlib/libc/sys/linux/dl/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -DSHARED -D_GNU_SOURCE $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -I$(srcdir)/..
-
-LIB_SOURCES = \
- dl-addr.c dl-deps.c dl-init.c dl-load.c dl-misc.c dl-profile.c dl-runtime.c dl-version.c \
- dl-close.c dl-error.c dl-iteratephdr.c dl-lookup.c dl-object.c dl-profstub.c dl-support.c \
- dl-debug.c dl-fini.c dl-libc.c dl-open.c dl-reloc.c dl-sym.c dl-cache.c
-
-AM_CFLAGS = -D_GNU_SOURCE -D__strerror_r=strerror_r
-libdl_la_LDFLAGS = -Xcompiler -nostdlib
-
-if USE_LIBTOOL
-noinst_LTLIBRARIES = libdl.la
-libdl_la_SOURCES = $(LIB_SOURCES)
-noinst_DATA = objectlist.awk.in
-else
-noinst_LIBRARIES = lib.a
-lib_a_SOURCES = $(LIB_SOURCES)
-noinst_DATA =
-endif # USE_LIBTOOL
-
-include $(srcdir)/../../../../Makefile.shared
diff --git a/newlib/libc/sys/linux/dl/Makefile.in b/newlib/libc/sys/linux/dl/Makefile.in
deleted file mode 100644
index 78c5083c2..000000000
--- a/newlib/libc/sys/linux/dl/Makefile.in
+++ /dev/null
@@ -1,378 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-AWK = @AWK@
-CC = @CC@
-CPP = @CPP@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-EXEEXT = @EXEEXT@
-EXTRA_SUBDIRS = @EXTRA_SUBDIRS@
-EXTRA_SUBLIBS = @EXTRA_SUBLIBS@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBTOOL = @LIBTOOL@
-LINUX_MACH_LIB = @LINUX_MACH_LIB@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -DSHARED -D_GNU_SOURCE $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -I$(srcdir)/..
-
-LIB_SOURCES = dl-addr.c dl-deps.c dl-init.c dl-load.c dl-misc.c dl-profile.c dl-runtime.c dl-version.c dl-close.c dl-error.c dl-iteratephdr.c dl-lookup.c dl-object.c dl-profstub.c dl-support.c dl-debug.c dl-fini.c dl-libc.c dl-open.c dl-reloc.c dl-sym.c dl-cache.c
-
-
-AM_CFLAGS = -D_GNU_SOURCE -D__strerror_r=strerror_r
-libdl_la_LDFLAGS = -Xcompiler -nostdlib
-
-@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libdl.la
-@USE_LIBTOOL_TRUE@libdl_la_SOURCES = $(LIB_SOURCES)
-@USE_LIBTOOL_TRUE@noinst_DATA = objectlist.awk.in
-@USE_LIBTOOL_FALSE@noinst_DATA =
-@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
-@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-@USE_LIBTOOL_FALSE@lib_a_OBJECTS = dl-addr.$(OBJEXT) dl-deps.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@dl-init.$(OBJEXT) dl-load.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@dl-misc.$(OBJEXT) dl-profile.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@dl-runtime.$(OBJEXT) dl-version.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@dl-close.$(OBJEXT) dl-error.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@dl-iteratephdr.$(OBJEXT) dl-lookup.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@dl-object.$(OBJEXT) dl-profstub.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@dl-support.$(OBJEXT) dl-debug.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@dl-fini.$(OBJEXT) dl-libc.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@dl-open.$(OBJEXT) dl-reloc.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@dl-sym.$(OBJEXT) dl-cache.$(OBJEXT)
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-
-libdl_la_LIBADD =
-@USE_LIBTOOL_TRUE@libdl_la_OBJECTS = dl-addr.lo dl-deps.lo dl-init.lo \
-@USE_LIBTOOL_TRUE@dl-load.lo dl-misc.lo dl-profile.lo dl-runtime.lo \
-@USE_LIBTOOL_TRUE@dl-version.lo dl-close.lo dl-error.lo \
-@USE_LIBTOOL_TRUE@dl-iteratephdr.lo dl-lookup.lo dl-object.lo \
-@USE_LIBTOOL_TRUE@dl-profstub.lo dl-support.lo dl-debug.lo dl-fini.lo \
-@USE_LIBTOOL_TRUE@dl-libc.lo dl-open.lo dl-reloc.lo dl-sym.lo \
-@USE_LIBTOOL_TRUE@dl-cache.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DATA = $(noinst_DATA)
-
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES) $(libdl_la_SOURCES)
-OBJECTS = $(lib_a_OBJECTS) $(libdl_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/../../../../Makefile.shared
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus dl/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-mostlyclean-noinstLTLIBRARIES:
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-libdl.la: $(libdl_la_OBJECTS) $(libdl_la_DEPENDENCIES)
- $(LINK) $(libdl_la_LDFLAGS) $(libdl_la_OBJECTS) $(libdl_la_LIBADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = dl
-
-distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-noinstLTLIBRARIES \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-libtool \
- clean-noinstLTLIBRARIES clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-libtool distclean-noinstLTLIBRARIES \
- distclean-tags distclean-generic clean-am
- -rm -f libtool
-
-distclean: distclean-am
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool mostlyclean-noinstLTLIBRARIES \
-distclean-noinstLTLIBRARIES clean-noinstLTLIBRARIES \
-maintainer-clean-noinstLTLIBRARIES tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-objectlist.awk.in: $(noinst_LTLIBRARIES)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
- do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
- done
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/linux/dl/abi-tag.h b/newlib/libc/sys/linux/dl/abi-tag.h
deleted file mode 100644
index 85db374c6..000000000
--- a/newlib/libc/sys/linux/dl/abi-tag.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#define __ABI_TAG_OS 0
-#ifndef __ABI_TAG_VERSION
-# define __ABI_TAG_VERSION 2,0,0
-#endif
diff --git a/newlib/libc/sys/linux/dl/atomicity.h b/newlib/libc/sys/linux/dl/atomicity.h
deleted file mode 100644
index 8b52ab407..000000000
--- a/newlib/libc/sys/linux/dl/atomicity.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Low-level functions for atomic operations. ix86 version, x >= 4.
- Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _ATOMICITY_H
-#define _ATOMICITY_H 1
-
-
-
-static inline uint32_t
-__attribute__ ((unused))
-exchange_and_add (volatile uint32_t *mem, uint32_t val)
-{
- register uint32_t result;
- __asm__ __volatile__ ("lock; xaddl %0,%1"
- : "=r" (result), "=m" (*mem) : "0" (val), "1" (*mem));
- return result;
-}
-
-static inline void
-__attribute__ ((unused))
-atomic_add (volatile uint32_t *mem, int val)
-{
- __asm__ __volatile__ ("lock; addl %1,%0"
- : "=m" (*mem) : "ir" (val), "0" (*mem));
-}
-
-static inline char
-__attribute__ ((unused))
-compare_and_swap (volatile long int *p, long int oldval, long int newval)
-{
- char ret;
- long int readval;
-
- __asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0"
- : "=q" (ret), "=m" (*p), "=a" (readval)
- : "r" (newval), "1" (*p), "a" (oldval));
- return ret;
-}
-
-#endif /* atomicity.h */
diff --git a/newlib/libc/sys/linux/dl/dl-addr.c b/newlib/libc/sys/linux/dl/dl-addr.c
deleted file mode 100644
index 23867491f..000000000
--- a/newlib/libc/sys/linux/dl/dl-addr.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/* Locate the shared object symbol nearest a given address.
- Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <dlfcn.h>
-#include <stddef.h>
-#include <ldsodefs.h>
-
-int
-internal_function
-_dl_addr (const void *address, Dl_info *info)
-{
- const ElfW(Addr) addr = DL_LOOKUP_ADDRESS (address);
- struct link_map *l, *match;
- const ElfW(Sym) *symtab, *matchsym;
- const char *strtab;
- ElfW(Word) strtabsize;
-
- /* Find the highest-addressed object that ADDRESS is not below. */
- match = NULL;
- for (l = _dl_loaded; l; l = l->l_next)
- if (addr >= l->l_map_start && addr < l->l_map_end)
- {
- /* We know ADDRESS lies within L if in any shared object.
- Make sure it isn't past the end of L's segments. */
- size_t n = l->l_phnum;
- if (n > 0)
- {
- do
- --n;
- while (l->l_phdr[n].p_type != PT_LOAD);
- if (addr >= (l->l_addr +
- l->l_phdr[n].p_vaddr + l->l_phdr[n].p_memsz))
- /* Off the end of the highest-addressed shared object. */
- continue;
- }
-
- match = l;
- break;
- }
-
- if (match == NULL)
- return 0;
-
- /* Now we know what object the address lies in. */
- info->dli_fname = match->l_name;
- info->dli_fbase = (void *) match->l_addr;
-
- /* If this is the main program the information is incomplete. */
- if (__builtin_expect (info->dli_fbase == NULL, 0))
- {
- info->dli_fname = _dl_argv[0];
- info->dli_fbase = (void *) match->l_map_start;
- }
-
- symtab = (const void *) D_PTR (match, l_info[DT_SYMTAB]);
- strtab = (const void *) D_PTR (match, l_info[DT_STRTAB]);
- strtabsize = match->l_info[DT_STRSZ]->d_un.d_val;
-
- /* We assume that the string table follows the symbol table, because
- there is no way in ELF to know the size of the dynamic symbol table!! */
- for (matchsym = NULL; (void *) symtab < (void *) strtab; ++symtab)
- if (addr >= match->l_addr + symtab->st_value
- && ((symtab->st_size == 0 && addr == match->l_addr + symtab->st_value)
- || addr < match->l_addr + symtab->st_value + symtab->st_size)
- && symtab->st_name < strtabsize
- && (matchsym == NULL || matchsym->st_value < symtab->st_value)
- && (ELFW(ST_BIND) (symtab->st_info) == STB_GLOBAL
- || ELFW(ST_BIND) (symtab->st_info) == STB_WEAK))
- matchsym = symtab;
-
- if (matchsym)
- {
- /* We found a symbol close by. Fill in its name and exact address. */
- info->dli_sname = strtab + matchsym->st_name;
- info->dli_saddr = (void *) (match->l_addr + matchsym->st_value);
- }
- else
- {
- /* No symbol matches. We return only the containing object. */
- info->dli_sname = NULL;
- info->dli_saddr = NULL;
- }
-
- return 1;
-}
diff --git a/newlib/libc/sys/linux/dl/dl-cache.c b/newlib/libc/sys/linux/dl/dl-cache.c
deleted file mode 100644
index 9511da13f..000000000
--- a/newlib/libc/sys/linux/dl/dl-cache.c
+++ /dev/null
@@ -1,271 +0,0 @@
-/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <assert.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <sys/mman.h>
-#include <dl-cache.h>
-#include <machine/dl-procinfo.h>
-#include <machine/weakalias.h>
-
-extern const char *_dl_platform;
-
-#ifndef _DL_PLATFORMS_COUNT
-# define _DL_PLATFORMS_COUNT 0
-#endif
-
-/* This is the starting address and the size of the mmap()ed file. */
-static struct cache_file *cache;
-static struct cache_file_new *cache_new;
-static size_t cachesize;
-
-/* 1 if cache_data + PTR points into the cache. */
-#define _dl_cache_verify_ptr(ptr) (ptr < cache_data_size)
-
-/* This is the cache ID we expect. Normally it is 3 for glibc linked
- binaries. */
-int _dl_correct_cache_id = _DL_CACHE_DEFAULT_ID;
-
-#define SEARCH_CACHE(cache) \
-/* We use binary search since the table is sorted in the cache file. \
- The first matching entry in the table is returned. \
- It is important to use the same algorithm as used while generating \
- the cache file. */ \
-do \
- { \
- left = 0; \
- right = cache->nlibs - 1; \
- \
- while (left <= right) \
- { \
- __typeof__ (cache->libs[0].key) key; \
- \
- middle = (left + right) / 2; \
- \
- key = cache->libs[middle].key; \
- \
- /* Make sure string table indices are not bogus before using \
- them. */ \
- if (! _dl_cache_verify_ptr (key)) \
- { \
- cmpres = 1; \
- break; \
- } \
- \
- /* Actually compare the entry with the key. */ \
- cmpres = _dl_cache_libcmp (name, cache_data + key); \
- if (__builtin_expect (cmpres == 0, 0)) \
- { \
- /* Found it. LEFT now marks the last entry for which we \
- know the name is correct. */ \
- left = middle; \
- \
- /* There might be entries with this name before the one we \
- found. So we have to find the beginning. */ \
- while (middle > 0) \
- { \
- __typeof__ (cache->libs[0].key) key; \
- \
- key = cache->libs[middle - 1].key; \
- /* Make sure string table indices are not bogus before \
- using them. */ \
- if (! _dl_cache_verify_ptr (key) \
- /* Actually compare the entry. */ \
- || _dl_cache_libcmp (name, cache_data + key) != 0) \
- break; \
- --middle; \
- } \
- \
- do \
- { \
- int flags; \
- __typeof__ (cache->libs[0]) *lib = &cache->libs[middle]; \
- \
- /* Only perform the name test if necessary. */ \
- if (middle > left \
- /* We haven't seen this string so far. Test whether the \
- index is ok and whether the name matches. Otherwise \
- we are done. */ \
- && (! _dl_cache_verify_ptr (lib->key) \
- || (_dl_cache_libcmp (name, cache_data + lib->key) \
- != 0))) \
- break; \
- \
- flags = lib->flags; \
- if (_dl_cache_check_flags (flags) \
- && _dl_cache_verify_ptr (lib->value)) \
- { \
- if (best == NULL || flags == _dl_correct_cache_id) \
- { \
- HWCAP_CHECK; \
- best = cache_data + lib->value; \
- \
- if (flags == _dl_correct_cache_id) \
- /* We've found an exact match for the shared \
- object and no general `ELF' release. Stop \
- searching. */ \
- break; \
- } \
- } \
- } \
- while (++middle <= right); \
- break; \
- } \
- \
- if (cmpres < 0) \
- left = middle + 1; \
- else \
- right = middle - 1; \
- } \
- } \
-while (0)
-
-
-
-/* Look up NAME in ld.so.cache and return the file name stored there,
- or null if none is found. */
-
-const char *
-internal_function
-_dl_load_cache_lookup (const char *name)
-{
- int left, right, middle;
- int cmpres;
- const char *cache_data;
- uint32_t cache_data_size;
- const char *best;
-
- if (cache == NULL)
- {
- /* Read the contents of the file. */
- void *file = _dl_sysdep_read_whole_file (LD_SO_CACHE, &cachesize,
- PROT_READ);
-
- /* We can handle three different cache file formats here:
- - the old libc5/glibc2.0/2.1 format
- - the old format with the new format in it
- - only the new format
- The following checks if the cache contains any of these formats. */
- if (file != MAP_FAILED && cachesize > sizeof *cache
- && memcmp (file, CACHEMAGIC, sizeof CACHEMAGIC - 1) == 0)
- {
- size_t offset;
- /* Looks ok. */
- cache = file;
-
- /* Check for new version. */
- offset = ALIGN_CACHE (sizeof (struct cache_file)
- + cache->nlibs * sizeof (struct file_entry));
-
- cache_new = (struct cache_file_new *) ((void *) cache + offset);
- if (cachesize < (offset + sizeof (struct cache_file_new))
- || memcmp (cache_new->magic, CACHEMAGIC_VERSION_NEW,
- sizeof CACHEMAGIC_VERSION_NEW - 1) != 0)
- cache_new = (void *) -1;
- }
- else if (file != MAP_FAILED && cachesize > sizeof *cache_new
- && memcmp (file, CACHEMAGIC_VERSION_NEW,
- sizeof CACHEMAGIC_VERSION_NEW - 1) == 0)
- {
- cache_new = file;
- cache = file;
- }
- else
- {
- if (file != MAP_FAILED)
- munmap (file, cachesize);
- cache = (void *) -1;
- }
-
- assert (cache != NULL);
- }
-
- if (cache == (void *) -1)
- /* Previously looked for the cache file and didn't find it. */
- return NULL;
-
- best = NULL;
-
- if (cache_new != (void *) -1)
- {
- /* This file ends in static libraries where we don't have a hwcap. */
- unsigned long int *hwcap;
- uint64_t platform;
- #pragma weak _dl_hwcap
-
- /* This is where the strings start. */
- cache_data = (const char *) cache_new;
-
- /* Now we can compute how large the string table is. */
- cache_data_size = (const char *) cache + cachesize - cache_data;
-
- hwcap = &_dl_hwcap;
- platform = _dl_string_platform (_dl_platform);
- if (platform != -1)
- platform = 1ULL << platform;
-
- /* Only accept hwcap if it's for the right platform. */
-#define HWCAP_CHECK \
- if (_dl_osversion && cache_new->libs[middle].osversion > _dl_osversion) \
- continue; \
- if (_DL_PLATFORMS_COUNT && platform != -1 \
- && (lib->hwcap & _DL_HWCAP_PLATFORM) != 0 \
- && (lib->hwcap & _DL_HWCAP_PLATFORM) != platform) \
- continue; \
- if (hwcap \
- && ((lib->hwcap & *hwcap & ~_DL_HWCAP_PLATFORM) > *hwcap)) \
- continue
- SEARCH_CACHE (cache_new);
- }
- else
- {
- /* This is where the strings start. */
- cache_data = (const char *) &cache->libs[cache->nlibs];
-
- /* Now we can compute how large the string table is. */
- cache_data_size = (const char *) cache + cachesize - cache_data;
-
-#undef HWCAP_CHECK
-#define HWCAP_CHECK do {} while (0)
- SEARCH_CACHE (cache);
- }
-
- /* Print our result if wanted. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_LIBS, 0) && best != NULL)
- _dl_debug_printf (" trying file=%s\n", best);
-
- return best;
-}
-
-#ifndef MAP_COPY
-/* If the system does not support MAP_COPY we cannot leave the file open
- all the time since this would create problems when the file is replaced.
- Therefore we provide this function to close the file and open it again
- once needed. */
-void
-_dl_unload_cache (void)
-{
- if (cache != NULL && cache != (struct cache_file *) -1)
- {
- munmap (cache, cachesize);
- cache = NULL;
- }
-}
-#endif
diff --git a/newlib/libc/sys/linux/dl/dl-cache.h b/newlib/libc/sys/linux/dl/dl-cache.h
deleted file mode 100644
index 0699853e7..000000000
--- a/newlib/libc/sys/linux/dl/dl-cache.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stdint.h>
-
-#ifndef _DL_CACHE_DEFAULT_ID
-# define _DL_CACHE_DEFAULT_ID 3
-#endif
-
-#ifndef _dl_cache_check_flags
-# define _dl_cache_check_flags(flags) \
- ((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID)
-#endif
-
-#ifndef SYSCONFDIR
-# define SYSCONFDIR "/etc"
-#endif
-
-#ifndef LD_SO_CACHE
-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
-#endif
-
-#define CACHEMAGIC "ld.so-1.7.0"
-
-/* libc5 and glibc 2.0/2.1 use the same format. For glibc 2.2 another
- format has been added in a compatible way:
- The beginning of the string table is used for the new table:
- old_magic
- nlibs
- libs[0]
- ...
- libs[nlibs-1]
- pad, new magic needs to be aligned
- - this is string[0] for the old format
- new magic - this is string[0] for the new format
- newnlibs
- ...
- newlibs[0]
- ...
- newlibs[newnlibs-1]
- string 1
- string 2
- ...
-*/
-struct file_entry
-{
- int flags; /* This is 1 for an ELF library. */
- unsigned int key, value; /* String table indices. */
-};
-
-struct cache_file
-{
- char magic[sizeof CACHEMAGIC - 1];
- unsigned int nlibs;
- struct file_entry libs[0];
-};
-
-#define CACHEMAGIC_NEW "glibc-ld.so.cache"
-#define CACHE_VERSION "1.1"
-#define CACHEMAGIC_VERSION_NEW CACHEMAGIC_NEW CACHE_VERSION
-
-
-struct file_entry_new
-{
- int32_t flags; /* This is 1 for an ELF library. */
- uint32_t key, value; /* String table indices. */
- uint32_t osversion; /* Required OS version. */
- uint64_t hwcap; /* Hwcap entry. */
-};
-
-struct cache_file_new
-{
- char magic[sizeof CACHEMAGIC_NEW - 1];
- char version[sizeof CACHE_VERSION - 1];
- uint32_t nlibs; /* Number of entries. */
- uint32_t len_strings; /* Size of string table. */
- uint32_t unused[5]; /* Leave space for future extensions
- and align to 8 byte boundary. */
- struct file_entry_new libs[0]; /* Entries describing libraries. */
- /* After this the string table of size len_strings is found. */
-};
-
-/* Used to align cache_file_new. */
-#define ALIGN_CACHE(addr) \
-(((addr) + __alignof__ (struct cache_file_new) -1) \
- & (~(__alignof__ (struct cache_file_new) - 1)))
-
-static int
-_dl_cache_libcmp (const char *p1, const char *p2)
-{
- while (*p1 != '\0')
- {
- if (*p1 >= '0' && *p1 <= '9')
- {
- if (*p2 >= '0' && *p2 <= '9')
- {
- /* Must compare this numerically. */
- int val1;
- int val2;
-
- val1 = *p1++ - '0';
- val2 = *p2++ - '0';
- while (*p1 >= '0' && *p1 <= '9')
- val1 = val1 * 10 + *p1++ - '0';
- while (*p2 >= '0' && *p2 <= '9')
- val2 = val2 * 10 + *p2++ - '0';
- if (val1 != val2)
- return val1 - val2;
- }
- else
- return 1;
- }
- else if (*p2 >= '0' && *p2 <= '9')
- return -1;
- else if (*p1 != *p2)
- return *p1 - *p2;
- else
- {
- ++p1;
- ++p2;
- }
- }
- return *p1 - *p2;
-}
diff --git a/newlib/libc/sys/linux/dl/dl-close.c b/newlib/libc/sys/linux/dl/dl-close.c
deleted file mode 100644
index ef53868d9..000000000
--- a/newlib/libc/sys/linux/dl/dl-close.c
+++ /dev/null
@@ -1,334 +0,0 @@
-/* Close a shared object opened by `_dl_open'.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <assert.h>
-#include <dlfcn.h>
-#include <libintl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <bits/libc-lock.h>
-#include <ldsodefs.h>
-#include <sys/types.h>
-#include <sys/mman.h>
-
-
-/* Type of the constructor functions. */
-typedef void (*fini_t) (void);
-
-
-void
-internal_function
-_dl_close (void *_map)
-{
- struct reldep_list
- {
- struct link_map **rellist;
- unsigned int nrellist;
- struct reldep_list *next;
- } *reldeps = NULL;
- struct link_map **list;
- struct link_map *map = _map;
- unsigned int i;
- unsigned int *new_opencount;
-
- /* First see whether we can remove the object at all. */
- if (__builtin_expect (map->l_flags_1 & DF_1_NODELETE, 0)
- && map->l_init_called)
- /* Nope. Do nothing. */
- return;
-
- if (__builtin_expect (map->l_opencount, 1) == 0)
- _dl_signal_error (0, map->l_name, NULL, N_("shared object not open"));
-
- /* Acquire the lock. */
-#ifdef HAVE_DD_LOCK
- __lock_acquire(_dl_load_lock);
-#endif
-
-
- /* Decrement the reference count. */
- if (map->l_opencount > 1 || map->l_type != lt_loaded)
- {
- /* There are still references to this object. Do nothing more. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_FILES, 0))
- _dl_debug_printf ("\nclosing file=%s; opencount == %u\n",
- map->l_name, map->l_opencount);
-
- /* One decrement the object itself, not the dependencies. */
- --map->l_opencount;
-
-#ifdef HAVE_DD_LOCK
- __lock_release(_dl_load_lock);
-#endif
-
- return;
- }
-
- list = map->l_initfini;
-
- /* Compute the new l_opencount values. */
- i = map->l_searchlist.r_nlist;
- if (__builtin_expect (i == 0, 0))
- /* This can happen if we handle relocation dependencies for an
- object which wasn't loaded directly. */
- for (i = 1; list[i] != NULL; ++i)
- ;
-
- new_opencount = (unsigned int *) alloca (i * sizeof (unsigned int));
-
- for (i = 0; list[i] != NULL; ++i)
- {
- list[i]->l_idx = i;
- new_opencount[i] = list[i]->l_opencount;
- }
- --new_opencount[0];
- for (i = 1; list[i] != NULL; ++i)
- if ((! (list[i]->l_flags_1 & DF_1_NODELETE) || ! list[i]->l_init_called)
- /* Decrement counter. */
- && --new_opencount[i] == 0
- /* Test whether this object was also loaded directly. */
- && list[i]->l_searchlist.r_list != NULL)
- {
- /* In this case we have the decrement all the dependencies of
- this object. They are all in MAP's dependency list. */
- unsigned int j;
- struct link_map **dep_list = list[i]->l_searchlist.r_list;
-
- for (j = 1; j < list[i]->l_searchlist.r_nlist; ++j)
- if (! (dep_list[j]->l_flags_1 & DF_1_NODELETE)
- || ! dep_list[j]->l_init_called)
- {
- assert (dep_list[j]->l_idx < map->l_searchlist.r_nlist);
- --new_opencount[dep_list[j]->l_idx];
- }
- }
- assert (new_opencount[0] == 0);
-
- /* Call all termination functions at once. */
- for (i = 0; list[i] != NULL; ++i)
- {
- struct link_map *imap = list[i];
- if (new_opencount[i] == 0 && imap->l_type == lt_loaded
- && (imap->l_info[DT_FINI] || imap->l_info[DT_FINI_ARRAY])
- && (! (imap->l_flags_1 & DF_1_NODELETE) || ! imap->l_init_called)
- /* Skip any half-cooked objects that were never initialized. */
- && imap->l_init_called)
- {
- /* When debugging print a message first. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
- _dl_debug_printf ("\ncalling fini: %s\n\n", imap->l_name);
-
- /* Call its termination function. */
- if (imap->l_info[DT_FINI_ARRAY] != NULL)
- {
- ElfW(Addr) *array =
- (ElfW(Addr) *) (imap->l_addr
- + imap->l_info[DT_FINI_ARRAY]->d_un.d_ptr);
- unsigned int sz = (imap->l_info[DT_FINI_ARRAYSZ]->d_un.d_val
- / sizeof (ElfW(Addr)));
- unsigned int cnt;
-
- for (cnt = 0; cnt < sz; ++cnt)
- ((fini_t) (imap->l_addr + array[cnt])) ();
- }
-
- /* Next try the old-style destructor. */
- if (imap->l_info[DT_FINI] != NULL)
- (*(void (*) (void)) DL_DT_FINI_ADDRESS
- (imap, (void *) imap->l_addr
- + imap->l_info[DT_FINI]->d_un.d_ptr)) ();
- }
- else if (new_opencount[i] != 0 && imap->l_type == lt_loaded)
- {
- /* The object is still used. But the object we are unloading
- right now is responsible for loading it and therefore we
- have the search list of the current object in its scope.
- Remove it. */
- struct r_scope_elem **runp = imap->l_scope;
-
- while (*runp != NULL)
- if (*runp == &map->l_searchlist)
- {
- /* Copy all later elements. */
- while ((runp[0] = runp[1]) != NULL)
- ++runp;
- break;
- }
- else
- ++runp;
- }
-
- /* Store the new l_opencount value. */
- imap->l_opencount = new_opencount[i];
- /* Just a sanity check. */
- assert (imap->l_type == lt_loaded || imap->l_opencount > 0);
- }
-
- /* Notify the debugger we are about to remove some loaded objects. */
- _r_debug.r_state = RT_DELETE;
- _dl_debug_state ();
-
- /* Check each element of the search list to see if all references to
- it are gone. */
- for (i = 0; list[i] != NULL; ++i)
- {
- struct link_map *imap = list[i];
- if (imap->l_opencount == 0 && imap->l_type == lt_loaded)
- {
- struct libname_list *lnp;
-
- /* That was the last reference, and this was a dlopen-loaded
- object. We can unmap it. */
- if (__builtin_expect (imap->l_global, 0))
- {
- /* This object is in the global scope list. Remove it. */
- unsigned int cnt = _dl_main_searchlist->r_nlist;
-
- do
- --cnt;
- while (_dl_main_searchlist->r_list[cnt] != imap);
-
- /* The object was already correctly registered. */
- while (++cnt < _dl_main_searchlist->r_nlist)
- _dl_main_searchlist->r_list[cnt - 1]
- = _dl_main_searchlist->r_list[cnt];
-
- --_dl_main_searchlist->r_nlist;
- }
-
- /* We can unmap all the maps at once. We determined the
- start address and length when we loaded the object and
- the `munmap' call does the rest. */
- DL_UNMAP (imap);
-
- /* Finally, unlink the data structure and free it. */
-#ifdef SHARED
- /* We will unlink the first object only if this is a statically
- linked program. */
- assert (imap->l_prev != NULL);
- imap->l_prev->l_next = imap->l_next;
-#else
- if (imap->l_prev != NULL)
- imap->l_prev->l_next = imap->l_next;
- else
- _dl_loaded = imap->l_next;
-#endif
- --_dl_nloaded;
- if (imap->l_next)
- imap->l_next->l_prev = imap->l_prev;
-
- if (imap->l_versions != NULL)
- free (imap->l_versions);
- if (imap->l_origin != NULL && imap->l_origin != (char *) -1)
- free ((char *) imap->l_origin);
-
- /* If the object has relocation dependencies save this
- information for latter. */
- if (__builtin_expect (imap->l_reldeps != NULL, 0))
- {
- struct reldep_list *newrel;
-
- newrel = (struct reldep_list *) alloca (sizeof (*reldeps));
- newrel->rellist = imap->l_reldeps;
- newrel->nrellist = imap->l_reldepsact;
- newrel->next = reldeps;
-
- reldeps = newrel;
- }
-
- /* This name always is allocated. */
- free (imap->l_name);
- /* Remove the list with all the names of the shared object. */
- lnp = imap->l_libname;
- do
- {
- struct libname_list *this = lnp;
- lnp = lnp->next;
- if (!this->dont_free)
- free (this);
- }
- while (lnp != NULL);
-
- /* Remove the searchlists. */
- if (imap != map)
- free (imap->l_initfini);
-
- /* Remove the scope array if we allocated it. */
- if (imap->l_scope != imap->l_scope_mem)
- free (imap->l_scope);
-
- if (imap->l_phdr_allocated)
- free ((void *) imap->l_phdr);
-
- if (imap->l_rpath_dirs.dirs != (void *) -1)
- free (imap->l_rpath_dirs.dirs);
- if (imap->l_runpath_dirs.dirs != (void *) -1)
- free (imap->l_runpath_dirs.dirs);
-
- free (imap);
- }
- }
-
- /* Notify the debugger those objects are finalized and gone. */
- _r_debug.r_state = RT_CONSISTENT;
- _dl_debug_state ();
-
- /* Now we can perhaps also remove the modules for which we had
- dependencies because of symbol lookup. */
- while (__builtin_expect (reldeps != NULL, 0))
- {
- while (reldeps->nrellist-- > 0)
- _dl_close (reldeps->rellist[reldeps->nrellist]);
-
- free (reldeps->rellist);
-
- reldeps = reldeps->next;
- }
-
- free (list);
-
- /* Release the lock. */
-#ifdef HAVE_DD_LOCK
- __lock_release(_dl_load_lock);
-#endif
-
-
-}
-
-
-static void
-free_mem (void)
-{
- if (__builtin_expect (_dl_global_scope_alloc, 0) != 0
- && _dl_main_searchlist->r_nlist == _dl_initial_searchlist.r_nlist)
- {
- /* All object dynamically loaded by the program are unloaded. Free
- the memory allocated for the global scope variable. */
- struct link_map **old = _dl_main_searchlist->r_list;
-
- /* Put the old map in. */
- _dl_main_searchlist->r_list = _dl_initial_searchlist.r_list;
- /* Signal that the original map is used. */
- _dl_global_scope_alloc = 0;
-
- /* Now free the old map. */
- free (old);
- }
-}
-text_set_element (__libc_subfreeres, free_mem);
diff --git a/newlib/libc/sys/linux/dl/dl-debug.c b/newlib/libc/sys/linux/dl/dl-debug.c
deleted file mode 100644
index 5a51b5335..000000000
--- a/newlib/libc/sys/linux/dl/dl-debug.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Communicate dynamic linker state to the debugger at runtime.
- Copyright (C) 1996, 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <ldsodefs.h>
-
-/* This structure communicates dl state to the debugger. The debugger
- normally finds it via the DT_DEBUG entry in the dynamic section, but in
- a statically-linked program there is no dynamic section for the debugger
- to examine and it looks for this particular symbol name. */
-struct r_debug _r_debug;
-
-
-/* Initialize _r_debug if it has not already been done. The argument is
- the run-time load address of the dynamic linker, to be put in
- _r_debug.r_ldbase. Returns the address of _r_debug. */
-
-struct r_debug *
-internal_function
-_dl_debug_initialize (ElfW(Addr) ldbase)
-{
- if (_r_debug.r_brk == 0)
- {
- /* Tell the debugger where to find the map of loaded objects. */
- _r_debug.r_version = 1 /* R_DEBUG_VERSION XXX */;
- _r_debug.r_ldbase = ldbase;
- _r_debug.r_map = _dl_loaded;
- _r_debug.r_brk = (ElfW(Addr)) &_dl_debug_state;
- }
-
- return &_r_debug;
-}
-
-
-/* This function exists solely to have a breakpoint set on it by the
- debugger. The debugger is supposed to find this function's address by
- examining the r_brk member of struct r_debug, but GDB 4.15 in fact looks
- for this particular symbol name in the PT_INTERP file. */
-void
-_dl_debug_state (void)
-{
-}
diff --git a/newlib/libc/sys/linux/dl/dl-deps.c b/newlib/libc/sys/linux/dl/dl-deps.c
deleted file mode 100644
index 4596a85d7..000000000
--- a/newlib/libc/sys/linux/dl/dl-deps.c
+++ /dev/null
@@ -1,561 +0,0 @@
-/* Load the dependencies of a mapped object.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <assert.h>
-#include <dlfcn.h>
-#include <errno.h>
-#include <libintl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <ldsodefs.h>
-
-#include <dl-dst.h>
-
-/* Whether an shared object references one or more auxiliary objects
- is signaled by the AUXTAG entry in l_info. */
-#define AUXTAG (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
- + DT_EXTRATAGIDX (DT_AUXILIARY))
-/* Whether an shared object references one or more auxiliary objects
- is signaled by the AUXTAG entry in l_info. */
-#define FILTERTAG (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
- + DT_EXTRATAGIDX (DT_FILTER))
-
-/* This is zero at program start to signal that the global scope map is
- allocated by rtld. Later it keeps the size of the map. It might be
- reset if in _dl_close if the last global object is removed. */
-size_t _dl_global_scope_alloc;
-
-extern size_t _dl_platformlen;
-
-/* When loading auxiliary objects we must ignore errors. It's ok if
- an object is missing. */
-struct openaux_args
- {
- /* The arguments to openaux. */
- struct link_map *map;
- int trace_mode;
- const char *strtab;
- const char *name;
-
- /* The return value of openaux. */
- struct link_map *aux;
- };
-
-static void
-openaux (void *a)
-{
- struct openaux_args *args = (struct openaux_args *) a;
-
- args->aux = _dl_map_object (args->map, args->name, 0,
- (args->map->l_type == lt_executable
- ? lt_library : args->map->l_type),
- args->trace_mode, 0);
-}
-
-
-
-/* We use a very special kind of list to track the path
- through the list of loaded shared objects. We have to
- produce a flat list with unique members of all involved objects.
-*/
-struct list
- {
- int done; /* Nonzero if this map was processed. */
- struct link_map *map; /* The data. */
- struct list *next; /* Elements for normal list. */
- };
-
-
-/* Macro to expand DST. It is an macro since we use `alloca'. */
-#define expand_dst(l, str, fatal) \
- ({ \
- const char *__str = (str); \
- const char *__result = __str; \
- size_t __cnt = DL_DST_COUNT(__str, 0); \
- \
- if (__cnt != 0) \
- { \
- char *__newp; \
- \
- __newp = (char *) alloca (DL_DST_REQUIRED (l, __str, strlen (__str), \
- __cnt)); \
- \
- __result = DL_DST_SUBSTITUTE (l, __str, __newp, 0); \
- \
- if (*__result == '\0') \
- { \
- /* The replacement for the DST is not known. We can't \
- processed. */ \
- if (fatal) \
- _dl_signal_error (0, __str, NULL, N_("\
-empty dynamics string token substitution")); \
- else \
- { \
- /* This is for DT_AUXILIARY. */ \
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_LIBS, 0)) \
- _dl_debug_printf ("cannot load auxiliary `%s' because of" \
- "empty dynamic string token " \
- "substitution\n", __str); \
- continue; \
- } \
- } \
- } \
- \
- __result; })
-
-
-void
-internal_function
-_dl_map_object_deps (struct link_map *map,
- struct link_map **preloads, unsigned int npreloads,
- int trace_mode)
-{
- struct list known[1 + npreloads + 1];
- struct list *runp, *tail;
- unsigned int nlist, i;
- /* Object name. */
- const char *name;
- int errno_saved;
- int errno_reason;
- const char *errstring;
- const char *objname;
-
- auto inline void preload (struct link_map *map);
-
- inline void preload (struct link_map *map)
- {
- known[nlist].done = 0;
- known[nlist].map = map;
- known[nlist].next = &known[nlist + 1];
-
- ++nlist;
- /* We use `l_reserved' as a mark bit to detect objects we have
- already put in the search list and avoid adding duplicate
- elements later in the list. */
- map->l_reserved = 1;
- }
-
- /* No loaded object so far. */
- nlist = 0;
-
- /* First load MAP itself. */
- preload (map);
-
- /* Add the preloaded items after MAP but before any of its dependencies. */
- for (i = 0; i < npreloads; ++i)
- preload (preloads[i]);
-
- /* Terminate the lists. */
- known[nlist - 1].next = NULL;
-
- /* Pointer to last unique object. */
- tail = &known[nlist - 1];
-
- /* Process each element of the search list, loading each of its
- auxiliary objects and immediate dependencies. Auxiliary objects
- will be added in the list before the object itself and
- dependencies will be appended to the list as we step through it.
- This produces a flat, ordered list that represents a
- breadth-first search of the dependency tree.
-
- The whole process is complicated by the fact that we better
- should use alloca for the temporary list elements. But using
- alloca means we cannot use recursive function calls. */
- errno_saved = errno;
- errno_reason = 0;
- errstring = NULL;
- errno = 0;
- name = NULL;
- for (runp = known; runp; )
- {
- struct link_map *l = runp->map;
- struct link_map **needed = NULL;
- unsigned int nneeded = 0;
-
- /* Unless otherwise stated, this object is handled. */
- runp->done = 1;
-
- /* Allocate a temporary record to contain the references to the
- dependencies of this object. */
- if (l->l_searchlist.r_list == NULL && l->l_initfini == NULL
- && l != map && l->l_ldnum > 0)
- needed = (struct link_map **) alloca (l->l_ldnum
- * sizeof (struct link_map *));
-
- if (l->l_info[DT_NEEDED] || l->l_info[AUXTAG] || l->l_info[FILTERTAG])
- {
- const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]);
- struct openaux_args args;
- struct list *orig;
- const ElfW(Dyn) *d;
-
- args.strtab = strtab;
- args.map = l;
- args.trace_mode = trace_mode;
- orig = runp;
-
- for (d = l->l_ld; d->d_tag != DT_NULL; ++d)
- if (__builtin_expect (d->d_tag, DT_NEEDED) == DT_NEEDED)
- {
- /* Map in the needed object. */
- struct link_map *dep;
- int err;
-
- /* Recognize DSTs. */
- name = expand_dst (l, strtab + d->d_un.d_val, 0);
- /* Store the tag in the argument structure. */
- args.name = name;
-
- err = _dl_catch_error (&objname, &errstring, openaux, &args);
- if (__builtin_expect (errstring != NULL, 0))
- {
- if (err)
- errno_reason = err;
- else
- errno_reason = -1;
- goto out;
- }
- else
- dep = args.aux;
-
- if (! dep->l_reserved)
- {
- /* Allocate new entry. */
- struct list *newp;
-
- newp = alloca (sizeof (struct list));
-
- /* Append DEP to the list. */
- newp->map = dep;
- newp->done = 0;
- newp->next = NULL;
- tail->next = newp;
- tail = newp;
- ++nlist;
- /* Set the mark bit that says it's already in the list. */
- dep->l_reserved = 1;
- }
-
- /* Remember this dependency. */
- if (needed != NULL)
- needed[nneeded++] = dep;
- }
- else if (d->d_tag == DT_AUXILIARY || d->d_tag == DT_FILTER)
- {
- struct list *newp;
-
- /* Recognize DSTs. */
- name = expand_dst (l, strtab + d->d_un.d_val,
- d->d_tag == DT_AUXILIARY);
- /* Store the tag in the argument structure. */
- args.name = name;
-
- if (d->d_tag == DT_AUXILIARY)
- {
- int err;
-
- /* Say that we are about to load an auxiliary library. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_LIBS, 0))
- _dl_debug_printf ("load auxiliary object=%s"
- " requested by file=%s\n", name,
- l->l_name[0]
- ? l->l_name : _dl_argv[0]);
-
- /* We must be prepared that the addressed shared
- object is not available. */
- err = _dl_catch_error (&objname, &errstring, openaux,
- &args);
- if (__builtin_expect (errstring != NULL, 0))
- {
- /* We are not interested in the error message. */
- assert (errstring != NULL);
- if (errstring != _dl_out_of_memory)
- free ((char *) errstring);
-
- /* Simply ignore this error and continue the work. */
- continue;
- }
- }
- else
- {
- int err;
-
- /* Say that we are about to load an auxiliary library. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_LIBS, 0))
- _dl_debug_printf ("load filtered object=%s"
- " requested by file=%s\n", name,
- l->l_name[0]
- ? l->l_name : _dl_argv[0]);
-
- /* For filter objects the dependency must be available. */
- err = _dl_catch_error (&objname, &errstring, openaux,
- &args);
- if (__builtin_expect (errstring != NULL, 0))
- {
- if (err)
- errno_reason = err;
- else
- errno_reason = -1;
- goto out;
- }
- }
-
- /* The auxiliary object is actually available.
- Incorporate the map in all the lists. */
-
- /* Allocate new entry. This always has to be done. */
- newp = alloca (sizeof (struct list));
-
- /* We want to insert the new map before the current one,
- but we have no back links. So we copy the contents of
- the current entry over. Note that ORIG and NEWP now
- have switched their meanings. */
- memcpy (newp, orig, sizeof (*newp));
-
- /* Initialize new entry. */
- orig->done = 0;
- orig->map = args.aux;
-
- /* Remember this dependency. */
- if (needed != NULL)
- needed[nneeded++] = args.aux;
-
- /* We must handle two situations here: the map is new,
- so we must add it in all three lists. If the map
- is already known, we have two further possibilities:
- - if the object is before the current map in the
- search list, we do nothing. It is already found
- early
- - if the object is after the current one, we must
- move it just before the current map to make sure
- the symbols are found early enough
- */
- if (args.aux->l_reserved)
- {
- /* The object is already somewhere in the list.
- Locate it first. */
- struct list *late;
-
- /* This object is already in the search list we
- are building. Don't add a duplicate pointer.
- Just added by _dl_map_object. */
- for (late = newp; late->next != NULL; late = late->next)
- if (late->next->map == args.aux)
- break;
-
- if (late->next != NULL)
- {
- /* The object is somewhere behind the current
- position in the search path. We have to
- move it to this earlier position. */
- orig->next = newp;
-
- /* Now remove the later entry from the list
- and adjust the tail pointer. */
- if (tail == late->next)
- tail = late;
- late->next = late->next->next;
-
- /* We must move the object earlier in the chain. */
- if (args.aux->l_prev != NULL)
- args.aux->l_prev->l_next = args.aux->l_next;
- if (args.aux->l_next != NULL)
- args.aux->l_next->l_prev = args.aux->l_prev;
-
- args.aux->l_prev = newp->map->l_prev;
- newp->map->l_prev = args.aux;
- if (args.aux->l_prev != NULL)
- args.aux->l_prev->l_next = args.aux;
- args.aux->l_next = newp->map;
- }
- else
- {
- /* The object must be somewhere earlier in the
- list. Undo to the current list element what
- we did above. */
- memcpy (orig, newp, sizeof (*newp));
- continue;
- }
- }
- else
- {
- /* This is easy. We just add the symbol right here. */
- orig->next = newp;
- ++nlist;
- /* Set the mark bit that says it's already in the list. */
- args.aux->l_reserved = 1;
-
- /* The only problem is that in the double linked
- list of all objects we don't have this new
- object at the correct place. Correct this here. */
- if (args.aux->l_prev)
- args.aux->l_prev->l_next = args.aux->l_next;
- if (args.aux->l_next)
- args.aux->l_next->l_prev = args.aux->l_prev;
-
- args.aux->l_prev = newp->map->l_prev;
- newp->map->l_prev = args.aux;
- if (args.aux->l_prev != NULL)
- args.aux->l_prev->l_next = args.aux;
- args.aux->l_next = newp->map;
- }
-
- /* Move the tail pointer if necessary. */
- if (orig == tail)
- tail = newp;
-
- /* Move on the insert point. */
- orig = newp;
- }
- }
-
- /* Terminate the list of dependencies and store the array address. */
- if (needed != NULL)
- {
- needed[nneeded++] = NULL;
-
- l->l_initfini = (struct link_map **)
- malloc ((nneeded + 1) * sizeof needed[0]);
- if (l->l_initfini == NULL)
- _dl_signal_error (ENOMEM, map->l_name, NULL,
- N_("cannot allocate dependency list"));
- l->l_initfini[0] = l;
- memcpy (&l->l_initfini[1], needed, nneeded * sizeof needed[0]);
- }
-
- /* If we have no auxiliary objects just go on to the next map. */
- if (runp->done)
- do
- runp = runp->next;
- while (runp != NULL && runp->done);
- }
-
- out:
- if (errno == 0 && errno_saved != 0)
- __set_errno (errno_saved);
-
- if (map->l_initfini != NULL && map->l_type == lt_loaded)
- {
- /* This object was previously loaded as a dependency and we have
- a separate l_initfini list. We don't need it anymore. */
- assert (map->l_searchlist.r_list == NULL);
- free (map->l_initfini);
- }
-
- /* Store the search list we built in the object. It will be used for
- searches in the scope of this object. */
- map->l_initfini =
- (struct link_map **) malloc ((2 * nlist + 1)
- * sizeof (struct link_map *));
- if (map->l_initfini == NULL)
- _dl_signal_error (ENOMEM, map->l_name, NULL,
- N_("cannot allocate symbol search list"));
-
-
- map->l_searchlist.r_list = &map->l_initfini[nlist + 1];
- map->l_searchlist.r_nlist = nlist;
-
- for (nlist = 0, runp = known; runp; runp = runp->next)
- {
- if (__builtin_expect (trace_mode, 0) && runp->map->l_faked)
- /* This can happen when we trace the loading. */
- --map->l_searchlist.r_nlist;
- else
- map->l_searchlist.r_list[nlist++] = runp->map;
-
- /* Now clear all the mark bits we set in the objects on the search list
- to avoid duplicates, so the next call starts fresh. */
- runp->map->l_reserved = 0;
- }
-
- /* Maybe we can remove some relocation dependencies now. */
- assert (map->l_searchlist.r_list[0] == map);
- for (i = 0; i < map->l_reldepsact; ++i)
- {
- unsigned int j;
-
- for (j = 1; j < nlist; ++j)
- if (map->l_searchlist.r_list[j] == map->l_reldeps[i])
- {
- /* A direct or transitive dependency is also on the list
- of relocation dependencies. Remove the latter. */
- --map->l_reldeps[i]->l_opencount;
-
- for (j = i + 1; j < map->l_reldepsact; ++j)
- map->l_reldeps[j - 1] = map->l_reldeps[j];
-
- --map->l_reldepsact;
-
- /* Account for the '++i' performed by the 'for'. */
- --i;
- break;
- }
- }
-
- /* Now determine the order in which the initialization has to happen. */
- memcpy (map->l_initfini, map->l_searchlist.r_list,
- nlist * sizeof (struct link_map *));
- /* We can skip looking for the binary itself which is at the front
- of the search list. Look through the list backward so that circular
- dependencies are not changing the order. */
- for (i = 1; i < nlist; ++i)
- {
- struct link_map *l = map->l_searchlist.r_list[i];
- unsigned int j;
- unsigned int k;
-
- /* Find the place in the initfini list where the map is currently
- located. */
- for (j = 1; map->l_initfini[j] != l; ++j)
- ;
-
- /* Find all object for which the current one is a dependency and
- move the found object (if necessary) in front. */
- for (k = j + 1; k < nlist; ++k)
- {
- struct link_map **runp;
-
- runp = map->l_initfini[k]->l_initfini;
- if (runp != NULL)
- {
- while (*runp != NULL)
- if (__builtin_expect (*runp++ == l, 0))
- {
- struct link_map *here = map->l_initfini[k];
-
- /* Move it now. */
- memmove (&map->l_initfini[j] + 1,
- &map->l_initfini[j],
- (k - j) * sizeof (struct link_map *));
- map->l_initfini[j] = here;
-
- break;
- }
- }
- }
- }
- /* Terminate the list of dependencies. */
- map->l_initfini[nlist] = NULL;
-
- if (errno_reason)
- _dl_signal_error (errno_reason == -1 ? 0 : errno_reason,
- objname, NULL, errstring);
-}
diff --git a/newlib/libc/sys/linux/dl/dl-dst.h b/newlib/libc/sys/linux/dl/dl-dst.h
deleted file mode 100644
index ccebf9259..000000000
--- a/newlib/libc/sys/linux/dl/dl-dst.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Handling of dynamic sring tokens.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Determine the number of DST elements in the name. Only if IS_PATH is
- nonzero paths are recognized (i.e., multiple, ':' separated filenames). */
-#define DL_DST_COUNT(name, is_path) \
- ({ \
- size_t __cnt = 0; \
- const char *__sf = strchr (name, '$'); \
- \
- if (__builtin_expect (__sf != NULL, 0)) \
- __cnt = _dl_dst_count (__sf, is_path); \
- \
- __cnt; })
-
-/* Prototype for used function. */
-extern size_t _dl_dst_count (const char *name, int is_path);
-
-
-/* Guess from the number of DSTs the length of the result string. */
-#define DL_DST_REQUIRED(l, name, len, cnt) 1024
-
-/* Perform the DST substitution. */
-#define DL_DST_SUBSTITUTE(l, name, res, is_path) \
- _dl_dst_substitute (l, name, res, is_path)
-
-/* Prototype for used function. */
-extern char *_dl_dst_substitute (struct link_map *l, const char *name,
- char *result, int is_path);
diff --git a/newlib/libc/sys/linux/dl/dl-error.c b/newlib/libc/sys/linux/dl/dl-error.c
deleted file mode 100644
index 9c0f55f7f..000000000
--- a/newlib/libc/sys/linux/dl/dl-error.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/* Error handling for runtime dynamic linker.
- Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <libintl.h>
-#include <setjmp.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <sys/libc-tsd.h>
-
-/* This structure communicates state between _dl_catch_error and
- _dl_signal_error. */
-struct catch
- {
- const char *objname; /* Object/File name. */
- const char *errstring; /* Error detail filled in here. */
- jmp_buf env; /* longjmp here on error. */
- };
-
-/* Multiple threads at once can use the `_dl_catch_error' function. The
- calls can come from `_dl_map_object_deps', `_dlerror_run', or from
- any of the libc functionality which loads dynamic objects (NSS, iconv).
- Therefore we have to be prepared to save the state in thread-local
- memory. */
-
-__libc_tsd_define (static, DL_ERROR)
-#define tsd_getspecific() __libc_tsd_get (DL_ERROR)
-#define tsd_setspecific(data) __libc_tsd_set (DL_ERROR, (data))
-
-
-/* This message we return as a last resort. We define the string in a
- variable since we have to avoid freeing it and so have to enable
- a pointer comparison. See below and in dlfcn/dlerror.c. */
-const char _dl_out_of_memory[] = "out of memory";
-
-
-/* This points to a function which is called when an continuable error is
- received. Unlike the handling of `catch' this function may return.
- The arguments will be the `errstring' and `objname'.
-
- Since this functionality is not used in normal programs (only in ld.so)
- we do not care about multi-threaded programs here. We keep this as a
- global variable. */
-static receiver_fct receiver;
-
-
-void
-internal_function
-_dl_signal_error (int errcode, const char *objname, const char *occation,
- const char *errstring)
-{
- struct catch *lcatch;
-
- if (! errstring)
- errstring = N_("DYNAMIC LINKER BUG!!!");
-
- lcatch = tsd_getspecific ();
- if (objname == NULL)
- objname = "";
- if (lcatch != NULL)
- {
- /* We are inside _dl_catch_error. Return to it. We have to
- duplicate the error string since it might be allocated on the
- stack. The object name is always a string constant. */
- size_t len_objname = strlen (objname) + 1;
- size_t len_errstring = strlen (errstring) + 1;
-
- lcatch->errstring = (char *) malloc (len_objname + len_errstring);
- if (lcatch->errstring != NULL)
- {
- char *tmp;
- /* Make a copy of the object file name and the error string. */
- tmp = memcpy ((char *) lcatch->errstring,
- errstring, len_errstring);
- tmp += len_errstring;
- lcatch->objname = memcpy (tmp,
- objname, len_objname);
- }
- else
- {
- /* This is better than nothing. */
- lcatch->objname = "";
- lcatch->errstring = _dl_out_of_memory;
- }
- longjmp (lcatch->env, errcode ?: -1);
- }
- else
- {
- /* Lossage while resolving the program's own symbols is always fatal. */
- char buffer[1024];
- _dl_fatal_printf ("%s: %s: %s%s%s%s%s\n",
- _dl_argv[0] ?: "<program name unknown>",
- occation ?: N_("error while loading shared libraries"),
- objname, *objname ? ": " : "",
- errstring, errcode ? ": " : "",
- (errcode
- ? __strerror_r (errcode, buffer, sizeof buffer)
- : ""));
- }
-}
-
-
-void
-internal_function
-_dl_signal_cerror (int errcode, const char *objname, const char *occation,
- const char *errstring)
-{
- if (receiver)
- {
- /* We are inside _dl_receive_error. Call the user supplied
- handler and resume the work. The receiver will still be
- installed. */
- (*receiver) (errcode, objname, errstring);
- }
- else
- _dl_signal_error (errcode, objname, occation, errstring);
-}
-
-
-int
-internal_function
-_dl_catch_error (const char **objname, const char **errstring,
- void (*operate) (void *), void *args)
-{
- int errcode;
- struct catch *volatile old;
- struct catch c;
- /* We need not handle `receiver' since setting a `catch' is handled
- before it. */
-
- /* Some systems (e.g., SPARC) handle constructors to local variables
- inefficient. So we initialize `c' by hand. */
- c.errstring = NULL;
-
- old = tsd_getspecific ();
- errcode = setjmp (c.env);
- if (__builtin_expect (errcode, 0) == 0)
- {
- tsd_setspecific (&c);
- (*operate) (args);
- tsd_setspecific (old);
- *objname = NULL;
- *errstring = NULL;
- return 0;
- }
-
- /* We get here only if we longjmp'd out of OPERATE. */
- tsd_setspecific (old);
- *objname = c.objname;
- *errstring = c.errstring;
- return errcode == -1 ? 0 : errcode;
-}
-
-void
-internal_function
-_dl_receive_error (receiver_fct fct, void (*operate) (void *), void *args)
-{
- struct catch *old_catch;
- receiver_fct old_receiver;
-
- old_catch = tsd_getspecific ();
- old_receiver = receiver;
-
- /* Set the new values. */
- tsd_setspecific (NULL);
- receiver = fct;
-
- (*operate) (args);
-
- tsd_setspecific (old_catch);
- receiver = old_receiver;
-}
diff --git a/newlib/libc/sys/linux/dl/dl-fini.c b/newlib/libc/sys/linux/dl/dl-fini.c
deleted file mode 100644
index fc4f4b68a..000000000
--- a/newlib/libc/sys/linux/dl/dl-fini.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/* Call the termination functions of loaded shared objects.
- Copyright (C) 1995,96,98,99,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <alloca.h>
-#include <assert.h>
-#include <string.h>
-#include <ldsodefs.h>
-
-
-/* Type of the constructor functions. */
-typedef void (*fini_t) (void);
-
-
-void
-internal_function
-_dl_fini (void)
-{
- /* Lots of fun ahead. We have to call the destructors for all still
- loaded objects. The problem is that the ELF specification now
- demands that dependencies between the modules are taken into account.
- I.e., the destructor for a module is called before the ones for any
- of its dependencies.
-
- To make things more complicated, we cannot simply use the reverse
- order of the constructors. Since the user might have loaded objects
- using `dlopen' there are possibly several other modules with its
- dependencies to be taken into account. Therefore we have to start
- determining the order of the modules once again from the beginning. */
- unsigned int i;
- struct link_map *l;
- struct link_map **maps;
-
- /* XXX Could it be (in static binaries) that there is no object loaded? */
- assert (_dl_nloaded > 0);
-
- /* Now we can allocate an array to hold all the pointers and copy
- the pointers in. */
- maps = (struct link_map **) alloca (_dl_nloaded
- * sizeof (struct link_map *));
- for (l = _dl_loaded, i = 0; l != NULL; l = l->l_next)
- {
- assert (i < _dl_nloaded);
-
- maps[i++] = l;
-
- /* Bump l_opencount of all objects so that they are not dlclose()ed
- from underneath us. */
- ++l->l_opencount;
- }
- assert (i == _dl_nloaded);
-
- /* Now we have to do the sorting. */
- for (l = _dl_loaded->l_next; l != NULL; l = l->l_next)
- {
- unsigned int j;
- unsigned int k;
-
- /* Find the place in the `maps' array. */
- for (j = 1; maps[j] != l; ++j)
- ;
-
- /* Find all object for which the current one is a dependency and
- move the found object (if necessary) in front. */
- for (k = j + 1; k < _dl_nloaded; ++k)
- {
- struct link_map **runp;
-
- runp = maps[k]->l_initfini;
- if (runp != NULL)
- {
- while (*runp != NULL)
- if (*runp == l)
- {
- struct link_map *here = maps[k];
-
- /* Move it now. */
- memmove (&maps[j] + 1,
- &maps[j],
- (k - j) * sizeof (struct link_map *));
- maps[j++] = here;
-
- break;
- }
- else
- ++runp;
- }
-
- if (__builtin_expect (maps[k]->l_reldeps != NULL, 0))
- {
- unsigned int m = maps[k]->l_reldepsact;
- struct link_map **relmaps = maps[k]->l_reldeps;
-
- while (m-- > 0)
- {
- if (relmaps[m] == l)
- {
- struct link_map *here = maps[k];
-
- /* Move it now. */
- memmove (&maps[j] + 1,
- &maps[j],
- (k - j) * sizeof (struct link_map *));
- maps[j] = here;
-
- break;
- }
-
- }
- }
- }
- }
-
- /* `maps' now contains the objects in the right order. Now call the
- destructors. We have to process this array from the front. */
- for (i = 0; i < _dl_nloaded; ++i)
- {
- l = maps[i];
-
- if (l->l_init_called)
- {
- /* Make sure nothing happens if we are called twice. */
- l->l_init_called = 0;
-
- /* Don't call the destructors for objects we are not supposed to. */
- if (l->l_name[0] == '\0' && l->l_type == lt_executable)
- continue;
-
- /* Is there a destructor function? */
- if (l->l_info[DT_FINI_ARRAY] == NULL && l->l_info[DT_FINI] == NULL)
- continue;
-
- /* When debugging print a message first. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
- _dl_debug_printf ("\ncalling fini: %s\n\n",
- l->l_name[0] ? l->l_name : _dl_argv[0]);
-
- /* First see whether an array is given. */
- if (l->l_info[DT_FINI_ARRAY] != NULL)
- {
- ElfW(Addr) *array =
- (ElfW(Addr) *) (l->l_addr
- + l->l_info[DT_FINI_ARRAY]->d_un.d_ptr);
- unsigned int sz = (l->l_info[DT_FINI_ARRAYSZ]->d_un.d_val
- / sizeof (ElfW(Addr)));
- unsigned int cnt;
-
- for (cnt = 0; cnt < sz; ++cnt)
- ((fini_t) (l->l_addr + array[cnt])) ();
- }
-
- /* Next try the old-style destructor. */
- if (l->l_info[DT_FINI] != NULL)
- ((fini_t) DL_DT_FINI_ADDRESS (l, l->l_addr + l->l_info[DT_FINI]->d_un.d_ptr)) ();
- }
- }
-}
diff --git a/newlib/libc/sys/linux/dl/dl-init.c b/newlib/libc/sys/linux/dl/dl-init.c
deleted file mode 100644
index 5448b03c3..000000000
--- a/newlib/libc/sys/linux/dl/dl-init.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/* Return the next shared object initializer function not yet run.
- Copyright (C) 1995,1996,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stddef.h>
-#include <ldsodefs.h>
-
-
-/* Type of the initializer. */
-typedef void (*init_t) (int, char **, char **);
-
-/* Flag, nonzero during startup phase. */
-extern int _dl_starting_up;
-
-/* The object to be initialized first. */
-extern struct link_map *_dl_initfirst;
-
-
-static void
-call_init (struct link_map *l, int argc, char **argv, char **env)
-{
- if (l->l_init_called)
- /* This object is all done. */
- return;
-
- /* Avoid handling this constructor again in case we have a circular
- dependency. */
- l->l_init_called = 1;
-
- /* Check for object which constructors we do not run here. */
- if (__builtin_expect (l->l_name[0], 'a') == '\0'
- && l->l_type == lt_executable)
- return;
-
- /* Are there any constructors? */
- if (l->l_info[DT_INIT] == NULL
- && __builtin_expect (l->l_info[DT_INIT_ARRAY] == NULL, 1))
- return;
-
- /* Print a debug message if wanted. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
- _dl_debug_printf ("\ncalling init: %s\n\n",
- l->l_name[0] ? l->l_name : _dl_argv[0]);
-
- /* Now run the local constructors. There are two forms of them:
- - the one named by DT_INIT
- - the others in the DT_INIT_ARRAY.
- */
- if (l->l_info[DT_INIT] != NULL)
- {
- init_t init = (init_t) DL_DT_INIT_ADDRESS
- (l, l->l_addr + l->l_info[DT_INIT]->d_un.d_ptr);
-
- /* Call the function. */
- init (argc, argv, env);
- }
-
- /* Next see whether there is an array with initialization functions. */
- if (l->l_info[DT_INIT_ARRAY] != NULL)
- {
- unsigned int j;
- unsigned int jm;
- ElfW(Addr) *addrs;
-
- jm = l->l_info[DT_INIT_ARRAYSZ]->d_un.d_val / sizeof (ElfW(Addr));
-
- addrs = (ElfW(Addr) *) (l->l_info[DT_INIT_ARRAY]->d_un.d_ptr
- + l->l_addr);
- for (j = 0; j < jm; ++j)
- ((init_t) addrs[j]) (argc, argv, env);
- }
-}
-
-
-void
-internal_function
-_dl_init (struct link_map *main_map, int argc, char **argv, char **env)
-{
- ElfW(Dyn) *preinit_array = main_map->l_info[DT_PREINIT_ARRAY];
- struct r_debug *r;
- unsigned int i;
-
- if (__builtin_expect (_dl_initfirst != NULL, 0))
- {
- call_init (_dl_initfirst, argc, argv, env);
- _dl_initfirst = NULL;
- }
-
- /* Don't do anything if there is no preinit array. */
- if (__builtin_expect (preinit_array != NULL, 0)
- && (i = preinit_array->d_un.d_val / sizeof (ElfW(Addr))) > 0)
- {
- ElfW(Addr) *addrs;
- unsigned int cnt;
-
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
- _dl_debug_printf ("\ncalling preinit: %s\n\n",
- main_map->l_name[0]
- ? main_map->l_name : _dl_argv[0]);
-
- addrs = (ElfW(Addr) *) (main_map->l_info[DT_PREINIT_ARRAY]->d_un.d_ptr
- + main_map->l_addr);
- for (cnt = 0; cnt < i; ++cnt)
- ((init_t) addrs[cnt]) (argc, argv, env);
- }
-
- /* Notify the debugger we have added some objects. We need to call
- _dl_debug_initialize in a static program in case dynamic linking has
- not been used before. */
- r = _dl_debug_initialize (0);
- r->r_state = RT_ADD;
- _dl_debug_state ();
-
- /* Stupid users forced the ELF specification to be changed. It now
- says that the dynamic loader is responsible for determining the
- order in which the constructors have to run. The constructors
- for all dependencies of an object must run before the constructor
- for the object itself. Circular dependencies are left unspecified.
-
- This is highly questionable since it puts the burden on the dynamic
- loader which has to find the dependencies at runtime instead of
- letting the user do it right. Stupidity rules! */
-
- i = main_map->l_searchlist.r_nlist;
- while (i-- > 0)
- call_init (main_map->l_initfini[i], argc, argv, env);
-
- /* Notify the debugger all new objects are now ready to go. */
- r->r_state = RT_CONSISTENT;
- _dl_debug_state ();
-
- /* Finished starting up. */
- _dl_starting_up = 0;
-}
diff --git a/newlib/libc/sys/linux/dl/dl-iteratephdr.c b/newlib/libc/sys/linux/dl/dl-iteratephdr.c
deleted file mode 100644
index a39a4934e..000000000
--- a/newlib/libc/sys/linux/dl/dl-iteratephdr.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Get loaded objects program headers.
- Copyright (C) 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2001.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <ldsodefs.h>
-#include <stddef.h>
-#include <bits/libc-lock.h>
-
-int
-__dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
- size_t size, void *data), void *data)
-{
- struct link_map *l;
- struct dl_phdr_info info;
- int ret = 0;
-
- /* Make sure we are alone. */
-#ifdef HAVE_DD_LOCK
- __lock_acquire(_dl_load_lock);
-#endif
-
-
- for (l = _dl_loaded; l != NULL; l = l->l_next)
- {
- /* Skip the dynamic linker. */
- if (l->l_phdr == NULL)
- continue;
- info.dlpi_addr = l->l_addr;
- info.dlpi_name = l->l_name;
- info.dlpi_phdr = l->l_phdr;
- info.dlpi_phnum = l->l_phnum;
- ret = callback (&info, sizeof (struct dl_phdr_info), data);
- if (ret)
- break;
- }
-
- /* Release the lock. */
-#ifdef HAVE_DD_LOCK
- __lock_release(_dl_load_lock);
-#endif
-
-
- return ret;
-}
-
-#ifdef SHARED
-weak_alias (__dl_iterate_phdr, dl_iterate_phdr);
-#endif
diff --git a/newlib/libc/sys/linux/dl/dl-libc.c b/newlib/libc/sys/linux/dl/dl-libc.c
deleted file mode 100644
index c83448df7..000000000
--- a/newlib/libc/sys/linux/dl/dl-libc.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/* Handle loading and unloading shared objects for internal libc purposes.
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Zack Weinberg <zack@rabi.columbia.edu>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <dlfcn.h>
-#include <stdlib.h>
-#include <ldsodefs.h>
-
-/* The purpose of this file is to provide wrappers around the dynamic
- linker error mechanism (similar to dlopen() et al in libdl) which
- are usable from within libc. Generally we want to throw away the
- string that dlerror() would return and just pass back a null pointer
- for errors. This also lets the rest of libc not know about the error
- handling mechanism.
-
- Much of this code came from gconv_dl.c with slight modifications. */
-
-static int
-internal_function
-dlerror_run (void (*operate) (void *), void *args)
-{
- const char *objname;
- const char *last_errstring = NULL;
- int result;
-
- (void) _dl_catch_error (&objname, &last_errstring, operate, args);
-
- result = last_errstring != NULL;
- if (result && last_errstring != _dl_out_of_memory)
- free ((char *) last_errstring);
-
- return result;
-}
-
-/* These functions are called by dlerror_run... */
-
-struct do_dlopen_args
-{
- /* Argument to do_dlopen. */
- const char *name;
-
- /* Return from do_dlopen. */
- struct link_map *map;
-};
-
-struct do_dlsym_args
-{
- /* Arguments to do_dlsym. */
- struct link_map *map;
- const char *name;
-
- /* Return values of do_dlsym. */
- lookup_t loadbase;
- const ElfW(Sym) *ref;
-};
-
-static void
-do_dlopen (void *ptr)
-{
- struct do_dlopen_args *args = (struct do_dlopen_args *) ptr;
- /* Open and relocate the shared object. */
- args->map = _dl_open (args->name, RTLD_LAZY, NULL);
-}
-
-static void
-do_dlsym (void *ptr)
-{
- struct do_dlsym_args *args = (struct do_dlsym_args *) ptr;
- args->ref = NULL;
- args->loadbase = _dl_lookup_symbol (args->name, args->map, &args->ref,
- args->map->l_local_scope, 0, 1);
-}
-
-static void
-do_dlclose (void *ptr)
-{
- _dl_close ((struct link_map *) ptr);
-}
-
-/* ... and these functions call dlerror_run. */
-
-void *
-__libc_dlopen (const char *__name)
-{
- struct do_dlopen_args args;
- args.name = __name;
-
- return (dlerror_run (do_dlopen, &args) ? NULL : (void *) args.map);
-}
-
-void *
-__libc_dlsym (void *__map, const char *__name)
-{
- struct do_dlsym_args args;
- args.map = __map;
- args.name = __name;
-
- return (dlerror_run (do_dlsym, &args) ? NULL
- : (void *) (DL_SYMBOL_ADDRESS (args.loadbase, args.ref)));
-}
-
-int
-__libc_dlclose (void *__map)
-{
- return dlerror_run (do_dlclose, __map);
-}
-
-
-static void
-free_mem (void)
-{
- struct link_map *l;
- struct r_search_path_elem *d;
-
- /* Remove all search directories. */
- d = _dl_all_dirs;
- while (d != _dl_init_all_dirs)
- {
- struct r_search_path_elem *old = d;
- d = d->next;
- free (old);
- }
-
- /* Remove all additional names added to the objects. */
- for (l = _dl_loaded; l != NULL; l = l->l_next)
- {
- struct libname_list *lnp = l->l_libname->next;
-
- l->l_libname->next = NULL;
-
- while (lnp != NULL)
- {
- struct libname_list *old = lnp;
- lnp = lnp->next;
- if (! old->dont_free)
- free (old);
- }
- }
-}
-text_set_element (__libc_subfreeres, free_mem);
diff --git a/newlib/libc/sys/linux/dl/dl-librecon.h b/newlib/libc/sys/linux/dl/dl-librecon.h
deleted file mode 100644
index 3e39a32e6..000000000
--- a/newlib/libc/sys/linux/dl/dl-librecon.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* Optional code to distinguish library flavours.
- Copyright (C) 1998, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _DL_LIBRECON_H
-#define _DL_LIBRECON_H 1
-
-#define DISTINGUISH_LIB_VERSIONS \
- do \
- { \
- /* We have to find out whether the binary is linked against \
- libc 5 or glibc. We do this by looking at all the DT_NEEDED \
- entries. If one is libc.so.5 this is a libc 5 linked binary. */ \
- if (_dl_loaded->l_info[DT_NEEDED]) \
- { \
- /* We have dependencies. */ \
- const ElfW(Dyn) *d; \
- const char *strtab; \
- \
- strtab = (const char *) D_PTR (_dl_loaded, l_info[DT_STRTAB]); \
- \
- for (d = _dl_loaded->l_ld; d->d_tag != DT_NULL; ++d) \
- if (d->d_tag == DT_NEEDED \
- && strcmp (strtab + d->d_un.d_val, "libc.so.5") == 0) \
- break; \
- \
- /* We print a `5' or `6' depending on the outcome. */ \
- _dl_printf (d->d_tag != DT_NULL ? "5\n" : "6\n"); \
- } \
- } \
- while (0)
-
-/* Recognizing extra environment variables. */
-#define EXTRA_LD_ENVVARS \
- case 13: \
- if (memcmp (envline, "ASSUME_KERNEL", 13) == 0) \
- { \
- unsigned long int i, j, osversion = 0; \
- char *p = &envline[14], *q; \
- \
- for (i = 0; i < 3; i++, p = q + 1) \
- { \
- j = __strtoul_internal (p, &q, 0, 0); \
- if (j >= 255 || p == q || (i < 2 && *q && *q != '.')) \
- { \
- osversion = 0; \
- break; \
- } \
- osversion |= j << (16 - 8 * i); \
- if (!*q) \
- break; \
- } \
- if (osversion) \
- _dl_osversion = osversion; \
- break; \
- } \
- \
- case 15: \
- if (memcmp (envline, "LIBRARY_VERSION", 15) == 0) \
- { \
- _dl_correct_cache_id = envline[16] == '5' ? 2 : 3; \
- break; \
- }
-
-/* Extra unsecure variables. The names are all stuffed in a single
- string which means they have to be terminated with a '\0' explicitly. */
-#define EXTRA_UNSECURE_ENVVARS \
- "LD_AOUT_LIBRARY_PATH\0" \
- "LD_AOUT_PRELOAD\0"
-
-#endif /* dl-librecon.h */
diff --git a/newlib/libc/sys/linux/dl/dl-load.c b/newlib/libc/sys/linux/dl/dl-load.c
deleted file mode 100644
index 4e32d604b..000000000
--- a/newlib/libc/sys/linux/dl/dl-load.c
+++ /dev/null
@@ -1,1830 +0,0 @@
-/* Map in a shared object's segments from the file.
- Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <elf.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <libintl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <sys/mman.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include "dynamic-link.h"
-#include <abi-tag.h>
-#include <dl-osinfo.h>
-
-#include <dl-dst.h>
-
-/* On some systems, no flag bits are given to specify file mapping. */
-#ifndef MAP_FILE
-# define MAP_FILE 0
-#endif
-
-/* The right way to map in the shared library files is MAP_COPY, which
- makes a virtual copy of the data at the time of the mmap call; this
- guarantees the mapped pages will be consistent even if the file is
- overwritten. Some losing VM systems like Linux's lack MAP_COPY. All we
- get is MAP_PRIVATE, which copies each page when it is modified; this
- means if the file is overwritten, we may at some point get some pages
- from the new version after starting with pages from the old version. */
-#ifndef MAP_COPY
-# define MAP_COPY MAP_PRIVATE
-#endif
-
-/* Some systems link their relocatable objects for another base address
- than 0. We want to know the base address for these such that we can
- subtract this address from the segment addresses during mapping.
- This results in a more efficient address space usage. Defaults to
- zero for almost all systems. */
-#ifndef MAP_BASE_ADDR
-# define MAP_BASE_ADDR(l) 0
-#endif
-
-
-#include <endian.h>
-#if BYTE_ORDER == BIG_ENDIAN
-# define byteorder ELFDATA2MSB
-#elif BYTE_ORDER == LITTLE_ENDIAN
-# define byteorder ELFDATA2LSB
-#else
-# error "Unknown BYTE_ORDER " BYTE_ORDER
-# define byteorder ELFDATANONE
-#endif
-
-#define STRING(x) __STRING (x)
-
-#ifdef MAP_ANON
-/* The fd is not examined when using MAP_ANON. */
-# define ANONFD -1
-#else
-int _dl_zerofd = -1;
-# define ANONFD _dl_zerofd
-#endif
-
-/* Handle situations where we have a preferred location in memory for
- the shared objects. */
-#ifdef ELF_PREFERRED_ADDRESS_DATA
-ELF_PREFERRED_ADDRESS_DATA;
-#endif
-#ifndef ELF_PREFERRED_ADDRESS
-# define ELF_PREFERRED_ADDRESS(loader, maplength, mapstartpref) (mapstartpref)
-#endif
-#ifndef ELF_FIXED_ADDRESS
-# define ELF_FIXED_ADDRESS(loader, mapstart) ((void) 0)
-#endif
-
-/* Type for the buffer we put the ELF header and hopefully the program
- header. This buffer does not really have to be too large. In most
- cases the program header follows the ELF header directly. If this
- is not the case all bets are off and we can make the header arbitrarily
- large and still won't get it read. This means the only question is
- how large are the ELF and program header combined. The ELF header
- in 64-bit files is 56 bytes long. Each program header entry is again
- 56 bytes long. I.e., even with a file which has 17 program header
- entries we only have to read 1kB. And 17 program header entries is
- plenty, normal files have < 10. If this heuristic should really fail
- for some file the code in `_dl_map_object_from_fd' knows how to
- recover. */
-struct filebuf
-{
- ssize_t len;
- char buf[1024];
-};
-
-size_t _dl_pagesize;
-
-unsigned int _dl_osversion;
-
-int _dl_clktck;
-
-extern const char *_dl_platform;
-extern size_t _dl_platformlen;
-
-/* The object to be initialized first. */
-struct link_map *_dl_initfirst;
-
-/* This is the decomposed LD_LIBRARY_PATH search path. */
-static struct r_search_path_struct env_path_list;
-
-/* List of the hardware capabilities we might end up using. */
-static const struct r_strlenpair *capstr;
-static size_t ncapstr;
-static size_t max_capstrlen;
-
-
-/* Get the generated information about the trusted directories. */
-#include "trusted-dirs.h"
-
-static const char system_dirs[] = SYSTEM_DIRS;
-static const size_t system_dirs_len[] =
-{
- SYSTEM_DIRS_LEN
-};
-#define nsystem_dirs_len \
- (sizeof (system_dirs_len) / sizeof (system_dirs_len[0]))
-
-
-/* Local version of `strdup' function. */
-static inline char *
-local_strdup (const char *s)
-{
- size_t len = strlen (s) + 1;
- void *new = malloc (len);
-
- if (new == NULL)
- return NULL;
-
- return (char *) memcpy (new, s, len);
-}
-
-
-static size_t
-is_dst (const char *start, const char *name, const char *str, size_t cmplen,
- int is_path, int secure)
-{
- size_t len;
-
- if (strncmp (name, str, cmplen) == 0)
- len = cmplen + 1;
- else if (strncmp (name, str + 1, cmplen - 2) == 0
- && (name[cmplen - 2] == '\0' || name[cmplen - 2] == '/'
- || (is_path && name[cmplen - 2] == ':')))
- len = cmplen - 1;
- else
- return 0;
-
- if (__builtin_expect (secure, 0)
- && ((name[len - 1] != '\0' && (!is_path || name[len - 1] != ':'))
- || (name != start + 1 && (!is_path || name[-2] != ':'))))
- return 0;
-
- return len;
-}
-
-
-size_t
-_dl_dst_count (const char *name, int is_path)
-{
- const char *const start = name;
- size_t cnt = 0;
-
- do
- {
- size_t len = 1;
-
- /* $ORIGIN is not expanded for SUID/GUID programs (except if it
- is $ORIGIN alone) and it must always appear first in path.
-
- Note that it is no bug that the string in the second and
- fourth `strncmp' call is longer than the sequence which is
- actually tested. */
- if ((len = is_dst (start, name + 1, "{ORIGIN}", 8, is_path,
- 0)) != 0
- || ((len = is_dst (start, name + 1, "{PLATFORM}", 10, is_path, 0))
- != 0))
- ++cnt;
-
- name = strchr (name + len, '$');
- }
- while (name != NULL);
-
- return cnt;
-}
-
-
-char *
-_dl_dst_substitute (struct link_map *l, const char *name, char *result,
- int is_path)
-{
- const char *const start = name;
- char *last_elem, *wp;
-
- /* Now fill the result path. While copying over the string we keep
- track of the start of the last path element. When we come accross
- a DST we copy over the value or (if the value is not available)
- leave the entire path element out. */
- last_elem = wp = result;
-
- do
- {
- if (__builtin_expect (*name == '$', 0))
- {
- const char *repl = NULL;
- size_t len = 1;
-
- /* Note that it is no bug that the string in the second and
- fourth `strncmp' call is longer than the sequence which
- is actually tested. */
- if ((len = is_dst (start, name + 1, "{ORIGIN}", 8, is_path,
- 0)) != 0)
- repl = l->l_origin;
- else if ((len = is_dst (start, name + 1, "{PLATFORM}", 10, is_path,
- 0)) != 0)
- repl = _dl_platform;
-
- if (repl != NULL && repl != (const char *) -1)
- {
- wp = strcpy (wp, repl);
- wp += strlen (repl);
- name += len;
- }
- else if (len > 1)
- {
- /* We cannot use this path element, the value of the
- replacement is unknown. */
- wp = last_elem;
- name += len;
- while (*name != '\0' && (!is_path || *name != ':'))
- ++name;
- }
- else
- /* No DST we recognize. */
- *wp++ = *name++;
- }
- else
- {
- *wp++ = *name++;
- if (is_path && *name == ':')
- last_elem = wp;
- }
- }
- while (*name != '\0');
-
- *wp = '\0';
-
- return result;
-}
-
-
-/* Return copy of argument with all recognized dynamic string tokens
- ($ORIGIN and $PLATFORM for now) replaced. On some platforms it
- might not be possible to determine the path from which the object
- belonging to the map is loaded. In this case the path element
- containing $ORIGIN is left out. */
-static char *
-expand_dynamic_string_token (struct link_map *l, const char *s)
-{
- /* We make two runs over the string. First we determine how large the
- resulting string is and then we copy it over. Since this is now
- frequently executed operation we are looking here not for performance
- but rather for code size. */
- size_t cnt;
- size_t total;
- char *result;
-
- /* Determine the number of DST elements. */
- cnt = DL_DST_COUNT (s, 1);
-
- /* If we do not have to replace anything simply copy the string. */
- if (__builtin_expect (cnt, 0) == 0)
- return local_strdup (s);
-
- /* Determine the length of the substituted string. */
- total = DL_DST_REQUIRED (l, s, strlen (s), cnt);
-
- /* Allocate the necessary memory. */
- result = (char *) malloc (total + 1);
- if (result == NULL)
- return NULL;
-
- return DL_DST_SUBSTITUTE (l, s, result, 1);
-}
-
-
-/* Add `name' to the list of names for a particular shared object.
- `name' is expected to have been allocated with malloc and will
- be freed if the shared object already has this name.
- Returns false if the object already had this name. */
-static void
-internal_function
-add_name_to_object (struct link_map *l, const char *name)
-{
- struct libname_list *lnp, *lastp;
- struct libname_list *newname;
- size_t name_len;
-
- lastp = NULL;
- for (lnp = l->l_libname; lnp != NULL; lastp = lnp, lnp = lnp->next)
- if (strcmp (name, lnp->name) == 0)
- return;
-
- name_len = strlen (name) + 1;
- newname = (struct libname_list *) malloc (sizeof *newname + name_len);
- if (newname == NULL)
- {
- /* No more memory. */
- _dl_signal_error (ENOMEM, name, NULL, N_("cannot allocate name record"));
- return;
- }
- /* The object should have a libname set from _dl_new_object. */
- assert (lastp != NULL);
-
- newname->name = memcpy (newname + 1, name, name_len);
- newname->next = NULL;
- newname->dont_free = 0;
- lastp->next = newname;
-}
-
-/* All known directories in sorted order. */
-struct r_search_path_elem *_dl_all_dirs;
-
-/* All directories after startup. */
-struct r_search_path_elem *_dl_init_all_dirs;
-
-/* Standard search directories. */
-static struct r_search_path_struct rtld_search_dirs;
-
-static size_t max_dirnamelen;
-
-static inline struct r_search_path_elem **
-fillin_rpath (char *rpath, struct r_search_path_elem **result, const char *sep,
- int check_trusted, const char *what, const char *where)
-{
- char *cp;
- size_t nelems = 0;
-
- printf("In fillin_rpath\n");
- while ((cp = strsep (&rpath, sep)) != NULL)
- {
- struct r_search_path_elem *dirp;
- size_t len = strlen (cp);
-
- /* `strsep' can pass an empty string. This has to be
- interpreted as `use the current directory'. */
- if (len == 0)
- {
- static const char curwd[] = "./";
- cp = (char *) curwd;
- }
-
- /* Remove trailing slashes (except for "/"). */
- while (len > 1 && cp[len - 1] == '/')
- --len;
-
- /* Now add one if there is none so far. */
- if (len > 0 && cp[len - 1] != '/')
- cp[len++] = '/';
-
- /* Make sure we don't use untrusted directories if we run SUID. */
- if (__builtin_expect (check_trusted, 0))
- {
- const char *trun = system_dirs;
- size_t idx;
- int unsecure = 1;
-
- /* All trusted directories must be complete names. */
- if (cp[0] == '/')
- {
- for (idx = 0; idx < nsystem_dirs_len; ++idx)
- {
- if (len == system_dirs_len[idx]
- && memcmp (trun, cp, len) == 0)
- {
- /* Found it. */
- unsecure = 0;
- break;
- }
-
- trun += system_dirs_len[idx] + 1;
- }
- }
-
- if (unsecure)
- /* Simply drop this directory. */
- continue;
- }
-
- /* See if this directory is already known. */
- for (dirp = _dl_all_dirs; dirp != NULL; dirp = dirp->next)
- if (dirp->dirnamelen == len && memcmp (cp, dirp->dirname, len) == 0)
- break;
-
- if (dirp != NULL)
- {
- /* It is available, see whether it's on our own list. */
- size_t cnt;
- for (cnt = 0; cnt < nelems; ++cnt)
- if (result[cnt] == dirp)
- break;
-
- if (cnt == nelems)
- result[nelems++] = dirp;
- }
- else
- {
- size_t cnt;
- enum r_dir_status init_val;
- size_t where_len = where ? strlen (where) + 1 : 0;
-
- /* It's a new directory. Create an entry and add it. */
- dirp = (struct r_search_path_elem *)
- malloc (sizeof (*dirp) + ncapstr * sizeof (enum r_dir_status)
- + where_len + len + 1);
- if (dirp == NULL)
- _dl_signal_error (ENOMEM, NULL, NULL,
- N_("cannot create cache for search path"));
-
- dirp->dirname = ((char *) dirp + sizeof (*dirp)
- + ncapstr * sizeof (enum r_dir_status));
- *((char *) (memcpy ((char *) dirp->dirname, cp, len) + len)) = '\0';
- dirp->dirnamelen = len;
-
- if (len > max_dirnamelen)
- max_dirnamelen = len;
-
- /* We have to make sure all the relative directories are
- never ignored. The current directory might change and
- all our saved information would be void. */
- init_val = cp[0] != '/' ? existing : unknown;
- for (cnt = 0; cnt < ncapstr; ++cnt)
- dirp->status[cnt] = init_val;
-
- dirp->what = what;
- if (__builtin_expect (where != NULL, 1))
- dirp->where = memcpy ((char *) dirp + sizeof (*dirp) + len + 1
- + ncapstr * sizeof (enum r_dir_status),
- where, where_len);
- else
- dirp->where = NULL;
-
- dirp->next = _dl_all_dirs;
- _dl_all_dirs = dirp;
-
- /* Put it in the result array. */
- result[nelems++] = dirp;
- }
- }
-
- /* Terminate the array. */
- result[nelems] = NULL;
-
- return result;
-}
-
-
-static void
-internal_function
-decompose_rpath (struct r_search_path_struct *sps,
- const char *rpath, struct link_map *l, const char *what)
-{
- /* Make a copy we can work with. */
- const char *where = l->l_name;
- char *copy;
- char *cp;
- struct r_search_path_elem **result;
- size_t nelems;
- /* Initialize to please the compiler. */
- const char *errstring = NULL;
-
- /* First see whether we must forget the RUNPATH and RPATH from this
- object. */
- if (__builtin_expect (_dl_inhibit_rpath != NULL, 0))
- {
- const char *found = strstr (_dl_inhibit_rpath, where);
- if (found != NULL)
- {
- size_t len = strlen (where);
- if ((found == _dl_inhibit_rpath || found[-1] == ':')
- && (found[len] == '\0' || found[len] == ':'))
- {
- /* This object is on the list of objects for which the
- RUNPATH and RPATH must not be used. */
- result = (struct r_search_path_elem **)
- malloc (sizeof (*result));
- if (result == NULL)
- {
- signal_error_cache:
- errstring = N_("cannot create cache for search path");
- signal_error:
- _dl_signal_error (ENOMEM, NULL, NULL, errstring);
- }
-
- result[0] = NULL;
-
- sps->dirs = result;
- sps->malloced = 1;
-
- return;
- }
- }
- }
-
- /* Make a writable copy. At the same time expand possible dynamic
- string tokens. */
- copy = expand_dynamic_string_token (l, rpath);
- if (copy == NULL)
- {
- errstring = N_("cannot create RUNPATH/RPATH copy");
- goto signal_error;
- }
-
- /* Count the number of necessary elements in the result array. */
- nelems = 0;
- for (cp = copy; *cp != '\0'; ++cp)
- if (*cp == ':')
- ++nelems;
-
- /* Allocate room for the result. NELEMS + 1 is an upper limit for the
- number of necessary entries. */
- result = (struct r_search_path_elem **) malloc ((nelems + 1 + 1)
- * sizeof (*result));
- if (result == NULL)
- goto signal_error_cache;
-
- fillin_rpath (copy, result, ":", 0, what, where);
-
- /* Free the copied RPATH string. `fillin_rpath' make own copies if
- necessary. */
- free (copy);
-
- sps->dirs = result;
- /* The caller will change this value if we haven't used a real malloc. */
- sps->malloced = 1;
-}
-
-
-void
-internal_function
-_dl_init_paths (const char *llp)
-{
- size_t idx;
- const char *strp;
- struct r_search_path_elem *pelem, **aelem;
- size_t round_size;
-#ifdef SHARED
- struct link_map *l;
-#endif
- /* Initialize to please the compiler. */
- const char *errstring = NULL;
-
- /* Fill in the information about the application's RPATH and the
- directories addressed by the LD_LIBRARY_PATH environment variable. */
-
- /* Get the capabilities. */
- capstr = _dl_important_hwcaps (_dl_platform, _dl_platformlen,
- &ncapstr, &max_capstrlen);
-
- /* First set up the rest of the default search directory entries. */
- aelem = rtld_search_dirs.dirs = (struct r_search_path_elem **)
- malloc ((nsystem_dirs_len + 1) * sizeof (struct r_search_path_elem *));
- if (rtld_search_dirs.dirs == NULL)
- {
- errstring = N_("cannot create search path array");
- signal_error:
- _dl_signal_error (ENOMEM, NULL, NULL, errstring);
- }
-
- round_size = ((2 * sizeof (struct r_search_path_elem) - 1
- + ncapstr * sizeof (enum r_dir_status))
- / sizeof (struct r_search_path_elem));
-
- rtld_search_dirs.dirs[0] = (struct r_search_path_elem *)
- malloc ((sizeof (system_dirs) / sizeof (system_dirs[0]))
- * round_size * sizeof (struct r_search_path_elem));
- if (rtld_search_dirs.dirs[0] == NULL)
- {
- errstring = N_("cannot create cache for search path");
- goto signal_error;
- }
-
- rtld_search_dirs.malloced = 0;
- pelem = _dl_all_dirs = rtld_search_dirs.dirs[0];
- strp = system_dirs;
- idx = 0;
-
- do
- {
- size_t cnt;
-
- *aelem++ = pelem;
-
- pelem->what = "system search path";
- pelem->where = NULL;
-
- pelem->dirname = strp;
- pelem->dirnamelen = system_dirs_len[idx];
- strp += system_dirs_len[idx] + 1;
-
- /* System paths must be absolute. */
- assert (pelem->dirname[0] == '/');
- for (cnt = 0; cnt < ncapstr; ++cnt)
- pelem->status[cnt] = unknown;
-
- pelem->next = (++idx == nsystem_dirs_len ? NULL : (pelem + round_size));
-
- pelem += round_size;
- }
- while (idx < nsystem_dirs_len);
-
- max_dirnamelen = SYSTEM_DIRS_MAX_LEN;
- *aelem = NULL;
-
-#ifdef SHARED
- /* This points to the map of the main object. */
- l = _dl_loaded;
- if (l != NULL)
- {
- assert (l->l_type != lt_loaded);
-
- if (l->l_info[DT_RUNPATH])
- {
- /* Allocate room for the search path and fill in information
- from RUNPATH. */
- decompose_rpath (&l->l_runpath_dirs,
- (const void *) (D_PTR (l, l_info[DT_STRTAB])
- + l->l_info[DT_RUNPATH]->d_un.d_val),
- l, "RUNPATH");
-
- /* The RPATH is ignored. */
- l->l_rpath_dirs.dirs = (void *) -1;
- }
- else
- {
- l->l_runpath_dirs.dirs = (void *) -1;
-
- if (l->l_info[DT_RPATH])
- {
- /* Allocate room for the search path and fill in information
- from RPATH. */
- decompose_rpath (&l->l_rpath_dirs,
- (const void *) (D_PTR (l, l_info[DT_STRTAB])
- + l->l_info[DT_RPATH]->d_un.d_val),
- l, "RPATH");
- l->l_rpath_dirs.malloced = 0;
- }
- else
- l->l_rpath_dirs.dirs = (void *) -1;
- }
- }
-#endif /* SHARED */
-
- if (llp != NULL && *llp != '\0')
- {
- size_t nllp;
- const char *cp = llp;
- const char *old = llp;
- size_t len = strlen (old) + 1;
- char *new = alloca(len);
- char *llp_tmp;
-
- llp_tmp = memcpy (new, old, len);
-
- /* Decompose the LD_LIBRARY_PATH contents. First determine how many
- elements it has. */
- nllp = 1;
- while (*cp)
- {
- if (*cp == ':' || *cp == ';')
- ++nllp;
- ++cp;
- }
-
- env_path_list.dirs = (struct r_search_path_elem **)
- malloc ((nllp + 1) * sizeof (struct r_search_path_elem *));
- if (env_path_list.dirs == NULL)
- {
- errstring = N_("cannot create cache for search path");
- goto signal_error;
- }
-
- (void) fillin_rpath (llp_tmp, env_path_list.dirs, ":;",
- 0, "LD_LIBRARY_PATH", NULL);
-
- if (env_path_list.dirs[0] == NULL)
- {
- free (env_path_list.dirs);
- env_path_list.dirs = (void *) -1;
- }
-
- env_path_list.malloced = 0;
- }
- else
- env_path_list.dirs = (void *) -1;
-
- /* Remember the last search directory added at startup. */
- _dl_init_all_dirs = _dl_all_dirs;
-}
-
-
-/* Think twice before changing anything in this function. It is placed
- here and prepared using the `alloca' magic to prevent it from being
- inlined. The function is only called in case of an error. But then
- performance does not count. The function used to be "inlinable" and
- the compiled did so all the time. This increased the code size for
- absolutely no good reason. */
-static void
-__attribute__ ((noreturn))
-lose (int code, int fd, const char *name, char *realname, struct link_map *l,
- const char *msg)
-{
- /* The use of `alloca' here looks ridiculous but it helps. The goal
- is to avoid the function from being inlined. There is no official
- way to do this so we use this trick. gcc never inlines functions
- which use `alloca'. */
- int *a = (int *) alloca (sizeof (int));
- a[0] = fd;
- /* The file might already be closed. */
- if (a[0] != -1)
- (void) close (a[0]);
- if (l != NULL)
- {
- /* Remove the stillborn object from the list and free it. */
- assert (l->l_next == NULL);
-#ifndef SHARED
- if (l->l_prev == NULL)
- /* No other module loaded. */
- _dl_loaded = NULL;
- else
-#endif
- l->l_prev->l_next = NULL;
- --_dl_nloaded;
- free (l);
- }
- free (realname);
- _dl_signal_error (code, name, NULL, msg);
-}
-
-
-/* Map in the shared object NAME, actually located in REALNAME, and already
- opened on FD. */
-
-#ifndef EXTERNAL_MAP_FROM_FD
-static
-#endif
-struct link_map *
-_dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
- char *realname, struct link_map *loader, int l_type,
- int mode)
-{
- struct link_map *l = NULL;
- const ElfW(Ehdr) *header;
- const ElfW(Phdr) *phdr;
- const ElfW(Phdr) *ph;
- size_t maplength;
- int type;
- struct stat64 st;
- /* Initialize to keep the compiler happy. */
- const char *errstring = NULL;
- int errval = 0;
-
- /* Get file information. */
- if (__builtin_expect (fstat64 (fd, &st) < 0, 0))
- {
- errstring = N_("cannot stat shared object");
- call_lose_errno:
- errval = errno;
- call_lose:
- fprintf (stderr, "%s\n", errstring);
- lose (errval, fd, name, realname, l, errstring);
- }
-
- /* Look again to see if the real name matched another already loaded. */
- for (l = _dl_loaded; l; l = l->l_next)
- if (l->l_ino == st.st_ino && l->l_dev == st.st_dev)
- {
- /* The object is already loaded.
- Just bump its reference count and return it. */
- close (fd);
-
- /* If the name is not in the list of names for this object add
- it. */
- free (realname);
- add_name_to_object (l, name);
-
- return l;
- }
-
- if (mode & RTLD_NOLOAD)
- /* We are not supposed to load the object unless it is already
- loaded. So return now. */
- return NULL;
-
- /* Print debugging message. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_FILES, 0))
- _dl_debug_printf ("file=%s; generating link map\n", name);
-
- /* This is the ELF header. We read it in `open_verify'. */
- header = (void *) fbp->buf;
-
-#ifndef MAP_ANON
-# define MAP_ANON 0
- if (_dl_zerofd == -1)
- {
- _dl_zerofd = _dl_sysdep_open_zero_fill ();
- if (_dl_zerofd == -1)
- {
- close (fd);
- _dl_signal_error (errno, NULL, NULL,
- N_("cannot open zero fill device"));
- }
- }
-#endif
-
- /* Enter the new object in the list of loaded objects. */
- l = _dl_new_object (realname, name, l_type, loader);
- if (__builtin_expect (! l, 0))
- {
- errstring = N_("cannot create shared object descriptor");
- goto call_lose_errno;
- }
-
- /* Extract the remaining details we need from the ELF header
- and then read in the program header table. */
- l->l_entry = header->e_entry;
- type = header->e_type;
- l->l_phnum = header->e_phnum;
-
- maplength = header->e_phnum * sizeof (ElfW(Phdr));
- if (header->e_phoff + maplength <= fbp->len)
- phdr = (void *) (fbp->buf + header->e_phoff);
- else
- {
- phdr = alloca (maplength);
- lseek (fd, SEEK_SET, header->e_phoff);
- if (__libc_read (fd, (void *) phdr, maplength) != maplength)
- {
- errstring = N_("cannot read file data");
- goto call_lose_errno;
- }
- }
-
- {
- /* Scan the program header table, collecting its load commands. */
- struct loadcmd
- {
- ElfW(Addr) mapstart, mapend, dataend, allocend;
- off_t mapoff;
- int prot;
- } loadcmds[l->l_phnum], *c;
- size_t nloadcmds = 0;
-
- /* The struct is initialized to zero so this is not necessary:
- l->l_ld = 0;
- l->l_phdr = 0;
- l->l_addr = 0; */
- for (ph = phdr; ph < &phdr[l->l_phnum]; ++ph)
- switch (ph->p_type)
- {
- /* These entries tell us where to find things once the file's
- segments are mapped in. We record the addresses it says
- verbatim, and later correct for the run-time load address. */
- case PT_DYNAMIC:
- l->l_ld = (void *) ph->p_vaddr;
- l->l_ldnum = ph->p_memsz / sizeof (ElfW(Dyn));
- break;
-
- case PT_PHDR:
- l->l_phdr = (void *) ph->p_vaddr;
- break;
-
- case PT_LOAD:
- /* A load command tells us to map in part of the file.
- We record the load commands and process them all later. */
- if ((ph->p_align & (_dl_pagesize - 1)) != 0)
- {
- errstring = N_("ELF load command alignment not page-aligned");
- goto call_lose;
- }
- if (((ph->p_vaddr - ph->p_offset) & (ph->p_align - 1)) != 0)
- {
- errstring
- = N_("ELF load command address/offset not properly aligned");
- goto call_lose;
- }
-
- {
- struct loadcmd *c = &loadcmds[nloadcmds++];
- c->mapstart = ph->p_vaddr & ~(ph->p_align - 1);
- c->mapend = ((ph->p_vaddr + ph->p_filesz + _dl_pagesize - 1)
- & ~(_dl_pagesize - 1));
- c->dataend = ph->p_vaddr + ph->p_filesz;
- c->allocend = ph->p_vaddr + ph->p_memsz;
- c->mapoff = ph->p_offset & ~(ph->p_align - 1);
-
- /* Optimize a common case. */
-#if (PF_R | PF_W | PF_X) == 7 && (PROT_READ | PROT_WRITE | PROT_EXEC) == 7
- c->prot = (PF_TO_PROT
- >> ((ph->p_flags & (PF_R | PF_W | PF_X)) * 4)) & 0xf;
-#else
- c->prot = 0;
- if (ph->p_flags & PF_R)
- c->prot |= PROT_READ;
- if (ph->p_flags & PF_W)
- c->prot |= PROT_WRITE;
- if (ph->p_flags & PF_X)
- c->prot |= PROT_EXEC;
-#endif
- }
- break;
- }
-
- /* Now process the load commands and map segments into memory. */
- c = loadcmds;
-
- /* Length of the sections to be loaded. */
- maplength = loadcmds[nloadcmds - 1].allocend - c->mapstart;
-
- if (__builtin_expect (type, ET_DYN) == ET_DYN)
- {
- /* This is a position-independent shared object. We can let the
- kernel map it anywhere it likes, but we must have space for all
- the segments in their specified positions relative to the first.
- So we map the first segment without MAP_FIXED, but with its
- extent increased to cover all the segments. Then we remove
- access from excess portion, and there is known sufficient space
- there to remap from the later segments.
-
- As a refinement, sometimes we have an address that we would
- prefer to map such objects at; but this is only a preference,
- the OS can do whatever it likes. */
- ElfW(Addr) mappref;
- mappref = (ELF_PREFERRED_ADDRESS (loader, maplength, c->mapstart)
- - MAP_BASE_ADDR (l));
-
- /* Remember which part of the address space this object uses. */
- l->l_map_start = (ElfW(Addr)) mmap ((void *) mappref, maplength,
- c->prot, MAP_COPY | MAP_FILE,
- fd, c->mapoff);
- if ((void *) l->l_map_start == MAP_FAILED)
- {
- map_error:
- errstring = N_("failed to map segment from shared object");
- goto call_lose_errno;
- }
-
- l->l_map_end = l->l_map_start + maplength;
- l->l_addr = l->l_map_start - c->mapstart;
-
- /* Change protection on the excess portion to disallow all access;
- the portions we do not remap later will be inaccessible as if
- unallocated. Then jump into the normal segment-mapping loop to
- handle the portion of the segment past the end of the file
- mapping. */
- mprotect ((caddr_t) (l->l_addr + c->mapend),
- loadcmds[nloadcmds - 1].allocend - c->mapend,
- PROT_NONE);
-
- goto postmap;
- }
- else
- {
- /* This object is loaded at a fixed address. This must never
- happen for objects loaded with dlopen(). */
- if (__builtin_expect (mode & __RTLD_DLOPEN, 0))
- {
- errstring = N_("cannot dynamically load executable");
- goto call_lose;
- }
-
- /* Notify ELF_PREFERRED_ADDRESS that we have to load this one
- fixed. */
- ELF_FIXED_ADDRESS (loader, c->mapstart);
- }
-
- /* Remember which part of the address space this object uses. */
- l->l_map_start = c->mapstart + l->l_addr;
- l->l_map_end = l->l_map_start + maplength;
-
- while (c < &loadcmds[nloadcmds])
- {
- if (c->mapend > c->mapstart
- /* Map the segment contents from the file. */
- && (mmap ((void *) (l->l_addr + c->mapstart),
- c->mapend - c->mapstart, c->prot,
- MAP_FIXED | MAP_COPY | MAP_FILE, fd, c->mapoff)
- == MAP_FAILED))
- goto map_error;
-
- postmap:
- if (l->l_phdr == 0
- && c->mapoff <= header->e_phoff
- && (c->mapend - c->mapstart + c->mapoff
- >= header->e_phoff + header->e_phnum * sizeof (ElfW(Phdr))))
- /* Found the program header in this segment. */
- l->l_phdr = (void *) (c->mapstart + header->e_phoff - c->mapoff);
-
- if (c->allocend > c->dataend)
- {
- /* Extra zero pages should appear at the end of this segment,
- after the data mapped from the file. */
- ElfW(Addr) zero, zeroend, zeropage;
-
- zero = l->l_addr + c->dataend;
- zeroend = l->l_addr + c->allocend;
- zeropage = (zero + _dl_pagesize - 1) & ~(_dl_pagesize - 1);
-
- if (zeroend < zeropage)
- /* All the extra data is in the last page of the segment.
- We can just zero it. */
- zeropage = zeroend;
-
- if (zeropage > zero)
- {
- /* Zero the final part of the last page of the segment. */
- if ((c->prot & PROT_WRITE) == 0)
- {
- /* Dag nab it. */
- if (mprotect ((caddr_t) (zero & ~(_dl_pagesize - 1)),
- _dl_pagesize, c->prot|PROT_WRITE) < 0)
- {
- errstring = N_("cannot change memory protections");
- goto call_lose_errno;
- }
- }
- memset ((void *) zero, '\0', zeropage - zero);
- if ((c->prot & PROT_WRITE) == 0)
- mprotect ((caddr_t) (zero & ~(_dl_pagesize - 1)),
- _dl_pagesize, c->prot);
- }
-
- if (zeroend > zeropage)
- {
- /* Map the remaining zero pages in from the zero fill FD. */
- caddr_t mapat;
- mapat = mmap ((caddr_t) zeropage, zeroend - zeropage,
- c->prot, MAP_ANON|MAP_PRIVATE|MAP_FIXED,
- ANONFD, 0);
- if (mapat == MAP_FAILED)
- {
- errstring = N_("cannot map zero-fill pages");
- goto call_lose_errno;
- }
- }
- }
-
- ++c;
- }
-
- if (l->l_phdr == NULL)
- {
- /* The program header is not contained in any of the segments.
- We have to allocate memory ourself and copy it over from
- out temporary place. */
- ElfW(Phdr) *newp = (ElfW(Phdr) *) malloc (header->e_phnum
- * sizeof (ElfW(Phdr)));
- if (newp == NULL)
- {
- errstring = N_("cannot allocate memory for program header");
- goto call_lose_errno;
- }
-
- l->l_phdr = memcpy (newp, phdr,
- (header->e_phnum * sizeof (ElfW(Phdr))));
- l->l_phdr_allocated = 1;
- }
- else
- /* Adjust the PT_PHDR value by the runtime load address. */
- l->l_phdr = (ElfW(Addr)) l->l_phdr + l->l_addr;
- }
-
- /* We are done mapping in the file. We no longer need the descriptor. */
- close (fd);
- /* Signal that we closed the file. */
- fd = -1;
-
- if (l->l_type == lt_library && type == ET_EXEC)
- l->l_type = lt_executable;
-
- if (l->l_ld == 0)
- {
- if (type == ET_DYN)
- {
- errstring = N_("object file has no dynamic section");
- goto call_lose;
- }
- }
- else
- l->l_ld = (ElfW(Addr)) l->l_ld + l->l_addr;
-
- l->l_entry += l->l_addr;
-
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_FILES, 0))
- _dl_debug_printf (" dynamic: 0x%0*lx base: 0x%0*lx size: 0x%0*Zx\n"
- " entry: 0x%0*lx phdr: 0x%0*lx phnum: %*u\n\n",
- (int) sizeof (void *) * 2, (unsigned long int) l->l_ld,
- (int) sizeof (void *) * 2, (unsigned long int) l->l_addr,
- (int) sizeof (void *) * 2, maplength,
- (int) sizeof (void *) * 2, (unsigned long int) l->l_entry,
- (int) sizeof (void *) * 2, (unsigned long int) l->l_phdr,
- (int) sizeof (void *) * 2, l->l_phnum);
-
- elf_get_dynamic_info (l);
-
- /* Make sure we are dlopen()ing an object which has the DF_1_NOOPEN
- flag set. */
- if (__builtin_expect (l->l_flags_1 & DF_1_NOOPEN, 0)
- && (mode & __RTLD_DLOPEN))
- {
- /* We are not supposed to load this object. Free all resources. */
- munmap ((void *) l->l_map_start, l->l_map_end - l->l_map_start);
-
- if (!l->l_libname->dont_free)
- free (l->l_libname);
-
- if (l->l_phdr_allocated)
- free ((void *) l->l_phdr);
-
- errstring = N_("shared object cannot be dlopen()ed");
- goto call_lose;
- }
-
- if (l->l_info[DT_HASH])
- _dl_setup_hash (l);
-
- /* If this object has DT_SYMBOLIC set modify now its scope. We don't
- have to do this for the main map. */
- if (__builtin_expect (l->l_info[DT_SYMBOLIC] != NULL, 0)
- && &l->l_searchlist != l->l_scope[0])
- {
- /* Create an appropriate searchlist. It contains only this map.
-
- XXX This is the definition of DT_SYMBOLIC in SysVr4. The old
- GNU ld.so implementation had a different interpretation which
- is more reasonable. We are prepared to add this possibility
- back as part of a GNU extension of the ELF format. */
- l->l_symbolic_searchlist.r_list =
- (struct link_map **) malloc (sizeof (struct link_map *));
-
- if (l->l_symbolic_searchlist.r_list == NULL)
- {
- errstring = N_("cannot create searchlist");
- goto call_lose_errno;
- }
-
- l->l_symbolic_searchlist.r_list[0] = l;
- l->l_symbolic_searchlist.r_nlist = 1;
-
- /* Now move the existing entries one back. */
- memmove (&l->l_scope[1], &l->l_scope[0],
- (l->l_scope_max - 1) * sizeof (l->l_scope[0]));
-
- /* Now add the new entry. */
- l->l_scope[0] = &l->l_symbolic_searchlist;
- }
-
- /* Remember whether this object must be initialized first. */
- if (l->l_flags_1 & DF_1_INITFIRST)
- _dl_initfirst = l;
-
- /* Finally the file information. */
- l->l_dev = st.st_dev;
- l->l_ino = st.st_ino;
-
- return l;
-}
-
-/* Print search path. */
-static void
-print_search_path (struct r_search_path_elem **list,
- const char *what, const char *name)
-{
- char buf[max_dirnamelen + max_capstrlen];
- int first = 1;
-
- _dl_debug_printf (" search path=");
-
- while (*list != NULL && (*list)->what == what) /* Yes, ==. */
- {
- char *endp = memcpy (buf, (*list)->dirname, (*list)->dirnamelen);
- size_t cnt;
- endp += (*list)->dirnamelen;
-
-
- for (cnt = 0; cnt < ncapstr; ++cnt)
- if ((*list)->status[cnt] != nonexisting)
- {
- char *cp = memcpy (endp, capstr[cnt].str, capstr[cnt].len);
- cp += capstr[cnt].len;
-
- if (cp == buf || (cp == buf + 1 && buf[0] == '/'))
- cp[0] = '\0';
- else
- cp[-1] = '\0';
-
- _dl_debug_printf_c (first ? "%s" : ":%s", buf);
- first = 0;
- }
-
- ++list;
- }
-
- if (name != NULL)
- _dl_debug_printf_c ("\t\t(%s from file %s)\n", what,
- name[0] ? name : _dl_argv[0]);
- else
- _dl_debug_printf_c ("\t\t(%s)\n", what);
-}
-
-/* Open a file and verify it is an ELF file for this architecture. We
- ignore only ELF files for other architectures. Non-ELF files and
- ELF files with different header information cause fatal errors since
- this could mean there is something wrong in the installation and the
- user might want to know about this. */
-static int
-open_verify (const char *name, struct filebuf *fbp)
-{
- /* This is the expected ELF header. */
-#define ELF32_CLASS ELFCLASS32
-#define ELF64_CLASS ELFCLASS64
-#ifndef VALID_ELF_HEADER
-# define VALID_ELF_HEADER(hdr,exp,size) (memcmp (hdr, exp, size) == 0)
-# define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV)
-# define VALID_ELF_ABIVERSION(ver) (ver == 0)
-#endif
- static const unsigned char expected[EI_PAD] =
- {
- [EI_MAG0] = ELFMAG0,
- [EI_MAG1] = ELFMAG1,
- [EI_MAG2] = ELFMAG2,
- [EI_MAG3] = ELFMAG3,
- [EI_CLASS] = ELFW(CLASS),
- [EI_DATA] = byteorder,
- [EI_VERSION] = EV_CURRENT,
- [EI_OSABI] = ELFOSABI_SYSV,
- [EI_ABIVERSION] = 0
- };
- static const struct
- {
- ElfW(Word) vendorlen;
- ElfW(Word) datalen;
- ElfW(Word) type;
- char vendor[4];
- } expected_note = { 4, 16, 1, "GNU" };
- int fd;
- /* Initialize it to make the compiler happy. */
- const char *errstring = NULL;
- int errval = 0;
-
- /* Open the file. We always open files read-only. */
- fd = open (name, O_RDONLY);
- if (fd != -1)
- {
- ElfW(Ehdr) *ehdr;
- ElfW(Phdr) *phdr, *ph;
- ElfW(Word) *abi_note, abi_note_buf[8];
- unsigned int osversion;
- size_t maplength;
-
- /* We successfully openened the file. Now verify it is a file
- we can use. */
- __set_errno (0);
- fbp->len = __libc_read (fd, fbp->buf, sizeof (fbp->buf));
-
- /* This is where the ELF header is loaded. */
- assert (sizeof (fbp->buf) > sizeof (ElfW(Ehdr)));
- ehdr = (ElfW(Ehdr) *) fbp->buf;
-
- /* Now run the tests. */
- if (__builtin_expect (fbp->len < (ssize_t) sizeof (ElfW(Ehdr)), 0))
- {
- errval = errno;
- errstring = (errval == 0
- ? N_("file too short") : N_("cannot read file data"));
- call_lose:
- lose (errval, fd, name, NULL, NULL, errstring);
- }
-
- /* See whether the ELF header is what we expect. */
- if (__builtin_expect (! VALID_ELF_HEADER (ehdr->e_ident, expected,
- EI_PAD), 0))
- {
- /* Something is wrong. */
- if (*(Elf32_Word *) &ehdr->e_ident !=
-#if BYTE_ORDER == LITTLE_ENDIAN
- ((ELFMAG0 << (EI_MAG0 * 8)) |
- (ELFMAG1 << (EI_MAG1 * 8)) |
- (ELFMAG2 << (EI_MAG2 * 8)) |
- (ELFMAG3 << (EI_MAG3 * 8)))
-#else
- ((ELFMAG0 << (EI_MAG3 * 8)) |
- (ELFMAG1 << (EI_MAG2 * 8)) |
- (ELFMAG2 << (EI_MAG1 * 8)) |
- (ELFMAG3 << (EI_MAG0 * 8)))
-#endif
- )
- errstring = N_("invalid ELF header");
- else if (ehdr->e_ident[EI_CLASS] != ELFW(CLASS))
- /* This is not a fatal error. On architectures where
- 32-bit and 64-bit binaries can be run this might
- happen. */
- goto close_and_out;
- else if (ehdr->e_ident[EI_DATA] != byteorder)
- {
- if (BYTE_ORDER == BIG_ENDIAN)
- errstring = N_("ELF file data encoding not big-endian");
- else
- errstring = N_("ELF file data encoding not little-endian");
- }
- else if (ehdr->e_ident[EI_VERSION] != EV_CURRENT)
- errstring
- = N_("ELF file version ident does not match current one");
- /* XXX We should be able so set system specific versions which are
- allowed here. */
- else if (!VALID_ELF_OSABI (ehdr->e_ident[EI_OSABI]))
- errstring = N_("ELF file OS ABI invalid");
- else if (!VALID_ELF_ABIVERSION (ehdr->e_ident[EI_ABIVERSION]))
- errstring = N_("ELF file ABI version invalid");
- else
- /* Otherwise we don't know what went wrong. */
- errstring = N_("internal error");
-
- goto call_lose;
- }
-
- if (__builtin_expect (ehdr->e_version, EV_CURRENT) != EV_CURRENT)
- {
- errstring = N_("ELF file version does not match current one");
- goto call_lose;
- }
- if (! __builtin_expect (elf_machine_matches_host (ehdr), 1))
- goto close_and_out;
- else if (__builtin_expect (ehdr->e_phentsize, sizeof (ElfW(Phdr)))
- != sizeof (ElfW(Phdr)))
- {
- errstring = N_("ELF file's phentsize not the expected size");
- goto call_lose;
- }
- else if (__builtin_expect (ehdr->e_type, ET_DYN) != ET_DYN
- && __builtin_expect (ehdr->e_type, ET_EXEC) != ET_EXEC)
- {
- errstring = N_("only ET_DYN and ET_EXEC can be loaded");
- goto call_lose;
- }
-
- maplength = ehdr->e_phnum * sizeof (ElfW(Phdr));
- if (ehdr->e_phoff + maplength <= fbp->len)
- phdr = (void *) (fbp->buf + ehdr->e_phoff);
- else
- {
- phdr = alloca (maplength);
- lseek (fd, SEEK_SET, ehdr->e_phoff);
- if (__libc_read (fd, (void *) phdr, maplength) != maplength)
- {
- read_error:
- errval = errno;
- errstring = N_("cannot read file data");
- goto call_lose;
- }
- }
-
- /* Check .note.ABI-tag if present. */
- for (ph = phdr; ph < &phdr[ehdr->e_phnum]; ++ph)
- if (ph->p_type == PT_NOTE && ph->p_filesz == 32 && ph->p_align >= 4)
- {
- if (ph->p_offset + 32 <= fbp->len)
- abi_note = (void *) (fbp->buf + ph->p_offset);
- else
- {
- lseek (fd, SEEK_SET, ph->p_offset);
- if (__libc_read (fd, (void *) abi_note_buf, 32) != 32)
- goto read_error;
-
- abi_note = abi_note_buf;
- }
-
- if (memcmp (abi_note, &expected_note, sizeof (expected_note)))
- continue;
-
- osversion = (abi_note[5] & 0xff) * 65536
- + (abi_note[6] & 0xff) * 256
- + (abi_note[7] & 0xff);
- if (abi_note[4] != __ABI_TAG_OS
- || (_dl_osversion && _dl_osversion < osversion))
- {
- close_and_out:
- close (fd);
- __set_errno (ENOENT);
- fd = -1;
- }
-
- break;
- }
- }
-
- return fd;
-}
-
-/* Try to open NAME in one of the directories in *DIRSP.
- Return the fd, or -1. If successful, fill in *REALNAME
- with the malloc'd full directory name. If it turns out
- that none of the directories in *DIRSP exists, *DIRSP is
- replaced with (void *) -1, and the old value is free()d
- if MAY_FREE_DIRS is true. */
-
-static int
-open_path (const char *name, size_t namelen, int preloaded,
- struct r_search_path_struct *sps, char **realname,
- struct filebuf *fbp)
-{
- struct r_search_path_elem **dirs = sps->dirs;
- char *buf;
- int fd = -1;
- const char *current_what = NULL;
- int any = 0;
-
- buf = alloca (max_dirnamelen + max_capstrlen + namelen);
- do
- {
- struct r_search_path_elem *this_dir = *dirs;
- size_t buflen = 0;
- size_t cnt;
- char *edp;
- int here_any = 0;
- int err;
-
- /* If we are debugging the search for libraries print the path
- now if it hasn't happened now. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_LIBS, 0)
- && current_what != this_dir->what)
- {
- current_what = this_dir->what;
- print_search_path (dirs, current_what, this_dir->where);
- }
-
- edp = (char *) (memcpy (buf, this_dir->dirname, this_dir->dirnamelen) + this_dir->dirnamelen);
- for (cnt = 0; fd == -1 && cnt < ncapstr; ++cnt)
- {
- char *tmp;
- /* Skip this directory if we know it does not exist. */
- if (this_dir->status[cnt] == nonexisting)
- continue;
-
- tmp = memcpy (edp, capstr[cnt].str, capstr[cnt].len);
- tmp += capstr[cnt].len;
-
- tmp = memcpy (tmp, name, namelen);
- tmp += namelen;
- buflen = ((char *) (tmp - buf));
-
- /* Print name we try if this is wanted. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_LIBS, 0))
- _dl_debug_printf (" trying file=%s\n", buf);
-
- fd = open_verify (buf, fbp);
- if (this_dir->status[cnt] == unknown)
- {
- if (fd != -1)
- this_dir->status[cnt] = existing;
- else
- {
- /* We failed to open machine dependent library. Let's
- test whether there is any directory at all. */
- struct stat64 st;
-
- buf[buflen - namelen - 1] = '\0';
-
- if (stat64 (buf, &st) != 0
- || ! S_ISDIR (st.st_mode))
- /* The directory does not exist or it is no directory. */
- this_dir->status[cnt] = nonexisting;
- else
- this_dir->status[cnt] = existing;
- }
- }
-
- /* Remember whether we found any existing directory. */
- here_any |= this_dir->status[cnt] == existing;
-
- if (fd != -1 && __builtin_expect (preloaded, 0)
- && 0)
- {
- /* This is an extra security effort to make sure nobody can
- preload broken shared objects which are in the trusted
- directories and so exploit the bugs. */
- struct stat64 st;
-
- if (fstat64 (fd, &st) != 0
- || (st.st_mode & S_ISUID) == 0)
- {
- /* The shared object cannot be tested for being SUID
- or this bit is not set. In this case we must not
- use this object. */
- close (fd);
- fd = -1;
- /* We simply ignore the file, signal this by setting
- the error value which would have been set by `open'. */
- errno = ENOENT;
- }
- }
- }
-
- if (fd != -1)
- {
- *realname = (char *) malloc (buflen);
- if (*realname != NULL)
- {
- memcpy (*realname, buf, buflen);
- return fd;
- }
- else
- {
- /* No memory for the name, we certainly won't be able
- to load and link it. */
- close (fd);
- return -1;
- }
- }
- if (here_any && (err = errno) != ENOENT && err != EACCES)
- /* The file exists and is readable, but something went wrong. */
- return -1;
-
- /* Remember whether we found anything. */
- any |= here_any;
- }
- while (*++dirs != NULL);
-
- /* Remove the whole path if none of the directories exists. */
- if (__builtin_expect (! any, 0))
- {
- /* Paths which were allocated using the minimal malloc() in ld.so
- must not be freed using the general free() in libc. */
- if (sps->malloced)
- free (sps->dirs);
- sps->dirs = (void *) -1;
- }
-
- return -1;
-}
-
-/* Map in the shared object file NAME. */
-
-struct link_map *
-internal_function
-_dl_map_object (struct link_map *loader, const char *name, int preloaded,
- int type, int trace_mode, int mode)
-{
- int fd;
- char *realname;
- char *name_copy;
- struct link_map *l;
- struct filebuf fb;
-
- /* Look for this name among those already loaded. */
- for (l = _dl_loaded; l; l = l->l_next)
- {
- /* If the requested name matches the soname of a loaded object,
- use that object. Elide this check for names that have not
- yet been opened. */
- if (__builtin_expect (l->l_faked, 0) != 0)
- continue;
- if (!_dl_name_match_p (name, l))
- {
- const char *soname;
-
- if (__builtin_expect (l->l_soname_added, 1)
- || l->l_info[DT_SONAME] == NULL)
- continue;
-
- soname = ((const char *) D_PTR (l, l_info[DT_STRTAB])
- + l->l_info[DT_SONAME]->d_un.d_val);
- if (strcmp (name, soname) != 0)
- continue;
-
- /* We have a match on a new name -- cache it. */
- add_name_to_object (l, soname);
- l->l_soname_added = 1;
- }
-
- /* We have a match. */
- return l;
- }
-
- /* Display information if we are debugging. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_FILES, 0) && loader != NULL)
- _dl_debug_printf ("\nfile=%s; needed by %s\n", name,
- loader->l_name[0] ? loader->l_name : _dl_argv[0]);
-
- if (strchr (name, '/') == NULL)
- {
- /* Search for NAME in several places. */
-
- size_t namelen = strlen (name) + 1;
-
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_LIBS, 0))
- _dl_debug_printf ("find library=%s; searching\n", name);
-
- fd = -1;
-
- /* When the object has the RUNPATH information we don't use any
- RPATHs. */
- if (loader == NULL || loader->l_info[DT_RUNPATH] == NULL)
- {
- /* First try the DT_RPATH of the dependent object that caused NAME
- to be loaded. Then that object's dependent, and on up. */
- for (l = loader; fd == -1 && l; l = l->l_loader)
- {
- if (l->l_rpath_dirs.dirs == NULL)
- {
- if (l->l_info[DT_RPATH] == NULL)
- {
- /* There is no path. */
- l->l_rpath_dirs.dirs = (void *) -1;
- continue;
- }
- else
- {
- /* Make sure the cache information is available. */
- size_t ptrval = (D_PTR (l, l_info[DT_STRTAB])
- + l->l_info[DT_RPATH]->d_un.d_val);
- decompose_rpath (&l->l_rpath_dirs,
- (const char *) ptrval, l, "RPATH");
- }
- }
-
- if (l->l_rpath_dirs.dirs != (void *) -1)
- fd = open_path (name, namelen, preloaded, &l->l_rpath_dirs,
- &realname, &fb);
- }
-
- /* If dynamically linked, try the DT_RPATH of the executable
- itself. */
- l = _dl_loaded;
- if (fd == -1 && l && l->l_type != lt_loaded && l != loader
- && l->l_rpath_dirs.dirs != (void *) -1)
- fd = open_path (name, namelen, preloaded, &l->l_rpath_dirs,
- &realname, &fb);
- }
-
- /* Try the LD_LIBRARY_PATH environment variable. */
- if (fd == -1 && env_path_list.dirs != (void *) -1)
- fd = open_path (name, namelen, preloaded, &env_path_list,
- &realname, &fb);
-
- /* Look at the RUNPATH information for this binary.
-
- Note that this is no real loop. 'while' is used only to enable
- us to use 'break' instead of a 'goto' to jump to the end. The
- loop is always left after the first round. */
- while (fd == -1 && loader != NULL
- && loader->l_runpath_dirs.dirs != (void *) -1)
- {
- if (loader->l_runpath_dirs.dirs == NULL)
- {
- if (loader->l_info[DT_RUNPATH] == NULL)
- {
- /* No RUNPATH. */
- loader->l_runpath_dirs.dirs = (void *) -1;
- break;
- }
- else
- {
- /* Make sure the cache information is available. */
- size_t ptrval = (D_PTR (loader, l_info[DT_STRTAB])
- + loader->l_info[DT_RUNPATH]->d_un.d_val);
- decompose_rpath (&loader->l_runpath_dirs,
- (const char *) ptrval, loader, "RUNPATH");
- }
- }
-
- if (loader->l_runpath_dirs.dirs != (void *) -1)
- fd = open_path (name, namelen, preloaded,
- &loader->l_runpath_dirs, &realname, &fb);
- break;
- }
-
- if (fd == -1
- && (__builtin_expect (! preloaded, 1) || ! 0))
- {
- /* Check the list of libraries in the file /etc/ld.so.cache,
- for compatibility with Linux's ldconfig program. */
- const char *cached = _dl_load_cache_lookup (name);
-
- if (cached != NULL)
- {
-#ifdef SHARED
- l = loader ?: _dl_loaded;
-#else
- l = loader;
-#endif
-
- /* If the loader has the DF_1_NODEFLIB flag set we must not
- use a cache entry from any of these directories. */
- if (
-#ifndef SHARED
- /* 'l' is always != NULL for dynamically linked objects. */
- l != NULL &&
-#endif
- __builtin_expect (l->l_flags_1 & DF_1_NODEFLIB, 0))
- {
- const char *dirp = system_dirs;
- unsigned int cnt = 0;
-
- do
- {
- if (memcmp (cached, dirp, system_dirs_len[cnt]) == 0)
- {
- /* The prefix matches. Don't use the entry. */
- cached = NULL;
- break;
- }
-
- dirp += system_dirs_len[cnt] + 1;
- ++cnt;
- }
- while (cnt < nsystem_dirs_len);
- }
-
- if (cached != NULL)
- {
- fd = open_verify (cached, &fb);
- if (__builtin_expect (fd != -1, 1))
- {
- realname = local_strdup (cached);
- if (realname == NULL)
- {
- close (fd);
- fd = -1;
- }
- }
- }
- }
- }
-
- /* Finally, try the default path. */
- if (fd == -1
- && ((l = loader ?: _dl_loaded)
- /* 'l' is always != NULL for dynamically linked objects. */
-#ifdef SHARED
- ,
-#else
- == NULL ||
-#endif
- __builtin_expect (!(l->l_flags_1 & DF_1_NODEFLIB), 1))
- && rtld_search_dirs.dirs != (void *) -1)
- fd = open_path (name, namelen, preloaded, &rtld_search_dirs,
- &realname, &fb);
-
- /* Add another newline when we a tracing the library loading. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_LIBS, 0))
- _dl_debug_printf ("\n");
- }
- else
- {
- /* The path may contain dynamic string tokens. */
- realname = (loader
- ? expand_dynamic_string_token (loader, name)
- : local_strdup (name));
- if (realname == NULL)
- fd = -1;
- else
- {
- fd = open_verify (realname, &fb);
- if (__builtin_expect (fd, 0) == -1)
- free (realname);
- }
- }
-
- if (__builtin_expect (fd, 0) == -1)
- {
- if (trace_mode)
- {
- /* We haven't found an appropriate library. But since we
- are only interested in the list of libraries this isn't
- so severe. Fake an entry with all the information we
- have. */
- static const Elf_Symndx dummy_bucket = STN_UNDEF;
-
- /* Enter the new object in the list of loaded objects. */
- if ((name_copy = local_strdup (name)) == NULL
- || (l = _dl_new_object (name_copy, name, type, loader)) == NULL)
- _dl_signal_error (ENOMEM, name, NULL,
- N_("cannot create shared object descriptor"));
- /* Signal that this is a faked entry. */
- l->l_faked = 1;
- /* Since the descriptor is initialized with zero we do not
- have do this here.
- l->l_reserved = 0; */
- l->l_buckets = &dummy_bucket;
- l->l_nbuckets = 1;
- l->l_relocated = 1;
-
- return l;
- }
- else
- _dl_signal_error (errno, name, NULL,
- N_("cannot open shared object file"));
- }
-
- return _dl_map_object_from_fd (name, fd, &fb, realname, loader, type, mode);
-}
diff --git a/newlib/libc/sys/linux/dl/dl-lookup.c b/newlib/libc/sys/linux/dl/dl-lookup.c
deleted file mode 100644
index 9fc296cf1..000000000
--- a/newlib/libc/sys/linux/dl/dl-lookup.c
+++ /dev/null
@@ -1,654 +0,0 @@
-/* Look up a symbol in the loaded objects.
- Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <alloca.h>
-#include <libintl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include "dl-hash.h"
-#include <machine/dl-machine.h>
-#include <bits/libc-lock.h>
-
-#include <assert.h>
-
-#define VERSTAG(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (tag))
-
-/* We need this string more than once. */
-static const char undefined_msg[] = "undefined symbol: ";
-
-
-struct sym_val
- {
- const ElfW(Sym) *s;
- struct link_map *m;
- };
-
-
-#define make_string(string, rest...) \
- ({ \
- const char *all[] = { string, ## rest }; \
- size_t len, cnt; \
- char *result, *cp; \
- \
- len = 1; \
- for (cnt = 0; cnt < sizeof (all) / sizeof (all[0]); ++cnt) \
- len += strlen (all[cnt]); \
- \
- cp = result = alloca (len); \
- for (cnt = 0; cnt < sizeof (all) / sizeof (all[0]); ++cnt) \
- { \
- cp = strcpy (cp, all[cnt]); \
- cp += strlen(all[cnt]); \
- } \
- \
- result; \
- })
-
-/* Statistics function. */
-unsigned long int _dl_num_relocations;
-
-
-/* We have two different situations when looking up a simple: with or
- without versioning. gcc is not able to optimize a single function
- definition serving for both purposes so we define two functions. */
-#define VERSIONED 0
-#include "do-lookup.h"
-
-#define VERSIONED 1
-#include "do-lookup.h"
-
-
-/* Add extra dependency on MAP to UNDEF_MAP. */
-static int
-internal_function
-add_dependency (struct link_map *undef_map, struct link_map *map)
-{
- struct link_map **list;
- struct link_map *runp;
- unsigned int act;
- unsigned int i;
- int result = 0;
-
- /* Avoid self-references. */
- if (undef_map == map)
- return 0;
-
- /* Make sure nobody can unload the object while we are at it. */
-#ifdef HAVE_DD_LOCK
- __lock_acquire(_dl_load_lock);
-#endif
-
-
- /* Determine whether UNDEF_MAP already has a reference to MAP. First
- look in the normal dependencies. */
- if (undef_map->l_searchlist.r_list != NULL)
- {
- list = undef_map->l_initfini;
-
- for (i = 0; list[i] != NULL; ++i)
- if (list[i] == map)
- goto out;
- }
-
- /* No normal dependency. See whether we already had to add it
- to the special list of dynamic dependencies. */
- list = undef_map->l_reldeps;
- act = undef_map->l_reldepsact;
-
- for (i = 0; i < act; ++i)
- if (list[i] == map)
- goto out;
-
- /* The object is not yet in the dependency list. Before we add
- it make sure just one more time the object we are about to
- reference is still available. There is a brief period in
- which the object could have been removed since we found the
- definition. */
- runp = _dl_loaded;
- while (runp != NULL && runp != map)
- runp = runp->l_next;
-
- if (runp != NULL)
- {
- /* The object is still available. Add the reference now. */
- if (__builtin_expect (act >= undef_map->l_reldepsmax, 0))
- {
- /* Allocate more memory for the dependency list. Since this
- can never happen during the startup phase we can use
- `realloc'. */
- void *newp;
-
- undef_map->l_reldepsmax += 5;
- newp = realloc (undef_map->l_reldeps,
- undef_map->l_reldepsmax
- * sizeof (struct link_map *));
-
- if (__builtin_expect (newp != NULL, 1))
- undef_map->l_reldeps = (struct link_map **) newp;
- else
- /* Correct the addition. */
- undef_map->l_reldepsmax -= 5;
- }
-
- /* If we didn't manage to allocate memory for the list this is
- no fatal mistake. We simply increment the use counter of the
- referenced object and don't record the dependencies. This
- means this increment can never be reverted and the object
- will never be unloaded. This is semantically the correct
- behaviour. */
- if (__builtin_expect (act < undef_map->l_reldepsmax, 1))
- undef_map->l_reldeps[undef_map->l_reldepsact++] = map;
-
- if (map->l_searchlist.r_list != NULL)
- /* And increment the counter in the referenced object. */
- ++map->l_opencount;
- else
- /* We have to bump the counts for all dependencies since so far
- this object was only a normal or transitive dependency.
- Now it might be closed with _dl_close() directly. */
- for (list = map->l_initfini; *list != NULL; ++list)
- ++(*list)->l_opencount;
-
- /* Display information if we are debugging. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_FILES, 0))
- _dl_debug_printf ("\
-\nfile=%s; needed by %s (relocation dependency)\n\n",
- map->l_name[0] ? map->l_name : _dl_argv[0],
- undef_map->l_name[0]
- ? undef_map->l_name : _dl_argv[0]);
- }
- else
- /* Whoa, that was bad luck. We have to search again. */
- result = -1;
-
- out:
- /* Release the lock. */
-#ifdef HAVE_DD_LOCK
- __lock_release(_dl_load_lock);
-#endif
-
-
- return result;
-}
-
-static int
-internal_function
-_dl_do_lookup (const char *undef_name, unsigned long int hash,
- const ElfW(Sym) *ref, struct sym_val *result,
- struct r_scope_elem *scope, size_t i,
- struct link_map *skip, int type_class);
-static int
-internal_function
-_dl_do_lookup_versioned (const char *undef_name, unsigned long int hash,
- const ElfW(Sym) *ref, struct sym_val *result,
- struct r_scope_elem *scope, size_t i,
- const struct r_found_version *const version,
- struct link_map *skip, int type_class);
-
-
-/* Search loaded objects' symbol tables for a definition of the symbol
- UNDEF_NAME. */
-
-lookup_t
-internal_function
-_dl_lookup_symbol (const char *undef_name, struct link_map *undef_map,
- const ElfW(Sym) **ref, struct r_scope_elem *symbol_scope[],
- int type_class, int explicit)
-{
- unsigned long int hash = _dl_elf_hash (undef_name);
- struct sym_val current_value = { NULL, NULL };
- struct r_scope_elem **scope;
- int protected;
-
- ++_dl_num_relocations;
-
- /* Search the relevant loaded objects for a definition. */
- for (scope = symbol_scope; *scope; ++scope)
- if (do_lookup (undef_name, hash, *ref, &current_value, *scope, 0, NULL,
- type_class))
- {
- /* We have to check whether this would bind UNDEF_MAP to an object
- in the global scope which was dynamically loaded. In this case
- we have to prevent the latter from being unloaded unless the
- UNDEF_MAP object is also unloaded. */
- if (__builtin_expect (current_value.m->l_type == lt_loaded, 0)
- /* Don't do this for explicit lookups as opposed to implicit
- runtime lookups. */
- && ! explicit
- /* Add UNDEF_MAP to the dependencies. */
- && add_dependency (undef_map, current_value.m) < 0)
- /* Something went wrong. Perhaps the object we tried to reference
- was just removed. Try finding another definition. */
- return _dl_lookup_symbol (undef_name, undef_map, ref, symbol_scope,
- type_class, 0);
-
- break;
- }
-
- if (__builtin_expect (current_value.s == NULL, 0))
- {
- const char *reference_name = undef_map ? undef_map->l_name : NULL;
-
- if (*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
- /* We could find no value for a strong reference. */
- /* XXX We cannot translate the messages. */
- _dl_signal_cerror (0, (reference_name && reference_name[0]
- ? reference_name
- : (_dl_argv[0] ?: "<main program>")),
- N_("relocation error"),
- make_string (undefined_msg, undef_name));
- *ref = NULL;
- return 0;
- }
-
- protected = *ref && ELFW(ST_VISIBILITY) ((*ref)->st_other) == STV_PROTECTED;
-
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_BINDINGS, 0))
- {
- const char *reference_name = undef_map ? undef_map->l_name : NULL;
-
- _dl_debug_printf ("binding file %s to %s: %s symbol `%s'\n",
- (reference_name && reference_name[0]
- ? reference_name : (_dl_argv[0] ?: "<main program>")),
- current_value.m->l_name[0]
- ? current_value.m->l_name : _dl_argv[0],
- protected ? "protected" : "normal", undef_name);
- }
-
- if (__builtin_expect (protected == 0, 1))
- {
- *ref = current_value.s;
- return LOOKUP_VALUE (current_value.m);
- }
- else
- {
- /* It is very tricky. We need to figure out what value to
- return for the protected symbol */
- struct sym_val protected_value = { NULL, NULL };
-
- for (scope = symbol_scope; *scope; ++scope)
- if (_dl_do_lookup (undef_name, hash, *ref, &protected_value, *scope,
- 0, NULL, ELF_RTYPE_CLASS_PLT))
- break;
-
- if (protected_value.s == NULL || protected_value.m == undef_map)
- {
- *ref = current_value.s;
- return LOOKUP_VALUE (current_value.m);
- }
-
- return LOOKUP_VALUE (undef_map);
- }
-}
-
-
-/* This function is nearly the same as `_dl_lookup_symbol' but it
- skips in the first list all objects until SKIP_MAP is found. I.e.,
- it only considers objects which were loaded after the described
- object. If there are more search lists the object described by
- SKIP_MAP is only skipped. */
-lookup_t
-internal_function
-_dl_lookup_symbol_skip (const char *undef_name,
- struct link_map *undef_map, const ElfW(Sym) **ref,
- struct r_scope_elem *symbol_scope[],
- struct link_map *skip_map)
-{
- const char *reference_name = undef_map ? undef_map->l_name : NULL;
- const unsigned long int hash = _dl_elf_hash (undef_name);
- struct sym_val current_value = { NULL, NULL };
- struct r_scope_elem **scope;
- size_t i;
- int protected;
-
- ++_dl_num_relocations;
-
- /* Search the relevant loaded objects for a definition. */
- scope = symbol_scope;
- for (i = 0; (*scope)->r_list[i] != skip_map; ++i)
- assert (i < (*scope)->r_nlist);
-
- if (! _dl_do_lookup (undef_name, hash, *ref, &current_value, *scope, i,
- skip_map, 0))
- while (*++scope)
- if (_dl_do_lookup (undef_name, hash, *ref, &current_value, *scope, 0,
- skip_map, 0))
- break;
-
- if (__builtin_expect (current_value.s == NULL, 0))
- {
- *ref = NULL;
- return 0;
- }
-
- protected = *ref && ELFW(ST_VISIBILITY) ((*ref)->st_other) == STV_PROTECTED;
-
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_BINDINGS, 0))
- _dl_debug_printf ("binding file %s to %s: %s symbol `%s'\n",
- (reference_name && reference_name[0]
- ? reference_name : (_dl_argv[0] ?: "<main program>")),
- current_value.m->l_name[0]
- ? current_value.m->l_name : _dl_argv[0],
- protected ? "protected" : "normal", undef_name);
-
- if (__builtin_expect (protected == 0, 1))
- {
- *ref = current_value.s;
- return LOOKUP_VALUE (current_value.m);
- }
- else
- {
- /* It is very tricky. We need to figure out what value to
- return for the protected symbol. */
- struct sym_val protected_value = { NULL, NULL };
-
- if (i >= (*scope)->r_nlist
- || !_dl_do_lookup (undef_name, hash, *ref, &protected_value, *scope,
- i, skip_map, ELF_RTYPE_CLASS_PLT))
- while (*++scope)
- if (_dl_do_lookup (undef_name, hash, *ref, &protected_value, *scope,
- 0, skip_map, ELF_RTYPE_CLASS_PLT))
- break;
-
- if (protected_value.s == NULL || protected_value.m == undef_map)
- {
- *ref = current_value.s;
- return LOOKUP_VALUE (current_value.m);
- }
-
- return LOOKUP_VALUE (undef_map);
- }
-}
-
-
-/* This function works like _dl_lookup_symbol but it takes an
- additional arguement with the version number of the requested
- symbol.
-
- XXX We'll see whether we need this separate function. */
-lookup_t
-internal_function
-_dl_lookup_versioned_symbol (const char *undef_name,
- struct link_map *undef_map, const ElfW(Sym) **ref,
- struct r_scope_elem *symbol_scope[],
- const struct r_found_version *version,
- int type_class, int explicit)
-{
- unsigned long int hash = _dl_elf_hash (undef_name);
- struct sym_val current_value = { NULL, NULL };
- struct r_scope_elem **scope;
- int protected;
-
- ++_dl_num_relocations;
-
- /* Search the relevant loaded objects for a definition. */
- for (scope = symbol_scope; *scope; ++scope)
- {
- int res = do_lookup_versioned (undef_name, hash, *ref, &current_value,
- *scope, 0, version, NULL, type_class);
- if (res > 0)
- {
- /* We have to check whether this would bind UNDEF_MAP to an object
- in the global scope which was dynamically loaded. In this case
- we have to prevent the latter from being unloaded unless the
- UNDEF_MAP object is also unloaded. */
- if (__builtin_expect (current_value.m->l_type == lt_loaded, 0)
- /* Don't do this for explicit lookups as opposed to implicit
- runtime lookups. */
- && ! explicit
- /* Add UNDEF_MAP to the dependencies. */
- && add_dependency (undef_map, current_value.m) < 0)
- /* Something went wrong. Perhaps the object we tried to reference
- was just removed. Try finding another definition. */
- return _dl_lookup_versioned_symbol (undef_name, undef_map, ref,
- symbol_scope, version,
- type_class, 0);
-
- break;
- }
-
- if (__builtin_expect (res, 0) < 0)
- {
- /* Oh, oh. The file named in the relocation entry does not
- contain the needed symbol. */
- const char *reference_name = undef_map ? undef_map->l_name : NULL;
-
- /* XXX We cannot translate the message. */
- _dl_signal_cerror (0, (reference_name && reference_name[0]
- ? reference_name
- : (_dl_argv[0] ?: "<main program>")),
- N_("relocation error"),
- make_string ("symbol ", undef_name, ", version ",
- version->name,
- " not defined in file ",
- version->filename,
- " with link time reference",
- res == -2
- ? " (no version symbols)" : ""));
- *ref = NULL;
- return 0;
- }
- }
-
- if (__builtin_expect (current_value.s == NULL, 0))
- {
- if (*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
- {
- /* We could find no value for a strong reference. */
- const char *reference_name = undef_map ? undef_map->l_name : NULL;
-
- /* XXX We cannot translate the message. */
- _dl_signal_cerror (0, (reference_name && reference_name[0]
- ? reference_name
- : (_dl_argv[0] ?: "<main program>")), NULL,
- make_string (undefined_msg, undef_name,
- ", version ",
- version->name ?: NULL));
- }
- *ref = NULL;
- return 0;
- }
-
- protected = *ref && ELFW(ST_VISIBILITY) ((*ref)->st_other) == STV_PROTECTED;
-
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_BINDINGS, 0))
- {
- const char *reference_name = undef_map ? undef_map->l_name : NULL;
-
- _dl_debug_printf ("binding file %s to %s: %s symbol `%s' [%s]\n",
- (reference_name && reference_name[0]
- ? reference_name : (_dl_argv[0] ?: "<main program>")),
- current_value.m->l_name[0]
- ? current_value.m->l_name : _dl_argv[0],
- protected ? "protected" : "normal",
- undef_name, version->name);
- }
-
- if (__builtin_expect (protected == 0, 1))
- {
- *ref = current_value.s;
- return LOOKUP_VALUE (current_value.m);
- }
- else
- {
- /* It is very tricky. We need to figure out what value to
- return for the protected symbol */
- struct sym_val protected_value = { NULL, NULL };
-
- for (scope = symbol_scope; *scope; ++scope)
- if (_dl_do_lookup_versioned (undef_name, hash, *ref, &protected_value,
- *scope, 0, version, NULL,
- ELF_RTYPE_CLASS_PLT))
- break;
-
- if (protected_value.s == NULL || protected_value.m == undef_map)
- {
- *ref = current_value.s;
- return LOOKUP_VALUE (current_value.m);
- }
-
- return LOOKUP_VALUE (undef_map);
- }
-}
-
-
-/* Similar to _dl_lookup_symbol_skip but takes an additional argument
- with the version we are looking for. */
-lookup_t
-internal_function
-_dl_lookup_versioned_symbol_skip (const char *undef_name,
- struct link_map *undef_map,
- const ElfW(Sym) **ref,
- struct r_scope_elem *symbol_scope[],
- const struct r_found_version *version,
- struct link_map *skip_map)
-{
- const char *reference_name = undef_map ? undef_map->l_name : NULL;
- const unsigned long int hash = _dl_elf_hash (undef_name);
- struct sym_val current_value = { NULL, NULL };
- struct r_scope_elem **scope;
- size_t i;
- int protected;
-
- ++_dl_num_relocations;
-
- /* Search the relevant loaded objects for a definition. */
- scope = symbol_scope;
- for (i = 0; (*scope)->r_list[i] != skip_map; ++i)
- assert (i < (*scope)->r_nlist);
-
- if (! _dl_do_lookup_versioned (undef_name, hash, *ref, &current_value,
- *scope, i, version, skip_map, 0))
- while (*++scope)
- if (_dl_do_lookup_versioned (undef_name, hash, *ref, &current_value,
- *scope, 0, version, skip_map, 0))
- break;
-
- if (__builtin_expect (current_value.s == NULL, 0))
- {
- if (*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
- {
- /* We could find no value for a strong reference. */
- const size_t len = strlen (undef_name);
- char buf[sizeof undefined_msg + len];
- char *tmp;
- tmp = memcpy (buf, undefined_msg, sizeof undefined_msg - 1);
- tmp += (sizeof undefined_msg - 1);
-
- memcpy (tmp, undef_name, len + 1);
-
- /* XXX We cannot translate the messages. */
- _dl_signal_cerror (0, (reference_name && reference_name[0]
- ? reference_name
- : (_dl_argv[0] ?: "<main program>")),
- NULL, buf);
- }
- *ref = NULL;
- return 0;
- }
-
- protected = *ref && ELFW(ST_VISIBILITY) ((*ref)->st_other) == STV_PROTECTED;
-
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_BINDINGS, 0))
- _dl_debug_printf ("binding file %s to %s: %s symbol `%s' [%s]\n",
- (reference_name && reference_name[0]
- ? reference_name : (_dl_argv[0] ?: "<main program>")),
- current_value.m->l_name[0]
- ? current_value.m->l_name : _dl_argv[0],
- protected ? "protected" : "normal",
- undef_name, version->name);
-
- if (__builtin_expect (protected == 0, 1))
- {
- *ref = current_value.s;
- return LOOKUP_VALUE (current_value.m);
- }
- else
- {
- /* It is very tricky. We need to figure out what value to
- return for the protected symbol */
- struct sym_val protected_value = { NULL, NULL };
-
- if (i >= (*scope)->r_nlist
- || !_dl_do_lookup_versioned (undef_name, hash, *ref,
- &protected_value, *scope, i, version,
- skip_map, ELF_RTYPE_CLASS_PLT))
- while (*++scope)
- if (_dl_do_lookup_versioned (undef_name, hash, *ref,
- &protected_value, *scope, 0, version,
- skip_map, ELF_RTYPE_CLASS_PLT))
- break;
-
- if (protected_value.s == NULL || protected_value.m == undef_map)
- {
- *ref = current_value.s;
- return LOOKUP_VALUE (current_value.m);
- }
-
- return LOOKUP_VALUE (undef_map);
- }
-}
-
-
-/* Cache the location of MAP's hash table. */
-
-void
-internal_function
-_dl_setup_hash (struct link_map *map)
-{
- Elf_Symndx *hash;
- Elf_Symndx nchain;
-
- if (!map->l_info[DT_HASH])
- return;
- hash = (void *)(map->l_addr + map->l_info[DT_HASH]->d_un.d_ptr);
-
- map->l_nbuckets = *hash++;
- nchain = *hash++;
- map->l_buckets = hash;
- hash += map->l_nbuckets;
- map->l_chain = hash;
-}
-
-/* These are here so that we only inline do_lookup{,_versioned} in the common
- case, not everywhere. */
-static int
-internal_function
-_dl_do_lookup (const char *undef_name, unsigned long int hash,
- const ElfW(Sym) *ref, struct sym_val *result,
- struct r_scope_elem *scope, size_t i,
- struct link_map *skip, int type_class)
-{
- return do_lookup (undef_name, hash, ref, result, scope, i, skip,
- type_class);
-}
-
-static int
-internal_function
-_dl_do_lookup_versioned (const char *undef_name, unsigned long int hash,
- const ElfW(Sym) *ref, struct sym_val *result,
- struct r_scope_elem *scope, size_t i,
- const struct r_found_version *const version,
- struct link_map *skip, int type_class)
-{
- return do_lookup_versioned (undef_name, hash, ref, result, scope, i,
- version, skip, type_class);
-}
diff --git a/newlib/libc/sys/linux/dl/dl-lookupcfg.h b/newlib/libc/sys/linux/dl/dl-lookupcfg.h
deleted file mode 100644
index 810e8c7c6..000000000
--- a/newlib/libc/sys/linux/dl/dl-lookupcfg.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Configuration of lookup functions.
- Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Some platforms need more information from the symbol lookup function
- than just the address. But this is not generally the case. */
-#undef DL_LOOKUP_RETURNS_MAP
diff --git a/newlib/libc/sys/linux/dl/dl-minimal.c b/newlib/libc/sys/linux/dl/dl-minimal.c
deleted file mode 100644
index 807bfad63..000000000
--- a/newlib/libc/sys/linux/dl/dl-minimal.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/* Minimal replacements for basic facilities used in the dynamic linker.
- Copyright (C) 1995,96,97,98,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <limits.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <ldsodefs.h>
-#include <machine/weakalias.h>
-
-#include <assert.h>
-
-/* Minimal `malloc' allocator for use while loading shared libraries.
- No block is ever freed. */
-
-static void *alloc_ptr, *alloc_end, *alloc_last_block;
-
-/* Declarations of global functions. */
-extern void weak_function free (void *ptr);
-extern void * weak_function realloc (void *ptr, size_t n);
-extern unsigned long int weak_function __strtoul_internal
-(const char *nptr, char **endptr, int base, int group);
-extern unsigned long int weak_function strtoul (const char *nptr,
- char **endptr, int base);
-
-
-void * weak_function
-malloc (size_t n)
-{
-#ifdef MAP_ANON
-#define _dl_zerofd (-1)
-#else
- extern int _dl_zerofd;
-
- if (_dl_zerofd == -1)
- _dl_zerofd = _dl_sysdep_open_zero_fill ();
-#define MAP_ANON 0
-#endif
-
- if (alloc_end == 0)
- {
- /* Consume any unused space in the last page of our data segment. */
- extern int _end;
- alloc_ptr = &_end;
- alloc_end = (void *) 0 + (((alloc_ptr - (void *) 0) + _dl_pagesize - 1)
- & ~(_dl_pagesize - 1));
- }
-
- /* Make sure the allocation pointer is ideally aligned. */
- alloc_ptr = (void *) 0 + (((alloc_ptr - (void *) 0) + sizeof (double) - 1)
- & ~(sizeof (double) - 1));
-
- if (alloc_ptr + n >= alloc_end)
- {
- /* Insufficient space left; allocate another page. */
- caddr_t page;
- size_t nup = (n + _dl_pagesize - 1) & ~(_dl_pagesize - 1);
- page = __mmap (0, nup, PROT_READ|PROT_WRITE,
- MAP_ANON|MAP_PRIVATE, _dl_zerofd, 0);
- assert (page != MAP_FAILED);
- if (page != alloc_end)
- alloc_ptr = page;
- alloc_end = page + nup;
- }
-
- alloc_last_block = (void *) alloc_ptr;
- alloc_ptr += n;
- return alloc_last_block;
-}
-
-/* We use this function occasionally since the real implementation may
- be optimized when it can assume the memory it returns already is
- set to NUL. */
-void * weak_function
-calloc (size_t nmemb, size_t size)
-{
- size_t total = nmemb * size;
- void *result = malloc (total);
- return memset (result, '\0', total);
-}
-
-/* This will rarely be called. */
-void weak_function
-free (void *ptr)
-{
- /* We can free only the last block allocated. */
- if (ptr == alloc_last_block)
- alloc_ptr = alloc_last_block;
-}
-
-/* This is only called with the most recent block returned by malloc. */
-void * weak_function
-realloc (void *ptr, size_t n)
-{
- void *new;
- if (ptr == NULL)
- return malloc (n);
- assert (ptr == alloc_last_block);
- alloc_ptr = alloc_last_block;
- new = malloc (n);
- assert (new == ptr);
- return new;
-}
-
-
-/* Define our own version of the internal function used by strerror. We
- only provide the messages for some common errors. This avoids pulling
- in the whole error list. */
-
-char * weak_function
-__strerror_r (int errnum, char *buf, size_t buflen)
-{
- char *msg;
-
- switch (errnum)
- {
- case ENOMEM:
- msg = (char *) "Cannot allocate memory";
- break;
- case EINVAL:
- msg = (char *) "Invalid argument";
- break;
- case ENOENT:
- msg = (char *) "No such file or directory";
- break;
- case EPERM:
- msg = (char *) "Operation not permitted";
- break;
- case EIO:
- msg = (char *) "Input/output error";
- break;
- case EACCES:
- msg = (char *) "Permission denied";
- break;
- default:
- /* No need to check buffer size, all calls in the dynamic linker
- provide enough space. */
- msg = (char *) "Error";
- break;
- }
-
- return msg;
-}
-
-#ifndef NDEBUG
-
-/* Define (weakly) our own assert failure function which doesn't use stdio.
- If we are linked into the user program (-ldl), the normal __assert_fail
- defn can override this one. */
-
-void weak_function
-__assert_fail (const char *assertion,
- const char *file, unsigned int line, const char *function)
-{
- _dl_fatal_printf ("\
-Inconsistency detected by ld.so: %s: %u: %s%sAssertion `%s' failed!\n",
- file, line, function ?: "", function ? ": " : "",
- assertion);
-
-}
-
-void weak_function
-__assert_perror_fail (int errnum,
- const char *file, unsigned int line,
- const char *function)
-{
- char errbuf[64];
- _dl_fatal_printf ("\
-Inconsistency detected by ld.so: %s: %u: %s%sUnexpected error: %s\n",
- file, line, function ?: "", function ? ": " : "",
- __strerror_r (errnum, errbuf, sizeof (errbuf)));
-}
-
-#endif
-
-unsigned long int weak_function
-__strtoul_internal (const char *nptr, char **endptr, int base, int group)
-{
- unsigned long int result = 0;
- long int sign = 1;
-
- while (*nptr == ' ' || *nptr == '\t')
- ++nptr;
-
- if (*nptr == '-')
- {
- sign = -1;
- ++nptr;
- }
- else if (*nptr == '+')
- ++nptr;
-
- if (*nptr < '0' || *nptr > '9')
- {
- if (endptr != NULL)
- *endptr = (char *) nptr;
- return 0UL;
- }
-
- assert (base == 0);
- base = 10;
- if (*nptr == '0')
- {
- if (nptr[1] == 'x' || nptr[1] == 'X')
- {
- base = 16;
- nptr += 2;
- }
- else
- base = 8;
- }
-
- while (*nptr >= '0' && *nptr <= '9')
- {
- unsigned long int digval = *nptr - '0';
- if (result > LONG_MAX / 10
- || (result == ULONG_MAX / 10 && digval > ULONG_MAX % 10))
- {
- errno = ERANGE;
- if (endptr != NULL)
- *endptr = (char *) nptr;
- return ULONG_MAX;
- }
- result *= base;
- result += digval;
- ++nptr;
- }
-
- if (endptr != NULL)
- *endptr = (char *) nptr;
- return result * sign;
-}
diff --git a/newlib/libc/sys/linux/dl/dl-misc.c b/newlib/libc/sys/linux/dl/dl-misc.c
deleted file mode 100644
index 1a4c297d5..000000000
--- a/newlib/libc/sys/linux/dl/dl-misc.c
+++ /dev/null
@@ -1,277 +0,0 @@
-/* Miscellaneous support functions for dynamic linker
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <assert.h>
-#include <fcntl.h>
-#include <ldsodefs.h>
-#include <limits.h>
-#include <link.h>
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-#include <sys/uio.h>
-
-#ifndef MAP_ANON
-/* This is the only dl-sysdep.c function that is actually needed at run-time
- by _dl_map_object. */
-
-int
-_dl_sysdep_open_zero_fill (void)
-{
- return __open ("/dev/zero", O_RDONLY);
-}
-#endif
-
-/* Read the whole contents of FILE into new mmap'd space with given
- protections. *SIZEP gets the size of the file. On error MAP_FAILED
- is returned. */
-
-void *
-internal_function
-_dl_sysdep_read_whole_file (const char *file, size_t *sizep, int prot)
-{
- void *result = MAP_FAILED;
- struct stat64 st;
- int fd = __open (file, O_RDONLY);
- if (fd >= 0)
- {
- if (fstat64 (fd, &st) >= 0)
- {
- *sizep = st.st_size;
-
- /* No need to map the file if it is empty. */
- if (*sizep != 0)
- /* Map a copy of the file contents. */
- result = mmap (NULL, *sizep, prot,
-#ifdef MAP_COPY
- MAP_COPY
-#else
- MAP_PRIVATE
-#endif
-#ifdef MAP_FILE
- | MAP_FILE
-#endif
- , fd, 0);
- }
- close (fd);
- }
- return result;
-}
-
-
-/* Descriptor to write debug messages to. */
-int _dl_debug_fd = 2;
-
-
-/* Bare-bone printf implementation. This function only knows about
- the formats and flags needed and can handle only up to 64 stripes in
- the output. */
-static void
-_dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg)
-{
- const int niovmax = 64;
- struct iovec iov[niovmax];
- int niov = 0;
- pid_t pid = 0;
- char pidbuf[7];
-
- while (*fmt != '\0')
- {
- const char *startp = fmt;
-
- if (tag_p > 0)
- {
- /* Generate the tag line once. It consists of the PID and a
- colon followed by a tab. */
- if (pid == 0)
- {
- char *p = "0";
- pid = __getpid ();
- assert (pid >= 0 && pid < 100000);
- while (p > pidbuf)
- *--p = '0';
- pidbuf[5] = ':';
- pidbuf[6] = '\t';
- }
-
- /* Append to the output. */
- assert (niov < niovmax);
- iov[niov].iov_len = 7;
- iov[niov++].iov_base = pidbuf;
-
- /* No more tags until we see the next newline. */
- tag_p = -1;
- }
-
- /* Skip everything except % and \n (if tags are needed). */
- while (*fmt != '\0' && *fmt != '%' && (! tag_p || *fmt != '\n'))
- ++fmt;
-
- /* Append constant string. */
- assert (niov < niovmax);
- if ((iov[niov].iov_len = fmt - startp) != 0)
- iov[niov++].iov_base = (char *) startp;
-
- if (*fmt == '%')
- {
- /* It is a format specifier. */
- char fill = ' ';
- int width = -1;
-#if LONG_MAX != INT_MAX
- int long_mod = 0;
-#endif
-
- /* Recognize zero-digit fill flag. */
- if (*++fmt == '0')
- {
- fill = '0';
- ++fmt;
- }
-
- /* See whether with comes from a parameter. Note that no other
- way to specify the width is implemented. */
- if (*fmt == '*')
- {
- width = va_arg (arg, int);
- ++fmt;
- }
-
- /* Recognize the l modifier. It is only important on some
- platforms where long and int have a different size. We
- can use the same code for size_t. */
- if (*fmt == 'l' || *fmt == 'Z')
- {
-#if LONG_MAX != INT_MAX
- long_mod = 1;
-#endif
- ++fmt;
- }
-
- switch (*fmt)
- {
- /* Integer formatting. */
- case 'u':
- case 'x':
- {
- /* We have to make a difference if long and int have a
- different size. */
-#if LONG_MAX != INT_MAX
- unsigned long int num = (long_mod
- ? va_arg (arg, unsigned long int)
- : va_arg (arg, unsigned int));
-#else
- unsigned long int num = va_arg (arg, unsigned int);
-#endif
- /* We use alloca() to allocate the buffer with the most
- pessimistic guess for the size. Using alloca() allows
- having more than one integer formatting in a call. */
- char *buf = (char *) alloca (3 * sizeof (unsigned long int));
- char *endp = &buf[3 * sizeof (unsigned long int)];
- char *cp = "0";
-
- /* Pad to the width the user specified. */
- if (width != -1)
- while (endp - cp < width)
- *--cp = fill;
-
- iov[niov].iov_base = cp;
- iov[niov].iov_len = endp - cp;
- ++niov;
- }
- break;
-
- case 's':
- /* Get the string argument. */
- iov[niov].iov_base = va_arg (arg, char *);
- iov[niov].iov_len = strlen (iov[niov].iov_base);
- ++niov;
- break;
-
- case '%':
- iov[niov].iov_base = (void *) fmt;
- iov[niov].iov_len = 1;
- ++niov;
- break;
-
- default:
- assert (! "invalid format specifier");
- }
- ++fmt;
- }
- else if (*fmt == '\n')
- {
- /* See whether we have to print a single newline character. */
- if (fmt == startp)
- {
- iov[niov].iov_base = (char *) startp;
- iov[niov++].iov_len = 1;
- }
- else
- /* No, just add it to the rest of the string. */
- ++iov[niov - 1].iov_len;
-
- /* Next line, print a tag again. */
- tag_p = 1;
- ++fmt;
- }
- }
-
- /* Finally write the result. */
- writev (fd, iov, niov);
-}
-
-
-/* Write to debug file. */
-void
-_dl_debug_printf (const char *fmt, ...)
-{
- va_list arg;
-
- va_start (arg, fmt);
- _dl_debug_vdprintf (_dl_debug_fd, 1, fmt, arg);
- va_end (arg);
-}
-
-
-/* Write to debug file but don't start with a tag. */
-void
-_dl_debug_printf_c (const char *fmt, ...)
-{
- va_list arg;
-
- va_start (arg, fmt);
- _dl_debug_vdprintf (_dl_debug_fd, -1, fmt, arg);
- va_end (arg);
-}
-
-
-/* Write the given file descriptor. */
-void
-_dl_dprintf (int fd, const char *fmt, ...)
-{
- va_list arg;
-
- va_start (arg, fmt);
- _dl_debug_vdprintf (fd, 0, fmt, arg);
- va_end (arg);
-}
diff --git a/newlib/libc/sys/linux/dl/dl-object.c b/newlib/libc/sys/linux/dl/dl-object.c
deleted file mode 100644
index 1e2049e25..000000000
--- a/newlib/libc/sys/linux/dl/dl-object.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/* Storage management for the chain of loaded shared objects.
- Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-
-#include <assert.h>
-
-
-/* Allocate a `struct link_map' for a new object being loaded,
- and enter it into the _dl_loaded list. */
-
-struct link_map *
-internal_function
-_dl_new_object (char *realname, const char *libname, int type,
- struct link_map *loader)
-{
- struct link_map *l;
- int idx;
- size_t libname_len = strlen (libname) + 1;
- struct link_map *new;
- struct libname_list *newname;
-
- new = (struct link_map *) calloc (sizeof (*new) + sizeof (*newname)
- + libname_len, 1);
- if (new == NULL)
- return NULL;
-
- new->l_libname = newname = (struct libname_list *) (new + 1);
- newname->name = (char *) memcpy (newname + 1, libname, libname_len);
- /* newname->next = NULL; We use calloc therefore not necessary. */
- newname->dont_free = 1;
-
- new->l_name = realname;
- new->l_type = type;
- new->l_loader = loader;
- /* new->l_global = 0; We use calloc therefore not necessary. */
-
- /* Use the 'l_scope_mem' array by default for the the 'l_scope'
- information. If we need more entries we will allocate a large
- array dynamically. */
- new->l_scope = new->l_scope_mem;
- new->l_scope_max = sizeof (new->l_scope_mem) / sizeof (new->l_scope_mem[0]);
-
- /* Counter for the scopes we have to handle. */
- idx = 0;
-
- if (_dl_loaded != NULL)
- {
- l = _dl_loaded;
- while (l->l_next != NULL)
- l = l->l_next;
- new->l_prev = l;
- /* new->l_next = NULL; Would be necessary but we use calloc. */
- l->l_next = new;
-
- /* Add the global scope. */
- new->l_scope[idx++] = &_dl_loaded->l_searchlist;
- }
- else
- _dl_loaded = new;
- ++_dl_nloaded;
-
- /* If we have no loader the new object acts as it. */
- if (loader == NULL)
- loader = new;
- else
- /* Determine the local scope. */
- while (loader->l_loader != NULL)
- loader = loader->l_loader;
-
- /* Insert the scope if it isn't the global scope we already added. */
- if (idx == 0 || &loader->l_searchlist != new->l_scope[0])
- new->l_scope[idx] = &loader->l_searchlist;
-
- new->l_local_scope[0] = &new->l_searchlist;
-
- /* Don't try to find the origin for the main map which has the name "". */
- if (realname[0] != '\0')
- {
- size_t realname_len = strlen (realname) + 1;
- char *origin;
- char *cp;
-
- if (realname[0] == '/')
- {
- /* It is an absolute path. Use it. But we have to make a
- copy since we strip out the trailing slash. */
- cp = origin = (char *) malloc (realname_len);
- if (origin == NULL)
- {
- origin = (char *) -1;
- goto out;
- }
- }
- else
- {
- size_t len = realname_len;
- char *result = NULL;
-
- /* Get the current directory name. */
- origin = NULL;
- do
- {
- len += 128;
- origin = (char *) realloc (origin, len);
- }
- while (origin != NULL
- && (result = getcwd (origin, len - realname_len)) == NULL
- && errno == ERANGE);
-
- if (result == NULL)
- {
- /* We were not able to determine the current directory.
- Note that free(origin) is OK if origin == NULL. */
- free (origin);
- origin = (char *) -1;
- goto out;
- }
-
- /* Find the end of the path and see whether we have to add
- a slash. */
- cp = memchr (origin, '\0', strlen(origin));
- if (cp[-1] != '/')
- *cp++ = '/';
- }
-
- /* Add the real file name. */
- memcpy (cp, realname, realname_len);
-
- /* Now remove the filename and the slash. Leave the slash if it
- the name is something like "/foo". */
- cp = strrchr (origin, '/');
- if (cp == origin)
- origin[1] = '\0';
- else
- *cp = '\0';
-
- out:
- new->l_origin = origin;
- }
-
- return new;
-}
diff --git a/newlib/libc/sys/linux/dl/dl-open.c b/newlib/libc/sys/linux/dl/dl-open.c
deleted file mode 100644
index 4e068d435..000000000
--- a/newlib/libc/sys/linux/dl/dl-open.c
+++ /dev/null
@@ -1,487 +0,0 @@
-/* Load a shared object at runtime, relocate it, and run its initializer.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <assert.h>
-#include <dlfcn.h>
-#include <errno.h>
-#include <libintl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/mman.h> /* Check whether MAP_COPY is defined. */
-#include <sys/param.h>
-#include <ldsodefs.h>
-#include <bp-sym.h>
-
-#include <dl-dst.h>
-#include <machine/weakalias.h>
-
-
-extern ElfW(Addr) _dl_sysdep_start (void **start_argptr,
- void (*dl_main) (const ElfW(Phdr) *phdr,
- ElfW(Word) phnum,
- ElfW(Addr) *user_entry))
- weak_function;
-
-/* This function is used to unload the cache file if necessary. */
-extern void _dl_unload_cache (void);
-
-int __libc_argc = 0;
-char **__libc_argv = NULL;
-
-extern char **environ;
-
-extern int _dl_lazy; /* Do we do lazy relocations? */
-
-/* Undefine the following for debugging. */
-/* #define SCOPE_DEBUG 1 */
-#ifdef SCOPE_DEBUG
-static void show_scope (struct link_map *new);
-#endif
-
-extern size_t _dl_platformlen;
-
-/* We must be carefull not to leave us in an inconsistent state. Thus we
- catch any error and re-raise it after cleaning up. */
-
-struct dl_open_args
-{
- const char *file;
- int mode;
- const void *caller;
- struct link_map *map;
-};
-
-
-static int
-add_to_global (struct link_map *new)
-{
- struct link_map **new_global;
- unsigned int to_add = 0;
- unsigned int cnt;
-
- /* Count the objects we have to put in the global scope. */
- for (cnt = 0; cnt < new->l_searchlist.r_nlist; ++cnt)
- if (new->l_searchlist.r_list[cnt]->l_global == 0)
- ++to_add;
-
- /* The symbols of the new objects and its dependencies are to be
- introduced into the global scope that will be used to resolve
- references from other dynamically-loaded objects.
-
- The global scope is the searchlist in the main link map. We
- extend this list if necessary. There is one problem though:
- since this structure was allocated very early (before the libc
- is loaded) the memory it uses is allocated by the malloc()-stub
- in the ld.so. When we come here these functions are not used
- anymore. Instead the malloc() implementation of the libc is
- used. But this means the block from the main map cannot be used
- in an realloc() call. Therefore we allocate a completely new
- array the first time we have to add something to the locale scope. */
-
- if (_dl_global_scope_alloc == 0)
- {
- /* This is the first dynamic object given global scope. */
- _dl_global_scope_alloc = _dl_main_searchlist->r_nlist + to_add + 8;
- new_global = (struct link_map **)
- malloc (_dl_global_scope_alloc * sizeof (struct link_map *));
- if (new_global == NULL)
- {
- _dl_global_scope_alloc = 0;
- nomem:
- _dl_signal_error (ENOMEM, new->l_libname->name, NULL,
- N_("cannot extend global scope"));
- return 1;
- }
-
- /* Copy over the old entries. */
- memcpy (new_global, _dl_main_searchlist->r_list,
- (_dl_main_searchlist->r_nlist * sizeof (struct link_map *)));
-
- _dl_main_searchlist->r_list = new_global;
- }
- else if (_dl_main_searchlist->r_nlist + to_add > _dl_global_scope_alloc)
- {
- /* We have to extend the existing array of link maps in the
- main map. */
- new_global = (struct link_map **)
- realloc (_dl_main_searchlist->r_list,
- ((_dl_global_scope_alloc + to_add + 8)
- * sizeof (struct link_map *)));
- if (new_global == NULL)
- goto nomem;
-
- _dl_global_scope_alloc += to_add + 8;
- _dl_main_searchlist->r_list = new_global;
- }
-
- /* Now add the new entries. */
- for (cnt = 0; cnt < new->l_searchlist.r_nlist; ++cnt)
- {
- struct link_map *map = new->l_searchlist.r_list[cnt];
-
- if (map->l_global == 0)
- {
- map->l_global = 1;
- _dl_main_searchlist->r_list[_dl_main_searchlist->r_nlist] = map;
- ++_dl_main_searchlist->r_nlist;
- }
- }
-
- return 0;
-}
-
-
-static void
-dl_open_worker (void *a)
-{
- struct dl_open_args *args = a;
- const char *file = args->file;
- int mode = args->mode;
- struct link_map *new, *l;
- const char *dst;
- int lazy;
- unsigned int i;
-
- /* Maybe we have to expand a DST. */
- dst = strchr (file, '$');
- if (dst != NULL)
- {
- const void *caller = args->caller;
- size_t len = strlen (file);
- size_t required;
- struct link_map *call_map;
- char *new_file;
-
- /* We have to find out from which object the caller is calling. */
- call_map = NULL;
- for (l = _dl_loaded; l; l = l->l_next)
- if (caller >= (const void *) l->l_map_start
- && caller < (const void *) l->l_map_end)
- {
- /* There must be exactly one DSO for the range of the virtual
- memory. Otherwise something is really broken. */
- call_map = l;
- break;
- }
-
- if (call_map == NULL)
- /* In this case we assume this is the main application. */
- call_map = _dl_loaded;
-
- /* Determine how much space we need. We have to allocate the
- memory locally. */
- required = DL_DST_REQUIRED (call_map, file, len, _dl_dst_count (dst, 0));
-
- /* Get space for the new file name. */
- new_file = (char *) alloca (required + 1);
-
- /* Generate the new file name. */
- DL_DST_SUBSTITUTE (call_map, file, new_file, 0);
-
- /* If the substitution failed don't try to load. */
- if (*new_file == '\0')
- _dl_signal_error (0, "dlopen", NULL,
- N_("empty dynamic string token substitution"));
-
- /* Now we have a new file name. */
- file = new_file;
- }
-
- /* Load the named object. */
- args->map = new = _dl_map_object (NULL, file, 0, lt_loaded, 0,
- mode);
-
- /* If the pointer returned is NULL this means the RTLD_NOLOAD flag is
- set and the object is not already loaded. */
- if (new == NULL)
- {
- assert (mode & RTLD_NOLOAD);
- return;
- }
-
- /* It was already open. */
- if (new->l_searchlist.r_list != NULL)
- {
- /* Let the user know about the opencount. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_FILES, 0))
- _dl_debug_printf ("opening file=%s; opencount == %u\n\n",
- new->l_name, new->l_opencount);
-
- /* If the user requested the object to be in the global namespace
- but it is not so far, add it now. */
- if ((mode & RTLD_GLOBAL) && new->l_global == 0)
- (void) add_to_global (new);
-
- /* Increment just the reference counter of the object. */
- ++new->l_opencount;
-
- return;
- }
-
- /* Load that object's dependencies. */
- _dl_map_object_deps (new, NULL, 0, 0);
-
- /* So far, so good. Now check the versions. */
- for (i = 0; i < new->l_searchlist.r_nlist; ++i)
- if (new->l_searchlist.r_list[i]->l_versions == NULL)
- (void) _dl_check_map_versions (new->l_searchlist.r_list[i], 0, 0);
-
-#ifdef SCOPE_DEBUG
- show_scope (new);
-#endif
-
- /* Only do lazy relocation if `LD_BIND_NOW' is not set. */
- lazy = (mode & RTLD_BINDING_MASK) == RTLD_LAZY && _dl_lazy;
-
- /* Relocate the objects loaded. We do this in reverse order so that copy
- relocs of earlier objects overwrite the data written by later objects. */
-
- l = new;
- while (l->l_next)
- l = l->l_next;
- while (1)
- {
- if (! l->l_relocated)
- {
-#if 0
-#ifdef SHARED
- if (_dl_profile != NULL)
- {
- /* If this here is the shared object which we want to profile
- make sure the profile is started. We can find out whether
- this is necessary or not by observing the `_dl_profile_map'
- variable. If was NULL but is not NULL afterwars we must
- start the profiling. */
- struct link_map *old_profile_map = _dl_profile_map;
-
- _dl_relocate_object (l, l->l_scope, 1, 1);
-
- if (old_profile_map == NULL && _dl_profile_map != NULL)
- /* We must prepare the profiling. */
- _dl_start_profile (_dl_profile_map, _dl_profile_output);
- }
- else
-#endif
-#endif
- _dl_relocate_object (l, l->l_scope, lazy, 0);
- }
-
- if (l == new)
- break;
- l = l->l_prev;
- }
-
- /* Increment the open count for all dependencies. If the file is
- not loaded as a dependency here add the search list of the newly
- loaded object to the scope. */
- for (i = 0; i < new->l_searchlist.r_nlist; ++i)
- if (++new->l_searchlist.r_list[i]->l_opencount > 1
- && new->l_searchlist.r_list[i]->l_type == lt_loaded)
- {
- struct link_map *imap = new->l_searchlist.r_list[i];
- struct r_scope_elem **runp = imap->l_scope;
- size_t cnt = 0;
-
- while (*runp != NULL)
- {
- /* This can happen if imap was just loaded, but during
- relocation had l_opencount bumped because of relocation
- dependency. Avoid duplicates in l_scope. */
- if (__builtin_expect (*runp == &new->l_searchlist, 0))
- break;
-
- ++cnt;
- ++runp;
- }
-
- if (*runp != NULL)
- /* Avoid duplicates. */
- continue;
-
- if (__builtin_expect (cnt + 1 >= imap->l_scope_max, 0))
- {
- /* The 'r_scope' array is too small. Allocate a new one
- dynamically. */
- struct r_scope_elem **newp;
- size_t new_size = imap->l_scope_max * 2;
-
- if (imap->l_scope == imap->l_scope_mem)
- {
- newp = (struct r_scope_elem **)
- malloc (new_size * sizeof (struct r_scope_elem *));
- if (newp == NULL)
- _dl_signal_error (ENOMEM, "dlopen", NULL,
- N_("cannot create scope list"));
- imap->l_scope = memcpy (newp, imap->l_scope,
- cnt * sizeof (imap->l_scope[0]));
- }
- else
- {
- newp = (struct r_scope_elem **)
- realloc (imap->l_scope,
- new_size * sizeof (struct r_scope_elem *));
- if (newp == NULL)
- _dl_signal_error (ENOMEM, "dlopen", NULL,
- N_("cannot create scope list"));
- imap->l_scope = newp;
- }
-
- imap->l_scope_max = new_size;
- }
-
- imap->l_scope[cnt++] = &new->l_searchlist;
- imap->l_scope[cnt] = NULL;
- }
-
- /* Run the initializer functions of new objects. */
- _dl_init (new, __libc_argc, __libc_argv, environ);
-
- /* Now we can make the new map available in the global scope. */
- if (mode & RTLD_GLOBAL)
- /* Move the object in the global namespace. */
- if (add_to_global (new) != 0)
- /* It failed. */
- return;
-
- /* Mark the object as not deletable if the RTLD_NODELETE flags was
- passed. */
- if (__builtin_expect (mode & RTLD_NODELETE, 0))
- new->l_flags_1 |= DF_1_NODELETE;
-
- /* Let the user know about the opencount. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_FILES, 0))
- _dl_debug_printf ("opening file=%s; opencount == %u\n\n",
- new->l_name, new->l_opencount);
-}
-
-
-void *
-internal_function
-_dl_open (const char *file, int mode, const void *caller)
-{
- struct dl_open_args args;
- const char *objname;
- const char *errstring;
- int errcode;
-
- if ((mode & RTLD_BINDING_MASK) == 0)
- /* One of the flags must be set. */
- _dl_signal_error (EINVAL, file, NULL, N_("invalid mode for dlopen()"));
-
- /* Make sure we are alone. */
-#ifdef HAVE_DD_LOCK
- __lock_acquire_recursive(_dl_load_lock);
-#endif
-
- args.file = file;
- args.mode = mode;
- args.caller = caller;
- args.map = NULL;
- errcode = _dl_catch_error (&objname, &errstring, dl_open_worker, &args);
-
-#ifndef MAP_COPY
- /* We must munmap() the cache file. */
- _dl_unload_cache ();
-#endif
-
- /* Release the lock. */
-#ifdef HAVE_DD_LOCK
- __lock_release_recursive(_dl_load_lock);
-#endif
-
-
- if (errstring)
- {
- /* Some error occurred during loading. */
- char *local_errstring;
- size_t len_errstring;
-
- /* Remove the object from memory. It may be in an inconsistent
- state if relocation failed, for example. */
- if (args.map)
- {
- unsigned int i;
-
- /* Increment open counters for all objects since this has
- not happened yet. */
- for (i = 0; i < args.map->l_searchlist.r_nlist; ++i)
- ++args.map->l_searchlist.r_list[i]->l_opencount;
-
- _dl_close (args.map);
- }
-
- /* Make a local copy of the error string so that we can release the
- memory allocated for it. */
- len_errstring = strlen (errstring) + 1;
- if (objname == errstring + len_errstring)
- {
- size_t total_len = len_errstring + strlen (objname) + 1;
- local_errstring = alloca (total_len);
- memcpy (local_errstring, errstring, total_len);
- objname = local_errstring + len_errstring;
- }
- else
- {
- local_errstring = alloca (len_errstring);
- memcpy (local_errstring, errstring, len_errstring);
- }
-
- if (errstring != _dl_out_of_memory)
- free ((char *) errstring);
-
- /* Reraise the error. */
- _dl_signal_error (errcode, objname, NULL, local_errstring);
- }
-
-#ifndef SHARED
- DL_STATIC_INIT (args.map);
-#endif
-
- return args.map;
-}
-
-
-#ifdef SCOPE_DEBUG
-#include <unistd.h>
-
-static void
-show_scope (struct link_map *new)
-{
- int scope_cnt;
-
- for (scope_cnt = 0; new->l_scope[scope_cnt] != NULL; ++scope_cnt)
- {
- char numbuf[2];
- unsigned int cnt;
-
- numbuf[0] = '0' + scope_cnt;
- numbuf[1] = '\0';
- _dl_printf ("scope %s:", numbuf);
-
- for (cnt = 0; cnt < new->l_scope[scope_cnt]->r_nlist; ++cnt)
- if (*new->l_scope[scope_cnt]->r_list[cnt]->l_name)
- _dl_printf (" %s", new->l_scope[scope_cnt]->r_list[cnt]->l_name);
- else
- _dl_printf (" <main>");
-
- _dl_printf ("\n");
- }
-}
-#endif
diff --git a/newlib/libc/sys/linux/dl/dl-osinfo.h b/newlib/libc/sys/linux/dl/dl-osinfo.h
deleted file mode 100644
index 4976b3126..000000000
--- a/newlib/libc/sys/linux/dl/dl-osinfo.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Operating system specific code for generic dynamic loader functions.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <string.h>
-#include <sys/sysctl.h>
-#include <sys/utsname.h>
-#include "kernel-features.h"
-
-#ifndef MIN
-# define MIN(a,b) (((a)<(b))?(a):(b))
-#endif
-
-#ifdef SHARED
-/* This is the function used in the dynamic linker to print the fatal error
- message. */
-static inline void
-__attribute__ ((__noreturn__))
-dl_fatal (const char *str)
-{
- _dl_dprintf (2, str);
- _exit (1);
-}
-#endif
-
-
-#define DL_SYSDEP_OSCHECK(FATAL) \
- do { \
- /* Test whether the kernel is new enough. This test is only \
- performed if the library is not compiled to run on all \
- kernels. */ \
- if (__LINUX_KERNEL_VERSION > 0) \
- { \
- char bufmem[64]; \
- char *buf = bufmem; \
- unsigned int version; \
- int parts; \
- char *cp; \
- struct utsname uts; \
- \
- /* Try the uname syscall */ \
- if (__uname (&uts)) \
- { \
- /* This was not successful. Now try reading the /proc \
- filesystem. */ \
- ssize_t reslen; \
- int fd = __open ("/proc/sys/kernel/osrelease", O_RDONLY); \
- if (fd == -1 \
- || (reslen = __read (fd, bufmem, sizeof (bufmem))) <= 0) \
- /* This also didn't work. We give up since we cannot \
- make sure the library can actually work. */ \
- FATAL ("FATAL: cannot determine library version\n"); \
- __close (fd); \
- buf[MIN (reslen, (ssize_t) sizeof (bufmem) - 1)] = '\0'; \
- } \
- else \
- buf = uts.release; \
- \
- /* Now convert it into a number. The string consists of at most \
- three parts. */ \
- version = 0; \
- parts = 0; \
- cp = buf; \
- while ((*cp >= '0') && (*cp <= '9')) \
- { \
- unsigned int here = *cp++ - '0'; \
- \
- while ((*cp >= '0') && (*cp <= '9')) \
- { \
- here *= 10; \
- here += *cp++ - '0'; \
- } \
- \
- ++parts; \
- version <<= 8; \
- version |= here; \
- \
- if (*cp++ != '.') \
- /* Another part following? */ \
- break; \
- } \
- \
- if (parts < 3) \
- version <<= 8 * (3 - parts); \
- \
- /* Now we can test with the required version. */ \
- if (version < __LINUX_KERNEL_VERSION) \
- /* Not sufficent. */ \
- FATAL ("FATAL: kernel too old\n"); \
- \
- _dl_osversion = version; \
- } \
- } while (0)
diff --git a/newlib/libc/sys/linux/dl/dl-profile.c b/newlib/libc/sys/linux/dl/dl-profile.c
deleted file mode 100644
index 52c533f5f..000000000
--- a/newlib/libc/sys/linux/dl/dl-profile.c
+++ /dev/null
@@ -1,539 +0,0 @@
-/* Profiling of shared libraries.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
- Based on the BSD mcount implementation.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <sys/gmon.h>
-#include <sys/gmon_out.h>
-#include <sys/mman.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-#include <atomicity.h>
-#include <config.h>
-
-/* The LD_PROFILE feature has to be implemented different to the
- normal profiling using the gmon/ functions. The problem is that an
- arbitrary amount of processes simulataneously can be run using
- profiling and all write the results in the same file. To provide
- this mechanism one could implement a complicated mechanism to merge
- the content of two profiling runs or one could extend the file
- format to allow more than one data set. For the second solution we
- would have the problem that the file can grow in size beyond any
- limit and both solutions have the problem that the concurrency of
- writing the results is a big problem.
-
- Another much simpler method is to use mmap to map the same file in
- all using programs and modify the data in the mmap'ed area and so
- also automatically on the disk. Using the MAP_SHARED option of
- mmap(2) this can be done without big problems in more than one
- file.
-
- This approach is very different from the normal profiling. We have
- to use the profiling data in exactly the way they are expected to
- be written to disk. But the normal format used by gprof is not usable
- to do this. It is optimized for size. It writes the tags as single
- bytes but this means that the following 32/64 bit values are
- unaligned.
-
- Therefore we use a new format. This will look like this
-
- 0 1 2 3 <- byte is 32 bit word
- 0000 g m o n
- 0004 *version* <- GMON_SHOBJ_VERSION
- 0008 00 00 00 00
- 000c 00 00 00 00
- 0010 00 00 00 00
-
- 0014 *tag* <- GMON_TAG_TIME_HIST
- 0018 ?? ?? ?? ??
- ?? ?? ?? ?? <- 32/64 bit LowPC
- 0018+A ?? ?? ?? ??
- ?? ?? ?? ?? <- 32/64 bit HighPC
- 0018+2*A *histsize*
- 001c+2*A *profrate*
- 0020+2*A s e c o
- 0024+2*A n d s \0
- 0028+2*A \0 \0 \0 \0
- 002c+2*A \0 \0 \0
- 002f+2*A s
-
- 0030+2*A ?? ?? ?? ?? <- Count data
- ... ...
- 0030+2*A+K ?? ?? ?? ??
-
- 0030+2*A+K *tag* <- GMON_TAG_CG_ARC
- 0034+2*A+K *lastused*
- 0038+2*A+K ?? ?? ?? ??
- ?? ?? ?? ?? <- FromPC#1
- 0038+3*A+K ?? ?? ?? ??
- ?? ?? ?? ?? <- ToPC#1
- 0038+4*A+K ?? ?? ?? ?? <- Count#1
- ... ... ...
- 0038+(2*(CN-1)+2)*A+(CN-1)*4+K ?? ?? ?? ??
- ?? ?? ?? ?? <- FromPC#CGN
- 0038+(2*(CN-1)+3)*A+(CN-1)*4+K ?? ?? ?? ??
- ?? ?? ?? ?? <- ToPC#CGN
- 0038+(2*CN+2)*A+(CN-1)*4+K ?? ?? ?? ?? <- Count#CGN
-
- We put (for now?) no basic block information in the file since this would
- introduce rase conditions among all the processes who want to write them.
-
- `K' is the number of count entries which is computed as
-
- textsize / HISTFRACTION
-
- `CG' in the above table is the number of call graph arcs. Normally,
- the table is sparse and the profiling code writes out only the those
- entries which are really used in the program run. But since we must
- not extend this table (the profiling file) we'll keep them all here.
- So CN can be executed in advance as
-
- MINARCS <= textsize*(ARCDENSITY/100) <= MAXARCS
-
- Now the remaining question is: how to build the data structures we can
- work with from this data. We need the from set and must associate the
- froms with all the associated tos. We will do this by constructing this
- data structures at the program start. To do this we'll simply visit all
- entries in the call graph table and add it to the appropriate list. */
-
-extern int __profile_frequency (void);
-
-/* We define a special type to address the elements of the arc table.
- This is basically the `gmon_cg_arc_record' format but it includes
- the room for the tag and it uses real types. */
-struct here_cg_arc_record
- {
- uintptr_t from_pc;
- uintptr_t self_pc;
- uint32_t count;
- } __attribute__ ((packed));
-
-static struct here_cg_arc_record *data;
-
-/* Nonzero if profiling is under way. */
-static int running;
-
-/* This is the number of entry which have been incorporated in the toset. */
-static uint32_t narcs;
-/* This is a pointer to the object representing the number of entries
- currently in the mmaped file. At no point of time this has to be the
- same as NARCS. If it is equal all entries from the file are in our
- lists. */
-static volatile uint32_t *narcsp;
-
-static volatile uint16_t *kcount;
-static size_t kcountsize;
-
-struct here_fromstruct
- {
- struct here_cg_arc_record volatile *here;
- uint16_t link;
- };
-
-static volatile uint16_t *tos;
-
-static struct here_fromstruct *froms;
-static uint32_t fromlimit;
-static volatile uint32_t fromidx;
-
-static uintptr_t lowpc;
-static size_t textsize;
-static unsigned int hashfraction;
-static unsigned int log_hashfraction;
-
-
-
-/* Set up profiling data to profile object desribed by MAP. The output
- file is found (or created) in OUTPUT_DIR. */
-void
-internal_function
-_dl_start_profile (struct link_map *map, const char *output_dir)
-{
- char *filename;
- int fd;
- struct stat64 st;
- const ElfW(Phdr) *ph;
- ElfW(Addr) mapstart = ~((ElfW(Addr)) 0);
- ElfW(Addr) mapend = 0;
- struct gmon_hdr gmon_hdr;
- struct gmon_hist_hdr hist_hdr;
- char *hist, *cp, *tmp;
- size_t idx;
- size_t tossize;
- size_t fromssize;
- uintptr_t highpc;
- struct gmon_hdr *addr = NULL;
- off_t expected_size;
- /* See profil(2) where this is described. */
- int s_scale;
-#define SCALE_1_TO_1 0x10000L
-
- /* Compute the size of the sections which contain program code. */
- for (ph = map->l_phdr; ph < &map->l_phdr[map->l_phnum]; ++ph)
- if (ph->p_type == PT_LOAD && (ph->p_flags & PF_X))
- {
- ElfW(Addr) start = (ph->p_vaddr & ~(_dl_pagesize - 1));
- ElfW(Addr) end = ((ph->p_vaddr + ph->p_memsz + _dl_pagesize - 1)
- & ~(_dl_pagesize - 1));
-
- if (start < mapstart)
- mapstart = start;
- if (end > mapend)
- mapend = end;
- }
-
- /* Now we can compute the size of the profiling data. This is done
- with the same formulars as in `monstartup' (see gmon.c). */
- running = 0;
- lowpc = ROUNDDOWN (mapstart + map->l_addr,
- HISTFRACTION * sizeof (HISTCOUNTER));
- highpc = ROUNDUP (mapend + map->l_addr,
- HISTFRACTION * sizeof (HISTCOUNTER));
- textsize = highpc - lowpc;
- kcountsize = textsize / HISTFRACTION;
- hashfraction = HASHFRACTION;
- if ((HASHFRACTION & (HASHFRACTION - 1)) == 0)
- /* If HASHFRACTION is a power of two, mcount can use shifting
- instead of integer division. Precompute shift amount. */
- log_hashfraction = ffs (hashfraction * sizeof (*froms)) - 1;
- else
- log_hashfraction = -1;
- tossize = textsize / HASHFRACTION;
- fromlimit = textsize * ARCDENSITY / 100;
- if (fromlimit < MINARCS)
- fromlimit = MINARCS;
- if (fromlimit > MAXARCS)
- fromlimit = MAXARCS;
- fromssize = fromlimit * sizeof (struct here_fromstruct);
-
- expected_size = (sizeof (struct gmon_hdr)
- + 4 + sizeof (struct gmon_hist_hdr) + kcountsize
- + 4 + 4 + fromssize * sizeof (struct here_cg_arc_record));
-
- /* Create the gmon_hdr we expect or write. */
- memset (&gmon_hdr, '\0', sizeof (struct gmon_hdr));
- memcpy (&gmon_hdr.cookie[0], GMON_MAGIC, sizeof (gmon_hdr.cookie));
- *(int32_t *) gmon_hdr.version = GMON_SHOBJ_VERSION;
-
- /* Create the hist_hdr we expect or write. */
- *(char **) hist_hdr.low_pc = (char *) mapstart;
- *(char **) hist_hdr.high_pc = (char *) mapend;
- *(int32_t *) hist_hdr.hist_size = kcountsize / sizeof (HISTCOUNTER);
- *(int32_t *) hist_hdr.prof_rate = __profile_frequency ();
- strncpy (hist_hdr.dimen, "seconds", sizeof (hist_hdr.dimen));
- hist_hdr.dimen_abbrev = 's';
-
- /* First determine the output name. We write in the directory
- OUTPUT_DIR and the name is composed from the shared objects
- soname (or the file name) and the ending ".profile". */
- filename = (char *) alloca (strlen (output_dir) + 1 + strlen (_dl_profile)
- + sizeof ".profile");
- cp = strcpy (filename, output_dir);
- cp += strlen (output_dir);
- *cp++ = '/';
- tmp = strcpy (cp, _dl_profile);
- tmp += strlen (_dl_profile);
- strcpy (tmp, ".profile");
-
-#ifdef O_NOFOLLOW
-# define EXTRA_FLAGS | O_NOFOLLOW
-#else
-# define EXTRA_FLAGS
-#endif
- fd = __open (filename, O_RDWR | O_CREAT EXTRA_FLAGS);
- if (fd == -1)
- {
- /* We cannot write the profiling data so don't do anything. */
- char buf[400];
- _dl_error_printf ("%s: cannot open file: %s\n", filename,
- __strerror_r (errno, buf, sizeof buf));
- return;
- }
-
- if (fstat64 (fd, &st) < 0 || !S_ISREG (st.st_mode))
- {
- /* Not stat'able or not a regular file => don't use it. */
- char buf[400];
- int errnum = errno;
- __close (fd);
- _dl_error_printf ("%s: cannot stat file: %s\n", filename,
- __strerror_r (errnum, buf, sizeof buf));
- return;
- }
-
- /* Test the size. If it does not match what we expect from the size
- values in the map MAP we don't use it and warn the user. */
- if (st.st_size == 0)
- {
- /* We have to create the file. */
- char buf[_dl_pagesize];
-
- memset (buf, '\0', _dl_pagesize);
-
- if (__lseek (fd, expected_size & ~(_dl_pagesize - 1), SEEK_SET) == -1)
- {
- char buf[400];
- int errnum;
- cannot_create:
- errnum = errno;
- __close (fd);
- _dl_error_printf ("%s: cannot create file: %s\n", filename,
- __strerror_r (errnum, buf, sizeof buf));
- return;
- }
-
- if (TEMP_FAILURE_RETRY (__libc_write (fd, buf, (expected_size
- & (_dl_pagesize - 1))))
- < 0)
- goto cannot_create;
- }
- else if (st.st_size != expected_size)
- {
- __close (fd);
- wrong_format:
-
- if (addr != NULL)
- __munmap ((void *) addr, expected_size);
-
- _dl_error_printf ("%s: file is no correct profile data file for `%s'\n",
- filename, _dl_profile);
- return;
- }
-
- addr = (struct gmon_hdr *) __mmap (NULL, expected_size, PROT_READ|PROT_WRITE,
- MAP_SHARED|MAP_FILE, fd, 0);
- if (addr == (struct gmon_hdr *) MAP_FAILED)
- {
- char buf[400];
- int errnum = errno;
- __close (fd);
- _dl_error_printf ("%s: cannot map file: %s\n", filename,
- __strerror_r (errnum, buf, sizeof buf));
- return;
- }
-
- /* We don't need the file desriptor anymore. */
- __close (fd);
-
- /* Pointer to data after the header. */
- hist = (char *) (addr + 1);
- kcount = (uint16_t *) ((char *) hist + sizeof (uint32_t)
- + sizeof (struct gmon_hist_hdr));
-
- /* Compute pointer to array of the arc information. */
- narcsp = (uint32_t *) ((char *) kcount + kcountsize + sizeof (uint32_t));
- data = (struct here_cg_arc_record *) ((char *) narcsp + sizeof (uint32_t));
-
- if (st.st_size == 0)
- {
- /* Create the signature. */
- memcpy (addr, &gmon_hdr, sizeof (struct gmon_hdr));
-
- *(uint32_t *) hist = GMON_TAG_TIME_HIST;
- memcpy (hist + sizeof (uint32_t), &hist_hdr,
- sizeof (struct gmon_hist_hdr));
-
- narcsp[-1] = GMON_TAG_CG_ARC;
- }
- else
- {
- /* Test the signature in the file. */
- if (memcmp (addr, &gmon_hdr, sizeof (struct gmon_hdr)) != 0
- || *(uint32_t *) hist != GMON_TAG_TIME_HIST
- || memcmp (hist + sizeof (uint32_t), &hist_hdr,
- sizeof (struct gmon_hist_hdr)) != 0
- || narcsp[-1] != GMON_TAG_CG_ARC)
- goto wrong_format;
- }
-
- /* Allocate memory for the froms data and the pointer to the tos records. */
- tos = (uint16_t *) calloc (tossize + fromssize, 1);
- if (tos == NULL)
- {
- __munmap ((void *) addr, expected_size);
- _dl_fatal_printf ("Out of memory while initializing profiler\n");
- /* NOTREACHED */
- }
-
- froms = (struct here_fromstruct *) ((char *) tos + tossize);
- fromidx = 0;
-
- /* Now we have to process all the arc count entries. BTW: it is
- not critical whether the *NARCSP value changes meanwhile. Before
- we enter a new entry in to toset we will check that everything is
- available in TOS. This happens in _dl_mcount.
-
- Loading the entries in reverse order should help to get the most
- frequently used entries at the front of the list. */
- for (idx = narcs = MIN (*narcsp, fromlimit); idx > 0; )
- {
- size_t to_index;
- size_t newfromidx;
- --idx;
- to_index = (data[idx].self_pc / (hashfraction * sizeof (*tos)));
- newfromidx = fromidx++;
- froms[newfromidx].here = &data[idx];
- froms[newfromidx].link = tos[to_index];
- tos[to_index] = newfromidx;
- }
-
- /* Setup counting data. */
- if (kcountsize < highpc - lowpc)
- {
-#if 0
- s_scale = ((double) kcountsize / (highpc - lowpc)) * SCALE_1_TO_1;
-#else
- size_t range = highpc - lowpc;
- size_t quot = range / kcountsize;
-
- if (quot >= SCALE_1_TO_1)
- s_scale = 1;
- else if (quot >= SCALE_1_TO_1 / 256)
- s_scale = SCALE_1_TO_1 / quot;
- else if (range > ULONG_MAX / 256)
- s_scale = (SCALE_1_TO_1 * 256) / (range / (kcountsize / 256));
- else
- s_scale = (SCALE_1_TO_1 * 256) / ((range * 256) / kcountsize);
-#endif
- }
- else
- s_scale = SCALE_1_TO_1;
-
- /* Start the profiler. */
- profil ((void *) kcount, kcountsize, lowpc, s_scale);
-
- /* Turn on profiling. */
- running = 1;
-}
-
-
-void
-_dl_mcount (ElfW(Addr) frompc, ElfW(Addr) selfpc)
-{
- volatile uint16_t *topcindex;
- size_t i, fromindex;
- struct here_fromstruct *fromp;
-
- if (! running)
- return;
-
- /* Compute relative addresses. The shared object can be loaded at
- any address. The value of frompc could be anything. We cannot
- restrict it in any way, just set to a fixed value (0) in case it
- is outside the allowed range. These calls show up as calls from
- <external> in the gprof output. */
- frompc -= lowpc;
- if (frompc >= textsize)
- frompc = 0;
- selfpc -= lowpc;
- if (selfpc >= textsize)
- goto done;
-
- /* Getting here we now have to find out whether the location was
- already used. If yes we are lucky and only have to increment a
- counter (this also has to be atomic). If the entry is new things
- are getting complicated... */
-
- /* Avoid integer divide if possible. */
- if ((HASHFRACTION & (HASHFRACTION - 1)) == 0)
- i = selfpc >> log_hashfraction;
- else
- i = selfpc / (hashfraction * sizeof (*tos));
-
- topcindex = &tos[i];
- fromindex = *topcindex;
-
- if (fromindex == 0)
- goto check_new_or_add;
-
- fromp = &froms[fromindex];
-
- /* We have to look through the chain of arcs whether there is already
- an entry for our arc. */
- while (fromp->here->from_pc != frompc)
- {
- if (fromp->link != 0)
- do
- fromp = &froms[fromp->link];
- while (fromp->link != 0 && fromp->here->from_pc != frompc);
-
- if (fromp->here->from_pc != frompc)
- {
- topcindex = &fromp->link;
-
- check_new_or_add:
- /* Our entry is not among the entries we read so far from the
- data file. Now see whether we have to update the list. */
- while (narcs != *narcsp && narcs < fromlimit)
- {
- size_t to_index;
- size_t newfromidx;
- to_index = (data[narcs].self_pc
- / (hashfraction * sizeof (*tos)));
- newfromidx = exchange_and_add (&fromidx, 1) + 1;
- froms[newfromidx].here = &data[narcs];
- froms[newfromidx].link = tos[to_index];
- tos[to_index] = newfromidx;
- atomic_add (&narcs, 1);
- }
-
- /* If we still have no entry stop searching and insert. */
- if (*topcindex == 0)
- {
- uint32_t newarc = exchange_and_add (narcsp, 1);
-
- /* In rare cases it could happen that all entries in FROMS are
- occupied. So we cannot count this anymore. */
- if (newarc >= fromlimit)
- goto done;
-
- *topcindex = exchange_and_add (&fromidx, 1) + 1;
- fromp = &froms[*topcindex];
-
- fromp->here = &data[newarc];
- data[newarc].from_pc = frompc;
- data[newarc].self_pc = selfpc;
- data[newarc].count = 0;
- fromp->link = 0;
- atomic_add (&narcs, 1);
-
- break;
- }
-
- fromp = &froms[*topcindex];
- }
- else
- /* Found in. */
- break;
- }
-
- /* Increment the counter. */
- atomic_add (&fromp->here->count, 1);
-
- done:
- ;
-}
diff --git a/newlib/libc/sys/linux/dl/dl-profstub.c b/newlib/libc/sys/linux/dl/dl-profstub.c
deleted file mode 100644
index 41758864b..000000000
--- a/newlib/libc/sys/linux/dl/dl-profstub.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Helper definitions for profiling of shared libraries.
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <dlfcn.h>
-#include <elf.h>
-#include <ldsodefs.h>
-#include <libc-symbols.h>
-
-/* This is the map for the shared object we profile. It is defined here
- only because we test for this value being NULL or not. */
-extern struct link_map *_dl_profile_map;
-
-
-void
-_dl_mcount_wrapper (void *selfpc)
-{
- _dl_mcount ((ElfW(Addr)) RETURN_ADDRESS (0), (ElfW(Addr)) selfpc);
-}
-
-
-void
-_dl_mcount_wrapper_check (void *selfpc)
-{
- if (_dl_profile_map != NULL)
- _dl_mcount ((ElfW(Addr)) RETURN_ADDRESS (0), (ElfW(Addr)) selfpc);
-}
diff --git a/newlib/libc/sys/linux/dl/dl-reloc.c b/newlib/libc/sys/linux/dl/dl-reloc.c
deleted file mode 100644
index 0bffa4e76..000000000
--- a/newlib/libc/sys/linux/dl/dl-reloc.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/* Relocate a shared object and resolve its references to other loaded objects.
- Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <libintl.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <sys/mman.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include "dynamic-link.h"
-
-/* Statistics function. */
-unsigned long int _dl_num_cache_relocations;
-
-
-void
-_dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
- int lazy, int consider_profiling)
-{
- struct textrels
- {
- caddr_t start;
- size_t len;
- int prot;
- struct textrels *next;
- } *textrels = NULL;
- /* Initialize it to make the compiler happy. */
- const char *errstring = NULL;
-
- if (l->l_relocated)
- return;
-
- /* If DT_BIND_NOW is set relocate all references in this object. We
- do not do this if we are profiling, of course. */
- if (!consider_profiling
- && __builtin_expect (l->l_info[DT_BIND_NOW] != NULL, 0))
- lazy = 0;
-
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_RELOC, 0))
- _dl_printf ("\nrelocation processing: %s%s\n",
- l->l_name[0] ? l->l_name : _dl_argv[0], lazy ? " (lazy)" : "");
-
- /* DT_TEXTREL is now in level 2 and might phase out at some time.
- But we rewrite the DT_FLAGS entry to a DT_TEXTREL entry to make
- testing easier and therefore it will be available at all time. */
- if (__builtin_expect (l->l_info[DT_TEXTREL] != NULL, 0))
- {
- /* Bletch. We must make read-only segments writable
- long enough to relocate them. */
- const ElfW(Phdr) *ph;
- for (ph = l->l_phdr; ph < &l->l_phdr[l->l_phnum]; ++ph)
- if (ph->p_type == PT_LOAD && (ph->p_flags & PF_W) == 0)
- {
- struct textrels *newp;
-
- newp = (struct textrels *) alloca (sizeof (*newp));
- newp->len = (((ph->p_vaddr + ph->p_memsz + _dl_pagesize - 1)
- & ~(_dl_pagesize - 1))
- - (ph->p_vaddr & ~(_dl_pagesize - 1)));
- newp->start = ((ph->p_vaddr & ~(_dl_pagesize - 1))
- + (caddr_t) l->l_addr);
-
- if (mprotect (newp->start, newp->len, PROT_READ|PROT_WRITE) < 0)
- {
- errstring = N_("cannot make segment writable for relocation");
- call_error:
- _dl_signal_error (errno, l->l_name, NULL, errstring);
- }
-
-#if (PF_R | PF_W | PF_X) == 7 && (PROT_READ | PROT_WRITE | PROT_EXEC) == 7
- newp->prot = (PF_TO_PROT
- >> ((ph->p_flags & (PF_R | PF_W | PF_X)) * 4)) & 0xf;
-#else
- newp->prot = 0;
- if (ph->p_flags & PF_R)
- newp->prot |= PROT_READ;
- if (ph->p_flags & PF_W)
- newp->prot |= PROT_WRITE;
- if (ph->p_flags & PF_X)
- newp->prot |= PROT_EXEC;
-#endif
- newp->next = textrels;
- textrels = newp;
- }
- }
-
- {
- /* Do the actual relocation of the object's GOT and other data. */
-
- /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
-#define RESOLVE_MAP(ref, version, r_type, scope) \
- (ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
- ? ((__builtin_expect ((*ref) == map->l_lookup_cache.sym, 0) \
- && elf_machine_type_class (r_type) == map->l_lookup_cache.type_class)\
- ? (++_dl_num_cache_relocations, \
- (*ref) = map->l_lookup_cache.ret, \
- map->l_lookup_cache.value) \
- : ({ lookup_t _lr; \
- int _tc = elf_machine_type_class (r_type); \
- map->l_lookup_cache.type_class = _tc; \
- map->l_lookup_cache.sym = (*ref); \
- _lr = ((version) != NULL && (version)->hash != 0 \
- ? _dl_lookup_versioned_symbol (strtab + (*ref)->st_name, \
- map, (ref), scope, \
- (version), _tc, 0) \
- : _dl_lookup_symbol (strtab + (*ref)->st_name, map, (ref),\
- scope, _tc, 0)); \
- map->l_lookup_cache.ret = (*ref); \
- map->l_lookup_cache.value = _lr; })) \
- : map)
-#define RESOLVE(ref, version, r_type, scope) \
- (ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
- ? ((__builtin_expect ((*ref) == map->l_lookup_cache.sym, 0) \
- && elf_machine_type_class (r_type) == map->l_lookup_cache.type_class)\
- ? (++_dl_num_cache_relocations, \
- (*ref) = map->l_lookup_cache.ret, \
- map->l_lookup_cache.value) \
- : ({ lookup_t _lr; \
- int _tc = elf_machine_type_class (r_type); \
- map->l_lookup_cache.type_class = _tc; \
- map->l_lookup_cache.sym = (*ref); \
- _lr = ((version) != NULL && (version)->hash != 0 \
- ? _dl_lookup_versioned_symbol (strtab + (*ref)->st_name, \
- map, (ref), scope, \
- (version), _tc, 0) \
- : _dl_lookup_symbol (strtab + (*ref)->st_name, map, (ref),\
- scope, _tc, 0)); \
- map->l_lookup_cache.ret = (*ref); \
- map->l_lookup_cache.value = _lr; })) \
- : map->l_addr)
-
-#include "dynamic-link.h"
-
- ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling);
-
- if (__builtin_expect (consider_profiling, 0))
- {
- /* Allocate the array which will contain the already found
- relocations. If the shared object lacks a PLT (for example
- if it only contains lead function) the l_info[DT_PLTRELSZ]
- will be NULL. */
- if (l->l_info[DT_PLTRELSZ] == NULL)
- {
- errstring = N_("%s: profiler found no PLTREL in object %s\n");
- fatal:
- _dl_fatal_printf (errstring,
- _dl_argv[0] ?: "<program name unknown>",
- l->l_name);
- }
-
- l->l_reloc_result =
- (ElfW(Addr) *) calloc (sizeof (ElfW(Addr)),
- l->l_info[DT_PLTRELSZ]->d_un.d_val);
- if (l->l_reloc_result == NULL)
- {
- errstring = N_("\
-%s: profiler out of memory shadowing PLTREL of %s\n");
- goto fatal;
- }
- }
- }
-
- /* Mark the object so we know this work has been done. */
- l->l_relocated = 1;
-
- /* Undo the segment protection changes. */
- while (__builtin_expect (textrels != NULL, 0))
- {
- if (mprotect (textrels->start, textrels->len, textrels->prot) < 0)
- {
- errstring = N_("cannot restore segment prot after reloc");
- goto call_error;
- }
-
- textrels = textrels->next;
- }
-}
-
-#include <machine/dl-machine.h>
-
-void
-internal_function
-_dl_reloc_bad_type (struct link_map *map, unsigned int type, int plt)
-{
- /* XXX We cannot translate these messages. */
- static const char msg[2][32] = { "unexpected reloc type",
- "unexpected PLT reloc type" };
- char msgbuf[sizeof (msg[0])];
-
- strcpy (msgbuf, msg[plt]);
-
- _dl_signal_error (0, map->l_name, NULL, msgbuf);
-}
diff --git a/newlib/libc/sys/linux/dl/dl-runtime.c b/newlib/libc/sys/linux/dl/dl-runtime.c
deleted file mode 100644
index 4fb81cfaf..000000000
--- a/newlib/libc/sys/linux/dl/dl-runtime.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/* On-demand PLT fixup for shared objects.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <alloca.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include "dynamic-link.h"
-
-#ifndef __attribute_used__
-#define __attribute_used__
-#endif
-
-#if !defined ELF_MACHINE_NO_RELA || ELF_MACHINE_NO_REL
-# define PLTREL ElfW(Rela)
-#else
-# define PLTREL ElfW(Rel)
-#endif
-
-#ifndef VERSYMIDX
-# define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
-#endif
-
-
-/* This function is called through a special trampoline from the PLT the
- first time each PLT entry is called. We must perform the relocation
- specified in the PLT of the given shared object, and return the resolved
- function address to the trampoline, which will restart the original call
- to that address. Future calls will bounce directly from the PLT to the
- function. */
-
-#ifndef ELF_MACHINE_NO_PLT
-static ElfW(Addr) __attribute__ ((regparm (2), used))
-fixup (
-# ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
- ELF_MACHINE_RUNTIME_FIXUP_ARGS,
-# endif
- /* GKM FIXME: Fix trampoline to pass bounds so we can do
- without the `__unbounded' qualifier. */
- struct link_map *__unbounded l, ElfW(Word) reloc_offset)
-{
- const ElfW(Sym) *const symtab
- = (const void *) D_PTR (l, l_info[DT_SYMTAB]);
- const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]);
-
- const PLTREL *const reloc
- = (const void *) (D_PTR (l, l_info[DT_JMPREL]) + reloc_offset);
- const ElfW(Sym) *sym = &symtab[ELFW(R_SYM) (reloc->r_info)];
- void *const rel_addr = (void *)(l->l_addr + reloc->r_offset);
- lookup_t result;
- ElfW(Addr) value;
-
- /* The use of `alloca' here looks ridiculous but it helps. The goal is
- to prevent the function from being inlined and thus optimized out.
- There is no official way to do this so we use this trick. gcc never
- inlines functions which use `alloca'. */
- alloca (sizeof (int));
-
- /* Sanity check that we're really looking at a PLT relocation. */
- assert (ELFW(R_TYPE)(reloc->r_info) == ELF_MACHINE_JMP_SLOT);
-
- /* Look up the target symbol. If the normal lookup rules are not
- used don't look in the global scope. */
- if (__builtin_expect (ELFW(ST_VISIBILITY) (sym->st_other), 0) == 0)
- {
- switch (l->l_info[VERSYMIDX (DT_VERSYM)] != NULL)
- {
- default:
- {
- const ElfW(Half) *vernum =
- (const void *) D_PTR (l, l_info[VERSYMIDX (DT_VERSYM)]);
- ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info)];
- const struct r_found_version *version = &l->l_versions[ndx];
-
- if (version->hash != 0)
- {
- result = _dl_lookup_versioned_symbol (strtab + sym->st_name,
- l, &sym, l->l_scope,
- version,
- ELF_RTYPE_CLASS_PLT, 0);
- break;
- }
- }
- case 0:
- result = _dl_lookup_symbol (strtab + sym->st_name, l, &sym,
- l->l_scope, ELF_RTYPE_CLASS_PLT, 0);
- }
-
- /* Currently result contains the base load address (or link map)
- of the object that defines sym. Now add in the symbol
- offset. */
- value = (sym ? LOOKUP_VALUE_ADDRESS (result) + sym->st_value : 0);
- }
- else
- {
- /* We already found the symbol. The module (and therefore its load
- address) is also known. */
- value = l->l_addr + sym->st_value;
-#ifdef DL_LOOKUP_RETURNS_MAP
- result = l;
-#endif
- }
-
- /* And now perhaps the relocation addend. */
- value = elf_machine_plt_value (l, reloc, value);
-
- /* Finally, fix up the plt itself. */
- if (__builtin_expect (_dl_bind_not, 0))
- return value;
-
- return elf_machine_fixup_plt (l, result, reloc, rel_addr, value);
-}
-#endif
-
-#if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__
-
-static ElfW(Addr) __attribute__ ((regparm (3), used))
-profile_fixup (
-#ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
- ELF_MACHINE_RUNTIME_FIXUP_ARGS,
-#endif
- struct link_map *l, ElfW(Word) reloc_offset, ElfW(Addr) retaddr)
-{
- void (*mcount_fct) (ElfW(Addr), ElfW(Addr)) = _dl_mcount;
- ElfW(Addr) *resultp;
- lookup_t result;
- ElfW(Addr) value;
-
- /* The use of `alloca' here looks ridiculous but it helps. The goal is
- to prevent the function from being inlined, and thus optimized out.
- There is no official way to do this so we use this trick. gcc never
- inlines functions which use `alloca'. */
- alloca (sizeof (int));
-
- /* This is the address in the array where we store the result of previous
- relocations. */
- resultp = &l->l_reloc_result[reloc_offset / sizeof (PLTREL)];
-
- value = *resultp;
- if (value == 0)
- {
- /* This is the first time we have to relocate this object. */
- const ElfW(Sym) *const symtab
- = (const void *) D_PTR (l, l_info[DT_SYMTAB]);
- const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]);
-
- const PLTREL *const reloc
- = (const void *) (D_PTR (l, l_info[DT_JMPREL]) + reloc_offset);
- const ElfW(Sym) *sym = &symtab[ELFW(R_SYM) (reloc->r_info)];
-
- /* Sanity check that we're really looking at a PLT relocation. */
- assert (ELFW(R_TYPE)(reloc->r_info) == ELF_MACHINE_JMP_SLOT);
-
- /* Look up the target symbol. If the symbol is marked STV_PROTECTED
- don't look in the global scope. */
- if (__builtin_expect (ELFW(ST_VISIBILITY) (sym->st_other), 0) == 0)
- {
- switch (l->l_info[VERSYMIDX (DT_VERSYM)] != NULL)
- {
- default:
- {
- const ElfW(Half) *vernum =
- (const void *) D_PTR (l,l_info[VERSYMIDX (DT_VERSYM)]);
- ElfW(Half) ndx = vernum[ELFW(R_SYM) (reloc->r_info)];
- const struct r_found_version *version = &l->l_versions[ndx];
-
- if (version->hash != 0)
- {
- result = _dl_lookup_versioned_symbol(strtab + sym->st_name,
- l, &sym, l->l_scope,
- version,
- ELF_RTYPE_CLASS_PLT,
- 0);
- break;
- }
- }
- case 0:
- result = _dl_lookup_symbol (strtab + sym->st_name, l, &sym,
- l->l_scope, ELF_RTYPE_CLASS_PLT, 0);
- }
-
- /* Currently result contains the base load address (or link map)
- of the object that defines sym. Now add in the symbol
- offset. */
- value = (sym ? LOOKUP_VALUE_ADDRESS (result) + sym->st_value : 0);
- }
- else
- {
- /* We already found the symbol. The module (and therefore its load
- address) is also known. */
- value = l->l_addr + sym->st_value;
-#ifdef DL_LOOKUP_RETURNS_MAP
- result = l;
-#endif
- }
- /* And now perhaps the relocation addend. */
- value = elf_machine_plt_value (l, reloc, value);
-
- /* Store the result for later runs. */
- if (__builtin_expect (! _dl_bind_not, 1))
- *resultp = value;
- }
-
- (*mcount_fct) (retaddr, value);
-
- return value;
-}
-
-#endif /* PROF && ELF_MACHINE_NO_PLT */
-
-
-/* This macro is defined in dl-machine.h to define the entry point called
- by the PLT. The `fixup' function above does the real work, but a little
- more twiddling is needed to get the stack right and jump to the address
- finally resolved. */
-
-ELF_MACHINE_RUNTIME_TRAMPOLINE
diff --git a/newlib/libc/sys/linux/dl/dl-support.c b/newlib/libc/sys/linux/dl/dl-support.c
deleted file mode 100644
index ce5349153..000000000
--- a/newlib/libc/sys/linux/dl/dl-support.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/* Support for dynamic linking code in static libc.
- Copyright (C) 1996, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* This file defines some things that for the dynamic linker are defined in
- rtld.c and dl-sysdep.c in ways appropriate to bootstrap dynamic linking. */
-
-#include <errno.h>
-#include <libintl.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <pthread.h>
-#include <ldsodefs.h>
-#include <machine/dl-machine.h>
-#include <dl-librecon.h>
-#include <unsecvars.h>
-#include <machine/hp-timing.h>
-
-char *__progname = "newlib";
-char **_dl_argv = &__progname; /* This is checked for some error messages. */
-
-/* Name of the architecture. */
-const char *_dl_platform;
-size_t _dl_platformlen;
-
-int _dl_debug_mask;
-int _dl_lazy;
-/* XXX I know about at least one case where we depend on the old weak
- behavior (it has to do with librt). Until we get DSO groups implemented
- we have to make this the default. Bummer. --drepper */
-#if 0
-int _dl_dynamic_weak;
-#else
-int _dl_dynamic_weak = 1;
-#endif
-
-/* If nonzero print warnings about problematic situations. */
-int _dl_verbose;
-
-/* Structure to store information about search paths. */
-struct r_search_path *_dl_search_paths;
-
-/* We never do profiling. */
-const char *_dl_profile;
-
-/* Names of shared object for which the RUNPATHs and RPATHs should be
- ignored. */
-const char *_dl_inhibit_rpath;
-
-/* The map for the object we will profile. */
-struct link_map *_dl_profile_map;
-
-/* This is the address of the last stack address ever used. */
-void *__libc_stack_end;
-
-/* Path where the binary is found. */
-const char *_dl_origin_path;
-
-/* Nonzero if runtime lookup should not update the .got/.plt. */
-int _dl_bind_not;
-
-/* Initially empty list of loaded objects. */
-struct link_map *_dl_loaded;
-/* Number of object in the _dl_loaded list. */
-unsigned int _dl_nloaded;
-
-/* Fake scope. In dynamically linked binaries this is the scope of the
- main application but here we don't have something like this. So
- create a fake scope containing nothing. */
-struct r_scope_elem _dl_initial_searchlist;
-/* Variable which can be used in lookup to process the global scope. */
-struct r_scope_elem *_dl_global_scope[2] = { &_dl_initial_searchlist, NULL };
-/* This is a global pointer to this structure which is public. It is
- used by dlopen/dlclose to add and remove objects from what is regarded
- to be the global scope. */
-struct r_scope_elem *_dl_main_searchlist = &_dl_initial_searchlist;
-
-/* Nonzero during startup. */
-int _dl_starting_up = 1;
-
-/* We expect less than a second for relocation. */
-#ifdef HP_SMALL_TIMING_AVAIL
-# undef HP_TIMING_AVAIL
-# define HP_TIMING_AVAIL HP_SMALL_TIMING_AVAIL
-#endif
-
-/* Initial value of the CPU clock. */
-#ifndef HP_TIMING_NONAVAIL
-hp_timing_t _dl_cpuclock_offset;
-#endif
-
-/* During the program run we must not modify the global data of
- loaded shared object simultanously in two threads. Therefore we
- protect `_dl_open' and `_dl_close' in dl-close.c.
-
- This must be a recursive lock since the initializer function of
- the loaded object might as well require a call to this function.
- At this time it is not anymore a problem to modify the tables. */
-__LOCK_INIT_RECURSIVE(, _dl_load_lock)
-
-
-#ifdef HAVE_AUX_VECTOR
-extern int _dl_clktck;
-
-void
-internal_function
-_dl_aux_init (ElfW(auxv_t) *av)
-{
- for (; av->a_type != AT_NULL; ++av)
- switch (av->a_type)
- {
- case AT_PAGESZ:
- _dl_pagesize = av->a_un.a_val;
- break;
- case AT_CLKTCK:
- _dl_clktck = av->a_un.a_val;
- break;
- }
-}
-#endif
-
-void non_dynamic_init (void) __attribute__ ((unused));
-
-void
-non_dynamic_init (void)
-{
- if (HP_TIMING_AVAIL)
- HP_TIMING_NOW (_dl_cpuclock_offset);
-
- if (!_dl_pagesize)
- _dl_pagesize = __getpagesize ();
-
- _dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1;
-
- /* Initialize the data structures for the search paths for shared
- objects. */
- _dl_init_paths (getenv ("LD_LIBRARY_PATH"));
-
- _dl_lazy = *(getenv ("LD_BIND_NOW") ?: "") == '\0';
-
- _dl_bind_not = *(getenv ("LD_BIND_NOT") ?: "") != '\0';
-
- _dl_dynamic_weak = *(getenv ("LD_DYNAMIC_WEAK") ?: "") == '\0';
-
-#ifdef DL_PLATFORM_INIT
- DL_PLATFORM_INIT;
-#endif
-
- /* Now determine the length of the platform string. */
- if (_dl_platform != NULL)
- _dl_platformlen = strlen (_dl_platform);
-}
-text_set_element (__libc_subinit, non_dynamic_init);
-
-const struct r_strlenpair *
-internal_function
-_dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
- size_t *max_capstrlen)
-{
- static struct r_strlenpair result;
- static char buf[1];
-
- result.str = buf; /* Does not really matter. */
- result.len = 0;
-
- *sz = 1;
- return &result;
-}
diff --git a/newlib/libc/sys/linux/dl/dl-sym.c b/newlib/libc/sys/linux/dl/dl-sym.c
deleted file mode 100644
index 85d084f7f..000000000
--- a/newlib/libc/sys/linux/dl/dl-sym.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/* Look up a symbol in a shared object loaded by `dlopen'.
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stddef.h>
-#include <setjmp.h>
-#include <libintl.h>
-
-#include <dlfcn.h>
-#include <ldsodefs.h>
-#include <dl-hash.h>
-
-void *
-internal_function
-_dl_sym (void *handle, const char *name, void *who)
-{
- const ElfW(Sym) *ref = NULL;
- lookup_t result;
- ElfW(Addr) caller = (ElfW(Addr)) who;
- struct link_map *match;
- struct link_map *l;
-
- /* If the address is not recognized the call comes from the main
- program (we hope). */
- match = _dl_loaded;
-
- /* Find the highest-addressed object that CALLER is not below. */
- for (l = _dl_loaded; l != NULL; l = l->l_next)
- if (caller >= l->l_map_start && caller < l->l_map_end)
- {
- /* There must be exactly one DSO for the range of the virtual
- memory. Otherwise something is really broken. */
- match = l;
- break;
- }
-
- if (handle == RTLD_DEFAULT)
- /* Search the global scope as seen in the caller object. */
- result = _dl_lookup_symbol (name, match, &ref, match->l_scope, 0, 0);
- else
- {
- if (handle != RTLD_NEXT)
- {
- /* Search the scope of the given object. */
- struct link_map *map = handle;
-
- result = _dl_lookup_symbol (name, match, &ref, map->l_local_scope,
- 0, 1);
- }
- else
- {
- if (__builtin_expect (match == _dl_loaded, 0))
- {
- if (! _dl_loaded
- || caller < _dl_loaded->l_map_start
- || caller >= _dl_loaded->l_map_end)
- _dl_signal_error (0, NULL, NULL, N_("\
-RTLD_NEXT used in code not dynamically loaded"));
- }
-
- l = match;
- while (l->l_loader != NULL)
- l = l->l_loader;
-
- result = _dl_lookup_symbol_skip (name, l, &ref, l->l_local_scope,
- match);
- }
- }
-
- if (ref != NULL)
- return DL_SYMBOL_ADDRESS (result, ref);
-
- return NULL;
-}
-
-void *
-internal_function
-_dl_vsym (void *handle, const char *name, const char *version, void *who)
-{
- const ElfW(Sym) *ref = NULL;
- struct r_found_version vers;
- lookup_t result;
- ElfW(Addr) caller = (ElfW(Addr)) who;
- struct link_map *match;
- struct link_map *l;
-
- /* Compute hash value to the version string. */
- vers.name = version;
- vers.hidden = 1;
- vers.hash = _dl_elf_hash (version);
- /* We don't have a specific file where the symbol can be found. */
- vers.filename = NULL;
-
- /* If the address is not recognized the call comes from the main
- program (we hope). */
- match = _dl_loaded;
-
- /* Find the highest-addressed object that CALLER is not below. */
- for (l = _dl_loaded; l != NULL; l = l->l_next)
- if (caller >= l->l_map_start && caller < l->l_map_end)
- {
- /* There must be exactly one DSO for the range of the virtual
- memory. Otherwise something is really broken. */
- match = l;
- break;
- }
-
- if (handle == RTLD_DEFAULT)
- /* Search the global scope. */
- result = _dl_lookup_versioned_symbol (name, match, &ref, match->l_scope,
- &vers, 0, 0);
- else if (handle == RTLD_NEXT)
- {
- if (__builtin_expect (match == _dl_loaded, 0))
- {
- if (! _dl_loaded
- || caller < _dl_loaded->l_map_start
- || caller >= _dl_loaded->l_map_end)
- _dl_signal_error (0, NULL, NULL, N_("\
-RTLD_NEXT used in code not dynamically loaded"));
- }
-
- l = match;
- while (l->l_loader != NULL)
- l = l->l_loader;
-
- result = _dl_lookup_versioned_symbol_skip (name, l, &ref,
- l->l_local_scope,
- &vers, match);
- }
- else
- {
- /* Search the scope of the given object. */
- struct link_map *map = handle;
- result = _dl_lookup_versioned_symbol (name, map, &ref,
- map->l_local_scope, &vers, 0, 1);
- }
-
- if (ref != NULL)
- return DL_SYMBOL_ADDRESS (result, ref);
-
- return NULL;
-}
diff --git a/newlib/libc/sys/linux/dl/dl-version.c b/newlib/libc/sys/linux/dl/dl-version.c
deleted file mode 100644
index eefbea7ec..000000000
--- a/newlib/libc/sys/linux/dl/dl-version.c
+++ /dev/null
@@ -1,385 +0,0 @@
-/* Handle symbol and library versioning.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <elf.h>
-#include <errno.h>
-#include <libintl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ldsodefs.h>
-
-#include <assert.h>
-
-
-#ifndef VERSYMIDX
-# define VERSYMIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (tag))
-#endif
-
-
-#define make_string(string, rest...) \
- ({ \
- const char *all[] = { string, ## rest }; \
- size_t len, cnt; \
- char *result, *cp; \
- \
- len = 1; \
- for (cnt = 0; cnt < sizeof (all) / sizeof (all[0]); ++cnt) \
- len += strlen (all[cnt]); \
- \
- cp = result = alloca (len); \
- for (cnt = 0; cnt < sizeof (all) / sizeof (all[0]); ++cnt) \
- { \
- cp = strcpy (cp, all[cnt]); \
- cp += strlen (all[cnt]); \
- } \
- \
- result; \
- })
-
-
-static inline struct link_map *
-find_needed (const char *name, struct link_map *map)
-{
- struct link_map *tmap;
- unsigned int n;
-
- for (tmap = _dl_loaded; tmap != NULL; tmap = tmap->l_next)
- if (_dl_name_match_p (name, tmap))
- return tmap;
-
- /* The required object is not in the global scope, look to see if it is
- a dependency of the current object. */
- for (n = 0; n < map->l_searchlist.r_nlist; n++)
- if (_dl_name_match_p (name, map->l_searchlist.r_list[n]))
- return map->l_searchlist.r_list[n];
-
- /* Should never happen. */
- return NULL;
-}
-
-
-static int
-internal_function
-match_symbol (const char *name, ElfW(Word) hash, const char *string,
- struct link_map *map, int verbose, int weak)
-{
- const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
- ElfW(Addr) def_offset;
- ElfW(Verdef) *def;
- /* Initialize to make the compiler happy. */
- const char *errstring = NULL;
- int result = 0;
-
- /* Display information about what we are doing while debugging. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_VERSIONS, 0))
- _dl_debug_printf ("\
-checking for version `%s' in file %s required by file %s\n",
- string, map->l_name[0] ? map->l_name : _dl_argv[0],
- name);
-
- if (__builtin_expect (map->l_info[VERSYMIDX (DT_VERDEF)] == NULL, 0))
- {
- /* The file has no symbol versioning. I.e., the dependent
- object was linked against another version of this file. We
- only print a message if verbose output is requested. */
- if (verbose)
- {
- /* XXX We cannot translate the messages. */
- errstring = make_string ("\
-no version information available (required by ", name, ")");
- goto call_cerror;
- }
- return 0;
- }
-
- def_offset = map->l_info[VERSYMIDX (DT_VERDEF)]->d_un.d_ptr;
- assert (def_offset != 0);
-
- def = (ElfW(Verdef) *) ((char *) map->l_addr + def_offset);
- while (1)
- {
- /* Currently the version number of the definition entry is 1.
- Make sure all we see is this version. */
- if (__builtin_expect (def->vd_version, 1) != 1)
- {
- char buf[20];
- buf[sizeof (buf) - 1] = '\0';
- /* XXX We cannot translate the message. */
- errstring = make_string ("unsupported version of Verdef record");
- result = 1;
- goto call_cerror;
- }
-
- /* Compare the hash values. */
- if (hash == def->vd_hash)
- {
- ElfW(Verdaux) *aux = (ElfW(Verdaux) *) ((char *) def + def->vd_aux);
-
- /* To be safe, compare the string as well. */
- if (__builtin_expect (strcmp (string, strtab + aux->vda_name), 0)
- == 0)
- /* Bingo! */
- return 0;
- }
-
- /* If no more definitions we failed to find what we want. */
- if (def->vd_next == 0)
- break;
-
- /* Next definition. */
- def = (ElfW(Verdef) *) ((char *) def + def->vd_next);
- }
-
- /* Symbol not found. If it was a weak reference it is not fatal. */
- if (__builtin_expect (weak, 1))
- {
- if (verbose)
- {
- /* XXX We cannot translate the message. */
- errstring = make_string ("weak version `", string,
- "' not found (required by ", name, ")");
- goto call_cerror;
- }
- return 0;
- }
-
- /* XXX We cannot translate the message. */
- errstring = make_string ("version `", string, "' not found (required by ",
- name, ")");
- result = 1;
- call_cerror:
- _dl_signal_cerror (0, map->l_name[0] ? map->l_name : _dl_argv[0], NULL,
- errstring);
- return result;
-}
-
-
-int
-internal_function
-_dl_check_map_versions (struct link_map *map, int verbose, int trace_mode)
-{
- int result = 0;
- const char *strtab;
- /* Pointer to section with needed versions. */
- ElfW(Dyn) *dyn;
- /* Pointer to dynamic section with definitions. */
- ElfW(Dyn) *def;
- /* We need to find out which is the highest version index used
- in a dependecy. */
- unsigned int ndx_high = 0;
- /* Initialize to make the compiler happy. */
- const char *errstring = NULL;
- int errval = 0;
-
- /* If we don't have a string table, we must be ok. */
- if (map->l_info[DT_STRTAB] == NULL)
- return 0;
- strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
-
- dyn = map->l_info[VERSYMIDX (DT_VERNEED)];
- def = map->l_info[VERSYMIDX (DT_VERDEF)];
-
- if (dyn != NULL)
- {
- /* This file requires special versions from its dependencies. */
- ElfW(Verneed) *ent = (ElfW(Verneed) *) (map->l_addr + dyn->d_un.d_ptr);
-
- /* Currently the version number of the needed entry is 1.
- Make sure all we see is this version. */
- if (__builtin_expect (ent->vn_version, 1) != 1)
- {
- char buf[20];
- buf[sizeof (buf) - 1] = '\0';
- /* XXX We cannot translate the message. */
- errstring = make_string ("unsupported version of Verneed record\n");
- call_error:
- _dl_signal_error (errval, (*map->l_name ? map->l_name : _dl_argv[0]),
- NULL, errstring);
- }
-
- while (1)
- {
- ElfW(Vernaux) *aux;
- struct link_map *needed = find_needed (strtab + ent->vn_file, map);
-
- /* If NEEDED is NULL this means a dependency was not found
- and no stub entry was created. This should never happen. */
- assert (needed != NULL);
-
- /* Make sure this is no stub we created because of a missing
- dependency. */
- if (__builtin_expect (! trace_mode, 1)
- || ! __builtin_expect (needed->l_faked, 0))
- {
- /* NEEDED is the map for the file we need. Now look for the
- dependency symbols. */
- aux = (ElfW(Vernaux) *) ((char *) ent + ent->vn_aux);
- while (1)
- {
- /* Match the symbol. */
- result |= match_symbol ((*map->l_name
- ? map->l_name : _dl_argv[0]),
- aux->vna_hash,
- strtab + aux->vna_name,
- needed, verbose,
- aux->vna_flags & VER_FLG_WEAK);
-
- /* Compare the version index. */
- if ((unsigned int) (aux->vna_other & 0x7fff) > ndx_high)
- ndx_high = aux->vna_other & 0x7fff;
-
- if (aux->vna_next == 0)
- /* No more symbols. */
- break;
-
- /* Next symbol. */
- aux = (ElfW(Vernaux) *) ((char *) aux + aux->vna_next);
- }
- }
-
- if (ent->vn_next == 0)
- /* No more dependencies. */
- break;
-
- /* Next dependency. */
- ent = (ElfW(Verneed) *) ((char *) ent + ent->vn_next);
- }
- }
-
- /* We also must store the names of the defined versions. Determine
- the maximum index here as well.
-
- XXX We could avoid the loop by just taking the number of definitions
- as an upper bound of new indeces. */
- if (def != NULL)
- {
- ElfW(Verdef) *ent;
- ent = (ElfW(Verdef) *) (map->l_addr + def->d_un.d_ptr);
- while (1)
- {
- if ((unsigned int) (ent->vd_ndx & 0x7fff) > ndx_high)
- ndx_high = ent->vd_ndx & 0x7fff;
-
- if (ent->vd_next == 0)
- /* No more definitions. */
- break;
-
- ent = (ElfW(Verdef) *) ((char *) ent + ent->vd_next);
- }
- }
-
- if (ndx_high > 0)
- {
- /* Now we are ready to build the array with the version names
- which can be indexed by the version index in the VERSYM
- section. */
- map->l_versions = (struct r_found_version *)
- calloc (ndx_high + 1, sizeof (*map->l_versions));
- if (__builtin_expect (map->l_versions == NULL, 0))
- {
- errstring = N_("cannot allocate version reference table");
- errval = ENOMEM;
- goto call_error;
- }
-
- /* Store the number of available symbols. */
- map->l_nversions = ndx_high + 1;
-
- /* Compute the pointer to the version symbols. */
- map->l_versyms = (void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]);
-
- if (dyn != NULL)
- {
- ElfW(Verneed) *ent;
- ent = (ElfW(Verneed) *) (map->l_addr + dyn->d_un.d_ptr);
- while (1)
- {
- ElfW(Vernaux) *aux;
- aux = (ElfW(Vernaux) *) ((char *) ent + ent->vn_aux);
- while (1)
- {
- ElfW(Half) ndx = aux->vna_other & 0x7fff;
- map->l_versions[ndx].hash = aux->vna_hash;
- map->l_versions[ndx].hidden = aux->vna_other & 0x8000;
- map->l_versions[ndx].name = &strtab[aux->vna_name];
- map->l_versions[ndx].filename = &strtab[ent->vn_file];
-
- if (aux->vna_next == 0)
- /* No more symbols. */
- break;
-
- /* Advance to next symbol. */
- aux = (ElfW(Vernaux) *) ((char *) aux + aux->vna_next);
- }
-
- if (ent->vn_next == 0)
- /* No more dependencies. */
- break;
-
- /* Advance to next dependency. */
- ent = (ElfW(Verneed) *) ((char *) ent + ent->vn_next);
- }
- }
-
- /* And insert the defined versions. */
- if (def != NULL)
- {
- ElfW(Verdef) *ent;
- ent = (ElfW(Verdef) *) (map->l_addr + def->d_un.d_ptr);
- while (1)
- {
- ElfW(Verdaux) *aux;
- aux = (ElfW(Verdaux) *) ((char *) ent + ent->vd_aux);
-
- if ((ent->vd_flags & VER_FLG_BASE) == 0)
- {
- /* The name of the base version should not be
- available for matching a versioned symbol. */
- ElfW(Half) ndx = ent->vd_ndx & 0x7fff;
- map->l_versions[ndx].hash = ent->vd_hash;
- map->l_versions[ndx].name = &strtab[aux->vda_name];
- map->l_versions[ndx].filename = NULL;
- }
-
- if (ent->vd_next == 0)
- /* No more definitions. */
- break;
-
- ent = (ElfW(Verdef) *) ((char *) ent + ent->vd_next);
- }
- }
- }
-
- return result;
-}
-
-
-int
-internal_function
-_dl_check_all_versions (struct link_map *map, int verbose, int trace_mode)
-{
- struct link_map *l;
- int result = 0;
-
- for (l = map; l != NULL; l = l->l_next)
- result |= ! l->l_faked && _dl_check_map_versions (l, verbose, trace_mode);
-
- return result;
-}
diff --git a/newlib/libc/sys/linux/dl/dlfcn.h b/newlib/libc/sys/linux/dl/dlfcn.h
deleted file mode 100644
index 67ba73d5d..000000000
--- a/newlib/libc/sys/linux/dl/dlfcn.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* User functions for run-time dynamic loading.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _DLFCN_H
-#define _DLFCN_H 1
-
-#include <features.h>
-
-/* Collect various system dependent definitions and declarations. */
-#include <sys/dlfcn.h>
-
-
-/* If the first argument of `dlsym' or `dlvsym' is set to RTLD_NEXT
- the run-time address of the symbol called NAME in the next shared
- object is returned. The "next" relation is defined by the order
- the shared objects were loaded. */
-# define RTLD_NEXT ((void *) -1l)
-
-/* If the first argument to `dlsym' or `dlvsym' is set to RTLD_DEFAULT
- the run-time address of the symbol called NAME in the global scope
- is returned. */
-# define RTLD_DEFAULT ((void *) 0)
-
-
-__BEGIN_DECLS
-
-/* Open the shared object FILE and map it in; return a handle that can be
- passed to `dlsym' to get symbol values from it. */
-extern void *dlopen (__const char *__file, int __mode) __THROW;
-
-/* Unmap and close a shared object opened by `dlopen'.
- The handle cannot be used again after calling `dlclose'. */
-extern int dlclose (void *__handle) __THROW;
-
-/* Find the run-time address in the shared object HANDLE refers to
- of the symbol called NAME. */
-extern void *dlsym (void *__restrict __handle,
- __const char *__restrict __name) __THROW;
-
-/* Find the run-time address in the shared object HANDLE refers to
- of the symbol called NAME with VERSION. */
-extern void *dlvsym (void *__restrict __handle,
- __const char *__restrict __name,
- __const char *__restrict __version) __THROW;
-
-/* When any of the above functions fails, call this function
- to return a string describing the error. Each call resets
- the error string so that a following call returns null. */
-extern char *dlerror (void) __THROW;
-
-
-/* Structure containing information about object searched using
- `dladdr'. */
-typedef struct
-{
- __const char *dli_fname; /* File name of defining object. */
- void *dli_fbase; /* Load address of that object. */
- __const char *dli_sname; /* Name of nearest symbol. */
- void *dli_saddr; /* Exact value of nearest symbol. */
-} Dl_info;
-
-/* Fill in *INFO with the following information about ADDRESS.
- Returns 0 iff no shared object's segments contain that address. */
-extern int dladdr (__const void *__address, Dl_info *__info) __THROW;
-
-__END_DECLS
-
-#endif /* dlfcn.h */
diff --git a/newlib/libc/sys/linux/dl/do-lookup.h b/newlib/libc/sys/linux/dl/do-lookup.h
deleted file mode 100644
index b9364b95d..000000000
--- a/newlib/libc/sys/linux/dl/do-lookup.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/* Look up a symbol in the loaded objects.
- Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#if VERSIONED
-# define FCT do_lookup_versioned
-# define ARG const struct r_found_version *const version,
-#else
-# define FCT do_lookup
-# define ARG
-#endif
-
-/* Inner part of the lookup functions. We return a value > 0 if we
- found the symbol, the value 0 if nothing is found and < 0 if
- something bad happened. */
-static inline int
-FCT (const char *undef_name, unsigned long int hash, const ElfW(Sym) *ref,
- struct sym_val *result, struct r_scope_elem *scope, size_t i, ARG
- struct link_map *skip, int type_class)
-{
- struct link_map **list = scope->r_list;
- size_t n = scope->r_nlist;
- struct link_map *map;
-
- do
- {
- const ElfW(Sym) *symtab;
- const char *strtab;
- const ElfW(Half) *verstab;
- Elf_Symndx symidx;
- const ElfW(Sym) *sym;
-#if ! VERSIONED
- int num_versions = 0;
- const ElfW(Sym) *versioned_sym = NULL;
-#endif
-
- map = list[i];
-
- /* Here come the extra test needed for `_dl_lookup_symbol_skip'. */
- if (skip != NULL && map == skip)
- continue;
-
- /* Don't search the executable when resolving a copy reloc. */
- if ((type_class & ELF_RTYPE_CLASS_COPY) && map->l_type == lt_executable)
- continue;
-
- /* Print some debugging info if wanted. */
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_SYMBOLS, 0))
- _dl_debug_printf ("symbol=%s; lookup in file=%s\n", undef_name,
- map->l_name[0] ? map->l_name : _dl_argv[0]);
-
- symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]);
- strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
- verstab = map->l_versyms;
-
- /* Search the appropriate hash bucket in this object's symbol table
- for a definition for the same symbol name. */
- for (symidx = map->l_buckets[hash % map->l_nbuckets];
- symidx != STN_UNDEF;
- symidx = map->l_chain[symidx])
- {
- sym = &symtab[symidx];
-
- assert (ELF_RTYPE_CLASS_PLT == 1);
- if (sym->st_value == 0 || /* No value. */
- /* ((type_class & ELF_RTYPE_CLASS_PLT)
- && (sym->st_shndx == SHN_UNDEF)) */
- (type_class & (sym->st_shndx == SHN_UNDEF)))
- continue;
-
- if (ELFW(ST_TYPE) (sym->st_info) > STT_FUNC)
- /* Ignore all but STT_NOTYPE, STT_OBJECT and STT_FUNC entries
- since these are no code/data definitions. */
- continue;
-
- if (sym != ref && strcmp (strtab + sym->st_name, undef_name))
- /* Not the symbol we are looking for. */
- continue;
-
-#if VERSIONED
- if (__builtin_expect (verstab == NULL, 0))
- {
- /* We need a versioned symbol but haven't found any. If
- this is the object which is referenced in the verneed
- entry it is a bug in the library since a symbol must
- not simply disappear.
-
- It would also be a bug in the object since it means that
- the list of required versions is incomplete and so the
- tests in dl-version.c haven't found a problem.*/
- assert (version->filename == NULL
- || ! _dl_name_match_p (version->filename, map));
-
- /* Otherwise we accept the symbol. */
- }
- else
- {
- /* We can match the version information or use the
- default one if it is not hidden. */
- ElfW(Half) ndx = verstab[symidx] & 0x7fff;
- if ((map->l_versions[ndx].hash != version->hash
- || strcmp (map->l_versions[ndx].name, version->name))
- && (version->hidden || map->l_versions[ndx].hash
- || (verstab[symidx] & 0x8000)))
- /* It's not the version we want. */
- continue;
- }
-#else
- /* No specific version is selected. When the object file
- also does not define a version we have a match.
- Otherwise we accept the default version, or in case there
- is only one version defined, this one version. */
- if (verstab != NULL)
- {
- ElfW(Half) ndx = verstab[symidx] & 0x7fff;
- if (ndx > 2) /* map->l_versions[ndx].hash != 0) */
- {
- /* Don't accept hidden symbols. */
- if ((verstab[symidx] & 0x8000) == 0 && num_versions++ == 0)
- /* No version so far. */
- versioned_sym = sym;
- continue;
- }
- }
-#endif
-
- /* There cannot be another entry for this symbol so stop here. */
- goto found_it;
- }
-
- /* If we have seen exactly one versioned symbol while we are
- looking for an unversioned symbol and the version is not the
- default version we still accept this symbol since there are
- no possible ambiguities. */
-#if VERSIONED
- sym = NULL;
-#else
- sym = num_versions == 1 ? versioned_sym : NULL;
-#endif
-
- if (sym != NULL)
- {
- found_it:
- switch (ELFW(ST_BIND) (sym->st_info))
- {
- case STB_WEAK:
- /* Weak definition. Use this value if we don't find another. */
- if (__builtin_expect (_dl_dynamic_weak, 0))
- {
- if (! result->s)
- {
- result->s = sym;
- result->m = map;
- }
- break;
- }
- /* FALLTHROUGH */
- case STB_GLOBAL:
- /* Global definition. Just what we need. */
- result->s = sym;
- result->m = map;
- return 1;
- default:
- /* Local symbols are ignored. */
- break;
- }
- }
-
-#if VERSIONED
- /* If this current map is the one mentioned in the verneed entry
- and we have not found a weak entry, it is a bug. */
- if (symidx == STN_UNDEF && version->filename != NULL
- && __builtin_expect (_dl_name_match_p (version->filename, map), 0))
- return -1;
-#endif
- }
- while (++i < n);
-
- /* We have not found anything until now. */
- return 0;
-}
-
-#undef FCT
-#undef ARG
-#undef VERSIONED
diff --git a/newlib/libc/sys/linux/dl/do-rel.h b/newlib/libc/sys/linux/dl/do-rel.h
deleted file mode 100644
index 03b9e807b..000000000
--- a/newlib/libc/sys/linux/dl/do-rel.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* Do relocations for ELF dynamic linking.
- Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* This file may be included twice, to define both
- `elf_dynamic_do_rel' and `elf_dynamic_do_rela'. */
-
-#include <machine/weakalias.h>
-
-#ifdef DO_RELA
-# define elf_dynamic_do_rel elf_dynamic_do_rela
-# define RELCOUNT_IDX VERSYMIDX (DT_RELACOUNT)
-# define Rel Rela
-# define elf_machine_rel elf_machine_rela
-# define elf_machine_rel_relative elf_machine_rela_relative
-#else
-# define RELCOUNT_IDX VERSYMIDX (DT_RELCOUNT)
-#endif
-
-#ifndef VERSYMIDX
-# define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
-#endif
-
-/* Perform the relocations in MAP on the running program image as specified
- by RELTAG, SZTAG. If LAZY is nonzero, this is the first pass on PLT
- relocations; they should be set up to call _dl_runtime_resolve, rather
- than fully resolved now. */
-
-static inline void
-elf_dynamic_do_rel (struct link_map *map,
- ElfW(Addr) reladdr, ElfW(Addr) relsize,
- int lazy,
- struct r_scope_elem *scope[])
-{
- const ElfW(Rel) *r = (const void *) reladdr;
- const ElfW(Rel) *end = (const void *) (reladdr + relsize);
- ElfW(Addr) l_addr = map->l_addr;
-
-#ifndef RTLD_BOOTSTRAP
- /* We never bind lazily during ld.so bootstrap. Unfortunately gcc is
- not clever enough to see through all the function calls to realize
- that. */
- if (lazy)
- {
- /* Doing lazy PLT relocations; they need very little info. */
- for (; r < end; ++r)
- elf_machine_lazy_rel (map, l_addr, r);
- }
- else
-#endif
- {
- const ElfW(Sym) *const symtab =
- (const void *) D_PTR (map, l_info[DT_SYMTAB]);
- ElfW(Word) nrelative = (map->l_info[RELCOUNT_IDX] == NULL
- ? 0 : map->l_info[RELCOUNT_IDX]->d_un.d_val);
- const ElfW(Rel) *relative = r;
- r = MIN (r + nrelative, end);
-
-#ifndef RTLD_BOOTSTRAP
- /* This is defined in rtld.c, but nowhere in the static libc.a; make
- the reference weak so static programs can still link. This
- declaration cannot be done when compiling rtld.c (i.e. #ifdef
- RTLD_BOOTSTRAP) because rtld.c contains the common defn for
- _dl_rtld_map, which is incompatible with a weak decl in the same
- file. */
- #pragma weak _dl_rtld_map
- if (map != &_dl_rtld_map) /* Already done in rtld itself. */
-# ifndef DO_RELA
- /* Rela platforms get the offset from r_addend and this must
- be copied in the relocation address. Therefore we can skip
- the relative relocations only if this is for rel
- relocations. */
- if (l_addr != 0)
-# endif
-#endif
- for (; relative < r; ++relative)
- elf_machine_rel_relative (l_addr, relative,
- (void *) (l_addr + relative->r_offset));
-
- if (map->l_info[VERSYMIDX (DT_VERSYM)])
- {
- const ElfW(Half) *const version =
- (const void *) D_PTR (map, l_info[VERSYMIDX (DT_VERSYM)]);
-
- for (; r < end; ++r)
- {
- ElfW(Half) ndx = version[ELFW(R_SYM) (r->r_info)];
- elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)],
- &map->l_versions[ndx],
- (void *) (l_addr + r->r_offset),
- scope);
- }
- }
- else
- for (; r < end; ++r)
- elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)], NULL,
- (void *) (l_addr + r->r_offset), scope);
- }
-}
-
-#undef elf_dynamic_do_rel
-#undef Rel
-#undef elf_machine_rel
-#undef elf_machine_rel_relative
-#undef RELCOUNT_IDX
diff --git a/newlib/libc/sys/linux/dl/dynamic-link.h b/newlib/libc/sys/linux/dl/dynamic-link.h
deleted file mode 100644
index c1709f7c6..000000000
--- a/newlib/libc/sys/linux/dl/dynamic-link.h
+++ /dev/null
@@ -1,257 +0,0 @@
-/* Inline functions for dynamic linking.
- Copyright (C) 1995,96,97,98,99,2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef __DYNAMIC_LINK_H__
-#define __DYNAMIC_LINK_H__
-
-#include <elf.h>
-#include <machine/dl-machine.h>
-#include <assert.h>
-
-#ifndef VERSYMIDX
-# define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
-#endif
-
-
-/* Global read-only variable defined in rtld.c which is nonzero if we
- shall give more warning messages. */
-extern int _dl_verbose __attribute__ ((unused));
-
-
-/* Read the dynamic section at DYN and fill in INFO with indices DT_*. */
-
-static void __attribute__ ((unused))
-elf_get_dynamic_info (struct link_map *l)
-{
- ElfW(Dyn) *dyn = l->l_ld;
- ElfW(Addr) l_addr;
- ElfW(Dyn) **info;
-
- if (! dyn)
- return;
-
- l_addr = l->l_addr;
- info = l->l_info;
-
- while (dyn->d_tag != DT_NULL)
- {
- if (dyn->d_tag < DT_NUM)
- info[dyn->d_tag] = dyn;
- else if (dyn->d_tag >= DT_LOPROC &&
- dyn->d_tag < DT_LOPROC + DT_THISPROCNUM)
- info[dyn->d_tag - DT_LOPROC + DT_NUM] = dyn;
- else if ((Elf32_Word) DT_VERSIONTAGIDX (dyn->d_tag) < DT_VERSIONTAGNUM)
- info[VERSYMIDX (dyn->d_tag)] = dyn;
- else if ((Elf32_Word) DT_EXTRATAGIDX (dyn->d_tag) < DT_EXTRANUM)
- info[DT_EXTRATAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
- + DT_VERSIONTAGNUM] = dyn;
- else
- assert (! "bad dynamic tag");
- ++dyn;
- }
-#ifndef DL_RO_DYN_SECTION
- if (info[DT_PLTGOT] != NULL)
- info[DT_PLTGOT]->d_un.d_ptr += l_addr;
- if (info[DT_STRTAB] != NULL)
- info[DT_STRTAB]->d_un.d_ptr += l_addr;
- if (info[DT_SYMTAB] != NULL)
- info[DT_SYMTAB]->d_un.d_ptr += l_addr;
-# if ! ELF_MACHINE_NO_RELA
- if (info[DT_RELA] != NULL)
- {
- assert (info[DT_RELAENT]->d_un.d_val == sizeof (ElfW(Rela)));
- info[DT_RELA]->d_un.d_ptr += l_addr;
- }
-# endif
-# if ! ELF_MACHINE_NO_REL
- if (info[DT_REL] != NULL)
- {
- assert (info[DT_RELENT]->d_un.d_val == sizeof (ElfW(Rel)));
- info[DT_REL]->d_un.d_ptr += l_addr;
- }
-# endif
-#endif
- if (info[DT_PLTREL] != NULL)
- {
-# if ELF_MACHINE_NO_RELA
- assert (info[DT_PLTREL]->d_un.d_val == DT_REL);
-# elif ELF_MACHINE_NO_REL
- assert (info[DT_PLTREL]->d_un.d_val == DT_RELA);
-# else
- assert (info[DT_PLTREL]->d_un.d_val == DT_REL
- || info[DT_PLTREL]->d_un.d_val == DT_RELA);
-# endif
- }
-#ifndef DL_RO_DYN_SECTION
- if (info[DT_JMPREL] != NULL)
- info[DT_JMPREL]->d_un.d_ptr += l_addr;
- if (info[VERSYMIDX (DT_VERSYM)] != NULL)
- info[VERSYMIDX (DT_VERSYM)]->d_un.d_ptr += l_addr;
-#endif
- if (info[DT_FLAGS] != NULL)
- {
- /* Flags are used. Translate to the old form where available.
- Since these l_info entries are only tested for NULL pointers it
- is ok if they point to the DT_FLAGS entry. */
- ElfW(Word) flags = info[DT_FLAGS]->d_un.d_val;
- if (flags & DF_SYMBOLIC)
- info[DT_SYMBOLIC] = info[DT_FLAGS];
- if (flags & DF_TEXTREL)
- info[DT_TEXTREL] = info[DT_FLAGS];
- if (flags & DF_BIND_NOW)
- info[DT_BIND_NOW] = info[DT_FLAGS];
- }
- if (info[VERSYMIDX (DT_FLAGS_1)] != NULL)
- l->l_flags_1 = info[VERSYMIDX (DT_FLAGS_1)]->d_un.d_val;
- if (info[DT_RUNPATH] != NULL)
- /* If both RUNPATH and RPATH are given, the latter is ignored. */
- info[DT_RPATH] = NULL;
-}
-
-# if ! ELF_MACHINE_NO_REL
-# include "do-rel.h"
-# endif
-
-# if ! ELF_MACHINE_NO_RELA
-# define DO_RELA
-# include "do-rel.h"
-# endif
-
-#endif /* __DYNAMIC_LINK_H__ */
-
-#ifdef RESOLVE
-
-/* Get the definitions of `elf_dynamic_do_rel' and `elf_dynamic_do_rela'.
- These functions are almost identical, so we use cpp magic to avoid
- duplicating their code. It cannot be done in a more general function
- because we must be able to completely inline. */
-
-/* On some machines, notably SPARC, DT_REL* includes DT_JMPREL in its
- range. Note that according to the ELF spec, this is completely legal!
- But conditionally define things so that on machines we know this will
- not happen we do something more optimal. */
-
-# ifdef ELF_MACHINE_PLTREL_OVERLAP
-# define _ELF_DYNAMIC_DO_RELOC(RELOC, reloc, map, do_lazy, test_rel) \
- do { \
- struct { ElfW(Addr) start, size; int lazy; } ranges[3]; \
- int ranges_index; \
- \
- ranges[0].lazy = ranges[2].lazy = 0; \
- ranges[1].lazy = 1; \
- ranges[0].size = ranges[1].size = ranges[2].size = 0; \
- \
- if ((map)->l_info[DT_##RELOC]) \
- { \
- ranges[0].start = D_PTR ((map), l_info[DT_##RELOC]); \
- ranges[0].size = (map)->l_info[DT_##RELOC##SZ]->d_un.d_val; \
- } \
- \
- if ((do_lazy) \
- && (map)->l_info[DT_PLTREL] \
- && (!test_rel || (map)->l_info[DT_PLTREL]->d_un.d_val == DT_##RELOC)) \
- { \
- ranges[1].start = D_PTR ((map), l_info[DT_JMPREL]); \
- ranges[1].size = (map)->l_info[DT_PLTRELSZ]->d_un.d_val; \
- ranges[2].start = ranges[1].start + ranges[1].size; \
- ranges[2].size = ranges[0].start + ranges[0].size - ranges[2].start; \
- ranges[0].size = ranges[1].start - ranges[0].start; \
- } \
- \
- for (ranges_index = 0; ranges_index < 3; ++ranges_index) \
- elf_dynamic_do_##reloc ((map), \
- ranges[ranges_index].start, \
- ranges[ranges_index].size, \
- ranges[ranges_index].lazy, \
- scope); \
- } while (0)
-# else
-# define _ELF_DYNAMIC_DO_RELOC(RELOC, reloc, map, do_lazy, test_rel) \
- do { \
- struct { ElfW(Addr) start, size; int lazy; } ranges[2]; \
- int ranges_index; \
- ranges[0].lazy = 0; \
- ranges[0].size = ranges[1].size = 0; \
- ranges[0].start = 0; \
- \
- if ((map)->l_info[DT_##RELOC]) \
- { \
- ranges[0].start = D_PTR ((map), l_info[DT_##RELOC]); \
- ranges[0].size = (map)->l_info[DT_##RELOC##SZ]->d_un.d_val; \
- } \
- if ((map)->l_info[DT_PLTREL] \
- && (!test_rel || (map)->l_info[DT_PLTREL]->d_un.d_val == DT_##RELOC)) \
- { \
- ElfW(Addr) start = D_PTR ((map), l_info[DT_JMPREL]); \
- \
- if ((do_lazy) \
- /* This test does not only detect whether the relocation \
- sections are in the right order, it also checks whether \
- there is a DT_REL/DT_RELA section. */ \
- || ranges[0].start + ranges[0].size != start) \
- { \
- ranges[1].start = start; \
- ranges[1].size = (map)->l_info[DT_PLTRELSZ]->d_un.d_val; \
- ranges[1].lazy = (do_lazy); \
- } \
- else \
- /* Combine processing the sections. */ \
- ranges[0].size += (map)->l_info[DT_PLTRELSZ]->d_un.d_val; \
- } \
- \
- for (ranges_index = 0; ranges_index < 2; ++ranges_index) \
- elf_dynamic_do_##reloc ((map), \
- ranges[ranges_index].start, \
- ranges[ranges_index].size, \
- ranges[ranges_index].lazy, \
- scope); \
- } while (0)
-# endif
-
-# if ELF_MACHINE_NO_REL || ELF_MACHINE_NO_RELA
-# define _ELF_CHECK_REL 0
-# else
-# define _ELF_CHECK_REL 1
-# endif
-
-# if ! ELF_MACHINE_NO_REL
-# define ELF_DYNAMIC_DO_REL(map, lazy) \
- _ELF_DYNAMIC_DO_RELOC (REL, rel, map, lazy, _ELF_CHECK_REL)
-# else
-# define ELF_DYNAMIC_DO_REL(map, lazy) /* Nothing to do. */
-# endif
-
-# if ! ELF_MACHINE_NO_RELA
-# define ELF_DYNAMIC_DO_RELA(map, lazy) \
- _ELF_DYNAMIC_DO_RELOC (RELA, rela, map, lazy, _ELF_CHECK_REL)
-# else
-# define ELF_DYNAMIC_DO_RELA(map, lazy) /* Nothing to do. */
-# endif
-
-/* This can't just be an inline function because GCC is too dumb
- to inline functions containing inlines themselves. */
-# define ELF_DYNAMIC_RELOCATE(map, lazy, consider_profile) \
- do { \
- int edr_lazy = elf_machine_runtime_setup ((map), (lazy), \
- (consider_profile)); \
- ELF_DYNAMIC_DO_REL ((map), edr_lazy); \
- ELF_DYNAMIC_DO_RELA ((map), edr_lazy); \
- } while (0)
-
-#endif
diff --git a/newlib/libc/sys/linux/dl/kernel-features.h b/newlib/libc/sys/linux/dl/kernel-features.h
deleted file mode 100644
index 562a6c765..000000000
--- a/newlib/libc/sys/linux/dl/kernel-features.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/* Set flags signalling availability of kernel features based on given
- kernel version number.
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* This file must not contain any C code. At least it must be protected
- to allow using the file also in assembler files. */
-
-#ifndef __LINUX_KERNEL_VERSION
-/* We assume the worst; all kernels should be supported. */
-# define __LINUX_KERNEL_VERSION 0
-#endif
-
-/* We assume for __LINUX_KERNEL_VERSION the same encoding used in
- linux/version.h. I.e., the major, minor, and subminor all get a
- byte with the major number being in the highest byte. This means
- we can do numeric comparisons.
-
- In the following we will define certain symbols depending on
- whether the describes kernel feature is available in the kernel
- version given by __LINUX_KERNEL_VERSION. We are not always exactly
- recording the correct versions in which the features were
- introduced. If somebody cares these values can afterwards be
- corrected. Most of the numbers here are set corresponding to
- 2.2.0. */
-
-/* `getcwd' system call. */
-#if __LINUX_KERNEL_VERSION >= 131584
-# define __ASSUME_GETCWD_SYSCALL 1
-#endif
-
-/* Real-time signal became usable in 2.1.70. */
-#if __LINUX_KERNEL_VERSION >= 131398
-# define __ASSUME_REALTIME_SIGNALS 1
-#endif
-
-/* When were the `pread'/`pwrite' syscalls introduced? */
-#if __LINUX_KERNEL_VERSION >= 131584
-# define __ASSUME_PREAD_SYSCALL 1
-# define __ASSUME_PWRITE_SYSCALL 1
-#endif
-
-/* When was `poll' introduced? */
-#if __LINUX_KERNEL_VERSION >= 131584
-# define __ASSUME_POLL_SYSCALL 1
-#endif
-
-/* The `lchown' syscall was introduced in 2.1.80. */
-#if __LINUX_KERNEL_VERSION >= 131408
-# define __ASSUME_LCHOWN_SYSCALL 1
-#endif
-
-/* When did the `setresuid' sysall became available? */
-#if __LINUX_KERNEL_VERSION >= 131584 && !defined __sparc__
-# define __ASSUME_SETRESUID_SYSCALL 1
-#endif
-
-/* The SIOCGIFNAME ioctl is available starting with 2.1.50. */
-#if __LINUX_KERNEL_VERSION >= 131408
-# define __ASSUME_SIOCGIFNAME 1
-#endif
-
-/* On x86 another `getrlimit' syscall was added in 2.3.25. */
-#if __LINUX_KERNEL_VERSION >= 131865 && defined __i386__
-# define __ASSUME_NEW_GETRLIMIT_SYSCALL 1
-#endif
-
-/* On x86 the truncate64/ftruncate64 syscalls were introduced in 2.3.31. */
-#if __LINUX_KERNEL_VERSION >= 131871 && defined __i386__
-# define __ASSUME_TRUNCATE64_SYSCALL 1
-#endif
-
-/* On x86 the mmap2 syscall was introduced in 2.3.31. */
-#if __LINUX_KERNEL_VERSION >= 131871 && defined __i386__
-# define __ASSUME_MMAP2_SYSCALL 1
-#endif
-
-/* On x86 the stat64/lstat64/fstat64 syscalls were introduced in 2.3.34. */
-#if __LINUX_KERNEL_VERSION >= 131874 && defined __i386__
-# define __ASSUME_STAT64_SYSCALL 1
-#endif
-
-/* On sparc and ARM the truncate64/ftruncate64/mmap2/stat64/lstat64/fstat64
- syscalls were introduced in 2.3.35. */
-#if __LINUX_KERNEL_VERSION >= 131875 && (defined __sparc__ || defined __arm__)
-# define __ASSUME_TRUNCATE64_SYSCALL 1
-# define __ASSUME_MMAP2_SYSCALL 1
-# define __ASSUME_STAT64_SYSCALL 1
-#endif
-
-/* I know for sure that these are in 2.3.35 on powerpc. */
-#if __LINUX_KERNEL_VERSION >= 131875 && defined __powerpc__
-# define __ASSUME_TRUNCATE64_SYSCALL 1
-# define __ASSUME_STAT64_SYSCALL 1
-# define __ASSUME_NEW_GETRLIMIT_SYSCALL 1
-#endif
-
-/* Linux 2.3.39 introduced 32bit UID/GIDs and IPC64. Some platforms had 32
- bit type all along. */
-#if __LINUX_KERNEL_VERSION >= 131879 || defined __powerpc__ || defined __mips__
-# define __ASSUME_32BITUIDS 1
-# ifndef __powerpc__
-# define __ASSUME_IPC64 1
-# endif
-# ifdef __sparc__
-# define __ASSUME_SETRESUID_SYSCALL 1
-# endif
-#endif
-
-/* Linux 2.4.0 on PPC introduced a correct IPC64. */
-#if __LINUX_KERNEL_VERSION >= 132096 && defined __powerpc__
-# define __ASSUME_IPC64 1
-#endif
-
-/* We can use the LDTs for threading with Linux 2.3.99 and newer. */
-#if __LINUX_KERNEL_VERSION >= 131939
-# define __ASSUME_LDT_WORKS 1
-#endif
-
-/* The changed st_ino field appeared in 2.4.0-test6. But we cannot
- distinguish this version from other 2.4.0 releases. Therefore play
- save and assume it available is for 2.4.1 and up. */
-#if __LINUX_KERNEL_VERSION >= 132097
-# define __ASSUME_ST_INO_64_BIT 1
-#endif
-
-/* To support locking of large files a new fcntl() syscall was introduced
- in 2.4.0-test7. We test for 2.4.1 for the earliest version we know
- the syscall is available. */
-#if __LINUX_KERNEL_VERSION >= 132097 && (defined __i386__ || defined __sparc__)
-# define __ASSUME_FCNTL64 1
-#endif
-
-/* Arm got fcntl64 in 2.4.4, PowerPC and SH have it also in 2.4.4 (I
- don't know when it got introduced). */
-#if __LINUX_KERNEL_VERSION >= 132100 \
- && (defined __arm__ || defined __powerpc__ || defined __sh__)
-# define __ASSUME_FCNTL64 1
-#endif
-
-/* The getdents64 syscall was introduced in 2.4.0-test7. We test for
- 2.4.1 for the earliest version we know the syscall is available. */
-#if __LINUX_KERNEL_VERSION >= 132097
-# define __ASSUME_GETDENTS64_SYSCALL 1
-#endif
-
-/* When did O_DIRECTORY became available? Early in 2.3 but when?
- Be safe, use 2.3.99. */
-#if __LINUX_KERNEL_VERSION >= 131939
-# define __ASSUME_O_DIRECTORY 1
-#endif
-
-/* Starting with one of the 2.4.0 pre-releases the Linux kernel passes
- up the page size information. */
-#if __LINUX_KERNEL_VERSION >= 132097
-# define __ASSUME_AT_PAGESIZE 1
-#endif
-
-/* Starting with 2.4.5 kernels PPC passes the AUXV in the standard way
- and the mmap2 syscall made it into the official kernel. */
-#if __LINUX_KERNEL_VERSION >= (132096+5) && defined __powerpc__
-# define __ASSUME_STD_AUXV 1
-# define __ASSUME_MMAP2_SYSCALL 1
-#endif
-
-/* There are an infinite number of PA-RISC kernel versions numbered
- 2.4.0. But they've not really been released as such. We require
- and expect the final version here. */
-#ifdef __hppa__
-# define __ASSUME_32BITUIDS 1
-# define __ASSUME_TRUNCATE64_SYSCALL 1
-# define __ASSUME_MMAP2_SYSCALL 1
-# define __ASSUME_STAT64_SYSCALL 1
-# define __ASSUME_IPC64 1
-# define __ASSUME_ST_INO_64_BIT 1
-# define __ASSUME_FCNTL64 1
-# define __ASSUME_GETDENTS64_SYSCALL 1
-#endif
diff --git a/newlib/libc/sys/linux/dl/ldsodefs.h b/newlib/libc/sys/linux/dl/ldsodefs.h
deleted file mode 100644
index f24e1136b..000000000
--- a/newlib/libc/sys/linux/dl/ldsodefs.h
+++ /dev/null
@@ -1,535 +0,0 @@
-/* Run-time dynamic linker data structures for loaded ELF shared objects.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _LDSODEFS_H
-#define _LDSODEFS_H 1
-
-#include <features.h>
-
-#define __need_size_t
-#define __need_NULL
-#include <stddef.h>
-#include <string.h>
-
-#include <elf.h>
-#include <dlfcn.h>
-#include <link.h>
-#include <dl-lookupcfg.h>
-#include <bits/libc-lock.h>
-
-__BEGIN_DECLS
-
-/* We use this macro to refer to ELF types independent of the native wordsize.
- `ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */
-#define ELFW(type) _ElfW (ELF, __ELF_NATIVE_CLASS, type)
-
-#define internal_function
-/* All references to the value of l_info[DT_PLTGOT],
- l_info[DT_STRTAB], l_info[DT_SYMTAB], l_info[DT_RELA],
- l_info[DT_REL], l_info[DT_JMPREL], and l_info[VERSYMIDX (DT_VERSYM)]
- have to be accessed via the D_PTR macro. The macro is needed since for
- most architectures the entry is already relocated - but for some not
- and we need to relocate at access time. */
-#ifdef DL_RO_DYN_SECTION
-# define D_PTR(map,i) (map->i->d_un.d_ptr + map->l_addr)
-#else
-# define D_PTR(map,i) map->i->d_un.d_ptr
-#endif
-
-/* On some platforms more information than just the address of the symbol
- is needed from the lookup functions. In this case we return the whole
- link map. */
-#ifdef DL_LOOKUP_RETURNS_MAP
-typedef struct link_map *lookup_t;
-# define LOOKUP_VALUE(map) map
-# define LOOKUP_VALUE_ADDRESS(map) (map ? map->l_addr : 0)
-#else
-typedef ElfW(Addr) lookup_t;
-# define LOOKUP_VALUE(map) map->l_addr
-# define LOOKUP_VALUE_ADDRESS(address) address
-#endif
-
-/* on some architectures a pointer to a function is not just a pointer
- to the actual code of the function but rather an architecture
- specific descriptor. */
-#ifndef ELF_FUNCTION_PTR_IS_SPECIAL
-# define DL_SYMBOL_ADDRESS(map, ref) \
- (void *) (LOOKUP_VALUE_ADDRESS (map) + ref->st_value)
-# define DL_LOOKUP_ADDRESS(addr) ((ElfW(Addr)) (addr))
-# define DL_DT_INIT_ADDRESS(map, start) (start)
-# define DL_DT_FINI_ADDRESS(map, start) (start)
-#endif
-
-/* Unmap a loaded object, called by _dl_close (). */
-#ifndef DL_UNMAP_IS_SPECIAL
-# define DL_UNMAP(map) \
- __munmap ((void *) (map)->l_map_start, \
- (map)->l_map_end - (map)->l_map_start)
-#endif
-
-/* By default we do not need special support to initialize DSOs loaded
- by statically linked binaries. */
-#ifndef DL_STATIC_INIT
-# define DL_STATIC_INIT(map)
-#endif
-
-/* Reloc type classes as returned by elf_machine_type_class().
- ELF_RTYPE_CLASS_PLT means this reloc should not be satisfied by
- some PLT symbol, ELF_RTYPE_CLASS_COPY means this reloc should not be
- satisfied by any symbol in the executable. */
-#define ELF_RTYPE_CLASS_PLT 1
-#define ELF_RTYPE_CLASS_COPY 2
-
-/* ELF uses the PF_x macros to specify the segment permissions, mmap
- uses PROT_xxx. In most cases the three macros have the values 1, 2,
- and 3 but not in a matching order. The following macros allows
- converting from the PF_x values to PROT_xxx values. */
-#define PF_TO_PROT \
- ((PROT_READ << (PF_R * 4)) \
- | (PROT_WRITE << (PF_W * 4)) \
- | (PROT_EXEC << (PF_X * 4)) \
- | ((PROT_READ | PROT_WRITE) << ((PF_R | PF_W) * 4)) \
- | ((PROT_READ | PROT_EXEC) << ((PF_R | PF_X) * 4)) \
- | ((PROT_WRITE | PROT_EXEC) << (PF_W | PF_X) * 4) \
- | ((PROT_READ | PROT_WRITE | PROT_EXEC) << ((PF_R | PF_W | PF_X) * 4)))
-
-
-/* For the version handling we need an array with only names and their
- hash values. */
-struct r_found_version
- {
- const char *name;
- ElfW(Word) hash;
-
- int hidden;
- const char *filename;
- };
-
-/* We want to cache information about the searches for shared objects. */
-
-enum r_dir_status { unknown, nonexisting, existing };
-
-struct r_search_path_elem
- {
- /* This link is only used in the `all_dirs' member of `r_search_path'. */
- struct r_search_path_elem *next;
-
- /* Strings saying where the definition came from. */
- const char *what;
- const char *where;
-
- /* Basename for this search path element. The string must end with
- a slash character. */
- const char *dirname;
- size_t dirnamelen;
-
- enum r_dir_status status[0];
- };
-
-struct r_strlenpair
- {
- const char *str;
- size_t len;
- };
-
-
-/* A data structure for a simple single linked list of strings. */
-struct libname_list
- {
- const char *name; /* Name requested (before search). */
- struct libname_list *next; /* Link to next name for this object. */
- int dont_free; /* Flag whether this element should be freed
- if the object is not entirely unloaded. */
- };
-
-
-/* Test whether given NAME matches any of the names of the given object. */
-static __inline int
-__attribute__ ((unused))
-_dl_name_match_p (const char *__name, struct link_map *__map)
-{
- int __found = strcmp (__name, __map->l_name) == 0;
- struct libname_list *__runp = __map->l_libname;
-
- while (! __found && __runp != NULL)
- if (strcmp (__name, __runp->name) == 0)
- __found = 1;
- else
- __runp = __runp->next;
-
- return __found;
-}
-
-/* Function used as argument for `_dl_receive_error' function. The
- arguments are the error code, error string, and the objname the
- error occurred in. */
-typedef void (*receiver_fct) (int, const char *, const char *);
-
-/* Internal functions of the run-time dynamic linker.
- These can be accessed if you link again the dynamic linker
- as a shared library, as in `-lld' or `/lib/ld.so' explicitly;
- but are not normally of interest to user programs.
-
- The `-ldl' library functions in <dlfcn.h> provide a simple
- user interface to run-time dynamic linking. */
-
-
-/* Parameters passed to the dynamic linker. */
-extern char **_dl_argv;
-
-/* Cached value of `getpagesize ()'. */
-extern size_t _dl_pagesize;
-
-/* OS version. */
-extern unsigned int _dl_osversion;
-
-/* File descriptor referring to the zero-fill device. */
-extern int _dl_zerofd;
-
-/* Name of the shared object to be profiled (if any). */
-extern const char *_dl_profile;
-/* Map of shared object to be profiled. */
-extern struct link_map *_dl_profile_map;
-/* Filename of the output file. */
-extern const char *_dl_profile_output;
-
-/* If nonzero the appropriate debug information is printed. */
-extern int _dl_debug_mask;
-#define DL_DEBUG_LIBS (1 << 0)
-#define DL_DEBUG_IMPCALLS (1 << 1)
-#define DL_DEBUG_BINDINGS (1 << 2)
-#define DL_DEBUG_SYMBOLS (1 << 3)
-#define DL_DEBUG_VERSIONS (1 << 4)
-#define DL_DEBUG_RELOC (1 << 5)
-#define DL_DEBUG_FILES (1 << 6)
-#define DL_DEBUG_STATISTICS (1 << 7)
-/* This one is used only internally. */
-#define DL_DEBUG_HELP (1 << 8)
-
-/* Expect cache ID. */
-extern int _dl_correct_cache_id;
-
-/* Mask for hardware capabilities that are available. */
-extern unsigned long int _dl_hwcap;
-
-/* Mask for important hardware capabilities we honour. */
-extern unsigned long int _dl_hwcap_mask;
-
-/* File descriptor to write debug messages to. */
-extern int _dl_debug_fd;
-
-/* Names of shared object for which the RPATH should be ignored. */
-extern const char *_dl_inhibit_rpath;
-
-/* Nonzero if references should be treated as weak during runtime linking. */
-extern int _dl_dynamic_weak;
-
-/* The array with message we print as a last resort. */
-extern const char _dl_out_of_memory[];
-
-/* Nonzero if runtime lookups should not update the .got/.plt. */
-extern int _dl_bind_not;
-
-/* List of search directories. */
-extern struct r_search_path_elem *_dl_all_dirs;
-extern struct r_search_path_elem *_dl_init_all_dirs;
-
-/* OS-dependent function to open the zero-fill device. */
-extern int _dl_sysdep_open_zero_fill (void); /* dl-sysdep.c */
-
-
-/* During the program run we must not modify the global data of
- loaded shared object simultanously in two threads. Therefore we
- protect `_dl_open' and `_dl_close' in dl-close.c.
-
- This must be a recursive lock since the initializer function of
- the loaded object might as well require a call to this function.
- At this time it is not anymore a problem to modify the tables. */
-__libc_lock_define_recursive (extern, _dl_load_lock)
-
-
-/* Write message on the debug file descriptor. The parameters are
- interpreted as for a `printf' call. All the lines start with a
- tag showing the PID. */
-extern void _dl_debug_printf (const char *fmt, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)));
-
-/* Write message on the debug file descriptor. The parameters are
- interpreted as for a `printf' call. All the lines buf the first
- start with a tag showing the PID. */
-extern void _dl_debug_printf_c (const char *fmt, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)));
-
-
-/* Write a message on the specified descriptor FD. The parameters are
- interpreted as for a `printf' call. */
-extern void _dl_dprintf (int fd, const char *fmt, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
-
-/* Write a message on the specified descriptor standard output. The
- parameters are interpreted as for a `printf' call. */
-#define _dl_printf(fmt, args...) \
- _dl_dprintf (STDOUT_FILENO, fmt, ##args)
-
-/* Write a message on the specified descriptor standard error. The
- parameters are interpreted as for a `printf' call. */
-#define _dl_error_printf(fmt, args...) \
- _dl_dprintf (STDERR_FILENO, fmt, ##args)
-
-/* Write a message on the specified descriptor standard error and exit
- the program. The parameters are interpreted as for a `printf' call. */
-#define _dl_fatal_printf(fmt, args...) \
- do \
- { \
- _dl_dprintf (STDERR_FILENO, fmt, ##args); \
- _exit (127); \
- } \
- while (1)
-
-
-/* This function is called by all the internal dynamic linker functions
- when they encounter an error. ERRCODE is either an `errno' code or
- zero; OBJECT is the name of the problematical shared object, or null if
- it is a general problem; ERRSTRING is a string describing the specific
- problem. */
-extern void _dl_signal_error (int errcode, const char *object,
- const char *occurred, const char *errstring)
- internal_function
- __attribute__ ((__noreturn__));
-
-/* Like _dl_signal_error, but may return when called in the context of
- _dl_receive_error. */
-extern void _dl_signal_cerror (int errcode, const char *object,
- const char *occation, const char *errstring)
- internal_function;
-
-/* Call OPERATE, receiving errors from `dl_signal_cerror'. Unlike
- `_dl_catch_error' the operation is resumed after the OPERATE
- function returns.
- ARGS is passed as argument to OPERATE. */
-extern void _dl_receive_error (receiver_fct fct, void (*operate) (void *),
- void *args)
- internal_function;
-
-
-/* Open the shared object NAME and map in its segments.
- LOADER's DT_RPATH is used in searching for NAME.
- If the object is already opened, returns its existing map.
- For preloaded shared objects PRELOADED is set to a non-zero
- value to allow additional security checks. */
-extern struct link_map *_dl_map_object (struct link_map *loader,
- const char *name, int preloaded,
- int type, int trace_mode, int mode)
- internal_function;
-
-/* Call _dl_map_object on the dependencies of MAP, and set up
- MAP->l_searchlist. PRELOADS points to a vector of NPRELOADS previously
- loaded objects that will be inserted into MAP->l_searchlist after MAP
- but before its dependencies. */
-extern void _dl_map_object_deps (struct link_map *map,
- struct link_map **preloads,
- unsigned int npreloads, int trace_mode)
- internal_function;
-
-/* Cache the locations of MAP's hash table. */
-extern void _dl_setup_hash (struct link_map *map) internal_function;
-
-
-/* Search loaded objects' symbol tables for a definition of the symbol
- referred to by UNDEF. *SYM is the symbol table entry containing the
- reference; it is replaced with the defining symbol, and the base load
- address of the defining object is returned. SYMBOL_SCOPE is a
- null-terminated list of object scopes to search; each object's
- l_searchlist (i.e. the segment of the dependency tree starting at that
- object) is searched in turn. REFERENCE_NAME should name the object
- containing the reference; it is used in error messages.
- TYPE_CLASS describes the type of symbol we are looking for. */
-extern lookup_t _dl_lookup_symbol (const char *undef,
- struct link_map *undef_map,
- const ElfW(Sym) **sym,
- struct r_scope_elem *symbol_scope[],
- int type_class, int explicit)
- internal_function;
-
-/* Lookup versioned symbol. */
-extern lookup_t _dl_lookup_versioned_symbol (const char *undef,
- struct link_map *undef_map,
- const ElfW(Sym) **sym,
- struct r_scope_elem *symbol_scope[],
- const struct r_found_version *version,
- int type_class, int explicit)
- internal_function;
-
-/* For handling RTLD_NEXT we must be able to skip shared objects. */
-extern lookup_t _dl_lookup_symbol_skip (const char *undef,
- struct link_map *undef_map,
- const ElfW(Sym) **sym,
- struct r_scope_elem *symbol_scope[],
- struct link_map *skip_this)
- internal_function;
-
-/* For handling RTLD_NEXT with versioned symbols we must be able to
- skip shared objects. */
-extern lookup_t _dl_lookup_versioned_symbol_skip (const char *undef,
- struct link_map *undef_map,
- const ElfW(Sym) **sym,
- struct r_scope_elem *symbol_scope[],
- const struct r_found_version *version,
- struct link_map *skip_this)
- internal_function;
-
-/* Look up symbol NAME in MAP's scope and return its run-time address. */
-extern ElfW(Addr) _dl_symbol_value (struct link_map *map, const char *name)
- internal_function;
-
-
-/* Structure describing the dynamic linker itself. */
-extern struct link_map _dl_rtld_map;
-/* And a pointer to the map for the main map. */
-extern struct link_map *_dl_loaded;
-/* Number of object in the _dl_loaded list. */
-extern unsigned int _dl_nloaded;
-/* Array representing global scope. */
-extern struct r_scope_elem *_dl_global_scope[2];
-/* Direct pointer to the searchlist of the main object. */
-extern struct r_scope_elem *_dl_main_searchlist;
-/* Copy of the content of `_dl_main_searchlist'. */
-extern struct r_scope_elem _dl_initial_searchlist;
-/* This is zero at program start to signal that the global scope map is
- allocated by rtld. Later it keeps the size of the map. It might be
- reset if in _dl_close if the last global object is removed. */
-extern size_t _dl_global_scope_alloc;
-
-/* Allocate a `struct link_map' for a new object being loaded,
- and enter it into the _dl_main_map list. */
-extern struct link_map *_dl_new_object (char *realname, const char *libname,
- int type, struct link_map *loader)
- internal_function;
-
-/* Relocate the given object (if it hasn't already been).
- SCOPE is passed to _dl_lookup_symbol in symbol lookups.
- If LAZY is nonzero, don't relocate its PLT. */
-extern void _dl_relocate_object (struct link_map *map,
- struct r_scope_elem *scope[],
- int lazy, int consider_profiling);
-
-/* Call _dl_signal_error with a message about an unhandled reloc type.
- TYPE is the result of ELFW(R_TYPE) (r_info), i.e. an R_<CPU>_* value.
- PLT is nonzero if this was a PLT reloc; it just affects the message. */
-extern void _dl_reloc_bad_type (struct link_map *map,
- unsigned int type, int plt)
- internal_function __attribute__ ((__noreturn__));
-
-/* Check the version dependencies of all objects available through
- MAP. If VERBOSE print some more diagnostics. */
-extern int _dl_check_all_versions (struct link_map *map, int verbose,
- int trace_mode)
- internal_function;
-
-/* Check the version dependencies for MAP. If VERBOSE print some more
- diagnostics. */
-extern int _dl_check_map_versions (struct link_map *map, int verbose,
- int trace_mode)
- internal_function;
-
-/* Initialize the object in SCOPE by calling the constructors with
- ARGC, ARGV, and ENV as the parameters. */
-extern void _dl_init (struct link_map *main_map, int argc, char **argv,
- char **env) internal_function;
-
-/* Call the finalizer functions of all shared objects whose
- initializer functions have completed. */
-extern void _dl_fini (void) internal_function;
-
-/* The dynamic linker calls this function before and having changing
- any shared object mappings. The `r_state' member of `struct r_debug'
- says what change is taking place. This function's address is
- the value of the `r_brk' member. */
-extern void _dl_debug_state (void);
-
-/* Initialize `struct r_debug' if it has not already been done. The
- argument is the run-time load address of the dynamic linker, to be put
- in the `r_ldbase' member. Returns the address of the structure. */
-extern struct r_debug *_dl_debug_initialize (ElfW(Addr) ldbase)
- internal_function;
-
-/* Initialize the basic data structure for the search paths. */
-extern void _dl_init_paths (const char *library_path) internal_function;
-
-/* Gather the information needed to install the profiling tables and start
- the timers. */
-extern void _dl_start_profile (struct link_map *map, const char *output_dir)
- internal_function;
-
-/* The actual functions used to keep book on the calls. */
-extern void _dl_mcount (ElfW(Addr) frompc, ElfW(Addr) selfpc);
-
-/* This function is simply a wrapper around the _dl_mcount function
- which does not require a FROMPC parameter since this is the
- calling function. */
-extern void _dl_mcount_wrapper (void *selfpc);
-
-/* Show the members of the auxiliary array passed up from the kernel. */
-extern void _dl_show_auxv (void) internal_function;
-
-/* Return all environment variables starting with `LD_', one after the
- other. */
-extern char *_dl_next_ld_env_entry (char ***position) internal_function;
-
-/* Return an array with the names of the important hardware capabilities. */
-extern const struct r_strlenpair *_dl_important_hwcaps (const char *platform,
- size_t paltform_len,
- size_t *sz,
- size_t *max_capstrlen)
- internal_function;
-
-/* Look up NAME in ld.so.cache and return the file name stored there,
- or null if none is found. */
-extern const char *_dl_load_cache_lookup (const char *name)
- internal_function;
-
-/* If the system does not support MAP_COPY we cannot leave the file open
- all the time since this would create problems when the file is replaced.
- Therefore we provide this function to close the file and open it again
- once needed. */
-extern void _dl_unload_cache (void);
-
-/* System-dependent function to read a file's whole contents in the
- most convenient manner available. *SIZEP gets the size of the
- file. On error MAP_FAILED is returned. */
-extern void *_dl_sysdep_read_whole_file (const char *file, size_t *sizep,
- int prot)
- internal_function;
-
-/* System-specific function to do initial startup for the dynamic linker.
- After this, file access calls and getenv must work. This is responsible
- for setting __libc_enable_secure if we need to be secure (e.g. setuid),
- and for setting _dl_argc and _dl_argv, and then calling _dl_main. */
-extern ElfW(Addr) _dl_sysdep_start (void **start_argptr,
- void (*dl_main) (const ElfW(Phdr) *phdr,
- ElfW(Word) phnum,
- ElfW(Addr) *user_entry));
-
-extern void _dl_sysdep_start_cleanup (void)
- internal_function;
-
-
-__END_DECLS
-
-#endif /* ldsodefs.h */
diff --git a/newlib/libc/sys/linux/dl/libintl.h b/newlib/libc/sys/linux/dl/libintl.h
deleted file mode 100644
index 839210dea..000000000
--- a/newlib/libc/sys/linux/dl/libintl.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define N_(x) x
-
diff --git a/newlib/libc/sys/linux/dl/trusted-dirs.h b/newlib/libc/sys/linux/dl/trusted-dirs.h
deleted file mode 100644
index 103d6e6bb..000000000
--- a/newlib/libc/sys/linux/dl/trusted-dirs.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#define SYSTEM_DIRS \
- "/usr/local/lib/"
-
-#define SYSTEM_DIRS_LEN \
- 15
-
-#define SYSTEM_DIRS_MAX_LEN 15
diff --git a/newlib/libc/sys/linux/dl/unsecvars.h b/newlib/libc/sys/linux/dl/unsecvars.h
deleted file mode 100644
index efb951595..000000000
--- a/newlib/libc/sys/linux/dl/unsecvars.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Environment variable to be removed for SUID programs. The names are
- all stuffed in a single string which means they have to be terminated
- with a '\0' explicitly. */
-#define UNSECURE_ENVVARS \
- "LD_PRELOAD\0" \
- "LD_LIBRARY_PATH\0" \
- "LD_ORIGIN_PATH\0" \
- "LD_DEBUG_OUTPUT\0" \
- "LD_PROFILE\0" \
- "GCONV_PATH\0" \
- "HOSTALIASES\0" \
- "LOCALDOMAIN\0" \
- "LOCPATH\0" \
- "MALLOC_TRACE\0" \
- "NLSPATH\0" \
- "RESOLV_HOST_CONF\0" \
- "RES_OPTIONS\0" \
- "TMPDIR\0" \
- "TZDIR\0"
diff --git a/newlib/libc/sys/linux/fclean.c b/newlib/libc/sys/linux/fclean.c
deleted file mode 100644
index 2fb11fc83..000000000
--- a/newlib/libc/sys/linux/fclean.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdio.h>
-
-int
-fclean (FILE *fp)
-{
- return fflush (fp);
-}
diff --git a/newlib/libc/sys/linux/flockfile.c b/newlib/libc/sys/linux/flockfile.c
deleted file mode 100644
index 4a6cbc461..000000000
--- a/newlib/libc/sys/linux/flockfile.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* stub to allow libpthread to override */
-
-#include <stdio.h>
-#include <machine/weakalias.h>
-
-void __libc_flockfile (FILE *fp)
-{
-}
-weak_alias(__libc_flockfile,flockfile)
diff --git a/newlib/libc/sys/linux/fpathconf.c b/newlib/libc/sys/linux/fpathconf.c
deleted file mode 100644
index 6d006a11b..000000000
--- a/newlib/libc/sys/linux/fpathconf.c
+++ /dev/null
@@ -1,303 +0,0 @@
-/* Linux specific extensions to fpathconf.
- Copyright (C) 1991,95,96,98,99,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Modified for newlib July 19, 2002 by Jeff Johnston */
-
-#include <errno.h>
-#include <stddef.h>
-#include <unistd.h>
-#include <limits.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/statvfs.h>
-#include <machine/weakalias.h>
-#include "linux_fsinfo.h"
-
-/* The Linux kernel header mentioned this as a kind of generic value. */
-#define LINUX_LINK_MAX 127
-
-static long int posix_fpathconf (int fd, int name);
-
-/* Get file-specific information about descriptor FD. */
-long int
-__fpathconf (fd, name)
- int fd;
- int name;
-{
- if (name == _PC_LINK_MAX)
- {
- struct statfs fsbuf;
-
- /* Determine the filesystem type. */
- if (__fstatfs (fd, &fsbuf) < 0)
- {
- if (errno == ENOSYS)
- /* not possible, return the default value. */
- return LINUX_LINK_MAX;
-
- /* Some error occured. */
- return -1;
- }
-
- switch (fsbuf.f_type)
- {
- case EXT2_SUPER_MAGIC:
- return EXT2_LINK_MAX;
-
- case MINIX_SUPER_MAGIC:
- case MINIX_SUPER_MAGIC2:
- return MINIX_LINK_MAX;
-
- case MINIX2_SUPER_MAGIC:
- case MINIX2_SUPER_MAGIC2:
- return MINIX2_LINK_MAX;
-
- case XENIX_SUPER_MAGIC:
- return XENIX_LINK_MAX;
-
- case SYSV4_SUPER_MAGIC:
- case SYSV2_SUPER_MAGIC:
- return SYSV_LINK_MAX;
-
- case COH_SUPER_MAGIC:
- return COH_LINK_MAX;
-
- case UFS_MAGIC:
- case UFS_CIGAM:
- return UFS_LINK_MAX;
-
- case REISERFS_SUPER_MAGIC:
- return REISERFS_LINK_MAX;
-
- default:
- return LINUX_LINK_MAX;
- }
- }
-
- return posix_fpathconf (fd, name);
-}
-
-/* Get file-specific information about descriptor FD. */
-static long int
-posix_fpathconf (fd, name)
- int fd;
- int name;
-{
- if (fd < 0)
- {
- __set_errno (EBADF);
- return -1;
- }
-
- switch (name)
- {
- default:
- __set_errno (EINVAL);
- return -1;
-
- case _PC_LINK_MAX:
-#ifdef LINK_MAX
- return LINK_MAX;
-#else
- return -1;
-#endif
-
- case _PC_MAX_CANON:
-#ifdef MAX_CANON
- return MAX_CANON;
-#else
- return -1;
-#endif
-
- case _PC_MAX_INPUT:
-#ifdef MAX_INPUT
- return MAX_INPUT;
-#else
- return -1;
-#endif
-
- case _PC_NAME_MAX:
-#ifdef NAME_MAX
- {
- struct statfs buf;
- int save_errno = errno;
-
- if (__fstatfs (fd, &buf) < 0)
- {
- if (errno == ENOSYS)
- {
- __set_errno (save_errno);
- return NAME_MAX;
- }
- else if (errno == ENODEV)
- __set_errno (EINVAL);
-
- return -1;
- }
- else
- {
-#ifdef _STATFS_F_NAMELEN
- return buf.f_namelen;
-#else
-# ifdef _STATFS_F_NAME_MAX
- return buf.f_name_max;
-# else
- return NAME_MAX;
-# endif
-#endif
- }
- }
-#else
- return -1;
-#endif
-
- case _PC_PATH_MAX:
-#ifdef PATH_MAX
- return PATH_MAX;
-#else
- return -1;
-#endif
-
- case _PC_PIPE_BUF:
-#ifdef PIPE_BUF
- return PIPE_BUF;
-#else
- return -1;
-#endif
-
- case _PC_CHOWN_RESTRICTED:
-#ifdef _POSIX_CHOWN_RESTRICTED
- return _POSIX_CHOWN_RESTRICTED;
-#else
- return -1;
-#endif
-
- case _PC_NO_TRUNC:
-#ifdef _POSIX_NO_TRUNC
- return _POSIX_NO_TRUNC;
-#else
- return -1;
-#endif
-
- case _PC_VDISABLE:
-#ifdef _POSIX_VDISABLE
- return _POSIX_VDISABLE;
-#else
- return -1;
-#endif
-
- case _PC_SYNC_IO:
-#ifdef _POSIX_SYNC_IO
- return _POSIX_SYNC_IO;
-#else
- return -1;
-#endif
-
- case _PC_ASYNC_IO:
-#ifdef _POSIX_ASYNC_IO
- {
- /* AIO is only allowed on regular files and block devices. */
- struct stat64 st;
-
- if (fstat64 (fd, &st) < 0
- || (! S_ISREG (st.st_mode) && ! S_ISBLK (st.st_mode)))
- return -1;
- else
- return 1;
- }
-#else
- return -1;
-#endif
-
- case _PC_PRIO_IO:
-#ifdef _POSIX_PRIO_IO
- return _POSIX_PRIO_IO;
-#else
- return -1;
-#endif
-
- case _PC_SOCK_MAXBUF:
-#ifdef SOCK_MAXBUF
- return SOCK_MAXBUF;
-#else
- return -1;
-#endif
-
- case _PC_FILESIZEBITS:
-#ifdef FILESIZEBITS
- return FILESIZEBITS;
-#else
- /* We let platforms with larger file sizes overwrite this value. */
- return 32;
-#endif
-
- case _PC_REC_INCR_XFER_SIZE:
- /* XXX It is not entirely clear what the limit is supposed to do.
- What is incremented? */
- return -1;
-
- case _PC_REC_MAX_XFER_SIZE:
- /* XXX It is not entirely clear what the limit is supposed to do.
- In general there is no top limit of the number of bytes which
- case be transported at once. */
- return -1;
-
- case _PC_REC_MIN_XFER_SIZE:
- {
- /* XXX It is not entirely clear what the limit is supposed to do.
- I assume this is the block size of the filesystem. */
- struct statvfs64 sv;
-
- if (__fstatvfs64 (fd, &sv) < 0)
- return -1;
- return sv.f_bsize;
- }
-
- case _PC_REC_XFER_ALIGN:
- {
- /* XXX It is not entirely clear what the limit is supposed to do.
- I assume that the number should reflect the minimal block
- alignment. */
- struct statvfs64 sv;
-
- if (__fstatvfs64 (fd, &sv) < 0)
- return -1;
- return sv.f_frsize;
- }
-
- case _PC_ALLOC_SIZE_MIN:
- {
- /* XXX It is not entirely clear what the limit is supposed to do.
- I assume that the number should reflect the minimal block
- alignment. */
- struct statvfs64 sv;
-
- if (__fstatvfs64 (fd, &sv) < 0)
- return -1;
- return sv.f_frsize;
- }
-
- case _PC_SYMLINK_MAX:
- /* In general there are no limits. If a system has one it should
- overwrite this case. */
- return -1;
- }
-}
-
-weak_alias (__fpathconf, fpathconf)
diff --git a/newlib/libc/sys/linux/free.c b/newlib/libc/sys/linux/free.c
deleted file mode 100644
index 818e05a75..000000000
--- a/newlib/libc/sys/linux/free.c
+++ /dev/null
@@ -1 +0,0 @@
-/* dummy file to override one object in stdlib directory */
diff --git a/newlib/libc/sys/linux/freer.c b/newlib/libc/sys/linux/freer.c
deleted file mode 100644
index d8d7f9828..000000000
--- a/newlib/libc/sys/linux/freer.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdlib.h>
-
-void
-_free_r (struct _reent *ptr, void *addr)
-{
- free (addr);
-}
diff --git a/newlib/libc/sys/linux/fstab.c b/newlib/libc/sys/linux/fstab.c
deleted file mode 100644
index f98f4b740..000000000
--- a/newlib/libc/sys/linux/fstab.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <fstab.h>
-#include <mntent.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <bits/libc-lock.h>
-#include <libc-symbols.h>
-
-#define BUFFER_SIZE 0x1fc0
-
-struct fstab_state
-{
- FILE *fs_fp;
- char *fs_buffer;
- struct mntent fs_mntres;
- struct fstab fs_ret;
-};
-
-static struct fstab_state *fstab_init (int opt_rewind);
-static struct mntent *fstab_fetch (struct fstab_state *state);
-static struct fstab *fstab_convert (struct fstab_state *state);
-
-static struct fstab_state fstab_state;
-
-
-int
-setfsent (void)
-{
- return fstab_init (1) != NULL;
-}
-
-
-struct fstab *
-getfsent (void)
-{
- struct fstab_state *state;
-
- state = fstab_init (0);
- if (state == NULL)
- return NULL;
- if (fstab_fetch (state) == NULL)
- return NULL;
- return fstab_convert (state);
-}
-
-
-struct fstab *
-getfsspec (name)
- const char *name;
-{
- struct fstab_state *state;
- struct mntent *m;
-
- state = fstab_init (1);
- if (state == NULL)
- return NULL;
- while ((m = fstab_fetch (state)) != NULL)
- if (strcmp (m->mnt_fsname, name) == 0)
- return fstab_convert (state);
- return NULL;
-}
-
-
-struct fstab *
-getfsfile (name)
- const char *name;
-{
- struct fstab_state *state;
- struct mntent *m;
-
- state = fstab_init (1);
- if (state == NULL)
- return NULL;
- while ((m = fstab_fetch (state)) != NULL)
- if (strcmp (m->mnt_dir, name) == 0)
- return fstab_convert (state);
- return NULL;
-}
-
-
-void
-endfsent ()
-{
- struct fstab_state *state;
-
- state = &fstab_state;
- if (state->fs_fp != NULL)
- {
- (void) __endmntent (state->fs_fp);
- state->fs_fp = NULL;
- }
-}
-
-
-static struct fstab_state *
-fstab_init (int opt_rewind)
-{
- struct fstab_state *state;
- char *buffer;
- FILE *fp;
-
- state = &fstab_state;
-
- buffer = state->fs_buffer;
- if (buffer == NULL)
- {
- buffer = (char *) malloc (BUFFER_SIZE);
- if (buffer == NULL)
- return NULL;
- state->fs_buffer = buffer;
- }
-
- fp = state->fs_fp;
- if (fp != NULL)
- {
- if (opt_rewind)
- rewind (fp);
- }
- else
- {
- fp = __setmntent (_PATH_FSTAB, "r");
- if (fp == NULL)
- return NULL;
- state->fs_fp = fp;
- }
-
- return state;
-}
-
-
-static struct mntent *
-fstab_fetch (struct fstab_state *state)
-{
- return __getmntent_r (state->fs_fp, &state->fs_mntres,
- state->fs_buffer, BUFFER_SIZE);
-}
-
-
-static struct fstab *
-fstab_convert (struct fstab_state *state)
-{
- struct mntent *m;
- struct fstab *f;
-
- m = &state->fs_mntres;
- f = &state->fs_ret;
-
- f->fs_spec = m->mnt_fsname;
- f->fs_file = m->mnt_dir;
- f->fs_vfstype = m->mnt_type;
- f->fs_mntops = m->mnt_opts;
- f->fs_type = (__hasmntopt (m, FSTAB_RW) ? FSTAB_RW :
- __hasmntopt (m, FSTAB_RQ) ? FSTAB_RQ :
- __hasmntopt (m, FSTAB_RO) ? FSTAB_RO :
- __hasmntopt (m, FSTAB_SW) ? FSTAB_SW :
- __hasmntopt (m, FSTAB_XX) ? FSTAB_XX :
- "??");
- f->fs_freq = m->mnt_freq;
- f->fs_passno = m->mnt_passno;
- return f;
-}
-
-
-/* Make sure the memory is freed if the programs ends while in
- memory-debugging mode and something actually was allocated. */
-static void
-__attribute__ ((unused))
-fstab_free (void)
-{
- char *buffer;
-
- buffer = fstab_state.fs_buffer;
- if (buffer != NULL)
- free ((void *) buffer);
-}
-
-text_set_element (__libc_subfreeres, fstab_free);
diff --git a/newlib/libc/sys/linux/fstatvfs.c b/newlib/libc/sys/linux/fstatvfs.c
deleted file mode 100644
index e1a12603a..000000000
--- a/newlib/libc/sys/linux/fstatvfs.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#define _GNU_SOURCE
-
-#include <errno.h>
-#include <mntent.h>
-#include <paths.h>
-#include <string.h>
-#include <sys/mount.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/statvfs.h>
-
-
-int
-fstatvfs (int fd, struct statvfs *buf)
-{
- struct statfs fsbuf;
- struct stat64 st;
-
- /* Get as much information as possible from the system. */
- if (__fstatfs (fd, &fsbuf) < 0)
- return -1;
-
-#define STAT(st) fstat64 (fd, st)
-#include "internal_statvfs.c"
-
- /* We signal success if the statfs call succeeded. */
- return 0;
-}
diff --git a/newlib/libc/sys/linux/fstatvfs64.c b/newlib/libc/sys/linux/fstatvfs64.c
deleted file mode 100644
index 65c9e609b..000000000
--- a/newlib/libc/sys/linux/fstatvfs64.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Return information about the filesystem on which FD resides.
- Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <sys/statvfs.h>
-#include <string.h>
-#include <machine/weakalias.h>
-
-/* Return information about the filesystem on which FD resides. */
-int
-__fstatvfs64 (int fd, struct statvfs64 *buf)
-{
- struct statvfs buf32;
-
- if (fstatvfs (fd, &buf32) < 0)
- return -1;
-
- buf->f_bsize = buf32.f_bsize;
- buf->f_frsize = buf32.f_frsize;
- buf->f_blocks = buf32.f_blocks;
- buf->f_bfree = buf32.f_bfree;
- buf->f_bavail = buf32.f_bavail;
- buf->f_files = buf32.f_files;
- buf->f_ffree = buf32.f_ffree;
- buf->f_favail = buf32.f_favail;
- buf->f_fsid = buf32.f_fsid;
- buf->f_flag = buf32.f_flag;
- buf->f_namemax = buf32.f_namemax;
- memcpy (buf->__f_spare, buf32.__f_spare, sizeof (buf32.__f_spare));
-
- return 0;
-}
-weak_alias (__fstatvfs64, fstatvfs64)
diff --git a/newlib/libc/sys/linux/ftok.c b/newlib/libc/sys/linux/ftok.c
deleted file mode 100644
index 2f4b684b5..000000000
--- a/newlib/libc/sys/linux/ftok.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Modified for newlib by Jeff Johnston, June 10/2002 */
-
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/stat.h>
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 2
-#define STAT stat64
-#else
-#define STAT stat
-#endif
-
-key_t
-ftok (pathname, proj_id)
- const char *pathname;
- int proj_id;
-{
- struct STAT st;
- key_t key;
-
- if (STAT (pathname, &st) < 0)
- return (key_t) -1;
-
- key = ((st.st_ino & 0xffff) | ((st.st_dev & 0xff) << 16)
- | ((proj_id & 0xff) << 24));
-
- return key;
-}
diff --git a/newlib/libc/sys/linux/ftw.c b/newlib/libc/sys/linux/ftw.c
deleted file mode 100644
index a7f7259bc..000000000
--- a/newlib/libc/sys/linux/ftw.c
+++ /dev/null
@@ -1,640 +0,0 @@
-/* File tree walker functions.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Modified for newlib by Jeff Johnston, July 26, 2002 */
-
-#define _GNU_SOURCE 1
-
-#include <dirent.h>
-#include <errno.h>
-#include <ftw.h>
-#include <search.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-
-extern struct dirent64 *__readdir64 (DIR *);
-
-/* #define NDEBUG 1 */
-#include <assert.h>
-
-/* Support for the LFS API version. */
-#ifndef FTW_NAME
-# define FTW_NAME ftw
-# define NFTW_NAME nftw
-# define INO_T ino_t
-# define STAT stat
-# define LXSTAT lstat
-# define XSTAT stat
-# define FTW_FUNC_T __ftw_func_t
-# define NFTW_FUNC_T __nftw_func_t
-#endif
-
-#define dirfd(x) ((x)->dd_fd)
-
-struct dir_data
-{
- DIR *stream;
- char *content;
-};
-
-struct known_object
-{
- dev_t dev;
- INO_T ino;
-};
-
-struct ftw_data
-{
- /* Array with pointers to open directory streams. */
- struct dir_data **dirstreams;
- size_t actdir;
- size_t maxdir;
-
- /* Buffer containing name of currently processed object. */
- char *dirbuf;
- size_t dirbufsize;
-
- /* Passed as fourth argument to `nftw' callback. The `base' member
- tracks the content of the `dirbuf'. */
- struct FTW ftw;
-
- /* Flags passed to `nftw' function. 0 for `ftw'. */
- int flags;
-
- /* Conversion array for flag values. It is the identity mapping for
- `nftw' calls, otherwise it maps the values to those know by
- `ftw'. */
- const int *cvt_arr;
-
- /* Callback function. We always use the `nftw' form. */
- NFTW_FUNC_T func;
-
- /* Device of starting point. Needed for FTW_MOUNT. */
- dev_t dev;
-
- /* Data structure for keeping fingerprints of already processed
- object. This is needed when not using FTW_PHYS. */
- void *known_objects;
-};
-
-
-/* Internally we use the FTW_* constants used for `nftw'. When the
- process called `ftw' we must reduce the flag to the known flags
- for `ftw'. */
-static const int nftw_arr[] =
-{
- FTW_F, FTW_D, FTW_DNR, FTW_NS, FTW_SL, FTW_DP, FTW_SLN
-};
-
-static const int ftw_arr[] =
-{
- FTW_F, FTW_D, FTW_DNR, FTW_NS, FTW_F, FTW_D, FTW_NS
-};
-
-
-/* Forward declarations of local functions. */
-static int ftw_dir (struct ftw_data *data, struct STAT *st);
-
-
-static int
-object_compare (const void *p1, const void *p2)
-{
- /* We don't need a sophisticated and useful comparison. We are only
- interested in equality. However, we must be careful not to
- accidentally compare `holes' in the structure. */
- const struct known_object *kp1 = p1, *kp2 = p2;
- int cmp1;
- cmp1 = (kp1->dev > kp2->dev) - (kp1->dev < kp2->dev);
- if (cmp1 != 0)
- return cmp1;
- return (kp1->ino > kp2->ino) - (kp1->ino < kp2->ino);
-}
-
-
-static inline int
-add_object (struct ftw_data *data, struct STAT *st)
-{
- struct known_object *newp = malloc (sizeof (struct known_object));
- if (newp == NULL)
- return -1;
- newp->dev = st->st_dev;
- newp->ino = st->st_ino;
- return tsearch (newp, &data->known_objects, object_compare) ? 0 : -1;
-}
-
-
-static inline int
-find_object (struct ftw_data *data, struct STAT *st)
-{
- struct known_object obj = { dev: st->st_dev, ino: st->st_ino };
- return tfind (&obj, &data->known_objects, object_compare) != NULL;
-}
-
-
-static inline int
-open_dir_stream (struct ftw_data *data, struct dir_data *dirp)
-{
- int result = 0;
-
- if (data->dirstreams[data->actdir] != NULL)
- {
- /* Oh, oh. We must close this stream. Get all remaining
- entries and store them as a list in the `content' member of
- the `struct dir_data' variable. */
- size_t bufsize = 1024;
- char *buf = malloc (bufsize);
-
- if (buf == NULL)
- result = -1;
- else
- {
- DIR *st = data->dirstreams[data->actdir]->stream;
- struct dirent64 *d;
- size_t actsize = 0;
-
- while ((d = __readdir64 (st)) != NULL)
- {
- size_t this_len = strlen (d->d_name);
- if (actsize + this_len + 2 >= bufsize)
- {
- char *newp;
- bufsize += MAX (1024, 2 * this_len);
- newp = realloc (buf, bufsize);
- if (newp == NULL)
- {
- /* No more memory. */
- int save_err = errno;
- free (buf);
- __set_errno (save_err);
- result = -1;
- break;
- }
- buf = newp;
- }
-
- *((char *) mempcpy (buf + actsize, d->d_name, this_len))
- = '\0';
- actsize += this_len + 1;
- }
-
- /* Terminate the list with an additional NUL byte. */
- buf[actsize++] = '\0';
-
- /* Shrink the buffer to what we actually need. */
- data->dirstreams[data->actdir]->content = realloc (buf, actsize);
- if (data->dirstreams[data->actdir]->content == NULL)
- {
- int save_err = errno;
- free (buf);
- __set_errno (save_err);
- result = -1;
- }
- else
- {
- closedir (st);
- data->dirstreams[data->actdir]->stream = NULL;
- data->dirstreams[data->actdir] = NULL;
- }
- }
- }
-
- /* Open the new stream. */
- if (result == 0)
- {
- assert (data->dirstreams[data->actdir] == NULL);
-
- dirp->stream = opendir (data->dirbuf);
- if (dirp->stream == NULL)
- result = -1;
- else
- {
- dirp->content = NULL;
- data->dirstreams[data->actdir] = dirp;
-
- if (++data->actdir == data->maxdir)
- data->actdir = 0;
- }
- }
-
- return result;
-}
-
-
-static inline int
-process_entry (struct ftw_data *data, struct dir_data *dir, const char *name,
- size_t namlen)
-{
- struct STAT st;
- int result = 0;
- int flag = 0;
-
- if (name[0] == '.' && (name[1] == '\0'
- || (name[1] == '.' && name[2] == '\0')))
- /* Don't process the "." and ".." entries. */
- return 0;
-
- if (data->dirbufsize < data->ftw.base + namlen + 2)
- {
- /* Enlarge the buffer. */
- char *newp;
-
- data->dirbufsize *= 2;
- newp = realloc (data->dirbuf, data->dirbufsize);
- if (newp == NULL)
- return -1;
- data->dirbuf = newp;
- }
-
- *((char *) mempcpy (data->dirbuf + data->ftw.base, name, namlen)) = '\0';
-
- if (((data->flags & FTW_PHYS)
- ? LXSTAT (data->dirbuf, &st)
- : XSTAT (data->dirbuf, &st)) < 0)
- {
- if (errno != EACCES && errno != ENOENT)
- result = -1;
- else if (!(data->flags & FTW_PHYS)
- && LXSTAT (data->dirbuf, &st) == 0
- && S_ISLNK (st.st_mode))
- flag = FTW_SLN;
- else
- flag = FTW_NS;
- }
- else
- {
- if (S_ISDIR (st.st_mode))
- flag = FTW_D;
- else if (S_ISLNK (st.st_mode))
- flag = FTW_SL;
- else
- flag = FTW_F;
- }
-
- if (result == 0
- && (flag == FTW_NS
- || !(data->flags & FTW_MOUNT) || st.st_dev == data->dev))
- {
- if (flag == FTW_D)
- {
- if ((data->flags & FTW_PHYS)
- || (!find_object (data, &st)
- /* Remember the object. */
- && (result = add_object (data, &st)) == 0))
- {
- result = ftw_dir (data, &st);
-
- if (result == 0 && (data->flags & FTW_CHDIR))
- {
- /* Change back to current directory. */
- int done = 0;
- if (dir->stream != NULL)
- if (fchdir (dirfd (dir->stream)) == 0)
- done = 1;
-
- if (!done)
- {
- if (data->ftw.base == 1)
- {
- if (chdir ("/") < 0)
- result = -1;
- }
- else
- {
- /* Please note that we overwrite a slash. */
- data->dirbuf[data->ftw.base - 1] = '\0';
-
- if (chdir (data->dirbuf) < 0)
- result = -1;
-
- data->dirbuf[data->ftw.base - 1] = '/';
- }
- }
- }
- }
- }
- else
- result = (*data->func) (data->dirbuf, &st, data->cvt_arr[flag],
- &data->ftw);
- }
-
- return result;
-}
-
-
-static int
-ftw_dir (struct ftw_data *data, struct STAT *st)
-{
- struct dir_data dir;
- struct dirent64 *d;
- int previous_base = data->ftw.base;
- int result;
- char *startp;
-
- /* Open the stream for this directory. This might require that
- another stream has to be closed. */
- result = open_dir_stream (data, &dir);
- if (result != 0)
- {
- if (errno == EACCES)
- /* We cannot read the directory. Signal this with a special flag. */
- result = (*data->func) (data->dirbuf, st, FTW_DNR, &data->ftw);
-
- return result;
- }
-
- /* First, report the directory (if not depth-first). */
- if (!(data->flags & FTW_DEPTH))
- {
- result = (*data->func) (data->dirbuf, st, FTW_D, &data->ftw);
- if (result != 0)
- return result;
- }
-
- /* If necessary, change to this directory. */
- if (data->flags & FTW_CHDIR)
- {
- if (fchdir (dirfd (dir.stream)) < 0)
- {
- if (errno == ENOSYS)
- {
- if (chdir (data->dirbuf) < 0)
- result = -1;
- }
- else
- result = -1;
- }
-
- if (result != 0)
- {
- int save_err = errno;
- closedir (dir.stream);
- __set_errno (save_err);
-
- if (data->actdir-- == 0)
- data->actdir = data->maxdir - 1;
- data->dirstreams[data->actdir] = NULL;
-
- return result;
- }
- }
-
- /* Next, update the `struct FTW' information. */
- ++data->ftw.level;
- startp = strchr (data->dirbuf, '\0');
- /* There always must be a directory name. */
- assert (startp != data->dirbuf);
- if (startp[-1] != '/')
- *startp++ = '/';
- data->ftw.base = startp - data->dirbuf;
-
- while (dir.stream != NULL && (d = __readdir64 (dir.stream)) != NULL)
- {
- result = process_entry (data, &dir, d->d_name, strlen (d->d_name));
- if (result != 0)
- break;
- }
-
- if (dir.stream != NULL)
- {
- /* The stream is still open. I.e., we did not need more
- descriptors. Simply close the stream now. */
- int save_err = errno;
-
- assert (dir.content == NULL);
-
- closedir (dir.stream);
- __set_errno (save_err);
-
- if (data->actdir-- == 0)
- data->actdir = data->maxdir - 1;
- data->dirstreams[data->actdir] = NULL;
- }
- else
- {
- int save_err;
- char *runp = dir.content;
-
- while (result == 0 && *runp != '\0')
- {
- char *endp = strchr (runp, '\0');
-
- result = process_entry (data, &dir, runp, endp - runp);
-
- runp = endp + 1;
- }
-
- save_err = errno;
- free (dir.content);
- __set_errno (save_err);
- }
-
- /* Prepare the return, revert the `struct FTW' information. */
- data->dirbuf[data->ftw.base - 1] = '\0';
- --data->ftw.level;
- data->ftw.base = previous_base;
-
- /* Finally, if we process depth-first report the directory. */
- if (result == 0 && (data->flags & FTW_DEPTH))
- result = (*data->func) (data->dirbuf, st, FTW_DP, &data->ftw);
-
- return result;
-}
-
-
-static int
-ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
- int flags)
-{
- struct ftw_data data;
- struct STAT st;
- int result = 0;
- int save_err;
- int len;
- char *cwd = NULL;
- char *cp;
-
- /* First make sure the parameters are reasonable. */
- if (dir[0] == '\0')
- {
- __set_errno (ENOENT);
- return -1;
- }
-
- if (access (dir, R_OK) != 0)
- return -1;
-
- data.maxdir = descriptors < 1 ? 1 : descriptors;
- data.actdir = 0;
- data.dirstreams = (struct dir_data **) alloca (data.maxdir
- * sizeof (struct dir_data *));
- memset (data.dirstreams, '\0', data.maxdir * sizeof (struct dir_data *));
-
-#ifdef PATH_MAX
- data.dirbufsize = MAX (2 * strlen (dir), PATH_MAX);
-#else
- data.dirbufsize = 2 * strlen (dir);
-#endif
- data.dirbuf = (char *) malloc (data.dirbufsize);
- if (data.dirbuf == NULL)
- return -1;
- len = strlen (dir);
- cp = mempcpy (data.dirbuf, dir, len);
- /* Strip trailing slashes. */
- while (cp > data.dirbuf + 1 && cp[-1] == '/')
- --cp;
- *cp = '\0';
-
- data.ftw.level = 0;
-
- /* Find basename. */
- while (cp > data.dirbuf && cp[-1] != '/')
- --cp;
- data.ftw.base = cp - data.dirbuf;
-
- data.flags = flags;
-
- /* This assignment might seem to be strange but it is what we want.
- The trick is that the first three arguments to the `ftw' and
- `nftw' callback functions are equal. Therefore we can call in
- every case the callback using the format of the `nftw' version
- and get the correct result since the stack layout for a function
- call in C allows this. */
- data.func = (NFTW_FUNC_T) func;
-
- /* Since we internally use the complete set of FTW_* values we need
- to reduce the value range before calling a `ftw' callback. */
- data.cvt_arr = is_nftw ? nftw_arr : ftw_arr;
-
- /* No object known so far. */
- data.known_objects = NULL;
-
- /* Now go to the directory containing the initial file/directory. */
- if ((flags & FTW_CHDIR) && data.ftw.base > 0)
- {
- /* GNU extension ahead. */
- cwd = getcwd (NULL, 0);
- if (cwd == NULL)
- result = -1;
- else
- {
- /* Change to the directory the file is in. In data.dirbuf
- we have a writable copy of the file name. Just NUL
- terminate it for now and change the directory. */
- if (data.ftw.base == 1)
- /* I.e., the file is in the root directory. */
- result = chdir ("/");
- else
- {
- char ch = data.dirbuf[data.ftw.base - 1];
- data.dirbuf[data.ftw.base - 1] = '\0';
- result = chdir (data.dirbuf);
- data.dirbuf[data.ftw.base - 1] = ch;
- }
- }
- }
-
- /* Get stat info for start directory. */
- if (result == 0)
- {
- if (((flags & FTW_PHYS)
- ? LXSTAT (data.dirbuf, &st)
- : XSTAT (data.dirbuf, &st)) < 0)
- {
- if (errno == EACCES)
- result = (*data.func) (data.dirbuf, &st, FTW_NS, &data.ftw);
- else if (!(flags & FTW_PHYS)
- && errno == ENOENT
- && LXSTAT (dir, &st) == 0
- && S_ISLNK (st.st_mode))
- result = (*data.func) (data.dirbuf, &st, data.cvt_arr[FTW_SLN],
- &data.ftw);
- else
- /* No need to call the callback since we cannot say anything
- about the object. */
- result = -1;
- }
- else
- {
- if (S_ISDIR (st.st_mode))
- {
- /* Remember the device of the initial directory in case
- FTW_MOUNT is given. */
- data.dev = st.st_dev;
-
- /* We know this directory now. */
- if (!(flags & FTW_PHYS))
- result = add_object (&data, &st);
-
- if (result == 0)
- result = ftw_dir (&data, &st);
- }
- else
- {
- int flag = S_ISLNK (st.st_mode) ? FTW_SL : FTW_F;
-
- result = (*data.func) (data.dirbuf, &st, data.cvt_arr[flag],
- &data.ftw);
- }
- }
- }
-
- /* Return to the start directory (if necessary). */
- if (cwd != NULL)
- {
- int save_err = errno;
- chdir (cwd);
- free (cwd);
- __set_errno (save_err);
- }
-
- /* Free all memory. */
- save_err = errno;
- tdestroy (data.known_objects, free);
- free (data.dirbuf);
- __set_errno (save_err);
-
- return result;
-}
-
-
-
-/* Entry points. */
-
-int
-FTW_NAME (path, func, descriptors)
- const char *path;
- FTW_FUNC_T func;
- int descriptors;
-{
- return ftw_startup (path, 0, func, descriptors, 0);
-}
-
-int
-NFTW_NAME (path, func, descriptors, flags)
- const char *path;
- NFTW_FUNC_T func;
- int descriptors;
- int flags;
-{
- return ftw_startup (path, 1, func, descriptors, flags);
-}
diff --git a/newlib/libc/sys/linux/ftw64.c b/newlib/libc/sys/linux/ftw64.c
deleted file mode 100644
index 216549ac3..000000000
--- a/newlib/libc/sys/linux/ftw64.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* File tree walker functions. LFS version.
- Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#define FTW_NAME ftw64
-#define NFTW_NAME nftw64
-#define INO_T ino64_t
-#define STAT stat64
-#define LXSTAT lstat64
-#define XSTAT stat64
-#define FTW_FUNC_T __ftw64_func_t
-#define NFTW_FUNC_T __nftw64_func_t
-
-#include "ftw.c"
diff --git a/newlib/libc/sys/linux/funlockfile.c b/newlib/libc/sys/linux/funlockfile.c
deleted file mode 100644
index 82466d30a..000000000
--- a/newlib/libc/sys/linux/funlockfile.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* stub to allow libpthread to override */
-
-#include <stdio.h>
-#include <machine/weakalias.h>
-
-void __libc_funlockfile (FILE *fp)
-{
-}
-weak_alias(__libc_funlockfile,funlockfile)
diff --git a/newlib/libc/sys/linux/getdate.c b/newlib/libc/sys/linux/getdate.c
deleted file mode 100644
index 5c056c750..000000000
--- a/newlib/libc/sys/linux/getdate.c
+++ /dev/null
@@ -1,325 +0,0 @@
-/* Convert a string representation of time to a time value.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/*
-FUNCTION
-<<getdate>>,<<getdate_r>>---convert a string representation of time to a time value
-
-INDEX
- getdate
-INDEX
- getdate_r
-
-ANSI_SYNOPSIS
- #include <time.h>
- struct tm *getdate(const char *<[string]>);
- int getdate_r(const char *<[string]>, struct tm *<[res]>);
-
-TRAD_SYNOPSIS
- #include <time.h>
- struct tm *getdate(<[string]>);
- const char *<[string]>;
-
- int getdate_r(<[string]>, <[res]>);
- const char *<[string]>;
- struct tm *<[res]>;
-
-DESCRIPTION
-<<getdate>> reads a file which is specified by the environment variable:
-DATEMSK. This file contains a number of formats valid for input to the
-<<strptime>> function. The input <[string]> is used as input to the format
-strings and the first valid match that occurs is used. The resultant
-time struct is returned. If an error occurs, the value <<getdate_err>> is
-set to one of the following values.
-
- 1 the DATEMSK environment variable is null or undefined,
- 2 the template file cannot be opened for reading,
- 3 failed to get file status information,
- 4 the template file is not a regular file,
- 5 an error is encountered while reading the template file,
- 6 memory allication failed (not enough memory available),
- 7 there is no line in the template that matches the input,
- 8 invalid input specification
-
-The <<getdate_r>> routine is similar, except that it returns the error
-code and has the <[res]> time struct pointer passed in. <<getdate>> is
-non-reentrant. Applications that wish to be reentrant should use
-<<getdate_r>> instead of <<getdate>>.
-
-RETURNS
-<<getdate>> returns a pointer to the traditional time representation
-(<<struct tm>>). <<getdate_r>> returns 0 if successful, otherwise it
-returns the error code.
-
-PORTABILITY
-<<getdate>> is defined by the Single Unix specification.
-<<getdate_r>> is a reentrant extension.
-
-<<getdate>> and <<getdate_r>> optionally require <<stat>> and <<access>>.
-*/
-
-
-/* Modified for newlib by Jeff Johnston, June 19/2002 */
-
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-#include <sys/stat.h>
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 2
-# define STAT stat64
-#else
-# define STAT stat
-#endif
-
-#define TM_YEAR_BASE 1900
-
-extern ssize_t __getline (char **, size_t *, FILE *);
-
-/* Prototypes for local functions. */
-static int first_wday (int year, int mon, int wday);
-static int check_mday (int year, int mon, int mday);
-
-#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
-
-/* Error code is set to one of the following values to indicate an error.
- 1 the DATEMSK environment variable is null or undefined,
- 2 the template file cannot be opened for reading,
- 3 failed to get file status information,
- 4 the template file is not a regular file,
- 5 an error is encountered while reading the template file,
- 6 memory allication failed (not enough memory available),
- 7 there is no line in the template that matches the input,
- 8 invalid input specification Example: February 31 or a time is
- specified that can not be represented in a time_t (representing
- the time in seconds since 00:00:00 UTC, January 1, 1970) */
-
-/* Returns the first weekday WDAY of month MON in the year YEAR. */
-static int
-first_wday (int year, int mon, int wday)
-{
- struct tm tm;
-
- if (wday == INT_MIN)
- return 1;
-
- memset (&tm, 0, sizeof (struct tm));
- tm.tm_year = year;
- tm.tm_mon = mon;
- tm.tm_mday = 1;
- mktime (&tm);
-
- return (1 + (wday - tm.tm_wday + 7) % 7);
-}
-
-
-/* Returns 1 if MDAY is a valid day of the month in month MON of year
- YEAR, and 0 if it is not. */
-static int
-check_mday (int year, int mon, int mday)
-{
- switch (mon)
- {
- case 0:
- case 2:
- case 4:
- case 6:
- case 7:
- case 9:
- case 11:
- if (mday >= 1 && mday <= 31)
- return 1;
- break;
- case 3:
- case 5:
- case 8:
- case 10:
- if (mday >= 1 && mday <= 30)
- return 1;
- break;
- case 1:
- if (mday >= 1 && mday <= (isleap (year) ? 29 : 28))
- return 1;
- break;
- }
-
- return 0;
-}
-
-
-int
-getdate_r (const char *string, struct tm *tp)
-{
- FILE *fp;
- char *line;
- size_t len;
- char *datemsk;
- char *result = NULL;
- time_t timer;
- struct tm tm;
- struct STAT st;
- int mday_ok = 0;
-
- datemsk = getenv ("DATEMSK");
- if (datemsk == NULL || *datemsk == '\0')
- return 1;
-
- if (STAT (datemsk, &st) < 0)
- return 3;
-
- if (!S_ISREG (st.st_mode))
- return 4;
-
- if (access (datemsk, R_OK) < 0)
- return 2;
-
- /* Open the template file. */
- fp = fopen (datemsk, "r");
- if (fp == NULL)
- return 2;
-
- line = NULL;
- len = 0;
- do
- {
- ssize_t n;
-
- n = __getline (&line, &len, fp);
- if (n < 0)
- break;
- if (line[n - 1] == '\n')
- line[n - 1] = '\0';
-
- /* Do the conversion. */
- tp->tm_year = tp->tm_mon = tp->tm_mday = tp->tm_wday = INT_MIN;
- tp->tm_hour = tp->tm_sec = tp->tm_min = INT_MIN;
- tp->tm_isdst = -1;
- result = strptime (string, line, tp);
- if (result && *result == '\0')
- break;
- }
- while (!__sfeof (fp));
-
- /* Free the buffer. */
- free (line);
-
- /* Check for errors. */
- if (__sferror (fp))
- {
- fclose (fp);
- return 5;
- }
-
- /* Close template file. */
- fclose (fp);
-
- if (result == NULL || *result != '\0')
- return 7;
-
- /* Get current time. */
- time (&timer);
- localtime_r (&timer, &tm);
-
- /* If only the weekday is given, today is assumed if the given day
- is equal to the current day and next week if it is less. */
- if (tp->tm_wday >= 0 && tp->tm_wday <= 6 && tp->tm_year == INT_MIN
- && tp->tm_mon == INT_MIN && tp->tm_mday == INT_MIN)
- {
- tp->tm_year = tm.tm_year;
- tp->tm_mon = tm.tm_mon;
- tp->tm_mday = tm.tm_mday + (tp->tm_wday - tm.tm_wday + 7) % 7;
- mday_ok = 1;
- }
-
- /* If only the month is given, the current month is assumed if the
- given month is equal to the current month and next year if it is
- less and no year is given (the first day of month is assumed if
- no day is given. */
- if (tp->tm_mon >= 0 && tp->tm_mon <= 11 && tp->tm_mday == INT_MIN)
- {
- if (tp->tm_year == INT_MIN)
- tp->tm_year = tm.tm_year + (((tp->tm_mon - tm.tm_mon) < 0) ? 1 : 0);
- tp->tm_mday = first_wday (tp->tm_year, tp->tm_mon, tp->tm_wday);
- mday_ok = 1;
- }
-
- /* If no hour, minute and second are given the current hour, minute
- and second are assumed. */
- if (tp->tm_hour == INT_MIN && tp->tm_min == INT_MIN && tp->tm_sec == INT_MIN)
- {
- tp->tm_hour = tm.tm_hour;
- tp->tm_min = tm.tm_min;
- tp->tm_sec = tm.tm_sec;
- }
-
- /* If no date is given, today is assumed if the given hour is
- greater than the current hour and tomorrow is assumed if
- it is less. */
- if (tp->tm_hour >= 0 && tp->tm_hour <= 23
- && tp->tm_year == INT_MIN && tp->tm_mon == INT_MIN
- && tp->tm_mday == INT_MIN && tp->tm_wday == INT_MIN)
- {
- tp->tm_year = tm.tm_year;
- tp->tm_mon = tm.tm_mon;
- tp->tm_mday = tm.tm_mday + ((tp->tm_hour - tm.tm_hour) < 0 ? 1 : 0);
- mday_ok = 1;
- }
-
- /* Fill in the gaps. */
- if (tp->tm_year == INT_MIN)
- tp->tm_year = tm.tm_year;
- if (tp->tm_hour == INT_MIN)
- tp->tm_hour = 0;
- if (tp->tm_min == INT_MIN)
- tp->tm_min = 0;
- if (tp->tm_sec == INT_MIN)
- tp->tm_sec = 0;
-
- /* Check if the day of month is within range, and if the time can be
- represented in a time_t. We make use of the fact that the mktime
- call normalizes the struct tm. */
- if ((!mday_ok && !check_mday (TM_YEAR_BASE + tp->tm_year, tp->tm_mon,
- tp->tm_mday))
- || mktime (tp) == (time_t) -1)
- return 8;
-
- return 0;
-}
-
-#ifndef _REENT_ONLY
-struct tm *
-getdate (const char *string)
-{
- /* Buffer returned by getdate. */
- static struct tm tmbuf;
- int errval = getdate_r (string, &tmbuf);
-
- if (errval != 0)
- {
- getdate_err = errval;
- return NULL;
- }
-
- return &tmbuf;
-}
-#endif /* _REENT_ONLY */
diff --git a/newlib/libc/sys/linux/getdate_err.c b/newlib/libc/sys/linux/getdate_err.c
deleted file mode 100644
index e90b74b83..000000000
--- a/newlib/libc/sys/linux/getdate_err.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* The getdate_err variable is stored in the reentrancy structure. This
- function returns its address for use by the getdate_err macro defined in
- time.h. */
-
-#include <errno.h>
-#include <reent.h>
-
-#ifndef _REENT_ONLY
-
-int *
-__getdate_err ()
-{
- struct _reent *ptr = _REENT;
- _REENT_CHECK_MISC(ptr);
- return _REENT_GETDATE_ERR_P(ptr);
-}
-
-#endif
diff --git a/newlib/libc/sys/linux/gethostid.c b/newlib/libc/sys/linux/gethostid.c
deleted file mode 100644
index bf801c74a..000000000
--- a/newlib/libc/sys/linux/gethostid.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/* Copyright (C) 1995,1996,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <alloca.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <netdb.h>
-
-#define HOSTIDFILE "/etc/hostid"
-#define OLD_HOSTIDFILE "/etc/hostid"
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 2
-# define OPEN __open64
-#else
-# define OPEN __open
-#endif
-
-#ifdef SET_PROCEDURE
-int
-sethostid (id)
- long int id;
-{
- int fd;
- ssize_t written;
-
- /* Open file for writing. Everybody is allowed to read this file. */
- fd = OPEN (HOSTIDFILE, O_CREAT|O_WRONLY|O_TRUNC, 0644);
- if (fd < 0)
- return -1;
-
- written = __write (fd, &id, sizeof (id));
-
- __close (fd);
-
- return written != sizeof (id) ? -1 : 0;
-}
-
-#else
-# include <string.h>
-# include <sys/param.h>
-# include <netdb.h>
-# include <netinet/in.h>
-
-long int
-gethostid ()
-{
- char hostname[MAXHOSTNAMELEN + 1];
- size_t buflen;
- char *buffer;
- struct hostent hostbuf, *hp;
- unsigned long int id;
- struct in_addr in;
- int herr;
- int fd;
-
- /* First try to get the ID from a former invocation of sethostid. */
- fd = OPEN (HOSTIDFILE, O_RDONLY);
- if (fd >= 0)
- {
- ssize_t n = __read (fd, &id, sizeof (id));
-
- __close (fd);
-
- if (n == sizeof (id))
- return id;
- }
-
- /* Getting from the file was not successful. An intelligent guess for
- a unique number of a host is its IP address. Return this. */
- if (__gethostname (hostname, MAXHOSTNAMELEN) < 0 || hostname[0] == '\0')
- /* This also fails. Return and arbitrary value. */
- return 0;
-
- buflen = 1024;
- buffer = alloca (buflen);
-
- /* To get the IP address we need to know the host name. */
- while (__gethostbyname_r (hostname, &hostbuf, buffer, buflen, &hp, &herr)
- != 0
- || hp == NULL)
- if (herr != NETDB_INTERNAL || errno != ERANGE)
- return 0;
- else
- {
- /* Enlarge buffer. */
- buflen *= 2;
- buffer = alloca (buflen);
- }
-
- in.s_addr = 0;
- memcpy (&in, hp->h_addr,
- (int) sizeof (in) < hp->h_length ? sizeof (in) : hp->h_length);
-
- /* For the return value to be not exactly the IP address we do some
- bit fiddling. */
- return in.s_addr << 16 | in.s_addr >> 16;
-}
-#endif
diff --git a/newlib/libc/sys/linux/gethostname.c b/newlib/libc/sys/linux/gethostname.c
deleted file mode 100644
index ef526916f..000000000
--- a/newlib/libc/sys/linux/gethostname.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright 2002, Red Hat Inc. */
-
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/utsname.h>
-#include <machine/weakalias.h>
-
-int
-__gethostname (char *name, size_t len)
-{
- struct utsname nodebuf;
- size_t nodelen;
-
- if (uname (&nodebuf))
- return -1;
-
- nodelen = strlen (nodebuf.nodename) + 1;
- if (len < nodelen)
- memcpy (name, nodebuf.nodename, len);
- else
- memcpy (name, nodebuf.nodename, nodelen);
-
- if (nodelen > len)
- {
- errno = ENAMETOOLONG;
- return -1;
- }
- return 0;
-}
-weak_alias(__gethostname, gethostname)
diff --git a/newlib/libc/sys/linux/getlogin.c b/newlib/libc/sys/linux/getlogin.c
deleted file mode 100644
index 3931e7731..000000000
--- a/newlib/libc/sys/linux/getlogin.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* FIXME: dummy stub for now. */
-#include <errno.h>
-#include <unistd.h>
-
-char *
-_DEFUN_VOID (getlogin)
-{
- errno = ENOSYS;
- return NULL;
-}
-
diff --git a/newlib/libc/sys/linux/getopt.c b/newlib/libc/sys/linux/getopt.c
deleted file mode 100644
index cc035d641..000000000
--- a/newlib/libc/sys/linux/getopt.c
+++ /dev/null
@@ -1,1249 +0,0 @@
-/* Getopt for GNU.
- NOTE: getopt is now part of the C library, so if you don't know what
- "Keep this file name-space clean" means, talk to drepper@gnu.org
- before changing it!
- Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
- Ditto for AIX 3.2 and <stdlib.h>. */
-#ifndef _NO_PROTO
-# define _NO_PROTO
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if !defined __STDC__ || !__STDC__
-/* This is a separate conditional since some stdc systems
- reject `defined (const)'. */
-# ifndef const
-# define const
-# endif
-#endif
-
-#include <stdio.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-#define GETOPT_INTERFACE_VERSION 2
-#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
-# include <gnu-versions.h>
-# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
-# define ELIDE_CODE
-# endif
-#endif
-
-
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-/* Don't include stdlib.h for non-GNU C libraries because some of them
- contain conflicting prototypes for getopt. */
-# include <stdlib.h>
-# include <unistd.h>
-#endif /* GNU C library. */
-
-#ifdef VMS
-# include <unixlib.h>
-# if HAVE_STRING_H - 0
-# include <string.h>
-# endif
-#endif
-
-#ifndef _
-/* This is for other GNU distributions with internationalized messages. */
-# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
-# include <libintl.h>
-# ifndef _
-# define _(msgid) gettext (msgid)
-# endif
-# else
-# define _(msgid) (msgid)
-# endif
-# if defined _LIBC && defined USE_IN_LIBIO
-# include <wchar.h>
-# endif
-#endif
-
-/* This version of `getopt' appears to the caller like standard Unix `getopt'
- but it behaves differently for the user, since it allows the user
- to intersperse the options with the other arguments.
-
- As `getopt' works, it permutes the elements of ARGV so that,
- when it is done, all the options precede everything else. Thus
- all application programs are extended to handle flexible argument order.
-
- Setting the environment variable POSIXLY_CORRECT disables permutation.
- Then the behavior is completely standard.
-
- GNU application programs can use a third alternative mode in which
- they can distinguish the relative order of options and other arguments. */
-
-#include "getopt.h"
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns -1, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-/* 1003.2 says this must be 1 before any call. */
-int optind = 1;
-
-/* Formerly, initialization of getopt depended on optind==0, which
- causes problems with re-calling getopt as programs generally don't
- know that. */
-
-int __getopt_initialized;
-
-/* The next char to be scanned in the option-element
- in which the last option character we returned was found.
- This allows us to pick up the scan where we left off.
-
- If this is zero, or a null string, it means resume the scan
- by advancing to the next ARGV-element. */
-
-static char *nextchar;
-
-/* Callers store zero here to inhibit the error message
- for unrecognized options. */
-
-int opterr = 1;
-
-/* Set to an option character which was unrecognized.
- This must be initialized on some systems to avoid linking in the
- system's own getopt implementation. */
-
-int optopt = '?';
-
-/* Describe how to deal with options that follow non-option ARGV-elements.
-
- If the caller did not specify anything,
- the default is REQUIRE_ORDER if the environment variable
- POSIXLY_CORRECT is defined, PERMUTE otherwise.
-
- REQUIRE_ORDER means don't recognize them as options;
- stop option processing when the first non-option is seen.
- This is what Unix does.
- This mode of operation is selected by either setting the environment
- variable POSIXLY_CORRECT, or using `+' as the first character
- of the list of option characters.
-
- PERMUTE is the default. We permute the contents of ARGV as we scan,
- so that eventually all the non-options are at the end. This allows options
- to be given in any order, even with programs that were not written to
- expect this.
-
- RETURN_IN_ORDER is an option available to programs that were written
- to expect options and other ARGV-elements in any order and that care about
- the ordering of the two. We describe each non-option ARGV-element
- as if it were the argument of an option with character code 1.
- Using `-' as the first character of the list of option characters
- selects this mode of operation.
-
- The special argument `--' forces an end of option-scanning regardless
- of the value of `ordering'. In the case of RETURN_IN_ORDER, only
- `--' can cause `getopt' to return -1 with `optind' != ARGC. */
-
-static enum
-{
- REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
-} ordering;
-
-/* Value of POSIXLY_CORRECT environment variable. */
-static char *posixly_correct;
-
-#ifdef __GNU_LIBRARY__
-/* We want to avoid inclusion of string.h with non-GNU libraries
- because there are many ways it can cause trouble.
- On some systems, it contains special magic macros that don't work
- in GCC. */
-# include <string.h>
-# define my_index strchr
-#else
-
-# if HAVE_STRING_H
-# include <string.h>
-# else
-# include <strings.h>
-# endif
-
-/* Avoid depending on library functions or files
- whose names are inconsistent. */
-
-#ifndef getenv
-extern char *getenv ();
-#endif
-
-static char *
-my_index (str, chr)
- const char *str;
- int chr;
-{
- while (*str)
- {
- if (*str == chr)
- return (char *) str;
- str++;
- }
- return 0;
-}
-
-/* If using GCC, we can safely declare strlen this way.
- If not using GCC, it is ok not to declare it. */
-#ifdef __GNUC__
-/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
- That was relevant to code that was here before. */
-# if (!defined __STDC__ || !__STDC__) && !defined strlen
-/* gcc with -traditional declares the built-in strlen to return int,
- and has done so at least since version 2.4.5. -- rms. */
-extern int strlen (const char *);
-# endif /* not __STDC__ */
-#endif /* __GNUC__ */
-
-#endif /* not __GNU_LIBRARY__ */
-
-/* Handle permutation of arguments. */
-
-/* Describe the part of ARGV that contains non-options that have
- been skipped. `first_nonopt' is the index in ARGV of the first of them;
- `last_nonopt' is the index after the last of them. */
-
-static int first_nonopt;
-static int last_nonopt;
-
-#ifdef _LIBC
-/* Stored original parameters.
- XXX This is no good solution. We should rather copy the args so
- that we can compare them later. But we must not use malloc(3). */
-extern int __libc_argc;
-extern char **__libc_argv;
-
-/* Bash 2.0 gives us an environment variable containing flags
- indicating ARGV elements that should not be considered arguments. */
-
-# ifdef USE_NONOPTION_FLAGS
-/* Defined in getopt_init.c */
-extern char *__getopt_nonoption_flags;
-
-static int nonoption_flags_max_len;
-static int nonoption_flags_len;
-# endif
-
-# ifdef USE_NONOPTION_FLAGS
-# define SWAP_FLAGS(ch1, ch2) \
- if (nonoption_flags_len > 0) \
- { \
- char __tmp = __getopt_nonoption_flags[ch1]; \
- __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
- __getopt_nonoption_flags[ch2] = __tmp; \
- }
-# else
-# define SWAP_FLAGS(ch1, ch2)
-# endif
-#else /* !_LIBC */
-# define SWAP_FLAGS(ch1, ch2)
-#endif /* _LIBC */
-
-/* Exchange two adjacent subsequences of ARGV.
- One subsequence is elements [first_nonopt,last_nonopt)
- which contains all the non-options that have been skipped so far.
- The other is elements [last_nonopt,optind), which contains all
- the options processed since those non-options were skipped.
-
- `first_nonopt' and `last_nonopt' are relocated so that they describe
- the new indices of the non-options in ARGV after they are moved. */
-
-#if defined __STDC__ && __STDC__
-static void exchange (char **);
-#endif
-
-static void
-exchange (argv)
- char **argv;
-{
- int bottom = first_nonopt;
- int middle = last_nonopt;
- int top = optind;
- char *tem;
-
- /* Exchange the shorter segment with the far end of the longer segment.
- That puts the shorter segment into the right place.
- It leaves the longer segment in the right place overall,
- but it consists of two parts that need to be swapped next. */
-
-#if defined _LIBC && defined USE_NONOPTION_FLAGS
- /* First make sure the handling of the `__getopt_nonoption_flags'
- string can work normally. Our top argument must be in the range
- of the string. */
- if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
- {
- /* We must extend the array. The user plays games with us and
- presents new arguments. */
- char *new_str = malloc (top + 1);
- if (new_str == NULL)
- nonoption_flags_len = nonoption_flags_max_len = 0;
- else
- {
- memset (__mempcpy (new_str, __getopt_nonoption_flags,
- nonoption_flags_max_len),
- '\0', top + 1 - nonoption_flags_max_len);
- nonoption_flags_max_len = top + 1;
- __getopt_nonoption_flags = new_str;
- }
- }
-#endif
-
- while (top > middle && middle > bottom)
- {
- if (top - middle > middle - bottom)
- {
- /* Bottom segment is the short one. */
- int len = middle - bottom;
- register int i;
-
- /* Swap it with the top part of the top segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[top - (middle - bottom) + i];
- argv[top - (middle - bottom) + i] = tem;
- SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
- }
- /* Exclude the moved bottom segment from further swapping. */
- top -= len;
- }
- else
- {
- /* Top segment is the short one. */
- int len = top - middle;
- register int i;
-
- /* Swap it with the bottom part of the bottom segment. */
- for (i = 0; i < len; i++)
- {
- tem = argv[bottom + i];
- argv[bottom + i] = argv[middle + i];
- argv[middle + i] = tem;
- SWAP_FLAGS (bottom + i, middle + i);
- }
- /* Exclude the moved top segment from further swapping. */
- bottom += len;
- }
- }
-
- /* Update records for the slots the non-options now occupy. */
-
- first_nonopt += (optind - last_nonopt);
- last_nonopt = optind;
-}
-
-/* Initialize the internal data when the first call is made. */
-
-#if defined __STDC__ && __STDC__
-static const char *_getopt_initialize (int, char *const *, const char *);
-#endif
-static const char *
-_getopt_initialize (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
-{
- /* Start processing options with ARGV-element 1 (since ARGV-element 0
- is the program name); the sequence of previously skipped
- non-option ARGV-elements is empty. */
-
- first_nonopt = last_nonopt = optind;
-
- nextchar = NULL;
-
- posixly_correct = getenv ("POSIXLY_CORRECT");
-
- /* Determine how to handle the ordering of options and nonoptions. */
-
- if (optstring[0] == '-')
- {
- ordering = RETURN_IN_ORDER;
- ++optstring;
- }
- else if (optstring[0] == '+')
- {
- ordering = REQUIRE_ORDER;
- ++optstring;
- }
- else if (posixly_correct != NULL)
- ordering = REQUIRE_ORDER;
- else
- ordering = PERMUTE;
-
-#if defined _LIBC && defined USE_NONOPTION_FLAGS
- if (posixly_correct == NULL
- && argc == __libc_argc && argv == __libc_argv)
- {
- if (nonoption_flags_max_len == 0)
- {
- if (__getopt_nonoption_flags == NULL
- || __getopt_nonoption_flags[0] == '\0')
- nonoption_flags_max_len = -1;
- else
- {
- const char *orig_str = __getopt_nonoption_flags;
- int len = nonoption_flags_max_len = strlen (orig_str);
- if (nonoption_flags_max_len < argc)
- nonoption_flags_max_len = argc;
- __getopt_nonoption_flags =
- (char *) malloc (nonoption_flags_max_len);
- if (__getopt_nonoption_flags == NULL)
- nonoption_flags_max_len = -1;
- else
- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
- '\0', nonoption_flags_max_len - len);
- }
- }
- nonoption_flags_len = nonoption_flags_max_len;
- }
- else
- nonoption_flags_len = 0;
-#endif
-
- return optstring;
-}
-
-/* Scan elements of ARGV (whose length is ARGC) for option characters
- given in OPTSTRING.
-
- If an element of ARGV starts with '-', and is not exactly "-" or "--",
- then it is an option element. The characters of this element
- (aside from the initial '-') are option characters. If `getopt'
- is called repeatedly, it returns successively each of the option characters
- from each of the option elements.
-
- If `getopt' finds another option character, it returns that character,
- updating `optind' and `nextchar' so that the next call to `getopt' can
- resume the scan with the following option character or ARGV-element.
-
- If there are no more option characters, `getopt' returns -1.
- Then `optind' is the index in ARGV of the first ARGV-element
- that is not an option. (The ARGV-elements have been permuted
- so that those that are not options now come last.)
-
- OPTSTRING is a string containing the legitimate option characters.
- If an option character is seen that is not listed in OPTSTRING,
- return '?' after printing an error message. If you set `opterr' to
- zero, the error message is suppressed but we still return '?'.
-
- If a char in OPTSTRING is followed by a colon, that means it wants an arg,
- so the following text in the same ARGV-element, or the text of the following
- ARGV-element, is returned in `optarg'. Two colons mean an option that
- wants an optional arg; if there is text in the current ARGV-element,
- it is returned in `optarg', otherwise `optarg' is set to zero.
-
- If OPTSTRING starts with `-' or `+', it requests different methods of
- handling the non-option ARGV-elements.
- See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
-
- Long-named options begin with `--' instead of `-'.
- Their names may be abbreviated as long as the abbreviation is unique
- or is an exact match for some defined option. If they have an
- argument, it follows the option name in the same ARGV-element, separated
- from the option name by a `=', or else the in next ARGV-element.
- When `getopt' finds a long-named option, it returns 0 if that option's
- `flag' field is nonzero, the value of the option's `val' field
- if the `flag' field is zero.
-
- The elements of ARGV aren't really const, because we permute them.
- But we pretend they're const in the prototype to be compatible
- with other systems.
-
- LONGOPTS is a vector of `struct option' terminated by an
- element containing a name which is zero.
-
- LONGIND returns the index in LONGOPT of the long-named option found.
- It is only valid when a long-named option has been found by the most
- recent call.
-
- If LONG_ONLY is nonzero, '-' as well as '--' can introduce
- long-named options. */
-
-int
-_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
- int argc;
- char *const *argv;
- const char *optstring;
- const struct option *longopts;
- int *longind;
- int long_only;
-{
- int print_errors = opterr;
- if (optstring[0] == ':')
- print_errors = 0;
-
- if (argc < 1)
- return -1;
-
- optarg = NULL;
-
- if (optind == 0 || !__getopt_initialized)
- {
- if (optind == 0)
- optind = 1; /* Don't scan ARGV[0], the program name. */
- optstring = _getopt_initialize (argc, argv, optstring);
- __getopt_initialized = 1;
- }
-
- /* Test whether ARGV[optind] points to a non-option argument.
- Either it does not have option syntax, or there is an environment flag
- from the shell indicating it is not an option. The later information
- is only used when the used in the GNU libc. */
-#if defined _LIBC && defined USE_NONOPTION_FLAGS
-# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
- || (optind < nonoption_flags_len \
- && __getopt_nonoption_flags[optind] == '1'))
-#else
-# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
-#endif
-
- if (nextchar == NULL || *nextchar == '\0')
- {
- /* Advance to the next ARGV-element. */
-
- /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
- moved back by the user (who may also have changed the arguments). */
- if (last_nonopt > optind)
- last_nonopt = optind;
- if (first_nonopt > optind)
- first_nonopt = optind;
-
- if (ordering == PERMUTE)
- {
- /* If we have just processed some options following some non-options,
- exchange them so that the options come first. */
-
- if (first_nonopt != last_nonopt && last_nonopt != optind)
- exchange ((char **) argv);
- else if (last_nonopt != optind)
- first_nonopt = optind;
-
- /* Skip any additional non-options
- and extend the range of non-options previously skipped. */
-
- while (optind < argc && NONOPTION_P)
- optind++;
- last_nonopt = optind;
- }
-
- /* The special ARGV-element `--' means premature end of options.
- Skip it like a null option,
- then exchange with previous non-options as if it were an option,
- then skip everything else like a non-option. */
-
- if (optind != argc && !strcmp (argv[optind], "--"))
- {
- optind++;
-
- if (first_nonopt != last_nonopt && last_nonopt != optind)
- exchange ((char **) argv);
- else if (first_nonopt == last_nonopt)
- first_nonopt = optind;
- last_nonopt = argc;
-
- optind = argc;
- }
-
- /* If we have done all the ARGV-elements, stop the scan
- and back over any non-options that we skipped and permuted. */
-
- if (optind == argc)
- {
- /* Set the next-arg-index to point at the non-options
- that we previously skipped, so the caller will digest them. */
- if (first_nonopt != last_nonopt)
- optind = first_nonopt;
- return -1;
- }
-
- /* If we have come to a non-option and did not permute it,
- either stop the scan or describe it to the caller and pass it by. */
-
- if (NONOPTION_P)
- {
- if (ordering == REQUIRE_ORDER)
- return -1;
- optarg = argv[optind++];
- return 1;
- }
-
- /* We have found another option-ARGV-element.
- Skip the initial punctuation. */
-
- nextchar = (argv[optind] + 1
- + (longopts != NULL && argv[optind][1] == '-'));
- }
-
- /* Decode the current option-ARGV-element. */
-
- /* Check whether the ARGV-element is a long option.
-
- If long_only and the ARGV-element has the form "-f", where f is
- a valid short option, don't consider it an abbreviated form of
- a long option that starts with f. Otherwise there would be no
- way to give the -f short option.
-
- On the other hand, if there's a long option "fubar" and
- the ARGV-element is "-fu", do consider that an abbreviation of
- the long option, just like "--fu", and not "-f" with arg "u".
-
- This distinction seems to be the most useful approach. */
-
- if (longopts != NULL
- && (argv[optind][1] == '-'
- || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
- {
- char *nameend;
- const struct option *p;
- const struct option *pfound = NULL;
- int exact = 0;
- int ambig = 0;
- int indfound = -1;
- int option_index;
-
- for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
- /* Do nothing. */ ;
-
- /* Test all long options for either exact match
- or abbreviated matches. */
- for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, nextchar, nameend - nextchar))
- {
- if ((unsigned int) (nameend - nextchar)
- == (unsigned int) strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- indfound = option_index;
- exact = 1;
- break;
- }
- else if (pfound == NULL)
- {
- /* First nonexact match found. */
- pfound = p;
- indfound = option_index;
- }
- else if (long_only
- || pfound->has_arg != p->has_arg
- || pfound->flag != p->flag
- || pfound->val != p->val)
- /* Second or later nonexact match found. */
- ambig = 1;
- }
-
- if (ambig && !exact)
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- __asprintf (&buf, _("%s: option `%s' is ambiguous\n"),
- argv[0], argv[optind]);
-
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
-#else
- fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
- argv[0], argv[optind]);
-#endif
- }
- nextchar += strlen (nextchar);
- optind++;
- optopt = 0;
- return '?';
- }
-
- if (pfound != NULL)
- {
- option_index = indfound;
- optind++;
- if (*nameend)
- {
- /* Don't test has_arg with >, because some C compilers don't
- allow it to be used on enums. */
- if (pfound->has_arg)
- optarg = nameend + 1;
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-#endif
-
- if (argv[optind - 1][1] == '-')
- {
- /* --option */
-#if defined _LIBC && defined USE_IN_LIBIO
- __asprintf (&buf, _("\
-%s: option `--%s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-#else
- fprintf (stderr, _("\
-%s: option `--%s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-#endif
- }
- else
- {
- /* +option or -option */
-#if defined _LIBC && defined USE_IN_LIBIO
- __asprintf (&buf, _("\
-%s: option `%c%s' doesn't allow an argument\n"),
- argv[0], argv[optind - 1][0],
- pfound->name);
-#else
- fprintf (stderr, _("\
-%s: option `%c%s' doesn't allow an argument\n"),
- argv[0], argv[optind - 1][0], pfound->name);
-#endif
- }
-
-#if defined _LIBC && defined USE_IN_LIBIO
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
-#endif
- }
-
- nextchar += strlen (nextchar);
-
- optopt = pfound->val;
- return '?';
- }
- }
- else if (pfound->has_arg == 1)
- {
- if (optind < argc)
- optarg = argv[optind++];
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- __asprintf (&buf,
- _("%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]);
-
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
-#else
- fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]);
-#endif
- }
- nextchar += strlen (nextchar);
- optopt = pfound->val;
- return optstring[0] == ':' ? ':' : '?';
- }
- }
- nextchar += strlen (nextchar);
- if (longind != NULL)
- *longind = option_index;
- if (pfound->flag)
- {
- *(pfound->flag) = pfound->val;
- return 0;
- }
- return pfound->val;
- }
-
- /* Can't find it as a long option. If this is not getopt_long_only,
- or the option starts with '--' or is not a valid short
- option, then it's an error.
- Otherwise interpret it as a short option. */
- if (!long_only || argv[optind][1] == '-'
- || my_index (optstring, *nextchar) == NULL)
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-#endif
-
- if (argv[optind][1] == '-')
- {
- /* --option */
-#if defined _LIBC && defined USE_IN_LIBIO
- __asprintf (&buf, _("%s: unrecognized option `--%s'\n"),
- argv[0], nextchar);
-#else
- fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
- argv[0], nextchar);
-#endif
- }
- else
- {
- /* +option or -option */
-#if defined _LIBC && defined USE_IN_LIBIO
- __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"),
- argv[0], argv[optind][0], nextchar);
-#else
- fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
- argv[0], argv[optind][0], nextchar);
-#endif
- }
-
-#if defined _LIBC && defined USE_IN_LIBIO
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
-#endif
- }
- nextchar = (char *) "";
- optind++;
- optopt = 0;
- return '?';
- }
- }
-
- /* Look at and handle the next short option-character. */
-
- {
- char c = *nextchar++;
- char *temp = my_index (optstring, c);
-
- /* Increment `optind' when we start to process its last character. */
- if (*nextchar == '\0')
- ++optind;
-
- if (temp == NULL || c == ':')
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-#endif
-
- if (posixly_correct)
- {
- /* 1003.2 specifies the format of this message. */
-#if defined _LIBC && defined USE_IN_LIBIO
- __asprintf (&buf, _("%s: illegal option -- %c\n"),
- argv[0], c);
-#else
- fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
-#endif
- }
- else
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- __asprintf (&buf, _("%s: invalid option -- %c\n"),
- argv[0], c);
-#else
- fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
-#endif
- }
-
-#if defined _LIBC && defined USE_IN_LIBIO
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
-#endif
- }
- optopt = c;
- return '?';
- }
- /* Convenience. Treat POSIX -W foo same as long option --foo */
- if (temp[0] == 'W' && temp[1] == ';')
- {
- char *nameend;
- const struct option *p;
- const struct option *pfound = NULL;
- int exact = 0;
- int ambig = 0;
- int indfound = 0;
- int option_index;
-
- /* This is an option that requires an argument. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- /* If we end this ARGV-element by taking the rest as an arg,
- we must advance to the next element now. */
- optind++;
- }
- else if (optind == argc)
- {
- if (print_errors)
- {
- /* 1003.2 specifies the format of this message. */
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- __asprintf (&buf, _("%s: option requires an argument -- %c\n"),
- argv[0], c);
-
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
-#else
- fprintf (stderr, _("%s: option requires an argument -- %c\n"),
- argv[0], c);
-#endif
- }
- optopt = c;
- if (optstring[0] == ':')
- c = ':';
- else
- c = '?';
- return c;
- }
- else
- /* We already incremented `optind' once;
- increment it again when taking next ARGV-elt as argument. */
- optarg = argv[optind++];
-
- /* optarg is now the argument, see if it's in the
- table of longopts. */
-
- for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
- /* Do nothing. */ ;
-
- /* Test all long options for either exact match
- or abbreviated matches. */
- for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, nextchar, nameend - nextchar))
- {
- if ((unsigned int) (nameend - nextchar) == strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- indfound = option_index;
- exact = 1;
- break;
- }
- else if (pfound == NULL)
- {
- /* First nonexact match found. */
- pfound = p;
- indfound = option_index;
- }
- else
- /* Second or later nonexact match found. */
- ambig = 1;
- }
- if (ambig && !exact)
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- __asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"),
- argv[0], argv[optind]);
-
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
-#else
- fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
- argv[0], argv[optind]);
-#endif
- }
- nextchar += strlen (nextchar);
- optind++;
- return '?';
- }
- if (pfound != NULL)
- {
- option_index = indfound;
- if (*nameend)
- {
- /* Don't test has_arg with >, because some C compilers don't
- allow it to be used on enums. */
- if (pfound->has_arg)
- optarg = nameend + 1;
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- __asprintf (&buf, _("\
-%s: option `-W %s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
-#else
- fprintf (stderr, _("\
-%s: option `-W %s' doesn't allow an argument\n"),
- argv[0], pfound->name);
-#endif
- }
-
- nextchar += strlen (nextchar);
- return '?';
- }
- }
- else if (pfound->has_arg == 1)
- {
- if (optind < argc)
- optarg = argv[optind++];
- else
- {
- if (print_errors)
- {
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- __asprintf (&buf, _("\
-%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]);
-
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
-#else
- fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]);
-#endif
- }
- nextchar += strlen (nextchar);
- return optstring[0] == ':' ? ':' : '?';
- }
- }
- nextchar += strlen (nextchar);
- if (longind != NULL)
- *longind = option_index;
- if (pfound->flag)
- {
- *(pfound->flag) = pfound->val;
- return 0;
- }
- return pfound->val;
- }
- nextchar = NULL;
- return 'W'; /* Let the application handle it. */
- }
- if (temp[1] == ':')
- {
- if (temp[2] == ':')
- {
- /* This is an option that accepts an argument optionally. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- optind++;
- }
- else
- optarg = NULL;
- nextchar = NULL;
- }
- else
- {
- /* This is an option that requires an argument. */
- if (*nextchar != '\0')
- {
- optarg = nextchar;
- /* If we end this ARGV-element by taking the rest as an arg,
- we must advance to the next element now. */
- optind++;
- }
- else if (optind == argc)
- {
- if (print_errors)
- {
- /* 1003.2 specifies the format of this message. */
-#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
-
- __asprintf (&buf,
- _("%s: option requires an argument -- %c\n"),
- argv[0], c);
-
- if (_IO_fwide (stderr, 0) > 0)
- __fwprintf (stderr, L"%s", buf);
- else
- fputs (buf, stderr);
-
- free (buf);
-#else
- fprintf (stderr,
- _("%s: option requires an argument -- %c\n"),
- argv[0], c);
-#endif
- }
- optopt = c;
- if (optstring[0] == ':')
- c = ':';
- else
- c = '?';
- }
- else
- /* We already incremented `optind' once;
- increment it again when taking next ARGV-elt as argument. */
- optarg = argv[optind++];
- nextchar = NULL;
- }
- }
- return c;
- }
-}
-
-int
-getopt (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
-{
- return _getopt_internal (argc, argv, optstring,
- (const struct option *) 0,
- (int *) 0,
- 0);
-}
-
-
-#ifdef TEST
-
-/* Compile with -DTEST to make an executable for use in testing
- the above definition of `getopt'. */
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-{
- int c;
- int digit_optind = 0;
-
- while (1)
- {
- int this_option_optind = optind ? optind : 1;
-
- c = getopt (argc, argv, "abc:d:0123456789");
- if (c == -1)
- break;
-
- switch (c)
- {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value `%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
- }
-
- if (optind < argc)
- {
- printf ("non-option ARGV-elements: ");
- while (optind < argc)
- printf ("%s ", argv[optind++]);
- printf ("\n");
- }
-
- exit (0);
-}
-
-#endif /* TEST */
diff --git a/newlib/libc/sys/linux/getopt1.c b/newlib/libc/sys/linux/getopt1.c
deleted file mode 100644
index 2f149bcc4..000000000
--- a/newlib/libc/sys/linux/getopt1.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "getopt.h"
-
-#if !defined __STDC__ || !__STDC__
-/* This is a separate conditional since some stdc systems
- reject `defined (const)'. */
-#ifndef const
-#define const
-#endif
-#endif
-
-#include <stdio.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-#define GETOPT_INTERFACE_VERSION 2
-#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
-#include <gnu-versions.h>
-#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
-#define ELIDE_CODE
-#endif
-#endif
-
-
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-#include <stdlib.h>
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-int
-getopt_long (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
-{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
-}
-
-/* Like getopt_long, but '-' as well as '--' can indicate a long option.
- If an option that starts with '-' (not '--') doesn't match a long option,
- but does match a short option, it is parsed as a short option
- instead. */
-
-int
-getopt_long_only (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
-{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
-}
-
-
-
-#ifdef TEST
-
-#include <stdio.h>
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-{
- int c;
- int digit_optind = 0;
-
- while (1)
- {
- int this_option_optind = optind ? optind : 1;
- int option_index = 0;
- static struct option long_options[] =
- {
- {"add", 1, 0, 0},
- {"append", 0, 0, 0},
- {"delete", 1, 0, 0},
- {"verbose", 0, 0, 0},
- {"create", 0, 0, 0},
- {"file", 1, 0, 0},
- {0, 0, 0, 0}
- };
-
- c = getopt_long (argc, argv, "abc:d:0123456789",
- long_options, &option_index);
- if (c == -1)
- break;
-
- switch (c)
- {
- case 0:
- printf ("option %s", long_options[option_index].name);
- if (optarg)
- printf (" with arg %s", optarg);
- printf ("\n");
- break;
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (digit_optind != 0 && digit_optind != this_option_optind)
- printf ("digits occur in two different argv-elements.\n");
- digit_optind = this_option_optind;
- printf ("option %c\n", c);
- break;
-
- case 'a':
- printf ("option a\n");
- break;
-
- case 'b':
- printf ("option b\n");
- break;
-
- case 'c':
- printf ("option c with value `%s'\n", optarg);
- break;
-
- case 'd':
- printf ("option d with value `%s'\n", optarg);
- break;
-
- case '?':
- break;
-
- default:
- printf ("?? getopt returned character code 0%o ??\n", c);
- }
- }
-
- if (optind < argc)
- {
- printf ("non-option ARGV-elements: ");
- while (optind < argc)
- printf ("%s ", argv[optind++]);
- printf ("\n");
- }
-
- exit (0);
-}
-
-#endif /* TEST */
diff --git a/newlib/libc/sys/linux/getpwent.c b/newlib/libc/sys/linux/getpwent.c
deleted file mode 100644
index 9479021e3..000000000
--- a/newlib/libc/sys/linux/getpwent.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* FIXME: dummy stub for now. */
-#include <errno.h>
-#include <pwd.h>
-
-struct passwd *
-_DEFUN (getpwnam, (name),
- _CONST char *name)
-{
- errno = ENOSYS;
- return NULL;
-}
-
-/* FIXME: dummy stub for now. */
-struct passwd *
-_DEFUN (getpwuid, (uid),
- uid_t uid)
-{
- errno = ENOSYS;
- return NULL;
-}
-
-/* FIXME: dummy stub for now. */
-struct passwd *
-_DEFUN (getpwent, (uid),
- uid_t uid)
-{
- errno = ENOSYS;
- return NULL;
-}
-
diff --git a/newlib/libc/sys/linux/getreent.c b/newlib/libc/sys/linux/getreent.c
deleted file mode 100644
index 2d842073a..000000000
--- a/newlib/libc/sys/linux/getreent.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* default function used by _REENT when not using multithreading */
-
-#include <reent.h>
-#include <machine/weakalias.h>
-
-struct _reent *
-__libc_getreent (void)
-{
- return _impure_ptr;
-}
-weak_alias(__libc_getreent,__getreent)
-
diff --git a/newlib/libc/sys/linux/getrlimit64.c b/newlib/libc/sys/linux/getrlimit64.c
deleted file mode 100644
index dcd67cf56..000000000
--- a/newlib/libc/sys/linux/getrlimit64.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <sys/resource.h>
-#include <sys/types.h>
-
-/* Put the soft and hard limits for RESOURCE in *RLIMITS.
- Returns 0 if successful, -1 if not (and sets errno). */
-int
-getrlimit64 (enum __rlimit_resource resource, struct rlimit64 *rlimits)
-{
- struct rlimit rlimits32;
-
- if (__getrlimit (resource, &rlimits32) < 0)
- return -1;
-
- if (rlimits32.rlim_cur == RLIM_INFINITY)
- rlimits->rlim_cur = RLIM64_INFINITY;
- else
- rlimits->rlim_cur = rlimits32.rlim_cur;
- if (rlimits32.rlim_max == RLIM_INFINITY)
- rlimits->rlim_max = RLIM64_INFINITY;
- else
- rlimits->rlim_max = rlimits32.rlim_max;
-
- return 0;
-}
diff --git a/newlib/libc/sys/linux/getwd.c b/newlib/libc/sys/linux/getwd.c
deleted file mode 100644
index 72db33830..000000000
--- a/newlib/libc/sys/linux/getwd.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-
-char *
-getwd (char *buf)
-{
- char tmp[MAXPATHLEN];
-
- if (buf == NULL)
- {
- errno = EINVAL;
- return NULL;
- }
-
- if (getcwd (tmp, MAXPATHLEN) == NULL)
- return NULL;
-
- return strncpy (buf, tmp, MAXPATHLEN);
-}
diff --git a/newlib/libc/sys/linux/hp-timing.h b/newlib/libc/sys/linux/hp-timing.h
deleted file mode 100644
index 0507f444c..000000000
--- a/newlib/libc/sys/linux/hp-timing.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <machine/hp-timing.h>
diff --git a/newlib/libc/sys/linux/iconv/Makefile.am b/newlib/libc/sys/linux/iconv/Makefile.am
deleted file mode 100644
index 732644062..000000000
--- a/newlib/libc/sys/linux/iconv/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -DGCONV_DIR='"$(pkglibdir)"' -DGCONV_PATH='"$(pkglibdir)"' -I$(srcdir) -I$(srcdir)/.. $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = \
- iconv.h gconv.h \
- iconv_open.c iconv.c iconv_close.c \
- gconv_open.c gconv.c gconv_close.c \
- gconv_db.c gconv_dl.c gconv_conf.c gconv_builtin.c \
- gconv_simple.c gconv_trans.c gconv_cache.c
-
-libiconv_la_CFLAGS =
-libiconv_la_LDFLAGS = -Xcompiler -nostdlib
-
-if USE_LIBTOOL
-noinst_LTLIBRARIES = libiconv.la
-libiconv_la_SOURCES = $(LIB_SOURCES)
-noinst_DATA = objectlist.awk.in
-else
-noinst_LIBRARIES = lib.a
-lib_a_SOURCES = $(LIB_SOURCES)
-noinst_DATA =
-endif # USE_LIBTOOL
-
-include $(srcdir)/../../../../Makefile.shared
diff --git a/newlib/libc/sys/linux/iconv/Makefile.in b/newlib/libc/sys/linux/iconv/Makefile.in
deleted file mode 100644
index f29cbda31..000000000
--- a/newlib/libc/sys/linux/iconv/Makefile.in
+++ /dev/null
@@ -1,372 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-AWK = @AWK@
-CC = @CC@
-CPP = @CPP@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-EXEEXT = @EXEEXT@
-EXTRA_SUBDIRS = @EXTRA_SUBDIRS@
-EXTRA_SUBLIBS = @EXTRA_SUBLIBS@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBTOOL = @LIBTOOL@
-LINUX_MACH_LIB = @LINUX_MACH_LIB@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -DGCONV_DIR='"$(pkglibdir)"' -DGCONV_PATH='"$(pkglibdir)"' -I$(srcdir) -I$(srcdir)/.. $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = iconv.h gconv.h iconv_open.c iconv.c iconv_close.c gconv_open.c gconv.c gconv_close.c gconv_db.c gconv_dl.c gconv_conf.c gconv_builtin.c gconv_simple.c gconv_trans.c gconv_cache.c
-
-
-libiconv_la_CFLAGS =
-libiconv_la_LDFLAGS = -Xcompiler -nostdlib
-
-@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libiconv.la
-@USE_LIBTOOL_TRUE@libiconv_la_SOURCES = $(LIB_SOURCES)
-@USE_LIBTOOL_TRUE@noinst_DATA = objectlist.awk.in
-@USE_LIBTOOL_FALSE@noinst_DATA =
-@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
-@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-@USE_LIBTOOL_FALSE@lib_a_OBJECTS = iconv_open.$(OBJEXT) iconv.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@iconv_close.$(OBJEXT) gconv_open.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@gconv.$(OBJEXT) gconv_close.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@gconv_db.$(OBJEXT) gconv_dl.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@gconv_conf.$(OBJEXT) gconv_builtin.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@gconv_simple.$(OBJEXT) gconv_trans.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@gconv_cache.$(OBJEXT)
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-
-libiconv_la_LIBADD =
-@USE_LIBTOOL_TRUE@libiconv_la_OBJECTS = iconv_open.lo iconv.lo \
-@USE_LIBTOOL_TRUE@iconv_close.lo gconv_open.lo gconv.lo gconv_close.lo \
-@USE_LIBTOOL_TRUE@gconv_db.lo gconv_dl.lo gconv_conf.lo \
-@USE_LIBTOOL_TRUE@gconv_builtin.lo gconv_simple.lo gconv_trans.lo \
-@USE_LIBTOOL_TRUE@gconv_cache.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DATA = $(noinst_DATA)
-
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES) $(libiconv_la_SOURCES)
-OBJECTS = $(lib_a_OBJECTS) $(libiconv_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/../../../../Makefile.shared
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus iconv/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-mostlyclean-noinstLTLIBRARIES:
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-libiconv.la: $(libiconv_la_OBJECTS) $(libiconv_la_DEPENDENCIES)
- $(LINK) $(libiconv_la_LDFLAGS) $(libiconv_la_OBJECTS) $(libiconv_la_LIBADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = iconv
-
-distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-noinstLTLIBRARIES \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-libtool \
- clean-noinstLTLIBRARIES clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-libtool distclean-noinstLTLIBRARIES \
- distclean-tags distclean-generic clean-am
- -rm -f libtool
-
-distclean: distclean-am
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool mostlyclean-noinstLTLIBRARIES \
-distclean-noinstLTLIBRARIES clean-noinstLTLIBRARIES \
-maintainer-clean-noinstLTLIBRARIES tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-objectlist.awk.in: $(noinst_LTLIBRARIES)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
- do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
- done
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/linux/iconv/categories.def b/newlib/libc/sys/linux/iconv/categories.def
deleted file mode 100644
index 257fac73a..000000000
--- a/newlib/libc/sys/linux/iconv/categories.def
+++ /dev/null
@@ -1,344 +0,0 @@
-/* Definition of all available locale categories and their items. -*- C -*-
- Copyright (C) 1995-2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* These definitions are used by the locale-related files in the C library
- and the programs `localedef' and `locale'.
-
- The general format of the descriptions is like this:
-
- DEFINE_CATEGORY (ID, name, ( items ), setlocale-postload)
-
- where items itself is an array of entries in the form
-
- { ID, name, standard, value-type, min, max }
-
- The usage of the load, check, output functions depends on the individual
- program code which loads this file.
-
- The various value types for the items are `string', `stringarray', `byte'
- `bytearray', and `word'. These cover all possible values in the current
- locale definitions. `min' and `max' can be individually used again. */
-
-#ifndef NO_POSTLOAD
-#define NO_POSTLOAD NULL
-#endif
-
-DEFINE_CATEGORY
-(
- LC_COLLATE, "LC_COLLATE",
- (
- DEFINE_ELEMENT (_NL_COLLATE_NRULES, "collate-nrules", std, word)
- DEFINE_ELEMENT (_NL_COLLATE_RULESETS, "collate-rulesets", std, string)
- DEFINE_ELEMENT (_NL_COLLATE_TABLEMB, "collate-tablemb", std, wstring)
- DEFINE_ELEMENT (_NL_COLLATE_WEIGHTMB, "collate-weightmb", std, wstring)
- DEFINE_ELEMENT (_NL_COLLATE_EXTRAMB, "collate-extramb", std, wstring)
- DEFINE_ELEMENT (_NL_COLLATE_INDIRECTMB, "collate-indirectmb", std, wstring)
- DEFINE_ELEMENT (_NL_COLLATE_TABLEWC, "collate-tablewc", std, wstring)
- DEFINE_ELEMENT (_NL_COLLATE_WEIGHTWC, "collate-weightwc", std, wstring)
- DEFINE_ELEMENT (_NL_COLLATE_EXTRAWC, "collate-extrawc", std, wstring)
- DEFINE_ELEMENT (_NL_COLLATE_INDIRECTWC, "collate-indirectwc", std, wstring)
- DEFINE_ELEMENT (_NL_COLLATE_SYMB_HASH_SIZEMB, "collate-symb-hash-sizemb", std, word)
- DEFINE_ELEMENT (_NL_COLLATE_SYMB_TABLEMB, "collate-symb-tablemb", std, wstring)
- DEFINE_ELEMENT (_NL_COLLATE_SYMB_EXTRAMB, "collate-symb-extramb", std, wstring)
- DEFINE_ELEMENT (_NL_COLLATE_COLLSEQMB, "collate-collseqmb", std, wstring)
- DEFINE_ELEMENT (_NL_COLLATE_COLLSEQWC, "collate-collseqwc", std, wstring)
- DEFINE_ELEMENT (_NL_COLLATE_CODESET, "collate-codeset", std, string)
- ), NO_POSTLOAD)
-
-
-/* The actual definition of ctype is meaningless here. It is hard coded in
- the code because it has to be handled very specially. Only the names of
- the functions and the value types are important. */
-DEFINE_CATEGORY
-(
- LC_CTYPE, "LC_CTYPE",
- (
- DEFINE_ELEMENT (_NL_CTYPE_CLASS, "ctype-class", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_TOUPPER, "ctype-toupper", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_TOLOWER, "ctype-tolower", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_CLASS32, "ctype-class32", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_CLASS_NAMES, "ctype-class-names", std, stringlist, 10, 32)
- DEFINE_ELEMENT (_NL_CTYPE_MAP_NAMES, "ctype-map-names", std, stringlist, 2, 32)
- DEFINE_ELEMENT (_NL_CTYPE_WIDTH, "ctype-width", std, bytearray)
- DEFINE_ELEMENT (_NL_CTYPE_MB_CUR_MAX, "ctype-mb-cur-max", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_CODESET_NAME, "charmap", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_TOUPPER32, "ctype-toupper32", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_TOLOWER32, "ctype-tolower32", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_CLASS_OFFSET, "ctype-class-offset", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_MAP_OFFSET, "ctype-map-offset", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS_MB_LEN, "ctype-indigits_mb-len", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS0_MB, "ctype-indigits0_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS1_MB, "ctype-indigits1_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS2_MB, "ctype-indigits2_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS3_MB, "ctype-indigits3_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS4_MB, "ctype-indigits4_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS5_MB, "ctype-indigits5_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS6_MB, "ctype-indigits6_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS7_MB, "ctype-indigits7_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS8_MB, "ctype-indigits8_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS9_MB, "ctype-indigits9_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS_WC_LEN, "ctype-indigits_wc-len", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS0_WC, "ctype-indigits0_wc", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS1_WC, "ctype-indigits1_wc", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS2_WC, "ctype-indigits2_wc", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS3_WC, "ctype-indigits3_wc", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS4_WC, "ctype-indigits4_wc", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS5_WC, "ctype-indigits5_wc", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS6_WC, "ctype-indigits6_wc", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS7_WC, "ctype-indigits7_wc", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS8_WC, "ctype-indigits8_wc", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_INDIGITS9_WC, "ctype-indigits9_wc", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT0_MB, "ctype-outdigit0_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT1_MB, "ctype-outdigit1_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT2_MB, "ctype-outdigit2_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT3_MB, "ctype-outdigit3_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT4_MB, "ctype-outdigit4_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT5_MB, "ctype-outdigit5_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT6_MB, "ctype-outdigit6_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT7_MB, "ctype-outdigit7_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT8_MB, "ctype-outdigit8_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT9_MB, "ctype-outdigit9_mb", std, string)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT0_WC, "ctype-outdigit0_wc", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT1_WC, "ctype-outdigit1_wc", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT2_WC, "ctype-outdigit2_wc", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT3_WC, "ctype-outdigit3_wc", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT4_WC, "ctype-outdigit4_wc", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT5_WC, "ctype-outdigit5_wc", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT6_WC, "ctype-outdigit6_wc", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT7_WC, "ctype-outdigit7_wc", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT8_WC, "ctype-outdigit8_wc", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_OUTDIGIT9_WC, "ctype-outdigit9_wc", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_TAB_SIZE, "ctype-translit-tab-size", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_FROM_IDX, "ctype-translit-from-idx", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_FROM_TBL, "ctype-translit-from-tbl", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_TO_IDX, "ctype-translit-to-idx", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_TO_TBL, "ctype-translit-to-tbl", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN, "ctype-translit-default-missing-len", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_DEFAULT_MISSING, "ctype-translit-default-missing", std, wstring)
- DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_IGNORE_LEN, "ctype-translit-ignore-len", std, word)
- DEFINE_ELEMENT (_NL_CTYPE_TRANSLIT_IGNORE, "ctype-translit-ignore", std, string)
- ), _nl_postload_ctype)
-
-
-DEFINE_CATEGORY
-(
- LC_MONETARY, "LC_MONETARY",
- (
- DEFINE_ELEMENT (INT_CURR_SYMBOL, "int_curr_symbol", std, string)
- DEFINE_ELEMENT (CURRENCY_SYMBOL, "currency_symbol", std, string)
- DEFINE_ELEMENT (MON_DECIMAL_POINT, "mon_decimal_point", std, string)
- DEFINE_ELEMENT (MON_THOUSANDS_SEP, "mon_thousands_sep", std, string)
- DEFINE_ELEMENT (MON_GROUPING, "mon_grouping", std, bytearray)
- DEFINE_ELEMENT (POSITIVE_SIGN, "positive_sign", std, string)
- DEFINE_ELEMENT (NEGATIVE_SIGN, "negative_sign", std, string)
- DEFINE_ELEMENT (INT_FRAC_DIGITS, "int_frac_digits", std, byte)
- DEFINE_ELEMENT (FRAC_DIGITS, "frac_digits", std, byte)
- DEFINE_ELEMENT (P_CS_PRECEDES, "p_cs_precedes", std, byte, 0, 1)
- DEFINE_ELEMENT (P_SEP_BY_SPACE, "p_sep_by_space", std, byte, 0, 2)
- DEFINE_ELEMENT (N_CS_PRECEDES, "n_cs_precedes", std, byte, 0, 1)
- DEFINE_ELEMENT (N_SEP_BY_SPACE, "n_sep_by_space", std, byte, 0, 2)
- DEFINE_ELEMENT (P_SIGN_POSN, "p_sign_posn", std, byte, 0, 4)
- DEFINE_ELEMENT (N_SIGN_POSN, "n_sign_posn", std, byte, 0, 4)
- DEFINE_ELEMENT (__INT_P_CS_PRECEDES, "int_p_cs_precedes", std, byte, 0, 1)
- DEFINE_ELEMENT (__INT_P_SEP_BY_SPACE, "int_p_sep_by_space", std, byte, 0, 2)
- DEFINE_ELEMENT (__INT_N_CS_PRECEDES, "int_n_cs_precedes", std, byte, 0, 1)
- DEFINE_ELEMENT (__INT_N_SEP_BY_SPACE, "int_n_sep_by_space", std, byte, 0, 2)
- DEFINE_ELEMENT (__INT_P_SIGN_POSN, "int_p_sign_posn", std, byte, 0, 4)
- DEFINE_ELEMENT (__INT_N_SIGN_POSN, "int_n_sign_posn", std, byte, 0, 4)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_CURR_SYMBOL, "duo_int_curr_symbol", std, string)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_CURRENCY_SYMBOL, "duo_currency_symbol", std, string)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_FRAC_DIGITS, "duo_int_frac_digits", std, byte)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_FRAC_DIGITS, "duo_frac_digits", std, byte)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_P_CS_PRECEDES, "duo_p_cs_precedes", std, byte, 0, 1)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_P_SEP_BY_SPACE, "duo_p_sep_by_space", std, byte, 0, 2)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_N_CS_PRECEDES, "duo_n_cs_precedes", std, byte, 0, 1)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_N_SEP_BY_SPACE, "duo_n_sep_by_space", std, byte, 0, 2)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_P_CS_PRECEDES, "duo_int_p_cs_precedes", std, byte, 0, 1)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_P_SEP_BY_SPACE, "duo_int_p_sep_by_space", std, byte, 0, 2)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_N_CS_PRECEDES, "duo_int_n_cs_precedes", std, byte, 0, 1)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_N_SEP_BY_SPACE, "duo_int_n_sep_by_space", std, byte, 0, 2)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_P_SIGN_POSN, "duo_p_sign_posn", std, byte, 0, 4)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_N_SIGN_POSN, "duo_n_sign_posn", std, byte, 0, 4)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_P_SIGN_POSN, "duo_int_p_sign_posn", std, byte, 0, 4)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_INT_N_SIGN_POSN, "duo_int_n_sign_posn", std, byte, 0, 4)
- DEFINE_ELEMENT (_NL_MONETARY_UNO_VALID_FROM, "uno_valid_from", std, word)
- DEFINE_ELEMENT (_NL_MONETARY_UNO_VALID_TO, "uno_valid_to", std, word)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_VALID_FROM, "duo_valid_from", std, word)
- DEFINE_ELEMENT (_NL_MONETARY_DUO_VALID_TO, "duo_valid_to", std, word)
- DEFINE_ELEMENT (_NL_MONETARY_CONVERSION_RATE, "conversion_rate", std, wordarray, 2, 2)
- DEFINE_ELEMENT (_NL_MONETARY_DECIMAL_POINT_WC, "monetary-decimal-point-wc", std, word)
- DEFINE_ELEMENT (_NL_MONETARY_THOUSANDS_SEP_WC, "monetary-thousands-sep-wc", std, word)
- DEFINE_ELEMENT (_NL_MONETARY_CODESET, "monetary-codeset", std, string)
- ), NO_POSTLOAD)
-
-
-DEFINE_CATEGORY
-(
- LC_NUMERIC, "LC_NUMERIC",
- (
- DEFINE_ELEMENT (DECIMAL_POINT, "decimal_point", std, string)
- DEFINE_ELEMENT (THOUSANDS_SEP, "thousands_sep", std, string)
- DEFINE_ELEMENT (GROUPING, "grouping", std, bytearray)
- DEFINE_ELEMENT (_NL_NUMERIC_DECIMAL_POINT_WC, "numeric-decimal-point-wc", std, word)
- DEFINE_ELEMENT (_NL_NUMERIC_THOUSANDS_SEP_WC, "numeric-thousands-sep-wc", std, word)
- DEFINE_ELEMENT (_NL_NUMERIC_CODESET, "numeric-codeset", std, string)
-
- ), NO_POSTLOAD)
-
-
-DEFINE_CATEGORY
-(
- LC_TIME, "LC_TIME",
- (
- DEFINE_ELEMENT (ABDAY_1, "abday", std, stringarray, 7, 7)
- DEFINE_ELEMENT (DAY_1, "day", std, stringarray, 7, 7)
- DEFINE_ELEMENT (ABMON_1, "abmon", std, stringarray, 12, 12)
- DEFINE_ELEMENT (MON_1, "mon", std, stringarray, 12, 12)
- DEFINE_ELEMENT (AM_STR, "am_pm", std, stringarray, 2, 2)
- DEFINE_ELEMENT (D_T_FMT, "d_t_fmt", std, string)
- DEFINE_ELEMENT (D_FMT, "d_fmt", std, string)
- DEFINE_ELEMENT (T_FMT, "t_fmt", std, string)
- DEFINE_ELEMENT (T_FMT_AMPM, "t_fmt_ampm", std, string)
- DEFINE_ELEMENT (ERA, "era", opt, stringlist, 0, 100)
- DEFINE_ELEMENT (ERA_YEAR, "era_year", opt, string)
- DEFINE_ELEMENT (ERA_D_FMT, "era_d_fmt", opt, string)
- DEFINE_ELEMENT (ALT_DIGITS, "alt_digits", opt, stringlist, 100, 100)
- DEFINE_ELEMENT (ERA_D_T_FMT, "era_d_t_fmt", opt, string)
- DEFINE_ELEMENT (ERA_T_FMT, "era_t_fmt", opt, string)
- DEFINE_ELEMENT (_NL_TIME_ERA_NUM_ENTRIES, "time-era-num-entries", opt, word)
- DEFINE_ELEMENT (_NL_TIME_ERA_ENTRIES, "time-era-entries", opt, string)
- DEFINE_ELEMENT (_NL_WABDAY_1, "wide-abday", std, wstringarray, 7, 7)
- DEFINE_ELEMENT (_NL_WDAY_1, "wide-day", std, wstringarray, 7, 7)
- DEFINE_ELEMENT (_NL_WABMON_1, "wide-abmon", std, wstringarray, 12, 12)
- DEFINE_ELEMENT (_NL_WMON_1, "wide-mon", std, wstringarray, 12, 12)
- DEFINE_ELEMENT (_NL_WAM_STR, "wide-am_pm", std, wstringarray, 2, 2)
- DEFINE_ELEMENT (_NL_WD_T_FMT, "wide-d_t_fmt", std, wstring)
- DEFINE_ELEMENT (_NL_WD_FMT, "wide-d_fmt", std, wstring)
- DEFINE_ELEMENT (_NL_WT_FMT, "wide-t_fmt", std, wstring)
- DEFINE_ELEMENT (_NL_WT_FMT_AMPM, "wide-t_fmt_ampm", std, wstring)
- DEFINE_ELEMENT (_NL_WERA_YEAR, "wide-era_year", opt, wstring)
- DEFINE_ELEMENT (_NL_WERA_D_FMT, "wide-era_d_fmt", opt, wstring)
- DEFINE_ELEMENT (_NL_WALT_DIGITS, "wide-alt_digits", opt, wstringlist, 1000, 100)
- DEFINE_ELEMENT (_NL_WERA_D_T_FMT, "wide-era_d_t_fmt", opt, wstring)
- DEFINE_ELEMENT (_NL_WERA_T_FMT, "wide-era_t_fmt", opt, wstring)
- DEFINE_ELEMENT (_NL_TIME_WEEK_NDAYS, "week-ndays", std, byte)
- DEFINE_ELEMENT (_NL_TIME_WEEK_1STDAY, "week-1stday", std, word)
- DEFINE_ELEMENT (_NL_TIME_WEEK_1STWEEK, "week-1stweek", std, byte)
- DEFINE_ELEMENT (_NL_TIME_FIRST_WEEKDAY, "first_weekday", std, byte)
- DEFINE_ELEMENT (_NL_TIME_FIRST_WORKDAY, "first_workday", std, byte)
- DEFINE_ELEMENT (_NL_TIME_CAL_DIRECTION, "cal_direction", std, byte)
- DEFINE_ELEMENT (_NL_TIME_TIMEZONE, "timezone", std, string)
- DEFINE_ELEMENT (_DATE_FMT, "date_fmt", opt, string)
- DEFINE_ELEMENT (_NL_W_DATE_FMT, "wide-date_fmt", opt, wstring)
- DEFINE_ELEMENT (_NL_TIME_CODESET, "time-codeset", std, string)
- ), _nl_postload_time)
-
-
-DEFINE_CATEGORY
-(
- LC_MESSAGES, "LC_MESSAGES",
- (
- DEFINE_ELEMENT (YESEXPR, "yesexpr", std, string)
- DEFINE_ELEMENT (NOEXPR, "noexpr", std, string)
- DEFINE_ELEMENT (YESSTR, "yesstr", opt, string)
- DEFINE_ELEMENT (NOSTR, "nostr", opt, string)
- DEFINE_ELEMENT (_NL_MESSAGES_CODESET, "messages-codeset", std, string)
- ), NO_POSTLOAD)
-
-DEFINE_CATEGORY
-(
- LC_PAPER, "LC_PAPER",
- (
- DEFINE_ELEMENT (_NL_PAPER_HEIGHT, "height", std, word)
- DEFINE_ELEMENT (_NL_PAPER_WIDTH, "width", std, word)
- DEFINE_ELEMENT (_NL_PAPER_CODESET, "paper-codeset", std, string)
- ), NO_POSTLOAD)
-
-DEFINE_CATEGORY
-(
- LC_NAME, "LC_NAME",
- (
- DEFINE_ELEMENT (_NL_NAME_NAME_FMT, "name_fmt", std, string)
- DEFINE_ELEMENT (_NL_NAME_NAME_GEN, "name_gen", std, string)
- DEFINE_ELEMENT (_NL_NAME_NAME_MR, "name_mr", std, string)
- DEFINE_ELEMENT (_NL_NAME_NAME_MRS, "name_mrs", std, string)
- DEFINE_ELEMENT (_NL_NAME_NAME_MISS, "name_miss", std, string)
- DEFINE_ELEMENT (_NL_NAME_NAME_MS, "name_ms", std, string)
- DEFINE_ELEMENT (_NL_NAME_CODESET, "name-codeset", std, string)
- ), NO_POSTLOAD)
-
-DEFINE_CATEGORY
-(
- LC_ADDRESS, "LC_ADDRESS",
- (
- DEFINE_ELEMENT (_NL_ADDRESS_POSTAL_FMT, "postal_fmt", std, string)
- DEFINE_ELEMENT (_NL_ADDRESS_COUNTRY_NAME, "country_name", std, string)
- DEFINE_ELEMENT (_NL_ADDRESS_COUNTRY_POST, "country_post", std, string)
- DEFINE_ELEMENT (_NL_ADDRESS_COUNTRY_AB2, "country_ab2", std, string)
- DEFINE_ELEMENT (_NL_ADDRESS_COUNTRY_AB3, "country_ab3", std, string)
- DEFINE_ELEMENT (_NL_ADDRESS_COUNTRY_CAR, "country_car", std, string)
- DEFINE_ELEMENT (_NL_ADDRESS_COUNTRY_NUM, "country_num", std, word)
- DEFINE_ELEMENT (_NL_ADDRESS_COUNTRY_ISBN, "country_isbn", std, string)
- DEFINE_ELEMENT (_NL_ADDRESS_LANG_NAME, "lang_name", std, string)
- DEFINE_ELEMENT (_NL_ADDRESS_LANG_AB, "lang_ab", std, string)
- DEFINE_ELEMENT (_NL_ADDRESS_LANG_TERM, "lang_term", std, string)
- DEFINE_ELEMENT (_NL_ADDRESS_LANG_LIB, "lang_lib", std, string)
- DEFINE_ELEMENT (_NL_ADDRESS_CODESET, "address-codeset", std, string)
- ), NO_POSTLOAD)
-
-DEFINE_CATEGORY
-(
- LC_TELEPHONE, "LC_TELEPHONE",
- (
- DEFINE_ELEMENT (_NL_TELEPHONE_TEL_INT_FMT, "tel_int_fmt", std, string)
- DEFINE_ELEMENT (_NL_TELEPHONE_TEL_DOM_FMT, "tel_dom_fmt", std, string)
- DEFINE_ELEMENT (_NL_TELEPHONE_INT_SELECT, "int_select", std, string)
- DEFINE_ELEMENT (_NL_TELEPHONE_INT_PREFIX, "int_prefix", std, string)
- DEFINE_ELEMENT (_NL_TELEPHONE_CODESET, "telephone-codeset", std, string)
- ), NO_POSTLOAD)
-
-DEFINE_CATEGORY
-(
- LC_MEASUREMENT, "LC_MEASUREMENT",
- (
- DEFINE_ELEMENT (_NL_MEASUREMENT_MEASUREMENT, "measurement", std, byte)
- DEFINE_ELEMENT (_NL_MEASUREMENT_CODESET, "measurement-codeset", std, string)
- ), NO_POSTLOAD)
-
-DEFINE_CATEGORY
-(
- LC_IDENTIFICATION, "LC_IDENTIFICATION",
- (
- DEFINE_ELEMENT (_NL_IDENTIFICATION_TITLE, "title", std, string)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_SOURCE, "source", std, string)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_ADDRESS, "address", std, string)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_CONTACT, "contact", std, string)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_EMAIL, "email", std, string)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_TEL, "tel", std, string)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_FAX, "fax", std, string)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_LANGUAGE, "language", std, string)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_TERRITORY, "territory", std, string)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_AUDIENCE, "audience", std, string)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_APPLICATION, "applcation", std, string)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_ABBREVIATION, "abbreviation", std, string)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_REVISION, "revision", std, string)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_DATE, "date", std, string)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_CATEGORY, "category", std, stringarray, 13, 13)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_CODESET, "identification-codeset", std, string)
- ), NO_POSTLOAD)
diff --git a/newlib/libc/sys/linux/iconv/dummy-repertoire.c b/newlib/libc/sys/linux/iconv/dummy-repertoire.c
deleted file mode 100644
index a195460f9..000000000
--- a/newlib/libc/sys/linux/iconv/dummy-repertoire.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* For iconv we don't have to handle repertoire maps. Provide dummy
- definitions to allow the use of linereader.c unchanged. */
-#include <repertoire.h>
-
-
-uint32_t
-repertoire_find_value (const struct repertoire_t *repertoire, const char *name,
- size_t len)
-{
- return ILLEGAL_CHAR_VALUE;
-}
-
-
-const char *
-repertoire_find_symbol (const struct repertoire_t *repertoire, uint32_t ucs)
-{
- return NULL;
-}
diff --git a/newlib/libc/sys/linux/iconv/gconv.c b/newlib/libc/sys/linux/iconv/gconv.c
deleted file mode 100644
index b413e26c5..000000000
--- a/newlib/libc/sys/linux/iconv/gconv.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Convert characters in input buffer using conversion descriptor to
- output buffer.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <assert.h>
-#include <gconv_int.h>
-#include <sys/param.h>
-#include <dlfcn.h>
-#include <stddef.h>
-
-int
-internal_function
-__gconv (__gconv_t cd, const unsigned char **inbuf,
- const unsigned char *inbufend, unsigned char **outbuf,
- unsigned char *outbufend, size_t *irreversible)
-{
- size_t last_step;
- int result;
-
- if (cd == (__gconv_t) -1L)
- return __GCONV_ILLEGAL_DESCRIPTOR;
-
- last_step = cd->__nsteps - 1;
-
- assert (irreversible != NULL);
- *irreversible = 0;
-
- cd->__data[last_step].__outbuf = outbuf != NULL ? *outbuf : NULL;
- cd->__data[last_step].__outbufend = outbufend;
-
- if (inbuf == NULL || *inbuf == NULL)
- /* We just flush. */
- result = cd->__steps->__fct (cd->__steps, cd->__data, NULL, NULL, NULL,
- irreversible,
- cd->__data[last_step].__outbuf == NULL ? 2 : 1, 0);
- else
- {
- const unsigned char *last_start;
-
- assert (outbuf != NULL && *outbuf != NULL);
-
- do
- {
- last_start = *inbuf;
- result = cd->__steps->__fct (cd->__steps, cd->__data, inbuf, inbufend,
- NULL, irreversible, 0, 0);
- }
- while (result == __GCONV_EMPTY_INPUT && last_start != *inbuf
- && *inbuf + cd->__steps->__min_needed_from <= inbufend);
- }
-
- if (outbuf != NULL && *outbuf != NULL)
- *outbuf = cd->__data[last_step].__outbuf;
-
- return result;
-}
diff --git a/newlib/libc/sys/linux/iconv/gconv_builtin.c b/newlib/libc/sys/linux/iconv/gconv_builtin.c
deleted file mode 100644
index 45bd4e7e0..000000000
--- a/newlib/libc/sys/linux/iconv/gconv_builtin.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Table for builtin transformation mapping.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <endian.h>
-#include <limits.h>
-#include <string.h>
-
-#include <gconv_int.h>
-
-#include <assert.h>
-
-
-static struct builtin_map
-{
- const char *name;
- __gconv_fct fct;
-
- int min_needed_from;
- int max_needed_from;
- int min_needed_to;
- int max_needed_to;
-
-} map[] =
-{
-#define BUILTIN_TRANSFORMATION(From, To, Cost, Name, Fct, MinF, MaxF, \
- MinT, MaxT) \
- { \
- .name = Name, \
- .fct = Fct, \
- \
- .min_needed_from = MinF, \
- .max_needed_from = MaxF, \
- .min_needed_to = MinT, \
- .max_needed_to = MaxT \
- },
-#define BUILTIN_ALIAS(From, To)
-
-#include <gconv_builtin.h>
-};
-
-
-void
-internal_function
-__gconv_get_builtin_trans (const char *name, struct __gconv_step *step)
-{
- size_t cnt;
-
- for (cnt = 0; cnt < sizeof (map) / sizeof (map[0]); ++cnt)
- if (strcmp (name, map[cnt].name) == 0)
- break;
-
- assert (cnt < sizeof (map) / sizeof (map[0]));
-
- step->__fct = map[cnt].fct;
- step->__init_fct = NULL;
- step->__end_fct = NULL;
- step->__shlib_handle = NULL;
- step->__modname = NULL;
-
- step->__min_needed_from = map[cnt].min_needed_from;
- step->__max_needed_from = map[cnt].max_needed_from;
- step->__min_needed_to = map[cnt].min_needed_to;
- step->__max_needed_to = map[cnt].max_needed_to;
-
- /* None of the builtin converters handles stateful encoding. */
- step->__stateful = 0;
-}
diff --git a/newlib/libc/sys/linux/iconv/gconv_builtin.h b/newlib/libc/sys/linux/iconv/gconv_builtin.h
deleted file mode 100644
index 1a9d8a80f..000000000
--- a/newlib/libc/sys/linux/iconv/gconv_builtin.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Builtin transformations.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-BUILTIN_ALIAS ("UCS4//", "ISO-10646/UCS4/")
-BUILTIN_ALIAS ("UCS-4//", "ISO-10646/UCS4/")
-BUILTIN_ALIAS ("UCS-4BE//", "ISO-10646/UCS4/")
-BUILTIN_ALIAS ("CSUCS4//", "ISO-10646/UCS4/")
-BUILTIN_ALIAS ("ISO-10646//", "ISO-10646/UCS4/")
-BUILTIN_ALIAS ("10646-1:1993//", "ISO-10646/UCS4/")
-BUILTIN_ALIAS ("10646-1:1993/UCS4/", "ISO-10646/UCS4/")
-BUILTIN_ALIAS ("OSF00010104//", "ISO-10646/UCS4/") /* level 1 */
-BUILTIN_ALIAS ("OSF00010105//", "ISO-10646/UCS4/") /* level 2 */
-BUILTIN_ALIAS ("OSF00010106//", "ISO-10646/UCS4/") /* level 3 */
-
-BUILTIN_TRANSFORMATION ("INTERNAL", "ISO-10646/UCS4/", 1, "=INTERNAL->ucs4",
- __gconv_transform_internal_ucs4, 4, 4, 4, 4)
-BUILTIN_TRANSFORMATION ("ISO-10646/UCS4/", "INTERNAL", 1, "=ucs4->INTERNAL",
- __gconv_transform_ucs4_internal, 4, 4, 4, 4)
-
-BUILTIN_TRANSFORMATION ("INTERNAL", "UCS-4LE//", 1, "=INTERNAL->ucs4le",
- __gconv_transform_internal_ucs4le, 4, 4, 4, 4)
-BUILTIN_TRANSFORMATION ("UCS-4LE//", "INTERNAL", 1, "=ucs4le->INTERNAL",
- __gconv_transform_ucs4le_internal, 4, 4, 4, 4)
-
-BUILTIN_ALIAS ("WCHAR_T//", "INTERNAL")
-
-BUILTIN_ALIAS ("UTF8//", "ISO-10646/UTF8/")
-BUILTIN_ALIAS ("UTF-8//", "ISO-10646/UTF8/")
-BUILTIN_ALIAS ("ISO-IR-193//", "ISO-10646/UTF8/")
-BUILTIN_ALIAS ("OSF05010001//", "ISO-10646/UTF8/")
-BUILTIN_ALIAS ("ISO-10646/UTF-8/", "ISO-10646/UTF8/")
-
-BUILTIN_TRANSFORMATION ("INTERNAL", "ISO-10646/UTF8/", 1, "=INTERNAL->utf8",
- __gconv_transform_internal_utf8, 4, 4, 1, 6)
-
-BUILTIN_TRANSFORMATION ("ISO-10646/UTF8/", "INTERNAL", 1, "=utf8->INTERNAL",
- __gconv_transform_utf8_internal, 1, 6, 4, 4)
-
-BUILTIN_ALIAS ("UCS2//", "ISO-10646/UCS2/")
-BUILTIN_ALIAS ("UCS-2//", "ISO-10646/UCS2/")
-BUILTIN_ALIAS ("OSF00010100//", "ISO-10646/UCS2/") /* level 1 */
-BUILTIN_ALIAS ("OSF00010101//", "ISO-10646/UCS2/") /* level 2 */
-BUILTIN_ALIAS ("OSF00010102//", "ISO-10646/UCS2/") /* level 3 */
-
-BUILTIN_TRANSFORMATION ("ISO-10646/UCS2/", "INTERNAL", 1, "=ucs2->INTERNAL",
- __gconv_transform_ucs2_internal, 2, 2, 4, 4)
-
-BUILTIN_TRANSFORMATION ("INTERNAL", "ISO-10646/UCS2/", 1, "=INTERNAL->ucs2",
- __gconv_transform_internal_ucs2, 4, 4, 2, 2)
-
-
-BUILTIN_ALIAS ("ANSI_X3.4//", "ANSI_X3.4-1968//")
-BUILTIN_ALIAS ("ISO-IR-6//", "ANSI_X3.4-1968//")
-BUILTIN_ALIAS ("ANSI_X3.4-1986//", "ANSI_X3.4-1968//")
-BUILTIN_ALIAS ("ISO_646.IRV:1991//", "ANSI_X3.4-1968//")
-BUILTIN_ALIAS ("ASCII//", "ANSI_X3.4-1968//")
-BUILTIN_ALIAS ("ISO646-US//", "ANSI_X3.4-1968//")
-BUILTIN_ALIAS ("US-ASCII//", "ANSI_X3.4-1968//")
-BUILTIN_ALIAS ("US//", "ANSI_X3.4-1968//")
-BUILTIN_ALIAS ("IBM367//", "ANSI_X3.4-1968//")
-BUILTIN_ALIAS ("CP367//", "ANSI_X3.4-1968//")
-BUILTIN_ALIAS ("CSASCII//", "ANSI_X3.4-1968//")
-BUILTIN_ALIAS ("OSF00010020//", "ANSI_X3.4-1968//")
-
-BUILTIN_TRANSFORMATION ("ANSI_X3.4-1968//", "INTERNAL", 1, "=ascii->INTERNAL",
- __gconv_transform_ascii_internal, 4, 4, 1, 1)
-
-BUILTIN_TRANSFORMATION ("INTERNAL", "ANSI_X3.4-1968//", 1, "=INTERNAL->ascii",
- __gconv_transform_internal_ascii, 4, 4, 1, 1)
-
-
-#if BYTE_ORDER == BIG_ENDIAN
-BUILTIN_ALIAS ("UNICODEBIG//", "ISO-10646/UCS2/")
-BUILTIN_ALIAS ("UCS-2BE//", "ISO-10646/UCS2/")
-
-BUILTIN_ALIAS ("UCS-2LE//", "UNICODELITTLE//")
-
-BUILTIN_TRANSFORMATION ("UNICODELITTLE//", "INTERNAL", 1,
- "=ucs2reverse->INTERNAL",
- __gconv_transform_ucs2reverse_internal, 2, 2, 4, 4)
-
-BUILTIN_TRANSFORMATION ("INTERNAL", "UNICODELITTLE//", 1,
- "=INTERNAL->ucs2reverse",
- __gconv_transform_internal_ucs2reverse, 4, 4, 2, 2)
-#else
-BUILTIN_ALIAS ("UNICODELITTLE//", "ISO-10646/UCS2/")
-BUILTIN_ALIAS ("UCS-2LE//", "ISO-10646/UCS2/")
-
-BUILTIN_ALIAS ("UCS-2BE//", "UNICODEBIG//")
-
-BUILTIN_TRANSFORMATION ("UNICODEBIG//", "INTERNAL", 1,
- "=ucs2reverse->INTERNAL",
- __gconv_transform_ucs2reverse_internal, 2, 2, 4, 4)
-
-BUILTIN_TRANSFORMATION ("INTERNAL", "UNICODEBIG//", 1,
- "=INTERNAL->ucs2reverse",
- __gconv_transform_internal_ucs2reverse, 4, 4, 2, 2)
-#endif
diff --git a/newlib/libc/sys/linux/iconv/gconv_cache.c b/newlib/libc/sys/linux/iconv/gconv_cache.c
deleted file mode 100644
index c887be970..000000000
--- a/newlib/libc/sys/linux/iconv/gconv_cache.c
+++ /dev/null
@@ -1,459 +0,0 @@
-/* Cache handling for iconv modules.
- Copyright (C) 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <dlfcn.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-
-#include <gconv_int.h>
-#include <iconvconfig.h>
-
-#include "hash-string.h"
-
-void *__gconv_cache;
-static size_t cache_size;
-static int cache_malloced;
-
-
-int
-internal_function
-__gconv_load_cache (void)
-{
- int fd;
- struct stat64 st;
- struct gconvcache_header *header;
-
- /* We cannot use the cache if the GCONV_PATH environment variable is
- set. */
- __gconv_path_envvar = getenv ("GCONV_PATH");
- if (__gconv_path_envvar != NULL)
- return -1;
-
- /* See whether the cache file exists. */
- fd = open (GCONV_MODULES_CACHE, O_RDONLY);
- if (__builtin_expect (fd, 0) == -1)
- /* Not available. */
- return -1;
-
-#ifdef _POSIX_ASYNC_IO
- /* Get information about the file. */
- if (__builtin_expect (fstat64 (fd, &st), 0) < 0
- /* We do not have to start looking at the file if it cannot contain
- at least the cache header. */
- || st.st_size < sizeof (struct gconvcache_header))
- {
-#endif
- close_and_exit:
- close (fd);
- return -1;
-#ifdef _POSIX_ASYNC_IO
- }
-#endif
-
- /* Make the file content available. */
- cache_size = st.st_size;
-#ifdef _POSIX_MAPPED_FILES
- __gconv_cache = mmap (NULL, cache_size, PROT_READ, MAP_SHARED, fd, 0);
- if (__builtin_expect (__gconv_cache == MAP_FAILED, 0))
-#endif
- {
- size_t already_read;
-
- __gconv_cache = malloc (cache_size);
- if (__gconv_cache == NULL)
- goto close_and_exit;
-
- already_read = 0;
- do
- {
- ssize_t n = read (fd, (char *) __gconv_cache + already_read,
- cache_size - already_read);
- if (__builtin_expect (n, 0) == -1)
- {
- free (__gconv_cache);
- __gconv_cache = NULL;
- goto close_and_exit;
- }
-
- already_read += n;
- }
- while (already_read < cache_size);
-
- cache_malloced = 1;
- }
-
- /* We don't need the file descriptor anymore. */
- close (fd);
-
- /* Check the consistency. */
- header = (struct gconvcache_header *) __gconv_cache;
- if (__builtin_expect (header->magic, GCONVCACHE_MAGIC) != GCONVCACHE_MAGIC
- || __builtin_expect (header->string_offset >= cache_size, 0)
- || __builtin_expect (header->hash_offset >= cache_size, 0)
- || __builtin_expect (header->hash_size == 0, 0)
- || __builtin_expect ((header->hash_offset
- + header->hash_size * sizeof (struct hash_entry))
- > cache_size, 0)
- || __builtin_expect (header->module_offset >= cache_size, 0)
- || __builtin_expect (header->otherconv_offset > cache_size, 0))
- {
- if (cache_malloced)
- {
- free (__gconv_cache);
- cache_malloced = 0;
- }
-#ifdef _POSIX_MAPPED_FILES
- else
- __munmap (__gconv_cache, cache_size);
-#endif
- __gconv_cache = NULL;
-
- return -1;
- }
-
- /* That worked. */
- return 0;
-}
-
-
-static int
-internal_function
-find_module_idx (const char *str, size_t *idxp)
-{
- unsigned int idx;
- unsigned int hval;
- unsigned int hval2;
- const struct gconvcache_header *header;
- const char *strtab;
- const struct hash_entry *hashtab;
- unsigned int limit;
-
- header = (const struct gconvcache_header *) __gconv_cache;
- strtab = (char *) __gconv_cache + header->string_offset;
- hashtab = (struct hash_entry *) ((char *) __gconv_cache
- + header->hash_offset);
-
- hval = hash_string (str);
- idx = hval % header->hash_size;
- hval2 = 1 + hval % (header->hash_size - 2);
-
- limit = cache_size - header->string_offset;
- while (hashtab[idx].string_offset != 0)
- if (hashtab[idx].string_offset < limit
- && strcmp (str, strtab + hashtab[idx].string_offset) == 0)
- {
- *idxp = hashtab[idx].module_idx;
- return 0;
- }
- else
- if ((idx += hval2) >= header->hash_size)
- idx -= header->hash_size;
-
- /* Nothing found. */
- return -1;
-}
-
-
-#ifndef STATIC_GCONV
-static int
-internal_function
-find_module (const char *directory, const char *filename,
- struct __gconv_step *result)
-{
- size_t dirlen = strlen (directory);
- size_t fnamelen = strlen (filename) + 1;
- char fullname[dirlen + fnamelen];
- int status = __GCONV_NOCONV;
- char *tmp;
-
- tmp = mempcpy (fullname, directory, dirlen);
- tmp += dirlen;
- memcpy (tmp, filename, fnamelen);
-
- result->__shlib_handle = __gconv_find_shlib (fullname);
- if (result->__shlib_handle != NULL)
- {
- status = __GCONV_OK;
-
- result->__modname = NULL;
- result->__fct = result->__shlib_handle->fct;
- result->__init_fct = result->__shlib_handle->init_fct;
- result->__end_fct = result->__shlib_handle->end_fct;
-
- result->__data = NULL;
- if (result->__init_fct != NULL)
- status = result->__init_fct (result);
- }
-
- return status;
-}
-#endif
-
-
-int
-internal_function
-__gconv_compare_alias_cache (const char *name1, const char *name2, int *result)
-{
- size_t name1_idx;
- size_t name2_idx;
-
- if (__gconv_cache == NULL)
- return -1;
-
- if (find_module_idx (name1, &name1_idx) != 0
- || find_module_idx (name2, &name2_idx) != 0)
- *result = strcmp (name1, name2);
- else
- *result = (int) (name1_idx - name2_idx);
-
- return 0;
-}
-
-
-int
-internal_function
-__gconv_lookup_cache (const char *toset, const char *fromset,
- struct __gconv_step **handle, size_t *nsteps, int flags)
-{
- const struct gconvcache_header *header;
- const char *strtab;
- size_t fromidx;
- size_t toidx;
- const struct module_entry *modtab;
- const struct module_entry *from_module;
- const struct module_entry *to_module;
- struct __gconv_step *result;
-
- if (__gconv_cache == NULL)
- /* We have no cache available. */
- return __GCONV_NODB;
-
- header = (const struct gconvcache_header *) __gconv_cache;
- strtab = (char *) __gconv_cache + header->string_offset;
- modtab = (const struct module_entry *) ((char *) __gconv_cache
- + header->module_offset);
-
- if (find_module_idx (fromset, &fromidx) != 0
- || (header->module_offset + (fromidx + 1) * sizeof (struct module_entry)
- > cache_size))
- return __GCONV_NOCONV;
- from_module = &modtab[fromidx];
-
- if (find_module_idx (toset, &toidx) != 0
- || (header->module_offset + (toidx + 1) * sizeof (struct module_entry)
- > cache_size))
- return __GCONV_NOCONV;
- to_module = &modtab[toidx];
-
- /* Avoid copy-only transformations if the user requests. */
- if (__builtin_expect (flags & GCONV_AVOID_NOCONV, 0) && fromidx == toidx)
- return __GCONV_NOCONV;
-
- /* If there are special conversions available examine them first. */
- if (fromidx != 0 && toidx != 0
- && __builtin_expect (from_module->extra_offset, 0) != 0)
- {
- /* Search through the list to see whether there is a module
- matching the destination character set. */
- const struct extra_entry *extra;
-
- /* Note the -1. This is due to the offset added in iconvconfig.
- See there for more explanations. */
- extra = (const struct extra_entry *) ((char *) __gconv_cache
- + header->otherconv_offset
- + from_module->extra_offset - 1);
- while (extra->module_cnt != 0
- && extra->module[extra->module_cnt - 1].outname_offset != toidx)
- extra = (const struct extra_entry *) ((char *) extra
- + sizeof (struct extra_entry)
- + (extra->module_cnt
- * sizeof (struct extra_entry_module)));
-
- if (extra->module_cnt != 0)
- {
- /* Use the extra module. First determine how many steps. */
- char *fromname;
- int idx;
-
- *nsteps = extra->module_cnt;
- *handle = result =
- (struct __gconv_step *) malloc (extra->module_cnt
- * sizeof (struct __gconv_step));
- if (result == NULL)
- return __GCONV_NOMEM;
-
- fromname = (char *) strtab + from_module->canonname_offset;
- idx = 0;
- do
- {
- result[idx].__from_name = fromname;
- fromname = result[idx].__to_name =
- (char *) strtab + modtab[extra->module[idx].outname_offset].canonname_offset;
-
- result[idx].__counter = 1;
- result[idx].__data = NULL;
-
-#ifndef STATIC_GCONV
- if (strtab[extra->module[idx].dir_offset] != '\0')
- {
- /* Load the module, return handle for it. */
- int res;
-
- res = find_module (strtab + extra->module[idx].dir_offset,
- strtab + extra->module[idx].name_offset,
- &result[idx]);
- if (__builtin_expect (res, __GCONV_OK) != __GCONV_OK)
- {
- /* Something went wrong. */
- free (result);
- goto try_internal;
- }
- }
- else
-#endif
- /* It's a builtin transformation. */
- __gconv_get_builtin_trans (strtab
- + extra->module[idx].name_offset,
- &result[idx]);
-
- }
- while (++idx < extra->module_cnt);
-
- return __GCONV_OK;
- }
- }
-
- try_internal:
- /* See whether we can convert via the INTERNAL charset. */
- if ((fromidx != 0 && __builtin_expect (from_module->fromname_offset, 1) == 0)
- || (toidx != 0 && __builtin_expect (to_module->toname_offset, 1) == 0)
- || (fromidx == 0 && toidx == 0))
- /* Not possible. Nothing we can do. */
- return __GCONV_NOCONV;
-
- /* We will use up to two modules. Always allocate room for two. */
- result = (struct __gconv_step *) malloc (2 * sizeof (struct __gconv_step));
- if (result == NULL)
- return __GCONV_NOMEM;
-
- *handle = result;
- *nsteps = 0;
-
- /* Generate data structure for conversion to INTERNAL. */
- if (fromidx != 0)
- {
- result[0].__from_name = (char *) strtab + from_module->canonname_offset;
- result[0].__to_name = (char *) "INTERNAL";
-
- result[0].__counter = 1;
- result[0].__data = NULL;
-
-#ifndef STATIC_GCONV
- if (strtab[from_module->todir_offset] != '\0')
- {
- /* Load the module, return handle for it. */
- int res = find_module (strtab + from_module->todir_offset,
- strtab + from_module->toname_offset,
- &result[0]);
- if (__builtin_expect (res, __GCONV_OK) != __GCONV_OK)
- {
- /* Something went wrong. */
- free (result);
- return res;
- }
- }
- else
-#endif
- /* It's a builtin transformation. */
- __gconv_get_builtin_trans (strtab + from_module->toname_offset,
- &result[0]);
-
- ++*nsteps;
- }
-
- /* Generate data structure for conversion from INTERNAL. */
- if (toidx != 0)
- {
- int idx = *nsteps;
-
- result[idx].__from_name = (char *) "INTERNAL";
- result[idx].__to_name = (char *) strtab + to_module->canonname_offset;
-
- result[idx].__counter = 1;
- result[idx].__data = NULL;
-
-#ifndef STATIC_GCONV
- if (strtab[to_module->fromdir_offset] != '\0')
- {
- /* Load the module, return handle for it. */
- int res = find_module (strtab + to_module->fromdir_offset,
- strtab + to_module->fromname_offset,
- &result[idx]);
- if (__builtin_expect (res, __GCONV_OK) != __GCONV_OK)
- {
- /* Something went wrong. */
- if (idx != 0)
- __gconv_release_step (&result[0]);
- free (result);
- return res;
- }
- }
- else
-#endif
- /* It's a builtin transformation. */
- __gconv_get_builtin_trans (strtab + to_module->fromname_offset,
- &result[idx]);
-
- ++*nsteps;
- }
-
- return __GCONV_OK;
-}
-
-
-/* Free memory allocated for the transformation record. */
-void
-internal_function
-__gconv_release_cache (struct __gconv_step *steps, size_t nsteps)
-{
- if (__gconv_cache != NULL)
- /* The only thing we have to deallocate is the record with the
- steps. */
- free (steps);
-}
-
-
-/* Free all resources if necessary. */
-static void __attribute__ ((unused))
-free_mem (void)
-{
- if (cache_malloced)
- free (__gconv_cache);
-#ifdef _POSIX_MAPPED_FILES
- else
- __munmap (__gconv_cache, cache_size);
-#endif
-}
-
-text_set_element (__libc_subfreeres, free_mem);
diff --git a/newlib/libc/sys/linux/iconv/gconv_charset.h b/newlib/libc/sys/linux/iconv/gconv_charset.h
deleted file mode 100644
index 706669825..000000000
--- a/newlib/libc/sys/linux/iconv/gconv_charset.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Charset name normalization.
- Copyright (C) 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <ctype.h>
-#include <locale.h>
-
-
-static inline void
-strip (char *wp, const char *s)
-{
- int slash_count = 0;
- char old_locale[20], *old_locale_p;
-
- /* Set locale to default C locale. */
- old_locale_p = setlocale(LC_ALL, "C");
- strncpy(old_locale, old_locale_p, 20);
- while (*s != '\0')
- {
- if (isalnum (*s)
- || *s == '_' || *s == '-' || *s == '.')
- *wp++ = toupper (*s);
- else if (*s == '/')
- {
- if (++slash_count == 3)
- break;
- *wp++ = '/';
- }
- ++s;
- }
-
- while (slash_count++ < 2)
- *wp++ = '/';
-
- *wp = '\0';
- setlocale(LC_ALL, old_locale);
-}
-
-
-static char * __attribute__ ((unused))
-upstr (char *dst, const char *str)
-{
- char *cp = dst;
- char old_locale[20], *old_locale_p;
- /* Set locale to default C locale. */
- old_locale_p = setlocale(LC_ALL, "C");
- strncpy(old_locale, old_locale_p, 20);
- while ((*cp++ = toupper (*str++)) != '\0')
- /* nothing */;
- setlocale(LC_ALL, old_locale);
- return dst;
-}
-
-
-/* If NAME is an codeset alias expand it. */
-extern int __gconv_compare_alias (const char *name1, const char *name2)
- internal_function;
diff --git a/newlib/libc/sys/linux/iconv/gconv_close.c b/newlib/libc/sys/linux/iconv/gconv_close.c
deleted file mode 100644
index cc0ecd650..000000000
--- a/newlib/libc/sys/linux/iconv/gconv_close.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Release any resource associated with given conversion descriptor.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stdlib.h>
-
-#include <gconv_int.h>
-
-
-int
-internal_function
-__gconv_close (__gconv_t cd)
-{
- struct __gconv_step *srunp;
- struct __gconv_step_data *drunp;
- size_t nsteps;
-
- /* Free all resources by calling destructor functions and release
- the implementations. */
- srunp = cd->__steps;
- nsteps = cd->__nsteps;
- drunp = cd->__data;
- do
- {
- struct __gconv_trans_data *transp;
-
- transp = drunp->__trans;
- while (transp != NULL)
- {
- struct __gconv_trans_data *curp = transp;
- transp = transp->__next;
-
- if (__builtin_expect (curp->__trans_end_fct != NULL, 0))
- curp->__trans_end_fct (curp->__data);
-
- free (curp);
- }
-
- if (!(drunp->__flags & __GCONV_IS_LAST) && drunp->__outbuf != NULL)
- free (drunp->__outbuf);
- }
- while (!((drunp++)->__flags & __GCONV_IS_LAST));
-
- /* Free the data allocated for the descriptor. */
- free (cd);
-
- /* Close the participating modules. */
- return __gconv_close_transform (srunp, nsteps);
-}
diff --git a/newlib/libc/sys/linux/iconv/gconv_conf.c b/newlib/libc/sys/linux/iconv/gconv_conf.c
deleted file mode 100644
index c714102a3..000000000
--- a/newlib/libc/sys/linux/iconv/gconv_conf.c
+++ /dev/null
@@ -1,680 +0,0 @@
-/* Handle configuration data.
- Copyright (C) 1997,98,99,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
-#include <locale.h>
-#include <search.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdio_ext.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/param.h>
-
-#include <dirent.h>
-#include <gconv_int.h>
-
-/* This is the default path where we look for module lists. */
-static const char default_gconv_path[] = GCONV_PATH;
-
-/* The path elements, as determined by the __gconv_get_path function.
- All path elements end in a slash. */
-struct path_elem *__gconv_path_elem;
-/* Maximum length of a single path element in __gconv_path_elem. */
-size_t __gconv_max_path_elem_len;
-
-/* We use the following struct if we couldn't allocate memory. */
-static const struct path_elem empty_path_elem;
-
-/* Name of the file containing the module information in the directories
- along the path. */
-static const char gconv_conf_filename[] = "gconv-modules";
-
-/* Filename extension for the modules. */
-#ifndef MODULE_EXT
-# define MODULE_EXT ".so"
-#endif
-static const char gconv_module_ext[] = MODULE_EXT;
-
-/* We have a few builtin transformations. */
-static struct gconv_module builtin_modules[] =
-{
-#define BUILTIN_TRANSFORMATION(From, To, Cost, Name, Fct, MinF, MaxF, \
- MinT, MaxT) \
- { \
- from_string: From, \
- to_string: To, \
- cost_hi: Cost, \
- cost_lo: INT_MAX, \
- module_name: Name \
- },
-#define BUILTIN_ALIAS(From, To)
-
-#include "gconv_builtin.h"
-};
-
-#undef BUILTIN_TRANSFORMATION
-#undef BUILTIN_ALIAS
-
-static const char *builtin_aliases[] =
-{
-#define BUILTIN_TRANSFORMATION(From, To, Cost, Name, Fct, MinF, MaxF, \
- MinT, MaxT)
-#define BUILTIN_ALIAS(From, To) From " " To,
-
-#include "gconv_builtin.h"
-};
-
-#ifdef USE_IN_LIBIO
-# include <libio/libioP.h>
-# define __getdelim(line, len, c, fp) _IO_getdelim (line, len, c, fp)
-#endif
-
-
-/* Value of the GCONV_PATH environment variable. */
-const char *__gconv_path_envvar;
-
-
-/* Test whether there is already a matching module known. */
-static int
-internal_function
-detect_conflict (const char *alias)
-{
- struct gconv_module *node = __gconv_modules_db;
-
- while (node != NULL)
- {
- int cmpres = strcmp (alias, node->from_string);
-
- if (cmpres == 0)
- /* We have a conflict. */
- return 1;
- else if (cmpres < 0)
- node = node->left;
- else
- node = node->right;
- }
-
- return node != NULL;
-}
-
-
-/* Add new alias. */
-static inline void
-add_alias (char *rp, void *modules)
-{
- /* We now expect two more string. The strings are normalized
- (converted to UPPER case) and strored in the alias database. */
- struct gconv_alias *new_alias;
- char *from, *to, *wp;
- char old_locale[20], *old_locale_p;
-
- /* Set locale to default C locale. */
- old_locale_p = setlocale(LC_ALL, "C");
- strncpy(old_locale, old_locale_p, 20);
-
- while (isspace (*rp))
- ++rp;
- from = wp = rp;
- while (*rp != '\0' && !isspace (*rp))
- *wp++ = toupper (*rp++);
- if (*rp == '\0')
- {
- setlocale(LC_ALL, old_locale);
- /* There is no `to' string on the line. Ignore it. */
- return;
- }
- *wp++ = '\0';
- to = ++rp;
- while (isspace (*rp))
- ++rp;
- while (*rp != '\0' && !isspace (*rp))
- *wp++ = toupper (*rp++);
- if (to == wp)
- {
- setlocale(LC_ALL, old_locale);
- /* No `to' string, ignore the line. */
- return;
- }
- *wp++ = '\0';
-
- /* Test whether this alias conflicts with any available module. */
- if (detect_conflict (from))
- {
- setlocale(LC_ALL, old_locale);
- /* It does conflict, don't add the alias. */
- return;
- }
-
- new_alias = (struct gconv_alias *) malloc (sizeof (struct gconv_alias) + (wp - from));
- if (new_alias != NULL)
- {
- void **inserted;
-
- new_alias->fromname = memcpy ((char *) new_alias
- + sizeof (struct gconv_alias),
- from, wp - from);
- new_alias->toname = new_alias->fromname + (to - from);
-
- inserted = (void **) tsearch (new_alias, &__gconv_alias_db,
- __gconv_alias_compare);
- if (inserted == NULL || *inserted != new_alias)
- /* Something went wrong, free this entry. */
- free (new_alias);
- }
- setlocale(LC_ALL, old_locale);
-}
-
-
-/* Insert a data structure for a new module in the search tree. */
-static inline void
-internal_function
-insert_module (struct gconv_module *newp, int tobefreed)
-{
- struct gconv_module **rootp = &__gconv_modules_db;
-
- while (*rootp != NULL)
- {
- struct gconv_module *root = *rootp;
- int cmpres;
-
- cmpres = strcmp (newp->from_string, root->from_string);
- if (cmpres == 0)
- {
- /* Both strings are identical. Insert the string at the
- end of the `same' list if it is not already there. */
- while (strcmp (newp->from_string, root->from_string) != 0
- || strcmp (newp->to_string, root->to_string) != 0)
- {
- rootp = &root->same;
- root = *rootp;
- if (root == NULL)
- break;
- }
-
- if (root != NULL)
- {
- /* This is a no new conversion. But maybe the cost is
- better. */
- if (newp->cost_hi < root->cost_hi
- || (newp->cost_hi == root->cost_hi
- && newp->cost_lo < root->cost_lo))
- {
- newp->left = root->left;
- newp->right = root->right;
- newp->same = root->same;
- *rootp = newp;
-
- free (root);
- }
- else if (tobefreed)
- free (newp);
- return;
- }
-
- break;
- }
- else if (cmpres < 0)
- rootp = &root->left;
- else
- rootp = &root->right;
- }
-
- /* Plug in the new node here. */
- *rootp = newp;
-}
-
-
-/* Add new module. */
-static void
-internal_function
-add_module (char *rp, const char *directory, size_t dir_len, void **modules,
- size_t *nmodules, int modcounter)
-{
- /* We expect now
- 1. `from' name
- 2. `to' name
- 3. filename of the module
- 4. an optional cost value
- */
- struct gconv_alias fake_alias;
- struct gconv_module *new_module;
- char *from, *to, *module, *wp;
- int need_ext;
- int cost_hi;
- char old_locale[20], *old_locale_p;
- char *old;
- size_t len;
- char *new;
-
- /* Set locale to default C locale. */
- old_locale_p = setlocale(LC_ALL, "C");
- strncpy(old_locale, old_locale_p, 20);
-
- while (isspace (*rp))
- ++rp;
- from = rp;
- while (*rp != '\0' && !isspace (*rp))
- {
- *rp = toupper (*rp);
- ++rp;
- }
- if (*rp == '\0')
- {
- setlocale(LC_ALL, old_locale);
- return;
- }
- *rp++ = '\0';
- to = wp = rp;
- while (isspace (*rp))
- {
- setlocale(LC_ALL, old_locale);
- ++rp;
- }
- while (*rp != '\0' && !isspace (*rp))
- *wp++ = toupper (*rp++);
- if (*rp == '\0')
- {
- setlocale(LC_ALL, old_locale);
- return;
- }
- *wp++ = '\0';
- do
- ++rp;
- while (isspace (*rp));
- module = wp;
- while (*rp != '\0' && !isspace (*rp))
- *wp++ = *rp++;
- if (*rp == '\0')
- {
- /* There is no cost, use one by default. */
- *wp++ = '\0';
- cost_hi = 1;
- }
- else
- {
- /* There might be a cost value. */
- char *endp;
-
- *wp++ = '\0';
- cost_hi = strtol (rp, &endp, 10);
- if (rp == endp || cost_hi < 1)
- /* No useful information. */
- cost_hi = 1;
- }
-
- if (module[0] == '\0')
- {
- setlocale(LC_ALL, old_locale);
- /* No module name given. */
- return;
- }
- if (module[0] == '/')
- dir_len = 0;
-
- /* See whether we must add the ending. */
- need_ext = 0;
- if (wp - module < (ptrdiff_t) sizeof (gconv_module_ext)
- || memcmp (wp - sizeof (gconv_module_ext), gconv_module_ext,
- sizeof (gconv_module_ext)) != 0)
- /* We must add the module extension. */
- need_ext = sizeof (gconv_module_ext) - 1;
-
- /* See whether we have already an alias with this name defined. */
- old = from;
- len = strnlen (old, to - from);
- new = (char *) alloca (len + 1);
- new[len] = '\0';
- fake_alias.fromname = (char *) memcpy (new, old, len);
-
- if (tfind (&fake_alias, &__gconv_alias_db, __gconv_alias_compare) != NULL)
- {
- setlocale(LC_ALL, old_locale);
- /* This module duplicates an alias. */
- return;
- }
-
- new_module = (struct gconv_module *) calloc (1,
- sizeof (struct gconv_module)
- + (wp - from)
- + dir_len + need_ext);
- if (new_module != NULL)
- {
- char *tmp;
-
- new_module->from_string = tmp = (char *) (new_module + 1);
- tmp = memcpy (tmp, from, to - from);
- tmp += (to - from);
-
- new_module->to_string = tmp;
- tmp = memcpy (tmp, to, module - to);
- tmp += (module - to);
-
- new_module->cost_hi = cost_hi;
- new_module->cost_lo = modcounter;
-
- new_module->module_name = tmp;
-
- if (dir_len != 0)
- {
- tmp = memcpy (tmp, directory, dir_len);
- tmp += dir_len;
- }
-
- tmp = memcpy (tmp, module, wp - module);
- tmp += (wp - module);
-
- if (need_ext)
- memcpy (tmp - 1, gconv_module_ext, sizeof (gconv_module_ext));
-
- /* Now insert the new module data structure in our search tree. */
- insert_module (new_module, 1);
- }
- setlocale(LC_ALL, old_locale);
-}
-
-
-/* Read the next configuration file. */
-static void
-internal_function
-read_conf_file (const char *filename, const char *directory, size_t dir_len,
- void **modules, size_t *nmodules)
-{
- FILE *fp = fopen (filename, "r");
- char *line = NULL;
- size_t line_len = 0;
- static int modcounter;
- char old_locale[20], *old_locale_p;
-
- /* Don't complain if a file is not present or readable, simply silently
- ignore it. */
- if (fp == NULL)
- return;
-
- /* Set locale to default C locale. */
- old_locale_p = setlocale(LC_ALL, "C");
- strncpy(old_locale, old_locale_p, 20);
-
- /* Process the known entries of the file. Comments start with `#' and
- end with the end of the line. Empty lines are ignored. */
- while (!feof (fp))
- {
- char *rp, *endp, *word;
- ssize_t n = __getdelim (&line, &line_len, '\n', fp);
- if (n < 0)
- /* An error occurred. */
- break;
-
- rp = line;
- /* Terminate the line (excluding comments or newline) by an NUL byte
- to simplify the following code. */
- endp = strchr (rp, '#');
- if (endp != NULL)
- *endp = '\0';
- else
- if (rp[n - 1] == '\n')
- rp[n - 1] = '\0';
-
- while (isspace (*rp))
- ++rp;
-
- /* If this is an empty line go on with the next one. */
- if (rp == endp)
- continue;
-
- word = rp;
- while (*rp != '\0' && !isspace (*rp))
- ++rp;
-
- if (rp - word == sizeof ("alias") - 1
- && memcmp (word, "alias", sizeof ("alias") - 1) == 0)
- add_alias (rp, *modules);
- else if (rp - word == sizeof ("module") - 1
- && memcmp (word, "module", sizeof ("module") - 1) == 0)
- add_module (rp, directory, dir_len, modules, nmodules, modcounter++);
- /* else */
- /* Otherwise ignore the line. */
- }
-
- free (line);
-
- fclose (fp);
-
- setlocale(LC_ALL, old_locale);
-}
-
-
-/* Determine the directories we are looking for data in. */
-void
-__gconv_get_path (void)
-{
- struct path_elem *result;
- __LOCK_INIT(static, path_lock);
-
-#ifdef HAVE_DD_LOCK
- __lock_acquire(path_lock);
-#endif
-
- /* Make sure there wasn't a second thread doing it already. */
- result = (struct path_elem *) __gconv_path_elem;
- if (result == NULL)
- {
- /* Determine the complete path first. */
- char *gconv_path;
- size_t gconv_path_len;
- char *elem;
- char *oldp;
- char *cp;
- int nelems;
- char *cwd;
- size_t cwdlen;
-
- if (__gconv_path_envvar == NULL)
- {
- char * old = default_gconv_path;
- size_t len = strlen (old) + 1;
- char *new = (char *) alloca (len);
-
- /* No user-defined path. Make a modifiable copy of the
- default path. */
- gconv_path = (char *) memcpy (new, old, len);
- gconv_path_len = sizeof (default_gconv_path);
- cwd = NULL;
- cwdlen = 0;
- }
- else
- {
- /* Append the default path to the user-defined path. */
- size_t user_len = strlen (__gconv_path_envvar);
- char *tmp;
-
- gconv_path_len = user_len + 1 + sizeof (default_gconv_path);
- gconv_path = alloca (gconv_path_len);
- tmp = memcpy (gconv_path, __gconv_path_envvar,
- user_len);
- tmp += user_len;
- memcpy (tmp, ":", 1);
- tmp += 1;
- memcpy (tmp,
- default_gconv_path, sizeof (default_gconv_path));
-
- cwd = getcwd (NULL, 0);
- cwdlen = strlen (cwd);
- }
- assert (default_gconv_path[0] == '/');
-
- /* In a first pass we calculate the number of elements. */
- oldp = NULL;
- cp = strchr (gconv_path, ':');
- nelems = 1;
- while (cp != NULL)
- {
- if (cp != oldp + 1)
- ++nelems;
- oldp = cp;
- cp = strchr (cp + 1, ':');
- }
-
- /* Allocate the memory for the result. */
- result = (struct path_elem *) malloc ((nelems + 1)
- * sizeof (struct path_elem)
- + gconv_path_len + nelems
- + (nelems - 1) * (cwdlen + 1));
- if (result != NULL)
- {
- char *strspace = (char *) &result[nelems + 1];
- int n = 0;
-
- /* Separate the individual parts. */
- __gconv_max_path_elem_len = 0;
- elem = strtok_r (gconv_path, ":", &gconv_path);
- assert (elem != NULL);
- do
- {
- result[n].name = strspace;
- if (elem[0] != '/')
- {
- assert (cwd != NULL);
- strspace = memcpy (strspace, cwd, cwdlen);
- strspace += cwdlen;
- *strspace++ = '/';
- }
- strspace = strcpy (strspace, elem);
- while(*strspace != '\0') strspace++;
-
- if (strspace[-1] != '/')
- *strspace++ = '/';
-
- result[n].len = strspace - result[n].name;
- if (result[n].len > __gconv_max_path_elem_len)
- __gconv_max_path_elem_len = result[n].len;
-
- *strspace++ = '\0';
- ++n;
- }
- while ((elem = strtok_r (NULL, ":", &gconv_path)) != NULL);
-
- result[n].name = NULL;
- result[n].len = 0;
- }
-
- __gconv_path_elem = result ?: (struct path_elem *) &empty_path_elem;
-
- if (cwd != NULL)
- free (cwd);
- }
-
-#ifdef HAVE_DD_LOCK
- __lock_release(path_lock);
-#endif
-}
-
-
-/* Read all configuration files found in the user-specified and the default
- path. */
-void
-__gconv_read_conf (void)
-{
- void *modules = NULL;
- size_t nmodules = 0;
- int save_errno = errno;
- size_t cnt;
- char *filename;
- char *tmp;
- const char *elem;
- size_t elem_len;
-
- /* First see whether we should use the cache. */
- if (__gconv_load_cache () == 0)
- {
- /* Yes, we are done. */
- __set_errno (save_errno);
- return;
- }
-
-#ifndef STATIC_GCONV
- /* Find out where we have to look. */
- if (__gconv_path_elem == NULL)
- __gconv_get_path ();
-
- for (cnt = 0; __gconv_path_elem[cnt].name != NULL; ++cnt)
- {
- elem = __gconv_path_elem[cnt].name;
- elem_len = __gconv_path_elem[cnt].len;
-
- /* No slash needs to be inserted between elem and gconv_conf_filename;
- elem already ends in a slash. */
- filename = alloca (elem_len + sizeof (gconv_conf_filename));
- tmp = memcpy (filename, elem, elem_len);
- tmp += elem_len;
- memcpy (tmp, gconv_conf_filename, sizeof (gconv_conf_filename));
-
- /* Read the next configuration file. */
- read_conf_file (filename, elem, elem_len, &modules, &nmodules);
- }
-#endif
-
- /* Add the internal modules. */
- for (cnt = 0; cnt < sizeof (builtin_modules) / sizeof (builtin_modules[0]);
- ++cnt)
- {
- struct gconv_alias fake_alias;
-
- fake_alias.fromname = (char *) builtin_modules[cnt].from_string;
-
- if (tfind (&fake_alias, &__gconv_alias_db, __gconv_alias_compare)
- != NULL)
- /* It'll conflict so don't add it. */
- continue;
-
- insert_module (&builtin_modules[cnt], 0);
- }
-
- /* Add aliases for builtin conversions. */
- cnt = sizeof (builtin_aliases) / sizeof (builtin_aliases[0]);
- while (cnt > 0)
- {
- char * old = builtin_aliases[--cnt];
- size_t len = strlen (old) + 1;
- char *new = (char *) alloca (len);
- char *copy = (char *) memcpy (new, old, len);
-
- add_alias (copy, modules);
- }
-
- /* Restore the error number. */
- __set_errno (save_errno);
-}
-
-
-
-/* Free all resources if necessary. */
-static void __attribute__ ((unused))
-free_mem (void)
-{
- if (__gconv_path_elem != NULL && __gconv_path_elem != &empty_path_elem)
- free ((void *) __gconv_path_elem);
-}
-
-text_set_element (__libc_subfreeres, free_mem);
diff --git a/newlib/libc/sys/linux/iconv/gconv_db.c b/newlib/libc/sys/linux/iconv/gconv_db.c
deleted file mode 100644
index 749995ee3..000000000
--- a/newlib/libc/sys/linux/iconv/gconv_db.c
+++ /dev/null
@@ -1,803 +0,0 @@
-/* Provide access to the collection of available transformation modules.
- Copyright (C) 1997,98,99,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <limits.h>
-#include <search.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/param.h>
-#include <dirent.h>
-
-#include <dlfcn.h>
-#include <gconv_int.h>
-#include <gconv_charset.h>
-
-
-/* Simple data structure for alias mapping. We have two names, `from'
- and `to'. */
-void *__gconv_alias_db;
-
-/* Array with available modules. */
-struct gconv_module *__gconv_modules_db;
-
-/* We modify global data. */
-__LOCK_INIT(static, lock);
-
-
-/* Function for searching alias. */
-int
-__gconv_alias_compare (const void *p1, const void *p2)
-{
- const struct gconv_alias *s1 = (const struct gconv_alias *) p1;
- const struct gconv_alias *s2 = (const struct gconv_alias *) p2;
- return strcmp (s1->fromname, s2->fromname);
-}
-
-
-/* To search for a derivation we create a list of intermediate steps.
- Each element contains a pointer to the element which precedes it
- in the derivation order. */
-struct derivation_step
-{
- const char *result_set;
- size_t result_set_len;
- int cost_lo;
- int cost_hi;
- struct gconv_module *code;
- struct derivation_step *last;
- struct derivation_step *next;
-};
-
-#define NEW_STEP(result, hi, lo, module, last_mod) \
- ({ struct derivation_step *newp = alloca (sizeof (struct derivation_step)); \
- newp->result_set = result; \
- newp->result_set_len = strlen (result); \
- newp->cost_hi = hi; \
- newp->cost_lo = lo; \
- newp->code = module; \
- newp->last = last_mod; \
- newp->next = NULL; \
- newp; })
-
-
-/* If a specific transformation is used more than once we should not need
- to start looking for it again. Instead cache each successful result. */
-struct known_derivation
-{
- const char *from;
- const char *to;
- struct __gconv_step *steps;
- size_t nsteps;
-};
-
-/* Compare function for database of found derivations. */
-static int
-derivation_compare (const void *p1, const void *p2)
-{
- const struct known_derivation *s1 = (const struct known_derivation *) p1;
- const struct known_derivation *s2 = (const struct known_derivation *) p2;
- int result;
-
- result = strcmp (s1->from, s2->from);
- if (result == 0)
- result = strcmp (s1->to, s2->to);
- return result;
-}
-
-/* The search tree for known derivations. */
-static void *known_derivations;
-
-/* Look up whether given transformation was already requested before. */
-static int
-internal_function
-derivation_lookup (const char *fromset, const char *toset,
- struct __gconv_step **handle, size_t *nsteps)
-{
- struct known_derivation key = { fromset, toset, NULL, 0 };
- struct known_derivation **result;
-
- result = tfind (&key, &known_derivations, derivation_compare);
-
- if (result == NULL)
- return __GCONV_NOCONV;
-
- *handle = (*result)->steps;
- *nsteps = (*result)->nsteps;
-
- /* Please note that we return GCONV_OK even if the last search for
- this transformation was unsuccessful. */
- return __GCONV_OK;
-}
-
-/* Add new derivation to list of known ones. */
-static void
-internal_function
-add_derivation (const char *fromset, const char *toset,
- struct __gconv_step *handle, size_t nsteps)
-{
- struct known_derivation *new_deriv;
- size_t fromset_len = strlen (fromset) + 1;
- size_t toset_len = strlen (toset) + 1;
-
- new_deriv = (struct known_derivation *)
- malloc (sizeof (struct known_derivation) + fromset_len + toset_len);
- if (new_deriv != NULL)
- {
- char *tmp;
- new_deriv->from = (char *) (new_deriv + 1);
- tmp = memcpy (new_deriv + 1, fromset, fromset_len);
- tmp += fromset_len;
-
- new_deriv->to = memcpy (tmp,
- toset, toset_len);
-
- new_deriv->steps = handle;
- new_deriv->nsteps = nsteps;
-
- if (tsearch (new_deriv, &known_derivations, derivation_compare)
- == NULL)
- /* There is some kind of memory allocation problem. */
- free (new_deriv);
- }
- /* Please note that we don't complain if the allocation failed. This
- is not tragically but in case we use the memory debugging facilities
- not all memory will be freed. */
-}
-
-static void
-free_derivation (void *p)
-{
- struct known_derivation *deriv = (struct known_derivation *) p;
- size_t cnt;
-
- for (cnt = 0; cnt < deriv->nsteps; ++cnt)
- if (deriv->steps[cnt].__counter > 0
- && deriv->steps[cnt].__end_fct != NULL)
- deriv->steps[cnt].__end_fct (&deriv->steps[cnt]);
-
- /* Free the name strings. */
- free ((char *) deriv->steps[0].__from_name);
- free ((char *) deriv->steps[deriv->nsteps - 1].__to_name);
-
- free ((struct __gconv_step *) deriv->steps);
- free (deriv);
-}
-
-
-/* Decrement the reference count for a single step in a steps array. */
-void
-internal_function
-__gconv_release_step (struct __gconv_step *step)
-{
- if (--step->__counter == 0)
- {
- /* Call the destructor. */
- if (step->__end_fct != NULL)
- step->__end_fct (step);
-
-#ifndef STATIC_GCONV
- /* Skip builtin modules; they are not reference counted. */
- if (step->__shlib_handle != NULL)
- {
- /* Release the loaded module. */
- __gconv_release_shlib (step->__shlib_handle);
- step->__shlib_handle = NULL;
- }
-#endif
- }
-}
-
-static int
-internal_function
-gen_steps (struct derivation_step *best, const char *toset,
- const char *fromset, struct __gconv_step **handle, size_t *nsteps)
-{
- size_t step_cnt = 0;
- struct __gconv_step *result;
- struct derivation_step *current;
- int status = __GCONV_NOMEM;
-
- /* First determine number of steps. */
- for (current = best; current->last != NULL; current = current->last)
- ++step_cnt;
-
- result = (struct __gconv_step *) malloc (sizeof (struct __gconv_step)
- * step_cnt);
- if (result != NULL)
- {
- int failed = 0;
-
- status = __GCONV_OK;
- *nsteps = step_cnt;
- current = best;
- while (step_cnt-- > 0)
- {
- result[step_cnt].__from_name = (step_cnt == 0
- ? strdup (fromset)
- : (char *)current->last->result_set);
- result[step_cnt].__to_name = (step_cnt + 1 == *nsteps
- ? strdup (current->result_set)
- : result[step_cnt + 1].__from_name);
-
- result[step_cnt].__counter = 1;
- result[step_cnt].__data = NULL;
-
-#ifndef STATIC_GCONV
- if (current->code->module_name[0] == '/')
- {
- /* Load the module, return handle for it. */
- struct __gconv_loaded_object *shlib_handle =
- __gconv_find_shlib (current->code->module_name);
-
- if (shlib_handle == NULL)
- {
- failed = 1;
- break;
- }
-
- result[step_cnt].__shlib_handle = shlib_handle;
- result[step_cnt].__modname = shlib_handle->name;
- result[step_cnt].__fct = shlib_handle->fct;
- result[step_cnt].__init_fct = shlib_handle->init_fct;
- result[step_cnt].__end_fct = shlib_handle->end_fct;
-
- /* Call the init function. */
- if (result[step_cnt].__init_fct != NULL)
- {
- status = result[step_cnt].__init_fct (&result[step_cnt]);
-
- if (__builtin_expect (status, __GCONV_OK) != __GCONV_OK)
- {
- failed = 1;
- /* Make sure we unload this modules. */
- --step_cnt;
- result[step_cnt].__end_fct = NULL;
- break;
- }
- }
- }
- else
-#endif
- /* It's a builtin transformation. */
- __gconv_get_builtin_trans (current->code->module_name,
- &result[step_cnt]);
-
- current = current->last;
- }
-
- if (__builtin_expect (failed, 0) != 0)
- {
- /* Something went wrong while initializing the modules. */
- while (++step_cnt < *nsteps)
- __gconv_release_step (&result[step_cnt]);
- free (result);
- *nsteps = 0;
- *handle = NULL;
- if (status == __GCONV_OK)
- status = __GCONV_NOCONV;
- }
- else
- *handle = result;
- }
- else
- {
- *nsteps = 0;
- *handle = NULL;
- }
-
- return status;
-}
-
-
-#ifndef STATIC_GCONV
-static int
-internal_function
-increment_counter (struct __gconv_step *steps, size_t nsteps)
-{
- /* Increment the user counter. */
- size_t cnt = nsteps;
- int result = __GCONV_OK;
-
- while (cnt-- > 0)
- {
- struct __gconv_step *step = &steps[cnt];
-
- if (step->__counter++ == 0)
- {
- /* Skip builtin modules. */
- if (step->__modname != NULL)
- {
- /* Reopen a previously used module. */
- step->__shlib_handle = __gconv_find_shlib (step->__modname);
- if (step->__shlib_handle == NULL)
- {
- /* Oops, this is the second time we use this module
- (after unloading) and this time loading failed!? */
- --step->__counter;
- while (++cnt < nsteps)
- __gconv_release_step (&steps[cnt]);
- result = __GCONV_NOCONV;
- break;
- }
-
- /* The function addresses defined by the module may
- have changed. */
- step->__fct = step->__shlib_handle->fct;
- step->__init_fct = step->__shlib_handle->init_fct;
- step->__end_fct = step->__shlib_handle->end_fct;
- }
-
- if (step->__init_fct != NULL)
- step->__init_fct (step);
- }
- }
- return result;
-}
-#endif
-
-
-/* The main function: find a possible derivation from the `fromset' (either
- the given name or the alias) to the `toset' (again with alias). */
-static int
-internal_function
-find_derivation (const char *toset, const char *toset_expand,
- const char *fromset, const char *fromset_expand,
- struct __gconv_step **handle, size_t *nsteps)
-{
- struct derivation_step *first, *current, **lastp, *solution = NULL;
- int best_cost_hi = INT_MAX;
- int best_cost_lo = INT_MAX;
- int result;
-
- /* Look whether an earlier call to `find_derivation' has already
- computed a possible derivation. If so, return it immediately. */
- result = derivation_lookup (fromset_expand ?: fromset, toset_expand ?: toset,
- handle, nsteps);
- if (result == __GCONV_OK)
- {
-#ifndef STATIC_GCONV
- result = increment_counter (*handle, *nsteps);
-#endif
- return result;
- }
-
- /* The task is to find a sequence of transformations, backed by the
- existing modules - whether builtin or dynamically loadable -,
- starting at `fromset' (or `fromset_expand') and ending at `toset'
- (or `toset_expand'), and with minimal cost.
-
- For computer scientists, this is a shortest path search in the
- graph where the nodes are all possible charsets and the edges are
- the transformations listed in __gconv_modules_db.
-
- For now we use a simple algorithm with quadratic runtime behaviour.
- A breadth-first search, starting at `fromset' and `fromset_expand'.
- The list starting at `first' contains all nodes that have been
- visited up to now, in the order in which they have been visited --
- excluding the goal nodes `toset' and `toset_expand' which get
- managed in the list starting at `solution'.
- `current' walks through the list starting at `first' and looks
- which nodes are reachable from the current node, adding them to
- the end of the list [`first' or `solution' respectively] (if
- they are visited the first time) or updating them in place (if
- they have have already been visited).
- In each node of either list, cost_lo and cost_hi contain the
- minimum cost over any paths found up to now, starting at `fromset'
- or `fromset_expand', ending at that node. best_cost_lo and
- best_cost_hi represent the minimum over the elements of the
- `solution' list. */
-
- if (fromset_expand != NULL)
- {
- first = NEW_STEP (fromset_expand, 0, 0, NULL, NULL);
- first->next = NEW_STEP (fromset, 0, 0, NULL, NULL);
- lastp = &first->next->next;
- }
- else
- {
- first = NEW_STEP (fromset, 0, 0, NULL, NULL);
- lastp = &first->next;
- }
-
- for (current = first; current != NULL; current = current->next)
- {
- /* Now match all the available module specifications against the
- current charset name. If any of them matches check whether
- we already have a derivation for this charset. If yes, use the
- one with the lower costs. Otherwise add the new charset at the
- end.
-
- The module database is organized in a tree form which allows
- searching for prefixes. So we search for the first entry with a
- matching prefix and any other matching entry can be found from
- this place. */
- struct gconv_module *node;
-
- /* Maybe it is not necessary anymore to look for a solution for
- this entry since the cost is already as high (or higher) as
- the cost for the best solution so far. */
- if (current->cost_hi > best_cost_hi
- || (current->cost_hi == best_cost_hi
- && current->cost_lo >= best_cost_lo))
- continue;
-
- node = __gconv_modules_db;
- while (node != NULL)
- {
- int cmpres = strcmp (current->result_set, node->from_string);
- if (cmpres == 0)
- {
- /* Walk through the list of modules with this prefix and
- try to match the name. */
- struct gconv_module *runp;
-
- /* Check all the modules with this prefix. */
- runp = node;
- do
- {
- const char *result_set = (strcmp (runp->to_string, "-") == 0
- ? (toset_expand ?: toset)
- : runp->to_string);
- int cost_hi = runp->cost_hi + current->cost_hi;
- int cost_lo = runp->cost_lo + current->cost_lo;
- struct derivation_step *step;
-
- /* We managed to find a derivation. First see whether
- we have reached one of the goal nodes. */
- if (strcmp (result_set, toset) == 0
- || (toset_expand != NULL
- && strcmp (result_set, toset_expand) == 0))
- {
- /* Append to the `solution' list if there
- is no entry with this name. */
- for (step = solution; step != NULL; step = step->next)
- if (strcmp (result_set, step->result_set) == 0)
- break;
-
- if (step == NULL)
- {
- step = NEW_STEP (result_set,
- cost_hi, cost_lo,
- runp, current);
- step->next = solution;
- solution = step;
- }
- else if (step->cost_hi > cost_hi
- || (step->cost_hi == cost_hi
- && step->cost_lo > cost_lo))
- {
- /* A better path was found for the node,
- on the `solution' list. */
- step->code = runp;
- step->last = current;
- step->cost_hi = cost_hi;
- step->cost_lo = cost_lo;
- }
-
- /* Update best_cost accordingly. */
- if (cost_hi < best_cost_hi
- || (cost_hi == best_cost_hi
- && cost_lo < best_cost_lo))
- {
- best_cost_hi = cost_hi;
- best_cost_lo = cost_lo;
- }
- }
- else if (cost_hi < best_cost_hi
- || (cost_hi == best_cost_hi
- && cost_lo < best_cost_lo))
- {
- /* Append at the end of the `first' list if there
- is no entry with this name. */
- for (step = first; step != NULL; step = step->next)
- if (strcmp (result_set, step->result_set) == 0)
- break;
-
- if (step == NULL)
- {
- *lastp = NEW_STEP (result_set,
- cost_hi, cost_lo,
- runp, current);
- lastp = &(*lastp)->next;
- }
- else if (step->cost_hi > cost_hi
- || (step->cost_hi == cost_hi
- && step->cost_lo > cost_lo))
- {
- /* A better path was found for the node,
- on the `first' list. */
- step->code = runp;
- step->last = current;
-
- /* Update the cost for all steps. */
- for (step = first; step != NULL;
- step = step->next)
- /* But don't update the start nodes. */
- if (step->code != NULL)
- {
- struct derivation_step *back;
- int hi, lo;
-
- hi = step->code->cost_hi;
- lo = step->code->cost_lo;
-
- for (back = step->last; back->code != NULL;
- back = back->last)
- {
- hi += back->code->cost_hi;
- lo += back->code->cost_lo;
- }
-
- step->cost_hi = hi;
- step->cost_lo = lo;
- }
-
- /* Likewise for the nodes on the solution list.
- Also update best_cost accordingly. */
- for (step = solution; step != NULL;
- step = step->next)
- {
- step->cost_hi = (step->code->cost_hi
- + step->last->cost_hi);
- step->cost_lo = (step->code->cost_lo
- + step->last->cost_lo);
-
- if (step->cost_hi < best_cost_hi
- || (step->cost_hi == best_cost_hi
- && step->cost_lo < best_cost_lo))
- {
- best_cost_hi = step->cost_hi;
- best_cost_lo = step->cost_lo;
- }
- }
- }
- }
-
- runp = runp->same;
- }
- while (runp != NULL);
-
- break;
- }
- else if (cmpres < 0)
- node = node->left;
- else
- node = node->right;
- }
- }
-
- if (solution != NULL)
- {
- /* We really found a way to do the transformation. */
-
- /* Choose the best solution. This is easy because we know that
- the solution list has at most length 2 (one for every possible
- goal node). */
- if (solution->next != NULL)
- {
- struct derivation_step *solution2 = solution->next;
-
- if (solution2->cost_hi < solution->cost_hi
- || (solution2->cost_hi == solution->cost_hi
- && solution2->cost_lo < solution->cost_lo))
- solution = solution2;
- }
-
- /* Now build a data structure describing the transformation steps. */
- result = gen_steps (solution, toset_expand ?: toset,
- fromset_expand ?: fromset, handle, nsteps);
- }
- else
- {
- /* We haven't found a transformation. Clear the result values. */
- *handle = NULL;
- *nsteps = 0;
- }
-
- /* Add result in any case to list of known derivations. */
- add_derivation (fromset_expand ?: fromset, toset_expand ?: toset,
- *handle, *nsteps);
-
- return result;
-}
-
-
-/* Control of initialization. */
-__libc_once_define (static, once);
-
-
-static const char *
-do_lookup_alias (const char *name)
-{
- struct gconv_alias key;
- struct gconv_alias **found;
-
- key.fromname = (char *) name;
- found = tfind (&key, &__gconv_alias_db, __gconv_alias_compare);
- return found != NULL ? (*found)->toname : NULL;
-}
-
-
-int
-internal_function
-__gconv_compare_alias (const char *name1, const char *name2)
-{
- int result;
-
- /* Ensure that the configuration data is read. */
- __libc_once (once, __gconv_read_conf);
-
- if (__gconv_compare_alias_cache (name1, name2, &result) != 0)
- result = strcmp (do_lookup_alias (name1) ?: name1,
- do_lookup_alias (name2) ?: name2);
-
- return result;
-}
-
-
-int
-internal_function
-__gconv_find_transform (const char *toset, const char *fromset,
- struct __gconv_step **handle, size_t *nsteps,
- int flags)
-{
- const char *fromset_expand;
- const char *toset_expand;
- int result;
-
- /* Ensure that the configuration data is read. */
- __libc_once (once, __gconv_read_conf);
-
- /* Acquire the lock. */
-#ifdef HAVE_DD_LOCK
- __lock_acquire(lock);
-#endif
-
- result = __gconv_lookup_cache (toset, fromset, handle, nsteps, flags);
- if (result != __GCONV_NODB)
- {
- /* We have a cache and could resolve the request, successful or not. */
-#ifdef HAVE_DD_LOCK
- __lock_release(lock);
-#endif
-
- return result;
- }
-
- /* If we don't have a module database return with an error. */
- if (__gconv_modules_db == NULL)
- {
-#ifdef HAVE_DD_LOCK
- __lock_release(lock);
-#endif
-
- return __GCONV_NOCONV;
- }
-
- /* See whether the names are aliases. */
- fromset_expand = do_lookup_alias (fromset);
- toset_expand = do_lookup_alias (toset);
-
- if (__builtin_expect (flags & GCONV_AVOID_NOCONV, 0)
- /* We are not supposed to create a pseudo transformation (means
- copying) when the input and output character set are the same. */
- && (strcmp (toset, fromset) == 0
- || (toset_expand != NULL && strcmp (toset_expand, fromset) == 0)
- || (fromset_expand != NULL
- && (strcmp (toset, fromset_expand) == 0
- || (toset_expand != NULL
- && strcmp (toset_expand, fromset_expand) == 0)))))
- {
- /* Both character sets are the same. */
-#ifdef HAVE_DD_LOCK
- __lock_release(lock);
-#endif
-
- return __GCONV_NOCONV;
- }
-
- result = find_derivation (toset, toset_expand, fromset, fromset_expand,
- handle, nsteps);
-
- /* Release the lock. */
-#ifdef HAVE_DD_LOCK
- __lock_release(lock);
-#endif
-
-
- /* The following code is necessary since `find_derivation' will return
- GCONV_OK even when no derivation was found but the same request
- was processed before. I.e., negative results will also be cached. */
- return (result == __GCONV_OK
- ? (*handle == NULL ? __GCONV_NOCONV : __GCONV_OK)
- : result);
-}
-
-
-/* Release the entries of the modules list. */
-int
-internal_function
-__gconv_close_transform (struct __gconv_step *steps, size_t nsteps)
-{
- int result = __GCONV_OK;
- size_t cnt;
-
- /* Acquire the lock. */
-#ifdef HAVE_DD_LOCK
- __lock_acquire(lock);
-#endif
-
-
-#ifndef STATIC_GCONV
- cnt = nsteps;
- while (cnt-- > 0)
- __gconv_release_step (&steps[cnt]);
-#endif
-
- /* If we use the cache we free a bit more since we don't keep any
- transformation records around, they are cheap enough to
- recreate. */
- __gconv_release_cache (steps, nsteps);
-
- /* Release the lock. */
-#ifdef HAVE_DD_LOCK
- __lock_release(lock);
-#endif
-
-
- return result;
-}
-
-
-/* Free the modules mentioned. */
-static void
-internal_function
-free_modules_db (struct gconv_module *node)
-{
- if (node->left != NULL)
- free_modules_db (node->left);
- if (node->right != NULL)
- free_modules_db (node->right);
- do
- {
- struct gconv_module *act = node;
- node = node->same;
- if (act->module_name[0] == '/')
- free (act);
- }
- while (node != NULL);
-}
-
-
-/* Free all resources if necessary. */
-static void __attribute__ ((unused))
-free_mem (void)
-{
- if (__gconv_alias_db != NULL)
- tdestroy (__gconv_alias_db, free);
-
- if (__gconv_modules_db != NULL)
- free_modules_db (__gconv_modules_db);
-
- if (known_derivations != NULL)
- tdestroy (known_derivations, free_derivation);
-}
-
-text_set_element (__libc_subfreeres, free_mem);
diff --git a/newlib/libc/sys/linux/iconv/gconv_dl.c b/newlib/libc/sys/linux/iconv/gconv_dl.c
deleted file mode 100644
index ee725149f..000000000
--- a/newlib/libc/sys/linux/iconv/gconv_dl.c
+++ /dev/null
@@ -1,237 +0,0 @@
-/* Handle loading/unloading of shared object for transformation.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <assert.h>
-#include <dlfcn.h>
-#include <search.h>
-#include <stdlib.h>
-#include <string.h>
-#include <bits/libc-lock.h>
-#include <sys/param.h>
-#include <ltdl.h>
-
-#include <gconv_int.h>
-
-
-#ifdef DEBUG
-/* For debugging purposes. */
-static void print_all (void);
-#endif
-
-
-/* This is a tuning parameter. If a transformation module is not used
- anymore it gets not immediately unloaded. Instead we wait a certain
- number of load attempts for further modules. If none of the
- subsequent load attempts name the same object it finally gets unloaded.
- Otherwise it is still available which hopefully is the frequent case.
- The following number is the number of unloading attempts we wait
- before unloading. */
-#define TRIES_BEFORE_UNLOAD 2
-
-/* Array of loaded objects. This is shared by all threads so we have
- to use semaphores to access it. */
-static void *loaded;
-
-/* Comparison function for searching `loaded_object' tree. */
-static int
-known_compare (const void *p1, const void *p2)
-{
- const struct __gconv_loaded_object *s1 =
- (const struct __gconv_loaded_object *) p1;
- const struct __gconv_loaded_object *s2 =
- (const struct __gconv_loaded_object *) p2;
-
- return strcmp (s1->name, s2->name);
-}
-
-/* Open the gconv database if necessary. A non-negative return value
- means success. */
-struct __gconv_loaded_object *
-internal_function
-__gconv_find_shlib (const char *name)
-{
- struct __gconv_loaded_object *found;
- void *keyp;
-
-
-
- /* Search the tree of shared objects previously requested. Data in
- the tree are `loaded_object' structures, whose first member is a
- `const char *', the lookup key. The search returns a pointer to
- the tree node structure; the first member of the is a pointer to
- our structure (i.e. what will be a `loaded_object'); since the
- first member of that is the lookup key string, &FCT_NAME is close
- enough to a pointer to our structure to use as a lookup key that
- will be passed to `known_compare' (above). */
-
- keyp = tfind (&name, &loaded, known_compare);
- if (keyp == NULL)
- {
- /* This name was not known before. */
- size_t namelen = strlen (name) + 1;
-
- found = malloc (sizeof (struct __gconv_loaded_object) + namelen);
- if (found != NULL)
- {
- /* Point the tree node at this new structure. */
- found->name = (char *) memcpy (found + 1, name, namelen);
- found->counter = -TRIES_BEFORE_UNLOAD - 1;
- found->handle = NULL;
-
- if (__builtin_expect (tsearch (found, &loaded, known_compare)
- == NULL, 0))
- {
- /* Something went wrong while inserting the entry. */
- free (found);
- found = NULL;
- }
- }
- }
- else
- found = *(struct __gconv_loaded_object **) keyp;
-
- /* Try to load the shared object if the usage count is 0. This
- implies that if the shared object is not loadable, the handle is
- NULL and the usage count > 0. */
- if (found != NULL)
- {
- if (found->counter < -TRIES_BEFORE_UNLOAD)
- {
- assert (found->handle == NULL);
- found->handle = __libc_dlopen (found->name);
- if (found->handle != NULL)
- {
- found->fct = __libc_dlsym (found->handle, "gconv");
- if (found->fct == NULL)
- {
- /* Argh, no conversion function. There is something
- wrong here. */
- __gconv_release_shlib (found);
- found = NULL;
- }
- else
- {
- found->init_fct = __libc_dlsym (found->handle, "gconv_init");
- found->end_fct = __libc_dlsym (found->handle, "gconv_end");
-
- /* We have succeeded in loading the shared object. */
- found->counter = 1;
- }
- }
- else
- /* Error while loading the shared object. */
- found = NULL;
- }
- else if (found->handle != NULL)
- found->counter = MAX (found->counter + 1, 1);
- }
-
- return found;
-}
-
-
-/* This is very ugly but the tsearch functions provide no way to pass
- information to the walker function. So we use a global variable.
- It is MT safe since we use a lock. */
-static struct __gconv_loaded_object *release_handle;
-
-static void
-do_release_shlib (void *nodep, VISIT value, int level)
-{
- struct __gconv_loaded_object *obj = *(struct __gconv_loaded_object **) nodep;
-
-
-
- if (value != preorder && value != leaf)
- return;
-
- if (obj == release_handle)
- {
- /* This is the object we want to unload. Now decrement the
- reference counter. */
- assert (obj->counter > 0);
- --obj->counter;
- }
- else if (obj->counter <= 0 && obj->counter >= -TRIES_BEFORE_UNLOAD
- && --obj->counter < -TRIES_BEFORE_UNLOAD && obj->handle != NULL)
- {
- /* Unload the shared object. */
- __libc_dlclose (obj->handle);
- obj->handle = NULL;
- }
-}
-
-
-/* Notify system that a shared object is not longer needed. */
-void
-internal_function
-__gconv_release_shlib (struct __gconv_loaded_object *handle)
-{
- /* Urgh, this is ugly but we have no other possibility. */
- release_handle = handle;
-
- /* Process all entries. Please note that we also visit entries
- with release counts <= 0. This way we can finally unload them
- if necessary. */
- twalk (loaded, (void *) do_release_shlib);
-}
-
-
-/* We run this if we debug the memory allocation. */
-static void
-do_release_all (void *nodep)
-{
- struct __gconv_loaded_object *obj = (struct __gconv_loaded_object *) nodep;
-
-
- /* Unload the shared object. */
- if (obj->handle != NULL)
- __libc_dlclose (obj->handle);
-
- free (obj);
-}
-
-static void __attribute__ ((unused))
-free_mem (void)
-{
- tdestroy (loaded, do_release_all);
-}
-text_set_element (__libc_subfreeres, free_mem);
-
-
-#ifdef DEBUG
-static void
-do_print (const void *nodep, VISIT value, int level)
-{
- struct __gconv_loaded_object *obj = *(struct __gconv_loaded_object **) nodep;
-
- printf ("%10s: \"%s\", %d\n",
- value == leaf ? "leaf" :
- value == preorder ? "preorder" :
- value == postorder ? "postorder" : "endorder",
- obj->name, obj->counter);
-}
-
-static void
-print_all (void)
-{
- __twalk (loaded, do_print);
-}
-#endif
diff --git a/newlib/libc/sys/linux/iconv/gconv_int.h b/newlib/libc/sys/linux/iconv/gconv_int.h
deleted file mode 100644
index bcd50a2c6..000000000
--- a/newlib/libc/sys/linux/iconv/gconv_int.h
+++ /dev/null
@@ -1,288 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _GCONV_INT_H
-#define _GCONV_INT_H 1
-
-#include "gconv.h"
-#include <libc-symbols.h>
-
-__BEGIN_DECLS
-
-
-/* Type to represent search path. */
-struct path_elem
-{
- const char *name;
- size_t len;
-};
-
-/* Variable with search path for `gconv' implementation. */
-extern struct path_elem *__gconv_path_elem;
-/* Maximum length of a single path element. */
-extern size_t __gconv_max_path_elem_len;
-
-
-/* Structure for alias definition. Simply two strings. */
-struct gconv_alias
-{
- char *fromname;
- char *toname;
-};
-
-
-/* How many character should be conveted in one call? */
-#define GCONV_NCHAR_GOAL 8160
-
-
-/* Structure describing one loaded shared object. This normally are
- objects to perform conversation but as a special case the db shared
- object is also handled. */
-struct __gconv_loaded_object
-{
- /* Name of the object. It must be the first structure element. */
- const char *name;
-
- /* Reference counter for the db functionality. If no conversion is
- needed we unload the db library. */
- int counter;
-
- /* The handle for the shared object. */
- void *handle;
-
- /* Pointer to the functions the module defines. */
- __gconv_fct fct;
- __gconv_init_fct init_fct;
- __gconv_end_fct end_fct;
-};
-
-
-/* Description for an available conversion module. */
-struct gconv_module
-{
- const char *from_string;
- const char *to_string;
-
- int cost_hi;
- int cost_lo;
-
- const char *module_name;
-
- struct gconv_module *left; /* Prefix smaller. */
- struct gconv_module *same; /* List of entries with identical prefix. */
- struct gconv_module *right; /* Prefix larger. */
-};
-
-
-/* Internal data structure to represent transliteration module. */
-struct trans_struct
-{
- const char *name;
- struct trans_struct *next;
-
- const char **csnames;
- size_t ncsnames;
- __gconv_trans_fct trans_fct;
- __gconv_trans_context_fct trans_context_fct;
- __gconv_trans_init_fct trans_init_fct;
- __gconv_trans_end_fct trans_end_fct;
-};
-
-
-/* Flags for `gconv_open'. */
-enum
-{
- GCONV_AVOID_NOCONV = 1 << 0
-};
-
-
-/* Global variables. */
-
-/* Database of alias names. */
-extern void *__gconv_alias_db;
-
-/* Array with available modules. */
-extern size_t __gconv_nmodules;
-extern struct gconv_module *__gconv_modules_db;
-
-/* Value of the GCONV_PATH environment variable. */
-extern const char *__gconv_path_envvar;
-
-
-/* The gconv functions expects the name to be in upper case and complete,
- including the trailing slashes if necessary. */
-#define norm_add_slashes(str,suffix) \
- ({ \
- const char *cp = (str); \
- char *result; \
- char *tmp; \
- size_t cnt = 0; \
- size_t suffix_len = (suffix) == NULL ? 0 : strlen (suffix); \
- \
- while (*cp != '\0') \
- if (*cp++ == '/') \
- ++cnt; \
- \
- tmp = result = alloca (cp - (str) + 3 + suffix_len); \
- cp = (str); \
- while (*cp != '\0') \
- *tmp++ = __toupper_l (*cp++, &_nl_C_locobj); \
- if (cnt < 2) \
- { \
- *tmp++ = '/'; \
- if (cnt < 1) \
- { \
- *tmp++ = '/'; \
- if (suffix != NULL) \
- { \
- tmp = memcpy (tmp, suffix, suffix_len); \
- tmp += suffix_len; \
- } \
- } \
- } \
- *tmp = '\0'; \
- result; \
- })
-
-
-/* Return in *HANDLE decriptor for transformation from FROMSET to TOSET. */
-extern int __gconv_open (const char *toset, const char *fromset,
- __gconv_t *handle, int flags)
- internal_function;
-
-/* Free resources associated with transformation descriptor CD. */
-extern int __gconv_close (__gconv_t cd)
- internal_function;
-
-/* Transform at most *INBYTESLEFT bytes from buffer starting at *INBUF
- according to rules described by CD and place up to *OUTBYTESLEFT
- bytes in buffer starting at *OUTBUF. Return number of non-identical
- conversions in *IRREVERSIBLE if this pointer is not null. */
-extern int __gconv (__gconv_t cd, const unsigned char **inbuf,
- const unsigned char *inbufend, unsigned char **outbuf,
- unsigned char *outbufend, size_t *irreversible)
- internal_function;
-
-/* Return in *HANDLE a pointer to an array with *NSTEPS elements describing
- the single steps necessary for transformation from FROMSET to TOSET. */
-extern int __gconv_find_transform (const char *toset, const char *fromset,
- struct __gconv_step **handle,
- size_t *nsteps, int flags)
- internal_function;
-
-/* Search for transformation in cache data. */
-extern int __gconv_lookup_cache (const char *toset, const char *fromset,
- struct __gconv_step **handle, size_t *nsteps,
- int flags)
- internal_function;
-
-/* Compare the two name for whether they are after alias expansion the
- same. This function uses the cache and fails if none is
- loaded. */
-extern int __gconv_compare_alias_cache (const char *name1, const char *name2,
- int *result) internal_function;
-
-/* Free data associated with a step's structure. */
-extern void __gconv_release_step (struct __gconv_step *step)
- internal_function;
-
-/* Read all the configuration data and cache it. */
-extern void __gconv_read_conf (void);
-
-/* Try to read module cache file. */
-extern int __gconv_load_cache (void) internal_function;
-
-/* Determine the directories we are looking in. */
-extern void __gconv_get_path (void);
-
-/* Comparison function to search alias. */
-extern int __gconv_alias_compare (const void *p1, const void *p2);
-
-/* Clear reference to transformation step implementations which might
- cause the code to be unloaded. */
-extern int __gconv_close_transform (struct __gconv_step *steps,
- size_t nsteps)
- internal_function;
-
-/* Free all resources allocated for the transformation record when
- using the cache. */
-extern void __gconv_release_cache (struct __gconv_step *steps, size_t nsteps)
- internal_function;
-
-/* Load shared object named by NAME. If already loaded increment reference
- count. */
-extern struct __gconv_loaded_object *__gconv_find_shlib (const char *name)
- internal_function;
-
-/* Release shared object. If no further reference is available unload
- the object. */
-extern void __gconv_release_shlib (struct __gconv_loaded_object *handle)
- internal_function;
-
-/* Fill STEP with information about builtin module with NAME. */
-extern void __gconv_get_builtin_trans (const char *name,
- struct __gconv_step *step)
- internal_function;
-
-/* Try to load transliteration step module. */
-extern int __gconv_translit_find (struct trans_struct *trans)
- internal_function;
-
-/* Transliteration using the locale's data. */
-extern int __gconv_transliterate (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- void *trans_data,
- __const unsigned char *inbufstart,
- __const unsigned char **inbufp,
- __const unsigned char *inbufend,
- unsigned char **outbufstart,
- size_t *irreversible);
-
-
-/* Builtin transformations. */
-#ifdef _LIBC
-# define __BUILTIN_TRANS(Name) \
- extern int Name (struct __gconv_step *step, \
- struct __gconv_step_data *data, \
- const unsigned char **inbuf, \
- const unsigned char *inbufend, \
- unsigned char **outbufstart, size_t *irreversible, \
- int do_flush, int consume_incomplete)
-
-__BUILTIN_TRANS (__gconv_transform_ascii_internal);
-__BUILTIN_TRANS (__gconv_transform_internal_ascii);
-__BUILTIN_TRANS (__gconv_transform_utf8_internal);
-__BUILTIN_TRANS (__gconv_transform_internal_utf8);
-__BUILTIN_TRANS (__gconv_transform_ucs2_internal);
-__BUILTIN_TRANS (__gconv_transform_internal_ucs2);
-__BUILTIN_TRANS (__gconv_transform_ucs2reverse_internal);
-__BUILTIN_TRANS (__gconv_transform_internal_ucs2reverse);
-__BUILTIN_TRANS (__gconv_transform_internal_ucs4);
-__BUILTIN_TRANS (__gconv_transform_ucs4_internal);
-__BUILTIN_TRANS (__gconv_transform_internal_ucs4le);
-__BUILTIN_TRANS (__gconv_transform_ucs4le_internal);
-__BUILTIN_TRANS (__gconv_transform_internal_utf16);
-__BUILTIN_TRANS (__gconv_transform_utf16_internal);
-# undef __BUITLIN_TRANS
-
-#endif
-
-__END_DECLS
-
-#endif /* gconv_int.h */
diff --git a/newlib/libc/sys/linux/iconv/gconv_open.c b/newlib/libc/sys/linux/iconv/gconv_open.c
deleted file mode 100644
index 1b2fbb51a..000000000
--- a/newlib/libc/sys/linux/iconv/gconv_open.c
+++ /dev/null
@@ -1,329 +0,0 @@
-/* Find matching transformation algorithms and initialize steps.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <gconv_int.h>
-
-int
-internal_function
-__gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
- int flags)
-{
- struct __gconv_step *steps;
- size_t nsteps;
- __gconv_t result = NULL;
- size_t cnt = 0;
- int res;
- int conv_flags = 0;
- const char *errhand;
- const char *ignore;
- struct trans_struct *trans = NULL;
- char old_locale[20], *old_locale_p;
- char *old, *new;
- size_t len;
-
- /* Find out whether any error handling method is specified. */
- errhand = strchr (toset, '/');
- if (errhand != NULL)
- errhand = strchr (errhand + 1, '/');
- if (__builtin_expect (errhand != NULL, 1))
- {
- if (*++errhand == '\0')
- errhand = NULL;
- else
- {
- /* Make copy without the error handling description. */
- char *newtoset = (char *) alloca (errhand - toset + 1);
- char *tok;
- char *ptr;
-
- newtoset[errhand - toset] = '\0';
- toset = memcpy (newtoset, toset, errhand - toset);
-
- /* Find the appropriate transliteration handlers. */
- old = (char *)(errhand);
- len = strlen (old) + 1;
- new = (char *) alloca (len);
- tok = (char *) memcpy (new, old, len);
-
- tok = strtok_r (tok, ",", &ptr);
-
- /* Set locale to default C locale. */
- old_locale_p = setlocale(LC_ALL, "C");
- strncpy(old_locale, old_locale_p, 20);
-
- while (tok != NULL)
- {
- if (strcasecmp (tok, "TRANSLIT") == 0)
- {
- /* It's the builtin transliteration handling. We only
- support it for working on the internal encoding. */
- static const char *internal_trans_names[1] = { "INTERNAL" };
- struct trans_struct *lastp = NULL;
- struct trans_struct *runp;
-
- for (runp = trans; runp != NULL; runp = runp->next)
- if (runp->trans_fct == __gconv_transliterate)
- break;
- else
- lastp = runp;
-
- if (runp == NULL)
- {
- struct trans_struct *newp;
-
- newp = (struct trans_struct *) alloca (sizeof (*newp));
- memset (newp, '\0', sizeof (*newp));
-
- /* We leave the `name' field zero to signal that
- this is an internal transliteration step. */
- newp->csnames = internal_trans_names;
- newp->ncsnames = 1;
- newp->trans_fct = __gconv_transliterate;
-
- if (lastp == NULL)
- trans = newp;
- else
- lastp->next = newp;
- }
- }
- else if (strcasecmp (tok, "IGNORE") == 0)
- /* Set the flag to ignore all errors. */
- conv_flags |= __GCONV_IGNORE_ERRORS;
- else
- {
- /* `tok' is possibly a module name. We'll see later
- whether we can find it. But first see that we do
- not already a module of this name. */
- struct trans_struct *lastp = NULL;
- struct trans_struct *runp;
-
- for (runp = trans; runp != NULL; runp = runp->next)
- if (runp->name != NULL
- && strcasecmp (tok, runp->name) == 0)
- break;
- else
- lastp = runp;
-
- if (runp == NULL)
- {
- struct trans_struct *newp;
-
- newp = (struct trans_struct *) alloca (sizeof (*newp));
- memset (newp, '\0', sizeof (*newp));
- newp->name = tok;
-
- if (lastp == NULL)
- trans = newp;
- else
- lastp->next = newp;
- }
- }
-
- tok = strtok_r (NULL, ",", &ptr);
- }
- }
- }
-
- /* For the source character set we ignore the error handler specification.
- XXX Is this really always the best? */
- ignore = strchr (fromset, '/');
- if (ignore != NULL && (ignore = strchr (ignore + 1, '/')) != NULL
- && *++ignore != '\0')
- {
- char *newfromset = (char *) alloca (ignore - fromset + 1);
-
- newfromset[ignore - fromset] = '\0';
- fromset = memcpy (newfromset, fromset, ignore - fromset);
- }
-
- res = __gconv_find_transform (toset, fromset, &steps, &nsteps, flags);
- if (res == __GCONV_OK)
- {
- /* Find the modules. */
- struct trans_struct *lastp = NULL;
- struct trans_struct *runp;
-
- for (runp = trans; runp != NULL; runp = runp->next)
- {
- if (runp->name == NULL
- || __builtin_expect (__gconv_translit_find (runp), 0) == 0)
- lastp = runp;
- else
- /* This means we haven't found the module. Remove it. */
- if (lastp == NULL)
- trans = runp->next;
- else
- lastp->next = runp->next;
- }
-
- /* Allocate room for handle. */
- result = (__gconv_t) malloc (sizeof (struct __gconv_info)
- + (nsteps
- * sizeof (struct __gconv_step_data)));
- if (result == NULL)
- res = __GCONV_NOMEM;
- else
- {
- size_t n;
-
- /* Remember the list of steps. */
- result->__steps = steps;
- result->__nsteps = nsteps;
-
- /* Clear the array for the step data. */
- memset (result->__data, '\0',
- nsteps * sizeof (struct __gconv_step_data));
-
- /* Call all initialization functions for the transformation
- step implementations. */
- for (cnt = 0; cnt < nsteps; ++cnt)
- {
- size_t size;
-
- /* Would have to be done if we would not clear the whole
- array above. */
-#if 0
- /* Reset the counter. */
- result->__data[cnt].__invocation_counter = 0;
-
- /* It's a regular use. */
- result->__data[cnt].__internal_use = 0;
-#endif
-
- /* We use the `mbstate_t' member in DATA. */
- result->__data[cnt].__statep = &result->__data[cnt].__state;
-
- /* Now see whether we can use any of the transliteration
- modules for this step. */
- for (runp = trans; runp != NULL; runp = runp->next)
- for (n = 0; n < runp->ncsnames; ++n)
- if (strcasecmp (steps[cnt].__from_name, runp->csnames[n]) == 0)
- {
- void *data = NULL;
-
- /* Match! Now try the initializer. */
- if (runp->trans_init_fct == NULL
- || (runp->trans_init_fct (&data,
- steps[cnt].__to_name)
- == __GCONV_OK))
- {
- /* Append at the end of the list. */
- struct __gconv_trans_data *newp;
- struct __gconv_trans_data **lastp;
-
- newp = (struct __gconv_trans_data *)
- malloc (sizeof (struct __gconv_trans_data));
- if (newp == NULL)
- {
- res = __GCONV_NOMEM;
- goto bail;
- }
-
- newp->__trans_fct = runp->trans_fct;
- newp->__trans_context_fct = runp->trans_context_fct;
- newp->__trans_end_fct = runp->trans_end_fct;
- newp->__data = data;
- newp->__next = NULL;
-
- lastp = &result->__data[cnt].__trans;
- while (*lastp != NULL)
- lastp = &(*lastp)->__next;
-
- *lastp = newp;
- }
- break;
- }
-
- /* If this is the last step we must not allocate an
- output buffer. */
- if (cnt < nsteps - 1)
- {
- result->__data[cnt].__flags = conv_flags;
-
- /* Allocate the buffer. */
- size = (GCONV_NCHAR_GOAL * steps[cnt].__max_needed_to);
-
- result->__data[cnt].__outbuf = (char *) malloc (size);
- if (result->__data[cnt].__outbuf == NULL)
- {
- res = __GCONV_NOMEM;
- goto bail;
- }
-
- result->__data[cnt].__outbufend =
- result->__data[cnt].__outbuf + size;
- }
- else
- {
- /* Handle the last entry. */
- result->__data[cnt].__flags = conv_flags | __GCONV_IS_LAST;
-
- break;
- }
- }
- }
-
- if (res != __GCONV_OK)
- {
- /* Something went wrong. Free all the resources. */
- int serrno;
- bail:
- serrno = errno;
-
- if (result != NULL)
- {
- while (cnt-- > 0)
- {
- struct __gconv_trans_data *transp;
-
- transp = result->__data[cnt].__trans;
- while (transp != NULL)
- {
- struct __gconv_trans_data *curp = transp;
- transp = transp->__next;
-
- if (__builtin_expect (curp->__trans_end_fct != NULL, 0))
- curp->__trans_end_fct (curp->__data);
-
- free (curp);
- }
-
- free (result->__data[cnt].__outbuf);
- }
-
- free (result);
- result = NULL;
- }
-
- __gconv_close_transform (steps, nsteps);
-
- __set_errno (serrno);
- }
- }
-
- *handle = result;
- setlocale(LC_ALL, old_locale);
- return res;
-}
diff --git a/newlib/libc/sys/linux/iconv/gconv_simple.c b/newlib/libc/sys/linux/iconv/gconv_simple.c
deleted file mode 100644
index edc091f7c..000000000
--- a/newlib/libc/sys/linux/iconv/gconv_simple.c
+++ /dev/null
@@ -1,1354 +0,0 @@
-/* Simple transformations functions.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <byteswap.h>
-#include <dlfcn.h>
-#include <endian.h>
-#include <errno.h>
-#include <gconv.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <wchar.h>
-#include <sys/param.h>
-
-#define BUILTIN_ALIAS(s1, s2) /* nothing */
-#define BUILTIN_TRANSFORMATION(From, To, Cost, Name, Fct, MinF, MaxF, \
- MinT, MaxT) \
- extern int Fct (struct __gconv_step *, struct __gconv_step_data *, \
- __const unsigned char **, __const unsigned char *, \
- unsigned char **, size_t *, int, int);
-#include "gconv_builtin.h"
-
-
-#ifndef EILSEQ
-# define EILSEQ EINVAL
-#endif
-
-
-/* Transform from the internal, UCS4-like format, to UCS4. The
- difference between the internal ucs4 format and the real UCS4
- format is, if any, the endianess. The Unicode/ISO 10646 says that
- unless some higher protocol specifies it differently, the byte
- order is big endian.*/
-#define DEFINE_INIT 0
-#define DEFINE_FINI 0
-#define MIN_NEEDED_FROM 4
-#define MIN_NEEDED_TO 4
-#define FROM_DIRECTION 1
-#define FROM_LOOP internal_ucs4_loop
-#define TO_LOOP internal_ucs4_loop /* This is not used. */
-#define FUNCTION_NAME __gconv_transform_internal_ucs4
-
-
-static inline int
-internal_ucs4_loop (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- const unsigned char **inptrp, const unsigned char *inend,
- unsigned char **outptrp, unsigned char *outend,
- size_t *irreversible)
-{
- const unsigned char *inptr = *inptrp;
- unsigned char *outptr = *outptrp;
- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4;
- int result;
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
- /* Sigh, we have to do some real work. */
- size_t cnt;
-
- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
- {
- *((uint32_t *) outptr) = bswap_32 (*(const uint32_t *) inptr);
- outptr = (unsigned char *)((uint32_t *) outptr + 1);
- }
-
- *inptrp = inptr;
- *outptrp = outptr;
-#elif __BYTE_ORDER == __BIG_ENDIAN
- /* Simply copy the data. */
- *inptrp = inptr + n_convert * 4;
- *outptrp = memcpy (outptr, inptr, n_convert * 4);
- *outptrp += n_convert * 4;
-#else
-# error "This endianess is not supported."
-#endif
-
- /* Determine the status. */
- if (*inptrp == inend)
- result = __GCONV_EMPTY_INPUT;
- else if (*outptrp + 4 > outend)
- result = __GCONV_FULL_OUTPUT;
- else
- result = __GCONV_INCOMPLETE_INPUT;
-
- return result;
-}
-
-#ifndef _STRING_ARCH_unaligned
-static inline int
-internal_ucs4_loop_unaligned (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- const unsigned char **inptrp,
- const unsigned char *inend,
- unsigned char **outptrp, unsigned char *outend,
- size_t *irreversible)
-{
- const unsigned char *inptr = *inptrp;
- unsigned char *outptr = *outptrp;
- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4;
- int result;
-
-# if __BYTE_ORDER == __LITTLE_ENDIAN
- /* Sigh, we have to do some real work. */
- size_t cnt;
-
- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4, outptr += 4)
- {
- outptr[0] = inptr[3];
- outptr[1] = inptr[2];
- outptr[2] = inptr[1];
- outptr[3] = inptr[0];
- }
-
- *inptrp = inptr;
- *outptrp = outptr;
-# elif __BYTE_ORDER == __BIG_ENDIAN
- /* Simply copy the data. */
- *inptrp = inptr + n_convert * 4;
- *outptrp = memcpy (outptr, inptr, n_convert * 4);
- *outptrp += n_convert * 4;
-# else
-# error "This endianess is not supported."
-# endif
-
- /* Determine the status. */
- if (*inptrp == inend)
- result = __GCONV_EMPTY_INPUT;
- else if (*outptrp + 4 > outend)
- result = __GCONV_FULL_OUTPUT;
- else
- result = __GCONV_INCOMPLETE_INPUT;
-
- return result;
-}
-#endif
-
-
-static inline int
-internal_ucs4_loop_single (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- const unsigned char **inptrp,
- const unsigned char *inend,
- unsigned char **outptrp, unsigned char *outend,
- size_t *irreversible)
-{
- mbstate_t *state = step_data->__statep;
- size_t cnt = state->__count & 7;
-
- while (*inptrp < inend && cnt < 4)
- state->__value.__wchb[cnt++] = *(*inptrp)++;
-
- if (__builtin_expect (cnt < 4, 0))
- {
- /* Still not enough bytes. Store the ones in the input buffer. */
- state->__count &= ~7;
- state->__count |= cnt;
-
- return __GCONV_INCOMPLETE_INPUT;
- }
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
- (*outptrp)[0] = state->__value.__wchb[3];
- (*outptrp)[1] = state->__value.__wchb[2];
- (*outptrp)[2] = state->__value.__wchb[1];
- (*outptrp)[3] = state->__value.__wchb[0];
-
- *outptrp += 4;
-#elif __BYTE_ORDER == __BIG_ENDIAN
- {
- uint32_t **p = (uint32_t **)outptrp;
- uint32_t *q = *p;
- /* XXX unaligned */
- *q = state->__value.__wch;
- outptrp = (unsigned char *)(p + 1);
- }
-#else
-# error "This endianess is not supported."
-#endif
-
- /* Clear the state buffer. */
- state->__count &= ~7;
-
- return __GCONV_OK;
-}
-
-#include <iconv/skeleton.c>
-
-
-/* Transform from UCS4 to the internal, UCS4-like format. Unlike
- for the other direction we have to check for correct values here. */
-#define DEFINE_INIT 0
-#define DEFINE_FINI 0
-#define MIN_NEEDED_FROM 4
-#define MIN_NEEDED_TO 4
-#define FROM_DIRECTION 1
-#define FROM_LOOP ucs4_internal_loop
-#define TO_LOOP ucs4_internal_loop /* This is not used. */
-#define FUNCTION_NAME __gconv_transform_ucs4_internal
-
-
-static inline int
-ucs4_internal_loop (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- const unsigned char **inptrp, const unsigned char *inend,
- unsigned char **outptrp, unsigned char *outend,
- size_t *irreversible)
-{
- int flags = step_data->__flags;
- const unsigned char *inptr = *inptrp;
- unsigned char *outptr = *outptrp;
- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4;
- int result;
- size_t cnt;
-
- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
- {
- uint32_t inval;
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
- inval = bswap_32 (*(const uint32_t *) inptr);
-#else
- inval = *(const uint32_t *) inptr;
-#endif
-
- if (__builtin_expect (inval > 0x7fffffff, 0))
- {
- /* The value is too large. We don't try transliteration here since
- this is not an error because of the lack of possibilities to
- represent the result. This is a genuine bug in the input since
- UCS4 does not allow such values. */
- if (irreversible == NULL)
- /* We are transliterating, don't try to correct anything. */
- return __GCONV_ILLEGAL_INPUT;
-
- if (flags & __GCONV_IGNORE_ERRORS)
- {
- /* Just ignore this character. */
- *irreversible = *irreversible + 1;
- continue;
- }
-
- *inptrp = inptr;
- *outptrp = outptr;
- return __GCONV_ILLEGAL_INPUT;
- }
-
- *((uint32_t *) outptr) = inval;
- outptr = (unsigned char *) ((uint32_t *) outptr + 1);
- }
-
- *inptrp = inptr;
- *outptrp = outptr;
-
- /* Determine the status. */
- if (*inptrp == inend)
- result = __GCONV_EMPTY_INPUT;
- else if (*outptrp + 4 > outend)
- result = __GCONV_FULL_OUTPUT;
- else
- result = __GCONV_INCOMPLETE_INPUT;
-
- return result;
-}
-
-#ifndef _STRING_ARCH_unaligned
-static inline int
-ucs4_internal_loop_unaligned (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- const unsigned char **inptrp,
- const unsigned char *inend,
- unsigned char **outptrp, unsigned char *outend,
- size_t *irreversible)
-{
- int flags = step_data->__flags;
- const unsigned char *inptr = *inptrp;
- unsigned char *outptr = *outptrp;
- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4;
- int result;
- size_t cnt;
-
- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
- {
- if (__builtin_expect (inptr[0] > 0x80, 0))
- {
- /* The value is too large. We don't try transliteration here since
- this is not an error because of the lack of possibilities to
- represent the result. This is a genuine bug in the input since
- UCS4 does not allow such values. */
- if (irreversible == NULL)
- /* We are transliterating, don't try to correct anything. */
- return __GCONV_ILLEGAL_INPUT;
-
- if (flags & __GCONV_IGNORE_ERRORS)
- {
- /* Just ignore this character. */
- *irreversible = *irreversible + 1;
- continue;
- }
-
- *inptrp = inptr;
- *outptrp = outptr;
- return __GCONV_ILLEGAL_INPUT;
- }
-
-# if __BYTE_ORDER == __LITTLE_ENDIAN
- outptr[3] = inptr[0];
- outptr[2] = inptr[1];
- outptr[1] = inptr[2];
- outptr[0] = inptr[3];
-# else
- outptr[0] = inptr[0];
- outptr[1] = inptr[1];
- outptr[2] = inptr[2];
- outptr[3] = inptr[3];
-# endif
- outptr += 4;
- }
-
- *inptrp = inptr;
- *outptrp = outptr;
-
- /* Determine the status. */
- if (*inptrp == inend)
- result = __GCONV_EMPTY_INPUT;
- else if (*outptrp + 4 > outend)
- result = __GCONV_FULL_OUTPUT;
- else
- result = __GCONV_INCOMPLETE_INPUT;
-
- return result;
-}
-#endif
-
-
-static inline int
-ucs4_internal_loop_single (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- const unsigned char **inptrp,
- const unsigned char *inend,
- unsigned char **outptrp, unsigned char *outend,
- size_t *irreversible)
-{
- mbstate_t *state = step_data->__statep;
- int flags = step_data->__flags;
- size_t cnt = state->__count & 7;
-
- while (*inptrp < inend && cnt < 4)
- state->__value.__wchb[cnt++] = *(*inptrp)++;
-
- if (__builtin_expect (cnt < 4, 0))
- {
- /* Still not enough bytes. Store the ones in the input buffer. */
- state->__count &= ~7;
- state->__count |= cnt;
-
- return __GCONV_INCOMPLETE_INPUT;
- }
-
- if (__builtin_expect (((unsigned char *) state->__value.__wchb)[0] > 0x80,
- 0))
- {
- /* The value is too large. We don't try transliteration here since
- this is not an error because of the lack of possibilities to
- represent the result. This is a genuine bug in the input since
- UCS4 does not allow such values. */
- if (!(flags & __GCONV_IGNORE_ERRORS))
- {
- *inptrp -= cnt - (state->__count & 7);
- return __GCONV_ILLEGAL_INPUT;
- }
- }
- else
- {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
- (*outptrp)[0] = state->__value.__wchb[3];
- (*outptrp)[1] = state->__value.__wchb[2];
- (*outptrp)[2] = state->__value.__wchb[1];
- (*outptrp)[3] = state->__value.__wchb[0];
-#elif __BYTE_ORDER == __BIG_ENDIAN
- (*outptrp)[0] = state->__value.__wchb[0];
- (*outptrp)[1] = state->__value.__wchb[1];
- (*outptrp)[2] = state->__value.__wchb[2];
- (*outptrp)[3] = state->__value.__wchb[3];
-#endif
-
- *outptrp += 4;
- }
-
- /* Clear the state buffer. */
- state->__count &= ~7;
-
- return __GCONV_OK;
-}
-
-#include <iconv/skeleton.c>
-
-
-/* Similarly for the little endian form. */
-#define DEFINE_INIT 0
-#define DEFINE_FINI 0
-#define MIN_NEEDED_FROM 4
-#define MIN_NEEDED_TO 4
-#define FROM_DIRECTION 1
-#define FROM_LOOP internal_ucs4le_loop
-#define TO_LOOP internal_ucs4le_loop /* This is not used. */
-#define FUNCTION_NAME __gconv_transform_internal_ucs4le
-
-
-static inline int
-internal_ucs4le_loop (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- const unsigned char **inptrp, const unsigned char *inend,
- unsigned char **outptrp, unsigned char *outend,
- size_t *irreversible)
-{
- const unsigned char *inptr = *inptrp;
- unsigned char *outptr = *outptrp;
- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4;
- int result;
-
-#if __BYTE_ORDER == __BIG_ENDIAN
- /* Sigh, we have to do some real work. */
- size_t cnt;
-
- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
- *((uint32_t *) outptr)++ = bswap_32 (*(const uint32_t *) inptr);
-
- *inptrp = inptr;
- *outptrp = outptr;
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
- /* Simply copy the data. */
- *inptrp = inptr + n_convert * 4;
- *outptrp = memcpy (outptr, inptr, n_convert * 4);
- *outptrp += n_convert * 4;
-#else
-# error "This endianess is not supported."
-#endif
-
- /* Determine the status. */
- if (*inptrp == inend)
- result = __GCONV_EMPTY_INPUT;
- else if (*outptrp + 4 > outend)
- result = __GCONV_FULL_OUTPUT;
- else
- result = __GCONV_INCOMPLETE_INPUT;
-
- return result;
-}
-
-#ifndef _STRING_ARCH_unaligned
-static inline int
-internal_ucs4le_loop_unaligned (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- const unsigned char **inptrp,
- const unsigned char *inend,
- unsigned char **outptrp, unsigned char *outend,
- size_t *irreversible)
-{
- const unsigned char *inptr = *inptrp;
- unsigned char *outptr = *outptrp;
- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4;
- int result;
-
-# if __BYTE_ORDER == __BIG_ENDIAN
- /* Sigh, we have to do some real work. */
- size_t cnt;
-
- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4, outptr += 4)
- {
- outptr[0] = inptr[3];
- outptr[1] = inptr[2];
- outptr[2] = inptr[1];
- outptr[3] = inptr[0];
- }
-
- *inptrp = inptr;
- *outptrp = outptr;
-# elif __BYTE_ORDER == __LITTLE_ENDIAN
- /* Simply copy the data. */
- *inptrp = inptr + n_convert * 4;
- *outptrp = memcpy (outptr, inptr, n_convert * 4);
- *outptrp += n_convert * 4;
-# else
-# error "This endianess is not supported."
-# endif
-
- /* Determine the status. */
- if (*inptrp + 4 > inend)
- result = __GCONV_EMPTY_INPUT;
- else if (*outptrp + 4 > outend)
- result = __GCONV_FULL_OUTPUT;
- else
- result = __GCONV_INCOMPLETE_INPUT;
-
- return result;
-}
-#endif
-
-
-static inline int
-internal_ucs4le_loop_single (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- const unsigned char **inptrp,
- const unsigned char *inend,
- unsigned char **outptrp, unsigned char *outend,
- size_t *irreversible)
-{
- mbstate_t *state = step_data->__statep;
- size_t cnt = state->__count & 7;
-
- while (*inptrp < inend && cnt < 4)
- state->__value.__wchb[cnt++] = *(*inptrp)++;
-
- if (__builtin_expect (cnt < 4, 0))
- {
- /* Still not enough bytes. Store the ones in the input buffer. */
- state->__count &= ~7;
- state->__count |= cnt;
-
- return __GCONV_INCOMPLETE_INPUT;
- }
-
-#if __BYTE_ORDER == __BIG_ENDIAN
- (*outptrp)[0] = state->__value.__wchb[3];
- (*outptrp)[1] = state->__value.__wchb[2];
- (*outptrp)[2] = state->__value.__wchb[1];
- (*outptrp)[3] = state->__value.__wchb[0];
-
- *outptrp += 4;
-#else
- {
- /* XXX unaligned */
- uint32_t **p = (uint32_t **)outptrp;
- uint32_t *q = *p;
- *q = state->__value.__wch;
- outptrp = (unsigned char **)(p + 1);
- }
-#endif
-
- /* Clear the state buffer. */
- state->__count &= ~7;
-
- return __GCONV_OK;
-}
-
-#include <iconv/skeleton.c>
-
-
-/* And finally from UCS4-LE to the internal encoding. */
-#define DEFINE_INIT 0
-#define DEFINE_FINI 0
-#define MIN_NEEDED_FROM 4
-#define MIN_NEEDED_TO 4
-#define FROM_DIRECTION 1
-#define FROM_LOOP ucs4le_internal_loop
-#define TO_LOOP ucs4le_internal_loop /* This is not used. */
-#define FUNCTION_NAME __gconv_transform_ucs4le_internal
-
-
-static inline int
-ucs4le_internal_loop (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- const unsigned char **inptrp, const unsigned char *inend,
- unsigned char **outptrp, unsigned char *outend,
- size_t *irreversible)
-{
- int flags = step_data->__flags;
- const unsigned char *inptr = *inptrp;
- unsigned char *outptr = *outptrp;
- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4;
- int result;
- size_t cnt;
-
- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
- {
- uint32_t inval;
-
-#if __BYTE_ORDER == __BIG_ENDIAN
- inval = bswap_32 (*(const uint32_t *) inptr);
-#else
- inval = *(const uint32_t *) inptr;
-#endif
-
- if (__builtin_expect (inval > 0x7fffffff, 0))
- {
- /* The value is too large. We don't try transliteration here since
- this is not an error because of the lack of possibilities to
- represent the result. This is a genuine bug in the input since
- UCS4 does not allow such values. */
- if (irreversible == NULL)
- /* We are transliterating, don't try to correct anything. */
- return __GCONV_ILLEGAL_INPUT;
-
- if (flags & __GCONV_IGNORE_ERRORS)
- {
- /* Just ignore this character. */
- ++*irreversible;
- continue;
- }
-
- return __GCONV_ILLEGAL_INPUT;
- }
-
- *((uint32_t *) outptr) = inval;
- outptr = (unsigned char *)((uint32_t *) outptr + 1);
- }
-
- *inptrp = inptr;
- *outptrp = outptr;
-
- /* Determine the status. */
- if (*inptrp == inend)
- result = __GCONV_EMPTY_INPUT;
- else if (*outptrp + 4 > outend)
- result = __GCONV_FULL_OUTPUT;
- else
- result = __GCONV_INCOMPLETE_INPUT;
-
- return result;
-}
-
-#ifndef _STRING_ARCH_unaligned
-static inline int
-ucs4le_internal_loop_unaligned (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- const unsigned char **inptrp,
- const unsigned char *inend,
- unsigned char **outptrp, unsigned char *outend,
- size_t *irreversible)
-{
- int flags = step_data->__flags;
- const unsigned char *inptr = *inptrp;
- unsigned char *outptr = *outptrp;
- size_t n_convert = MIN (inend - inptr, outend - outptr) / 4;
- int result;
- size_t cnt;
-
- for (cnt = 0; cnt < n_convert; ++cnt, inptr += 4)
- {
- if (__builtin_expect (inptr[3] > 0x80, 0))
- {
- /* The value is too large. We don't try transliteration here since
- this is not an error because of the lack of possibilities to
- represent the result. This is a genuine bug in the input since
- UCS4 does not allow such values. */
- if (irreversible == NULL)
- /* We are transliterating, don't try to correct anything. */
- return __GCONV_ILLEGAL_INPUT;
-
- if (flags & __GCONV_IGNORE_ERRORS)
- {
- /* Just ignore this character. */
- ++*irreversible;
- continue;
- }
-
- *inptrp = inptr;
- *outptrp = outptr;
- return __GCONV_ILLEGAL_INPUT;
- }
-
-# if __BYTE_ORDER == __BIG_ENDIAN
- outptr[3] = inptr[0];
- outptr[2] = inptr[1];
- outptr[1] = inptr[2];
- outptr[0] = inptr[3];
-# else
- outptr[0] = inptr[0];
- outptr[1] = inptr[1];
- outptr[2] = inptr[2];
- outptr[3] = inptr[3];
-# endif
-
- outptr += 4;
- }
-
- *inptrp = inptr;
- *outptrp = outptr;
-
- /* Determine the status. */
- if (*inptrp == inend)
- result = __GCONV_EMPTY_INPUT;
- else if (*outptrp + 4 > outend)
- result = __GCONV_FULL_OUTPUT;
- else
- result = __GCONV_INCOMPLETE_INPUT;
-
- return result;
-}
-#endif
-
-
-static inline int
-ucs4le_internal_loop_single (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- const unsigned char **inptrp,
- const unsigned char *inend,
- unsigned char **outptrp, unsigned char *outend,
- size_t *irreversible)
-{
- mbstate_t *state = step_data->__statep;
- int flags = step_data->__flags;
- size_t cnt = state->__count & 7;
-
- while (*inptrp < inend && cnt < 4)
- state->__value.__wchb[cnt++] = *(*inptrp)++;
-
- if (__builtin_expect (cnt < 4, 0))
- {
- /* Still not enough bytes. Store the ones in the input buffer. */
- state->__count &= ~7;
- state->__count |= cnt;
-
- return __GCONV_INCOMPLETE_INPUT;
- }
-
- if (__builtin_expect (((unsigned char *) state->__value.__wchb)[3] > 0x80,
- 0))
- {
- /* The value is too large. We don't try transliteration here since
- this is not an error because of the lack of possibilities to
- represent the result. This is a genuine bug in the input since
- UCS4 does not allow such values. */
- if (!(flags & __GCONV_IGNORE_ERRORS))
- return __GCONV_ILLEGAL_INPUT;
- }
- else
- {
-#if __BYTE_ORDER == __BIG_ENDIAN
- (*outptrp)[0] = state->__value.__wchb[3];
- (*outptrp)[1] = state->__value.__wchb[2];
- (*outptrp)[2] = state->__value.__wchb[1];
- (*outptrp)[3] = state->__value.__wchb[0];
-#elif __BYTE_ORDER == __BIG_ENDIAN
- (*outptrp)[0] = state->__value.__wchb[0];
- (*outptrp)[1] = state->__value.__wchb[1];
- (*outptrp)[2] = state->__value.__wchb[2];
- (*outptrp)[3] = state->__value.__wchb[3];
-#endif
-
- *outptrp += 4;
- }
-
- /* Clear the state buffer. */
- state->__count &= ~7;
-
- return __GCONV_OK;
-}
-
-#include <iconv/skeleton.c>
-
-
-/* Convert from ISO 646-IRV to the internal (UCS4-like) format. */
-#define DEFINE_INIT 0
-#define DEFINE_FINI 0
-#define MIN_NEEDED_FROM 1
-#define MIN_NEEDED_TO 4
-#define FROM_DIRECTION 1
-#define FROM_LOOP ascii_internal_loop
-#define TO_LOOP ascii_internal_loop /* This is not used. */
-#define FUNCTION_NAME __gconv_transform_ascii_internal
-#define ONE_DIRECTION 1
-
-#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
-#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
-#define LOOPFCT FROM_LOOP
-#define BODY \
- { \
- if (__builtin_expect (*inptr > '\x7f', 0)) \
- { \
- /* The value is too large. We don't try transliteration here since \
- this is not an error because of the lack of possibilities to \
- represent the result. This is a genuine bug in the input since \
- ASCII does not allow such values. */ \
- if (! ignore_errors_p ()) \
- { \
- /* This is no correct ANSI_X3.4-1968 character. */ \
- result = __GCONV_ILLEGAL_INPUT; \
- break; \
- } \
- \
- *irreversible = *irreversible + 1; \
- ++inptr; \
- } \
- else \
- { \
- /* It's an one byte sequence. */ \
- *((uint32_t *) outptr) = *inptr; \
- ++inptr; \
- outptr = (unsigned char *)((uint32_t *) outptr + 1); \
- } \
- }
-#define LOOP_NEED_FLAGS
-#include <iconv/loop.c>
-#include <iconv/skeleton.c>
-
-
-/* Convert from the internal (UCS4-like) format to ISO 646-IRV. */
-#define DEFINE_INIT 0
-#define DEFINE_FINI 0
-#define MIN_NEEDED_FROM 4
-#define MIN_NEEDED_TO 1
-#define FROM_DIRECTION 1
-#define FROM_LOOP internal_ascii_loop
-#define TO_LOOP internal_ascii_loop /* This is not used. */
-#define FUNCTION_NAME __gconv_transform_internal_ascii
-#define ONE_DIRECTION 1
-
-#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
-#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
-#define LOOPFCT FROM_LOOP
-#define BODY \
- { \
- if (__builtin_expect (*((const uint32_t *) inptr) > 0x7f, 0)) \
- { \
- UNICODE_TAG_HANDLER (*((const uint32_t *) inptr), 4); \
- STANDARD_ERR_HANDLER (4); \
- } \
- else \
- { \
- /* It's an one byte sequence. */ \
- *outptr++ = *((const uint32_t *) inptr); \
- inptr = ((const uint32_t *) inptr + 1); \
- } \
- }
-#define LOOP_NEED_FLAGS
-#include <iconv/loop.c>
-#include <iconv/skeleton.c>
-
-
-/* Convert from the internal (UCS4-like) format to UTF-8. */
-#define DEFINE_INIT 0
-#define DEFINE_FINI 0
-#define MIN_NEEDED_FROM 4
-#define MIN_NEEDED_TO 1
-#define MAX_NEEDED_TO 6
-#define FROM_DIRECTION 1
-#define FROM_LOOP internal_utf8_loop
-#define TO_LOOP internal_utf8_loop /* This is not used. */
-#define FUNCTION_NAME __gconv_transform_internal_utf8
-#define ONE_DIRECTION 1
-
-#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
-#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
-#define MAX_NEEDED_OUTPUT MAX_NEEDED_TO
-#define LOOPFCT FROM_LOOP
-#define BODY \
- { \
- uint32_t wc = *((const uint32_t *) inptr); \
- \
- if (wc < 0x80) \
- /* It's an one byte sequence. */ \
- *outptr++ = (unsigned char) wc; \
- else if (__builtin_expect (wc <= 0x7fffffff, 1)) \
- { \
- size_t step; \
- char *start; \
- \
- for (step = 2; step < 6; ++step) \
- if ((wc & (~(uint32_t)0 << (5 * step + 1))) == 0) \
- break; \
- \
- if (__builtin_expect (outptr + step > outend, 0)) \
- { \
- /* Too long. */ \
- result = __GCONV_FULL_OUTPUT; \
- break; \
- } \
- \
- start = outptr; \
- *outptr = (unsigned char) (~0xff >> step); \
- outptr += step; \
- --step; \
- do \
- { \
- start[step] = 0x80 | (wc & 0x3f); \
- wc >>= 6; \
- } \
- while (--step > 0); \
- start[0] |= wc; \
- } \
- else \
- { \
- STANDARD_ERR_HANDLER (4); \
- } \
- \
- inptr += 4; \
- }
-#define LOOP_NEED_FLAGS
-#include <iconv/loop.c>
-#include <iconv/skeleton.c>
-
-
-/* Convert from UTF-8 to the internal (UCS4-like) format. */
-#define DEFINE_INIT 0
-#define DEFINE_FINI 0
-#define MIN_NEEDED_FROM 1
-#define MAX_NEEDED_FROM 6
-#define MIN_NEEDED_TO 4
-#define FROM_DIRECTION 1
-#define FROM_LOOP utf8_internal_loop
-#define TO_LOOP utf8_internal_loop /* This is not used. */
-#define FUNCTION_NAME __gconv_transform_utf8_internal
-#define ONE_DIRECTION 1
-
-#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
-#define MAX_NEEDED_INPUT MAX_NEEDED_FROM
-#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
-#define LOOPFCT FROM_LOOP
-#define BODY \
- { \
- uint32_t ch; \
- uint32_t cnt; \
- uint32_t i; \
- \
- /* Next input byte. */ \
- ch = *inptr; \
- \
- if (ch < 0x80) \
- { \
- /* One byte sequence. */ \
- cnt = 1; \
- ++inptr; \
- } \
- else \
- { \
- if (ch >= 0xc2 && ch < 0xe0) \
- { \
- /* We expect two bytes. The first byte cannot be 0xc0 or 0xc1, \
- otherwise the wide character could have been represented \
- using a single byte. */ \
- cnt = 2; \
- ch &= 0x1f; \
- } \
- else if (__builtin_expect ((ch & 0xf0) == 0xe0, 1)) \
- { \
- /* We expect three bytes. */ \
- cnt = 3; \
- ch &= 0x0f; \
- } \
- else if (__builtin_expect ((ch & 0xf8) == 0xf0, 1)) \
- { \
- /* We expect four bytes. */ \
- cnt = 4; \
- ch &= 0x07; \
- } \
- else if (__builtin_expect ((ch & 0xfc) == 0xf8, 1)) \
- { \
- /* We expect five bytes. */ \
- cnt = 5; \
- ch &= 0x03; \
- } \
- else if (__builtin_expect ((ch & 0xfe) == 0xfc, 1)) \
- { \
- /* We expect six bytes. */ \
- cnt = 6; \
- ch &= 0x01; \
- } \
- else \
- { \
- int skipped; \
- \
- if (! ignore_errors_p ()) \
- { \
- /* This is an illegal encoding. */ \
- result = __GCONV_ILLEGAL_INPUT; \
- break; \
- } \
- \
- /* Search the end of this ill-formed UTF-8 character. This \
- is the next byte with (x & 0xc0) != 0x80. */ \
- skipped = 0; \
- do \
- { \
- ++inptr; \
- ++skipped; \
- } \
- while (inptr < inend && (*inptr & 0xc0) == 0x80 && skipped < 5); \
- \
- continue; \
- } \
- \
- if (__builtin_expect (inptr + cnt > inend, 0)) \
- { \
- /* We don't have enough input. But before we report that check \
- that all the bytes are correct. */ \
- for (i = 1; inptr + i < inend; ++i) \
- if ((inptr[i] & 0xc0) != 0x80) \
- break; \
- \
- if (__builtin_expect (inptr + i == inend, 1)) \
- { \
- result = __GCONV_INCOMPLETE_INPUT; \
- break; \
- } \
- \
- if (ignore_errors_p ()) \
- { \
- /* Ignore it. */ \
- inptr += i; \
- *irreversible = *irreversible + 1; \
- continue; \
- } \
- \
- result = __GCONV_ILLEGAL_INPUT; \
- break; \
- } \
- \
- /* Read the possible remaining bytes. */ \
- for (i = 1; i < cnt; ++i) \
- { \
- uint32_t byte = inptr[i]; \
- \
- if ((byte & 0xc0) != 0x80) \
- /* This is an illegal encoding. */ \
- break; \
- \
- ch <<= 6; \
- ch |= byte & 0x3f; \
- } \
- \
- /* If i < cnt, some trail byte was not >= 0x80, < 0xc0. \
- If cnt > 2 and ch < 2^(5*cnt-4), the wide character ch could \
- have been represented with fewer than cnt bytes. */ \
- if (i < cnt || (cnt > 2 && (ch >> (5 * cnt - 4)) == 0)) \
- { \
- /* This is an illegal encoding. */ \
- if (ignore_errors_p ()) \
- { \
- inptr += i; \
- *irreversible = *irreversible + 1; \
- continue; \
- } \
- \
- result = __GCONV_ILLEGAL_INPUT; \
- break; \
- } \
- \
- inptr += cnt; \
- } \
- \
- /* Now adjust the pointers and store the result. */ \
- *((uint32_t *) outptr) = ch; \
- outptr = (unsigned char *)((uint32_t *) outptr + 1); \
- }
-#define LOOP_NEED_FLAGS
-
-#define STORE_REST \
- { \
- /* We store the remaining bytes while converting them into the UCS4 \
- format. We can assume that the first byte in the buffer is \
- correct and that it requires a larger number of bytes than there \
- are in the input buffer. */ \
- wint_t ch = **inptrp; \
- size_t cnt; \
- \
- state->__count = inend - *inptrp; \
- \
- if (ch >= 0xc2 && ch < 0xe0) \
- { \
- /* We expect two bytes. The first byte cannot be 0xc0 or \
- 0xc1, otherwise the wide character could have been \
- represented using a single byte. */ \
- cnt = 2; \
- ch &= 0x1f; \
- } \
- else if (__builtin_expect ((ch & 0xf0) == 0xe0, 1)) \
- { \
- /* We expect three bytes. */ \
- cnt = 3; \
- ch &= 0x0f; \
- } \
- else if (__builtin_expect ((ch & 0xf8) == 0xf0, 1)) \
- { \
- /* We expect four bytes. */ \
- cnt = 4; \
- ch &= 0x07; \
- } \
- else if (__builtin_expect ((ch & 0xfc) == 0xf8, 1)) \
- { \
- /* We expect five bytes. */ \
- cnt = 5; \
- ch &= 0x03; \
- } \
- else \
- { \
- /* We expect six bytes. */ \
- cnt = 6; \
- ch &= 0x01; \
- } \
- \
- /* The first byte is already consumed. */ \
- --cnt; \
- while (++(*inptrp) < inend) \
- { \
- ch <<= 6; \
- ch |= **inptrp & 0x3f; \
- --cnt; \
- } \
- \
- /* Shift for the so far missing bytes. */ \
- ch <<= cnt * 6; \
- \
- /* Store the value. */ \
- state->__value.__wch = ch; \
- }
-
-#define UNPACK_BYTES \
- { \
- wint_t wch = state->__value.__wch; \
- size_t ntotal; \
- inlen = state->__count; \
- \
- if (state->__value.__wch <= 0x7ff) \
- { \
- bytebuf[0] = 0xc0; \
- ntotal = 2; \
- } \
- else if (__builtin_expect (state->__value.__wch <= 0xffff, 1)) \
- { \
- bytebuf[0] = 0xe0; \
- ntotal = 3; \
- } \
- else if (__builtin_expect (state->__value.__wch < 0x1fffff, 1)) \
- { \
- bytebuf[0] = 0xf0; \
- ntotal = 4; \
- } \
- else if (__builtin_expect (state->__value.__wch < 0x3ffffff, 1)) \
- { \
- bytebuf[0] = 0xf8; \
- ntotal = 5; \
- } \
- else \
- { \
- bytebuf[0] = 0xfc; \
- ntotal = 6; \
- } \
- \
- do \
- { \
- if (--ntotal < inlen) \
- bytebuf[ntotal] = 0x80 | (wch & 0x3f); \
- wch >>= 6; \
- } \
- while (ntotal > 1); \
- \
- bytebuf[0] |= wch; \
- }
-
-#include <iconv/loop.c>
-#include <iconv/skeleton.c>
-
-
-/* Convert from UCS2 to the internal (UCS4-like) format. */
-#define DEFINE_INIT 0
-#define DEFINE_FINI 0
-#define MIN_NEEDED_FROM 2
-#define MIN_NEEDED_TO 4
-#define FROM_DIRECTION 1
-#define FROM_LOOP ucs2_internal_loop
-#define TO_LOOP ucs2_internal_loop /* This is not used. */
-#define FUNCTION_NAME __gconv_transform_ucs2_internal
-#define ONE_DIRECTION 1
-
-#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
-#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
-#define LOOPFCT FROM_LOOP
-#define BODY \
- { \
- uint16_t u1 = *((const uint16_t *) inptr); \
- \
- if (__builtin_expect (u1 >= 0xd800 && u1 < 0xe000, 0)) \
- { \
- /* Surrogate characters in UCS-2 input are not valid. Reject \
- them. (Catching this here is not security relevant.) */ \
- if (! ignore_errors_p ()) \
- { \
- result = __GCONV_ILLEGAL_INPUT; \
- break; \
- } \
- inptr += 2; \
- *irreversible = *irreversible + 1; \
- continue; \
- } \
- \
- *((uint32_t *) outptr) = u1; \
- outptr = (unsigned char *)((uint32_t *) outptr + 1); \
- inptr += 2; \
- }
-#define LOOP_NEED_FLAGS
-#include <iconv/loop.c>
-#include <iconv/skeleton.c>
-
-
-/* Convert from the internal (UCS4-like) format to UCS2. */
-#define DEFINE_INIT 0
-#define DEFINE_FINI 0
-#define MIN_NEEDED_FROM 4
-#define MIN_NEEDED_TO 2
-#define FROM_DIRECTION 1
-#define FROM_LOOP internal_ucs2_loop
-#define TO_LOOP internal_ucs2_loop /* This is not used. */
-#define FUNCTION_NAME __gconv_transform_internal_ucs2
-#define ONE_DIRECTION 1
-
-#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
-#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
-#define LOOPFCT FROM_LOOP
-#define BODY \
- { \
- uint32_t val = *((const uint32_t *) inptr); \
- \
- if (__builtin_expect (val >= 0x10000, 0)) \
- { \
- UNICODE_TAG_HANDLER (val, 4); \
- STANDARD_ERR_HANDLER (4); \
- } \
- else if (__builtin_expect (val >= 0xd800 && val < 0xe000, 0)) \
- { \
- /* Surrogate characters in UCS-4 input are not valid. \
- We must catch this, because the UCS-2 output might be \
- interpreted as UTF-16 by other programs. If we let \
- surrogates pass through, attackers could make a security \
- hole exploit by synthesizing any desired plane 1-16 \
- character. */ \
- if (! ignore_errors_p ()) \
- { \
- result = __GCONV_ILLEGAL_INPUT; \
- break; \
- } \
- inptr += 4; \
- *irreversible = *irreversible + 1; \
- continue; \
- } \
- else \
- { \
- *((uint16_t *) outptr) = val; \
- outptr = (unsigned char *)((uint16_t *) outptr + 1); \
- inptr += 4; \
- } \
- }
-#define LOOP_NEED_FLAGS
-#include <iconv/loop.c>
-#include <iconv/skeleton.c>
-
-
-/* Convert from UCS2 in other endianness to the internal (UCS4-like) format. */
-#define DEFINE_INIT 0
-#define DEFINE_FINI 0
-#define MIN_NEEDED_FROM 2
-#define MIN_NEEDED_TO 4
-#define FROM_DIRECTION 1
-#define FROM_LOOP ucs2reverse_internal_loop
-#define TO_LOOP ucs2reverse_internal_loop/* This is not used.*/
-#define FUNCTION_NAME __gconv_transform_ucs2reverse_internal
-#define ONE_DIRECTION 1
-
-#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
-#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
-#define LOOPFCT FROM_LOOP
-#define BODY \
- { \
- uint16_t u1 = bswap_16 (*((const uint16_t *) inptr)); \
- \
- if (__builtin_expect (u1 >= 0xd800 && u1 < 0xe000, 0)) \
- { \
- /* Surrogate characters in UCS-2 input are not valid. Reject \
- them. (Catching this here is not security relevant.) */ \
- if (! ignore_errors_p ()) \
- { \
- result = __GCONV_ILLEGAL_INPUT; \
- break; \
- } \
- inptr += 2; \
- *irreversible = *irreversible + 1; \
- continue; \
- } \
- \
- *((uint32_t *) outptr) = u1; \
- outptr = (unsigned char *)((uint32_t *) outptr + 1); \
- inptr += 2; \
- }
-#define LOOP_NEED_FLAGS
-#include <iconv/loop.c>
-#include <iconv/skeleton.c>
-
-
-/* Convert from the internal (UCS4-like) format to UCS2 in other endianness. */
-#define DEFINE_INIT 0
-#define DEFINE_FINI 0
-#define MIN_NEEDED_FROM 4
-#define MIN_NEEDED_TO 2
-#define FROM_DIRECTION 1
-#define FROM_LOOP internal_ucs2reverse_loop
-#define TO_LOOP internal_ucs2reverse_loop/* This is not used.*/
-#define FUNCTION_NAME __gconv_transform_internal_ucs2reverse
-#define ONE_DIRECTION 1
-
-#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
-#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
-#define LOOPFCT FROM_LOOP
-#define BODY \
- { \
- uint32_t val = *((const uint32_t *) inptr); \
- if (__builtin_expect (val >= 0x10000, 0)) \
- { \
- UNICODE_TAG_HANDLER (val, 4); \
- STANDARD_ERR_HANDLER (4); \
- } \
- else if (__builtin_expect (val >= 0xd800 && val < 0xe000, 0)) \
- { \
- /* Surrogate characters in UCS-4 input are not valid. \
- We must catch this, because the UCS-2 output might be \
- interpreted as UTF-16 by other programs. If we let \
- surrogates pass through, attackers could make a security \
- hole exploit by synthesizing any desired plane 1-16 \
- character. */ \
- if (! ignore_errors_p ()) \
- { \
- result = __GCONV_ILLEGAL_INPUT; \
- break; \
- } \
- inptr += 4; \
- *irreversible = *irreversible + 1; \
- continue; \
- } \
- else \
- { \
- *((uint16_t *) outptr) = bswap_16 (val); \
- outptr = (unsigned char *)((uint16_t *) outptr + 1); \
- inptr += 4; \
- } \
- }
-#define LOOP_NEED_FLAGS
-#include <iconv/loop.c>
-#include <iconv/skeleton.c>
diff --git a/newlib/libc/sys/linux/iconv/gconv_trans.c b/newlib/libc/sys/linux/iconv/gconv_trans.c
deleted file mode 100644
index dcc1004e1..000000000
--- a/newlib/libc/sys/linux/iconv/gconv_trans.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/* Transliteration using the locale's data.
- Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <assert.h>
-#include <dlfcn.h>
-#include <search.h>
-#include <stdint.h>
-#include <string.h>
-#include <stdlib.h>
-#include <dirent.h>
-#include <ltdl.h>
-
-#include "gconv_int.h"
-#include "localeinfo.h"
-
-int
-__gconv_transliterate (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- void *trans_data __attribute__ ((unused)),
- const unsigned char *inbufstart,
- const unsigned char **inbufp,
- const unsigned char *inbufend,
- unsigned char **outbufstart, size_t *irreversible)
-{
- return 0;
-}
-
-
-/* Structure to represent results of found (or not) transliteration
- modules. */
-struct known_trans
-{
- /* This structure must remain the first member. */
- struct trans_struct info;
-
- char *fname;
- void *handle;
- int open_count;
-};
-
-
-/* Tree with results of previous calls to __gconv_translit_find. */
-static void *search_tree;
-
-/* We modify global data. */
-__LOCK_INIT(static, lock);
-
-/* Compare two transliteration entries. */
-static int
-trans_compare (const void *p1, const void *p2)
-{
- const struct known_trans *s1 = (const struct known_trans *) p1;
- const struct known_trans *s2 = (const struct known_trans *) p2;
-
- return strcmp (s1->info.name, s2->info.name);
-}
-
-
-/* Open (maybe reopen) the module named in the struct. Get the function
- and data structure pointers we need. */
-static int
-open_translit (struct known_trans *trans)
-{
- __gconv_trans_query_fct queryfct;
-
- trans->handle = __libc_dlopen (trans->fname);
- if (trans->handle == NULL)
- /* Not available. */
- return 1;
-
- /* Find the required symbol. */
- queryfct = __libc_dlsym (trans->handle, "gconv_trans_context");
- if (queryfct == NULL)
- {
- /* We cannot live with that. */
- close_and_out:
- __libc_dlclose (trans->handle);
- trans->handle = NULL;
- return 1;
- }
-
- /* Get the context. */
- if (queryfct (trans->info.name, &trans->info.csnames, &trans->info.ncsnames)
- != 0)
- goto close_and_out;
-
- /* Of course we also have to have the actual function. */
- trans->info.trans_fct = __libc_dlsym (trans->handle, "gconv_trans");
- if (trans->info.trans_fct == NULL)
- goto close_and_out;
-
- /* Now the optional functions. */
- trans->info.trans_init_fct =
- __libc_dlsym (trans->handle, "gconv_trans_init");
- trans->info.trans_context_fct =
- __libc_dlsym (trans->handle, "gconv_trans_context");
- trans->info.trans_end_fct =
- __libc_dlsym (trans->handle, "gconv_trans_end");
-
- trans->open_count = 1;
-
- return 0;
-}
-
-
-int
-internal_function
-__gconv_translit_find (struct trans_struct *trans)
-{
- struct known_trans **found;
- const struct path_elem *runp;
- int res = 1;
-
- /* We have to have a name. */
- assert (trans->name != NULL);
-
- /* Acquire the lock. */
-#ifdef HAVE_DD_LOCK
- __lock_acquire(lock);
-#endif
-
- /* See whether we know this module already. */
- found = tfind (trans, &search_tree, trans_compare);
- if (found != NULL)
- {
- /* Is this module available? */
- if ((*found)->handle != NULL)
- {
- /* Maybe we have to reopen the file. */
- if ((*found)->handle != (void *) -1)
- /* The object is not unloaded. */
- res = 0;
- else if (open_translit (*found) == 0)
- {
- /* Copy the data. */
- *trans = (*found)->info;
- (*found)->open_count++;
- res = 0;
- }
- }
- }
- else
- {
- size_t name_len = strlen (trans->name) + 1;
- int need_so = 0;
- struct known_trans *newp;
-
- /* We have to continue looking for the module. */
- if (__gconv_path_elem == NULL)
- __gconv_get_path ();
-
- /* See whether we have to append .so. */
- if (name_len <= 4 || memcmp (&trans->name[name_len - 4], ".so", 3) != 0)
- need_so = 1;
-
- /* Create a new entry. */
- newp = (struct known_trans *) malloc (sizeof (struct known_trans)
- + (__gconv_max_path_elem_len
- + name_len + 3)
- + name_len);
- if (newp != NULL)
- {
- char *cp;
-
- /* Clear the struct. */
- memset (newp, '\0', sizeof (struct known_trans));
-
- /* Store a copy of the module name. */
- newp->info.name = cp = (char *) (newp + 1);
- cp = memcpy (cp, trans->name, name_len);
- cp += name_len;
-
- newp->fname = cp;
-
- /* Search in all the directories. */
- for (runp = __gconv_path_elem; runp->name != NULL; ++runp)
- {
- strcpy ((char *) newp->fname, runp->name);
- while(newp->fname != '\0') newp->fname++;
-
- cp = memcpy (newp->fname,
- trans->name, name_len);
- cp += name_len;
- if (need_so)
- memcpy (cp, ".so", sizeof (".so"));
-
- if (open_translit (newp) == 0)
- {
- /* We found a module. */
- res = 0;
- break;
- }
- }
-
- if (res)
- newp->fname = NULL;
-
- /* In any case we'll add the entry to our search tree. */
- if (tsearch (newp, &search_tree, trans_compare) == NULL)
- {
- /* Yickes, this should not happen. Unload the object. */
- res = 1;
- /* XXX unload here. */
- }
- }
- }
-
-#ifdef HAVE_DD_LOCK
- __lock_release(lock);
-#endif
-
- return res;
-}
diff --git a/newlib/libc/sys/linux/iconv/hash-string.h b/newlib/libc/sys/linux/iconv/hash-string.h
deleted file mode 100644
index ae4bcfb3e..000000000
--- a/newlib/libc/sys/linux/iconv/hash-string.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Implements a string hashing function.
- Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* @@ end of prolog @@ */
-
-#ifndef PARAMS
-# if __STDC__
-# define PARAMS(Args) Args
-# else
-# define PARAMS(Args) ()
-# endif
-#endif
-
-/* We assume to have `unsigned long int' value with at least 32 bits. */
-#define HASHWORDBITS 32
-
-
-/* Defines the so called `hashpjw' function by P.J. Weinberger
- [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
- 1986, 1987 Bell Telephone Laboratories, Inc.] */
-static unsigned long int hash_string PARAMS ((const char *__str_param));
-
-static inline unsigned long int
-hash_string (str_param)
- const char *str_param;
-{
- unsigned long int hval, g;
- const char *str = str_param;
-
- /* Compute the hash value for the given string. */
- hval = 0;
- while (*str != '\0')
- {
- hval <<= 4;
- hval += (unsigned long int) *str++;
- g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
- if (g != 0)
- {
- hval ^= g >> (HASHWORDBITS - 8);
- hval ^= g;
- }
- }
- return hval;
-}
diff --git a/newlib/libc/sys/linux/iconv/iconv.c b/newlib/libc/sys/linux/iconv/iconv.c
deleted file mode 100644
index d0f5528f5..000000000
--- a/newlib/libc/sys/linux/iconv/iconv.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Convert characters in input buffer using conversion descriptor to
- output buffer.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stddef.h> /* for NULL */
-#include <errno.h>
-#include <iconv.h>
-
-#include <gconv_int.h>
-
-#include <assert.h>
-
-
-size_t
-iconv (iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf,
- size_t *outbytesleft)
-{
- __gconv_t gcd = (__gconv_t) cd;
- char *outstart = outbuf ? *outbuf : NULL;
- size_t irreversible;
- int result;
-
- if (__builtin_expect (inbuf == NULL || *inbuf == NULL, 0))
- {
- if (outbuf == NULL || *outbuf == NULL)
- result = __gconv (gcd, NULL, NULL, NULL, NULL, &irreversible);
- else
- result = __gconv (gcd, NULL, NULL, (unsigned char **) outbuf,
- (unsigned char *) (outstart + *outbytesleft),
- &irreversible);
- }
- else
- {
- const char *instart = *inbuf;
-
- result = __gconv (gcd, (const unsigned char **) inbuf,
- (const unsigned char *) (*inbuf + *inbytesleft),
- (unsigned char **) outbuf,
- (unsigned char *) (*outbuf + *outbytesleft),
- &irreversible);
-
- *inbytesleft -= *inbuf - instart;
- }
- if (outstart != NULL)
- *outbytesleft -= *outbuf - outstart;
-
- switch (__builtin_expect (result, __GCONV_OK))
- {
- case __GCONV_ILLEGAL_DESCRIPTOR:
- __set_errno (EBADF);
- irreversible = (size_t) -1L;
- break;
-
- case __GCONV_ILLEGAL_INPUT:
- __set_errno (EILSEQ);
- irreversible = (size_t) -1L;
- break;
-
- case __GCONV_FULL_OUTPUT:
- __set_errno (E2BIG);
- irreversible = (size_t) -1L;
- break;
-
- case __GCONV_INCOMPLETE_INPUT:
- __set_errno (EINVAL);
- irreversible = (size_t) -1L;
- break;
-
- case __GCONV_EMPTY_INPUT:
- case __GCONV_OK:
- /* Nothing. */
- break;
-
- default:
- assert (!"Nothing like this should happen");
- }
-
- return irreversible;
-}
diff --git a/newlib/libc/sys/linux/iconv/iconv.h b/newlib/libc/sys/linux/iconv/iconv.h
deleted file mode 100644
index 5a795dc5d..000000000
--- a/newlib/libc/sys/linux/iconv/iconv.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _ICONV_H
-#define _ICONV_H 1
-
-#include <features.h>
-#define __need_size_t
-#include <stddef.h>
-
-
-__BEGIN_DECLS
-
-/* Identifier for conversion method from one codeset to another. */
-typedef void *iconv_t;
-
-
-/* Allocate descriptor for code conversion from codeset FROMCODE to
- codeset TOCODE. */
-extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode)
- __THROW;
-
-/* Convert at most *INBYTESLEFT bytes from *INBUF according to the
- code conversion algorithm specified by CD and place up to
- *OUTBYTESLEFT bytes in buffer at *OUTBUF. */
-extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
- size_t *__restrict __inbytesleft,
- char **__restrict __outbuf,
- size_t *__restrict __outbytesleft);
-
-/* Free resources allocated for descriptor CD for code conversion. */
-extern int iconv_close (iconv_t __cd) __THROW;
-
-__END_DECLS
-
-#endif /* iconv.h */
diff --git a/newlib/libc/sys/linux/iconv/iconv_charmap.c b/newlib/libc/sys/linux/iconv/iconv_charmap.c
deleted file mode 100644
index 141c8eca2..000000000
--- a/newlib/libc/sys/linux/iconv/iconv_charmap.c
+++ /dev/null
@@ -1,563 +0,0 @@
-/* Convert using charmaps and possibly iconv().
- Copyright (C) 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <assert.h>
-#include <errno.h>
-#include <error.h>
-#include <fcntl.h>
-#include <iconv.h>
-#include <libintl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-
-#include "iconv_prog.h"
-
-
-/* Prototypes for a few program-wide used functions. */
-extern void *xmalloc (size_t __n);
-extern void *xcalloc (size_t __n, size_t __s);
-
-
-struct convtable
-{
- int term[256 / 8];
- union
- {
- struct convtable *sub;
- struct charseq *out;
- } val[256];
-};
-
-
-static inline struct convtable *
-allocate_table (void)
-{
- return (struct convtable *) xcalloc (1, sizeof (struct convtable));
-}
-
-
-static inline int
-is_term (struct convtable *tbl, unsigned int idx)
-{
- return tbl->term[idx / 8] & (1 << (idx % 8));
-}
-
-
-static inline void
-clear_term (struct convtable *tbl, unsigned int idx)
-{
- tbl->term[idx / 8] &= ~(1 << (idx % 8));
-}
-
-
-static inline void
-set_term (struct convtable *tbl, unsigned int idx)
-{
- tbl->term[idx / 8] |= 1 << (idx % 8);
-}
-
-
-/* Generate the conversion table. */
-static struct convtable *use_from_charmap (struct charmap_t *from_charmap,
- const char *to_code);
-static struct convtable *use_to_charmap (const char *from_code,
- struct charmap_t *to_charmap);
-static struct convtable *use_both_charmaps (struct charmap_t *from_charmap,
- struct charmap_t *to_charmap);
-
-/* Prototypes for the functions doing the actual work. */
-static int process_block (struct convtable *tbl, char *addr, size_t len,
- FILE *output);
-static int process_fd (struct convtable *tbl, int fd, FILE *output);
-static int process_file (struct convtable *tbl, FILE *input, FILE *output);
-
-
-int
-charmap_conversion (const char *from_code, struct charmap_t *from_charmap,
- const char *to_code, struct charmap_t *to_charmap,
- int argc, int remaining, char *argv[], FILE *output)
-{
- struct convtable *cvtbl;
- int status = EXIT_SUCCESS;
-
- /* We have three different cases to handle:
-
- - both, from_charmap and to_charmap, are available. This means we
- can assume that the symbolic names match and use them to create
- the mapping.
-
- - only from_charmap is available. In this case we can only hope that
- the symbolic names used are of the <Uxxxx> form in which case we
- can use a UCS4->"to_code" iconv() conversion for the second step.
-
- - only to_charmap is available. This is similar, only that we would
- use iconv() for the "to_code"->UCS4 conversion.
-
- We first create a table which maps input bytes into output bytes.
- Once this is done we can handle all three of the cases above
- equally. */
- if (from_charmap != NULL)
- {
- if (to_charmap == NULL)
- cvtbl = use_from_charmap (from_charmap, to_code);
- else
- cvtbl = use_both_charmaps (from_charmap, to_charmap);
- }
- else
- {
- assert (to_charmap != NULL);
- cvtbl = use_to_charmap (from_code, to_charmap);
- }
-
- /* If we couldn't generate a table stop now. */
- if (cvtbl == NULL)
- return EXIT_FAILURE;
-
- /* We can now start the conversion. */
- if (remaining == argc)
- {
- if (process_file (cvtbl, stdin, output) != 0)
- status = EXIT_FAILURE;
- }
- else
- do
- {
- struct stat st;
- char *addr;
- int fd;
-
- if (verbose)
- printf ("%s:\n", argv[remaining]);
- if (strcmp (argv[remaining], "-") == 0)
- fd = 0;
- else
- {
- fd = open (argv[remaining], O_RDONLY);
-
- if (fd == -1)
- {
- error (0, errno, _("cannot open input file `%s'"),
- argv[remaining]);
- status = EXIT_FAILURE;
- continue;
- }
- }
-
-#ifdef _POSIX_MAPPED_FILES
- /* We have possibilities for reading the input file. First try
- to mmap() it since this will provide the fastest solution. */
- if (fstat (fd, &st) == 0
- && ((addr = mmap (NULL, st.st_size, PROT_READ, MAP_PRIVATE,
- fd, 0)) != MAP_FAILED))
- {
- /* Yes, we can use mmap(). The descriptor is not needed
- anymore. */
- if (close (fd) != 0)
- error (EXIT_FAILURE, errno,
- _("error while closing input `%s'"), argv[remaining]);
-
- if (process_block (cvtbl, addr, st.st_size, output) < 0)
- {
- /* Something went wrong. */
- status = EXIT_FAILURE;
-
- /* We don't need the input data anymore. */
- munmap ((void *) addr, st.st_size);
-
- /* We cannot go on with producing output since it might
- lead to problem because the last output might leave
- the output stream in an undefined state. */
- break;
- }
-
- /* We don't need the input data anymore. */
- munmap ((void *) addr, st.st_size);
- }
- else
-#endif /* _POSIX_MAPPED_FILES */
- {
- /* Read the file in pieces. */
- if (process_fd (cvtbl, fd, output) != 0)
- {
- /* Something went wrong. */
- status = EXIT_FAILURE;
-
- /* We don't need the input file anymore. */
- close (fd);
-
- /* We cannot go on with producing output since it might
- lead to problem because the last output might leave
- the output stream in an undefined state. */
- break;
- }
-
- /* Now close the file. */
- close (fd);
- }
- }
- while (++remaining < argc);
-
- /* All done. */
- return status;
-}
-
-
-static void
-add_bytes (struct convtable *tbl, struct charseq *in, struct charseq *out)
-{
- int n = 0;
- unsigned int byte;
-
- assert (in->nbytes > 0);
-
- byte = ((unsigned char *) in->bytes)[n];
- while (n + 1 < in->nbytes)
- {
- if (is_term (tbl, byte) || tbl->val[byte].sub == NULL)
- {
- /* Note that we simply ignore a definition for a byte sequence
- which is also the prefix for a longer one. */
- clear_term (tbl, byte);
- tbl->val[byte].sub =
- (struct convtable *) xcalloc (1, sizeof (struct convtable));
- }
-
- tbl = tbl->val[byte].sub;
-
- byte = ((unsigned char *) in->bytes)[++n];
- }
-
- /* Only add the new sequence if there is none yet and the byte sequence
- is not part of an even longer one. */
- if (! is_term (tbl, byte) && tbl->val[byte].sub == NULL)
- {
- set_term (tbl, byte);
- tbl->val[byte].out = out;
- }
-}
-
-
-static struct convtable *
-use_from_charmap (struct charmap_t *from_charmap, const char *to_code)
-{
- /* We iterate over all entries in the from_charmap and for those which
- have a known UCS4 representation we use an iconv() call to determine
- the mapping to the to_code charset. */
- struct convtable *rettbl;
- iconv_t cd;
- void *ptr = NULL;
- const void *key;
- size_t keylen;
- void *data;
-
- cd = iconv_open (to_code, "WCHAR_T");
- if (cd == (iconv_t) -1)
- /* We cannot do anything. */
- return NULL;
-
- rettbl = allocate_table ();
-
- while (iterate_table (&from_charmap->char_table, &ptr, &key, &keylen, &data)
- >= 0)
- {
- struct charseq *in = (struct charseq *) data;
-
- if (in->ucs4 != UNINITIALIZED_CHAR_VALUE)
- {
- /* There is a chance. Try the iconv module. */
- wchar_t inbuf[1] = { in->ucs4 };
- unsigned char outbuf[64];
- char *inptr = (char *) inbuf;
- size_t inlen = sizeof (inbuf);
- char *outptr = (char *) outbuf;
- size_t outlen = sizeof (outbuf);
-
- (void) iconv (cd, &inptr, &inlen, &outptr, &outlen);
-
- if (outptr != (char *) outbuf)
- {
- /* We got some output. Good, use it. */
- struct charseq *newp;
-
- outlen = sizeof (outbuf) - outlen;
- assert ((char *) outbuf + outlen == outptr);
-
- newp = (struct charseq *) xmalloc (sizeof (struct charseq)
- + outlen);
- newp->name = in->name;
- newp->ucs4 = in->ucs4;
- newp->nbytes = outlen;
- memcpy (newp->bytes, outbuf, outlen);
-
- add_bytes (rettbl, in, newp);
- }
-
- /* Clear any possible state left behind. */
- (void) iconv (cd, NULL, NULL, NULL, NULL);
- }
- }
-
- iconv_close (cd);
-
- return rettbl;
-}
-
-
-static struct convtable *
-use_to_charmap (const char *from_code, struct charmap_t *to_charmap)
-{
- /* We iterate over all entries in the to_charmap and for those which
- have a known UCS4 representation we use an iconv() call to determine
- the mapping to the from_code charset. */
- struct convtable *rettbl;
- iconv_t cd;
- void *ptr = NULL;
- const void *key;
- size_t keylen;
- void *data;
-
- /* Note that the conversion we use here is the reverse direction. Without
- exhaustive search we cannot figure out which input yields the UCS4
- character we are looking for. Therefore we determine it the other
- way round. */
- cd = iconv_open (from_code, "WCHAR_T");
- if (cd == (iconv_t) -1)
- /* We cannot do anything. */
- return NULL;
-
- rettbl = allocate_table ();
-
- while (iterate_table (&to_charmap->char_table, &ptr, &key, &keylen, &data)
- >= 0)
- {
- struct charseq *out = (struct charseq *) data;
-
- if (out->ucs4 != UNINITIALIZED_CHAR_VALUE)
- {
- /* There is a chance. Try the iconv module. */
- wchar_t inbuf[1] = { out->ucs4 };
- unsigned char outbuf[64];
- char *inptr = (char *) inbuf;
- size_t inlen = sizeof (inbuf);
- char *outptr = (char *) outbuf;
- size_t outlen = sizeof (outbuf);
-
- (void) iconv (cd, &inptr, &inlen, &outptr, &outlen);
-
- if (outptr != (char *) outbuf)
- {
- /* We got some output. Good, use it. */
- struct charseq *newp;
-
- outlen = sizeof (outbuf) - outlen;
- assert ((char *) outbuf + outlen == outptr);
-
- newp = (struct charseq *) xmalloc (sizeof (struct charseq)
- + outlen);
- newp->name = out->name;
- newp->ucs4 = out->ucs4;
- newp->nbytes = outlen;
- memcpy (newp->bytes, outbuf, outlen);
-
- add_bytes (rettbl, newp, out);
- }
-
- /* Clear any possible state left behind. */
- (void) iconv (cd, NULL, NULL, NULL, NULL);
- }
- }
-
- iconv_close (cd);
-
- return rettbl;
-}
-
-
-static struct convtable *
-use_both_charmaps (struct charmap_t *from_charmap,
- struct charmap_t *to_charmap)
-{
- /* In this case we iterate over all the entries in the from_charmap,
- determine the internal name, and find an appropriate entry in the
- to_charmap (if it exists). */
- struct convtable *rettbl = allocate_table ();
- void *ptr = NULL;
- const void *key;
- size_t keylen;
- void *data;
-
- while (iterate_table (&from_charmap->char_table, &ptr, &key, &keylen, &data)
- >= 0)
- {
- struct charseq *in = (struct charseq *) data;
- struct charseq *out = charmap_find_value (to_charmap, key, keylen);
-
- if (out != NULL)
- add_bytes (rettbl, in, out);
- }
-
- return rettbl;
-}
-
-
-static int
-process_block (struct convtable *tbl, char *addr, size_t len, FILE *output)
-{
- size_t n = 0;
-
- while (n < len)
- {
- struct convtable *cur = tbl;
- unsigned char *curp = (unsigned char *) addr;
- unsigned int byte = *curp;
- int cnt;
- struct charseq *out;
-
- while (! is_term (cur, byte))
- if (cur->val[byte].sub == NULL)
- {
- /* This is a invalid sequence. Skip the first byte if we are
- ignoring errors. Otherwise punt. */
- if (! omit_invalid)
- {
- error (0, 0, _("illegal input sequence at position %Zd"), n);
- return -1;
- }
-
- n -= curp - (unsigned char *) addr;
-
- byte = *(curp = (unsigned char *) ++addr);
- if (++n >= len)
- /* All converted. */
- return 0;
-
- cur = tbl;
- }
- else
- {
- cur = cur->val[byte].sub;
-
- if (++n >= len)
- {
- error (0, 0, _("\
-incomplete character or shift sequence at end of buffer"));
- return -1;
- }
-
- byte = *++curp;
- }
-
- /* We found a final byte. Write the output bytes. */
- out = cur->val[byte].out;
- for (cnt = 0; cnt < out->nbytes; ++cnt)
- fputc_unlocked (out->bytes[cnt], output);
-
- addr = (char *) curp + 1;
- ++n;
- }
-
- return 0;
-}
-
-
-static int
-process_fd (struct convtable *tbl, int fd, FILE *output)
-{
- /* we have a problem with reading from a desriptor since we must not
- provide the iconv() function an incomplete character or shift
- sequence at the end of the buffer. Since we have to deal with
- arbitrary encodings we must read the whole text in a buffer and
- process it in one step. */
- static char *inbuf = NULL;
- static size_t maxlen = 0;
- char *inptr = NULL;
- size_t actlen = 0;
-
- while (actlen < maxlen)
- {
- ssize_t n = read (fd, inptr, maxlen - actlen);
-
- if (n == 0)
- /* No more text to read. */
- break;
-
- if (n == -1)
- {
- /* Error while reading. */
- error (0, errno, _("error while reading the input"));
- return -1;
- }
-
- inptr += n;
- actlen += n;
- }
-
- if (actlen == maxlen)
- while (1)
- {
- ssize_t n;
-
- /* Increase the buffer. */
- maxlen += 32768;
- inbuf = realloc (inbuf, maxlen);
- if (inbuf == NULL)
- error (0, errno, _("unable to allocate buffer for input"));
- inptr = inbuf + actlen;
-
- do
- {
- n = read (fd, inptr, maxlen - actlen);
-
- if (n == 0)
- /* No more text to read. */
- break;
-
- if (n == -1)
- {
- /* Error while reading. */
- error (0, errno, _("error while reading the input"));
- return -1;
- }
-
- inptr += n;
- actlen += n;
- }
- while (actlen < maxlen);
-
- if (n == 0)
- /* Break again so we leave both loops. */
- break;
- }
-
- /* Now we have all the input in the buffer. Process it in one run. */
- return process_block (tbl, inbuf, actlen, output);
-}
-
-
-static int
-process_file (struct convtable *tbl, FILE *input, FILE *output)
-{
- /* This should be safe since we use this function only for `stdin' and
- we haven't read anything so far. */
- return process_fd (tbl, fileno (input), output);
-}
diff --git a/newlib/libc/sys/linux/iconv/iconv_close.c b/newlib/libc/sys/linux/iconv/iconv_close.c
deleted file mode 100644
index 038acc69e..000000000
--- a/newlib/libc/sys/linux/iconv/iconv_close.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Release any resource associated with given conversion descriptor.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <iconv.h>
-
-#include <gconv_int.h>
-
-
-int
-iconv_close (iconv_t cd)
-{
- if (__builtin_expect (cd == (iconv_t *) -1L, 0))
- {
- __set_errno (EBADF);
- return -1;
- }
-
- return __gconv_close ((__gconv_t) cd) ? -1 : 0;
-}
diff --git a/newlib/libc/sys/linux/iconv/iconv_open.c b/newlib/libc/sys/linux/iconv/iconv_open.c
deleted file mode 100644
index ac44af80c..000000000
--- a/newlib/libc/sys/linux/iconv/iconv_open.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Get descriptor for character set conversion.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <iconv.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <gconv_int.h>
-#include "gconv_charset.h"
-
-
-iconv_t
-iconv_open (const char *tocode, const char *fromcode)
-{
- char *tocode_conv;
- char *fromcode_conv;
- size_t tocode_len;
- size_t fromcode_len;
- __gconv_t cd;
- int res;
-
- /* Normalize the name. We remove all characters beside alpha-numeric,
- '_', '-', '/', and '.'. */
- tocode_len = strlen (tocode);
- tocode_conv = alloca (tocode_len + 3);
- strip (tocode_conv, tocode);
- tocode = tocode_conv[2] == '\0' ? upstr (tocode_conv, tocode) : tocode_conv;
-
- fromcode_len = strlen (fromcode);
- fromcode_conv = alloca (fromcode_len + 3);
- strip (fromcode_conv, fromcode);
- fromcode = (fromcode_conv[2] == '\0'
- ? upstr (fromcode_conv, fromcode) : fromcode_conv);
-
- res = __gconv_open (tocode, fromcode, &cd, 0);
-
- if (__builtin_expect (res, __GCONV_OK) != __GCONV_OK)
- {
- /* We must set the error number according to the specs. */
- if (res == __GCONV_NOCONV || res == __GCONV_NODB)
- __set_errno (EINVAL);
-
- return (iconv_t) -1;
- }
-
- return (iconv_t) cd;
-}
diff --git a/newlib/libc/sys/linux/iconv/iconvconfig.c b/newlib/libc/sys/linux/iconv/iconvconfig.c
deleted file mode 100644
index 8ad6c93e2..000000000
--- a/newlib/libc/sys/linux/iconv/iconvconfig.c
+++ /dev/null
@@ -1,1176 +0,0 @@
-/* Generate fastloading iconv module configuration files.
- Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2000.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <argp.h>
-#include <assert.h>
-#include <error.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <libintl.h>
-#include <locale.h>
-#include <mcheck.h>
-#include <search.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdio_ext.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/cdefs.h>
-#include <sys/uio.h>
-
-#include "iconvconfig.h"
-
-/* Get libc version number. */
-#include "../version.h"
-
-#define PACKAGE _libc_intl_domainname
-
-
-/* The hashing function we use. */
-#include "../intl/hash-string.h"
-
-
-/* Types used. */
-struct module
-{
- char *fromname;
- struct Strent *fromname_strent;
- char *filename;
- struct Strent *filename_strent;
- const char *directory;
- struct Strent *directory_strent;
- struct module *next;
- int cost;
- struct Strent *toname_strent;
- char toname[0];
-};
-
-struct alias
-{
- char *fromname;
- struct Strent *froment;
- struct module *module;
- struct Strent *toent;
- char toname[0];
-};
-
-struct name
-{
- const char *name;
- struct Strent *strent;
- int module_idx;
- uint32_t hashval;
-};
-
-struct name_info
-{
- const char *canonical_name;
- struct Strent *canonical_strent;
-
- struct module *from_internal;
- struct module *to_internal;
-
- struct other_conv_list
- {
- int dest_idx;
- struct other_conv
- {
- gidx_t module_idx;
- struct module *module;
- struct other_conv *next;
- } other_conv;
- struct other_conv_list *next;
- } *other_conv_list;
-};
-
-
-/* Name and version of program. */
-static void print_version (FILE *stream, struct argp_state *state);
-void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
-
-/* Short description of program. */
-static const char doc[] = N_("\
-Create fastloading iconv module configuration file.");
-
-/* Strings for arguments in help texts. */
-static const char args_doc[] = N_("[DIR...]");
-
-/* Function to print some extra text in the help message. */
-static char *more_help (int key, const char *text, void *input);
-
-/* Data structure to communicate with argp functions. */
-static struct argp argp =
-{
- NULL, NULL, args_doc, doc, NULL, more_help
-};
-
-
-/* The function doing the actual work. */
-static int handle_dir (const char *dir);
-
-/* Add all known builtin conversions and aliases. */
-static void add_builtins (void);
-
-/* Create list of all aliases without circular aliases. */
-static void get_aliases (void);
-
-/* Create list of all modules. */
-static void get_modules (void);
-
-/* Get list of all the names and thereby indexing them. */
-static void generate_name_list (void);
-
-/* Collect information about all the names. */
-static void generate_name_info (void);
-
-/* Write the output file. */
-static int write_output (void);
-
-
-/* Search tree of the modules we know. */
-static void *modules;
-
-/* Search tree of the aliases we know. */
-static void *aliases;
-
-/* Search tree for name to index mapping. */
-static void *names;
-
-/* Number of names we know about. */
-static int nnames;
-
-/* List of all aliases. */
-static struct alias **alias_list;
-static size_t nalias_list;
-static size_t nalias_list_max;
-
-/* List of all modules. */
-static struct module **module_list;
-static size_t nmodule_list;
-static size_t nmodule_list_max;
-
-/* Names and information about them. */
-static struct name_info *name_info;
-static size_t nname_info;
-
-/* Number of translations not from or to INTERNAL. */
-static size_t nextra_modules;
-
-
-/* Names and aliases for the builtin transformations. */
-static struct
-{
- const char *from;
- const char *to;
-} builtin_alias[] =
- {
-#define BUILTIN_ALIAS(alias, real) \
- { .from = alias, .to = real },
-#define BUILTIN_TRANSFORMATION(From, To, Cost, Name, Fct, MinF, MaxF, \
- MinT, MaxT)
-#include <gconv_builtin.h>
- };
-#undef BUILTIN_ALIAS
-#undef BUILTIN_TRANSFORMATION
-#define nbuiltin_alias (sizeof (builtin_alias) / sizeof (builtin_alias[0]))
-
-static struct
-{
- const char *from;
- const char *to;
- const char *module;
- int cost;
-} builtin_trans[] =
- {
-#define BUILTIN_ALIAS(alias, real)
-#define BUILTIN_TRANSFORMATION(From, To, Cost, Name, Fct, MinF, MaxF, \
- MinT, MaxT) \
- { .from = From, .to = To, .module = Name, .cost = Cost },
-#include <gconv_builtin.h>
- };
-#define nbuiltin_trans (sizeof (builtin_trans) / sizeof (builtin_trans[0]))
-
-
-/* Filename extension for the modules. */
-#ifndef MODULE_EXT
-# define MODULE_EXT ".so"
-#endif
-static const char gconv_module_ext[] = MODULE_EXT;
-
-
-extern void *xmalloc (size_t n) __attribute_malloc__;
-extern void *xcalloc (size_t n, size_t m) __attribute_malloc__;
-extern void *xrealloc (void *p, size_t n);
-
-
-/* C string table handling. */
-struct Strtab;
-struct Strent;
-
-/* Create new C string table object in memory. */
-extern struct Strtab *strtabinit (void);
-
-/* Free resources allocated for C string table ST. */
-extern void strtabfree (struct Strtab *st);
-
-/* Add string STR (length LEN is != 0) to C string table ST. */
-extern struct Strent *strtabadd (struct Strtab *st, const char *str,
- size_t len);
-
-/* Finalize string table ST and store size in *SIZE and return a pointer. */
-extern void *strtabfinalize (struct Strtab *st, size_t *size);
-
-/* Get offset in string table for string associated with SE. */
-extern size_t strtaboffset (struct Strent *se);
-
-/* String table we construct. */
-static struct Strtab *strtab;
-
-
-
-int
-main (int argc, char *argv[])
-{
- int remaining;
- int status = 0;
- char *path;
- char *tp;
- const char *old = GCONV_PATH;
- size_t len = strlen (old) + 1;
- char *new = alloca(len);
-
- /* Enable memory use testing. */
- /* mcheck_pedantic (NULL); */
- mtrace ();
-
- /* Set locale via LC_ALL. */
- setlocale (LC_ALL, "");
-
- /* Set the text message domain. */
- textdomain (_libc_intl_domainname);
-
- /* Parse and process arguments. */
- argp_parse (&argp, argc, argv, 0, &remaining, NULL);
-
- /* Initialize the string table. */
- strtab = strtabinit ();
-
- /* Handle all directories mentioned. */
- while (remaining < argc)
- status |= handle_dir (argv[remaining++]);
-
- /* In any case also handle the standard directory. */
- path = memcpy (new, old, len);
- tp = strtok (path, ":");
- while (tp != NULL)
- {
- status |= handle_dir (tp);
-
- tp = strtok (NULL, ":");
- }
-
- /* Add the builtin transformations and aliases without overwriting
- anything. */
- add_builtins ();
-
- /* Store aliases in an array. */
- get_aliases ();
-
- /* Get list of all modules. */
- get_modules ();
-
- /* Generate list of all the names we know to handle in some way. */
- generate_name_list ();
-
- /* Now we know all the names we will handle, collect information
- about them. */
- generate_name_info ();
-
- /* Write the output file, but only if we haven't seen any error. */
- if (status == 0)
- status = write_output ();
- else
- error (1, 0, _("no output file produced because warning were issued"));
-
- return status;
-}
-
-
-static char *
-more_help (int key, const char *text, void *input)
-{
- switch (key)
- {
- case ARGP_KEY_HELP_EXTRA:
- /* We print some extra information. */
- return strdup (gettext ("\
-Report bugs using the `glibcbug' script to <bugs@gnu.org>.\n"));
- default:
- break;
- }
- return (char *) text;
-}
-
-
-/* Print the version information. */
-static void
-print_version (FILE *stream, struct argp_state *state)
-{
- fprintf (stream, "iconvconfig (GNU %s) %s\n", PACKAGE, VERSION);
- fprintf (stream, gettext ("\
-Copyright (C) %s Free Software Foundation, Inc.\n\
-This is free software; see the source for copying conditions. There is NO\n\
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2002");
- fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
-}
-
-
-static int
-alias_compare (const void *p1, const void *p2)
-{
- const struct alias *a1 = (const struct alias *) p1;
- const struct alias *a2 = (const struct alias *) p2;
-
- return strcmp (a1->fromname, a2->fromname);
-}
-
-
-static void
-new_alias (const char *fromname, size_t fromlen, const char *toname,
- size_t tolen)
-{
- struct alias *newp;
- void **inserted;
-
- newp = (struct alias *) xmalloc (sizeof (struct alias) + fromlen + tolen);
-
- newp->fromname = memcpy (newp->toname, toname, tolen);
- newp->fromname += tolen;
- memcpy (newp->fromname, fromname, fromlen);
- newp->module = NULL;
-
- inserted = (void **) tsearch (newp, &aliases, alias_compare);
- if (inserted == NULL)
- error (EXIT_FAILURE, errno, gettext ("while inserting in search tree"));
- if (*inserted != newp)
- /* Something went wrong, free this entry. */
- free (newp);
- else
- {
- newp->froment = strtabadd (strtab, newp->fromname, fromlen);
- newp->toent = strtabadd (strtab, newp->toname, tolen);
- }
-}
-
-
-/* Add new alias. */
-static void
-add_alias (char *rp)
-{
- /* We now expect two more string. The strings are normalized
- (converted to UPPER case) and strored in the alias database. */
- char *from;
- char *to;
- char *wp;
-
- while (isspace (*rp))
- ++rp;
- from = wp = rp;
- while (*rp != '\0' && !isspace (*rp))
- *wp++ = toupper (*rp++);
- if (*rp == '\0')
- /* There is no `to' string on the line. Ignore it. */
- return;
- *wp++ = '\0';
- to = ++rp;
- while (isspace (*rp))
- ++rp;
- while (*rp != '\0' && !isspace (*rp))
- *wp++ = toupper (*rp++);
- if (to == wp)
- /* No `to' string, ignore the line. */
- return;
- *wp++ = '\0';
-
- assert (strlen (from) + 1 == to - from);
- assert (strlen (to) + 1 == wp - to);
-
- new_alias (from, to - from, to, wp - to);
-}
-
-
-static void
-append_alias (const void *nodep, VISIT value, int level)
-{
- if (value != leaf && value != postorder)
- return;
-
- if (nalias_list_max == nalias_list)
- {
- nalias_list_max += 50;
- alias_list = (struct alias **) xrealloc (alias_list,
- (nalias_list_max
- * sizeof (struct alias *)));
- }
-
- alias_list[nalias_list++] = *(struct alias **) nodep;
-}
-
-
-static void
-get_aliases (void)
-{
- twalk (aliases, append_alias);
-}
-
-
-static int
-module_compare (const void *p1, const void *p2)
-{
- const struct module *m1 = (const struct module *) p1;
- const struct module *m2 = (const struct module *) p2;
- int result;
-
- result = strcmp (m1->fromname, m2->fromname);
- if (result == 0)
- result = strcmp (m1->toname, m2->toname);
-
- return result;
-}
-
-
-/* Create new module record. */
-static void
-new_module (const char *fromname, size_t fromlen, const char *toname,
- size_t tolen, const char *directory,
- const char *filename, size_t filelen, int cost, size_t need_ext)
-{
- struct module *new_module;
- size_t dirlen = strlen (directory) + 1;
- char *tmp;
- void **inserted;
-
- new_module = (struct module *) xmalloc (sizeof (struct module)
- + fromlen + tolen + filelen
- + need_ext);
-
- new_module->fromname = memcpy (new_module->toname, toname, tolen);
- new_module->fromname += tolen;
-
- new_module->filename = memcpy (new_module->fromname, fromname, fromlen);
- new_module->filename += fromlen;
-
- new_module->cost = cost;
- new_module->next = NULL;
-
- tmp = memcpy (new_module->filename, filename, filelen);
- tmp += filelen;
-
- if (need_ext)
- {
- memcpy (tmp - 1, gconv_module_ext, need_ext + 1);
- filelen += need_ext;
- }
- new_module->directory = directory;
-
- /* Now insert the new module data structure in our search tree. */
- inserted = (void **) tsearch (new_module, &modules, module_compare);
- if (inserted == NULL)
- error (EXIT_FAILURE, errno, "while inserting in search tree");
- if (*inserted != new_module)
- free (new_module);
- else
- {
- new_module->fromname_strent = strtabadd (strtab, new_module->fromname,
- fromlen);
- new_module->toname_strent = strtabadd (strtab, new_module->toname,
- tolen);
- new_module->filename_strent = strtabadd (strtab, new_module->filename,
- filelen);
- new_module->directory_strent = strtabadd (strtab, directory, dirlen);
- }
-}
-
-
-/* Add new module. */
-static void
-internal_function
-add_module (char *rp, const char *directory)
-{
- /* We expect now
- 1. `from' name
- 2. `to' name
- 3. filename of the module
- 4. an optional cost value
- */
- char *from;
- char *to;
- char *module;
- char *wp;
- int need_ext;
- int cost;
-
- while (isspace (*rp))
- ++rp;
- from = rp;
- while (*rp != '\0' && !isspace (*rp))
- {
- *rp = toupper (*rp);
- ++rp;
- }
- if (*rp == '\0')
- return;
- *rp++ = '\0';
- to = wp = rp;
- while (isspace (*rp))
- ++rp;
- while (*rp != '\0' && !isspace (*rp))
- *wp++ = toupper (*rp++);
- if (*rp == '\0')
- return;
- *wp++ = '\0';
- do
- ++rp;
- while (isspace (*rp));
- module = wp;
- while (*rp != '\0' && !isspace (*rp))
- *wp++ = *rp++;
- if (*rp == '\0')
- {
- /* There is no cost, use one by default. */
- *wp++ = '\0';
- cost = 1;
- }
- else
- {
- /* There might be a cost value. */
- char *endp;
-
- *wp++ = '\0';
- cost = strtol (rp, &endp, 10);
- if (rp == endp || cost < 1)
- /* No useful information. */
- cost = 1;
- }
-
- if (module[0] == '\0')
- /* No module name given. */
- return;
-
- /* See whether we must add the ending. */
- need_ext = 0;
- if (wp - module < sizeof (gconv_module_ext)
- || memcmp (wp - sizeof (gconv_module_ext), gconv_module_ext,
- sizeof (gconv_module_ext)) != 0)
- /* We must add the module extension. */
- need_ext = sizeof (gconv_module_ext) - 1;
-
- assert (strlen (from) + 1 == to - from);
- assert (strlen (to) + 1 == module - to);
- assert (strlen (module) + 1 == wp - module);
-
- new_module (from, to - from, to, module - to, directory, module, wp - module,
- cost, need_ext);
-}
-
-
-/* Read the config file and add the data for this directory to that. */
-static int
-handle_dir (const char *dir)
-{
- char *infile;
- FILE *fp;
- char *line = NULL;
- size_t linelen = 0;
- size_t dirlen = strlen (dir);
- char *tmp;
-
- if (dir[dirlen - 1] != '/')
- {
- char *newp = (char *) xmalloc (dirlen + 2);
- dir = memcpy (newp, dir, dirlen);
- newp[dirlen++] = '/';
- newp[dirlen] = '\0';
- }
-
- infile = (char *) alloca (dirlen + sizeof "gconv-modules");
- tmp = mempcpy (infile, dir, dirlen);
- tmp += dirlen;
- strcpy (tmp, "gconv-modules");
-
- fp = fopen (infile, "r");
- if (fp == NULL)
- {
- error (0, errno, "cannot open `%s'", infile);
- return 1;
- }
-
- /* No threads present. */
- __fsetlocking (fp, FSETLOCKING_BYCALLER);
-
- while (!feof_unlocked (fp))
- {
- char *rp, *endp, *word;
- ssize_t n = __getdelim (&line, &linelen, '\n', fp);
-
- if (n < 0)
- /* An error occurred. */
- break;
-
- rp = line;
- /* Terminate the line (excluding comments or newline) with a NUL
- byte to simplify the following code. */
- endp = strchr (rp, '#');
- if (endp != NULL)
- *endp = '\0';
- else
- if (rp[n - 1] == '\n')
- rp[n - 1] = '\0';
-
- while (isspace (*rp))
- ++rp;
-
- /* If this is an empty line go on with the next one. */
- if (rp == endp)
- continue;
-
- word = rp;
- while (*rp != '\0' && !isspace (*rp))
- ++rp;
-
- if (rp - word == sizeof ("alias") - 1
- && memcmp (word, "alias", sizeof ("alias") - 1) == 0)
- add_alias (rp);
- else if (rp - word == sizeof ("module") - 1
- && memcmp (word, "module", sizeof ("module") - 1) == 0)
- add_module (rp, dir);
- /* else */
- /* Otherwise ignore the line. */
- }
-
- free (line);
-
- fclose (fp);
-
- return 0;
-}
-
-
-static void
-append_module (const void *nodep, VISIT value, int level)
-{
- struct module *mo;
-
- if (value != leaf && value != postorder)
- return;
-
- mo = *(struct module **) nodep;
-
- if (nmodule_list > 0
- && strcmp (module_list[nmodule_list - 1]->fromname, mo->fromname) == 0)
- {
- /* Same name. */
- mo->next = module_list[nmodule_list - 1];
- module_list[nmodule_list - 1] = mo;
-
- return;
- }
-
- if (nmodule_list_max == nmodule_list)
- {
- nmodule_list_max += 50;
- module_list = (struct module **) xrealloc (module_list,
- (nmodule_list_max
- * sizeof (struct module *)));
- }
-
- module_list[nmodule_list++] = mo;
-}
-
-
-static void
-get_modules (void)
-{
- twalk (modules, append_module);
-}
-
-
-static void
-add_builtins (void)
-{
- size_t cnt;
-
- /* Add all aliases. */
- for (cnt = 0; cnt < nbuiltin_alias; ++cnt)
- new_alias (builtin_alias[cnt].from,
- strlen (builtin_alias[cnt].from) + 1,
- builtin_alias[cnt].to,
- strlen (builtin_alias[cnt].to) + 1);
-
- /* add the builtin transformations. */
- for (cnt = 0; cnt < nbuiltin_trans; ++cnt)
- new_module (builtin_trans[cnt].from,
- strlen (builtin_trans[cnt].from) + 1,
- builtin_trans[cnt].to,
- strlen (builtin_trans[cnt].to) + 1,
- "", builtin_trans[cnt].module,
- strlen (builtin_trans[cnt].module) + 1,
- builtin_trans[cnt].cost, 0);
-}
-
-
-static int
-name_compare (const void *p1, const void *p2)
-{
- const struct name *n1 = (const struct name *) p1;
- const struct name *n2 = (const struct name *) p2;
-
- return strcmp (n1->name, n2->name);
-}
-
-
-static struct name *
-new_name (const char *str, struct Strent *strent)
-{
- struct name *newp = (struct name *) xmalloc (sizeof (struct name));
-
- newp->name = str;
- newp->strent = strent;
- newp->module_idx = -1;
- newp->hashval = hash_string (str);
-
- ++nnames;
-
- return newp;
-}
-
-
-static void
-generate_name_list (void)
-{
- size_t i;
-
- /* A name we always need. */
- tsearch (new_name ("INTERNAL", strtabadd (strtab, "INTERNAL",
- sizeof ("INTERNAL"))),
- &names, name_compare);
-
- for (i = 0; i < nmodule_list; ++i)
- {
- struct module *runp;
-
- if (strcmp (module_list[i]->fromname, "INTERNAL") != 0)
- tsearch (new_name (module_list[i]->fromname,
- module_list[i]->fromname_strent),
- &names, name_compare);
-
- for (runp = module_list[i]; runp != NULL; runp = runp->next)
- if (strcmp (runp->toname, "INTERNAL") != 0)
- tsearch (new_name (runp->toname, runp->toname_strent),
- &names, name_compare);
- }
-}
-
-
-static int
-name_to_module_idx (const char *name, int add)
-{
- struct name **res;
- struct name fake_name = { .name = name };
- int idx;
-
- res = (struct name **) tfind (&fake_name, &names, name_compare);
- if (res == NULL)
- abort ();
-
- idx = (*res)->module_idx;
- if (idx == -1 && add)
- /* No module index assigned yet. */
- idx = (*res)->module_idx = nname_info++;
-
- return idx;
-}
-
-
-static void
-generate_name_info (void)
-{
- size_t i;
- int idx;
-
- name_info = (struct name_info *) xcalloc (nmodule_list + 1,
- sizeof (struct name_info));
-
- /* First add a special entry for the INTERNAL name. This must have
- index zero. */
- idx = name_to_module_idx ("INTERNAL", 1);
- name_info[0].canonical_name = "INTERNAL";
- name_info[0].canonical_strent = strtabadd (strtab, "INTERNAL",
- sizeof ("INTERNAL"));
- assert (nname_info == 1);
-
- for (i = 0; i < nmodule_list; ++i)
- {
- struct module *runp;
-
- for (runp = module_list[i]; runp != NULL; runp = runp->next)
- if (strcmp (runp->fromname, "INTERNAL") == 0)
- {
- idx = name_to_module_idx (runp->toname, 1);
- name_info[idx].from_internal = runp;
- assert (name_info[idx].canonical_name == NULL
- || strcmp (name_info[idx].canonical_name,
- runp->toname) == 0);
- name_info[idx].canonical_name = runp->toname;
- name_info[idx].canonical_strent = runp->toname_strent;
- }
- else if (strcmp (runp->toname, "INTERNAL") == 0)
- {
- idx = name_to_module_idx (runp->fromname, 1);
- name_info[idx].to_internal = runp;
- assert (name_info[idx].canonical_name == NULL
- || strcmp (name_info[idx].canonical_name,
- runp->fromname) == 0);
- name_info[idx].canonical_name = runp->fromname;
- name_info[idx].canonical_strent = runp->fromname_strent;
- }
- else
- {
- /* This is a transformation not to or from the INTERNAL
- encoding. */
- int from_idx = name_to_module_idx (runp->fromname, 1);
- int to_idx = name_to_module_idx (runp->toname, 1);
- struct other_conv_list *newp;
-
- newp = (struct other_conv_list *)
- xmalloc (sizeof (struct other_conv_list));
- newp->other_conv.module_idx = to_idx;
- newp->other_conv.module = runp;
- newp->other_conv.next = NULL; /* XXX Allow multiple module sequence */
- newp->dest_idx = to_idx;
- newp->next = name_info[from_idx].other_conv_list;
- name_info[from_idx].other_conv_list = newp;
- assert (name_info[from_idx].canonical_name == NULL
- || strcmp (name_info[from_idx].canonical_name,
- runp->fromname) == 0);
- name_info[from_idx].canonical_name = runp->fromname;
- name_info[from_idx].canonical_strent = runp->fromname_strent;
-
- ++nextra_modules;
- }
- }
-
- /* Now add the module index information for all the aliases. */
- for (i = 0; i < nalias_list; ++i)
- {
- struct name fake_name = { .name = alias_list[i]->toname };
- struct name **tonamep;
-
- tonamep = (struct name **) tfind (&fake_name, &names, name_compare);
- if (tonamep != NULL)
- {
- struct name *newp = new_name (alias_list[i]->fromname,
- alias_list[i]->froment);
- newp->module_idx = (*tonamep)->module_idx;
- tsearch (newp, &names, name_compare);
- }
- }
-}
-
-
-static int
-is_prime (unsigned long int candidate)
-{
- /* No even number and none less than 10 will be passed here. */
- unsigned long int divn = 3;
- unsigned long int sq = divn * divn;
-
- while (sq < candidate && candidate % divn != 0)
- {
- ++divn;
- sq += 4 * divn;
- ++divn;
- }
-
- return candidate % divn != 0;
-}
-
-
-static uint32_t
-next_prime (uint32_t seed)
-{
- /* Make it definitely odd. */
- seed |= 1;
-
- while (!is_prime (seed))
- seed += 2;
-
- return seed;
-}
-
-
-/* Format of the output file.
-
- Offset Length Description
- 0000 4 Magic header bytes
- 0004 4 Offset of string table (stoff)
- 0008 4 Offset of name hashing table (hoff)
- 000C 4 Hashing table size (hsize)
- 0010 4 Offset of module table (moff)
- 0014 4 Offset of other conversion module table (ooff)
-
- stoff ??? String table
-
- hoff 8*hsize Array of tuples
- string table offset
- module index
-
- moff ??? Array of tuples
- canonical name offset
- from-internal module dir name offset
- from-internal module name off
- to-internal module dir name offset
- to-internal module name offset
- offset into other conversion table
-
- ooff ??? One or more of
- number of steps/modules
- one or more of tuple
- canonical name offset for output
- module dir name offset
- module name offset
- (following last entry with step count 0)
-*/
-static int
-write_output (void)
-{
- int fd;
- char *string_table;
- size_t string_table_size;
- struct gconvcache_header header;
- struct hash_entry *hash_table;
- size_t hash_size;
- struct module_entry *module_table;
- char *extra_table;
- char *cur_extra_table;
- size_t n;
- int idx;
- struct iovec iov[6];
- static const gidx_t null_word;
- size_t total;
- char tmpfname[sizeof (GCONV_MODULES_CACHE) + strlen (".XXXXXX")];
-
- /* Function to insert the names. */
- static void name_insert (const void *nodep, VISIT value, int level)
- {
- struct name *name;
- unsigned int idx;
- unsigned int hval2;
-
- if (value != leaf && value != postorder)
- return;
-
- name = *(struct name **) nodep;
- idx = name->hashval % hash_size;
- hval2 = 1 + name->hashval % (hash_size - 2);
-
- while (hash_table[idx].string_offset != 0)
- if ((idx += hval2) >= hash_size)
- idx -= hash_size;
-
- hash_table[idx].string_offset = strtaboffset (name->strent);
-
- assert (name->module_idx != -1);
- hash_table[idx].module_idx = name->module_idx;
- }
-
- /* Open the output file. */
- strcpy (stpcpy (tmpfname, GCONV_MODULES_CACHE), ".XXXXXX");
- fd = mkstemp (tmpfname);
- if (fd == -1)
- return 1;
-
- /* Create the string table. */
- string_table = strtabfinalize (strtab, &string_table_size);
-
- /* Create the hashing table. We know how many strings we have.
- Creating a perfect hash table is not reasonable here. Therefore
- we use open hashing and a table size which is the next prime 40%
- larger than the number of strings. */
- hash_size = next_prime (nnames * 1.4);
- hash_table = (struct hash_entry *) xcalloc (hash_size,
- sizeof (struct hash_entry));
- /* Fill the hash table. */
- twalk (names, name_insert);
-
- /* Create the section for the module list. */
- module_table = (struct module_entry *) xcalloc (sizeof (struct module_entry),
- nname_info);
-
- /* Allocate memory for the non-INTERNAL conversions. The allocated
- memory can be more than is actually needed. */
- extra_table = (char *) xcalloc (sizeof (struct extra_entry)
- + sizeof (gidx_t)
- + sizeof (struct extra_entry_module),
- nextra_modules);
- cur_extra_table = extra_table;
-
- /* Fill in the module information. */
- for (n = 0; n < nname_info; ++n)
- {
- module_table[n].canonname_offset =
- strtaboffset (name_info[n].canonical_strent);
-
- if (name_info[n].from_internal == NULL)
- {
- module_table[n].fromdir_offset = 0;
- module_table[n].fromname_offset = 0;
- }
- else
- {
- module_table[n].fromdir_offset =
- strtaboffset (name_info[n].from_internal->directory_strent);
- module_table[n].fromname_offset =
- strtaboffset (name_info[n].from_internal->filename_strent);
- }
-
- if (name_info[n].to_internal == NULL)
- {
- module_table[n].todir_offset = 0;
- module_table[n].toname_offset = 0;
- }
- else
- {
- module_table[n].todir_offset =
- strtaboffset (name_info[n].to_internal->directory_strent);
- module_table[n].toname_offset =
- strtaboffset (name_info[n].to_internal->filename_strent);
- }
-
- if (name_info[n].other_conv_list != NULL)
- {
- struct other_conv_list *other = name_info[n].other_conv_list;
-
- /* Store the reference. We add 1 to distinguish the entry
- at offset zero from the case where no extra modules are
- available. The file reader has to account for the
- offset. */
- module_table[n].extra_offset = 1 + cur_extra_table - extra_table;
-
- do
- {
- struct other_conv *runp;
- struct extra_entry *extra;
-
- /* Allocate new entry. */
- extra = (struct extra_entry *) cur_extra_table;
- cur_extra_table += sizeof (struct extra_entry);
- extra->module_cnt = 0;
-
- runp = &other->other_conv;
- do
- {
- cur_extra_table += sizeof (struct extra_entry_module);
- extra->module[extra->module_cnt].outname_offset =
- runp->next == NULL
- ? other->dest_idx : runp->next->module_idx;
- extra->module[extra->module_cnt].dir_offset =
- strtaboffset (runp->module->directory_strent);
- extra->module[extra->module_cnt].name_offset =
- strtaboffset (runp->module->filename_strent);
- ++extra->module_cnt;
-
- runp = runp->next;
- }
- while (runp != NULL);
-
- other = other->next;
- }
- while (other != NULL);
-
- /* Final module_cnt is zero. */
- *((gidx_t *) cur_extra_table) = 0;
- cur_extra_table += sizeof (gidx_t);
- }
- }
-
- header.magic = GCONVCACHE_MAGIC;
-
- iov[0].iov_base = &header;
- iov[0].iov_len = sizeof (struct gconvcache_header);
- total = iov[0].iov_len;
-
- header.string_offset = total;
- iov[1].iov_base = string_table;
- iov[1].iov_len = string_table_size;
- total += iov[1].iov_len;
-
- idx = 2;
- if ((string_table_size & (sizeof (gidx_t) - 1)) != 0)
- {
- iov[2].iov_base = (void *) &null_word;
- iov[2].iov_len = (sizeof (gidx_t)
- - (string_table_size & (sizeof (gidx_t) - 1)));
- total += iov[2].iov_len;
- ++idx;
- }
-
- header.hash_offset = total;
- header.hash_size = hash_size;
- iov[idx].iov_base = hash_table;
- iov[idx].iov_len = hash_size * sizeof (struct hash_entry);
- total += iov[idx].iov_len;
- ++idx;
-
- header.module_offset = total;
- iov[idx].iov_base = module_table;
- iov[idx].iov_len = nname_info * sizeof (struct module_entry);
- total += iov[idx].iov_len;
- ++idx;
-
- assert (cur_extra_table - extra_table
- <= ((sizeof (struct extra_entry) + sizeof (gidx_t)
- + sizeof (struct extra_entry_module))
- * nextra_modules));
- header.otherconv_offset = total;
- iov[idx].iov_base = extra_table;
- iov[idx].iov_len = cur_extra_table - extra_table;
- total += iov[idx].iov_len;
- ++idx;
-
- if (TEMP_FAILURE_RETRY (writev (fd, iov, idx)) != total
- /* The file was created with mode 0600. Make it world-readable. */
- || fchmod (fd, 0644) != 0
- /* Rename the file, possibly replacing an old one. */
- || rename (tmpfname, GCONV_MODULES_CACHE) != 0)
- {
- int save_errno = errno;
- close (fd);
- unlink (tmpfname);
- error (EXIT_FAILURE, save_errno,
- gettext ("cannot generate output file"));
- }
-
- close (fd);
-
- return 0;
-}
diff --git a/newlib/libc/sys/linux/iconv/iconvconfig.h b/newlib/libc/sys/linux/iconv/iconvconfig.h
deleted file mode 100644
index c52ceaefe..000000000
--- a/newlib/libc/sys/linux/iconv/iconvconfig.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2000.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <stdint.h>
-
-
-typedef uint16_t gidx_t;
-
-
-struct gconvcache_header
-{
- uint32_t magic;
- gidx_t string_offset;
- gidx_t hash_offset;
- gidx_t hash_size;
- gidx_t module_offset;
- gidx_t otherconv_offset;
-};
-
-struct hash_entry
-{
- gidx_t string_offset;
- gidx_t module_idx;
-};
-
-struct module_entry
-{
- gidx_t canonname_offset;
- gidx_t fromdir_offset;
- gidx_t fromname_offset;
- gidx_t todir_offset;
- gidx_t toname_offset;
- gidx_t extra_offset;
-};
-
-struct extra_entry
-{
- gidx_t module_cnt;
- struct extra_entry_module
- {
- gidx_t outname_offset;
- gidx_t dir_offset;
- gidx_t name_offset;
- } module[0];
-};
-
-
-#define GCONVCACHE_MAGIC 0x20010324
-
-
-#define GCONV_MODULES_CACHE GCONV_DIR "/gconv-modules.cache"
diff --git a/newlib/libc/sys/linux/iconv/loadinfo.h b/newlib/libc/sys/linux/iconv/loadinfo.h
deleted file mode 100644
index 1de6cfd24..000000000
--- a/newlib/libc/sys/linux/iconv/loadinfo.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _LOADINFO_H
-#define _LOADINFO_H 1
-
-#ifndef PARAMS
-# if __STDC__
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif
-#endif
-
-#ifndef internal_function
-# define internal_function
-#endif
-
-/* Tell the compiler when a conditional or integer expression is
- almost always true or almost always false. */
-#ifndef HAVE_BUILTIN_EXPECT
-# define __builtin_expect(expr, val) (expr)
-#endif
-
-/* Encoding of locale name parts. */
-#define CEN_REVISION 1
-#define CEN_SPONSOR 2
-#define CEN_SPECIAL 4
-#define XPG_NORM_CODESET 8
-#define XPG_CODESET 16
-#define TERRITORY 32
-#define CEN_AUDIENCE 64
-#define XPG_MODIFIER 128
-
-#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
-#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
-
-
-struct loaded_l10nfile
-{
- const char *filename;
- int decided;
-
- const void *data;
-
- struct loaded_l10nfile *next;
- struct loaded_l10nfile *successor[1];
-};
-
-
-/* Normalize codeset name. There is no standard for the codeset
- names. Normalization allows the user to use any of the common
- names. The return value is dynamically allocated and has to be
- freed by the caller. */
-extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
- size_t name_len));
-
-extern struct loaded_l10nfile *
-_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
- const char *dirlist, size_t dirlist_len, int mask,
- const char *language, const char *territory,
- const char *codeset,
- const char *normalized_codeset,
- const char *modifier, const char *special,
- const char *sponsor, const char *revision,
- const char *filename, int do_allocate));
-
-
-extern const char *_nl_expand_alias PARAMS ((const char *name));
-
-/* normalized_codeset is dynamically allocated and has to be freed by
- the caller. */
-extern int _nl_explode_name PARAMS ((char *name, const char **language,
- const char **modifier,
- const char **territory,
- const char **codeset,
- const char **normalized_codeset,
- const char **special,
- const char **sponsor,
- const char **revision));
-
-extern char *_nl_find_language PARAMS ((const char *name));
-
-#endif /* loadinfo.h */
diff --git a/newlib/libc/sys/linux/iconv/localeinfo.h b/newlib/libc/sys/linux/iconv/localeinfo.h
deleted file mode 100644
index 026463ffb..000000000
--- a/newlib/libc/sys/linux/iconv/localeinfo.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/* Declarations for internal libc locale interfaces
- Copyright (C) 1995, 96, 97, 98, 99,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _LOCALEINFO_H
-#define _LOCALEINFO_H 1
-
-#include <stddef.h>
-#include <langinfo.h>
-#include <limits.h>
-#include <time.h>
-#include <stdint.h>
-#include <sys/types.h>
-
-/* This has to be changed whenever a new locale is defined. */
-#define __LC_LAST 13
-
-#include "loadinfo.h" /* For loaded_l10nfile definition. */
-
-/* Magic number at the beginning of a locale data file for CATEGORY. */
-#define LIMAGIC(category) ((unsigned int) (0x20000828 ^ (category)))
-
-/* Two special weight constants for the collation data. */
-#define IGNORE_CHAR 2
-
-/* We use a special value for the usage counter in `locale_data' to
- signal that this data must never be removed anymore. */
-#define MAX_USAGE_COUNT (UINT_MAX - 1)
-#define UNDELETABLE UINT_MAX
-
-/* Structure describing locale data in core for a category. */
-struct locale_data
-{
- const char *name;
- const char *filedata; /* Region mapping the file data. */
- off_t filesize; /* Size of the file (and the region). */
- int mmaped; /* If nonzero the data is mmaped. */
-
- unsigned int usage_count; /* Counter for users. */
-
- int use_translit; /* Nonzero if the mb*towv*() and wc*tomb()
- functions should use transliteration. */
- const char *options; /* Extra options from the locale name,
- not used in the path to the locale data. */
-
- unsigned int nstrings; /* Number of strings below. */
- union locale_data_value
- {
- const uint32_t *wstr;
- const char *string;
- unsigned int word;
- }
- values __flexarr; /* Items, usually pointers into `filedata'. */
-};
-
-/* We know three kinds of collation sorting rules. */
-enum coll_sort_rule
-{
- illegal_0__,
- sort_forward,
- sort_backward,
- illegal_3__,
- sort_position,
- sort_forward_position,
- sort_backward_position,
- sort_mask
-};
-
-/* We can map the types of the entries into a few categories. */
-enum value_type
-{
- none,
- string,
- stringarray,
- byte,
- bytearray,
- word,
- stringlist,
- wordarray,
- wstring,
- wstringarray,
- wstringlist
-};
-
-
-/* Definitions for `era' information from LC_TIME. */
-#define ERA_NAME_FORMAT_MEMBERS 4
-#define ERA_M_NAME 0
-#define ERA_M_FORMAT 1
-#define ERA_W_NAME 2
-#define ERA_W_FORMAT 3
-
-
-/* Structure to access `era' information from LC_TIME. */
-struct era_entry
-{
- uint32_t direction; /* Contains '+' or '-'. */
- int32_t offset;
- int32_t start_date[3];
- int32_t stop_date[3];
- const char *era_name;
- const char *era_format;
- const wchar_t *era_wname;
- const wchar_t *era_wformat;
- int absolute_direction;
- /* absolute direction:
- +1 indicates that year number is higher in the future. (like A.D.)
- -1 indicates that year number is higher in the past. (like B.C.) */
-};
-
-
-/* LC_CTYPE specific:
- Hardwired indices for standard wide character translation mappings. */
-enum
-{
- __TOW_toupper = 0,
- __TOW_tolower = 1
-};
-
-
-/* LC_CTYPE specific:
- Access a wide character class with a single character index.
- _ISCTYPE (c, desc) = iswctype (btowc (c), desc).
- c must be an `unsigned char'. desc must be a nonzero wctype_t. */
-#define _ISCTYPE(c, desc) \
- (((((const uint32_t *) (desc)) - 8)[(c) >> 5] >> ((c) & 0x1f)) & 1)
-
-
-/* For each category declare the variable for the current locale data. */
-#define DEFINE_CATEGORY(category, category_name, items, a) \
-extern struct locale_data *_nl_current_##category;
-#include "categories.def"
-#undef DEFINE_CATEGORY
-
-extern const char *const _nl_category_names[__LC_LAST];
-extern const size_t _nl_category_name_sizes[__LC_LAST];
-extern struct locale_data * *const _nl_current[__LC_LAST];
-
-/* Extract the current CATEGORY locale's string for ITEM. */
-#define _NL_CURRENT(category, item) \
- (_nl_current_##category->values[_NL_ITEM_INDEX (item)].string)
-
-/* Extract the current CATEGORY locale's string for ITEM. */
-#define _NL_CURRENT_WSTR(category, item) \
- ((wchar_t *) (_nl_current_##category->values[_NL_ITEM_INDEX (item)].wstr))
-
-/* Extract the current CATEGORY locale's word for ITEM. */
-#define _NL_CURRENT_WORD(category, item) \
- (_nl_current_##category->values[_NL_ITEM_INDEX (item)].word)
-
-/* This is used in lc-CATEGORY.c to define _nl_current_CATEGORY. */
-#define _NL_CURRENT_DEFINE(category) \
- extern struct locale_data _nl_C_##category; \
- struct locale_data *_nl_current_##category = &_nl_C_##category
-
-/* Load the locale data for CATEGORY from the file specified by *NAME.
- If *NAME is "", use environment variables as specified by POSIX,
- and fill in *NAME with the actual name used. The directories
- listed in LOCALE_PATH are searched for the locale files. */
-extern struct locale_data *_nl_find_locale (const char *locale_path,
- size_t locale_path_len,
- int category, const char **name);
-
-/* Try to load the file described by FILE. */
-extern void _nl_load_locale (struct loaded_l10nfile *file, int category);
-
-/* Free all resource. */
-extern void _nl_unload_locale (struct locale_data *locale);
-
-/* Free the locale and give back all memory if the usage count is one. */
-extern void _nl_remove_locale (int locale, struct locale_data *data);
-
-
-/* Return `era' entry which corresponds to TP. Used in strftime. */
-extern struct era_entry *_nl_get_era_entry (const struct tm *tp);
-
-/* Return `era' cnt'th entry . Used in strptime. */
-extern struct era_entry *_nl_select_era_entry (int cnt);
-
-/* Return `alt_digit' which corresponds to NUMBER. Used in strftime. */
-extern const char *_nl_get_alt_digit (unsigned int number);
-
-/* Similar, but now for wide characters. */
-extern const wchar_t *_nl_get_walt_digit (unsigned int number);
-
-/* Parse string as alternative digit and return numeric value. */
-extern int _nl_parse_alt_digit (const char **strp);
-
-/* Postload processing. */
-extern void _nl_postload_ctype (void);
-extern void _nl_postload_time (void);
-
-
-#endif /* localeinfo.h */
diff --git a/newlib/libc/sys/linux/iconv/loop.c b/newlib/libc/sys/linux/iconv/loop.c
deleted file mode 100644
index 7d3bf472d..000000000
--- a/newlib/libc/sys/linux/iconv/loop.c
+++ /dev/null
@@ -1,450 +0,0 @@
-/* Conversion loop frame work.
- Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* This file provides a frame for the reader loop in all conversion modules.
- The actual code must (of course) be provided in the actual module source
- code but certain actions can be written down generically, with some
- customization options which are these:
-
- MIN_NEEDED_INPUT minimal number of input bytes needed for the next
- conversion.
- MIN_NEEDED_OUTPUT minimal number of bytes produced by the next round
- of conversion.
-
- MAX_NEEDED_INPUT you guess it, this is the maximal number of input
- bytes needed. It defaults to MIN_NEEDED_INPUT
- MAX_NEEDED_OUTPUT likewise for output bytes.
-
- LOOPFCT name of the function created. If not specified
- the name is `loop' but this prevents the use
- of multiple functions in the same file.
-
- BODY this is supposed to expand to the body of the loop.
- The user must provide this.
-
- EXTRA_LOOP_DECLS extra arguments passed from converion loop call.
-
- INIT_PARAMS code to define and initialize variables from params.
- UPDATE_PARAMS code to store result in params.
-*/
-
-#include <assert.h>
-#include <machine/endian.h>
-#include <gconv.h>
-#include <stdint.h>
-#include <string.h>
-#include <wchar.h>
-#include <sys/param.h> /* For MIN. */
-#define __need_size_t
-#include <stddef.h>
-
-
-/* We have to provide support for machines which are not able to handled
- unaligned memory accesses. Some of the character encodings have
- representations with a fixed width of 2 or 4 bytes. But if we cannot
- access unaligned memory we still have to read byte-wise. */
-#undef FCTNAME2
-#if defined _STRING_ARCH_unaligned || !defined DEFINE_UNALIGNED
-/* We can handle unaligned memory access. */
-# define get16(addr) *((__const uint16_t *) (addr))
-# define get32(addr) *((__const uint32_t *) (addr))
-
-/* We need no special support for writing values either. */
-# define put16(addr, val) *((uint16_t *) (addr)) = (val)
-# define put32(addr, val) *((uint32_t *) (addr)) = (val)
-
-# define FCTNAME2(name) name
-#else
-/* Distinguish between big endian and little endian. */
-# if __BYTE_ORDER == __LITTLE_ENDIAN
-# define get16(addr) \
- (((__const unsigned char *) (addr))[1] << 8 \
- | ((__const unsigned char *) (addr))[0])
-# define get32(addr) \
- (((((__const unsigned char *) (addr))[3] << 8 \
- | ((__const unsigned char *) (addr))[2]) << 8 \
- | ((__const unsigned char *) (addr))[1]) << 8 \
- | ((__const unsigned char *) (addr))[0])
-
-# define put16(addr, val) \
- ({ uint16_t __val = (val); \
- ((unsigned char *) (addr))[0] = __val; \
- ((unsigned char *) (addr))[1] = __val >> 8; \
- (void) 0; })
-# define put32(addr, val) \
- ({ uint32_t __val = (val); \
- ((unsigned char *) (addr))[0] = __val; \
- __val >>= 8; \
- ((unsigned char *) (addr))[1] = __val; \
- __val >>= 8; \
- ((unsigned char *) (addr))[2] = __val; \
- __val >>= 8; \
- ((unsigned char *) (addr))[3] = __val; \
- (void) 0; })
-# else
-# define get16(addr) \
- (((__const unsigned char *) (addr))[0] << 8 \
- | ((__const unsigned char *) (addr))[1])
-# define get32(addr) \
- (((((__const unsigned char *) (addr))[0] << 8 \
- | ((__const unsigned char *) (addr))[1]) << 8 \
- | ((__const unsigned char *) (addr))[2]) << 8 \
- | ((__const unsigned char *) (addr))[3])
-
-# define put16(addr, val) \
- ({ uint16_t __val = (val); \
- ((unsigned char *) (addr))[1] = __val; \
- ((unsigned char *) (addr))[0] = __val >> 8; \
- (void) 0; })
-# define put32(addr, val) \
- ({ uint32_t __val = (val); \
- ((unsigned char *) (addr))[3] = __val; \
- __val >>= 8; \
- ((unsigned char *) (addr))[2] = __val; \
- __val >>= 8; \
- ((unsigned char *) (addr))[1] = __val; \
- __val >>= 8; \
- ((unsigned char *) (addr))[0] = __val; \
- (void) 0; })
-# endif
-
-# define FCTNAME2(name) name##_unaligned
-#endif
-#define FCTNAME(name) FCTNAME2(name)
-
-
-/* We need at least one byte for the next round. */
-#ifndef MIN_NEEDED_INPUT
-# error "MIN_NEEDED_INPUT definition missing"
-#endif
-
-/* Let's see how many bytes we produce. */
-#ifndef MAX_NEEDED_INPUT
-# define MAX_NEEDED_INPUT MIN_NEEDED_INPUT
-#endif
-
-/* We produce at least one byte in the next round. */
-#ifndef MIN_NEEDED_OUTPUT
-# error "MIN_NEEDED_OUTPUT definition missing"
-#endif
-
-/* Let's see how many bytes we produce. */
-#ifndef MAX_NEEDED_OUTPUT
-# define MAX_NEEDED_OUTPUT MIN_NEEDED_OUTPUT
-#endif
-
-/* Default name for the function. */
-#ifndef LOOPFCT
-# define LOOPFCT loop
-#endif
-
-/* Make sure we have a loop body. */
-#ifndef BODY
-# error "Definition of BODY missing for function" LOOPFCT
-#endif
-
-
-/* If no arguments have to passed to the loop function define the macro
- as empty. */
-#ifndef EXTRA_LOOP_DECLS
-# define EXTRA_LOOP_DECLS
-#endif
-
-
-/* To make it easier for the writers of the modules, we define a macro
- to test whether we have to ignore errors. */
-#define ignore_errors_p() \
- (irreversible != NULL && (flags & __GCONV_IGNORE_ERRORS))
-
-
-/* Error handling with transliteration/transcription function use and
- ignoring of errors. Note that we cannot use the do while (0) trick
- since `break' and `continue' must reach certain points. */
-#define STANDARD_ERR_HANDLER(Incr) \
- { \
- struct __gconv_trans_data *trans; \
- \
- result = __GCONV_ILLEGAL_INPUT; \
- \
- if (irreversible == NULL) \
- /* This means we are in call from __gconv_transliterate. In this \
- case we are not doing any error recovery outself. */ \
- break; \
- \
- /* First try the transliteration methods. */ \
- for (trans = step_data->__trans; trans != NULL; trans = trans->__next) \
- { \
- result = trans->__trans_fct (step, step_data, trans->__data, *inptrp, \
- &inptr, inend, &outptr, irreversible); \
- if (result != __GCONV_ILLEGAL_INPUT) \
- break; \
- } \
- /* If any of them recognized the input continue with the loop. */ \
- if (result != __GCONV_ILLEGAL_INPUT) \
- continue; \
- \
- /* Next see whether we have to ignore the error. If not, stop. */ \
- if (! ignore_errors_p ()) \
- break; \
- \
- /* When we come here it means we ignore the character. */ \
- ++*irreversible; \
- inptr += Incr; \
- continue; \
- }
-
-
-/* Handling of Unicode 3.1 TAG characters. Unicode recommends
- "If language codes are not relevant to the particular processing
- operation, then they should be ignored."
- This macro is usually called right before STANDARD_ERR_HANDLER (Incr). */
-#define UNICODE_TAG_HANDLER(Character, Incr) \
- { \
- /* TAG characters are those in the range U+E0000..U+E007F. */ \
- if (((Character) >> 7) == (0xe0000 >> 7)) \
- { \
- inptr += Incr; \
- continue; \
- } \
- }
-
-
-/* The function returns the status, as defined in gconv.h. */
-static inline int
-FCTNAME (LOOPFCT) (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- const unsigned char **inptrp, const unsigned char *inend,
- unsigned char **outptrp, const unsigned char *outend,
- size_t *irreversible EXTRA_LOOP_DECLS)
-{
-#ifdef LOOP_NEED_STATE
- mbstate_t *state = step_data->__statep;
-#endif
-#ifdef LOOP_NEED_FLAGS
- int flags = step_data->__flags;
-#endif
-#ifdef LOOP_NEED_DATA
- void *data = step->__data;
-#endif
- int result = __GCONV_EMPTY_INPUT;
- const unsigned char *inptr = *inptrp;
- unsigned char *outptr = *outptrp;
-
-#ifdef INIT_PARAMS
- INIT_PARAMS;
-#endif
-
- while (inptr != inend)
- {
- /* `if' cases for MIN_NEEDED_OUTPUT ==/!= 1 is made to help the
- compiler generating better code. They will be optimized away
- since MIN_NEEDED_OUTPUT is always a constant. */
- if ((MIN_NEEDED_OUTPUT != 1
- && __builtin_expect (outptr + MIN_NEEDED_OUTPUT > outend, 0))
- || (MIN_NEEDED_OUTPUT == 1
- && __builtin_expect (outptr >= outend, 0)))
- {
- /* Overflow in the output buffer. */
- result = __GCONV_FULL_OUTPUT;
- break;
- }
- if (MIN_NEEDED_INPUT > 1
- && __builtin_expect (inptr + MIN_NEEDED_INPUT > inend, 0))
- {
- /* We don't have enough input for another complete input
- character. */
- result = __GCONV_INCOMPLETE_INPUT;
- break;
- }
-
- /* Here comes the body the user provides. It can stop with
- RESULT set to GCONV_INCOMPLETE_INPUT (if the size of the
- input characters vary in size), GCONV_ILLEGAL_INPUT, or
- GCONV_FULL_OUTPUT (if the output characters vary in size). */
- BODY
- }
-
- /* Update the pointers pointed to by the parameters. */
- *inptrp = inptr;
- *outptrp = outptr;
-#ifdef UPDATE_PARAMS
- UPDATE_PARAMS;
-#endif
-
- return result;
-}
-
-
-/* Include the file a second time to define the function to handle
- unaligned access. */
-#if !defined DEFINE_UNALIGNED && !defined _STRING_ARCH_unaligned \
- && MIN_NEEDED_FROM != 1 && MAX_NEEDED_FROM % MIN_NEEDED_FROM == 0 \
- && MIN_NEEDED_TO != 1 && MAX_NEEDED_TO % MIN_NEEDED_TO == 0
-# undef get16
-# undef get32
-# undef put16
-# undef put32
-# undef unaligned
-
-# define DEFINE_UNALIGNED
-# include "loop.c"
-# undef DEFINE_UNALIGNED
-#endif
-
-
-#if MAX_NEEDED_INPUT > 1
-# define SINGLE(fct) SINGLE2 (fct)
-# define SINGLE2(fct) fct##_single
-static inline int
-SINGLE(LOOPFCT) (struct __gconv_step *step,
- struct __gconv_step_data *step_data,
- const unsigned char **inptrp, const unsigned char *inend,
- unsigned char **outptrp, unsigned char *outend,
- size_t *irreversible EXTRA_LOOP_DECLS)
-{
- mbstate_t *state = step_data->__statep;
-#ifdef LOOP_NEED_FLAGS
- int flags = step_data->__flags;
-#endif
-#ifdef LOOP_NEED_DATA
- void *data = step->__data;
-#endif
- int result = __GCONV_OK;
- unsigned char bytebuf[MAX_NEEDED_INPUT];
- const unsigned char *inptr = *inptrp;
- unsigned char *outptr = *outptrp;
- size_t inlen;
-
-#ifdef INIT_PARAMS
- INIT_PARAMS;
-#endif
-
-#ifdef UNPACK_BYTES
- UNPACK_BYTES
-#else
- /* Add the bytes from the state to the input buffer. */
- for (inlen = 0; inlen < (size_t) (state->__count & 7); ++inlen)
- bytebuf[inlen] = state->__value.__wchb[inlen];
-#endif
-
- /* Are there enough bytes in the input buffer? */
- if (__builtin_expect (inptr + (MIN_NEEDED_INPUT - inlen) > inend, 0))
- {
- *inptrp = inend;
-#ifdef STORE_REST
- inptr = bytebuf;
- inptrp = &inptr;
- inend = &bytebuf[inlen];
-
- STORE_REST
-#else
- /* We don't have enough input for another complete input
- character. */
- while (inptr < inend)
- state->__value.__wchb[inlen++] = *inptr++;
-#endif
-
- return __GCONV_INCOMPLETE_INPUT;
- }
-
- /* Enough space in output buffer. */
- if ((MIN_NEEDED_OUTPUT != 1 && outptr + MIN_NEEDED_OUTPUT > outend)
- || (MIN_NEEDED_OUTPUT == 1 && outptr >= outend))
- /* Overflow in the output buffer. */
- return __GCONV_FULL_OUTPUT;
-
- /* Now add characters from the normal input buffer. */
- do
- bytebuf[inlen++] = *inptr++;
- while (inlen < MAX_NEEDED_INPUT && inptr < inend);
-
- inptr = bytebuf;
- inend = &bytebuf[inlen];
-
- do
- {
- BODY
- }
- while (0);
-
- /* Now we either have produced an output character and consumed all the
- bytes from the state and at least one more, or the character is still
- incomplete, or we have some other error (like illegal input character,
- no space in output buffer). */
- if (__builtin_expect (inptr != bytebuf, 1))
- {
- /* We found a new character. */
- assert (inptr - bytebuf > (state->__count & 7));
-
- *inptrp += inptr - bytebuf - (state->__count & 7);
- *outptrp = outptr;
-
- result = __GCONV_OK;
-
- /* Clear the state buffer. */
- state->__count &= ~7;
- }
- else if (result == __GCONV_INCOMPLETE_INPUT)
- {
- /* This can only happen if we have less than MAX_NEEDED_INPUT bytes
- available. */
- assert (inend != &bytebuf[MAX_NEEDED_INPUT]);
-
- *inptrp += inend - bytebuf - (state->__count & 7);
-#ifdef STORE_REST
- inptrp = &inptr;
-
- STORE_REST
-#else
- /* We don't have enough input for another complete input
- character. */
- while (inptr < inend)
- state->__value.__wchb[inlen++] = *inptr++;
-#endif
- }
-
- return result;
-}
-# undef SINGLE
-# undef SINGLE2
-#endif
-
-
-/* We remove the macro definitions so that we can include this file again
- for the definition of another function. */
-#undef MIN_NEEDED_INPUT
-#undef MAX_NEEDED_INPUT
-#undef MIN_NEEDED_OUTPUT
-#undef MAX_NEEDED_OUTPUT
-#undef LOOPFCT
-#undef BODY
-#undef LOOPFCT
-#undef EXTRA_LOOP_DECLS
-#undef INIT_PARAMS
-#undef UPDATE_PARAMS
-#undef UNPACK_BYTES
-#undef LOOP_NEED_STATE
-#undef LOOP_NEED_FLAGS
-#undef LOOP_NEED_DATA
-#undef get16
-#undef get32
-#undef put16
-#undef put32
-#undef unaligned
diff --git a/newlib/libc/sys/linux/iconv/skeleton.c b/newlib/libc/sys/linux/iconv/skeleton.c
deleted file mode 100644
index cde8533c5..000000000
--- a/newlib/libc/sys/linux/iconv/skeleton.c
+++ /dev/null
@@ -1,696 +0,0 @@
-/* Skeleton for a conversion module.
- Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* This file can be included to provide definitions of several things
- many modules have in common. It can be customized using the following
- macros:
-
- DEFINE_INIT define the default initializer. This requires the
- following symbol to be defined.
-
- CHARSET_NAME string with official name of the coded character
- set (in all-caps)
-
- DEFINE_FINI define the default destructor function.
-
- MIN_NEEDED_FROM minimal number of bytes needed for the from-charset.
- MIN_NEEDED_TO likewise for the to-charset.
-
- MAX_NEEDED_FROM maximal number of bytes needed for the from-charset.
- This macro is optional, it defaults to MIN_NEEDED_FROM.
- MAX_NEEDED_TO likewise for the to-charset.
-
- DEFINE_DIRECTION_OBJECTS
- two objects will be defined to be used when the
- `gconv' function must only distinguish two
- directions. This is implied by DEFINE_INIT.
- If this macro is not defined the following
- macro must be available.
-
- FROM_DIRECTION this macro is supposed to return a value != 0
- if we convert from the current character set,
- otherwise it return 0.
-
- EMIT_SHIFT_TO_INIT this symbol is optional. If it is defined it
- defines some code which writes out a sequence
- of characters which bring the current state into
- the initial state.
-
- FROM_LOOP name of the function implementing the conversion
- from the current characters.
- TO_LOOP likewise for the other direction
-
- ONE_DIRECTION optional. If defined to 1, only one conversion
- direction is defined instead of two. In this
- case, FROM_DIRECTION should be defined to 1, and
- FROM_LOOP and TO_LOOP should have the same value.
-
- SAVE_RESET_STATE in case of an error we must reset the state for
- the rerun so this macro must be defined for
- stateful encodings. It takes an argument which
- is nonzero when saving.
-
- RESET_INPUT_BUFFER If the input character sets allow this the macro
- can be defined to reset the input buffer pointers
- to cover only those characters up to the error.
-
- FUNCTION_NAME if not set the conversion function is named `gconv'.
-
- PREPARE_LOOP optional code preparing the conversion loop. Can
- contain variable definitions.
- END_LOOP also optional, may be used to store information
-
- EXTRA_LOOP_ARGS optional macro specifying extra arguments passed
- to loop function.
- */
-
-#include <assert.h>
-#include <gconv.h>
-#include <string.h>
-#define __need_size_t
-#define __need_NULL
-#include <stddef.h>
-
-#include <wchar.h>
-
-#ifndef STATIC_GCONV
-# include <dlfcn.h>
-#endif
-
-# define DL_CALL_FCT(fct, args) fct args
-
-/* The direction objects. */
-#if DEFINE_DIRECTION_OBJECTS || DEFINE_INIT
-static int from_object;
-static int to_object;
-
-# ifndef FROM_DIRECTION
-# define FROM_DIRECTION (step->__data == &from_object)
-# endif
-#else
-# ifndef FROM_DIRECTION
-# error "FROM_DIRECTION must be provided if direction objects are not used"
-# endif
-#endif
-
-
-/* How many bytes are needed at most for the from-charset. */
-#ifndef MAX_NEEDED_FROM
-# define MAX_NEEDED_FROM MIN_NEEDED_FROM
-#endif
-
-/* Same for the to-charset. */
-#ifndef MAX_NEEDED_TO
-# define MAX_NEEDED_TO MIN_NEEDED_TO
-#endif
-
-
-/* Define macros which can access unaligned buffers. These macros are
- supposed to be used only in code outside the inner loops. For the inner
- loops we have other definitions which allow optimized access. */
-#ifdef _STRING_ARCH_unaligned
-/* We can handle unaligned memory access. */
-# define get16u(addr) *((__const uint16_t *) (addr))
-# define get32u(addr) *((__const uint32_t *) (addr))
-
-/* We need no special support for writing values either. */
-# define put16u(addr, val) *((uint16_t *) (addr)) = (val)
-# define put32u(addr, val) *((uint32_t *) (addr)) = (val)
-#else
-/* Distinguish between big endian and little endian. */
-# if __BYTE_ORDER == __LITTLE_ENDIAN
-# define get16u(addr) \
- (((__const unsigned char *) (addr))[1] << 8 \
- | ((__const unsigned char *) (addr))[0])
-# define get32u(addr) \
- (((((__const unsigned char *) (addr))[3] << 8 \
- | ((__const unsigned char *) (addr))[2]) << 8 \
- | ((__const unsigned char *) (addr))[1]) << 8 \
- | ((__const unsigned char *) (addr))[0])
-
-# define put16u(addr, val) \
- ({ uint16_t __val = (val); \
- ((unsigned char *) (addr))[0] = __val; \
- ((unsigned char *) (addr))[1] = __val >> 8; \
- (void) 0; })
-# define put32u(addr, val) \
- ({ uint32_t __val = (val); \
- ((unsigned char *) (addr))[0] = __val; \
- __val >>= 8; \
- ((unsigned char *) (addr))[1] = __val; \
- __val >>= 8; \
- ((unsigned char *) (addr))[2] = __val; \
- __val >>= 8; \
- ((unsigned char *) (addr))[3] = __val; \
- (void) 0; })
-# else
-# define get16u(addr) \
- (((__const unsigned char *) (addr))[0] << 8 \
- | ((__const unsigned char *) (addr))[1])
-# define get32u(addr) \
- (((((__const unsigned char *) (addr))[0] << 8 \
- | ((__const unsigned char *) (addr))[1]) << 8 \
- | ((__const unsigned char *) (addr))[2]) << 8 \
- | ((__const unsigned char *) (addr))[3])
-
-# define put16u(addr, val) \
- ({ uint16_t __val = (val); \
- ((unsigned char *) (addr))[1] = __val; \
- ((unsigned char *) (addr))[0] = __val >> 8; \
- (void) 0; })
-# define put32u(addr, val) \
- ({ uint32_t __val = (val); \
- ((unsigned char *) (addr))[3] = __val; \
- __val >>= 8; \
- ((unsigned char *) (addr))[2] = __val; \
- __val >>= 8; \
- ((unsigned char *) (addr))[1] = __val; \
- __val >>= 8; \
- ((unsigned char *) (addr))[0] = __val; \
- (void) 0; })
-# endif
-#endif
-
-
-/* For conversions from a fixed width character set to another fixed width
- character set we can define RESET_INPUT_BUFFER in a very fast way. */
-#if !defined RESET_INPUT_BUFFER && !defined SAVE_RESET_STATE
-# if MIN_NEEDED_FROM == MAX_NEEDED_FROM && MIN_NEEDED_TO == MAX_NEEDED_TO
-/* We have to use these `if's here since the compiler cannot know that
- (outbuf - outerr) is always divisible by MIN_NEEDED_TO. */
-# define RESET_INPUT_BUFFER \
- if (MIN_NEEDED_FROM % MIN_NEEDED_TO == 0) \
- *inptrp -= (outbuf - outerr) * (MIN_NEEDED_FROM / MIN_NEEDED_TO); \
- else if (MIN_NEEDED_TO % MIN_NEEDED_FROM == 0) \
- *inptrp -= (outbuf - outerr) / (MIN_NEEDED_TO / MIN_NEEDED_FROM); \
- else \
- *inptrp -= ((outbuf - outerr) / MIN_NEEDED_TO) * MIN_NEEDED_FROM
-# endif
-#endif
-
-
-/* The default init function. It simply matches the name and initializes
- the step data to point to one of the objects above. */
-#if DEFINE_INIT
-# ifndef CHARSET_NAME
-# error "CHARSET_NAME not defined"
-# endif
-
-extern int gconv_init (struct __gconv_step *step);
-int
-gconv_init (struct __gconv_step *step)
-{
- /* Determine which direction. */
- if (strcmp (step->__from_name, CHARSET_NAME) == 0)
- {
- step->__data = &from_object;
-
- step->__min_needed_from = MIN_NEEDED_FROM;
- step->__max_needed_from = MAX_NEEDED_FROM;
- step->__min_needed_to = MIN_NEEDED_TO;
- step->__max_needed_to = MAX_NEEDED_TO;
- }
- else if (__builtin_expect (strcmp (step->__to_name, CHARSET_NAME), 0) == 0)
- {
- step->__data = &to_object;
-
- step->__min_needed_from = MIN_NEEDED_TO;
- step->__max_needed_from = MAX_NEEDED_TO;
- step->__min_needed_to = MIN_NEEDED_FROM;
- step->__max_needed_to = MAX_NEEDED_FROM;
- }
- else
- return __GCONV_NOCONV;
-
-#ifdef SAVE_RESET_STATE
- step->__stateful = 1;
-#else
- step->__stateful = 0;
-#endif
-
- return __GCONV_OK;
-}
-#endif
-
-
-/* The default destructor function does nothing in the moment and so
- we don't define it at all. But we still provide the macro just in
- case we need it some day. */
-#if DEFINE_FINI
-#endif
-
-
-/* If no arguments have to passed to the loop function define the macro
- as empty. */
-#ifndef EXTRA_LOOP_ARGS
-# define EXTRA_LOOP_ARGS
-#endif
-
-
-/* This is the actual conversion function. */
-#ifndef FUNCTION_NAME
-# define FUNCTION_NAME gconv
-#endif
-
-/* The macros are used to access the function to convert single characters. */
-#define SINGLE(fct) SINGLE2 (fct)
-#define SINGLE2(fct) fct##_single
-
-
-extern int FUNCTION_NAME (struct __gconv_step *step,
- struct __gconv_step_data *data,
- const unsigned char **inptrp,
- const unsigned char *inend,
- unsigned char **outbufstart, size_t *irreversible,
- int do_flush, int consume_incomplete);
-int
-FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
- const unsigned char **inptrp, const unsigned char *inend,
- unsigned char **outbufstart, size_t *irreversible, int do_flush,
- int consume_incomplete)
-{
- struct __gconv_step *next_step = step + 1;
- struct __gconv_step_data *next_data = data + 1;
- __gconv_fct fct;
- int status;
-
- fct = (data->__flags & __GCONV_IS_LAST) ? NULL : next_step->__fct;
-
- /* If the function is called with no input this means we have to reset
- to the initial state. The possibly partly converted input is
- dropped. */
- if (__builtin_expect (do_flush, 0))
- {
- /* This should never happen during error handling. */
- assert (outbufstart == NULL);
-
- status = __GCONV_OK;
-
-#ifdef EMIT_SHIFT_TO_INIT
- if (do_flush == 1)
- {
- /* We preserve the initial values of the pointer variables. */
- unsigned char *outbuf = data->__outbuf;
- unsigned char *outstart = outbuf;
- unsigned char *outend = data->__outbufend;
-
-# ifdef PREPARE_LOOP
- PREPARE_LOOP
-# endif
-
-# ifdef SAVE_RESET_STATE
- SAVE_RESET_STATE (1);
-# endif
-
- /* Emit the escape sequence to reset the state. */
- EMIT_SHIFT_TO_INIT;
-
- /* Call the steps down the chain if there are any but only if we
- successfully emitted the escape sequence. This should only
- fail if the output buffer is full. If the input is invalid
- it should be discarded since the user wants to start from a
- clean state. */
- if (status == __GCONV_OK)
- {
- if (data->__flags & __GCONV_IS_LAST)
- /* Store information about how many bytes are available. */
- data->__outbuf = outbuf;
- else
- {
- /* Write out all output which was produced. */
- if (outbuf > outstart)
- {
- const unsigned char *outerr = outstart;
- int result;
-
- result = DL_CALL_FCT (fct, (next_step, next_data,
- &outerr, outbuf, NULL,
- irreversible, 0,
- consume_incomplete));
-
- if (result != __GCONV_EMPTY_INPUT)
- {
- if (__builtin_expect (outerr != outbuf, 0))
- {
- /* We have a problem. Undo the conversion. */
- outbuf = outstart;
-
- /* Restore the state. */
-# ifdef SAVE_RESET_STATE
- SAVE_RESET_STATE (0);
-# endif
- }
-
- /* Change the status. */
- status = result;
- }
- }
-
- if (status == __GCONV_OK)
- /* Now flush the remaining steps. */
- status = DL_CALL_FCT (fct, (next_step, next_data, NULL,
- NULL, NULL, irreversible, 1,
- consume_incomplete));
- }
- }
- }
- else
-#endif
- {
- /* Clear the state object. There might be bytes in there from
- previous calls with CONSUME_INCOMPLETE == 1. But don't emit
- escape sequences. */
- memset (data->__statep, '\0', sizeof (*data->__statep));
-
- if (! (data->__flags & __GCONV_IS_LAST))
- /* Now flush the remaining steps. */
- status = DL_CALL_FCT (fct, (next_step, next_data, NULL, NULL,
- NULL, irreversible, do_flush,
- consume_incomplete));
- }
- }
- else
- {
- /* We preserve the initial values of the pointer variables. */
- const unsigned char *inptr = *inptrp;
- unsigned char *outbuf = (__builtin_expect (outbufstart == NULL, 1)
- ? data->__outbuf : *outbufstart);
- unsigned char *outend = data->__outbufend;
- unsigned char *outstart;
- /* This variable is used to count the number of characters we
- actually converted. */
- size_t lirreversible = 0;
- size_t *lirreversiblep = irreversible ? &lirreversible : NULL;
-#if defined _STRING_ARCH_unaligned \
- || MIN_NEEDED_FROM == 1 || MAX_NEEDED_FROM % MIN_NEEDED_FROM != 0 \
- || MIN_NEEDED_TO == 1 || MAX_NEEDED_TO % MIN_NEEDED_TO != 0
-# define unaligned 0
-#else
- int unaligned;
-# define GEN_unaligned(name) GEN_unaligned2 (name)
-# define GEN_unaligned2(name) name##_unaligned
-#endif
-
-#ifdef PREPARE_LOOP
- PREPARE_LOOP
-#endif
-
-#if MAX_NEEDED_FROM > 1 || MAX_NEEDED_TO > 1
- /* If the function is used to implement the mb*towc*() or wc*tomb*()
- functions we must test whether any bytes from the last call are
- stored in the `state' object. */
- if (((MAX_NEEDED_FROM > 1 && MAX_NEEDED_TO > 1)
- || (MAX_NEEDED_FROM > 1 && FROM_DIRECTION)
- || (MAX_NEEDED_TO > 1 && !FROM_DIRECTION))
- && consume_incomplete && (data->__statep->__count & 7) != 0)
- {
- /* Yep, we have some bytes left over. Process them now.
- But this must not happen while we are called from an
- error handler. */
- assert (outbufstart == NULL);
-
-# if MAX_NEEDED_FROM > 1
- if (MAX_NEEDED_TO == 1 || FROM_DIRECTION)
- status = SINGLE(FROM_LOOP) (step, data, inptrp, inend, &outbuf,
- outend, lirreversiblep
- EXTRA_LOOP_ARGS);
-# endif
-# if MAX_NEEDED_FROM > 1 && MAX_NEEDED_TO > 1 && !ONE_DIRECTION
- else
-# endif
-# if MAX_NEEDED_TO > 1 && !ONE_DIRECTION
- status = SINGLE(TO_LOOP) (step, data, inptrp, inend, &outbuf,
- outend, lirreversiblep EXTRA_LOOP_ARGS);
-# endif
-
- if (__builtin_expect (status, __GCONV_OK) != __GCONV_OK)
- return status;
- }
-#endif
-
-#if !defined _STRING_ARCH_unaligned \
- && MIN_NEEDED_FROM != 1 && MAX_NEEDED_FROM % MIN_NEEDED_FROM == 0 \
- && MIN_NEEDED_TO != 1 && MAX_NEEDED_TO % MIN_NEEDED_TO == 0
- /* The following assumes that encodings, which have a variable length
- what might unalign a buffer even though it is a aligned in the
- beginning, either don't have the minimal number of bytes as a divisor
- of the maximum length or have a minimum length of 1. This is true
- for all known and supported encodings. */
- unaligned = ((FROM_DIRECTION
- && ((uintptr_t) inptr % MIN_NEEDED_FROM != 0
- || ((data->__flags & __GCONV_IS_LAST)
- && (uintptr_t) outbuf % MIN_NEEDED_TO != 0)))
- || (!FROM_DIRECTION
- && (((data->__flags & __GCONV_IS_LAST)
- && (uintptr_t) outbuf % MIN_NEEDED_FROM != 0)
- || (uintptr_t) inptr % MIN_NEEDED_TO != 0)));
-#endif
-
- while (1)
- {
- struct __gconv_trans_data *trans;
-
- /* Remember the start value for this round. */
- inptr = *inptrp;
- /* The outbuf buffer is empty. */
- outstart = outbuf;
-
-#ifdef SAVE_RESET_STATE
- SAVE_RESET_STATE (1);
-#endif
-
- if (__builtin_expect (!unaligned, 1))
- {
- if (FROM_DIRECTION)
- /* Run the conversion loop. */
- status = FROM_LOOP (step, data, inptrp, inend, &outbuf, outend,
- lirreversiblep EXTRA_LOOP_ARGS);
- else
- /* Run the conversion loop. */
- status = TO_LOOP (step, data, inptrp, inend, &outbuf, outend,
- lirreversiblep EXTRA_LOOP_ARGS);
- }
-#if !defined _STRING_ARCH_unaligned \
- && MIN_NEEDED_FROM != 1 && MAX_NEEDED_FROM % MIN_NEEDED_FROM == 0 \
- && MIN_NEEDED_TO != 1 && MAX_NEEDED_TO % MIN_NEEDED_TO == 0
- else
- {
- if (FROM_DIRECTION)
- /* Run the conversion loop. */
- status = GEN_unaligned (FROM_LOOP) (step, data, inptrp, inend,
- &outbuf, outend,
- lirreversiblep
- EXTRA_LOOP_ARGS);
- else
- /* Run the conversion loop. */
- status = GEN_unaligned (TO_LOOP) (step, data, inptrp, inend,
- &outbuf, outend,
- lirreversiblep
- EXTRA_LOOP_ARGS);
- }
-#endif
-
- /* If we were called as part of an error handling module we
- don't do anything else here. */
- if (__builtin_expect (outbufstart != NULL, 0))
- {
- *outbufstart = outbuf;
- return status;
- }
-
- /* Give the transliteration module the chance to store the
- original text and the result in case it needs a context. */
- for (trans = data->__trans; trans != NULL; trans = trans->__next)
- if (trans->__trans_context_fct != NULL)
- DL_CALL_FCT (trans->__trans_context_fct,
- (trans->__data, inptr, *inptrp, outstart, outbuf));
-
- /* We finished one use of the loops. */
- ++data->__invocation_counter;
-
- /* If this is the last step leave the loop, there is nothing
- we can do. */
- if (__builtin_expect (data->__flags & __GCONV_IS_LAST, 0))
- {
- /* Store information about how many bytes are available. */
- data->__outbuf = outbuf;
-
- /* Remember how many non-identical characters we
- converted in a irreversible way. */
- *irreversible += lirreversible;
-
- break;
- }
-
- /* Write out all output which was produced. */
- if (__builtin_expect (outbuf > outstart, 1))
- {
- const unsigned char *outerr = data->__outbuf;
- int result;
-
- result = DL_CALL_FCT (fct, (next_step, next_data, &outerr,
- outbuf, NULL, irreversible, 0,
- consume_incomplete));
-
- if (result != __GCONV_EMPTY_INPUT)
- {
- if (__builtin_expect (outerr != outbuf, 0))
- {
-#ifdef RESET_INPUT_BUFFER
- RESET_INPUT_BUFFER;
-#else
- /* We have a problem with the in on of the functions
- below. Undo the conversion upto the error point. */
- size_t nstatus;
-
- /* Reload the pointers. */
- *inptrp = inptr;
- outbuf = outstart;
-
- /* Restore the state. */
-# ifdef SAVE_RESET_STATE
- SAVE_RESET_STATE (0);
-# endif
-
- if (__builtin_expect (!unaligned, 1))
- {
- if (FROM_DIRECTION)
- /* Run the conversion loop. */
- nstatus = FROM_LOOP (step, data, inptrp, inend,
- &outbuf, outerr,
- lirreversiblep
- EXTRA_LOOP_ARGS);
- else
- /* Run the conversion loop. */
- nstatus = TO_LOOP (step, data, inptrp, inend,
- &outbuf, outerr,
- lirreversiblep
- EXTRA_LOOP_ARGS);
- }
-# if !defined _STRING_ARCH_unaligned \
- && MIN_NEEDED_FROM != 1 && MAX_NEEDED_FROM % MIN_NEEDED_FROM == 0 \
- && MIN_NEEDED_TO != 1 && MAX_NEEDED_TO % MIN_NEEDED_TO == 0
- else
- {
- if (FROM_DIRECTION)
- /* Run the conversion loop. */
- nstatus = GEN_unaligned (FROM_LOOP) (step, data,
- inptrp, inend,
- &outbuf,
- outerr,
- lirreversiblep
- EXTRA_LOOP_ARGS);
- else
- /* Run the conversion loop. */
- nstatus = GEN_unaligned (TO_LOOP) (step, data,
- inptrp, inend,
- &outbuf, outerr,
- lirreversiblep
- EXTRA_LOOP_ARGS);
- }
-# endif
-
- /* We must run out of output buffer space in this
- rerun. */
- assert (outbuf == outerr);
- assert (nstatus == __GCONV_FULL_OUTPUT);
-
- /* If we haven't consumed a single byte decrement
- the invocation counter. */
- if (__builtin_expect (outbuf == outstart, 0))
- --data->__invocation_counter;
-#endif /* reset input buffer */
- }
-
- /* Change the status. */
- status = result;
- }
- else
- /* All the output is consumed, we can make another run
- if everything was ok. */
- if (status == __GCONV_FULL_OUTPUT)
- {
- status = __GCONV_OK;
- outbuf = data->__outbuf;
- }
- }
-
- if (status != __GCONV_OK)
- break;
-
- /* Reset the output buffer pointer for the next round. */
- outbuf = data->__outbuf;
- }
-
-#ifdef END_LOOP
- END_LOOP
-#endif
-
- /* If we are supposed to consume all character store now all of the
- remaining characters in the `state' object. */
-#if MAX_NEEDED_FROM > 1 || MAX_NEEDED_TO > 1
- if (((MAX_NEEDED_FROM > 1 && MAX_NEEDED_TO > 1)
- || (MAX_NEEDED_FROM > 1 && FROM_DIRECTION)
- || (MAX_NEEDED_TO > 1 && !FROM_DIRECTION))
- && __builtin_expect (consume_incomplete, 0)
- && status == __GCONV_INCOMPLETE_INPUT)
- {
-# ifdef STORE_REST
- mbstate_t *state = data->__statep;
-
- STORE_REST
-# else
- size_t cnt;
-
- /* Make sure the remaining bytes fit into the state objects
- buffer. */
- assert (inend - *inptrp < 4);
-
- for (cnt = 0; *inptrp < inend; ++cnt)
- data->__statep->__value.__wchb[cnt] = *(*inptrp)++;
- data->__statep->__count &= ~7;
- data->__statep->__count |= cnt;
-# endif
- }
-#endif
- }
-
- return status;
-}
-
-#undef DEFINE_INIT
-#undef CHARSET_NAME
-#undef DEFINE_FINI
-#undef MIN_NEEDED_FROM
-#undef MIN_NEEDED_TO
-#undef MAX_NEEDED_FROM
-#undef MAX_NEEDED_TO
-#undef DEFINE_DIRECTION_OBJECTS
-#undef FROM_DIRECTION
-#undef EMIT_SHIFT_TO_INIT
-#undef FROM_LOOP
-#undef TO_LOOP
-#undef SAVE_RESET_STATE
-#undef RESET_INPUT_BUFFER
-#undef FUNCTION_NAME
-#undef PREPARE_LOOP
-#undef END_LOOP
-#undef ONE_DIRECTION
-#undef STORE_REST
diff --git a/newlib/libc/sys/linux/iconv/strtab.c b/newlib/libc/sys/linux/iconv/strtab.c
deleted file mode 100644
index 0f5e2b632..000000000
--- a/newlib/libc/sys/linux/iconv/strtab.c
+++ /dev/null
@@ -1,341 +0,0 @@
-/* C string table handling.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- Written by Ulrich Drepper <drepper@redhat.com>, 2000.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <assert.h>
-#include <inttypes.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/cdefs.h>
-#include <sys/param.h>
-
-
-struct Strent
-{
- const char *string;
- size_t len;
- struct Strent *next;
- struct Strent *left;
- struct Strent *right;
- size_t offset;
- char reverse[0];
-};
-
-
-struct memoryblock
-{
- struct memoryblock *next;
- char memory[0];
-};
-
-
-struct Strtab
-{
- struct Strent *root;
- struct memoryblock *memory;
- char *backp;
- size_t left;
- size_t total;
-
- struct Strent null;
-};
-
-
-/* Cache for the pagesize. We correct this value a bit so that `malloc'
- is not allocating more than a page. */
-static size_t ps;
-
-
-extern void *xmalloc (size_t n) __attribute_malloc__;
-
-/* Prototypes for our functions that are used from iconvconfig.c. If
- you change these, change also iconvconfig.c. */
-/* Create new C string table object in memory. */
-extern struct Strtab *strtabinit (void);
-
-/* Free resources allocated for C string table ST. */
-extern void strtabfree (struct Strtab *st);
-
-/* Add string STR (length LEN is != 0) to C string table ST. */
-extern struct Strent *strtabadd (struct Strtab *st, const char *str,
- size_t len);
-
-/* Finalize string table ST and store size in *SIZE and return a pointer. */
-extern void *strtabfinalize (struct Strtab *st, size_t *size);
-
-/* Get offset in string table for string associated with SE. */
-extern size_t strtaboffset (struct Strent *se);
-
-
-struct Strtab *
-strtabinit (void)
-{
- struct Strtab *ret;
-
- if (ps == 0)
- {
- ps = sysconf (_SC_PAGESIZE) - 2 * sizeof (void *);
- assert (sizeof (struct memoryblock) < ps);
- }
-
- ret = (struct Strtab *) calloc (1, sizeof (struct Strtab));
- if (ret != NULL)
- {
- ret->null.len = 1;
- ret->null.string = "";
- }
- return ret;
-}
-
-
-static void
-morememory (struct Strtab *st, size_t len)
-{
- struct memoryblock *newmem;
-
- if (len < ps)
- len = ps;
- newmem = (struct memoryblock *) malloc (len);
- if (newmem == NULL)
- abort ();
-
- newmem->next = st->memory;
- st->memory = newmem;
- st->backp = newmem->memory;
- st->left = len - offsetof (struct memoryblock, memory);
-}
-
-
-void
-strtabfree (struct Strtab *st)
-{
- struct memoryblock *mb = st->memory;
-
- while (mb != NULL)
- {
- void *old = mb;
- mb = mb->next;
- free (old);
- }
-
- free (st);
-}
-
-
-static struct Strent *
-newstring (struct Strtab *st, const char *str, size_t len)
-{
- struct Strent *newstr;
- size_t align;
- int i;
-
- /* Compute the amount of padding needed to make the structure aligned. */
- align = ((__alignof__ (struct Strent)
- - (((uintptr_t) st->backp)
- & (__alignof__ (struct Strent) - 1)))
- & (__alignof__ (struct Strent) - 1));
-
- /* Make sure there is enough room in the memory block. */
- if (st->left < align + sizeof (struct Strent) + len)
- {
- morememory (st, sizeof (struct Strent) + len);
- align = 0;
- }
-
- /* Create the reserved string. */
- newstr = (struct Strent *) (st->backp + align);
- newstr->string = str;
- newstr->len = len;
- newstr->next = NULL;
- newstr->left = NULL;
- newstr->right = NULL;
- newstr->offset = 0;
- for (i = len - 2; i >= 0; --i)
- newstr->reverse[i] = str[len - 2 - i];
- newstr->reverse[len - 1] = '\0';
- st->backp += align + sizeof (struct Strent) + len;
- st->left -= align + sizeof (struct Strent) + len;
-
- return newstr;
-}
-
-
-/* XXX This function should definitely be rewritten to use a balancing
- tree algorith (AVL, red-black trees). For now a simple, correct
- implementation is enough. */
-static struct Strent **
-searchstring (struct Strent **sep, struct Strent *newstr)
-{
- int cmpres;
-
- /* More strings? */
- if (*sep == NULL)
- {
- *sep = newstr;
- return sep;
- }
-
- /* Compare the strings. */
- cmpres = memcmp ((*sep)->reverse, newstr->reverse,
- MIN ((*sep)->len, newstr->len) - 1);
- if (cmpres == 0)
- /* We found a matching string. */
- return sep;
- else if (cmpres > 0)
- return searchstring (&(*sep)->left, newstr);
- else
- return searchstring (&(*sep)->right, newstr);
-}
-
-
-/* Add new string. The actual string is assumed to be permanent. */
-struct Strent *
-strtabadd (struct Strtab *st, const char *str, size_t len)
-{
- struct Strent *newstr;
- struct Strent **sep;
-
- /* Compute the string length if the caller doesn't know it. */
- if (len == 0)
- len = strlen (str) + 1;
-
- /* Make sure all "" strings get offset 0. */
- if (len == 1)
- return &st->null;
-
- /* Allocate memory for the new string and its associated information. */
- newstr = newstring (st, str, len);
-
- /* Search in the array for the place to insert the string. If there
- is no string with matching prefix and no string with matching
- leading substring, create a new entry. */
- sep = searchstring (&st->root, newstr);
- if (*sep != newstr)
- {
- /* This is not the same entry. This means we have a prefix match. */
- if ((*sep)->len > newstr->len)
- {
- struct Strent *subs;
-
- for (subs = (*sep)->next; subs; subs = subs->next)
- if (subs->len == newstr->len)
- {
- /* We have an exact match with a substring. Free the memory
- we allocated. */
- st->left += st->backp - (char *) newstr;
- st->backp = (char *) newstr;
-
- return subs;
- }
-
- /* We have a new substring. This means we don't need the reverse
- string of this entry anymore. */
- st->backp -= newstr->len;
- st->left += newstr->len;
-
- newstr->next = (*sep)->next;
- (*sep)->next = newstr;
- }
- else if ((*sep)->len != newstr->len)
- {
- /* When we get here it means that the string we are about to
- add has a common prefix with a string we already have but
- it is longer. In this case we have to put it first. */
- st->total += newstr->len - (*sep)->len;
- newstr->next = *sep;
- newstr->left = (*sep)->left;
- newstr->right = (*sep)->right;
- *sep = newstr;
- }
- else
- {
- /* We have an exact match. Free the memory we allocated. */
- st->left += st->backp - (char *) newstr;
- st->backp = (char *) newstr;
-
- newstr = *sep;
- }
- }
- else
- st->total += newstr->len;
-
- return newstr;
-}
-
-
-static void
-copystrings (struct Strent *nodep, char **freep, size_t *offsetp)
-{
- struct Strent *subs;
-
- if (nodep->left != NULL)
- copystrings (nodep->left, freep, offsetp);
-
- /* Process the current node. */
- nodep->offset = *offsetp;
- *freep = (char *) memcpy (*freep, nodep->string, nodep->len);
- *freep += nodep->len;
- *offsetp += nodep->len;
-
- for (subs = nodep->next; subs != NULL; subs = subs->next)
- {
- assert (subs->len < nodep->len);
- subs->offset = nodep->offset + nodep->len - subs->len;
- }
-
- if (nodep->right != NULL)
- copystrings (nodep->right, freep, offsetp);
-}
-
-
-void *
-strtabfinalize (struct Strtab *st, size_t *size)
-{
- size_t copylen;
- char *endp;
- char *retval;
-
- /* Fill in the information. */
- endp = retval = (char *) xmalloc (st->total + 1);
-
- /* Always put an empty string at the beginning so that a zero offset
- can mean error. */
- *endp++ = '\0';
-
- /* Now run through the tree and add all the string while also updating
- the offset members of the elfstrent records. */
- copylen = 1;
- copystrings (st->root, &endp, &copylen);
- assert (copylen == st->total + 1);
- assert (endp = retval + st->total + 1);
- *size = copylen;
-
- return retval;
-}
-
-
-size_t
-strtaboffset (struct Strent *se)
-{
- return se->offset;
-}
diff --git a/newlib/libc/sys/linux/ids.c b/newlib/libc/sys/linux/ids.c
deleted file mode 100644
index f3a95b123..000000000
--- a/newlib/libc/sys/linux/ids.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* libc/sys/linux/ids.c - System calls related to user and group ids */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#include <sys/types.h>
-#include <sys/unistd.h>
-#include <machine/syscall.h>
-
-
-_syscall1(int,setfsuid,uid_t,uid)
-_syscall0(uid_t,getuid)
-_syscall1(int,setfsgid,gid_t,gid)
-_syscall0(gid_t,getgid)
-_syscall0(uid_t,geteuid)
-_syscall0(gid_t,getegid)
-_syscall3(int,setresuid,uid_t,ruid,uid_t,euid,uid_t,suid)
-_syscall3(int,syslog,int,type,char *,bufp,int,len)
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL > 3
-_syscall2(int,getgroups,int,size,gid_t *,list)
-_syscall1(int,setgid,gid_t,gid)
-_syscall1(int,setuid,uid_t,uid)
-#endif
-
-weak_alias(__libc_getuid,__getuid);
diff --git a/newlib/libc/sys/linux/include/argp.h b/newlib/libc/sys/linux/include/argp.h
deleted file mode 100644
index e58258a3c..000000000
--- a/newlib/libc/sys/linux/include/argp.h
+++ /dev/null
@@ -1,570 +0,0 @@
-/* Hierarchial argument parsing, layered over getopt.
- Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Miles Bader <miles@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _ARGP_H
-#define _ARGP_H
-
-#include <stdio.h>
-#include <ctype.h>
-#include <getopt.h>
-
-#define __need_error_t
-#include <errno.h>
-
-char *program_invocation_name;
-char *program_invocation_short_name;
-
-#ifndef __const
-# define __const const
-#endif
-
-#ifndef __error_t_defined
-typedef int error_t;
-# define __error_t_defined
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* A description of a particular option. A pointer to an array of
- these is passed in the OPTIONS field of an argp structure. Each option
- entry can correspond to one long option and/or one short option; more
- names for the same option can be added by following an entry in an option
- array with options having the OPTION_ALIAS flag set. */
-struct argp_option
-{
- /* The long option name. For more than one name for the same option, you
- can use following options with the OPTION_ALIAS flag set. */
- __const char *name;
-
- /* What key is returned for this option. If > 0 and printable, then it's
- also accepted as a short option. */
- int key;
-
- /* If non-NULL, this is the name of the argument associated with this
- option, which is required unless the OPTION_ARG_OPTIONAL flag is set. */
- __const char *arg;
-
- /* OPTION_ flags. */
- int flags;
-
- /* The doc string for this option. If both NAME and KEY are 0, This string
- will be printed outdented from the normal option column, making it
- useful as a group header (it will be the first thing printed in its
- group); in this usage, it's conventional to end the string with a `:'. */
- __const char *doc;
-
- /* The group this option is in. In a long help message, options are sorted
- alphabetically within each group, and the groups presented in the order
- 0, 1, 2, ..., n, -m, ..., -2, -1. Every entry in an options array with
- if this field 0 will inherit the group number of the previous entry, or
- zero if it's the first one, unless its a group header (NAME and KEY both
- 0), in which case, the previous entry + 1 is the default. Automagic
- options such as --help are put into group -1. */
- int group;
-};
-
-/* The argument associated with this option is optional. */
-#define OPTION_ARG_OPTIONAL 0x1
-
-/* This option isn't displayed in any help messages. */
-#define OPTION_HIDDEN 0x2
-
-/* This option is an alias for the closest previous non-alias option. This
- means that it will be displayed in the same help entry, and will inherit
- fields other than NAME and KEY from the aliased option. */
-#define OPTION_ALIAS 0x4
-
-/* This option isn't actually an option (and so should be ignored by the
- actual option parser), but rather an arbitrary piece of documentation that
- should be displayed in much the same manner as the options. If this flag
- is set, then the option NAME field is displayed unmodified (e.g., no `--'
- prefix is added) at the left-margin (where a *short* option would normally
- be displayed), and the documentation string in the normal place. For
- purposes of sorting, any leading whitespace and puncuation is ignored,
- except that if the first non-whitespace character is not `-', this entry
- is displayed after all options (and OPTION_DOC entries with a leading `-')
- in the same group. */
-#define OPTION_DOC 0x8
-
-/* This option shouldn't be included in `long' usage messages (but is still
- included in help messages). This is mainly intended for options that are
- completely documented in an argp's ARGS_DOC field, in which case including
- the option in the generic usage list would be redundant. For instance,
- if ARGS_DOC is "FOO BAR\n-x BLAH", and the `-x' option's purpose is to
- distinguish these two cases, -x should probably be marked
- OPTION_NO_USAGE. */
-#define OPTION_NO_USAGE 0x10
-
-struct argp; /* fwd declare this type */
-struct argp_state; /* " */
-struct argp_child; /* " */
-
-/* The type of a pointer to an argp parsing function. */
-typedef error_t (*argp_parser_t) (int key, char *arg,
- struct argp_state *state);
-
-/* What to return for unrecognized keys. For special ARGP_KEY_ keys, such
- returns will simply be ignored. For user keys, this error will be turned
- into EINVAL (if the call to argp_parse is such that errors are propagated
- back to the user instead of exiting); returning EINVAL itself would result
- in an immediate stop to parsing in *all* cases. */
-#define ARGP_ERR_UNKNOWN E2BIG /* Hurd should never need E2BIG. XXX */
-
-/* Special values for the KEY argument to an argument parsing function.
- ARGP_ERR_UNKNOWN should be returned if they aren't understood.
-
- The sequence of keys to a parsing function is either (where each
- uppercased word should be prefixed by `ARGP_KEY_' and opt is a user key):
-
- INIT opt... NO_ARGS END SUCCESS -- No non-option arguments at all
- or INIT (opt | ARG)... END SUCCESS -- All non-option args parsed
- or INIT (opt | ARG)... SUCCESS -- Some non-option arg unrecognized
-
- The third case is where every parser returned ARGP_KEY_UNKNOWN for an
- argument, in which case parsing stops at that argument (returning the
- unparsed arguments to the caller of argp_parse if requested, or stopping
- with an error message if not).
-
- If an error occurs (either detected by argp, or because the parsing
- function returned an error value), then the parser is called with
- ARGP_KEY_ERROR, and no further calls are made. */
-
-/* This is not an option at all, but rather a command line argument. If a
- parser receiving this key returns success, the fact is recorded, and the
- ARGP_KEY_NO_ARGS case won't be used. HOWEVER, if while processing the
- argument, a parser function decrements the NEXT field of the state it's
- passed, the option won't be considered processed; this is to allow you to
- actually modify the argument (perhaps into an option), and have it
- processed again. */
-#define ARGP_KEY_ARG 0
-/* There are remaining arguments not parsed by any parser, which may be found
- starting at (STATE->argv + STATE->next). If success is returned, but
- STATE->next left untouched, it's assumed that all arguments were consume,
- otherwise, the parser should adjust STATE->next to reflect any arguments
- consumed. */
-#define ARGP_KEY_ARGS 0x1000006
-/* There are no more command line arguments at all. */
-#define ARGP_KEY_END 0x1000001
-/* Because it's common to want to do some special processing if there aren't
- any non-option args, user parsers are called with this key if they didn't
- successfully process any non-option arguments. Called just before
- ARGP_KEY_END (where more general validity checks on previously parsed
- arguments can take place). */
-#define ARGP_KEY_NO_ARGS 0x1000002
-/* Passed in before any parsing is done. Afterwards, the values of each
- element of the CHILD_INPUT field, if any, in the state structure is
- copied to each child's state to be the initial value of the INPUT field. */
-#define ARGP_KEY_INIT 0x1000003
-/* Use after all other keys, including SUCCESS & END. */
-#define ARGP_KEY_FINI 0x1000007
-/* Passed in when parsing has successfully been completed (even if there are
- still arguments remaining). */
-#define ARGP_KEY_SUCCESS 0x1000004
-/* Passed in if an error occurs. */
-#define ARGP_KEY_ERROR 0x1000005
-
-/* An argp structure contains a set of options declarations, a function to
- deal with parsing one, documentation string, a possible vector of child
- argp's, and perhaps a function to filter help output. When actually
- parsing options, getopt is called with the union of all the argp
- structures chained together through their CHILD pointers, with conflicts
- being resolved in favor of the first occurrence in the chain. */
-struct argp
-{
- /* An array of argp_option structures, terminated by an entry with both
- NAME and KEY having a value of 0. */
- __const struct argp_option *options;
-
- /* What to do with an option from this structure. KEY is the key
- associated with the option, and ARG is any associated argument (NULL if
- none was supplied). If KEY isn't understood, ARGP_ERR_UNKNOWN should be
- returned. If a non-zero, non-ARGP_ERR_UNKNOWN value is returned, then
- parsing is stopped immediately, and that value is returned from
- argp_parse(). For special (non-user-supplied) values of KEY, see the
- ARGP_KEY_ definitions below. */
- argp_parser_t parser;
-
- /* A string describing what other arguments are wanted by this program. It
- is only used by argp_usage to print the `Usage:' message. If it
- contains newlines, the strings separated by them are considered
- alternative usage patterns, and printed on separate lines (lines after
- the first are prefix by ` or: ' instead of `Usage:'). */
- __const char *args_doc;
-
- /* If non-NULL, a string containing extra text to be printed before and
- after the options in a long help message (separated by a vertical tab
- `\v' character). */
- __const char *doc;
-
- /* A vector of argp_children structures, terminated by a member with a 0
- argp field, pointing to child argps should be parsed with this one. Any
- conflicts are resolved in favor of this argp, or early argps in the
- CHILDREN list. This field is useful if you use libraries that supply
- their own argp structure, which you want to use in conjunction with your
- own. */
- __const struct argp_child *children;
-
- /* If non-zero, this should be a function to filter the output of help
- messages. KEY is either a key from an option, in which case TEXT is
- that option's help text, or a special key from the ARGP_KEY_HELP_
- defines, below, describing which other help text TEXT is. The function
- should return either TEXT, if it should be used as-is, a replacement
- string, which should be malloced, and will be freed by argp, or NULL,
- meaning `print nothing'. The value for TEXT is *after* any translation
- has been done, so if any of the replacement text also needs translation,
- that should be done by the filter function. INPUT is either the input
- supplied to argp_parse, or NULL, if argp_help was called directly. */
- char *(*help_filter) (int __key, __const char *__text, void *__input);
-
- /* If non-zero the strings used in the argp library are translated using
- the domain described by this string. Otherwise the currently installed
- default domain is used. */
- const char *argp_domain;
-};
-
-/* Possible KEY arguments to a help filter function. */
-#define ARGP_KEY_HELP_PRE_DOC 0x2000001 /* Help text preceeding options. */
-#define ARGP_KEY_HELP_POST_DOC 0x2000002 /* Help text following options. */
-#define ARGP_KEY_HELP_HEADER 0x2000003 /* Option header string. */
-#define ARGP_KEY_HELP_EXTRA 0x2000004 /* After all other documentation;
- TEXT is NULL for this key. */
-/* Explanatory note emitted when duplicate option arguments have been
- suppressed. */
-#define ARGP_KEY_HELP_DUP_ARGS_NOTE 0x2000005
-#define ARGP_KEY_HELP_ARGS_DOC 0x2000006 /* Argument doc string. */
-
-/* When an argp has a non-zero CHILDREN field, it should point to a vector of
- argp_child structures, each of which describes a subsidiary argp. */
-struct argp_child
-{
- /* The child parser. */
- __const struct argp *argp;
-
- /* Flags for this child. */
- int flags;
-
- /* If non-zero, an optional header to be printed in help output before the
- child options. As a side-effect, a non-zero value forces the child
- options to be grouped together; to achieve this effect without actually
- printing a header string, use a value of "". */
- __const char *header;
-
- /* Where to group the child options relative to the other (`consolidated')
- options in the parent argp; the values are the same as the GROUP field
- in argp_option structs, but all child-groupings follow parent options at
- a particular group level. If both this field and HEADER are zero, then
- they aren't grouped at all, but rather merged with the parent options
- (merging the child's grouping levels with the parents). */
- int group;
-};
-
-/* Parsing state. This is provided to parsing functions called by argp,
- which may examine and, as noted, modify fields. */
-struct argp_state
-{
- /* The top level ARGP being parsed. */
- __const struct argp *root_argp;
-
- /* The argument vector being parsed. May be modified. */
- int argc;
- char **argv;
-
- /* The index in ARGV of the next arg that to be parsed. May be modified. */
- int next;
-
- /* The flags supplied to argp_parse. May be modified. */
- unsigned flags;
-
- /* While calling a parsing function with a key of ARGP_KEY_ARG, this is the
- number of the current arg, starting at zero, and incremented after each
- such call returns. At all other times, this is the number of such
- arguments that have been processed. */
- unsigned arg_num;
-
- /* If non-zero, the index in ARGV of the first argument following a special
- `--' argument (which prevents anything following being interpreted as an
- option). Only set once argument parsing has proceeded past this point. */
- int quoted;
-
- /* An arbitrary pointer passed in from the user. */
- void *input;
- /* Values to pass to child parsers. This vector will be the same length as
- the number of children for the current parser. */
- void **child_inputs;
-
- /* For the parser's use. Initialized to 0. */
- void *hook;
-
- /* The name used when printing messages. This is initialized to ARGV[0],
- or PROGRAM_INVOCATION_NAME if that is unavailable. */
- char *name;
-
- /* Streams used when argp prints something. */
- FILE *err_stream; /* For errors; initialized to stderr. */
- FILE *out_stream; /* For information; initialized to stdout. */
-
- void *pstate; /* Private, for use by argp. */
-};
-
-/* Flags for argp_parse (note that the defaults are those that are
- convenient for program command line parsing): */
-
-/* Don't ignore the first element of ARGV. Normally (and always unless
- ARGP_NO_ERRS is set) the first element of the argument vector is
- skipped for option parsing purposes, as it corresponds to the program name
- in a command line. */
-#define ARGP_PARSE_ARGV0 0x01
-
-/* Don't print error messages for unknown options to stderr; unless this flag
- is set, ARGP_PARSE_ARGV0 is ignored, as ARGV[0] is used as the program
- name in the error messages. This flag implies ARGP_NO_EXIT (on the
- assumption that silent exiting upon errors is bad behaviour). */
-#define ARGP_NO_ERRS 0x02
-
-/* Don't parse any non-option args. Normally non-option args are parsed by
- calling the parse functions with a key of ARGP_KEY_ARG, and the actual arg
- as the value. Since it's impossible to know which parse function wants to
- handle it, each one is called in turn, until one returns 0 or an error
- other than ARGP_ERR_UNKNOWN; if an argument is handled by no one, the
- argp_parse returns prematurely (but with a return value of 0). If all
- args have been parsed without error, all parsing functions are called one
- last time with a key of ARGP_KEY_END. This flag needn't normally be set,
- as the normal behavior is to stop parsing as soon as some argument can't
- be handled. */
-#define ARGP_NO_ARGS 0x04
-
-/* Parse options and arguments in the same order they occur on the command
- line -- normally they're rearranged so that all options come first. */
-#define ARGP_IN_ORDER 0x08
-
-/* Don't provide the standard long option --help, which causes usage and
- option help information to be output to stdout, and exit (0) called. */
-#define ARGP_NO_HELP 0x10
-
-/* Don't exit on errors (they may still result in error messages). */
-#define ARGP_NO_EXIT 0x20
-
-/* Use the gnu getopt `long-only' rules for parsing arguments. */
-#define ARGP_LONG_ONLY 0x40
-
-/* Turns off any message-printing/exiting options. */
-#define ARGP_SILENT (ARGP_NO_EXIT | ARGP_NO_ERRS | ARGP_NO_HELP)
-
-/* Parse the options strings in ARGC & ARGV according to the options in ARGP.
- FLAGS is one of the ARGP_ flags above. If ARG_INDEX is non-NULL, the
- index in ARGV of the first unparsed option is returned in it. If an
- unknown option is present, ARGP_ERR_UNKNOWN is returned; if some parser
- routine returned a non-zero value, it is returned; otherwise 0 is
- returned. This function may also call exit unless the ARGP_NO_HELP flag
- is set. INPUT is a pointer to a value to be passed in to the parser. */
-extern error_t argp_parse (__const struct argp *__restrict __argp,
- int __argc, char **__restrict __argv,
- unsigned __flags, int *__restrict __arg_index,
- void *__restrict __input) __THROW;
-extern error_t __argp_parse (__const struct argp *__restrict __argp,
- int __argc, char **__restrict __argv,
- unsigned __flags, int *__restrict __arg_index,
- void *__restrict __input) __THROW;
-
-/* Global variables. */
-
-/* If defined or set by the user program to a non-zero value, then a default
- option --version is added (unless the ARGP_NO_HELP flag is used), which
- will print this string followed by a newline and exit (unless the
- ARGP_NO_EXIT flag is used). Overridden by ARGP_PROGRAM_VERSION_HOOK. */
-extern __const char *argp_program_version;
-
-/* If defined or set by the user program to a non-zero value, then a default
- option --version is added (unless the ARGP_NO_HELP flag is used), which
- calls this function with a stream to print the version to and a pointer to
- the current parsing state, and then exits (unless the ARGP_NO_EXIT flag is
- used). This variable takes precedent over ARGP_PROGRAM_VERSION. */
-extern void (*argp_program_version_hook) (FILE *__restrict __stream,
- struct argp_state *__restrict
- __state);
-
-/* If defined or set by the user program, it should point to string that is
- the bug-reporting address for the program. It will be printed by
- argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various
- standard help messages), embedded in a sentence that says something like
- `Report bugs to ADDR.'. */
-extern __const char *argp_program_bug_address;
-
-/* The exit status that argp will use when exiting due to a parsing error.
- If not defined or set by the user program, this defaults to EX_USAGE from
- <sysexits.h>. */
-extern error_t argp_err_exit_status;
-
-/* Flags for argp_help. */
-#define ARGP_HELP_USAGE 0x01 /* a Usage: message. */
-#define ARGP_HELP_SHORT_USAGE 0x02 /* " but don't actually print options. */
-#define ARGP_HELP_SEE 0x04 /* a `Try ... for more help' message. */
-#define ARGP_HELP_LONG 0x08 /* a long help message. */
-#define ARGP_HELP_PRE_DOC 0x10 /* doc string preceding long help. */
-#define ARGP_HELP_POST_DOC 0x20 /* doc string following long help. */
-#define ARGP_HELP_DOC (ARGP_HELP_PRE_DOC | ARGP_HELP_POST_DOC)
-#define ARGP_HELP_BUG_ADDR 0x40 /* bug report address */
-#define ARGP_HELP_LONG_ONLY 0x80 /* modify output appropriately to
- reflect ARGP_LONG_ONLY mode. */
-
-/* These ARGP_HELP flags are only understood by argp_state_help. */
-#define ARGP_HELP_EXIT_ERR 0x100 /* Call exit(1) instead of returning. */
-#define ARGP_HELP_EXIT_OK 0x200 /* Call exit(0) instead of returning. */
-
-/* The standard thing to do after a program command line parsing error, if an
- error message has already been printed. */
-#define ARGP_HELP_STD_ERR \
- (ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
-/* The standard thing to do after a program command line parsing error, if no
- more specific error message has been printed. */
-#define ARGP_HELP_STD_USAGE \
- (ARGP_HELP_SHORT_USAGE | ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
-/* The standard thing to do in response to a --help option. */
-#define ARGP_HELP_STD_HELP \
- (ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_EXIT_OK \
- | ARGP_HELP_DOC | ARGP_HELP_BUG_ADDR)
-
-/* Output a usage message for ARGP to STREAM. FLAGS are from the set
- ARGP_HELP_*. */
-extern void argp_help (__const struct argp *__restrict __argp,
- FILE *__restrict __stream,
- unsigned __flags, char *__restrict __name) __THROW;
-extern void __argp_help (__const struct argp *__restrict __argp,
- FILE *__restrict __stream, unsigned __flags,
- char *__name) __THROW;
-
-/* The following routines are intended to be called from within an argp
- parsing routine (thus taking an argp_state structure as the first
- argument). They may or may not print an error message and exit, depending
- on the flags in STATE -- in any case, the caller should be prepared for
- them *not* to exit, and should return an appropiate error after calling
- them. [argp_usage & argp_error should probably be called argp_state_...,
- but they're used often enough that they should be short] */
-
-/* Output, if appropriate, a usage message for STATE to STREAM. FLAGS are
- from the set ARGP_HELP_*. */
-extern void argp_state_help (__const struct argp_state *__restrict __state,
- FILE *__restrict __stream,
- unsigned int __flags) __THROW;
-extern void __argp_state_help (__const struct argp_state *__restrict __state,
- FILE *__restrict __stream,
- unsigned int __flags) __THROW;
-
-/* Possibly output the standard usage message for ARGP to stderr and exit. */
-extern void argp_usage (__const struct argp_state *__state) __THROW;
-extern void __argp_usage (__const struct argp_state *__state) __THROW;
-
-/* If appropriate, print the printf string FMT and following args, preceded
- by the program name and `:', to stderr, and followed by a `Try ... --help'
- message, then exit (1). */
-extern void argp_error (__const struct argp_state *__restrict __state,
- __const char *__restrict __fmt, ...) __THROW
- __attribute__ ((__format__ (__printf__, 2, 3)));
-extern void __argp_error (__const struct argp_state *__restrict __state,
- __const char *__restrict __fmt, ...) __THROW
- __attribute__ ((__format__ (__printf__, 2, 3)));
-
-/* Similar to the standard gnu error-reporting function error(), but will
- respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
- to STATE->err_stream. This is useful for argument parsing code that is
- shared between program startup (when exiting is desired) and runtime
- option parsing (when typically an error code is returned instead). The
- difference between this function and argp_error is that the latter is for
- *parsing errors*, and the former is for other problems that occur during
- parsing but don't reflect a (syntactic) problem with the input. */
-extern void argp_failure (__const struct argp_state *__restrict __state,
- int __status, int __errnum,
- __const char *__restrict __fmt, ...) __THROW
- __attribute__ ((__format__ (__printf__, 4, 5)));
-extern void __argp_failure (__const struct argp_state *__restrict __state,
- int __status, int __errnum,
- __const char *__restrict __fmt, ...) __THROW
- __attribute__ ((__format__ (__printf__, 4, 5)));
-
-/* Returns true if the option OPT is a valid short option. */
-extern int _option_is_short (__const struct argp_option *__opt) __THROW;
-extern int __option_is_short (__const struct argp_option *__opt) __THROW;
-
-/* Returns true if the option OPT is in fact the last (unused) entry in an
- options array. */
-extern int _option_is_end (__const struct argp_option *__opt) __THROW;
-extern int __option_is_end (__const struct argp_option *__opt) __THROW;
-
-/* Return the input field for ARGP in the parser corresponding to STATE; used
- by the help routines. */
-extern void *_argp_input (__const struct argp *__restrict __argp,
- __const struct argp_state *__restrict __state)
- __THROW;
-extern void *__argp_input (__const struct argp *__restrict __argp,
- __const struct argp_state *__restrict __state)
- __THROW;
-
-#ifdef __USE_EXTERN_INLINES
-
-# if !_LIBC
-# define __argp_usage argp_usage
-# define __argp_state_help argp_state_help
-# define __option_is_short _option_is_short
-# define __option_is_end _option_is_end
-# endif
-
-# ifndef ARGP_EI
-# define ARGP_EI extern __inline__
-# endif
-
-ARGP_EI void
-__argp_usage (__const struct argp_state *__state) __THROW
-{
- __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
-}
-
-ARGP_EI int
-__option_is_short (__const struct argp_option *__opt) __THROW
-{
- if (__opt->flags & OPTION_DOC)
- return 0;
- else
- {
- int __key = __opt->key;
- return __key > 0 && isprint (__key);
- }
-}
-
-ARGP_EI int
-__option_is_end (__const struct argp_option *__opt) __THROW
-{
- return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
-}
-
-# if !_LIBC
-# undef __argp_usage
-# undef __argp_state_help
-# undef __option_is_short
-# undef __option_is_end
-# endif
-#endif /* Use extern inlines. */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* argp.h */
diff --git a/newlib/libc/sys/linux/include/arpa/ftp.h b/newlib/libc/sys/linux/include/arpa/ftp.h
deleted file mode 100644
index 9a3648854..000000000
--- a/newlib/libc/sys/linux/include/arpa/ftp.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 1983, 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ftp.h 8.1 (Berkeley) 6/2/93
- */
-
-#ifndef _ARPA_FTP_H_
-#define _ARPA_FTP_H_
-
-/* Definitions for FTP; see RFC-765. */
-
-/*
- * Reply codes.
- */
-#define PRELIM 1 /* positive preliminary */
-#define COMPLETE 2 /* positive completion */
-#define CONTINUE 3 /* positive intermediate */
-#define TRANSIENT 4 /* transient negative completion */
-#define ERROR 5 /* permanent negative completion */
-
-/*
- * Type codes
- */
-#define TYPE_A 1 /* ASCII */
-#define TYPE_E 2 /* EBCDIC */
-#define TYPE_I 3 /* image */
-#define TYPE_L 4 /* local byte size */
-
-#ifdef FTP_NAMES
-char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" };
-#endif
-
-/*
- * Form codes
- */
-#define FORM_N 1 /* non-print */
-#define FORM_T 2 /* telnet format effectors */
-#define FORM_C 3 /* carriage control (ASA) */
-#ifdef FTP_NAMES
-char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" };
-#endif
-
-/*
- * Structure codes
- */
-#define STRU_F 1 /* file (no record structure) */
-#define STRU_R 2 /* record structure */
-#define STRU_P 3 /* page structure */
-#ifdef FTP_NAMES
-char *strunames[] = {"0", "File", "Record", "Page" };
-#endif
-
-/*
- * Mode types
- */
-#define MODE_S 1 /* stream */
-#define MODE_B 2 /* block */
-#define MODE_C 3 /* compressed */
-#ifdef FTP_NAMES
-char *modenames[] = {"0", "Stream", "Block", "Compressed" };
-#endif
-
-/*
- * Record Tokens
- */
-#define REC_ESC '\377' /* Record-mode Escape */
-#define REC_EOR '\001' /* Record-mode End-of-Record */
-#define REC_EOF '\002' /* Record-mode End-of-File */
-
-/*
- * Block Header
- */
-#define BLK_EOR 0x80 /* Block is End-of-Record */
-#define BLK_EOF 0x40 /* Block is End-of-File */
-#define BLK_ERRORS 0x20 /* Block is suspected of containing errors */
-#define BLK_RESTART 0x10 /* Block is Restart Marker */
-
-#define BLK_BYTECOUNT 2 /* Bytes in this block */
-
-#endif /* !_FTP_H_ */
diff --git a/newlib/libc/sys/linux/include/arpa/inet.h b/newlib/libc/sys/linux/include/arpa/inet.h
deleted file mode 100644
index 82bcf356d..000000000
--- a/newlib/libc/sys/linux/include/arpa/inet.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * @(#)inet.h 8.1 (Berkeley) 6/2/93
- * From: Id: inet.h,v 8.5 1997/01/29 08:48:09 vixie Exp $
- * $FreeBSD: src/include/arpa/inet.h,v 1.22 2002/04/10 10:51:53 mike Exp $
- */
-
-#ifndef _ARPA_INET_H_
-#define _ARPA_INET_H_
-
-/* External definitions for functions in inet(3), addr2ascii(3) */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/ansi.h>
-
-/* Required for byteorder(3) functions. */
-#include <machine/endian.h>
-
-#define INET_ADDRSTRLEN 16
-#define INET6_ADDRSTRLEN 46
-
-#ifndef _UINT16_T_DECLARED
-typedef __uint16_t uint16_t;
-#define _UINT16_T_DECLARED
-#endif
-
-#ifndef _UINT32_T_DECLARED
-typedef __uint32_t uint32_t;
-#define _UINT32_T_DECLARED
-#endif
-
-#ifndef _IN_ADDR_T_DECLARED
-typedef uint32_t in_addr_t;
-#define _IN_ADDR_T_DECLARED
-#endif
-
-#ifndef _IN_PORT_T_DECLARED
-typedef uint16_t in_port_t;
-#define _IN_PORT_T_DECLARED
-#endif
-
-#ifndef _POSIX_SOURCE
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
-#endif
-#endif /* !_POSIX_SOURCE */
-
-/*
- * XXX socklen_t is used by a POSIX.1-2001 interface, but not required by
- * POSIX.1-2001.
- */
-
-
-#ifndef __socklen_t_defined
-typedef unsigned int socklen_t;
-#define __socklen_t_defined 1
-#endif
-
-#ifdef _BSD_SOCKLEN_T_
-typedef _BSD_SOCKLEN_T_ socklen_t;
-#undef _BSD_SOCKLEN_T_
-#endif
-
-#ifndef _STRUCT_IN_ADDR_DECLARED
-struct in_addr {
- in_addr_t s_addr;
-};
-#define _STRUCT_IN_ADDR_DECLARED
-#endif
-
-#define inet_addr __inet_addr
-#define inet_aton __inet_aton
-#define inet_lnaof __inet_lnaof
-#define inet_makeaddr __inet_makeaddr
-#define inet_neta __inet_neta
-#define inet_netof __inet_netof
-#define inet_network __inet_network
-#define inet_net_ntop __inet_net_ntop
-#define inet_net_pton __inet_net_pton
-#define inet_ntoa __inet_ntoa
-#define inet_pton __inet_pton
-#define inet_ntop __inet_ntop
-#define inet_nsap_addr __inet_nsap_addr
-#define inet_nsap_ntoa __inet_nsap_ntoa
-
-__BEGIN_DECLS
-in_addr_t inet_addr(const char *);
-char *inet_ntoa(struct in_addr);
-const char *inet_ntop(int, const void *, char *, socklen_t);
-int inet_pton(int, const char *, void *);
-
-int ascii2addr(int, const char *, void *);
-char *addr2ascii(int, const void *, int, char *);
-int inet_aton(const char *, struct in_addr *);
-in_addr_t inet_lnaof(struct in_addr);
-struct in_addr inet_makeaddr(in_addr_t, in_addr_t);
-char * inet_neta(in_addr_t, char *, size_t);
-in_addr_t inet_netof(struct in_addr);
-in_addr_t inet_network(const char *);
-char *inet_net_ntop(int, const void *, int, char *, size_t);
-int inet_net_pton(int, const char *, void *, size_t);
-unsigned inet_nsap_addr(const char *, unsigned char *, int);
-char *inet_nsap_ntoa(int, const unsigned char *, char *);
-__END_DECLS
-
-#endif /* !_ARPA_INET_H_ */
diff --git a/newlib/libc/sys/linux/include/arpa/nameser.h b/newlib/libc/sys/linux/include/arpa/nameser.h
deleted file mode 100644
index 8735b8bd3..000000000
--- a/newlib/libc/sys/linux/include/arpa/nameser.h
+++ /dev/null
@@ -1,449 +0,0 @@
-/*
- * Copyright (c) 1983, 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * From: Id: nameser.h,v 8.16 1998/02/06 00:35:58 halley Exp
- * $FreeBSD: src/include/arpa/nameser.h,v 1.16 2002/03/23 17:24:55 imp Exp $
- */
-
-#ifndef _ARPA_NAMESER_H_
-#define _ARPA_NAMESER_H_
-
-#define BIND_4_COMPAT
-
-#include <sys/types.h>
-#include <sys/cdefs.h>
-
-/*
- * revision information. this is the release date in YYYYMMDD format.
- * it can change every day so the right thing to do with it is use it
- * in preprocessor commands such as "#if (__NAMESER > 19931104)". do not
- * compare for equality; rather, use it to determine whether your libnameser.a
- * is new enough to contain a certain feature.
- */
-
-/* XXXRTH I made this bigger than __BIND in 4.9.5 T6B */
-#define __NAMESER 19961001 /* New interface version stamp. */
-
-/*
- * Define constants based on RFC 883, RFC 1034, RFC 1035
- */
-#define NS_PACKETSZ 512 /* maximum packet size */
-#define NS_MAXDNAME 1025 /* maximum domain name */
-#define NS_MAXCDNAME 255 /* maximum compressed domain name */
-#define NS_MAXLABEL 63 /* maximum length of domain label */
-#define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */
-#define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */
-#define NS_RRFIXEDSZ 10 /* #/bytes of fixed data in r record */
-#define NS_INT32SZ 4 /* #/bytes of data in a u_int32_t */
-#define NS_INT16SZ 2 /* #/bytes of data in a u_int16_t */
-#define NS_INT8SZ 1 /* #/bytes of data in a u_int8_t */
-#define NS_INADDRSZ 4 /* IPv4 T_A */
-#define NS_IN6ADDRSZ 16 /* IPv6 T_AAAA */
-#define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */
-#define NS_DEFAULTPORT 53 /* For both TCP and UDP. */
-
-/*
- * These can be expanded with synonyms, just keep ns_parse.c:ns_parserecord()
- * in synch with it.
- */
-typedef enum __ns_sect {
- ns_s_qd = 0, /* Query: Question. */
- ns_s_zn = 0, /* Update: Zone. */
- ns_s_an = 1, /* Query: Answer. */
- ns_s_pr = 1, /* Update: Prerequisites. */
- ns_s_ns = 2, /* Query: Name servers. */
- ns_s_ud = 2, /* Update: Update. */
- ns_s_ar = 3, /* Query|Update: Additional records. */
- ns_s_max = 4
-} ns_sect;
-
-/*
- * This is a message handle. It is caller allocated and has no dynamic data.
- * This structure is intended to be opaque to all but ns_parse.c, thus the
- * leading _'s on the member names. Use the accessor functions, not the _'s.
- */
-typedef struct __ns_msg {
- const u_char *_msg, *_eom;
- u_int16_t _id, _flags, _counts[ns_s_max];
- const u_char *_sections[ns_s_max];
- ns_sect _sect;
- int _rrnum;
- const u_char *_ptr;
-} ns_msg;
-
-/* Private data structure - do not use from outside library. */
-struct _ns_flagdata { int mask, shift; };
-extern struct _ns_flagdata _ns_flagdata[];
-
-/* Accessor macros - this is part of the public interface. */
-#define ns_msg_getflag(handle, flag) ( \
- ((handle)._flags & _ns_flagdata[flag].mask) \
- >> _ns_flagdata[flag].shift \
- )
-#define ns_msg_id(handle) ((handle)._id + 0)
-#define ns_msg_base(handle) ((handle)._msg + 0)
-#define ns_msg_end(handle) ((handle)._eom + 0)
-#define ns_msg_size(handle) ((handle)._eom - (handle)._msg)
-#define ns_msg_count(handle, section) ((handle)._counts[section] + 0)
-
-/*
- * This is a parsed record. It is caller allocated and has no dynamic data.
- */
-typedef struct __ns_rr {
- char name[NS_MAXDNAME]; /* XXX need to malloc */
- u_int16_t type;
- u_int16_t rr_class;
- u_int32_t ttl;
- u_int16_t rdlength;
- const u_char *rdata;
-} ns_rr;
-
-/* Accessor macros - this is part of the public interface. */
-#define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".")
-#define ns_rr_type(rr) ((rr).type + 0)
-#define ns_rr_class(rr) ((rr).rr_class + 0)
-#define ns_rr_ttl(rr) ((rr).ttl + 0)
-#define ns_rr_rdlen(rr) ((rr).rdlength + 0)
-#define ns_rr_rdata(rr) ((rr).rdata + 0)
-
-/*
- * These don't have to be in the same order as in the packet flags word,
- * and they can even overlap in some cases, but they will need to be kept
- * in synch with ns_parse.c:ns_flagdata[].
- */
-typedef enum __ns_flag {
- ns_f_qr, /* Question/Response. */
- ns_f_opcode, /* Operation code. */
- ns_f_aa, /* Authoritative Answer. */
- ns_f_tc, /* Truncation occurred. */
- ns_f_rd, /* Recursion Desired. */
- ns_f_ra, /* Recursion Available. */
- ns_f_z, /* MBZ. */
- ns_f_ad, /* Authentic Data (DNSSEC). */
- ns_f_cd, /* Checking Disabled (DNSSEC). */
- ns_f_rcode, /* Response code. */
- ns_f_max
-} ns_flag;
-
-/*
- * Currently defined opcodes.
- */
-typedef enum __ns_opcode {
- ns_o_query = 0, /* Standard query. */
- ns_o_iquery = 1, /* Inverse query (deprecated/unsupported). */
- ns_o_status = 2, /* Name server status query (unsupported). */
- /* Opcode 3 is undefined/reserved. */
- ns_o_notify = 4, /* Zone change notification. */
- ns_o_update = 5, /* Zone update message. */
- ns_o_max = 6
-} ns_opcode;
-
-/*
- * Currently defined response codes.
- */
-typedef enum __ns_rcode {
- ns_r_noerror = 0, /* No error occurred. */
- ns_r_formerr = 1, /* Format error. */
- ns_r_servfail = 2, /* Server failure. */
- ns_r_nxdomain = 3, /* Name error. */
- ns_r_notimpl = 4, /* Unimplemented. */
- ns_r_refused = 5, /* Operation refused. */
- /* these are for BIND_UPDATE */
- ns_r_yxdomain = 6, /* Name exists */
- ns_r_yxrrset = 7, /* RRset exists */
- ns_r_nxrrset = 8, /* RRset does not exist */
- ns_r_notauth = 9, /* Not authoritative for zone */
- ns_r_notzone = 10, /* Zone of record different from zone section */
- ns_r_max = 11
-} ns_rcode;
-
-/* BIND_UPDATE */
-typedef enum __ns_update_operation {
- ns_uop_delete = 0,
- ns_uop_add = 1,
- ns_uop_max = 2
-} ns_update_operation;
-
-/*
- * This RR-like structure is particular to UPDATE.
- */
-struct ns_updrec {
- struct ns_updrec *r_prev; /* prev record */
- struct ns_updrec *r_next; /* next record */
- u_int8_t r_section; /* ZONE/PREREQUISITE/UPDATE */
- char * r_dname; /* owner of the RR */
- u_int16_t r_class; /* class number */
- u_int16_t r_type; /* type number */
- u_int32_t r_ttl; /* time to live */
- u_char * r_data; /* rdata fields as text string */
- u_int16_t r_size; /* size of r_data field */
- int r_opcode; /* type of operation */
- /* following fields for private use by the resolver/server routines */
- struct ns_updrec *r_grpnext; /* next record when grouped */
- struct databuf *r_dp; /* databuf to process */
- struct databuf *r_deldp; /* databuf's deleted/overwritten */
- u_int16_t r_zone; /* zone number on server */
-};
-typedef struct ns_updrec ns_updrec;
-
-/*
- * Currently defined type values for resources and queries.
- */
-typedef enum __ns_type {
- ns_t_a = 1, /* Host address. */
- ns_t_ns = 2, /* Authoritative server. */
- ns_t_md = 3, /* Mail destination. */
- ns_t_mf = 4, /* Mail forwarder. */
- ns_t_cname = 5, /* Canonical name. */
- ns_t_soa = 6, /* Start of authority zone. */
- ns_t_mb = 7, /* Mailbox domain name. */
- ns_t_mg = 8, /* Mail group member. */
- ns_t_mr = 9, /* Mail rename name. */
- ns_t_null = 10, /* Null resource record. */
- ns_t_wks = 11, /* Well known service. */
- ns_t_ptr = 12, /* Domain name pointer. */
- ns_t_hinfo = 13, /* Host information. */
- ns_t_minfo = 14, /* Mailbox information. */
- ns_t_mx = 15, /* Mail routing information. */
- ns_t_txt = 16, /* Text strings. */
- ns_t_rp = 17, /* Responsible person. */
- ns_t_afsdb = 18, /* AFS cell database. */
- ns_t_x25 = 19, /* X_25 calling address. */
- ns_t_isdn = 20, /* ISDN calling address. */
- ns_t_rt = 21, /* Router. */
- ns_t_nsap = 22, /* NSAP address. */
- ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */
- ns_t_sig = 24, /* Security signature. */
- ns_t_key = 25, /* Security key. */
- ns_t_px = 26, /* X.400 mail mapping. */
- ns_t_gpos = 27, /* Geographical position (withdrawn). */
- ns_t_aaaa = 28, /* Ip6 Address. */
- ns_t_loc = 29, /* Location Information. */
- ns_t_nxt = 30, /* Next domain (security). */
- ns_t_eid = 31, /* Endpoint identifier. */
- ns_t_nimloc = 32, /* Nimrod Locator. */
- ns_t_srv = 33, /* Server Selection. */
- ns_t_atma = 34, /* ATM Address */
- ns_t_naptr = 35, /* Naming Authority PoinTeR */
- ns_t_opt = 41, /* OPT pseudo-RR, RFC2761 */
- /* Query type values which do not appear in resource records. */
- ns_t_ixfr = 251, /* Incremental zone transfer. */
- ns_t_axfr = 252, /* Transfer zone of authority. */
- ns_t_mailb = 253, /* Transfer mailbox records. */
- ns_t_maila = 254, /* Transfer mail agent records. */
- ns_t_any = 255, /* Wildcard match. */
- ns_t_max = 65536
-} ns_type;
-
-/*
- * Values for class field
- */
-typedef enum __ns_class {
- ns_c_in = 1, /* Internet. */
- /* Class 2 unallocated/unsupported. */
- ns_c_chaos = 3, /* MIT Chaos-net. */
- ns_c_hs = 4, /* MIT Hesiod. */
- /* Query class values which do not appear in resource records */
- ns_c_none = 254, /* for prereq. sections in update requests */
- ns_c_any = 255, /* Wildcard match. */
- ns_c_max = 65536
-} ns_class;
-
-/*
- * Flags field of the KEY RR rdata
- */
-#define NS_KEY_TYPEMASK 0xC000 /* Mask for "type" bits */
-#define NS_KEY_TYPE_AUTH_CONF 0x0000 /* Key usable for both */
-#define NS_KEY_TYPE_CONF_ONLY 0x8000 /* Key usable for confidentiality */
-#define NS_KEY_TYPE_AUTH_ONLY 0x4000 /* Key usable for authentication */
-#define NS_KEY_TYPE_NO_KEY 0xC000 /* No key usable for either; no key */
-/* The type bits can also be interpreted independently, as single bits: */
-#define NS_KEY_NO_AUTH 0x8000 /* Key unusable for authentication */
-#define NS_KEY_NO_CONF 0x4000 /* Key unusable for confidentiality */
-#define NS_KEY_EXPERIMENTAL 0x2000 /* Security is *mandatory* if bit=0 */
-#define NS_KEY_RESERVED3 0x1000 /* reserved - must be zero */
-#define NS_KEY_RESERVED4 0x0800 /* reserved - must be zero */
-#define NS_KEY_USERACCOUNT 0x0400 /* key is assoc. with a user acct */
-#define NS_KEY_ENTITY 0x0200 /* key is assoc. with entity eg host */
-#define NS_KEY_ZONEKEY 0x0100 /* key is zone key */
-#define NS_KEY_IPSEC 0x0080 /* key is for IPSEC (host or user)*/
-#define NS_KEY_EMAIL 0x0040 /* key is for email (MIME security) */
-#define NS_KEY_RESERVED10 0x0020 /* reserved - must be zero */
-#define NS_KEY_RESERVED11 0x0010 /* reserved - must be zero */
-#define NS_KEY_SIGNATORYMASK 0x000F /* key can sign RR's of same name */
-
-#define NS_KEY_RESERVED_BITMASK ( NS_KEY_RESERVED3 | \
- NS_KEY_RESERVED4 | \
- NS_KEY_RESERVED10 | \
- NS_KEY_RESERVED11 )
-
-/* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */
-#define NS_ALG_MD5RSA 1 /* MD5 with RSA */
-#define NS_ALG_EXPIRE_ONLY 253 /* No alg, no security */
-#define NS_ALG_PRIVATE_OID 254 /* Key begins with OID giving alg */
-
-/* Signatures */
-#define NS_MD5RSA_MIN_BITS 512 /* Size of a mod or exp in bits */
-#define NS_MD5RSA_MAX_BITS 2552
- /* Total of binary mod and exp */
-#define NS_MD5RSA_MAX_BYTES ((NS_MD5RSA_MAX_BITS+7/8)*2+3)
- /* Max length of text sig block */
-#define NS_MD5RSA_MAX_BASE64 (((NS_MD5RSA_MAX_BYTES+2)/3)*4)
-
-/* Offsets into SIG record rdata to find various values */
-#define NS_SIG_TYPE 0 /* Type flags */
-#define NS_SIG_ALG 2 /* Algorithm */
-#define NS_SIG_LABELS 3 /* How many labels in name */
-#define NS_SIG_OTTL 4 /* Original TTL */
-#define NS_SIG_EXPIR 8 /* Expiration time */
-#define NS_SIG_SIGNED 12 /* Signature time */
-#define NS_SIG_FOOT 16 /* Key footprint */
-#define NS_SIG_SIGNER 18 /* Domain name of who signed it */
-
-/* How RR types are represented as bit-flags in NXT records */
-#define NS_NXT_BITS 8
-#define NS_NXT_BIT_SET( n,p) (p[(n)/NS_NXT_BITS] |= (0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_BIT_CLEAR(n,p) (p[(n)/NS_NXT_BITS] &= ~(0x80>>((n)%NS_NXT_BITS)))
-#define NS_NXT_BIT_ISSET(n,p) (p[(n)/NS_NXT_BITS] & (0x80>>((n)%NS_NXT_BITS)))
-
-
-/*
- * Inline versions of get/put short/long. Pointer is advanced.
- */
-#define NS_GET16(s, cp) { \
- register u_char *t_cp = (u_char *)(cp); \
- (s) = ((u_int16_t)t_cp[0] << 8) \
- | ((u_int16_t)t_cp[1]) \
- ; \
- (cp) += NS_INT16SZ; \
-}
-
-#define NS_GET32(l, cp) { \
- register u_char *t_cp = (u_char *)(cp); \
- (l) = ((u_int32_t)t_cp[0] << 24) \
- | ((u_int32_t)t_cp[1] << 16) \
- | ((u_int32_t)t_cp[2] << 8) \
- | ((u_int32_t)t_cp[3]) \
- ; \
- (cp) += NS_INT32SZ; \
-}
-
-#define NS_PUT16(s, cp) { \
- register u_int16_t t_s = (u_int16_t)(s); \
- register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_s >> 8; \
- *t_cp = t_s; \
- (cp) += NS_INT16SZ; \
-}
-
-#define NS_PUT32(l, cp) { \
- register u_int32_t t_l = (u_int32_t)(l); \
- register u_char *t_cp = (u_char *)(cp); \
- *t_cp++ = t_l >> 24; \
- *t_cp++ = t_l >> 16; \
- *t_cp++ = t_l >> 8; \
- *t_cp = t_l; \
- (cp) += NS_INT32SZ; \
-}
-
-/*
- * ANSI C identifier hiding.
- */
-#define ns_get16 __ns_get16
-#define ns_get32 __ns_get32
-#define ns_put16 __ns_put16
-#define ns_put32 __ns_put32
-#define ns_initparse __ns_initparse
-#define ns_parserr __ns_parserr
-#define ns_sprintrr __ns_sprintrr
-#define ns_sprintrrf __ns_sprintrrf
-#define ns_format_ttl __ns_format_ttl
-#define ns_parse_ttl __ns_parse_ttl
-#define ns_name_ntop __ns_name_ntop
-#define ns_name_pton __ns_name_pton
-#define ns_name_unpack __ns_name_unpack
-#define ns_name_pack __ns_name_pack
-#define ns_name_compress __ns_name_compress
-#define ns_name_uncompress __ns_name_uncompress
-
-__BEGIN_DECLS
-u_int ns_get16(const u_char *);
-u_long ns_get32(const u_char *);
-void ns_put16(u_int, u_char *);
-void ns_put32(u_long, u_char *);
-int ns_initparse(const u_char *, int, ns_msg *);
-int ns_parserr(ns_msg *, ns_sect, int, ns_rr *);
-int ns_sprintrr(const ns_msg *, const ns_rr *,
- const char *, const char *, char *, size_t);
-int ns_sprintrrf(const u_char *, size_t, const char *,
- ns_class, ns_type, u_long, const u_char *,
- size_t, const char *, const char *,
- char *, size_t);
-int ns_format_ttl(u_long, char *, size_t);
-int ns_parse_ttl(const char *, u_long *);
-int ns_name_ntop(const u_char *, char *, size_t);
-int ns_name_pton(const char *, u_char *, size_t);
-int ns_name_unpack(const u_char *, const u_char *,
- const u_char *, u_char *, size_t);
-int ns_name_pack(const u_char *, u_char *, int,
- const u_char **, const u_char **);
-int ns_name_uncompress(const u_char *, const u_char *,
- const u_char *, char *, size_t);
-int ns_name_compress(const char *, u_char *, size_t,
- const u_char **, const u_char **);
-int ns_name_skip(const u_char **, const u_char *);
-__END_DECLS
-
-#ifdef BIND_4_COMPAT
-#include <arpa/nameser_compat.h>
-#endif
-
-#endif /* !_ARPA_NAMESER_H_ */
diff --git a/newlib/libc/sys/linux/include/arpa/nameser_compat.h b/newlib/libc/sys/linux/include/arpa/nameser_compat.h
deleted file mode 100644
index bbdea8979..000000000
--- a/newlib/libc/sys/linux/include/arpa/nameser_compat.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/* Copyright (c) 1983, 1989
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * from nameser.h 8.1 (Berkeley) 6/2/93
- * From: Id: nameser_compat.h,v 8.9 1998/03/20 23:25:10 halley Exp
- * $FreeBSD: src/include/arpa/nameser_compat.h,v 1.3 2001/06/10 20:25:22 ume Exp $
- */
-
-#ifndef _ARPA_NAMESER_COMPAT_
-#define _ARPA_NAMESER_COMPAT_
-
-#define __BIND 19950621 /* (DEAD) interface version stamp. */
-
-#include <endian.h>
-#include <machine/endian.h>
-
-#if !defined(BYTE_ORDER) || \
- (BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN && \
- BYTE_ORDER != PDP_ENDIAN)
- /* you must determine what the correct bit order is for
- * your compiler - the next line is an intentional error
- * which will force your compiles to bomb until you fix
- * the above macros.
- */
- error "Undefined or invalid BYTE_ORDER";
-#endif
-
-/*
- * Structure for query header. The order of the fields is machine- and
- * compiler-dependent, depending on the byte/bit order and the layout
- * of bit fields. We use bit fields only in int variables, as this
- * is all ANSI requires. This requires a somewhat confusing rearrangement.
- */
-
-typedef struct {
- unsigned id :16; /* query identification number */
-#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
- /* fields in third byte */
- unsigned rd :1; /* recursion desired */
- unsigned tc :1; /* truncated message */
- unsigned aa :1; /* authoritive answer */
- unsigned opcode :4; /* purpose of message */
- unsigned qr :1; /* response flag */
- /* fields in fourth byte */
- unsigned rcode :4; /* response code */
- unsigned cd: 1; /* checking disabled by resolver */
- unsigned ad: 1; /* authentic data from named */
- unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
- unsigned ra :1; /* recursion available */
-#endif
- /* remaining bytes */
- unsigned qdcount :16; /* number of question entries */
- unsigned ancount :16; /* number of answer entries */
- unsigned nscount :16; /* number of authority entries */
- unsigned arcount :16; /* number of resource entries */
-} HEADER;
-
-#define PACKETSZ NS_PACKETSZ
-#define MAXDNAME NS_MAXDNAME
-#define MAXCDNAME NS_MAXCDNAME
-#define MAXLABEL NS_MAXLABEL
-#define HFIXEDSZ NS_HFIXEDSZ
-#define QFIXEDSZ NS_QFIXEDSZ
-#define RRFIXEDSZ NS_RRFIXEDSZ
-#define INT32SZ NS_INT32SZ
-#define INT16SZ NS_INT16SZ
-#define INADDRSZ NS_INADDRSZ
-#define IN6ADDRSZ NS_IN6ADDRSZ
-#define INDIR_MASK NS_CMPRSFLGS
-#define NAMESERVER_PORT NS_DEFAULTPORT
-
-#define S_ZONE ns_s_zn
-#define S_PREREQ ns_s_pr
-#define S_UPDATE ns_s_ud
-#define S_ADDT ns_s_ar
-
-#define QUERY ns_o_query
-#define IQUERY ns_o_iquery
-#define STATUS ns_o_status
-#define NS_NOTIFY_OP ns_o_notify
-#define NS_UPDATE_OP ns_o_update
-
-#define NOERROR ns_r_noerror
-#define FORMERR ns_r_formerr
-#define SERVFAIL ns_r_servfail
-#define NXDOMAIN ns_r_nxdomain
-#define NOTIMP ns_r_notimpl
-#define REFUSED ns_r_refused
-#define YXDOMAIN ns_r_yxdomain
-#define YXRRSET ns_r_yxrrset
-#define NXRRSET ns_r_nxrrset
-#define NOTAUTH ns_r_notauth
-#define NOTZONE ns_r_notzone
-
-#define DELETE ns_uop_delete
-#define ADD ns_uop_add
-
-#define T_A ns_t_a
-#define T_NS ns_t_ns
-#define T_MD ns_t_md
-#define T_MF ns_t_mf
-#define T_CNAME ns_t_cname
-#define T_SOA ns_t_soa
-#define T_MB ns_t_mb
-#define T_MG ns_t_mg
-#define T_MR ns_t_mr
-#define T_NULL ns_t_null
-#define T_WKS ns_t_wks
-#define T_PTR ns_t_ptr
-#define T_HINFO ns_t_hinfo
-#define T_MINFO ns_t_minfo
-#define T_MX ns_t_mx
-#define T_TXT ns_t_txt
-#define T_RP ns_t_rp
-#define T_AFSDB ns_t_afsdb
-#define T_X25 ns_t_x25
-#define T_ISDN ns_t_isdn
-#define T_RT ns_t_rt
-#define T_NSAP ns_t_nsap
-#define T_NSAP_PTR ns_t_nsap_ptr
-#define T_SIG ns_t_sig
-#define T_KEY ns_t_key
-#define T_PX ns_t_px
-#define T_GPOS ns_t_gpos
-#define T_AAAA ns_t_aaaa
-#define T_LOC ns_t_loc
-#define T_NXT ns_t_nxt
-#define T_EID ns_t_eid
-#define T_NIMLOC ns_t_nimloc
-#define T_SRV ns_t_srv
-#define T_ATMA ns_t_atma
-#define T_NAPTR ns_t_naptr
-#define T_OPT ns_t_opt
-#define T_IXFR ns_t_ixfr
-#define T_AXFR ns_t_axfr
-#define T_MAILB ns_t_mailb
-#define T_MAILA ns_t_maila
-#define T_ANY ns_t_any
-
-#define C_IN ns_c_in
-#define C_CHAOS ns_c_chaos
-#define C_HS ns_c_hs
-/* BIND_UPDATE */
-#define C_NONE ns_c_none
-#define C_ANY ns_c_any
-
-#define GETSHORT NS_GET16
-#define GETLONG NS_GET32
-#define PUTSHORT NS_PUT16
-#define PUTLONG NS_PUT32
-
-#endif /* _ARPA_NAMESER_COMPAT_ */
diff --git a/newlib/libc/sys/linux/include/arpa/telnet.h b/newlib/libc/sys/linux/include/arpa/telnet.h
deleted file mode 100644
index 70e7ea822..000000000
--- a/newlib/libc/sys/linux/include/arpa/telnet.h
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)telnet.h 8.2 (Berkeley) 12/15/93
- * $FreeBSD: src/include/arpa/telnet.h,v 1.8 2001/12/03 12:41:18 markm Exp $
- */
-
-#ifndef _ARPA_TELNET_H_
-#define _ARPA_TELNET_H_
-
-/*
- * Definitions for the TELNET protocol.
- */
-#define IAC 255 /* interpret as command: */
-#define DONT 254 /* you are not to use option */
-#define DO 253 /* please, you use option */
-#define WONT 252 /* I won't use option */
-#define WILL 251 /* I will use option */
-#define SB 250 /* interpret as subnegotiation */
-#define GA 249 /* you may reverse the line */
-#define EL 248 /* erase the current line */
-#define EC 247 /* erase the current character */
-#define AYT 246 /* are you there */
-#define AO 245 /* abort output--but let prog finish */
-#define IP 244 /* interrupt process--permanently */
-#define BREAK 243 /* break */
-#define DM 242 /* data mark--for connect. cleaning */
-#define NOP 241 /* nop */
-#define SE 240 /* end sub negotiation */
-#define EOR 239 /* end of record (transparent mode) */
-#define ABORT 238 /* Abort process */
-#define SUSP 237 /* Suspend process */
-#define xEOF 236 /* End of file: EOF is already used... */
-
-#define SYNCH 242 /* for telfunc calls */
-
-#ifdef TELCMDS
-const char *telcmds[] = {
- "EOF", "SUSP", "ABORT", "EOR",
- "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
- "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC",
- 0
-};
-#else
-extern char *telcmds[];
-#endif
-
-#define TELCMD_FIRST xEOF
-#define TELCMD_LAST IAC
-#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \
- (unsigned int)(x) >= TELCMD_FIRST)
-#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
-
-/* telnet options */
-#define TELOPT_BINARY 0 /* 8-bit data path */
-#define TELOPT_ECHO 1 /* echo */
-#define TELOPT_RCP 2 /* prepare to reconnect */
-#define TELOPT_SGA 3 /* suppress go ahead */
-#define TELOPT_NAMS 4 /* approximate message size */
-#define TELOPT_STATUS 5 /* give status */
-#define TELOPT_TM 6 /* timing mark */
-#define TELOPT_RCTE 7 /* remote controlled transmission and echo */
-#define TELOPT_NAOL 8 /* negotiate about output line width */
-#define TELOPT_NAOP 9 /* negotiate about output page size */
-#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */
-#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
-#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */
-#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */
-#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */
-#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */
-#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */
-#define TELOPT_XASCII 17 /* extended ascic character set */
-#define TELOPT_LOGOUT 18 /* force logout */
-#define TELOPT_BM 19 /* byte macro */
-#define TELOPT_DET 20 /* data entry terminal */
-#define TELOPT_SUPDUP 21 /* supdup protocol */
-#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */
-#define TELOPT_SNDLOC 23 /* send location */
-#define TELOPT_TTYPE 24 /* terminal type */
-#define TELOPT_EOR 25 /* end or record */
-#define TELOPT_TUID 26 /* TACACS user identification */
-#define TELOPT_OUTMRK 27 /* output marking */
-#define TELOPT_TTYLOC 28 /* terminal location number */
-#define TELOPT_3270REGIME 29 /* 3270 regime */
-#define TELOPT_X3PAD 30 /* X.3 PAD */
-#define TELOPT_NAWS 31 /* window size */
-#define TELOPT_TSPEED 32 /* terminal speed */
-#define TELOPT_LFLOW 33 /* remote flow control */
-#define TELOPT_LINEMODE 34 /* Linemode option */
-#define TELOPT_XDISPLOC 35 /* X Display Location */
-#define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */
-#define TELOPT_AUTHENTICATION 37/* Authenticate */
-#define TELOPT_ENCRYPT 38 /* Encryption option */
-#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */
-#define TELOPT_EXOPL 255 /* extended-options-list */
-
-
-#define NTELOPTS (1+TELOPT_NEW_ENVIRON)
-#ifdef TELOPTS
-const char *telopts[NTELOPTS+1] = {
- "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
- "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
- "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
- "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
- "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
- "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
- "TACACS UID", "OUTPUT MARKING", "TTYLOC",
- "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
- "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION",
- "ENCRYPT", "NEW-ENVIRON",
- 0
-};
-#define TELOPT_FIRST TELOPT_BINARY
-#define TELOPT_LAST TELOPT_NEW_ENVIRON
-#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST)
-#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
-#endif
-
-/* sub-option qualifiers */
-#define TELQUAL_IS 0 /* option is... */
-#define TELQUAL_SEND 1 /* send option */
-#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */
-#define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */
-#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */
-
-#define LFLOW_OFF 0 /* Disable remote flow control */
-#define LFLOW_ON 1 /* Enable remote flow control */
-#define LFLOW_RESTART_ANY 2 /* Restart output on any char */
-#define LFLOW_RESTART_XON 3 /* Restart output only on XON */
-
-/*
- * LINEMODE suboptions
- */
-
-#define LM_MODE 1
-#define LM_FORWARDMASK 2
-#define LM_SLC 3
-
-#define MODE_EDIT 0x01
-#define MODE_TRAPSIG 0x02
-#define MODE_ACK 0x04
-#define MODE_SOFT_TAB 0x08
-#define MODE_LIT_ECHO 0x10
-
-#define MODE_MASK 0x1f
-
-/* Not part of protocol, but needed to simplify things... */
-#define MODE_FLOW 0x0100
-#define MODE_ECHO 0x0200
-#define MODE_INBIN 0x0400
-#define MODE_OUTBIN 0x0800
-#define MODE_FORCE 0x1000
-
-#define SLC_SYNCH 1
-#define SLC_BRK 2
-#define SLC_IP 3
-#define SLC_AO 4
-#define SLC_AYT 5
-#define SLC_EOR 6
-#define SLC_ABORT 7
-#define SLC_EOF 8
-#define SLC_SUSP 9
-#define SLC_EC 10
-#define SLC_EL 11
-#define SLC_EW 12
-#define SLC_RP 13
-#define SLC_LNEXT 14
-#define SLC_XON 15
-#define SLC_XOFF 16
-#define SLC_FORW1 17
-#define SLC_FORW2 18
-#define SLC_MCL 19
-#define SLC_MCR 20
-#define SLC_MCWL 21
-#define SLC_MCWR 22
-#define SLC_MCBOL 23
-#define SLC_MCEOL 24
-#define SLC_INSRT 25
-#define SLC_OVER 26
-#define SLC_ECR 27
-#define SLC_EWR 28
-#define SLC_EBOL 29
-#define SLC_EEOL 30
-
-#define NSLC 30
-
-/*
- * For backwards compatibility, we define SLC_NAMES to be the
- * list of names if SLC_NAMES is not defined.
- */
-#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
- "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
- "LNEXT", "XON", "XOFF", "FORW1", "FORW2", \
- "MCL", "MCR", "MCWL", "MCWR", "MCBOL", \
- "MCEOL", "INSRT", "OVER", "ECR", "EWR", \
- "EBOL", "EEOL", \
- 0
-
-#ifdef SLC_NAMES
-const char *slc_names[] = {
- SLC_NAMELIST
-};
-#else
-extern char *slc_names[];
-#define SLC_NAMES SLC_NAMELIST
-#endif
-
-#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
-#define SLC_NAME(x) slc_names[x]
-
-#define SLC_NOSUPPORT 0
-#define SLC_CANTCHANGE 1
-#define SLC_VARIABLE 2
-#define SLC_DEFAULT 3
-#define SLC_LEVELBITS 0x03
-
-#define SLC_FUNC 0
-#define SLC_FLAGS 1
-#define SLC_VALUE 2
-
-#define SLC_ACK 0x80
-#define SLC_FLUSHIN 0x40
-#define SLC_FLUSHOUT 0x20
-
-#define OLD_ENV_VAR 1
-#define OLD_ENV_VALUE 0
-#define NEW_ENV_VAR 0
-#define NEW_ENV_VALUE 1
-#define ENV_ESC 2
-#define ENV_USERVAR 3
-
-/*
- * AUTHENTICATION suboptions
- */
-
-/*
- * Who is authenticating who ...
- */
-#define AUTH_WHO_CLIENT 0 /* Client authenticating server */
-#define AUTH_WHO_SERVER 1 /* Server authenticating client */
-#define AUTH_WHO_MASK 1
-
-/*
- * amount of authentication done
- */
-#define AUTH_HOW_ONE_WAY 0
-#define AUTH_HOW_MUTUAL 2
-#define AUTH_HOW_MASK 2
-
-#define AUTHTYPE_NULL 0
-#define AUTHTYPE_KERBEROS_V4 1
-#define AUTHTYPE_KERBEROS_V5 2
-#define AUTHTYPE_SPX 3
-#define AUTHTYPE_MINK 4
-#define AUTHTYPE_SRA 6
-#define AUTHTYPE_CNT 7
-
-#define AUTHTYPE_TEST 99
-
-#ifdef AUTH_NAMES
-const char *authtype_names[] = {
- "NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", NULL, "SRA",
- 0
-};
-#else
-extern char *authtype_names[];
-#endif
-
-#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
-#define AUTHTYPE_NAME(x) authtype_names[x]
-
-/*
- * ENCRYPTion suboptions
- */
-#define ENCRYPT_IS 0 /* I pick encryption type ... */
-#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */
-#define ENCRYPT_REPLY 2 /* Initial setup response */
-#define ENCRYPT_START 3 /* Am starting to send encrypted */
-#define ENCRYPT_END 4 /* Am ending encrypted */
-#define ENCRYPT_REQSTART 5 /* Request you start encrypting */
-#define ENCRYPT_REQEND 6 /* Request you end encrypting */
-#define ENCRYPT_ENC_KEYID 7
-#define ENCRYPT_DEC_KEYID 8
-#define ENCRYPT_CNT 9
-
-#define ENCTYPE_ANY 0
-#define ENCTYPE_DES_CFB64 1
-#define ENCTYPE_DES_OFB64 2
-#define ENCTYPE_CNT 3
-
-#ifdef ENCRYPT_NAMES
-const char *encrypt_names[] = {
- "IS", "SUPPORT", "REPLY", "START", "END",
- "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID",
- 0
-};
-const char *enctype_names[] = {
- "ANY", "DES_CFB64", "DES_OFB64",
- 0
-};
-#else
-extern char *encrypt_names[];
-extern char *enctype_names[];
-#endif
-
-
-#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
-#define ENCRYPT_NAME(x) encrypt_names[x]
-
-#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
-#define ENCTYPE_NAME(x) enctype_names[x]
-
-#endif /* !_TELNET_H_ */
diff --git a/newlib/libc/sys/linux/include/arpa/tftp.h b/newlib/libc/sys/linux/include/arpa/tftp.h
deleted file mode 100644
index 1de4dd48a..000000000
--- a/newlib/libc/sys/linux/include/arpa/tftp.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tftp.h 8.1 (Berkeley) 6/2/93
- * $FreeBSD: src/include/arpa/tftp.h,v 1.5 2001/09/27 20:50:14 obrien Exp $
- */
-
-#ifndef _ARPA_TFTP_H_
-#define _ARPA_TFTP_H_
-
-/*
- * Trivial File Transfer Protocol (IEN-133)
- */
-#define SEGSIZE 512 /* data segment size */
-
-/*
- * Packet types.
- */
-#define RRQ 01 /* read request */
-#define WRQ 02 /* write request */
-#define DATA 03 /* data packet */
-#define ACK 04 /* acknowledgement */
-#define ERROR 05 /* error code */
-#define OACK 06 /* option acknowledgement */
-
-struct tftphdr {
- unsigned short th_opcode; /* packet type */
- union {
- unsigned short tu_block; /* block # */
- unsigned short tu_code; /* error code */
- char tu_stuff[1]; /* request packet stuff */
- } th_u;
- char th_data[1]; /* data or error string */
-};
-
-#define th_block th_u.tu_block
-#define th_code th_u.tu_code
-#define th_stuff th_u.tu_stuff
-#define th_msg th_data
-
-/*
- * Error codes.
- */
-#define EUNDEF 0 /* not defined */
-#define ENOTFOUND 1 /* file not found */
-#define EACCESS 2 /* access violation */
-#define ENOSPACE 3 /* disk full or allocation exceeded */
-#define EBADOP 4 /* illegal TFTP operation */
-#define EBADID 5 /* unknown transfer ID */
-#define EEXISTS 6 /* file already exists */
-#define ENOUSER 7 /* no such user */
-#define EOPTNEG 8 /* option negotiation failed */
-
-#endif /* !_TFTP_H_ */
diff --git a/newlib/libc/sys/linux/include/bp-sym.h b/newlib/libc/sys/linux/include/bp-sym.h
deleted file mode 100644
index 249a4bd66..000000000
--- a/newlib/libc/sys/linux/include/bp-sym.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __BP_SYM_H__
-#define __BP_SYM_H__
-
-#define BP_SYM(NAME) NAME
-
-#endif
diff --git a/newlib/libc/sys/linux/include/cmathcalls.h b/newlib/libc/sys/linux/include/cmathcalls.h
deleted file mode 100644
index c680c6d8e..000000000
--- a/newlib/libc/sys/linux/include/cmathcalls.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/* Prototype declarations for complex math functions;
- helper file for <complex.h>.
- Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* NOTE: Because of the special way this file is used by <complex.h>, this
- file must NOT be protected from multiple inclusion as header files
- usually are.
-
- This file provides prototype declarations for the math functions.
- Most functions are declared using the macro:
-
- __MATHCALL (NAME, (ARGS...));
-
- This means there is a function `NAME' returning `double' and a function
- `NAMEf' returning `float'. Each place `_Mdouble_' appears in the
- prototype, that is actually `double' in the prototype for `NAME' and
- `float' in the prototype for `NAMEf'. Reentrant variant functions are
- called `NAME_r' and `NAMEf_r'.
-
- Functions returning other types like `int' are declared using the macro:
-
- __MATHDECL (TYPE, NAME, (ARGS...));
-
- This is just like __MATHCALL but for a function returning `TYPE'
- instead of `_Mdouble_'. In all of these cases, there is still
- both a `NAME' and a `NAMEf' that takes `float' arguments. */
-
-#ifndef _COMPLEX_H
-#error "Never use <bits/cmathcalls.h> directly; include <complex.h> instead."
-#endif
-
-#define _Mdouble_complex_ _Mdouble_ _Complex
-
-
-/* Trigonometric functions. */
-
-/* Arc cosine of Z. */
-__MATHCALL (cacos, (_Mdouble_complex_ __z));
-/* Arc sine of Z. */
-__MATHCALL (casin, (_Mdouble_complex_ __z));
-/* Arc tangent of Z. */
-__MATHCALL (catan, (_Mdouble_complex_ __z));
-
-/* Cosine of Z. */
-__MATHCALL (ccos, (_Mdouble_complex_ __z));
-/* Sine of Z. */
-__MATHCALL (csin, (_Mdouble_complex_ __z));
-/* Tangent of Z. */
-__MATHCALL (ctan, (_Mdouble_complex_ __z));
-
-
-/* Hyperbolic functions. */
-
-/* Hyperbolic arc cosine of Z. */
-__MATHCALL (cacosh, (_Mdouble_complex_ __z));
-/* Hyperbolic arc sine of Z. */
-__MATHCALL (casinh, (_Mdouble_complex_ __z));
-/* Hyperbolic arc tangent of Z. */
-__MATHCALL (catanh, (_Mdouble_complex_ __z));
-
-/* Hyperbolic cosine of Z. */
-__MATHCALL (ccosh, (_Mdouble_complex_ __z));
-/* Hyperbolic sine of Z. */
-__MATHCALL (csinh, (_Mdouble_complex_ __z));
-/* Hyperbolic tangent of Z. */
-__MATHCALL (ctanh, (_Mdouble_complex_ __z));
-
-
-/* Exponential and logarithmic functions. */
-
-/* Exponential function of Z. */
-__MATHCALL (cexp, (_Mdouble_complex_ __z));
-
-/* Natural logarithm of Z. */
-__MATHCALL (clog, (_Mdouble_complex_ __z));
-
-#ifdef __USE_GNU
-/* The base 10 logarithm is not defined by the standard but to implement
- the standard C++ library it is handy. */
-__MATHCALL (clog10, (_Mdouble_complex_ __z));
-#endif
-
-/* Power functions. */
-
-/* Return X to the Y power. */
-__MATHCALL (cpow, (_Mdouble_complex_ __x, _Mdouble_complex_ __y));
-
-/* Return the square root of Z. */
-__MATHCALL (csqrt, (_Mdouble_complex_ __z));
-
-
-/* Absolute value, conjugates, and projection. */
-
-/* Absolute value of Z. */
-__MATHDECL (_Mdouble_,cabs, (_Mdouble_complex_ __z));
-
-/* Argument value of Z. */
-__MATHDECL (_Mdouble_,carg, (_Mdouble_complex_ __z));
-
-/* Complex conjugate of Z. */
-__MATHCALL (conj, (_Mdouble_complex_ __z));
-
-/* Projection of Z onto the Riemann sphere. */
-__MATHCALL (cproj, (_Mdouble_complex_ __z));
-
-
-/* Decomposing complex values. */
-
-/* Imaginary part of Z. */
-__MATHDECL (_Mdouble_,cimag, (_Mdouble_complex_ __z));
-
-/* Real part of Z. */
-__MATHDECL (_Mdouble_,creal, (_Mdouble_complex_ __z));
-
-
-/* Now some optimized versions. GCC has handy notations for these
- functions. Recent GCC handles these as builtin functions so does
- not need inlines. */
-#if defined __GNUC__ && !__GNUC_PREREQ (2, 97) && defined __OPTIMIZE__
-
-/* Imaginary part of Z. */
-extern __inline _Mdouble_
-__MATH_PRECNAME(cimag) (_Mdouble_complex_ __z) __THROW
-{
- return __imag__ __z;
-}
-
-/* Real part of Z. */
-extern __inline _Mdouble_
-__MATH_PRECNAME(creal) (_Mdouble_complex_ __z) __THROW
-{
- return __real__ __z;
-}
-
-/* Complex conjugate of Z. */
-extern __inline _Mdouble_complex_
-__MATH_PRECNAME(conj) (_Mdouble_complex_ __z) __THROW
-{
- return __extension__ ~__z;
-}
-
-#endif
diff --git a/newlib/libc/sys/linux/include/complex.h b/newlib/libc/sys/linux/include/complex.h
deleted file mode 100644
index daa465674..000000000
--- a/newlib/libc/sys/linux/include/complex.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/*
- * ISO C99: 7.3 Complex arithmetic <complex.h>
- */
-
-#ifndef _COMPLEX_H
-#define _COMPLEX_H 1
-
-#include <sys/types.h>
-#include <features.h>
-
-__BEGIN_DECLS
-
-#define __CONCAT(x,y) x ## y
-/* We might need to add support for more compilers here. But since ISO
- C99 is out hopefully all maintained compilers will soon provide the data
- types `float complex' and `double complex'. */
-#if __GNUC_PREREQ (2, 7) && !__GNUC_PREREQ (2, 97)
-# define _Complex __complex__
-#endif
-
-#define complex _Complex
-
-/* Narrowest imaginary unit. This depends on the floating-point
- evaluation method.
- XXX This probably has to go into a gcc related file. */
-#define _Complex_I (__extension__ 1.0iF)
-
-/* Another more descriptive name is `I'.
- XXX Once we have the imaginary support switch this to _Imaginary_I. */
-#undef I
-#define I _Complex_I
-
-/* The file <bits/cmathcalls.h> contains the prototypes for all the
- actual math functions. These macros are used for those prototypes,
- so we can easily declare each function as both `name' and `__name',
- and can declare the float versions `namef' and `__namef'. */
-
-#define __MATHCALL(function, args) \
- __MATHDECL (_Mdouble_complex_,function, args)
-#define __MATHDECL(type, function, args) \
- __MATHDECL_1(type, function, args); \
- __MATHDECL_1(type, __CONCAT(__,function), args)
-#define __MATHDECL_1(type, function, args) \
- extern type __MATH_PRECNAME(function) args __THROW
-
-#define _Mdouble_ double
-#define __MATH_PRECNAME(name) name
-#include <cmathcalls.h>
-#undef _Mdouble_
-#undef __MATH_PRECNAME
-
-/* Now the float versions. */
-#ifndef _Mfloat_
-# define _Mfloat_ float
-#endif
-#define _Mdouble_ _Mfloat_
-#ifdef __STDC__
-# define __MATH_PRECNAME(name) name##f
-#else
-# define __MATH_PRECNAME(name) name/**/f
-#endif
-#include <cmathcalls.h>
-#undef _Mdouble_
-#undef __MATH_PRECNAME
-
-#if 0
-/* And the long double versions. It is non-critical to define them
- here unconditionally since `long double' is required in ISO C99. */
-#if __STDC__ - 0 || __GNUC__ - 0 && !defined __NO_LONG_DOUBLE_MATH
-# ifndef _Mlong_double_
-# define _Mlong_double_ long double
-# endif
-# define _Mdouble_ _Mlong_double_
-# ifdef __STDC__
-# define __MATH_PRECNAME(name) name##l
-# else
-# define __MATH_PRECNAME(name) name/**/l
-# endif
-# include <cmathcalls.h>
-#endif
-#endif
-#undef _Mdouble_
-#undef __MATH_PRECNAME
-#undef __MATHDECL_1
-#undef __MATHDECL
-#undef __MATHCALL
-
-__END_DECLS
-
-#endif /* complex.h */
diff --git a/newlib/libc/sys/linux/include/dl-hash.h b/newlib/libc/sys/linux/include/dl-hash.h
deleted file mode 100644
index e0f7a4944..000000000
--- a/newlib/libc/sys/linux/include/dl-hash.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Compute hash value for given string according to ELF standard.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _DL_HASH_H
-#define _DL_HASH_H 1
-
-
-/* This is the hashing function specified by the ELF ABI. In the
- first five operations no overflow is possible so we optimized it a
- bit. */
-static inline unsigned int
-_dl_elf_hash (const unsigned char *name)
-{
- unsigned long int hash = 0;
- if (*name != '\0')
- {
- hash = *name++;
- if (*name != '\0')
- {
- hash = (hash << 4) + *name++;
- if (*name != '\0')
- {
- hash = (hash << 4) + *name++;
- if (*name != '\0')
- {
- hash = (hash << 4) + *name++;
- if (*name != '\0')
- {
- hash = (hash << 4) + *name++;
- while (*name != '\0')
- {
- unsigned long int hi;
- hash = (hash << 4) + *name++;
- hi = hash & 0xf0000000;
-
- /* The algorithm specified in the ELF ABI is as
- follows:
-
- if (hi != 0)
- hash ^= hi >> 24;
-
- hash &= ~hi;
-
- But the following is equivalent and a lot
- faster, especially on modern processors. */
-
- hash ^= hi;
- hash ^= hi >> 24;
- }
- }
- }
- }
- }
- }
- return hash;
-}
-
-#endif /* dl-hash.h */
diff --git a/newlib/libc/sys/linux/include/dlfcn.h b/newlib/libc/sys/linux/include/dlfcn.h
deleted file mode 100644
index 75d7526b0..000000000
--- a/newlib/libc/sys/linux/include/dlfcn.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef _DLFCN_H
-#include <dl/dlfcn.h>
-
-#define internal_function
-
-/* Internally used flag. */
-#define __RTLD_DLOPEN 0x80000000
-#define __RTLD_SPROF 0x40000000
-
-/* Now define the internal interfaces. */
-extern void *__dlvsym (void *__handle, __const char *__name,
- __const char *__version);
-
-extern void *__libc_dlopen (__const char *__name);
-extern void *__libc_dlsym (void *__map, __const char *__name);
-extern int __libc_dlclose (void *__map);
-
-/* Locate shared object containing the given address. */
-extern int _dl_addr (const void *address, Dl_info *info)
- internal_function;
-
-/* Open the shared object NAME, relocate it, and run its initializer if it
- hasn't already been run. MODE is as for `dlopen' (see <dlfcn.h>). If
- the object is already opened, returns its existing map. */
-extern void *_dl_open (const char *name, int mode, const void *caller)
- internal_function;
-
-/* Close an object previously opened by _dl_open. */
-extern void _dl_close (void *map)
- internal_function;
-
-/* Look up NAME in shared object HANDLE (which may be RTLD_DEFAULT or
- RTLD_NEXT). WHO is the calling function, for RTLD_NEXT. Returns
- the symbol value, which may be NULL. */
-extern void *_dl_sym (void *handle, const char *name, void *who)
- internal_function;
-
-/* Look up version VERSION of symbol NAME in shared object HANDLE
- (which may be RTLD_DEFAULT or RTLD_NEXT). WHO is the calling
- function, for RTLD_NEXT. Returns the symbol value, which may be
- NULL. */
-extern void *_dl_vsym (void *handle, const char *name, const char *version,
- void *who)
- internal_function;
-
-/* Call OPERATE, catching errors from `dl_signal_error'. If there is no
- error, *ERRSTRING is set to null. If there is an error, *ERRSTRING is
- set to a string constructed from the strings passed to _dl_signal_error,
- and the error code passed is the return value and *OBJNAME is set to
- the object name which experienced the problems. ERRSTRING if nonzero
- points to a malloc'ed string which the caller has to free after use.
- ARGS is passed as argument to OPERATE. */
-extern int _dl_catch_error (const char **objname, const char **errstring,
- void (*operate) (void *),
- void *args)
- internal_function;
-
-/* Helper function for <dlfcn.h> functions. Runs the OPERATE function via
- _dl_catch_error. Returns zero for success, nonzero for failure; and
- arranges for `dlerror' to return the error details.
- ARGS is passed as argument to OPERATE. */
-extern int _dlerror_run (void (*operate) (void *), void *args)
- internal_function;
-
-#endif
diff --git a/newlib/libc/sys/linux/include/fnmatch.h b/newlib/libc/sys/linux/include/fnmatch.h
deleted file mode 100644
index c038bf77f..000000000
--- a/newlib/libc/sys/linux/include/fnmatch.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: src/include/fnmatch.h,v 1.10 2002/03/23 17:24:53 imp Exp $
- * @(#)fnmatch.h 8.1 (Berkeley) 6/2/93
- */
-
-#ifndef _FNMATCH_H_
-#define _FNMATCH_H_
-
-#define FNM_NOMATCH 1 /* Match failed. */
-
-#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
-#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
-#define FNM_PERIOD 0x04 /* Period must be matched by period. */
-
-#if defined(_GNU_SOURCE) || !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
-#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */
-#define FNM_CASEFOLD 0x10 /* Case insensitive search. */
-#define FNM_IGNORECASE FNM_CASEFOLD
-#define FNM_FILE_NAME FNM_PATHNAME
-#endif
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int fnmatch(const char *, const char *, int);
-__END_DECLS
-
-#endif /* !_FNMATCH_H_ */
diff --git a/newlib/libc/sys/linux/include/gconv.h b/newlib/libc/sys/linux/include/gconv.h
deleted file mode 100644
index 64df45bf5..000000000
--- a/newlib/libc/sys/linux/include/gconv.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* This header provides no interface for a user to the internals of
- the gconv implementation in the libc. Therefore there is no use
- for these definitions beside for writing additional gconv modules. */
-
-#ifndef _GCONV_H
-#define _GCONV_H 1
-
-#include <features.h>
-#define __need_mbstate_t
-#include <wchar.h>
-#define __need_size_t
-#define __need_wchar_t
-#include <stddef.h>
-
-/* ISO 10646 value used to signal invalid value. */
-#define __UNKNOWN_10646_CHAR ((wchar_t) 0xfffd)
-
-/* Error codes for gconv functions. */
-enum
-{
- __GCONV_OK = 0,
- __GCONV_NOCONV,
- __GCONV_NODB,
- __GCONV_NOMEM,
-
- __GCONV_EMPTY_INPUT,
- __GCONV_FULL_OUTPUT,
- __GCONV_ILLEGAL_INPUT,
- __GCONV_INCOMPLETE_INPUT,
-
- __GCONV_ILLEGAL_DESCRIPTOR,
- __GCONV_INTERNAL_ERROR
-};
-
-
-/* Flags the `__gconv_open' function can set. */
-enum
-{
- __GCONV_IS_LAST = 0x0001,
- __GCONV_IGNORE_ERRORS = 0x0002
-};
-
-
-/* Forward declarations. */
-struct __gconv_step;
-struct __gconv_step_data;
-struct __gconv_loaded_object;
-struct __gconv_trans_data;
-
-
-/* Type of a conversion function. */
-typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *,
- __const unsigned char **, __const unsigned char *,
- unsigned char **, size_t *, int, int);
-
-/* Constructor and destructor for local data for conversion step. */
-typedef int (*__gconv_init_fct) (struct __gconv_step *);
-typedef void (*__gconv_end_fct) (struct __gconv_step *);
-
-
-/* Type of a transliteration/transscription function. */
-typedef int (*__gconv_trans_fct) (struct __gconv_step *,
- struct __gconv_step_data *, void *,
- __const unsigned char *,
- __const unsigned char **,
- __const unsigned char *, unsigned char **,
- size_t *);
-
-/* Function to call to provide transliteration module with context. */
-typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *,
- __const unsigned char *,
- unsigned char *, unsigned char *);
-
-/* Function to query module about supported encoded character sets. */
-typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***,
- size_t *);
-
-/* Constructor and destructor for local data for transliteration. */
-typedef int (*__gconv_trans_init_fct) (void **, const char *);
-typedef void (*__gconv_trans_end_fct) (void *);
-
-struct __gconv_trans_data
-{
- /* Transliteration/Transscription function. */
- __gconv_trans_fct __trans_fct;
- __gconv_trans_context_fct __trans_context_fct;
- __gconv_trans_end_fct __trans_end_fct;
- void *__data;
- struct __gconv_trans_data *__next;
-};
-
-
-/* Description of a conversion step. */
-struct __gconv_step
-{
- struct __gconv_loaded_object *__shlib_handle;
- __const char *__modname;
-
- int __counter;
-
- char *__from_name;
- char *__to_name;
-
- __gconv_fct __fct;
- __gconv_init_fct __init_fct;
- __gconv_end_fct __end_fct;
-
- /* Information about the number of bytes needed or produced in this
- step. This helps optimizing the buffer sizes. */
- int __min_needed_from;
- int __max_needed_from;
- int __min_needed_to;
- int __max_needed_to;
-
- /* Flag whether this is a stateful encoding or not. */
- int __stateful;
-
- void *__data; /* Pointer to step-local data. */
-};
-
-/* Additional data for steps in use of conversion descriptor. This is
- allocated by the `init' function. */
-struct __gconv_step_data
-{
- unsigned char *__outbuf; /* Output buffer for this step. */
- unsigned char *__outbufend; /* Address of first byte after the output
- buffer. */
-
- /* Is this the last module in the chain. */
- int __flags;
-
- /* Counter for number of invocations of the module function for this
- descriptor. */
- int __invocation_counter;
-
- /* Flag whether this is an internal use of the module (in the mb*towc*
- and wc*tomb* functions) or regular with iconv(3). */
- int __internal_use;
-
- mbstate_t *__statep;
- mbstate_t __state; /* This element must not be used directly by
- any module; always use STATEP! */
-
- /* Transliteration information. */
- struct __gconv_trans_data *__trans;
-};
-
-
-/* Combine conversion step description with data. */
-typedef struct __gconv_info
-{
- size_t __nsteps;
- struct __gconv_step *__steps;
- __extension__ struct __gconv_step_data __data __flexarr;
-} *__gconv_t;
-
-#endif /* gconv.h */
diff --git a/newlib/libc/sys/linux/include/getopt.h b/newlib/libc/sys/linux/include/getopt.h
deleted file mode 100644
index 994f86001..000000000
--- a/newlib/libc/sys/linux/include/getopt.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* libc/sys/linux/include/getopt.h - Extended command line parsing */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#ifndef _NEWLIB_GETOPT_H
-#define _NEWLIB_GETOPT_H
-
-#include <unistd.h>
-
-
-enum { no_argument, required_argument, optional_argument };
-
-struct option {
- const char *name;
- int has_arg;
- int *flag;
- int val;
-};
-
-int getopt_long(int argc,char *const argv[],const char *optstring,
- const struct option *longopts,int *longindex);
-
-int getopt_long_only(int argc,char *const argv[],const char *optstring,
- const struct option *longopts,int *longindex);
-
-#endif
diff --git a/newlib/libc/sys/linux/include/glob.h b/newlib/libc/sys/linux/include/glob.h
deleted file mode 100644
index 6e038476d..000000000
--- a/newlib/libc/sys/linux/include/glob.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Guido van Rossum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)glob.h 8.1 (Berkeley) 6/2/93
- * $FreeBSD: src/include/glob.h,v 1.6 2002/03/23 17:24:53 imp Exp $
- */
-
-#ifndef _GLOB_H_
-#define _GLOB_H_
-
-#include <sys/cdefs.h>
-
-struct stat;
-typedef struct {
- int gl_pathc; /* Count of total paths so far. */
- int gl_matchc; /* Count of paths matching pattern. */
- int gl_offs; /* Reserved at beginning of gl_pathv. */
- int gl_flags; /* Copy of flags parameter to glob. */
- char **gl_pathv; /* List of paths matching pattern. */
- /* Copy of errfunc parameter to glob. */
- int (*gl_errfunc)(const char *, int);
-
- /*
- * Alternate filesystem access methods for glob; replacement
- * versions of closedir(3), readdir(3), opendir(3), stat(2)
- * and lstat(2).
- */
- void (*gl_closedir)(void *);
- struct dirent *(*gl_readdir)(void *);
- void *(*gl_opendir)(const char *);
- int (*gl_lstat)(const char *, struct stat *);
- int (*gl_stat)(const char *, struct stat *);
-} glob_t;
-
-#define GLOB_APPEND 0x0001 /* Append to output from previous call. */
-#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */
-#define GLOB_ERR 0x0004 /* Return on error. */
-#define GLOB_MARK 0x0008 /* Append / to matching directories. */
-#define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */
-#define GLOB_NOSORT 0x0020 /* Don't sort. */
-
-#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */
-#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
-#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
-#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */
-#define GLOB_QUOTE 0x0400 /* Quote special chars with \. */
-#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */
-#define GLOB_LIMIT 0x1000 /* limit number of returned paths */
-
-/* backwards compatibility, this is the old name for this option */
-#define GLOB_MAXPATH GLOB_LIMIT
-
-#define GLOB_NOSPACE (-1) /* Malloc call failed. */
-#define GLOB_ABEND (-2) /* Unignored error. */
-
-__BEGIN_DECLS
-int glob(const char *, int, int (*)(const char *, int), glob_t *);
-void globfree(glob_t *);
-__END_DECLS
-
-#endif /* !_GLOB_H_ */
diff --git a/newlib/libc/sys/linux/include/hesiod.h b/newlib/libc/sys/linux/include/hesiod.h
deleted file mode 100644
index c7dbeee33..000000000
--- a/newlib/libc/sys/linux/include/hesiod.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* $NetBSD: hesiod.h,v 1.3 1999/01/24 23:53:18 lukem Exp $ */
-/* $FreeBSD: src/include/hesiod.h,v 1.2 2002/03/23 17:24:53 imp Exp $ */
-
-
-/*-
- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, 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.
- * 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
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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.
- */
-
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#ifndef _HESIOD_H_
-#define _HESIOD_H_
-
- /* Application-visible indication that we have the new interfaces */
-
-#define HESIOD_INTERFACES
-
- /* Configuration information. */
-
-#ifndef _PATH_HESIOD_CONF /* Configuration file. */
-#define _PATH_HESIOD_CONF "/etc/hesiod.conf"
-#endif
-
-#define DEF_RHS "" /* Defaults if HESIOD_CONF */
-#define DEF_LHS "" /* file is not present. */
-
- /* Error codes (for backwards compatibility) */
-
-#define HES_ER_UNINIT -1 /* uninitialized */
-#define HES_ER_OK 0 /* no error */
-#define HES_ER_NOTFOUND 1 /* Hesiod name not found by server */
-#define HES_ER_CONFIG 2 /* local problem (no config file?) */
-#define HES_ER_NET 3 /* network problem */
-
- /* Declaration of routines */
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int hesiod_init(void **);
-char **hesiod_resolve(void *, const char *, const char *);
-void hesiod_free_list(void *, char **);
-char *hesiod_to_bind(void *, const char *, const char *);
-void hesiod_end(void *);
-
- /* backwards compatibility */
-int hes_init(void);
-char *hes_to_bind(const char *, const char *);
-char **hes_resolve(const char *, const char *);
-int hes_error(void);
-void hes_free(char **);
-__END_DECLS
-
-#endif /* ! _HESIOD_H_ */
diff --git a/newlib/libc/sys/linux/include/iconv.h b/newlib/libc/sys/linux/include/iconv.h
deleted file mode 100644
index 5a795dc5d..000000000
--- a/newlib/libc/sys/linux/include/iconv.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _ICONV_H
-#define _ICONV_H 1
-
-#include <features.h>
-#define __need_size_t
-#include <stddef.h>
-
-
-__BEGIN_DECLS
-
-/* Identifier for conversion method from one codeset to another. */
-typedef void *iconv_t;
-
-
-/* Allocate descriptor for code conversion from codeset FROMCODE to
- codeset TOCODE. */
-extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode)
- __THROW;
-
-/* Convert at most *INBYTESLEFT bytes from *INBUF according to the
- code conversion algorithm specified by CD and place up to
- *OUTBYTESLEFT bytes in buffer at *OUTBUF. */
-extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
- size_t *__restrict __inbytesleft,
- char **__restrict __outbuf,
- size_t *__restrict __outbytesleft);
-
-/* Free resources allocated for descriptor CD for code conversion. */
-extern int iconv_close (iconv_t __cd) __THROW;
-
-__END_DECLS
-
-#endif /* iconv.h */
diff --git a/newlib/libc/sys/linux/include/ifaddrs.h b/newlib/libc/sys/linux/include/ifaddrs.h
deleted file mode 100644
index aad6c6839..000000000
--- a/newlib/libc/sys/linux/include/ifaddrs.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* $FreeBSD: src/include/ifaddrs.h,v 1.2 2002/03/23 17:24:53 imp Exp $ */
-
-/*
- * Copyright (c) 1995, 1999
- * Berkeley Software Design, 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.
- *
- * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``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 Berkeley Software Design, Inc. 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.
- *
- * BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
- */
-
-#ifndef _IFADDRS_H_
-#define _IFADDRS_H_
-
-struct ifaddrs {
- struct ifaddrs *ifa_next;
- char *ifa_name;
- u_int ifa_flags;
- struct sockaddr *ifa_addr;
- struct sockaddr *ifa_netmask;
- struct sockaddr *ifa_dstaddr;
- void *ifa_data;
-};
-
-/*
- * This may have been defined in <net/if.h>. Note that if <net/if.h> is
- * to be included it must be included before this header file.
- */
-#ifndef ifa_broadaddr
-#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
-#endif
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-extern int getifaddrs(struct ifaddrs **);
-extern void freeifaddrs(struct ifaddrs *);
-__END_DECLS
-
-#endif
diff --git a/newlib/libc/sys/linux/include/libc_private.h b/newlib/libc/sys/linux/include/libc_private.h
deleted file mode 100644
index af7df8c8b..000000000
--- a/newlib/libc/sys/linux/include/libc_private.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL 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.
- *
- * $FreeBSD: src/lib/libc/include/libc_private.h,v 1.5 2002/03/29 22:43:42 markm Exp $
- *
- * Private definitions for libc, libc_r and libpthread.
- *
- */
-
-#ifndef _LIBC_PRIVATE_H_
-#define _LIBC_PRIVATE_H_
-
-/*
- * This global flag is non-zero when a process has created one
- * or more threads. It is used to avoid calling locking functions
- * when they are not required.
- */
-extern int __isthreaded;
-
-/*
- * File lock contention is difficult to diagnose without knowing
- * where locks were set. Allow a debug library to be built which
- * records the source file and line number of each lock call.
- */
-#ifdef _FLOCK_DEBUG
-#define _FLOCKFILE(x) _flockfile_debug(x, __FILE__, __LINE__)
-#else
-#define _FLOCKFILE(x) _flockfile(x)
-#endif
-
-/*
- * Macros for locking and unlocking FILEs. These test if the
- * process is threaded to avoid locking when not required.
- */
-#define FLOCKFILE(fp) if (__isthreaded) _FLOCKFILE(fp)
-#define FUNLOCKFILE(fp) if (__isthreaded) _funlockfile(fp)
-
-/*
- * This is a pointer in the C run-time startup code. It is used
- * by getprogname() and setprogname().
- */
-extern const char *__progname;
-
-#endif /* _LIBC_PRIVATE_H_ */
diff --git a/newlib/libc/sys/linux/include/limits.h b/newlib/libc/sys/linux/include/limits.h
deleted file mode 100644
index 45cd6f253..000000000
--- a/newlib/libc/sys/linux/include/limits.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/* Copyright (C) 1991, 92, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/*
- * ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h>
- */
-
-#ifndef _LIBC_LIMITS_H_
-#define _LIBC_LIMITS_H_ 1
-
-#include <features.h>
-
-
-/* Maximum length of any multibyte character in any locale.
- We define this value here since the gcc header does not define
- the correct value. */
-#define MB_LEN_MAX 16
-
-
-/* If we are not using GNU CC we have to define all the symbols ourself.
- Otherwise use gcc's definitions (see below). */
-#if !defined __GNUC__ || __GNUC__ < 2
-
-/* We only protect from multiple inclusion here, because all the other
- #include's protect themselves, and in GCC 2 we may #include_next through
- multiple copies of this file before we get to GCC's. */
-# ifndef _LIMITS_H
-# define _LIMITS_H 1
-
-#include <bits/wordsize.h>
-
-/* We don't have #include_next.
- Define ANSI <limits.h> for standard 32-bit words. */
-
-/* These assume 8-bit `char's, 16-bit `short int's,
- and 32-bit `int's and `long int's. */
-
-/* Number of bits in a `char'. */
-# define CHAR_BIT 8
-
-/* Minimum and maximum values a `signed char' can hold. */
-# define SCHAR_MIN (-128)
-# define SCHAR_MAX 127
-
-/* Maximum value an `unsigned char' can hold. (Minimum is 0.) */
-# define UCHAR_MAX 255
-
-/* Minimum and maximum values a `char' can hold. */
-# ifdef __CHAR_UNSIGNED__
-# define CHAR_MIN 0
-# define CHAR_MAX UCHAR_MAX
-# else
-# define CHAR_MIN SCHAR_MIN
-# define CHAR_MAX SCHAR_MAX
-# endif
-
-/* Minimum and maximum values a `signed short int' can hold. */
-# define SHRT_MIN (-32768)
-# define SHRT_MAX 32767
-
-/* Maximum value an `unsigned short int' can hold. (Minimum is 0.) */
-# define USHRT_MAX 65535
-
-/* Minimum and maximum values a `signed int' can hold. */
-# define INT_MIN (-INT_MAX - 1)
-# define INT_MAX 2147483647
-
-/* Maximum value an `unsigned int' can hold. (Minimum is 0.) */
-# define UINT_MAX 4294967295U
-
-/* Minimum and maximum values a `signed long int' can hold. */
-# if __WORDSIZE == 64
-# define LONG_MAX 9223372036854775807L
-# else
-# define LONG_MAX 2147483647L
-# endif
-# define LONG_MIN (-LONG_MAX - 1L)
-
-/* Maximum value an `unsigned long int' can hold. (Minimum is 0.) */
-# if __WORDSIZE == 64
-# define ULONG_MAX 18446744073709551615UL
-# else
-# define ULONG_MAX 4294967295UL
-# endif
-
-# ifdef __USE_ISOC99
-
-/* Minimum and maximum values a `signed long long int' can hold. */
-# define LLONG_MAX 9223372036854775807LL
-# define LLONG_MIN (-LLONG_MAX - 1LL)
-
-/* Maximum value an `unsigned long long int' can hold. (Minimum is 0.) */
-# define ULLONG_MAX 18446744073709551615ULL
-
-# endif /* ISO C99 */
-
-# endif /* limits.h */
-#endif /* GCC 2. */
-
-#endif /* !_LIBC_LIMITS_H_ */
-
- /* Get the compiler's limits.h, which defines almost all the ISO constants.
-
- We put this #include_next outside the double inclusion check because
- it should be possible to include this file more than once and still get
- the definitions from gcc's header. */
-#if defined __GNUC__ && !defined _GCC_LIMITS_H_
-/* `_GCC_LIMITS_H_' is what GCC's file defines. */
-# include_next <limits.h>
-
-/* The <limits.h> files in some gcc versions don't define LLONG_MIN,
- LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for
- ages are available. */
-# ifdef __USE_ISOC99
-# ifndef LLONG_MIN
-# define LLONG_MIN LONG_LONG_MIN
-# endif
-# ifndef LLONG_MAX
-# define LLONG_MAX LONG_LONG_MAX
-# endif
-# ifndef ULLONG_MAX
-# define ULLONG_MAX ULONG_LONG_MAX
-# endif
-# endif
-#endif
-
-#ifdef __USE_POSIX
-/* POSIX adds things to <limits.h>. */
-# include <bits/posix1_lim.h>
-#endif
-
-#ifdef __USE_POSIX2
-# include <bits/posix2_lim.h>
-#endif
-
-#ifdef __USE_XOPEN
-# include <bits/xopen_lim.h>
-#endif
diff --git a/newlib/libc/sys/linux/include/link.h b/newlib/libc/sys/linux/include/link.h
deleted file mode 100644
index 424fb2952..000000000
--- a/newlib/libc/sys/linux/include/link.h
+++ /dev/null
@@ -1,269 +0,0 @@
-/* Data structure for communication from the run-time dynamic linker for
- loaded ELF shared objects.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _LINK_H
-#define _LINK_H 1
-
-#include <features.h>
-#include <elf.h>
-#include <dlfcn.h>
-#include <sys/types.h>
-
-#define DT_THISPROCNUM 0
-/* We use this macro to refer to ELF types independent of the native wordsize.
- `ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */
-#define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type)
-#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t)
-#define _ElfW_1(e,w,t) e##w##t
-
-#include <sys/elfclass.h> /* Defines __ELF_NATIVE_CLASS. */
-#include <sys/link.h>
-#include <dl-lookupcfg.h>
-
-/* Rendezvous structure used by the run-time dynamic linker to communicate
- details of shared object loading to the debugger. If the executable's
- dynamic section has a DT_DEBUG element, the run-time linker sets that
- element's value to the address where this structure can be found. */
-
-struct r_debug
- {
- int r_version; /* Version number for this protocol. */
-
- struct link_map *r_map; /* Head of the chain of loaded objects. */
-
- /* This is the address of a function internal to the run-time linker,
- that will always be called when the linker begins to map in a
- library or unmap it, and again when the mapping change is complete.
- The debugger can set a breakpoint at this address if it wants to
- notice shared object mapping changes. */
- ElfW(Addr) r_brk;
- enum
- {
- /* This state value describes the mapping change taking place when
- the `r_brk' address is called. */
- RT_CONSISTENT, /* Mapping change is complete. */
- RT_ADD, /* Beginning to add a new object. */
- RT_DELETE /* Beginning to remove an object mapping. */
- } r_state;
-
- ElfW(Addr) r_ldbase; /* Base address the linker is loaded at. */
- };
-
-/* This is the instance of that structure used by the dynamic linker. */
-extern struct r_debug _r_debug;
-
-/* This symbol refers to the "dynamic structure" in the `.dynamic' section
- of whatever module refers to `_DYNAMIC'. So, to find its own
- `struct r_debug', a program could do:
- for (dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn)
- if (dyn->d_tag == DT_DEBUG)
- r_debug = (struct r_debug *) dyn->d_un.d_ptr;
- */
-extern ElfW(Dyn) _DYNAMIC[];
-
-
-/* Some internal data structures of the dynamic linker used in the
- linker map. We only provide forward declarations. */
-struct libname_list;
-struct r_found_version;
-struct r_search_path_elem;
-
-/* Forward declaration. */
-struct link_map;
-
-/* Structure to describe a single list of scope elements. The lookup
- functions get passed an array of pointers to such structures. */
-struct r_scope_elem
-{
- /* Array of maps for the scope. */
- struct link_map **r_list;
- /* Number of entries in the scope. */
- unsigned int r_nlist;
-};
-
-
-/* Structure to record search path and allocation mechanism. */
-struct r_search_path_struct
- {
- struct r_search_path_elem **dirs;
- int malloced;
- };
-
-
-/* Structure describing a loaded shared object. The `l_next' and `l_prev'
- members form a chain of all the shared objects loaded at startup.
-
- These data structures exist in space used by the run-time dynamic linker;
- modifying them may have disastrous results.
-
- This data structure might change in future, if necessary. User-level
- programs must avoid defining objects of this type. */
-
-struct link_map
- {
- /* These first few members are part of the protocol with the debugger.
- This is the same format used in SVR4. */
-
- ElfW(Addr) l_addr; /* Base address shared object is loaded at. */
- char *l_name; /* Absolute file name object was found in. */
- ElfW(Dyn) *l_ld; /* Dynamic section of the shared object. */
- struct link_map *l_next, *l_prev; /* Chain of loaded objects. */
-
- /* All following members are internal to the dynamic linker.
- They may change without notice. */
-
- struct libname_list *l_libname;
- /* Indexed pointers to dynamic section.
- [0,DT_NUM) are indexed by the processor-independent tags.
- [DT_NUM,DT_NUM+DT_THISPROCNUM) are indexed by the tag minus DT_LOPROC.
- [DT_NUM+DT_THISPROCNUM,DT_NUM+DT_THISPROCNUM+DT_EXTRANUM) are indexed
- by DT_EXTRATAGIDX(tagvalue) and
- [DT_NUM+DT_THISPROCNUM+DT_VERSIONTAGNUM,
- DT_NUM+DT_THISPROCNUM+DT_VERSIONTAGNUM+DT_EXTRANUM)
- are indexed by DT_EXTRATAGIDX(tagvalue) (see <elf.h>). */
-
- ElfW(Dyn) *l_info[DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM
- + DT_EXTRANUM];
- const ElfW(Phdr) *l_phdr; /* Pointer to program header table in core. */
- ElfW(Addr) l_entry; /* Entry point location. */
- ElfW(Half) l_phnum; /* Number of program header entries. */
- ElfW(Half) l_ldnum; /* Number of dynamic segment entries. */
-
- /* Array of DT_NEEDED dependencies and their dependencies, in
- dependency order for symbol lookup (with and without
- duplicates). There is no entry before the dependencies have
- been loaded. */
- struct r_scope_elem l_searchlist;
-
- /* We need a special searchlist to process objects marked with
- DT_SYMBOLIC. */
- struct r_scope_elem l_symbolic_searchlist;
-
- /* Dependent object that first caused this object to be loaded. */
- struct link_map *l_loader;
-
- /* Symbol hash table. */
- Elf_Symndx l_nbuckets;
- const Elf_Symndx *l_buckets, *l_chain;
-
- unsigned int l_opencount; /* Reference count for dlopen/dlclose. */
- enum /* Where this object came from. */
- {
- lt_executable, /* The main executable program. */
- lt_library, /* Library needed by main executable. */
- lt_loaded /* Extra run-time loaded shared object. */
- } l_type:2;
- unsigned int l_relocated:1; /* Nonzero if object's relocations done. */
- unsigned int l_init_called:1; /* Nonzero if DT_INIT function called. */
- unsigned int l_global:1; /* Nonzero if object in _dl_global_scope. */
- unsigned int l_reserved:2; /* Reserved for internal use. */
- unsigned int l_phdr_allocated:1; /* Nonzero if the data structure pointed
- to by `l_phdr' is allocated. */
- unsigned int l_soname_added:1; /* Nonzero if the SONAME is for sure in
- the l_libname list. */
- unsigned int l_faked:1; /* Nonzero if this is a faked descriptor
- without associated file. */
-
- /* Array with version names. */
- unsigned int l_nversions;
- struct r_found_version *l_versions;
-
- /* Collected information about own RPATH directories. */
- struct r_search_path_struct l_rpath_dirs;
-
- /* Collected results of relocation while profiling. */
- ElfW(Addr) *l_reloc_result;
-
- /* Pointer to the version information if available. */
- ElfW(Versym) *l_versyms;
-
- /* String specifying the path where this object was found. */
- const char *l_origin;
-
- /* Start and finish of memory map for this object. l_map_start
- need not be the same as l_addr. */
- ElfW(Addr) l_map_start, l_map_end;
-
- /* Default array for 'l_scope'. */
- struct r_scope_elem *l_scope_mem[4];
- /* Size of array allocated for 'l_scope'. */
- size_t l_scope_max;
- /* This is an array defining the lookup scope for this link map.
- There are at most three different scope lists. */
- struct r_scope_elem **l_scope;
-
- /* A similar array, this time only with the local scope. This is
- used occasionally. */
- struct r_scope_elem *l_local_scope[2];
-
- /* This information is kept to check for sure whether a shared
- object is the same as one already loaded. */
- dev_t l_dev;
- ino64_t l_ino;
-
- /* Collected information about own RUNPATH directories. */
- struct r_search_path_struct l_runpath_dirs;
-
- /* List of object in order of the init and fini calls. */
- struct link_map **l_initfini;
-
- /* List of the dependencies introduced through symbol binding. */
- unsigned int l_reldepsmax;
- unsigned int l_reldepsact;
- struct link_map **l_reldeps;
-
- /* Various flag words. */
- ElfW(Word) l_feature_1;
- ElfW(Word) l_flags_1;
-
- /* Temporarily used in `dl_close'. */
- unsigned int l_idx;
-
- struct link_map_machine l_mach;
-
- struct
- {
- const ElfW(Sym) *sym;
- int type_class;
-#ifdef DL_LOOKUP_RETURNS_MAP
- struct link_map *value;
-#else
- ElfW(Addr) value;
-#endif
- const ElfW(Sym) *ret;
- } l_lookup_cache;
- };
-
-struct dl_phdr_info
- {
- ElfW(Addr) dlpi_addr;
- const char *dlpi_name;
- const ElfW(Phdr) *dlpi_phdr;
- ElfW(Half) dlpi_phnum;
- };
-
-extern int dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
- size_t size, void *data),
- void *data);
-extern int __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
- size_t size, void *data),
- void *data);
-
-#endif /* link.h */
diff --git a/newlib/libc/sys/linux/include/ltdl.h b/newlib/libc/sys/linux/include/ltdl.h
deleted file mode 100644
index 2bbfa302c..000000000
--- a/newlib/libc/sys/linux/include/ltdl.h
+++ /dev/null
@@ -1,361 +0,0 @@
-/* ltdl.h -- generic dlopen functions
- Copyright (C) 1998-2000 Free Software Foundation, Inc.
- Originally by Thomas Tanner <tanner@ffii.org>
- This file is part of GNU Libtool.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU libtool, you may include it under the same
-distribution terms that you use for the rest of that program.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free
-Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA
-*/
-
-/* Only include this header file once. */
-#ifndef LTDL_H
-#define LTDL_H 1
-
-#include <sys/types.h> /* for size_t declaration */
-
-
-/* --- MACROS FOR PORTABILITY --- */
-
-
-/* Saves on those hard to debug '\0' typos.... */
-#define LT_EOS_CHAR '\0'
-
-/* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations,
- so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at
- the end of C declarations. */
-#ifdef __cplusplus
-# define LT_BEGIN_C_DECLS extern "C" {
-# define LT_END_C_DECLS }
-#else
-# define LT_BEGIN_C_DECLS /* empty */
-# define LT_END_C_DECLS /* empty */
-#endif
-
-LT_BEGIN_C_DECLS
-
-
-/* LT_PARAMS is a macro used to wrap function prototypes, so that compilers
- that don't understand ANSI C prototypes still work, and ANSI C
- compilers can issue warnings about type mismatches. */
-#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
-# define LT_PARAMS(protos) protos
-# define lt_ptr void*
-#else
-# define LT_PARAMS(protos) ()
-# define lt_ptr char*
-#endif
-
-/* LT_STMT_START/END are used to create macros which expand to a
- a single compound statement in a portable way. */
-#if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus)
-# define LT_STMT_START (void)(
-# define LT_STMT_END )
-#else
-# if (defined (sun) || defined (__sun__))
-# define LT_STMT_START if (1)
-# define LT_STMT_END else (void)0
-# else
-# define LT_STMT_START do
-# define LT_STMT_END while (0)
-# endif
-#endif
-
-/* LT_CONC creates a new concatenated symbol for the compiler
- in a portable way. */
-#if defined(__STDC__) || defined(__cplusplus)
-# define LT_CONC(s,t) s##t
-#else
-# define LT_CONC(s,t) s/**/t
-#endif
-
-/* LT_STRLEN can be used safely on NULL pointers. */
-#define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0)
-
-
-
-/* --- WINDOWS SUPPORT --- */
-
-
-/* Canonicalise Windows and Cygwin recognition macros. */
-#ifdef __CYGWIN32__
-# ifndef __CYGWIN__
-# define __CYGWIN__ __CYGWIN32__
-# endif
-#endif
-#if defined(_WIN32) || defined(WIN32)
-# ifndef __WINDOWS__
-# ifdef _WIN32
-# define __WINDOWS__ _WIN32
-# else
-# ifdef WIN32
-# define __WINDOWS__ WIN32
-# endif
-# endif
-# endif
-#endif
-
-#ifdef __WINDOWS__
-# ifndef __CYGWIN__
-/* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
- separator when it is set. */
-# define LT_DIRSEP_CHAR '\\'
-# define LT_PATHSEP_CHAR ';'
-# endif
-#endif
-#ifndef LT_PATHSEP_CHAR
-# define LT_PATHSEP_CHAR ':'
-#endif
-
-/* DLL building support on win32 hosts; mostly to workaround their
- ridiculous implementation of data symbol exporting. */
-#ifndef LT_SCOPE
-# ifdef __WINDOWS__
-# ifdef DLL_EXPORT /* defined by libtool (if required) */
-# define LT_SCOPE __declspec(dllexport)
-# endif
-# ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */
-# define LT_SCOPE extern __declspec(dllimport)
-# endif
-# endif
-# ifndef LT_SCOPE /* static linking or !__WINDOWS__ */
-# define LT_SCOPE extern
-# endif
-#endif
-
-
-
-
-/* --- DYNAMIC MODULE LOADING API --- */
-
-
-typedef struct lt_dlhandle_struct *lt_dlhandle; /* A loaded module. */
-
-/* Initialisation and finalisation functions for libltdl. */
-extern int lt_dlinit LT_PARAMS((void));
-extern int lt_dlexit LT_PARAMS((void));
-
-/* Module search path manipulation. */
-extern int lt_dladdsearchdir LT_PARAMS((const char *search_dir));
-extern int lt_dlinsertsearchdir LT_PARAMS((const char *before,
- const char *search_dir));
-extern int lt_dlsetsearchpath LT_PARAMS((const char *search_path));
-extern const char *lt_dlgetsearchpath LT_PARAMS((void));
-extern int lt_dlforeachfile LT_PARAMS((
- const char *search_path,
- int (*func) (const char *filename, lt_ptr data),
- lt_ptr data));
-
-/* Portable libltdl versions of the system dlopen() API. */
-extern lt_dlhandle lt_dlopen LT_PARAMS((const char *filename));
-extern lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename));
-extern lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle,
- const char *name));
-extern const char *lt_dlerror LT_PARAMS((void));
-extern int lt_dlclose LT_PARAMS((lt_dlhandle handle));
-
-/* Module residency management. */
-extern int lt_dlmakeresident LT_PARAMS((lt_dlhandle handle));
-extern int lt_dlisresident LT_PARAMS((lt_dlhandle handle));
-
-
-
-
-/* --- MUTEX LOCKING --- */
-
-
-typedef void lt_dlmutex_lock LT_PARAMS((void));
-typedef void lt_dlmutex_unlock LT_PARAMS((void));
-typedef void lt_dlmutex_seterror LT_PARAMS((const char *errmsg));
-typedef const char *lt_dlmutex_geterror LT_PARAMS((void));
-
-extern int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock,
- lt_dlmutex_unlock *unlock,
- lt_dlmutex_seterror *seterror,
- lt_dlmutex_geterror *geterror));
-
-
-
-
-/* --- MEMORY HANDLING --- */
-
-
-/* By default, the realloc function pointer is set to our internal
- realloc implementation which iself uses lt_dlmalloc and lt_dlfree.
- libltdl relies on a featureful realloc, but if you are sure yours
- has the right semantics then you can assign it directly. Generally,
- it is safe to assign just a malloc() and a free() function. */
-LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size));
-LT_SCOPE lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size));
-LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr));
-
-
-
-
-/* --- PRELOADED MODULE SUPPORT --- */
-
-
-/* A preopened symbol. Arrays of this type comprise the exported
- symbols for a dlpreopened module. */
-typedef struct {
- const char *name;
- lt_ptr address;
-} lt_dlsymlist;
-
-extern int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded));
-extern int lt_dlpreload_default
- LT_PARAMS((const lt_dlsymlist *preloaded));
-
-#define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \
- extern const lt_dlsymlist lt_preloaded_symbols[]; \
- lt_dlpreload_default(lt_preloaded_symbols); \
- }LT_STMT_END
-
-
-
-
-/* --- MODULE INFORMATION --- */
-
-
-/* Read only information pertaining to a loaded module. */
-typedef struct {
- char *filename; /* file name */
- char *name; /* module name */
- int ref_count; /* number of times lt_dlopened minus
- number of times lt_dlclosed. */
-} lt_dlinfo;
-
-extern const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle));
-extern lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place));
-extern int lt_dlforeach LT_PARAMS((
- int (*func) (lt_dlhandle handle, lt_ptr data),
- lt_ptr data));
-
-/* Associating user data with loaded modules. */
-typedef unsigned lt_dlcaller_id;
-
-extern lt_dlcaller_id lt_dlcaller_register LT_PARAMS((void));
-extern lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key,
- lt_dlhandle handle,
- lt_ptr data));
-extern lt_ptr lt_dlcaller_get_data LT_PARAMS((lt_dlcaller_id key,
- lt_dlhandle handle));
-
-
-
-/* --- USER MODULE LOADER API --- */
-
-
-typedef struct lt_dlloader lt_dlloader;
-typedef lt_ptr lt_user_data;
-typedef lt_ptr lt_module;
-
-/* Function pointer types for creating user defined module loaders. */
-typedef lt_module lt_module_open LT_PARAMS((lt_user_data loader_data,
- const char *filename));
-typedef int lt_module_close LT_PARAMS((lt_user_data loader_data,
- lt_module handle));
-typedef lt_ptr lt_find_sym LT_PARAMS((lt_user_data loader_data,
- lt_module handle,
- const char *symbol));
-typedef int lt_dlloader_exit LT_PARAMS((lt_user_data loader_data));
-
-struct lt_user_dlloader {
- const char *sym_prefix;
- lt_module_open *module_open;
- lt_module_close *module_close;
- lt_find_sym *find_sym;
- lt_dlloader_exit *dlloader_exit;
- lt_user_data dlloader_data;
-};
-
-extern lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place));
-extern lt_dlloader *lt_dlloader_find LT_PARAMS((
- const char *loader_name));
-extern const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place));
-extern lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place));
-extern int lt_dlloader_add LT_PARAMS((lt_dlloader *place,
- const struct lt_user_dlloader *dlloader,
- const char *loader_name));
-extern int lt_dlloader_remove LT_PARAMS((
- const char *loader_name));
-
-
-
-/* --- ERROR MESSAGE HANDLING --- */
-
-
-/* Defining error strings alongside their symbolic names in a macro in
- this way allows us to expand the macro in different contexts with
- confidence that the enumeration of symbolic names will map correctly
- onto the table of error strings. */
-#define lt_dlerror_table \
- LT_ERROR(UNKNOWN, "unknown error") \
- LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available") \
- LT_ERROR(INVALID_LOADER, "invalid loader") \
- LT_ERROR(INIT_LOADER, "loader initialization failed") \
- LT_ERROR(REMOVE_LOADER, "loader removal failed") \
- LT_ERROR(FILE_NOT_FOUND, "file not found") \
- LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found") \
- LT_ERROR(NO_SYMBOLS, "no symbols defined") \
- LT_ERROR(CANNOT_OPEN, "can't open the module") \
- LT_ERROR(CANNOT_CLOSE, "can't close the module") \
- LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found") \
- LT_ERROR(NO_MEMORY, "not enough memory") \
- LT_ERROR(INVALID_HANDLE, "invalid module handle") \
- LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow") \
- LT_ERROR(INVALID_ERRORCODE, "invalid errorcode") \
- LT_ERROR(SHUTDOWN, "library already shutdown") \
- LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module") \
- LT_ERROR(INVALID_MUTEX_ARGS, "invalid mutex handler registration") \
- LT_ERROR(INVALID_POSITION, "invalid search path insert position")
-
-/* Enumerate the symbolic error names. */
-enum {
-#define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name),
- lt_dlerror_table
-#undef LT_ERROR
-
- LT_ERROR_MAX
-};
-
-/* These functions are only useful from inside custom module loaders. */
-extern int lt_dladderror LT_PARAMS((const char *diagnostic));
-extern int lt_dlseterror LT_PARAMS((int errorcode));
-
-
-
-
-/* --- SOURCE COMPATIBILITY WITH OLD LIBLTDL --- */
-
-
-#ifdef LT_NON_POSIX_NAMESPACE
-# define lt_ptr_t lt_ptr
-# define lt_module_t lt_module
-# define lt_module_open_t lt_module_open
-# define lt_module_close_t lt_module_close
-# define lt_find_sym_t lt_find_sym
-# define lt_dlloader_exit_t lt_dlloader_exit
-# define lt_dlloader_t lt_dlloader
-# define lt_dlloader_data_t lt_user_data
-#endif
-
-LT_END_C_DECLS
-
-#endif /* !LTDL_H */
diff --git a/newlib/libc/sys/linux/include/malloc.h b/newlib/libc/sys/linux/include/malloc.h
deleted file mode 100644
index 7a7bcdbde..000000000
--- a/newlib/libc/sys/linux/include/malloc.h
+++ /dev/null
@@ -1,266 +0,0 @@
-/* Prototypes and definition for malloc implementation.
- Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _MALLOC_H
-#define _MALLOC_H 1
-
-#include <features.h>
-
-/*
- `ptmalloc', a malloc implementation for multiple threads without
- lock contention, by Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>.
- See the files `ptmalloc.c' or `COPYRIGHT' for copying conditions.
-
- VERSION 2.6.4-pt Wed Dec 4 00:35:54 MET 1996
-
- This work is mainly derived from malloc-2.6.4 by Doug Lea
- <dl@cs.oswego.edu>, which is available from:
-
- ftp://g.oswego.edu/pub/misc/malloc.c
-
- This trimmed-down header file only provides function prototypes and
- the exported data structures. For more detailed function
- descriptions and compile-time options, see the source file
- `ptmalloc.c'.
-*/
-
-#if defined(__STDC__) || defined (__cplusplus)
-# include <stddef.h>
-# define __malloc_ptr_t void *
-#else
-# undef size_t
-# define size_t unsigned int
-# undef ptrdiff_t
-# define ptrdiff_t int
-# define __malloc_ptr_t char *
-#endif
-
-#ifdef _LIBC
-/* Used by GNU libc internals. */
-# define __malloc_size_t size_t
-# define __malloc_ptrdiff_t ptrdiff_t
-#elif !defined __attribute_malloc__
-# define __attribute_malloc__
-#endif
-
-#ifdef __GNUC__
-
-/* GCC can always grok prototypes. For C++ programs we add throw()
- to help it optimize the function calls. But this works only with
- gcc 2.8.x and egcs. */
-# if defined __cplusplus && (__GNUC__ >= 3 || __GNUC_MINOR__ >= 8)
-# define __THROW throw ()
-# else
-# define __THROW
-# endif
-# define __MALLOC_P(args) args __THROW
-/* This macro will be used for functions which might take C++ callback
- functions. */
-# define __MALLOC_PMT(args) args
-
-#else /* Not GCC. */
-
-# define __THROW
-
-# if (defined __STDC__ && __STDC__) || defined __cplusplus
-
-# define __MALLOC_P(args) args
-# define __MALLOC_PMT(args) args
-
-# else /* Not ANSI C or C++. */
-
-# define __MALLOC_P(args) () /* No prototypes. */
-# define __MALLOC_PMT(args) ()
-
-# endif /* ANSI C or C++. */
-
-#endif /* GCC. */
-
-#ifndef NULL
-# ifdef __cplusplus
-# define NULL 0
-# else
-# define NULL ((__malloc_ptr_t) 0)
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct _reent;
-
-/* Nonzero if the malloc is already initialized. */
-#ifdef _LIBC
-/* In the GNU libc we rename the global variable
- `__malloc_initialized' to `__libc_malloc_initialized'. */
-# define __malloc_initialized __libc_malloc_initialized
-#endif
-extern int __malloc_initialized;
-
-/* Initialize global configuration. Not needed with GNU libc. */
-#ifndef __GLIBC__
-extern void ptmalloc_init __MALLOC_P ((void));
-#endif
-
-/* Allocate SIZE bytes of memory. */
-extern __malloc_ptr_t malloc __MALLOC_P ((size_t __size)) __attribute_malloc__;
-extern __malloc_ptr_t _malloc_r __MALLOC_P ((struct _reent * __r, size_t __size)) __attribute_malloc__;
-
-/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
-extern __malloc_ptr_t calloc __MALLOC_P ((size_t __nmemb, size_t __size))
- __attribute_malloc__;
-extern __malloc_ptr_t _calloc_r __MALLOC_P ((struct _reent * __r,
- size_t __nmemb, size_t __size))
- __attribute_malloc__;
-
-/* Re-allocate the previously allocated block in __ptr, making the new
- block SIZE bytes long. */
-extern __malloc_ptr_t realloc __MALLOC_P ((__malloc_ptr_t __ptr,
- size_t __size))
- __attribute_malloc__;
-extern __malloc_ptr_t _realloc_r __MALLOC_P ((struct _reent * __r,
- __malloc_ptr_t __ptr,
- size_t __size))
- __attribute_malloc__;
-
-/* Free a block allocated by `malloc', `realloc' or `calloc'. */
-extern void free __MALLOC_P ((__malloc_ptr_t __ptr));
-extern void _free_r __MALLOC_P ((struct _reent * __r, __malloc_ptr_t __ptr));
-
-/* Free a block allocated by `calloc'. */
-extern void cfree __MALLOC_P ((__malloc_ptr_t __ptr));
-
-/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
-extern __malloc_ptr_t memalign __MALLOC_P ((size_t __alignment, size_t __size));
-extern __malloc_ptr_t _memalign_r __MALLOC_P ((struct _reent *__r,
- size_t __alignment,
- size_t __size));
-
-/* Allocate SIZE bytes on a page boundary. */
-extern __malloc_ptr_t valloc __MALLOC_P ((size_t __size)) __attribute_malloc__;
-extern __malloc_ptr_t _valloc_r __MALLOC_P ((struct _reent *__r,
- size_t __size))
- __attribute_malloc__;
-
-/* Equivalent to valloc(minimum-page-that-holds(n)), that is, round up
- __size to nearest pagesize. */
-extern __malloc_ptr_t pvalloc __MALLOC_P ((size_t __size))
- __attribute_malloc__;
-extern __malloc_ptr_t _pvalloc_r __MALLOC_P ((struct _reent *__r,
- size_t __size))
- __attribute_malloc__;
-
-/* Underlying allocation function; successive calls should return
- contiguous pieces of memory. */
-extern __malloc_ptr_t (*__morecore) __MALLOC_PMT ((ptrdiff_t __size));
-
-/* Default value of `__morecore'. */
-extern __malloc_ptr_t __default_morecore __MALLOC_P ((ptrdiff_t __size))
- __attribute_malloc__;
-
-/* SVID2/XPG mallinfo structure */
-struct mallinfo {
- int arena; /* total space allocated from system */
- int ordblks; /* number of non-inuse chunks */
- int smblks; /* unused -- always zero */
- int hblks; /* number of mmapped regions */
- int hblkhd; /* total space in mmapped regions */
- int usmblks; /* unused -- always zero */
- int fsmblks; /* unused -- always zero */
- int uordblks; /* total allocated space */
- int fordblks; /* total non-inuse space */
- int keepcost; /* top-most, releasable (via malloc_trim) space */
-};
-
-/* Returns a copy of the updated current mallinfo. */
-extern struct mallinfo mallinfo __MALLOC_P ((void));
-extern struct mallinfo _mallinfo_r __MALLOC_P ((struct _reent *__r));
-
-/* SVID2/XPG mallopt options */
-#ifndef M_MXFAST
-# define M_MXFAST 1 /* UNUSED in this malloc */
-#endif
-#ifndef M_NLBLKS
-# define M_NLBLKS 2 /* UNUSED in this malloc */
-#endif
-#ifndef M_GRAIN
-# define M_GRAIN 3 /* UNUSED in this malloc */
-#endif
-#ifndef M_KEEP
-# define M_KEEP 4 /* UNUSED in this malloc */
-#endif
-
-/* mallopt options that actually do something */
-#define M_TRIM_THRESHOLD -1
-#define M_TOP_PAD -2
-#define M_MMAP_THRESHOLD -3
-#define M_MMAP_MAX -4
-#define M_CHECK_ACTION -5
-
-/* General SVID/XPG interface to tunable parameters. */
-extern int mallopt __MALLOC_P ((int __param, int __val));
-extern int _mallopt_r __MALLOC_P ((struct _reent *__r, int __param, int __val));
-
-/* Release all but __pad bytes of freed top-most memory back to the
- system. Return 1 if successful, else 0. */
-extern int malloc_trim __MALLOC_P ((size_t __pad));
-
-/* Report the number of usable allocated bytes associated with allocated
- chunk __ptr. */
-extern size_t malloc_usable_size __MALLOC_P ((__malloc_ptr_t __ptr));
-
-/* Prints brief summary statistics on stderr. */
-extern void malloc_stats __MALLOC_P ((void));
-extern void _malloc_stats_r __MALLOC_P ((struct _reent *__r));
-
-/* Record the state of all malloc variables in an opaque data structure. */
-extern __malloc_ptr_t malloc_get_state __MALLOC_P ((void));
-
-/* Restore the state of all malloc variables from data obtained with
- malloc_get_state(). */
-extern int malloc_set_state __MALLOC_P ((__malloc_ptr_t __ptr));
-
-#if defined __GLIBC__ || defined MALLOC_HOOKS
-/* Called once when malloc is initialized; redefining this variable in
- the application provides the preferred way to set up the hook
- pointers. */
-extern void (*__malloc_initialize_hook) __MALLOC_PMT ((void));
-/* Hooks for debugging and user-defined versions. */
-extern void (*__free_hook) __MALLOC_PMT ((__malloc_ptr_t __ptr,
- __const __malloc_ptr_t));
-extern __malloc_ptr_t (*__malloc_hook) __MALLOC_PMT ((size_t __size,
- __const __malloc_ptr_t));
-extern __malloc_ptr_t (*__realloc_hook) __MALLOC_PMT ((__malloc_ptr_t __ptr,
- size_t __size,
- __const __malloc_ptr_t));
-extern __malloc_ptr_t (*__memalign_hook) __MALLOC_PMT ((size_t __alignment,
- size_t __size,
- __const __malloc_ptr_t));
-extern void (*__after_morecore_hook) __MALLOC_PMT ((void));
-
-/* Activate a standard set of debugging hooks. */
-extern void __malloc_check_init __MALLOC_P ((void));
-#endif
-
-#ifdef __cplusplus
-}; /* end of extern "C" */
-#endif
-
-#endif /* malloc.h */
diff --git a/newlib/libc/sys/linux/include/mcheck.h b/newlib/libc/sys/linux/include/mcheck.h
deleted file mode 100644
index 39e396d38..000000000
--- a/newlib/libc/sys/linux/include/mcheck.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Modified for newlib, July 9, 2002 by Jeff Johnston */
-
-#ifndef _MCHECK_H
-#define _MCHECK_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Return values for `mprobe': these are the kinds of inconsistencies that
- `mcheck' enables detection of. */
-enum mcheck_status
- {
- MCHECK_DISABLED = -1, /* Consistency checking is not turned on. */
- MCHECK_OK, /* Block is fine. */
- MCHECK_FREE, /* Block freed twice. */
- MCHECK_HEAD, /* Memory before the block was clobbered. */
- MCHECK_TAIL /* Memory after the block was clobbered. */
- };
-
-
-/* Activate a standard collection of debugging hooks. This must be called
- before `malloc' is ever called. ABORTFUNC is called with an error code
- (see enum above) when an inconsistency is detected. If ABORTFUNC is
- null, the standard function prints on stderr and then calls `abort'. */
-extern int mcheck (void (*__abortfunc) (enum mcheck_status));
-
-/* Similar to `mcheck´ but performs checks for all block whenever one of
- the memory handling functions is called. This can be very slow. */
-extern int mcheck_pedantic (void (*__abortfunc) (enum mcheck_status));
-
-/* Force check of all blocks now. */
-extern void mcheck_check_all (void);
-
-/* Check for aberrations in a particular malloc'd block. You must have
- called `mcheck' already. These are the same checks that `mcheck' does
- when you free or reallocate a block. */
-extern enum mcheck_status mprobe (void *__ptr);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* mcheck.h */
diff --git a/newlib/libc/sys/linux/include/mqueue.h b/newlib/libc/sys/linux/include/mqueue.h
deleted file mode 100644
index 734ccfe47..000000000
--- a/newlib/libc/sys/linux/include/mqueue.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* libc/sys/linux/include/mqueue.h - message queue functions */
-
-/* Copyright 2002, Red Hat Inc. - all rights reserved */
-
-#ifndef __MQUEUE_H
-#define __MQUEUE_H
-
-#include <sys/types.h>
-#define __need_sigevent_t 1
-#include <bits/siginfo.h>
-
-#include <sys/fcntl.h>
-
-/* message queue types */
-typedef int mqd_t;
-
-struct mq_attr {
- long mq_flags; /* message queue flags */
- long mq_maxmsg; /* maximum number of messages */
- long mq_msgsize; /* maximum message size */
- long mq_curmsgs; /* number of messages currently queued */
-};
-
-#define MQ_PRIO_MAX 16
-
-/* prototypes */
-mqd_t mq_open (const char *__name, int __oflag, ...);
-int mq_close (mqd_t __msgid);
-int mq_send (mqd_t __msgid, const char *__msg, size_t __msg_len, unsigned int __msg_prio);
-ssize_t mq_receive (mqd_t __msgid, char *__msg, size_t __msg_len, unsigned int *__msg_prio);
-int mq_notify (mqd_t __msgid, const struct sigevent *__notification);
-int mq_unlink (const char *__name);
-int mq_getattr (mqd_t __msgid, struct mq_attr *__mqstat);
-int mq_setattr (mqd_t __msgid, const struct mq_attr *__mqstat, struct mq_attr *__omqattr);
-
-#endif /* __MQUEUE_H */
diff --git a/newlib/libc/sys/linux/include/namespace.h b/newlib/libc/sys/linux/include/namespace.h
deleted file mode 100644
index 159b8e33c..000000000
--- a/newlib/libc/sys/linux/include/namespace.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 2001 Daniel Eischen <deischen@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 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.
- *
- * $FreeBSD: src/lib/libc/include/namespace.h,v 1.9 2002/03/29 22:43:42 markm Exp $
- */
-
-#ifndef _NAMESPACE_H_
-#define _NAMESPACE_H_
-
-/*
- * Adjust names so that headers declare "hidden" names.
- */
-
-/*
- * ISO C (C90) section. Most names in libc aren't in ISO C, so they
- * should be here. Most aren't here...
- */
-#define err _err
-#define warn _warn
-
-/*
- * Prototypes for syscalls/functions that need to be overridden
- * in libc_r/libpthread.
- */
-#define accept _accept
-#define __acl_aclcheck_fd ___acl_aclcheck_fd
-#define __acl_delete_fd ___acl_delete_fd
-#define __acl_get_fd ___acl_get_fd
-#define __acl_set_fd ___acl_set_fd
-#define bind _bind
-#define __cap_get_fd ___cap_get_fd
-#define __cap_set_fd ___cap_set_fd
-#define close _close
-#define connect _connect
-#define dup _dup
-#define dup2 _dup2
-#define execve _execve
-#define fcntl _fcntl
-/*#define flock _flock */
-#define fstat _fstat
-#define fstatfs _fstatfs
-#define fsync _fsync
-#define getdirentries _getdirentries
-#define getlogin _getlogin
-#define getpeername _getpeername
-#define getprogname _getprogname
-#define getsockname _getsockname
-#define getsockopt _getsockopt
-#define ioctl _ioctl
-/* #define kevent _kevent */
-#define listen _listen
-#define nanosleep _nanosleep
-#define open _open
-#define poll _poll
-#define pthread_cond_signal _pthread_cond_signal
-#define pthread_cond_wait _pthread_cond_wait
-#define pthread_cond_init _pthread_cond_init
-#define pthread_exit _pthread_exit
-#define pthread_getspecific _pthread_getspecific
-#define pthread_key_create _pthread_key_create
-#define pthread_key_delete _pthread_key_delete
-#define pthread_main_np _pthread_main_np
-#define pthread_mutex_destroy _pthread_mutex_destroy
-#define pthread_mutex_init _pthread_mutex_init
-#define pthread_mutex_lock _pthread_mutex_lock
-#define pthread_mutex_trylock _pthread_mutex_trylock
-#define pthread_mutex_unlock _pthread_mutex_unlock
-#define pthread_mutexattr_init _pthread_mutexattr_init
-#define pthread_mutexattr_destroy _pthread_mutexattr_destroy
-#define pthread_mutexattr_settype _pthread_mutexattr_settype
-#define pthread_once _pthread_once
-#define pthread_rwlock_init _pthread_rwlock_init
-#define pthread_rwlock_rdlock _pthread_rwlock_rdlock
-#define pthread_rwlock_wrlock _pthread_rwlock_wrlock
-#define pthread_rwlock_unlock _pthread_rwlock_unlock
-#define pthread_self _pthread_self
-#define pthread_setspecific _pthread_setspecific
-#define pthread_sigmask _pthread_sigmask
-#define read _read
-#define readv _readv
-#define recvfrom _recvfrom
-#define recvmsg _recvmsg
-#define select _select
-#define sendmsg _sendmsg
-#define sendto _sendto
-#define setsockopt _setsockopt
-/*#define sigaction _sigaction*/
-#define sigprocmask _sigprocmask
-#define sigsuspend _sigsuspend
-#define socket _socket
-#define socketpair _socketpair
-#define wait4 _wait4
-#define write _write
-#define writev _writev
-
-
-/*
- * Other hidden syscalls/functions that libc_r needs to override
- * but are not used internally by libc.
- *
- * XXX - When modifying libc to use one of the following, remove
- * the prototype from below and place it in the list above.
- */
-#if 0
-#define creat _creat
-#define fchflags _fchflags
-#define fchmod _fchmod
-#define fpathconf _fpathconf
-#define msync _msync
-#define nfssvc _nfssvc
-#define pause _pause
-#define pthread_rwlock_destroy _pthread_rwlock_destroy
-#define pthread_rwlock_tryrdlock _pthread_rwlock_tryrdlock
-#define pthread_rwlock_trywrlock _pthread_rwlock_trywrlock
-#define pthread_rwlockattr_init _pthread_rwlockattr_init
-#define pthread_rwlockattr_destroy _pthread_rwlockattr_destroy
-#define sched_yield _sched_yield
-#define sendfile _sendfile
-#define shutdown _shutdown
-#define sigaltstack _sigaltstack
-#define sigpending _sigpending
-#define sigreturn _sigreturn
-#define sigsetmask _sigsetmask
-#define sleep _sleep
-#define system _system
-#define tcdrain _tcdrain
-#define wait _wait
-#define waitpid _waitpid
-#endif
-
-#endif /* _NAMESPACE_H_ */
diff --git a/newlib/libc/sys/linux/include/net/bpf.h b/newlib/libc/sys/linux/include/net/bpf.h
deleted file mode 100644
index 1f4a8be2b..000000000
--- a/newlib/libc/sys/linux/include/net/bpf.h
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- * Copyright (c) 1990, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from the Stanford/CMU enet packet filter,
- * (net/enet.c) distributed as part of 4.3BSD, and code contributed
- * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
- * Berkeley Laboratory.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)bpf.h 8.1 (Berkeley) 6/10/93
- * @(#)bpf.h 1.34 (LBL) 6/16/96
- *
- * $FreeBSD: src/sys/net/bpf.h,v 1.25 2002/03/19 21:54:16 alfred Exp $
- */
-
-#ifndef _NET_BPF_H_
-#define _NET_BPF_H_
-
-/* BSD style release date */
-#define BPF_RELEASE 199606
-
-typedef int32_t bpf_int32;
-typedef u_int32_t bpf_u_int32;
-
-/*
- * Alignment macros. BPF_WORDALIGN rounds up to the next
- * even multiple of BPF_ALIGNMENT.
- */
-#define BPF_ALIGNMENT sizeof(long)
-#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1))
-
-#define BPF_MAXINSNS 512
-#define BPF_MAXBUFSIZE 0x80000
-#define BPF_MINBUFSIZE 32
-
-/*
- * Structure for BIOCSETF.
- */
-struct bpf_program {
- u_int bf_len;
- struct bpf_insn *bf_insns;
-};
-
-/*
- * Struct returned by BIOCGSTATS.
- */
-struct bpf_stat {
- u_int bs_recv; /* number of packets received */
- u_int bs_drop; /* number of packets dropped */
-};
-
-/*
- * Struct return by BIOCVERSION. This represents the version number of
- * the filter language described by the instruction encodings below.
- * bpf understands a program iff kernel_major == filter_major &&
- * kernel_minor >= filter_minor, that is, if the value returned by the
- * running kernel has the same major number and a minor number equal
- * equal to or less than the filter being downloaded. Otherwise, the
- * results are undefined, meaning an error may be returned or packets
- * may be accepted haphazardly.
- * It has nothing to do with the source code version.
- */
-struct bpf_version {
- u_short bv_major;
- u_short bv_minor;
-};
-/* Current version number of filter architecture. */
-#define BPF_MAJOR_VERSION 1
-#define BPF_MINOR_VERSION 1
-
-#define BIOCGBLEN _IOR('B',102, u_int)
-#define BIOCSBLEN _IOWR('B',102, u_int)
-#define BIOCSETF _IOW('B',103, struct bpf_program)
-#define BIOCFLUSH _IO('B',104)
-#define BIOCPROMISC _IO('B',105)
-#define BIOCGDLT _IOR('B',106, u_int)
-#define BIOCGETIF _IOR('B',107, struct ifreq)
-#define BIOCSETIF _IOW('B',108, struct ifreq)
-#define BIOCSRTIMEOUT _IOW('B',109, struct timeval)
-#define BIOCGRTIMEOUT _IOR('B',110, struct timeval)
-#define BIOCGSTATS _IOR('B',111, struct bpf_stat)
-#define BIOCIMMEDIATE _IOW('B',112, u_int)
-#define BIOCVERSION _IOR('B',113, struct bpf_version)
-#define BIOCGRSIG _IOR('B',114, u_int)
-#define BIOCSRSIG _IOW('B',115, u_int)
-#define BIOCGHDRCMPLT _IOR('B',116, u_int)
-#define BIOCSHDRCMPLT _IOW('B',117, u_int)
-#define BIOCGSEESENT _IOR('B',118, u_int)
-#define BIOCSSEESENT _IOW('B',119, u_int)
-
-/*
- * Structure prepended to each packet.
- */
-struct bpf_hdr {
- struct timeval bh_tstamp; /* time stamp */
- bpf_u_int32 bh_caplen; /* length of captured portion */
- bpf_u_int32 bh_datalen; /* original length of packet */
- u_short bh_hdrlen; /* length of bpf header (this struct
- plus alignment padding) */
-};
-/*
- * Because the structure above is not a multiple of 4 bytes, some compilers
- * will insist on inserting padding; hence, sizeof(struct bpf_hdr) won't work.
- * Only the kernel needs to know about it; applications use bh_hdrlen.
- */
-#ifdef _KERNEL
-#define SIZEOF_BPF_HDR (sizeof(struct bpf_hdr) <= 20 ? 18 : \
- sizeof(struct bpf_hdr))
-#endif
-
-/*
- * Data-link level type codes.
- */
-#define DLT_NULL 0 /* no link-layer encapsulation */
-#define DLT_EN10MB 1 /* Ethernet (10Mb) */
-#define DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */
-#define DLT_AX25 3 /* Amateur Radio AX.25 */
-#define DLT_PRONET 4 /* Proteon ProNET Token Ring */
-#define DLT_CHAOS 5 /* Chaos */
-#define DLT_IEEE802 6 /* IEEE 802 Networks */
-#define DLT_ARCNET 7 /* ARCNET */
-#define DLT_SLIP 8 /* Serial Line IP */
-#define DLT_PPP 9 /* Point-to-point Protocol */
-#define DLT_FDDI 10 /* FDDI */
-#define DLT_ATM_RFC1483 11 /* LLC/SNAP encapsulated atm */
-#define DLT_RAW 12 /* raw IP */
-
-/*
- * These are values from BSD/OS's "bpf.h".
- * These are not the same as the values from the traditional libpcap
- * "bpf.h"; however, these values shouldn't be generated by any
- * OS other than BSD/OS, so the correct values to use here are the
- * BSD/OS values.
- *
- * Platforms that have already assigned these values to other
- * DLT_ codes, however, should give these codes the values
- * from that platform, so that programs that use these codes will
- * continue to compile - even though they won't correctly read
- * files of these types.
- */
-#define DLT_SLIP_BSDOS 15 /* BSD/OS Serial Line IP */
-#define DLT_PPP_BSDOS 16 /* BSD/OS Point-to-point Protocol */
-
-#define DLT_ATM_CLIP 19 /* Linux Classical-IP over ATM */
-
-/*
- * This value is defined by NetBSD; other platforms should refrain from
- * using it for other purposes, so that NetBSD savefiles with a link
- * type of 50 can be read as this type on all platforms.
- */
-#define DLT_PPP_SERIAL 50 /* PPP over serial with HDLC encapsulation */
-
-/*
- * This value was defined by libpcap 0.5; platforms that have defined
- * it with a different value should define it here with that value -
- * a link type of 104 in a save file will be mapped to DLT_C_HDLC,
- * whatever value that happens to be, so programs will correctly
- * handle files with that link type regardless of the value of
- * DLT_C_HDLC.
- *
- * The name DLT_C_HDLC was used by BSD/OS; we use that name for source
- * compatibility with programs written for BSD/OS.
- *
- * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well,
- * for source compatibility with programs written for libpcap 0.5.
- */
-#define DLT_C_HDLC 104 /* Cisco HDLC */
-#define DLT_CHDLC DLT_C_HDLC
-
-/*
- * Reserved for future use.
- * Do not pick other numerical value for these unless you have also
- * picked up the tcpdump.org top-of-CVS-tree version of "savefile.c",
- * which will arrange that capture files for these DLT_ types have
- * the same "network" value on all platforms, regardless of what
- * value is chosen for their DLT_ type (thus allowing captures made
- * on one platform to be read on other platforms, even if the two
- * platforms don't use the same numerical values for all DLT_ types).
- */
-#define DLT_IEEE802_11 105 /* IEEE 802.11 wireless */
-
-/*
- * Values between 106 and 107 are used in capture file headers as
- * link-layer types corresponding to DLT_ types that might differ
- * between platforms; don't use those values for new DLT_ new types.
- */
-
-/*
- * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except
- * that the AF_ type in the link-layer header is in network byte order.
- *
- * OpenBSD defines it as 12, but that collides with DLT_RAW, so we
- * define it as 108 here. If OpenBSD picks up this file, it should
- * define DLT_LOOP as 12 in its version, as per the comment above -
- * and should not use 108 for any purpose.
- */
-#define DLT_LOOP 108
-
-/*
- * Values between 109 and 112 are used in capture file headers as
- * link-layer types corresponding to DLT_ types that might differ
- * between platforms; don't use those values for new DLT_ new types.
- */
-
-/*
- * This is for Linux cooked sockets.
- */
-#define DLT_LINUX_SLL 113
-
-/*
- * The instruction encodings.
- */
-/* instruction classes */
-#define BPF_CLASS(code) ((code) & 0x07)
-#define BPF_LD 0x00
-#define BPF_LDX 0x01
-#define BPF_ST 0x02
-#define BPF_STX 0x03
-#define BPF_ALU 0x04
-#define BPF_JMP 0x05
-#define BPF_RET 0x06
-#define BPF_MISC 0x07
-
-/* ld/ldx fields */
-#define BPF_SIZE(code) ((code) & 0x18)
-#define BPF_W 0x00
-#define BPF_H 0x08
-#define BPF_B 0x10
-#define BPF_MODE(code) ((code) & 0xe0)
-#define BPF_IMM 0x00
-#define BPF_ABS 0x20
-#define BPF_IND 0x40
-#define BPF_MEM 0x60
-#define BPF_LEN 0x80
-#define BPF_MSH 0xa0
-
-/* alu/jmp fields */
-#define BPF_OP(code) ((code) & 0xf0)
-#define BPF_ADD 0x00
-#define BPF_SUB 0x10
-#define BPF_MUL 0x20
-#define BPF_DIV 0x30
-#define BPF_OR 0x40
-#define BPF_AND 0x50
-#define BPF_LSH 0x60
-#define BPF_RSH 0x70
-#define BPF_NEG 0x80
-#define BPF_JA 0x00
-#define BPF_JEQ 0x10
-#define BPF_JGT 0x20
-#define BPF_JGE 0x30
-#define BPF_JSET 0x40
-#define BPF_SRC(code) ((code) & 0x08)
-#define BPF_K 0x00
-#define BPF_X 0x08
-
-/* ret - BPF_K and BPF_X also apply */
-#define BPF_RVAL(code) ((code) & 0x18)
-#define BPF_A 0x10
-
-/* misc */
-#define BPF_MISCOP(code) ((code) & 0xf8)
-#define BPF_TAX 0x00
-#define BPF_TXA 0x80
-
-/*
- * The instruction data structure.
- */
-struct bpf_insn {
- u_short code;
- u_char jt;
- u_char jf;
- bpf_u_int32 k;
-};
-
-/*
- * Macros for insn array initializers.
- */
-#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k }
-#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k }
-
-#ifdef _KERNEL
-int bpf_validate(const struct bpf_insn *, int);
-void bpf_tap(struct ifnet *, u_char *, u_int);
-void bpf_mtap(struct ifnet *, struct mbuf *);
-void bpfattach(struct ifnet *, u_int, u_int);
-void bpfdetach(struct ifnet *);
-
-void bpfilterattach(int);
-u_int bpf_filter(const struct bpf_insn *, u_char *, u_int, u_int);
-#endif
-
-/*
- * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST).
- */
-#define BPF_MEMWORDS 16
-
-#endif
diff --git a/newlib/libc/sys/linux/include/net/bpf_compat.h b/newlib/libc/sys/linux/include/net/bpf_compat.h
deleted file mode 100644
index 31cd06904..000000000
--- a/newlib/libc/sys/linux/include/net/bpf_compat.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)bpf_compat.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/net/bpf_compat.h,v 1.8 2000/12/27 22:20:13 bmilekic Exp $
- */
-
-#ifndef _NET_BPF_COMPAT_H_
-#define _NET_BPF_COMPAT_H_
-
-/*
- * Some hacks for compatibility across SunOS and 4.4BSD. We emulate malloc
- * and free with mbuf clusters. We store a pointer to the mbuf in the first
- * word of the mbuf and return 8 bytes passed the start of data (for double
- * word alignment). We cannot just use offsets because clusters are not at
- * a fixed offset from the associated mbuf. Sorry for this kludge.
- */
-#define malloc(size, type, canwait) bpf_alloc(size, canwait)
-#define free(cp, type) m_free(*(struct mbuf **)(cp - 8))
-#define M_WAITOK M_TRYWAIT
-#define M_NOWAIT M_DONTWAIT
-
-/* This mapping works for our purposes. */
-#define ERESTART EINTR
-
-#endif
diff --git a/newlib/libc/sys/linux/include/net/bpfdesc.h b/newlib/libc/sys/linux/include/net/bpfdesc.h
deleted file mode 100644
index ec0c8fc95..000000000
--- a/newlib/libc/sys/linux/include/net/bpfdesc.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 1990, 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from the Stanford/CMU enet packet filter,
- * (net/enet.c) distributed as part of 4.3BSD, and code contributed
- * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
- * Berkeley Laboratory.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)bpfdesc.h 8.1 (Berkeley) 6/10/93
- *
- * $FreeBSD: src/sys/net/bpfdesc.h,v 1.19 2001/12/14 22:17:54 jdp Exp $
- */
-
-#ifndef _NET_BPFDESC_H_
-#define _NET_BPFDESC_H_
-
-#include <sys/callout.h>
-#include <sys/selinfo.h>
-
-/*
- * Descriptor associated with each open bpf file.
- */
-struct bpf_d {
- struct bpf_d *bd_next; /* Linked list of descriptors */
- /*
- * Buffer slots: two mbuf clusters buffer the incoming packets.
- * The model has three slots. Sbuf is always occupied.
- * sbuf (store) - Receive interrupt puts packets here.
- * hbuf (hold) - When sbuf is full, put cluster here and
- * wakeup read (replace sbuf with fbuf).
- * fbuf (free) - When read is done, put cluster here.
- * On receiving, if sbuf is full and fbuf is 0, packet is dropped.
- */
- caddr_t bd_sbuf; /* store slot */
- caddr_t bd_hbuf; /* hold slot */
- caddr_t bd_fbuf; /* free slot */
- int bd_slen; /* current length of store buffer */
- int bd_hlen; /* current length of hold buffer */
-
- int bd_bufsize; /* absolute length of buffers */
-
- struct bpf_if * bd_bif; /* interface descriptor */
- u_long bd_rtout; /* Read timeout in 'ticks' */
- struct bpf_insn *bd_filter; /* filter code */
- u_long bd_rcount; /* number of packets received */
- u_long bd_dcount; /* number of packets dropped */
-
- u_char bd_promisc; /* true if listening promiscuously */
- u_char bd_state; /* idle, waiting, or timed out */
- u_char bd_immediate; /* true to return on packet arrival */
- int bd_hdrcmplt; /* false to fill in src lladdr automatically */
- int bd_seesent; /* true if bpf should see sent packets */
- int bd_async; /* non-zero if packet reception should generate signal */
- int bd_sig; /* signal to send upon packet reception */
- struct sigio * bd_sigio; /* information for async I/O */
-#if BSD < 199103
- u_char bd_selcoll; /* true if selects collide */
- int bd_timedout;
- struct thread * bd_selthread; /* process that last selected us */
-#else
- u_char bd_pad; /* explicit alignment */
- struct selinfo bd_sel; /* bsd select info */
-#endif
- struct mtx bd_mtx; /* mutex for this descriptor */
- struct callout bd_callout; /* for BPF timeouts with select */
-};
-
-/* Values for bd_state */
-#define BPF_IDLE 0 /* no select in progress */
-#define BPF_WAITING 1 /* waiting for read timeout in select */
-#define BPF_TIMED_OUT 2 /* read timeout has expired in select */
-
-#define BPFD_LOCK(bd) mtx_lock(&(bd)->bd_mtx)
-#define BPFD_UNLOCK(bd) mtx_unlock(&(bd)->bd_mtx)
-
-/*
- * Descriptor associated with each attached hardware interface.
- */
-struct bpf_if {
- struct bpf_if *bif_next; /* list of all interfaces */
- struct bpf_d *bif_dlist; /* descriptor list */
- u_int bif_dlt; /* link layer type */
- u_int bif_hdrlen; /* length of header (with padding) */
- struct ifnet *bif_ifp; /* corresponding interface */
- struct mtx bif_mtx; /* mutex for interface */
-};
-
-#define BPFIF_LOCK(bif) mtx_lock(&(bif)->bif_mtx)
-#define BPFIF_UNLOCK(bif) mtx_unlock(&(bif)->bif_mtx)
-
-#endif
diff --git a/newlib/libc/sys/linux/include/net/bridge.h b/newlib/libc/sys/linux/include/net/bridge.h
deleted file mode 100644
index a90f2747b..000000000
--- a/newlib/libc/sys/linux/include/net/bridge.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 1998-2002 Luigi Rizzo
- *
- * Work partly supported by: Cisco Systems, Inc. - NSITE lab, RTP, NC
- *
- * 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 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.
- *
- * $FreeBSD: src/sys/net/bridge.h,v 1.11 2002/02/15 05:11:11 luigi Exp $
- */
-
-extern int do_bridge;
-
-/*
- * We need additional per-interface info for the bridge, which is
- * stored in a struct bdg_softc. The ifp2sc[] array provides a pointer
- * to this struct using the if_index as a mapping key.
- * bdg_softc has a backpointer to the struct ifnet, the bridge
- * flags, and a cluster (bridging occurs only between port of the
- * same cluster).
- */
-
-struct cluster_softc; /* opaque here, defined in bridge.c */
-
-struct bdg_softc {
- struct ifnet *ifp ;
- /* also ((struct arpcom *)ifp)->ac_enaddr is the eth. addr */
- int flags ;
-#define IFF_BDG_PROMISC 0x0001 /* set promisc mode on this if. */
-#define IFF_MUTE 0x0002 /* mute this if for bridging. */
-#define IFF_USED 0x0004 /* use this if for bridging. */
- struct cluster_softc *cluster;
-} ;
-
-extern struct bdg_softc *ifp2sc;
-
-#define BDG_USED(ifp) (ifp2sc[ifp->if_index].flags & IFF_USED)
-/*
- * BDG_ACTIVE(ifp) does all checks to see if bridging is enabled, loaded,
- * and used on a given interface.
- */
-#define BDG_ACTIVE(ifp) (do_bridge && BDG_LOADED && BDG_USED(ifp))
-
-/*
- * The following constants are not legal ifnet pointers, and are used
- * as return values from the classifier, bridge_dst_lookup().
- * The same values are used as index in the statistics arrays,
- * with BDG_FORWARD replacing specifically forwarded packets.
- *
- * These constants are here because they are used in 'netstat'
- * to show bridge statistics.
- */
-#define BDG_BCAST ( (struct ifnet *)1 )
-#define BDG_MCAST ( (struct ifnet *)2 )
-#define BDG_LOCAL ( (struct ifnet *)3 )
-#define BDG_DROP ( (struct ifnet *)4 )
-#define BDG_UNKNOWN ( (struct ifnet *)5 )
-#define BDG_IN ( (struct ifnet *)7 )
-#define BDG_OUT ( (struct ifnet *)8 )
-#define BDG_FORWARD ( (struct ifnet *)9 )
-
-/*
- * Statistics are passed up with the sysctl interface, "netstat -p bdg"
- * reads them. PF_BDG defines the 'bridge' protocol family.
- */
-
-#define PF_BDG 3 /* XXX superhack */
-
-#define STAT_MAX (int)BDG_FORWARD
-struct bdg_port_stat {
- char name[16];
- u_long collisions;
- u_long p_in[STAT_MAX+1];
-} ;
-
-/* XXX this should be made dynamic */
-#define BDG_MAX_PORTS 128
-struct bdg_stats {
- struct bdg_port_stat s[BDG_MAX_PORTS];
-} ;
-
-
-#define BDG_STAT(ifp, type) bdg_stats.s[ifp->if_index].p_in[(uintptr_t)type]++
-
-#ifdef _KERNEL
-typedef struct ifnet *bridge_in_t(struct ifnet *, struct ether_header *);
-/* bdg_forward frees the mbuf if necessary, returning null */
-typedef struct mbuf *bdg_forward_t(struct mbuf *, struct ether_header *const,
- struct ifnet *);
-typedef void bdgtakeifaces_t(void);
-extern bridge_in_t *bridge_in_ptr;
-extern bdg_forward_t *bdg_forward_ptr;
-extern bdgtakeifaces_t *bdgtakeifaces_ptr;
-
-#define BDG_LOADED (bdgtakeifaces_ptr != NULL)
-#endif /* KERNEL */
diff --git a/newlib/libc/sys/linux/include/net/ethernet.h b/newlib/libc/sys/linux/include/net/ethernet.h
deleted file mode 100644
index 6b1d1c9be..000000000
--- a/newlib/libc/sys/linux/include/net/ethernet.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Fundamental constants relating to ethernet.
- *
- * $FreeBSD: src/sys/net/ethernet.h,v 1.20 2002/04/04 05:42:09 luigi Exp $
- *
- */
-
-#ifndef _NET_ETHERNET_H_
-#define _NET_ETHERNET_H_
-
-/*
- * The number of bytes in an ethernet (MAC) address.
- */
-#define ETHER_ADDR_LEN 6
-
-/*
- * The number of bytes in the type field.
- */
-#define ETHER_TYPE_LEN 2
-
-/*
- * The number of bytes in the trailing CRC field.
- */
-#define ETHER_CRC_LEN 4
-
-/*
- * The length of the combined header.
- */
-#define ETHER_HDR_LEN (ETHER_ADDR_LEN*2+ETHER_TYPE_LEN)
-
-/*
- * The minimum packet length.
- */
-#define ETHER_MIN_LEN 64
-
-/*
- * The maximum packet length.
- */
-#define ETHER_MAX_LEN 1518
-
-/*
- * A macro to validate a length with
- */
-#define ETHER_IS_VALID_LEN(foo) \
- ((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
-
-/*
- * Structure of a 10Mb/s Ethernet header.
- */
-struct ether_header {
- u_char ether_dhost[ETHER_ADDR_LEN];
- u_char ether_shost[ETHER_ADDR_LEN];
- u_short ether_type;
-};
-
-/*
- * Structure of a 48-bit Ethernet address.
- */
-struct ether_addr {
- u_char octet[ETHER_ADDR_LEN];
-};
-
-#define ETHERTYPE_PUP 0x0200 /* PUP protocol */
-#define ETHERTYPE_IP 0x0800 /* IP protocol */
-#define ETHERTYPE_ARP 0x0806 /* Addr. resolution protocol */
-#define ETHERTYPE_REVARP 0x8035 /* reverse Addr. resolution protocol */
-#define ETHERTYPE_VLAN 0x8100 /* IEEE 802.1Q VLAN tagging */
-#define ETHERTYPE_IPV6 0x86dd /* IPv6 */
-#define ETHERTYPE_LOOPBACK 0x9000 /* used to test interfaces */
-/* XXX - add more useful types here */
-
-/*
- * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
- * (type-ETHERTYPE_TRAIL)*512 bytes of data followed
- * by an ETHER type (as given above) and then the (variable-length) header.
- */
-#define ETHERTYPE_TRAIL 0x1000 /* Trailer packet */
-#define ETHERTYPE_NTRAILER 16
-
-#define ETHERMTU (ETHER_MAX_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
-#define ETHERMIN (ETHER_MIN_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
-
-#ifdef _KERNEL
-
-/*
- * For device drivers to specify whether they support BPF or not
- */
-#define ETHER_BPF_UNSUPPORTED 0
-#define ETHER_BPF_SUPPORTED 1
-
-struct ifnet;
-struct mbuf;
-
-extern void (*ng_ether_input_p)(struct ifnet *ifp,
- struct mbuf **mp, struct ether_header *eh);
-extern void (*ng_ether_input_orphan_p)(struct ifnet *ifp,
- struct mbuf *m, struct ether_header *eh);
-extern int (*ng_ether_output_p)(struct ifnet *ifp, struct mbuf **mp);
-extern void (*ng_ether_attach_p)(struct ifnet *ifp);
-extern void (*ng_ether_detach_p)(struct ifnet *ifp);
-
-extern int (*vlan_input_p)(struct ether_header *eh, struct mbuf *m);
-extern int (*vlan_input_tag_p)(struct ether_header *eh, struct mbuf *m,
- u_int16_t t);
-
-#define VLAN_INPUT_TAG(eh, m, t) do { \
- /* XXX: lock */ \
- if (vlan_input_tag_p != NULL) \
- (*vlan_input_tag_p)(eh, m, t); \
- else { \
- (m)->m_pkthdr.rcvif->if_noproto++; \
- m_freem(m); \
- } \
- /* XXX: unlock */ \
-} while (0)
-
-#else /* _KERNEL */
-
-#include <sys/cdefs.h>
-
-/*
- * Ethernet address conversion/parsing routines.
- */
-__BEGIN_DECLS
-struct ether_addr *ether_aton(const char *);
-int ether_hostton(const char *, struct ether_addr *);
-int ether_line(const char *, struct ether_addr *, char *);
-char *ether_ntoa(const struct ether_addr *);
-int ether_ntohost(char *, const struct ether_addr *);
-__END_DECLS
-
-#endif /* !_KERNEL */
-
-#endif /* !_NET_ETHERNET_H_ */
diff --git a/newlib/libc/sys/linux/include/net/fddi.h b/newlib/libc/sys/linux/include/net/fddi.h
deleted file mode 100644
index e9a3b55fa..000000000
--- a/newlib/libc/sys/linux/include/net/fddi.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- * Copyright (c) 1995 Matt Thomas (thomas@lkg.dec.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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_fddi.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/net/fddi.h,v 1.12 2002/03/29 11:22:22 mdodd Exp $
- */
-
-#ifndef _NETINET_IF_FDDI_H_
-#define _NETINET_IF_FDDI_H_
-
-#define FDDIIPMTU 4352
-#define FDDIMTU 4470
-#define FDDIMIN 3
-
-#define FDDIFC_C 0x80 /* 0b10000000 */
-#define FDDIFC_L 0x40 /* 0b01000000 */
-#define FDDIFC_F 0x30 /* 0b00110000 */
-#define FDDIFC_Z 0x0F /* 0b00001111 */
-#define FDDIFC_CLFF 0xF0 /* Class/Length/Format bits */
-#define FDDIFC_ZZZZ 0x0F /* Control bits */
-
-/*
- * FDDI Frame Control values. (48-bit addressing only).
- */
-#define FDDIFC_VOID 0x40 /* Void frame */
-#define FDDIFC_NRT 0x80 /* Nonrestricted token */
-#define FDDIFC_RT 0xc0 /* Restricted token */
-#define FDDIFC_MAC_BEACON 0xc2 /* MAC Beacon frame */
-#define FDDIFC_MAC_CLAIM 0xc3 /* MAC Claim frame */
-#define FDDIFC_LLC_ASYNC 0x50
-#define FDDIFC_LLC_PRIO0 0
-#define FDDIFC_LLC_PRIO1 1
-#define FDDIFC_LLC_PRIO2 2
-#define FDDIFC_LLC_PRIO3 3
-#define FDDIFC_LLC_PRIO4 4
-#define FDDIFC_LLC_PRIO5 5
-#define FDDIFC_LLC_PRIO6 6
-#define FDDIFC_LLC_PRIO7 7
-#define FDDIFC_LLC_SYNC 0xd0
-#define FDDIFC_IMP_ASYNC 0x60 /* Implementor Async. */
-#define FDDIFC_IMP_SYNC 0xe0 /* Implementor Synch. */
-#define FDDIFC_SMT 0x40
-#define FDDIFC_SMT_INFO 0x41 /* SMT Info */
-#define FDDIFC_SMT_NSA 0x4F /* SMT Next station adrs */
-#define FDDIFC_MAC 0xc0 /* MAC frame */
-
-#define FDDI_ADDR_LEN 6
-#define FDDI_HDR_LEN (sizeof(struct fddi_header))
-
-/*
- * Structure of an 100Mb/s FDDI header.
- */
-struct fddi_header {
- u_char fddi_fc;
- u_char fddi_dhost[FDDI_ADDR_LEN];
- u_char fddi_shost[FDDI_ADDR_LEN];
-};
-
-#if defined(_KERNEL)
-#define fddi_ipmulticast_min ether_ipmulticast_min
-#define fddi_ipmulticast_max ether_ipmulticast_max
-#define fddi_addmulti ether_addmulti
-#define fddi_delmulti ether_delmulti
-#define fddi_sprintf ether_sprintf
-
-#define FDDI_BPF_UNSUPPORTED 0
-#define FDDI_BPF_SUPPORTED 1
-
-void fddi_ifattach(struct ifnet *, int);
-void fddi_ifdetach(struct ifnet *, int);
-void fddi_input(struct ifnet *, struct fddi_header *, struct mbuf *);
-int fddi_ioctl(struct ifnet *, int, caddr_t);
-
-#endif /* _KERNEL */
-#endif /* _NET_FDDI_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if.h b/newlib/libc/sys/linux/include/net/if.h
deleted file mode 100644
index bf021e6f9..000000000
--- a/newlib/libc/sys/linux/include/net/if.h
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/net/if.h,v 1.71 2002/03/19 21:54:16 alfred Exp $
- */
-
-#ifndef _NET_IF_H_
-#define _NET_IF_H_
-
-#include <sys/queue.h>
-
-/*
- * <net/if.h> does not depend on <sys/time.h> on most other systems. This
- * helps userland compatibility. (struct timeval ifi_lastchange)
- */
-#ifndef _KERNEL
-#include <sys/time.h>
-#endif
-
-struct ifnet;
-
-/*
- * Length of interface external name, including terminating '\0'.
- * Note: this is the same size as a generic device's external name.
- */
-#define IFNAMSIZ 16
-#define IF_NAMESIZE IFNAMSIZ
-#define IF_MAXUNIT 0x7fff /* ifp->if_unit is only 15 bits */
-
-/*
- * Structure describing a `cloning' interface.
- */
-struct if_clone {
- LIST_ENTRY(if_clone) ifc_list; /* on list of cloners */
- const char *ifc_name; /* name of device, e.g. `gif' */
- size_t ifc_namelen; /* length of name */
- int ifc_maxunit; /* maximum unit number */
- unsigned char *ifc_units; /* bitmap to handle units */
- int ifc_bmlen; /* bitmap length */
-
- int (*ifc_create)(struct if_clone *, int);
- int (*ifc_destroy)(struct ifnet *);
-};
-
-#define IF_CLONE_INITIALIZER(name, create, destroy, maxunit) \
- { { 0 }, name, sizeof(name) - 1, maxunit, NULL, 0, create, destroy }
-
-/*
- * Structure used to query names of interface cloners.
- */
-
-struct if_clonereq {
- int ifcr_total; /* total cloners (out) */
- int ifcr_count; /* room for this many in user buffer */
- char *ifcr_buffer; /* buffer for cloner names */
-};
-
-/*
- * Structure describing information about an interface
- * which may be of interest to management entities.
- */
-struct if_data {
- /* generic interface information */
- u_char ifi_type; /* ethernet, tokenring, etc */
- u_char ifi_physical; /* e.g., AUI, Thinnet, 10base-T, etc */
- u_char ifi_addrlen; /* media address length */
- u_char ifi_hdrlen; /* media header length */
- u_char ifi_recvquota; /* polling quota for receive intrs */
- u_char ifi_xmitquota; /* polling quota for xmit intrs */
- u_long ifi_mtu; /* maximum transmission unit */
- u_long ifi_metric; /* routing metric (external only) */
- u_long ifi_baudrate; /* linespeed */
- /* volatile statistics */
- u_long ifi_ipackets; /* packets received on interface */
- u_long ifi_ierrors; /* input errors on interface */
- u_long ifi_opackets; /* packets sent on interface */
- u_long ifi_oerrors; /* output errors on interface */
- u_long ifi_collisions; /* collisions on csma interfaces */
- u_long ifi_ibytes; /* total number of octets received */
- u_long ifi_obytes; /* total number of octets sent */
- u_long ifi_imcasts; /* packets received via multicast */
- u_long ifi_omcasts; /* packets sent via multicast */
- u_long ifi_iqdrops; /* dropped on input, this interface */
- u_long ifi_noproto; /* destined for unsupported protocol */
- u_long ifi_hwassist; /* HW offload capabilities */
- u_long ifi_unused; /* XXX was ifi_xmittiming */
- struct timeval ifi_lastchange; /* time of last administrative change */
-};
-
-#define IFF_UP 0x1 /* interface is up */
-#define IFF_BROADCAST 0x2 /* broadcast address valid */
-#define IFF_DEBUG 0x4 /* turn on debugging */
-#define IFF_LOOPBACK 0x8 /* is a loopback net */
-#define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */
-#define IFF_SMART 0x20 /* interface manages own routes */
-#define IFF_RUNNING 0x40 /* resources allocated */
-#define IFF_NOARP 0x80 /* no address resolution protocol */
-#define IFF_PROMISC 0x100 /* receive all packets */
-#define IFF_ALLMULTI 0x200 /* receive all multicast packets */
-#define IFF_OACTIVE 0x400 /* transmission in progress */
-#define IFF_SIMPLEX 0x800 /* can't hear own transmissions */
-#define IFF_LINK0 0x1000 /* per link layer defined bit */
-#define IFF_LINK1 0x2000 /* per link layer defined bit */
-#define IFF_LINK2 0x4000 /* per link layer defined bit */
-#define IFF_ALTPHYS IFF_LINK2 /* use alternate physical connection */
-#define IFF_MULTICAST 0x8000 /* supports multicast */
-
-/*
- * The following flag(s) ought to go in if_flags, but we cannot change
- * struct ifnet because of binary compatibility, so we store them in
- * if_ipending, which is not used so far.
- * If possible, make sure the value is not conflicting with other
- * IFF flags, so we have an easier time when we want to merge them.
- */
-#define IFF_POLLING 0x10000 /* Interface is in polling mode. */
-
-/* flags set internally only: */
-#define IFF_CANTCHANGE \
- (IFF_BROADCAST|IFF_POINTOPOINT|IFF_RUNNING|IFF_OACTIVE|\
- IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART)
-
-/* Capabilities that interfaces can advertise. */
-#define IFCAP_RXCSUM 0x0001 /* can offload checksum on RX */
-#define IFCAP_TXCSUM 0x0002 /* can offload checksum on TX */
-#define IFCAP_NETCONS 0x0004 /* can be a network console */
-
-#define IFCAP_HWCSUM (IFCAP_RXCSUM | IFCAP_TXCSUM)
-
-#define IFQ_MAXLEN 50
-#define IFNET_SLOWHZ 1 /* granularity is 1 second */
-
-/*
- * Message format for use in obtaining information about interfaces
- * from getkerninfo and the routing socket
- */
-struct if_msghdr {
- u_short ifm_msglen; /* to skip over non-understood messages */
- u_char ifm_version; /* future binary compatibility */
- u_char ifm_type; /* message type */
- int ifm_addrs; /* like rtm_addrs */
- int ifm_flags; /* value of if_flags */
- u_short ifm_index; /* index for associated ifp */
- struct if_data ifm_data;/* statistics and other data about if */
-};
-
-/*
- * Message format for use in obtaining information about interface addresses
- * from getkerninfo and the routing socket
- */
-struct ifa_msghdr {
- u_short ifam_msglen; /* to skip over non-understood messages */
- u_char ifam_version; /* future binary compatibility */
- u_char ifam_type; /* message type */
- int ifam_addrs; /* like rtm_addrs */
- int ifam_flags; /* value of ifa_flags */
- u_short ifam_index; /* index for associated ifp */
- int ifam_metric; /* value of ifa_metric */
-};
-
-/*
- * Message format for use in obtaining information about multicast addresses
- * from the routing socket
- */
-struct ifma_msghdr {
- u_short ifmam_msglen; /* to skip over non-understood messages */
- u_char ifmam_version; /* future binary compatibility */
- u_char ifmam_type; /* message type */
- int ifmam_addrs; /* like rtm_addrs */
- int ifmam_flags; /* value of ifa_flags */
- u_short ifmam_index; /* index for associated ifp */
-};
-
-/*
- * Message format announcing the arrival or departure of a network interface.
- */
-struct if_announcemsghdr {
- u_short ifan_msglen; /* to skip over non-understood messages */
- u_char ifan_version; /* future binary compatibility */
- u_char ifan_type; /* message type */
- u_short ifan_index; /* index for associated ifp */
- char ifan_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- u_short ifan_what; /* what type of announcement */
-};
-
-#define IFAN_ARRIVAL 0 /* interface arrival */
-#define IFAN_DEPARTURE 1 /* interface departure */
-
-/*
- * Interface request structure used for socket
- * ioctl's. All interface ioctl's must have parameter
- * definitions which begin with ifr_name. The
- * remainder may be interface specific.
- */
-struct ifreq {
- char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- union {
- struct sockaddr ifru_addr;
- struct sockaddr ifru_dstaddr;
- struct sockaddr ifru_broadaddr;
- short ifru_flags[2];
- short ifru_index;
- int ifru_metric;
- int ifru_mtu;
- int ifru_phys;
- int ifru_media;
- caddr_t ifru_data;
- int ifru_cap[2];
- } ifr_ifru;
-#define ifr_addr ifr_ifru.ifru_addr /* address */
-#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */
-#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
-#define ifr_flags ifr_ifru.ifru_flags[0] /* flags */
-#define ifr_prevflags ifr_ifru.ifru_flags[1] /* flags */
-#define ifr_metric ifr_ifru.ifru_metric /* metric */
-#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
-#define ifr_phys ifr_ifru.ifru_phys /* physical wire */
-#define ifr_media ifr_ifru.ifru_media /* physical media */
-#define ifr_data ifr_ifru.ifru_data /* for use by interface */
-#define ifr_reqcap ifr_ifru.ifru_cap[0] /* requested capabilities */
-#define ifr_curcap ifr_ifru.ifru_cap[1] /* current capabilities */
-#define ifr_index ifr_ifru.ifru_index /* interface index */
-};
-
-struct ifaliasreq {
- char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- struct sockaddr ifra_addr;
- struct sockaddr ifra_broadaddr;
- struct sockaddr ifra_mask;
-};
-
-struct ifmediareq {
- char ifm_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- int ifm_current; /* current media options */
- int ifm_mask; /* don't care mask */
- int ifm_status; /* media status */
- int ifm_active; /* active options */
- int ifm_count; /* # entries in ifm_ulist array */
- int *ifm_ulist; /* media words */
-};
-
-/*
- * Structure used to retrieve aux status data from interfaces.
- * Kernel suppliers to this interface should respect the formatting
- * needed by ifconfig(8): each line starts with a TAB and ends with
- * a newline. The canonical example to copy and paste is in if_tun.c.
- */
-
-#define IFSTATMAX 800 /* 10 lines of text */
-struct ifstat {
- char ifs_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- char ascii[IFSTATMAX + 1];
-};
-
-/*
- * Structure used in SIOCGIFCONF request.
- * Used to retrieve interface configuration
- * for machine (useful for programs which
- * must know all networks accessible).
- */
-struct ifconf {
- int ifc_len; /* size of associated buffer */
- union {
- caddr_t ifcu_buf;
- struct ifreq *ifcu_req;
- } ifc_ifcu;
-#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
-#define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */
-};
-
-
-/*
- * Structure for SIOC[AGD]LIFADDR
- */
-struct if_laddrreq {
- char iflr_name[IFNAMSIZ];
- u_int flags;
-#define IFLR_PREFIX 0x8000 /* in: prefix given out: kernel fills id */
- u_int prefixlen; /* in/out */
- struct sockaddr_storage addr; /* in/out */
- struct sockaddr_storage dstaddr; /* out */
-};
-
-#ifdef _KERNEL
-#ifdef MALLOC_DECLARE
-MALLOC_DECLARE(M_IFADDR);
-MALLOC_DECLARE(M_IFMADDR);
-#endif
-#endif
-
-#ifndef _KERNEL
-struct if_nameindex {
- u_int if_index; /* 1, 2, ... */
- char *if_name; /* null terminated name: "le0", ... */
-};
-
-__BEGIN_DECLS
-u_int if_nametoindex(const char *);
-char *if_indextoname(u_int, char *);
-struct if_nameindex *if_nameindex(void);
-void if_freenameindex(struct if_nameindex *);
-__END_DECLS
-#endif
-
-#ifdef _KERNEL
-struct thread;
-
-/* XXX - this should go away soon. */
-#include <net/if_var.h>
-#endif
-
-#endif /* !_NET_IF_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_arc.h b/newlib/libc/sys/linux/include/net/if_arc.h
deleted file mode 100644
index 03db7f54a..000000000
--- a/newlib/libc/sys/linux/include/net/if_arc.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/* $NetBSD: if_arc.h,v 1.13 1999/11/19 20:41:19 thorpej Exp $ */
-/* $FreeBSD: src/sys/net/if_arc.h,v 1.3 2002/03/19 21:54:16 alfred Exp $ */
-
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: NetBSD: if_ether.h,v 1.10 1994/06/29 06:37:55 cgd Exp
- * @(#)if_ether.h 8.1 (Berkeley) 6/10/93
- */
-
-#ifndef _NET_IF_ARC_H_
-#define _NET_IF_ARC_H_
-
-/*
- * Arcnet address - 1 octets
- * don't know who uses this.
- */
-struct arc_addr {
- u_int8_t arc_addr_octet[1];
-} __attribute__((__packed__));
-
-/*
- * Structure of a 2.5MB/s Arcnet header.
- * as given to interface code.
- */
-struct arc_header {
- u_int8_t arc_shost;
- u_int8_t arc_dhost;
- u_int8_t arc_type;
- /*
- * only present for newstyle encoding with LL fragmentation.
- * Don't use sizeof(anything), use ARC_HDR{,NEW}LEN instead.
- */
- u_int8_t arc_flag;
- u_int16_t arc_seqid;
-
- /*
- * only present in exception packets (arc_flag == 0xff)
- */
- u_int8_t arc_type2; /* same as arc_type */
- u_int8_t arc_flag2; /* real flag value */
- u_int16_t arc_seqid2; /* real seqid value */
-} __attribute__((__packed__));
-
-#define ARC_ADDR_LEN 1
-
-#define ARC_HDRLEN 3
-#define ARC_HDRNEWLEN 6
-#define ARC_HDRNEWLEN_EXC 10
-
-/* these lengths are data link layer length - 2*ARC_ADDR_LEN */
-#define ARC_MIN_LEN 1
-#define ARC_MIN_FORBID_LEN 254
-#define ARC_MAX_FORBID_LEN 256
-#define ARC_MAX_LEN 508
-
-
-/* RFC 1051 */
-#define ARCTYPE_IP_OLD 240 /* IP protocol */
-#define ARCTYPE_ARP_OLD 241 /* address resolution protocol */
-
-/* RFC 1201 */
-#define ARCTYPE_IP 212 /* IP protocol */
-#define ARCTYPE_ARP 213 /* address resolution protocol */
-#define ARCTYPE_REVARP 214 /* reverse addr resolution protocol */
-
-#define ARCTYPE_ATALK 221 /* Appletalk */
-#define ARCTYPE_BANIAN 247 /* Banyan Vines */
-#define ARCTYPE_IPX 250 /* Novell IPX */
-
-#define ARCTYPE_INET6 0xc4 /* IPng */
-#define ARCTYPE_DIAGNOSE 0x80 /* as per ANSI/ATA 878.1 */
-
-#define ARCMTU 507
-#define ARCMIN 0
-
-#define ARC_PHDS_MAXMTU 60480
-
-struct arccom {
- struct ifnet ac_if; /* network-visible interface */
-
- u_int16_t ac_seqid; /* seq. id used by PHDS encap. */
-
- u_int8_t arc_shost;
- u_int8_t arc_dhost;
- u_int8_t arc_type;
-
- u_int8_t dummy0;
- u_int16_t dummy1;
- int sflag, fsflag, rsflag;
- struct mbuf *curr_frag;
-
- struct ac_frag {
- u_int8_t af_maxflag; /* from first packet */
- u_int8_t af_lastseen; /* last split flag seen */
- u_int16_t af_seqid;
- struct mbuf *af_packet;
- } ac_fragtab[256]; /* indexed by sender ll address */
-};
-
-#ifdef _KERNEL
-extern u_int8_t arcbroadcastaddr;
-extern int arc_ipmtu; /* XXX new ip only, no RFC 1051! */
-
-void arc_ifattach(struct ifnet *, u_int8_t);
-void arc_ifdetach(struct ifnet *);
-void arc_storelladdr(struct ifnet *, u_int8_t);
-char *arc_sprintf(u_int8_t *);
-int arc_isphds(int);
-void arc_input(struct ifnet *, struct mbuf *);
-int arc_output(struct ifnet *, struct mbuf *,
- struct sockaddr *, struct rtentry *);
-int arc_ioctl(struct ifnet *, int, caddr_t);
-
-void arc_frag_init(struct ifnet *);
-struct mbuf * arc_frag_next(struct ifnet *);
-#endif
-
-#endif /* _NET_IF_ARC_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_arp.h b/newlib/libc/sys/linux/include/net/if_arp.h
deleted file mode 100644
index bdcacbc4d..000000000
--- a/newlib/libc/sys/linux/include/net/if_arp.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_arp.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/net/if_arp.h,v 1.16 2001/10/14 20:17:52 fjoe Exp $
- */
-
-#ifndef _NET_IF_ARP_H_
-#define _NET_IF_ARP_H_
-
-/*
- * Address Resolution Protocol.
- *
- * See RFC 826 for protocol description. ARP packets are variable
- * in size; the arphdr structure defines the fixed-length portion.
- * Protocol type values are the same as those for 10 Mb/s Ethernet.
- * It is followed by the variable-sized fields ar_sha, arp_spa,
- * arp_tha and arp_tpa in that order, according to the lengths
- * specified. Field names used correspond to RFC 826.
- */
-struct arphdr {
- u_short ar_hrd; /* format of hardware address */
-#define ARPHRD_ETHER 1 /* ethernet hardware format */
-#define ARPHRD_IEEE802 6 /* token-ring hardware format */
-#define ARPHRD_ARCNET 7 /* arcnet hardware format */
-#define ARPHRD_FRELAY 15 /* frame relay hardware format */
- u_short ar_pro; /* format of protocol address */
- u_char ar_hln; /* length of hardware address */
- u_char ar_pln; /* length of protocol address */
- u_short ar_op; /* one of: */
-#define ARPOP_REQUEST 1 /* request to resolve address */
-#define ARPOP_REPLY 2 /* response to previous request */
-#define ARPOP_REVREQUEST 3 /* request protocol address given hardware */
-#define ARPOP_REVREPLY 4 /* response giving protocol address */
-#define ARPOP_INVREQUEST 8 /* request to identify peer */
-#define ARPOP_INVREPLY 9 /* response identifying peer */
-/*
- * The remaining fields are variable in size,
- * according to the sizes above.
- */
-#ifdef COMMENT_ONLY
- u_char ar_sha[]; /* sender hardware address */
- u_char ar_spa[]; /* sender protocol address */
- u_char ar_tha[]; /* target hardware address */
- u_char ar_tpa[]; /* target protocol address */
-#endif
-};
-
-#define ar_sha(ap) (((caddr_t)((ap)+1)) + 0)
-#define ar_spa(ap) (((caddr_t)((ap)+1)) + (ap)->ar_hln)
-#define ar_tha(ap) (((caddr_t)((ap)+1)) + (ap)->ar_hln + (ap)->ar_pln)
-#define ar_tpa(ap) (((caddr_t)((ap)+1)) + 2*(ap)->ar_hln + (ap)->ar_pln)
-
-#define arphdr_len2(ar_hln, ar_pln) \
- (sizeof(struct arphdr) + 2*(ar_hln) + 2*(ar_pln))
-#define arphdr_len(ap) (arphdr_len2((ap)->ar_hln, (ap)->ar_pln))
-
-/*
- * ARP ioctl request
- */
-struct arpreq {
- struct sockaddr arp_pa; /* protocol address */
- struct sockaddr arp_ha; /* hardware address */
- int arp_flags; /* flags */
-};
-/* arp_flags and at_flags field values */
-#define ATF_INUSE 0x01 /* entry in use */
-#define ATF_COM 0x02 /* completed entry (enaddr valid) */
-#define ATF_PERM 0x04 /* permanent entry */
-#define ATF_PUBL 0x08 /* publish entry (respond for other host) */
-#define ATF_USETRAILERS 0x10 /* has requested trailers */
-
-#ifdef _KERNEL
-/*
- * Structure shared between the ethernet driver modules and
- * the address resolution code. For example, each ec_softc or il_softc
- * begins with this structure.
- */
-struct arpcom {
- /*
- * The ifnet struct _must_ be at the head of this structure.
- */
- struct ifnet ac_if; /* network-visible interface */
- u_char ac_enaddr[6]; /* ethernet hardware address */
- int ac_multicnt; /* length of ac_multiaddrs list */
- void *ac_netgraph; /* ng_ether(4) netgraph node info */
-};
-
-extern u_char etherbroadcastaddr[6];
-#endif
-
-#endif /* !_NET_IF_ARP_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_atm.h b/newlib/libc/sys/linux/include/net/if_atm.h
deleted file mode 100644
index c9ff107c0..000000000
--- a/newlib/libc/sys/linux/include/net/if_atm.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* $NetBSD: if_atm.h,v 1.7 1996/11/09 23:02:27 chuck Exp $ */
-/* $FreeBSD: src/sys/net/if_atm.h,v 1.5 2002/03/19 21:54:16 alfred Exp $ */
-
-/*
- *
- * Copyright (c) 1996 Charles D. Cranor and Washington University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Charles D. Cranor and
- * Washington University.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * net/if_atm.h
- */
-
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
-#define RTALLOC1(A,B) rtalloc1((A),(B))
-#elif defined(__FreeBSD__)
-#define RTALLOC1(A,B) rtalloc1((A),(B),0UL)
-#endif
-
-/*
- * pseudo header for packet transmission
- */
-struct atm_pseudohdr {
- u_int8_t atm_ph[4]; /* flags+VPI+VCI1(msb)+VCI2(lsb) */
-};
-
-#define ATM_PH_FLAGS(X) ((X)->atm_ph[0])
-#define ATM_PH_VPI(X) ((X)->atm_ph[1])
-#define ATM_PH_VCI(X) ((((X)->atm_ph[2]) << 8) | ((X)->atm_ph[3]))
-#define ATM_PH_SETVCI(X,V) { \
- (X)->atm_ph[2] = ((V) >> 8) & 0xff; \
- (X)->atm_ph[3] = ((V) & 0xff); \
-}
-
-#define ATM_PH_AAL5 0x01 /* use AAL5? (0 == aal0) */
-#define ATM_PH_LLCSNAP 0x02 /* use the LLC SNAP encoding (iff aal5) */
-
-#define ATM_PH_DRIVER7 0x40 /* reserve for driver's use */
-#define ATM_PH_DRIVER8 0x80 /* reserve for driver's use */
-
-#define ATMMTU 9180 /* ATM MTU size for IP */
- /* XXX: could be 9188 with LLC/SNAP according
- to comer */
-
-/* user's ioctl hook for raw atm mode */
-#define SIOCRAWATM _IOWR('a', 122, int) /* set driver's raw mode */
-
-/* atm_pseudoioctl: turns on and off RX VCIs [for internal use only!] */
-struct atm_pseudoioctl {
- struct atm_pseudohdr aph;
- void *rxhand;
-};
-#define SIOCATMENA _IOWR('a', 123, struct atm_pseudoioctl) /* enable */
-#define SIOCATMDIS _IOWR('a', 124, struct atm_pseudoioctl) /* disable */
-
-
-/*
- * XXX forget all the garbage in if_llc.h and do it the easy way
- */
-
-#define ATMLLC_HDR "\252\252\3\0\0\0"
-struct atmllc {
- u_int8_t llchdr[6]; /* aa.aa.03.00.00.00 */
- u_int8_t type[2]; /* "ethernet" type */
-};
-
-/* ATM_LLC macros: note type code in host byte order */
-#define ATM_LLC_TYPE(X) (((X)->type[0] << 8) | ((X)->type[1]))
-#define ATM_LLC_SETTYPE(X,V) { \
- (X)->type[1] = ((V) >> 8) & 0xff; \
- (X)->type[0] = ((V) & 0xff); \
-}
-
-#ifdef _KERNEL
-void atm_ifattach(struct ifnet *);
-void atm_input(struct ifnet *, struct atm_pseudohdr *,
- struct mbuf *, void *);
-int atm_output(struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *);
-#endif
-
diff --git a/newlib/libc/sys/linux/include/net/if_dl.h b/newlib/libc/sys/linux/include/net/if_dl.h
deleted file mode 100644
index 2c1467196..000000000
--- a/newlib/libc/sys/linux/include/net/if_dl.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_dl.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/net/if_dl.h,v 1.12 2002/05/07 22:14:06 kbyanc Exp $
- */
-
-#ifndef _NET_IF_DL_H_
-#define _NET_IF_DL_H_
-
-/*
- * A Link-Level Sockaddr may specify the interface in one of two
- * ways: either by means of a system-provided index number (computed
- * anew and possibly differently on every reboot), or by a human-readable
- * string such as "il0" (for managerial convenience).
- *
- * Census taking actions, such as something akin to SIOCGCONF would return
- * both the index and the human name.
- *
- * High volume transactions (such as giving a link-level ``from'' address
- * in a recvfrom or recvmsg call) may be likely only to provide the indexed
- * form, (which requires fewer copy operations and less space).
- *
- * The form and interpretation of the link-level address is purely a matter
- * of convention between the device driver and its consumers; however, it is
- * expected that all drivers for an interface of a given if_type will agree.
- */
-
-/*
- * Structure of a Link-Level sockaddr:
- */
-struct sockaddr_dl {
- u_char sdl_len; /* Total length of sockaddr */
- u_char sdl_family; /* AF_LINK */
- u_short sdl_index; /* if != 0, system given index for interface */
- u_char sdl_type; /* interface type */
- u_char sdl_nlen; /* interface name length, no trailing 0 reqd. */
- u_char sdl_alen; /* link level address length */
- u_char sdl_slen; /* link layer selector length */
- char sdl_data[46]; /* minimum work area, can be larger;
- contains both if name and ll address */
-};
-
-#define LLADDR(s) ((caddr_t)((s)->sdl_data + (s)->sdl_nlen))
-
-#ifndef _KERNEL
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-void link_addr(const char *, struct sockaddr_dl *);
-char *link_ntoa(const struct sockaddr_dl *);
-__END_DECLS
-
-#endif /* !_KERNEL */
-
-#endif
diff --git a/newlib/libc/sys/linux/include/net/if_gif.h b/newlib/libc/sys/linux/include/net/if_gif.h
deleted file mode 100644
index 4cffb0872..000000000
--- a/newlib/libc/sys/linux/include/net/if_gif.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* $FreeBSD: src/sys/net/if_gif.h,v 1.11 2002/03/24 09:34:04 bde Exp $ */
-/* $KAME: if_gif.h,v 1.17 2000/09/11 11:36:41 sumikawa Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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_gif.h
- */
-
-#ifndef _NET_IF_GIF_H_
-#define _NET_IF_GIF_H_
-
-
-#ifdef _KERNEL
-#include "opt_inet.h"
-#include "opt_inet6.h"
-
-#include <netinet/in.h>
-/* xxx sigh, why route have struct route instead of pointer? */
-
-struct encaptab;
-
-extern void (*ng_gif_input_p)(struct ifnet *ifp, struct mbuf **mp,
- int af);
-extern void (*ng_gif_input_orphan_p)(struct ifnet *ifp, struct mbuf *m,
- int af);
-extern int (*ng_gif_output_p)(struct ifnet *ifp, struct mbuf **mp);
-extern void (*ng_gif_attach_p)(struct ifnet *ifp);
-extern void (*ng_gif_detach_p)(struct ifnet *ifp);
-
-struct gif_softc {
- struct ifnet gif_if; /* common area - must be at the top */
- struct sockaddr *gif_psrc; /* Physical src addr */
- struct sockaddr *gif_pdst; /* Physical dst addr */
- union {
- struct route gifscr_ro; /* xxx */
-#ifdef INET6
- struct route_in6 gifscr_ro6; /* xxx */
-#endif
- } gifsc_gifscr;
- int gif_flags;
- const struct encaptab *encap_cookie4;
- const struct encaptab *encap_cookie6;
- void *gif_netgraph; /* ng_gif(4) netgraph node info */
- LIST_ENTRY(gif_softc) gif_link; /* all gif's are linked */
-};
-
-#define gif_ro gifsc_gifscr.gifscr_ro
-#ifdef INET6
-#define gif_ro6 gifsc_gifscr.gifscr_ro6
-#endif
-
-#define GIF_MTU (1280) /* Default MTU */
-#define GIF_MTU_MIN (1280) /* Minimum MTU */
-#define GIF_MTU_MAX (8192) /* Maximum MTU */
-
-/* Prototypes */
-void gif_input(struct mbuf *, int, struct ifnet *);
-int gif_output(struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *);
-int gif_ioctl(struct ifnet *, u_long, caddr_t);
-
-#endif /* _KERNEL */
-
-#endif /* _NET_IF_GIF_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_ieee80211.h b/newlib/libc/sys/linux/include/net/if_ieee80211.h
deleted file mode 100644
index 0757f9d43..000000000
--- a/newlib/libc/sys/linux/include/net/if_ieee80211.h
+++ /dev/null
@@ -1,273 +0,0 @@
-/* $NetBSD: if_ieee80211.h,v 1.5 2000/07/21 04:47:40 onoe Exp $ */
-/* $FreeBSD: src/sys/net/if_ieee80211.h,v 1.6 2002/04/11 05:43:10 imp Exp $ */
-
-#ifndef _NET_IF_IEEE80211_H_
-#define _NET_IF_IEEE80211_H_
-
-/*
- * generic definitions for IEEE 802.11 frames
- */
-struct ieee80211_frame {
- u_int8_t i_fc[2];
- u_int8_t i_dur[2];
- u_int8_t i_addr1[ETHER_ADDR_LEN];
- u_int8_t i_addr2[ETHER_ADDR_LEN];
- u_int8_t i_addr3[ETHER_ADDR_LEN];
- u_int8_t i_seq[2];
- /* possibly followed by addr4[ETHER_ADDR_LEN]; */
-};
-
-#define IEEE80211_FC0_VERSION_MASK 0x03
-#define IEEE80211_FC0_VERSION_0 0x00
-#define IEEE80211_FC0_TYPE_MASK 0x0c
-#define IEEE80211_FC0_TYPE_MGT 0x00
-#define IEEE80211_FC0_TYPE_CTL 0x04
-#define IEEE80211_FC0_TYPE_DATA 0x08
-
-#define IEEE80211_FC0_SUBTYPE_MASK 0xf0
-/* for TYPE_MGT */
-#define IEEE80211_FC0_SUBTYPE_ASSOC_REQ 0x00
-#define IEEE80211_FC0_SUBTYPE_ASSOC_RESP 0x10
-#define IEEE80211_FC0_SUBTYPE_REASSOC_REQ 0x20
-#define IEEE80211_FC0_SUBTYPE_REASSOC_RESP 0x30
-#define IEEE80211_FC0_SUBTYPE_PROBE_REQ 0x40
-#define IEEE80211_FC0_SUBTYPE_PROBE_RESP 0x50
-#define IEEE80211_FC0_SUBTYPE_BEACON 0x80
-#define IEEE80211_FC0_SUBTYPE_ATIM 0x90
-#define IEEE80211_FC0_SUBTYPE_DISASSOC 0xa0
-#define IEEE80211_FC0_SUBTYPE_AUTH 0xb0
-#define IEEE80211_FC0_SUBTYPE_DEAUTH 0xc0
-/* for TYPE_CTL */
-#define IEEE80211_FC0_SUBTYPE_PS_POLL 0xa0
-#define IEEE80211_FC0_SUBTYPE_RTS 0xb0
-#define IEEE80211_FC0_SUBTYPE_CTS 0xc0
-#define IEEE80211_FC0_SUBTYPE_ACK 0xd0
-#define IEEE80211_FC0_SUBTYPE_CF_END 0xe0
-#define IEEE80211_FC0_SUBTYPE_CF_END_ACK 0xf0
-/* for TYPE_DATA (bit combination) */
-#define IEEE80211_FC0_SUBTYPE_DATA 0x00
-#define IEEE80211_FC0_SUBTYPE_CF_ACK 0x10
-#define IEEE80211_FC0_SUBTYPE_CF_POLL 0x20
-#define IEEE80211_FC0_SUBTYPE_CF_ACPL 0x30
-#define IEEE80211_FC0_SUBTYPE_NODATA 0x40
-#define IEEE80211_FC0_SUBTYPE_CFACK 0x50
-#define IEEE80211_FC0_SUBTYPE_CFPOLL 0x60
-#define IEEE80211_FC0_SUBTYPE_CF_ACK_CF_ACK 0x70
-
-#define IEEE80211_FC1_DIR_MASK 0x03
-#define IEEE80211_FC1_DIR_NODS 0x00 /* STA->STA */
-#define IEEE80211_FC1_DIR_TODS 0x01 /* STA->AP */
-#define IEEE80211_FC1_DIR_FROMDS 0x02 /* AP ->STA */
-#define IEEE80211_FC1_DIR_DSTODS 0x03 /* AP ->AP */
-
-#define IEEE80211_FC1_MORE_FRAG 0x04
-#define IEEE80211_FC1_RETRY 0x08
-#define IEEE80211_FC1_PWR_MGT 0x10
-#define IEEE80211_FC1_MORE_DATA 0x20
-#define IEEE80211_FC1_WEP 0x40
-#define IEEE80211_FC1_ORDER 0x80
-
-#define IEEE80211_NWID_LEN 32
-
-/*
- * BEACON management packets
- *
- * octect timestamp[8]
- * octect beacon interval[2]
- * octect capability information[2]
- * information element
- * octect elemid
- * octect length
- * octect information[length[
- */
-typedef u_int8_t * ieee80211_mgt_beacon_t;
-
-#define IEEE80211_BEACON_INTERVAL(beacon) \
- (beacon[8] + (beacon[9] << 8))
-#define IEEE80211_BEACON_CAPABILITY(beacon) \
- (beacon[10] + (beacon[11] << 8))
-
-#define IEEE80211_CAPINFO_ESS 0x01
-#define IEEE80211_CAPINFO_IBSS 0x02
-#define IEEE80211_CAPINFO_CF_POLLABLE 0x04
-#define IEEE80211_CAPINFO_CF_POLLREQ 0x08
-#define IEEE80211_CAPINFO_PRIVACY 0x10
-
-
-/*
- * Management information elements
- */
-struct ieee80211_information {
- char ssid[IEEE80211_NWID_LEN+1];
- struct rates {
- u_int8_t *p;
- } rates;
- struct fh {
- u_int16_t dwell;
- u_int8_t set;
- u_int8_t pattern;
- u_int8_t index;
- } fh;
- struct ds {
- u_int8_t channel;
- } ds;
- struct cf {
- u_int8_t count;
- u_int8_t period;
- u_int8_t maxdur[2];
- u_int8_t dur[2];
- } cf;
- struct tim {
- u_int8_t count;
- u_int8_t period;
- u_int8_t bitctl;
- /* u_int8_t pvt[251]; The driver never needs to use this */
- } tim;
- struct ibss {
- u_int16_t atim;
- } ibss;
- struct challenge {
- u_int8_t *p;
- u_int8_t len;
- } challenge;
-};
-
-#define IEEE80211_ELEMID_SSID 0
-#define IEEE80211_ELEMID_RATES 1
-#define IEEE80211_ELEMID_FHPARMS 2
-#define IEEE80211_ELEMID_DSPARMS 3
-#define IEEE80211_ELEMID_CFPARMS 4
-#define IEEE80211_ELEMID_TIM 5
-#define IEEE80211_ELEMID_IBSSPARMS 6
-#define IEEE80211_ELEMID_CHALLENGE 16
-
-/*
- * AUTH management packets
- *
- * octect algo[2]
- * octect seq[2]
- * octect status[2]
- * octect chal.id
- * octect chal.length
- * octect chal.text[253]
- */
-typedef u_int8_t * ieee80211_mgt_auth_t;
-
-#define IEEE80211_AUTH_ALGORITHM(auth) \
- (auth[0] + (auth[1] << 8))
-#define IEEE80211_AUTH_TRANSACTION(auth) \
- (auth[2] + (auth[3] << 8))
-#define IEEE80211_AUTH_STATUS(auth) \
- (auth[4] + (auth[5] << 8))
-
-#define IEEE80211_AUTH_ALG_OPEN 0x0000
-#define IEEE80211_AUTH_ALG_SHARED 0x0001
-
-#define IEEE80211_AUTH_OPEN_REQUEST 1
-#define IEEE80211_AUTH_OPEN_RESPONSE 2
-
-#define IEEE80211_AUTH_SHARED_REQUEST 1
-#define IEEE80211_AUTH_SHARED_CHALLENGE 2
-#define IEEE80211_AUTH_SHARED_RESPONSE 3
-#define IEEE80211_AUTH_SHARED_PASS 4
-
-/*
- * Reason codes
- *
- * Unlisted codes are reserved
- */
-#define IEEE80211_REASON_UNSPECIFIED 1
-#define IEEE80211_REASON_AUTH_EXPIRE 2
-#define IEEE80211_REASON_AUTH_LEAVE 3
-#define IEEE80211_REASON_ASSOC_EXPIRE 4
-#define IEEE80211_REASON_ASSOC_TOOMANY 5
-#define IEEE80211_REASON_NOT_AUTHED 6
-#define IEEE80211_REASON_NOT_ASSOCED 7
-#define IEEE80211_REASON_ASSOC_LEAVE 8
-#define IEEE80211_REASON_ASSOC_NOT_AUTHED 9
-
-/*
- * Status code
- *
- * Unlisted codes are reserved
- */
-#define IEEE80211_STATUS_SUCCESS 0x0000
-#define IEEE80211_STATUS_UNSPECIFIED 1
-#define IEEE80211_STATUS_CAPINFO 10
-#define IEEE80211_STATUS_NOT_ASSOCED 11
-#define IEEE80211_STATUS_OTHER 12
-#define IEEE80211_STATUS_ALG 13
-#define IEEE80211_STATUS_SEQUENCE 14
-#define IEEE80211_STATUS_CHALLENGE 15
-#define IEEE80211_STATUS_TIMEOUT 16
-#define IEEE80211_STATUS_TOO_MANY_STATIONS 17
-#define IEEE80211_STATUS_RATES 18
-
-#define IEEE80211_WEP_KEYLEN 5 /* 40bit */
-#define IEEE80211_WEP_IVLEN 3 /* 24bit */
-#define IEEE80211_WEP_KIDLEN 1 /* 1 octet */
-#define IEEE80211_WEP_CRCLEN 4 /* CRC-32 */
-#define IEEE80211_WEP_NKID 4 /* number of key ids */
-
-/* nwid is pointed at by ifr.ifr_data */
-struct ieee80211_nwid {
- u_int8_t i_len;
- u_int8_t i_nwid[IEEE80211_NWID_LEN];
-};
-
-#define SIOCS80211NWID _IOWR('i', 230, struct ifreq)
-#define SIOCG80211NWID _IOWR('i', 231, struct ifreq)
-
-/* the first member must be matched with struct ifreq */
-struct ieee80211_nwkey {
- char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
- int i_wepon; /* wep enabled flag */
- int i_defkid; /* default encrypt key id */
- struct {
- int i_keylen;
- u_int8_t *i_keydat;
- } i_key[IEEE80211_WEP_NKID];
-};
-#define SIOCS80211NWKEY _IOW('i', 232, struct ieee80211_nwkey)
-#define SIOCG80211NWKEY _IOWR('i', 233, struct ieee80211_nwkey)
-
-#define IEEE80211_WEP_NOSUP -1
-#define IEEE80211_WEP_OFF 0
-#define IEEE80211_WEP_ON 1
-#define IEEE80211_WEP_MIXED 2
-
-#define IEEE80211_AUTH_NONE 0
-#define IEEE80211_AUTH_OPEN 1
-#define IEEE80211_AUTH_SHARED 2
-
-#define IEEE80211_POWERSAVE_NOSUP -1
-#define IEEE80211_POWERSAVE_OFF 0
-#define IEEE80211_POWERSAVE_CAM 1
-#define IEEE80211_POWERSAVE_PSP 2
-#define IEEE80211_POWERSAVE_PSP_CAM 3
-#define IEEE80211_POWERSAVE_ON IEEE80211_POWERSAVE_CAM
-
-/* the first member must be matched with struct ifreq */
-struct ieee80211req {
- char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
- u_int16_t i_type; /* req type */
- int16_t i_val; /* Index or simple value */
- int16_t i_len; /* Index or simple value */
- void *i_data; /* Extra data */
-};
-#define SIOCS80211 _IOW('i', 234, struct ieee80211req)
-#define SIOCG80211 _IOWR('i', 235, struct ieee80211req)
-
-#define IEEE80211_IOC_SSID 1
-#define IEEE80211_IOC_NUMSSIDS 2
-#define IEEE80211_IOC_WEP 3
-#define IEEE80211_IOC_WEPKEY 4
-#define IEEE80211_IOC_NUMWEPKEYS 5
-#define IEEE80211_IOC_WEPTXKEY 6
-#define IEEE80211_IOC_AUTHMODE 7
-#define IEEE80211_IOC_STATIONNAME 8
-#define IEEE80211_IOC_CHANNEL 9
-#define IEEE80211_IOC_POWERSAVE 10
-#define IEEE80211_IOC_POWERSAVESLEEP 11
-
-#endif /* !_NET_IF_IEEE80211_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_llc.h b/newlib/libc/sys/linux/include/net/if_llc.h
deleted file mode 100644
index ec2b75b31..000000000
--- a/newlib/libc/sys/linux/include/net/if_llc.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* $NetBSD: if_llc.h,v 1.12 1999/11/19 20:41:19 thorpej Exp $ */
-
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_llc.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/net/if_llc.h,v 1.8 2002/03/29 06:58:45 mdodd Exp $
- */
-
-#ifndef _NET_IF_LLC_H_
-#define _NET_IF_LLC_H_
-
-/*
- * IEEE 802.2 Link Level Control headers, for use in conjunction with
- * 802.{3,4,5} media access control methods.
- *
- * Headers here do not use bit fields due to shortcommings in many
- * compilers.
- */
-
-struct llc {
- u_int8_t llc_dsap;
- u_int8_t llc_ssap;
- union {
- struct {
- u_int8_t control;
- u_int8_t format_id;
- u_int8_t class;
- u_int8_t window_x2;
- } type_u __attribute__((__packed__));
- struct {
- u_int8_t num_snd_x2;
- u_int8_t num_rcv_x2;
- } type_i __attribute__((__packed__));
- struct {
- u_int8_t control;
- u_int8_t num_rcv_x2;
- } type_s __attribute__((__packed__));
- struct {
- u_int8_t control;
- /*
- * We cannot put the following fields in a structure because
- * the structure rounding might cause padding.
- */
- u_int8_t frmr_rej_pdu0;
- u_int8_t frmr_rej_pdu1;
- u_int8_t frmr_control;
- u_int8_t frmr_control_ext;
- u_int8_t frmr_cause;
- } type_frmr __attribute__((__packed__));
- struct {
- u_int8_t control;
- u_int8_t org_code[3];
- u_int16_t ether_type;
- } type_snap __attribute__((__packed__));
- struct {
- u_int8_t control;
- u_int8_t control_ext;
- } type_raw __attribute__((__packed__));
- } llc_un /* XXX __attribute__((__packed__)) ??? */;
-} __attribute__((__packed__));
-
-struct frmrinfo {
- u_int8_t frmr_rej_pdu0;
- u_int8_t frmr_rej_pdu1;
- u_int8_t frmr_control;
- u_int8_t frmr_control_ext;
- u_int8_t frmr_cause;
-} __attribute__((__packed__));
-
-#define llc_control llc_un.type_u.control
-#define llc_control_ext llc_un.type_raw.control_ext
-#define llc_fid llc_un.type_u.format_id
-#define llc_class llc_un.type_u.class
-#define llc_window llc_un.type_u.window_x2
-#define llc_frmrinfo llc_un.type_frmr.frmr_rej_pdu0
-#define llc_frmr_pdu0 llc_un.type_frmr.frmr_rej_pdu0
-#define llc_frmr_pdu1 llc_un.type_frmr.frmr_rej_pdu1
-#define llc_frmr_control llc_un.type_frmr.frmr_control
-#define llc_frmr_control_ext llc_un.type_frmr.frmr_control_ext
-#define llc_frmr_cause llc_un.type_frmr.frmr_cause
-#define llc_snap llc_un.type_snap
-
-/*
- * Don't use sizeof(struct llc_un) for LLC header sizes
- */
-#define LLC_ISFRAMELEN 4
-#define LLC_UFRAMELEN 3
-#define LLC_FRMRLEN 7
-#define LLC_SNAPFRAMELEN 8
-
-/*
- * Unnumbered LLC format commands
- */
-#define LLC_UI 0x3
-#define LLC_UI_P 0x13
-#define LLC_DISC 0x43
-#define LLC_DISC_P 0x53
-#define LLC_UA 0x63
-#define LLC_UA_P 0x73
-#define LLC_TEST 0xe3
-#define LLC_TEST_P 0xf3
-#define LLC_FRMR 0x87
-#define LLC_FRMR_P 0x97
-#define LLC_DM 0x0f
-#define LLC_DM_P 0x1f
-#define LLC_XID 0xaf
-#define LLC_XID_P 0xbf
-#define LLC_SABME 0x6f
-#define LLC_SABME_P 0x7f
-
-/*
- * Supervisory LLC commands
- */
-#define LLC_RR 0x01
-#define LLC_RNR 0x05
-#define LLC_REJ 0x09
-
-/*
- * Info format - dummy only
- */
-#define LLC_INFO 0x00
-
-/*
- * ISO PDTR 10178 contains among others
- */
-#define LLC_X25_LSAP 0x7e
-#define LLC_SNAP_LSAP 0xaa
-#define LLC_ISO_LSAP 0xfe
-
-#endif /* _NET_IF_LLC_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_media.h b/newlib/libc/sys/linux/include/net/if_media.h
deleted file mode 100644
index 80599bdc0..000000000
--- a/newlib/libc/sys/linux/include/net/if_media.h
+++ /dev/null
@@ -1,409 +0,0 @@
-/* $NetBSD: if_media.h,v 1.3 1997/03/26 01:19:27 thorpej Exp $ */
-/* $FreeBSD: src/sys/net/if_media.h,v 1.17 2002/05/07 18:16:39 imp Exp $ */
-
-/*
- * Copyright (c) 1997
- * Jonathan Stone and Jason R. Thorpe. All rights reserved.
- *
- * This software is derived from information provided by Matt Thomas.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Jonathan Stone
- * and Jason R. Thorpe for the NetBSD Project.
- * 4. The names of the authors may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``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.
- */
-
-#ifndef _NET_IF_MEDIA_H_
-#define _NET_IF_MEDIA_H_
-
-/*
- * Prototypes and definitions for BSD/OS-compatible network interface
- * media selection.
- *
- * Where it is safe to do so, this code strays slightly from the BSD/OS
- * design. Software which uses the API (device drivers, basically)
- * shouldn't notice any difference.
- *
- * Many thanks to Matt Thomas for providing the information necessary
- * to implement this interface.
- */
-
-#ifdef _KERNEL
-
-#include <sys/queue.h>
-
-/*
- * Driver callbacks for media status and change requests.
- */
-typedef int (*ifm_change_cb_t)(struct ifnet *ifp);
-typedef void (*ifm_stat_cb_t)(struct ifnet *ifp, struct ifmediareq *req);
-
-/*
- * In-kernel representation of a single supported media type.
- */
-struct ifmedia_entry {
- LIST_ENTRY(ifmedia_entry) ifm_list;
- int ifm_media; /* description of this media attachment */
- int ifm_data; /* for driver-specific use */
- void *ifm_aux; /* for driver-specific use */
-};
-
-/*
- * One of these goes into a network interface's softc structure.
- * It is used to keep general media state.
- */
-struct ifmedia {
- int ifm_mask; /* mask of changes we don't care about */
- int ifm_media; /* current user-set media word */
- struct ifmedia_entry *ifm_cur; /* currently selected media */
- LIST_HEAD(, ifmedia_entry) ifm_list; /* list of all supported media */
- ifm_change_cb_t ifm_change; /* media change driver callback */
- ifm_stat_cb_t ifm_status; /* media status driver callback */
-};
-
-/* Initialize an interface's struct if_media field. */
-void ifmedia_init(struct ifmedia *ifm, int dontcare_mask,
- ifm_change_cb_t change_callback, ifm_stat_cb_t status_callback);
-
-/* Remove all mediums from a struct ifmedia. */
-void ifmedia_removeall( struct ifmedia *ifm);
-
-/* Add one supported medium to a struct ifmedia. */
-void ifmedia_add(struct ifmedia *ifm, int mword, int data, void *aux);
-
-/* Add an array (of ifmedia_entry) media to a struct ifmedia. */
-void ifmedia_list_add(struct ifmedia *mp, struct ifmedia_entry *lp,
- int count);
-
-/* Set default media type on initialization. */
-void ifmedia_set(struct ifmedia *ifm, int mword);
-
-/* Common ioctl function for getting/setting media, called by driver. */
-int ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr,
- struct ifmedia *ifm, u_long cmd);
-
-#endif /*_KERNEL */
-
-/*
- * if_media Options word:
- * Bits Use
- * ---- -------
- * 0-4 Media variant
- * 5-7 Media type
- * 8-15 Type specific options
- * 16-19 RFU
- * 20-27 Shared (global) options
- * 28-31 Instance
- */
-
-/*
- * Ethernet
- */
-#define IFM_ETHER 0x00000020
-#define IFM_10_T 3 /* 10BaseT - RJ45 */
-#define IFM_10_2 4 /* 10Base2 - Thinnet */
-#define IFM_10_5 5 /* 10Base5 - AUI */
-#define IFM_100_TX 6 /* 100BaseTX - RJ45 */
-#define IFM_100_FX 7 /* 100BaseFX - Fiber */
-#define IFM_100_T4 8 /* 100BaseT4 - 4 pair cat 3 */
-#define IFM_100_VG 9 /* 100VG-AnyLAN */
-#define IFM_100_T2 10 /* 100BaseT2 */
-#define IFM_1000_SX 11 /* 1000BaseSX - multi-mode fiber */
-#define IFM_10_STP 12 /* 10BaseT over shielded TP */
-#define IFM_10_FL 13 /* 10BaseFL - Fiber */
-#define IFM_1000_LX 14 /* 1000baseLX - single-mode fiber */
-#define IFM_1000_CX 15 /* 1000baseCX - 150ohm STP */
-#define IFM_1000_T 16 /* 1000baseT - 4 pair cat 5 */
-#define IFM_HPNA_1 17 /* HomePNA 1.0 (1Mb/s) */
-/* note 31 is the max! */
-
-#define IFM_ETH_MASTER 0x00000100 /* master mode (1000baseT) */
-
-/*
- * Token ring
- */
-#define IFM_TOKEN 0x00000040
-#define IFM_TOK_STP4 3 /* Shielded twisted pair 4m - DB9 */
-#define IFM_TOK_STP16 4 /* Shielded twisted pair 16m - DB9 */
-#define IFM_TOK_UTP4 5 /* Unshielded twisted pair 4m - RJ45 */
-#define IFM_TOK_UTP16 6 /* Unshielded twisted pair 16m - RJ45 */
-#define IFM_TOK_STP100 7 /* Shielded twisted pair 100m - DB9 */
-#define IFM_TOK_UTP100 8 /* Unshielded twisted pair 100m - RJ45 */
-#define IFM_TOK_ETR 0x00000200 /* Early token release */
-#define IFM_TOK_SRCRT 0x00000400 /* Enable source routing features */
-#define IFM_TOK_ALLR 0x00000800 /* All routes / Single route bcast */
-#define IFM_TOK_DTR 0x00002000 /* Dedicated token ring */
-#define IFM_TOK_CLASSIC 0x00004000 /* Classic token ring */
-#define IFM_TOK_AUTO 0x00008000 /* Automatic Dedicate/Classic token ring */
-
-/*
- * FDDI
- */
-#define IFM_FDDI 0x00000060
-#define IFM_FDDI_SMF 3 /* Single-mode fiber */
-#define IFM_FDDI_MMF 4 /* Multi-mode fiber */
-#define IFM_FDDI_UTP 5 /* CDDI / UTP */
-#define IFM_FDDI_DA 0x00000100 /* Dual attach / single attach */
-
-/*
- * IEEE 802.11 Wireless
- */
-#define IFM_IEEE80211 0x00000080
-#define IFM_IEEE80211_FH1 3 /* Frequency Hopping 1Mbps */
-#define IFM_IEEE80211_FH2 4 /* Frequency Hopping 2Mbps */
-#define IFM_IEEE80211_DS1 5 /* Direct Sequence 1Mbps */
-#define IFM_IEEE80211_DS2 6 /* Direct Sequence 2Mbps */
-#define IFM_IEEE80211_DS5 7 /* Direct Sequence 5.5Mbps */
-#define IFM_IEEE80211_DS11 8 /* Direct Sequence 11Mbps */
-#define IFM_IEEE80211_DS22 9 /* Direct Sequence 22Mbps */
-#define IFM_IEEE80211_ADHOC 0x00000100 /* Operate in Adhoc mode */
-#define IFM_IEEE80211_HOSTAP 0x00000200 /* Operate in Host AP mode */
-#define IFM_IEEE80211_IBSS 0x00000400 /* Operate in IBSS mode */
-#define IFM_IEEE80211_IBSSMASTER 0x00000800 /* Operate as an IBSS master */
-
-/*
- * Shared media sub-types
- */
-#define IFM_AUTO 0 /* Autoselect best media */
-#define IFM_MANUAL 1 /* Jumper/dipswitch selects media */
-#define IFM_NONE 2 /* Deselect all media */
-
-/*
- * Shared options
- */
-#define IFM_FDX 0x00100000 /* Force full duplex */
-#define IFM_HDX 0x00200000 /* Force half duplex */
-#define IFM_FLAG0 0x01000000 /* Driver defined flag */
-#define IFM_FLAG1 0x02000000 /* Driver defined flag */
-#define IFM_FLAG2 0x04000000 /* Driver defined flag */
-#define IFM_LOOP 0x08000000 /* Put hardware in loopback */
-
-/*
- * Masks
- */
-#define IFM_NMASK 0x000000e0 /* Network type */
-#define IFM_TMASK 0x0000001f /* Media sub-type */
-#define IFM_IMASK 0xf0000000 /* Instance */
-#define IFM_ISHIFT 28 /* Instance shift */
-#define IFM_OMASK 0x0000ff00 /* Type specific options */
-#define IFM_GMASK 0x0ff00000 /* Global options */
-
-/*
- * Status bits
- */
-#define IFM_AVALID 0x00000001 /* Active bit valid */
-#define IFM_ACTIVE 0x00000002 /* Interface attached to working net */
-
-/*
- * Macros to extract various bits of information from the media word.
- */
-#define IFM_TYPE(x) ((x) & IFM_NMASK)
-#define IFM_SUBTYPE(x) ((x) & IFM_TMASK)
-#define IFM_TYPE_OPTIONS(x) ((x) & IFM_OMASK)
-#define IFM_INST(x) (((x) & IFM_IMASK) >> IFM_ISHIFT)
-#define IFM_OPTIONS(x) ((x) & (IFM_OMASK|IFM_GMASK))
-
-#define IFM_INST_MAX IFM_INST(IFM_IMASK)
-
-/*
- * Macro to create a media word.
- */
-#define IFM_MAKEWORD(type, subtype, options, instance) \
- ((type) | (subtype) | (options) | ((instance) << IFM_ISHIFT))
-
-/*
- * NetBSD extension not defined in the BSDI API. This is used in various
- * places to get the canonical description for a given type/subtype.
- *
- * NOTE: all but the top-level type descriptions must contain NO whitespace!
- * Otherwise, parsing these in ifconfig(8) would be a nightmare.
- */
-struct ifmedia_description {
- int ifmt_word; /* word value; may be masked */
- const char *ifmt_string; /* description */
-};
-
-#define IFM_TYPE_DESCRIPTIONS { \
- { IFM_ETHER, "Ethernet" }, \
- { IFM_TOKEN, "Token ring" }, \
- { IFM_FDDI, "FDDI" }, \
- { IFM_IEEE80211, "IEEE 802.11 Wireless Ethernet" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_ETHERNET_DESCRIPTIONS { \
- { IFM_10_T, "10baseT/UTP" }, \
- { IFM_10_2, "10base2/BNC" }, \
- { IFM_10_5, "10base5/AUI" }, \
- { IFM_100_TX, "100baseTX" }, \
- { IFM_100_FX, "100baseFX" }, \
- { IFM_100_T4, "100baseT4" }, \
- { IFM_100_VG, "100baseVG" }, \
- { IFM_100_T2, "100baseT2" }, \
- { IFM_10_STP, "10baseSTP" }, \
- { IFM_10_FL, "10baseFL" }, \
- { IFM_1000_SX, "1000baseSX" }, \
- { IFM_1000_LX, "1000baseLX" }, \
- { IFM_1000_CX, "1000baseCX" }, \
- { IFM_1000_T, "1000baseTX" }, \
- { IFM_1000_T, "1000baseT" }, \
- { IFM_HPNA_1, "homePNA" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_ETHERNET_ALIASES { \
- { IFM_10_T, "UTP" }, \
- { IFM_10_T, "10UTP" }, \
- { IFM_10_2, "BNC" }, \
- { IFM_10_2, "10BNC" }, \
- { IFM_10_5, "AUI" }, \
- { IFM_10_5, "10AUI" }, \
- { IFM_100_TX, "100TX" }, \
- { IFM_100_T4, "100T4" }, \
- { IFM_100_VG, "100VG" }, \
- { IFM_100_T2, "100T2" }, \
- { IFM_10_STP, "10STP" }, \
- { IFM_10_FL, "10FL" }, \
- { IFM_1000_SX, "1000SX" }, \
- { IFM_1000_LX, "1000LX" }, \
- { IFM_1000_CX, "1000CX" }, \
- { IFM_1000_T, "1000TX" }, \
- { IFM_1000_T, "1000T" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS { \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_TOKENRING_DESCRIPTIONS { \
- { IFM_TOK_STP4, "DB9/4Mbit" }, \
- { IFM_TOK_STP16, "DB9/16Mbit" }, \
- { IFM_TOK_UTP4, "UTP/4Mbit" }, \
- { IFM_TOK_UTP16, "UTP/16Mbit" }, \
- { IFM_TOK_STP100, "STP/100Mbit" }, \
- { IFM_TOK_UTP100, "UTP/100Mbit" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_TOKENRING_ALIASES { \
- { IFM_TOK_STP4, "4STP" }, \
- { IFM_TOK_STP16, "16STP" }, \
- { IFM_TOK_UTP4, "4UTP" }, \
- { IFM_TOK_UTP16, "16UTP" }, \
- { IFM_TOK_STP100, "100STP" }, \
- { IFM_TOK_UTP100, "100UTP" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_TOKENRING_OPTION_DESCRIPTIONS { \
- { IFM_TOK_ETR, "EarlyTokenRelease" }, \
- { IFM_TOK_SRCRT, "SourceRouting" }, \
- { IFM_TOK_ALLR, "AllRoutes" }, \
- { IFM_TOK_DTR, "Dedicated" }, \
- { IFM_TOK_CLASSIC,"Classic" }, \
- { IFM_TOK_AUTO, " " }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_FDDI_DESCRIPTIONS { \
- { IFM_FDDI_SMF, "Single-mode" }, \
- { IFM_FDDI_MMF, "Multi-mode" }, \
- { IFM_FDDI_UTP, "UTP" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_FDDI_ALIASES { \
- { IFM_FDDI_SMF, "SMF" }, \
- { IFM_FDDI_MMF, "MMF" }, \
- { IFM_FDDI_UTP, "CDDI" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_FDDI_OPTION_DESCRIPTIONS { \
- { IFM_FDDI_DA, "Dual-attach" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_IEEE80211_DESCRIPTIONS { \
- { IFM_IEEE80211_FH1, "FH/1Mbps" }, \
- { IFM_IEEE80211_FH2, "FH/2Mbps" }, \
- { IFM_IEEE80211_DS1, "DS/1Mbps" }, \
- { IFM_IEEE80211_DS2, "DS/2Mbps" }, \
- { IFM_IEEE80211_DS5, "DS/5.5Mbps" }, \
- { IFM_IEEE80211_DS11, "DS/11Mbps" }, \
- { IFM_IEEE80211_DS22, "DS/22Mbps" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_IEEE80211_ALIASES { \
- { IFM_IEEE80211_FH1, "FH1" }, \
- { IFM_IEEE80211_FH2, "FH2" }, \
- { IFM_IEEE80211_FH1, "FrequencyHopping/1Mbps" }, \
- { IFM_IEEE80211_FH2, "FrequencyHopping/2Mbps" }, \
- { IFM_IEEE80211_DS1, "DS1" }, \
- { IFM_IEEE80211_DS2, "DS2" }, \
- { IFM_IEEE80211_DS5, "DS5.5" }, \
- { IFM_IEEE80211_DS11, "DS11" }, \
- { IFM_IEEE80211_DS22, "DS22" }, \
- { IFM_IEEE80211_DS1, "DirectSequence/1Mbps" }, \
- { IFM_IEEE80211_DS2, "DirectSequence/2Mbps" }, \
- { IFM_IEEE80211_DS5, "DirectSequence/5.5Mbps" }, \
- { IFM_IEEE80211_DS11, "DirectSequence/11Mbps" }, \
- { IFM_IEEE80211_DS22, "DirectSequence/22Mbps" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_IEEE80211_OPTION_DESCRIPTIONS { \
- { IFM_IEEE80211_ADHOC, "adhoc" }, \
- { IFM_IEEE80211_HOSTAP, "hostap" }, \
- { IFM_IEEE80211_IBSS, "ibss" }, \
- { IFM_IEEE80211_IBSSMASTER, "ibss-master" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_SHARED_DESCRIPTIONS { \
- { IFM_AUTO, "autoselect" }, \
- { IFM_MANUAL, "manual" }, \
- { IFM_NONE, "none" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SUBTYPE_SHARED_ALIASES { \
- { IFM_AUTO, "auto" }, \
- { 0, NULL }, \
-}
-
-#define IFM_SHARED_OPTION_DESCRIPTIONS { \
- { IFM_FDX, "full-duplex" }, \
- { IFM_HDX, "half-duplex" }, \
- { IFM_FLAG0, "flag0" }, \
- { IFM_FLAG1, "flag1" }, \
- { IFM_FLAG2, "flag2" }, \
- { IFM_LOOP, "hw-loopback" }, \
- { 0, NULL }, \
-}
-
-#endif /* _NET_IF_MEDIA_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_mib.h b/newlib/libc/sys/linux/include/net/if_mib.h
deleted file mode 100644
index b1a7bcfd5..000000000
--- a/newlib/libc/sys/linux/include/net/if_mib.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright 1996 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that both the above copyright notice and this
- * permission notice appear in all copies, that both the above
- * copyright notice and this permission notice appear in all
- * supporting documentation, and that the name of M.I.T. not be used
- * in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. M.I.T. makes
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
- * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
- * SHALL M.I.T. 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: src/sys/net/if_mib.h,v 1.6 1999/08/28 00:48:19 peter Exp $
- */
-
-#ifndef _NET_IF_MIB_H
-#define _NET_IF_MIB_H 1
-
-struct ifmibdata {
- char ifmd_name[IFNAMSIZ]; /* name of interface */
- int ifmd_pcount; /* number of promiscuous listeners */
- int ifmd_flags; /* interface flags */
- int ifmd_snd_len; /* instantaneous length of send queue */
- int ifmd_snd_maxlen; /* maximum length of send queue */
- int ifmd_snd_drops; /* number of drops in send queue */
- int ifmd_filler[4]; /* for future expansion */
- struct if_data ifmd_data; /* generic information and statistics */
-};
-
-/*
- * sysctl MIB tags at the net.link.generic level
- */
-#define IFMIB_SYSTEM 1 /* non-interface-specific */
-#define IFMIB_IFDATA 2 /* per-interface data table */
-
-/*
- * MIB tags for the various net.link.generic.ifdata tables
- */
-#define IFDATA_GENERAL 1 /* generic stats for all kinds of ifaces */
-#define IFDATA_LINKSPECIFIC 2 /* specific to the type of interface */
-
-/*
- * MIB tags at the net.link.generic.system level
- */
-#define IFMIB_IFCOUNT 1 /* number of interfaces configured */
-
-/*
- * MIB tags as the net.link level
- * All of the other values are IFT_* names defined in if_types.h.
- */
-#define NETLINK_GENERIC 0 /* functions not specific to a type of iface */
-
-/*
- * The reason why the IFDATA_LINKSPECIFIC stuff is not under the
- * net.link.<iftype> branches is twofold:
- * 1) It's easier to code this way, and doesn't require duplication.
- * 2) The fourth level under net.link.<iftype> is <pf>; that is to say,
- * the net.link.<iftype> tree instruments the adaptation layers between
- * <iftype> and a particular protocol family (e.g., net.link.ether.inet
- * instruments ARP). This does not really leave room for anything else
- * that needs to have a well-known number.
- */
-
-/*
- * Link-specific MIB structures for various link types.
- */
-
-/* For IFT_ETHER, IFT_ISO88023, and IFT_STARLAN, as used by RFC 1650 */
-struct ifmib_iso_8802_3 {
- u_int32_t dot3StatsAlignmentErrors;
- u_int32_t dot3StatsFCSErrors;
- u_int32_t dot3StatsSingleCollisionFrames;
- u_int32_t dot3StatsMultipleCollisionFrames;
- u_int32_t dot3StatsSQETestErrors;
- u_int32_t dot3StatsDeferredTransmissions;
- u_int32_t dot3StatsLateCollisions;
- u_int32_t dot3StatsExcessiveCollisions;
- u_int32_t dot3StatsInternalMacTransmitErrors;
- u_int32_t dot3StatsCarrierSenseErrors;
- u_int32_t dot3StatsFrameTooLongs;
- u_int32_t dot3StatsInternalMacReceiveErrors;
- u_int32_t dot3StatsEtherChipSet;
- /* Matt Thomas wants this one, not included in RFC 1650: */
- u_int32_t dot3StatsMissedFrames;
-
- u_int32_t dot3StatsCollFrequencies[16]; /* NB: index origin */
-
- u_int32_t dot3Compliance;
-#define DOT3COMPLIANCE_STATS 1
-#define DOT3COMPLIANCE_COLLS 2
-};
-
-/*
- * Chipset identifiers are normally part of the vendor's enterprise MIB.
- * However, we don't want to be trying to represent arbitrary-length
- * OBJECT IDENTIFIERs here (ick!), and the right value is not necessarily
- * obvious to the driver implementor. So, we define our own identification
- * mechanism here, and let the agent writer deal with the translation.
- */
-#define DOT3CHIPSET_VENDOR(x) ((x) >> 16)
-#define DOT3CHIPSET_PART(x) ((x) & 0xffff)
-#define DOT3CHIPSET(v,p) (((v) << 16) + ((p) & 0xffff))
-
-/* Driver writers! Add your vendors here! */
-enum dot3Vendors {
- dot3VendorAMD = 1,
- dot3VendorIntel = 2,
- dot3VendorNational = 4,
- dot3VendorFujitsu = 5,
- dot3VendorDigital = 6,
- dot3VendorWesternDigital = 7
-};
-
-/* Driver writers! Add your chipsets here! */
-enum {
- dot3ChipSetAMD7990 = 1,
- dot3ChipSetAMD79900 = 2,
- dot3ChipSetAMD79C940 = 3
-};
-
-enum {
- dot3ChipSetIntel82586 = 1,
- dot3ChipSetIntel82596 = 2,
- dot3ChipSetIntel82557 = 3
-};
-
-enum {
- dot3ChipSetNational8390 = 1,
- dot3ChipSetNationalSonic = 2
-};
-
-enum {
- dot3ChipSetFujitsu86950 = 1
-};
-
-enum {
- dot3ChipSetDigitalDC21040 = 1,
- dot3ChipSetDigitalDC21140 = 2,
- dot3ChipSetDigitalDC21041 = 3,
- dot3ChipSetDigitalDC21140A = 4,
- dot3ChipSetDigitalDC21142 = 5
-};
-
-enum {
- dot3ChipSetWesternDigital83C690 = 1,
- dot3ChipSetWesternDigital83C790 = 2
-};
-/* END of Ethernet-link MIB stuff */
-
-/*
- * Put other types of interface MIBs here, or in interface-specific
- * header files if convenient ones already exist.
- */
-#endif /* _NET_IF_MIB_H */
diff --git a/newlib/libc/sys/linux/include/net/if_ppp.h b/newlib/libc/sys/linux/include/net/if_ppp.h
deleted file mode 100644
index 0d4b6078f..000000000
--- a/newlib/libc/sys/linux/include/net/if_ppp.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * if_ppp.h - Point-to-Point Protocol definitions.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $FreeBSD: src/sys/net/if_ppp.h,v 1.14 1999/08/28 00:48:20 peter Exp $
- */
-
-#ifndef _IF_PPP_H_
-#define _IF_PPP_H_
-
-/* XXX this used to be self-contained. */
-#include <net/ppp_defs.h>
-#include <net/if.h>
-
-/*
- * Packet sizes
- */
-#define PPP_MTU 1500 /* Default MTU (size of Info field) */
-#define PPP_MAXMRU 65000 /* Largest MRU we allow */
-#define PPP_MAXMTU 16384 /* Largest MTU we allow */
-
-/*
- * Bit definitions for flags.
- */
-#define SC_COMP_PROT 0x00000001 /* protocol compression (output) */
-#define SC_COMP_AC 0x00000002 /* header compression (output) */
-#define SC_COMP_TCP 0x00000004 /* TCP (VJ) compression (output) */
-#define SC_NO_TCP_CCID 0x00000008 /* disable VJ connection-id comp. */
-#define SC_REJ_COMP_AC 0x00000010 /* reject adrs/ctrl comp. on input */
-#define SC_REJ_COMP_TCP 0x00000020 /* reject TCP (VJ) comp. on input */
-#define SC_CCP_OPEN 0x00000040 /* Look at CCP packets */
-#define SC_CCP_UP 0x00000080 /* May send/recv compressed packets */
-#define SC_DEBUG 0x00010000 /* enable debug messages */
-#define SC_LOG_INPKT 0x00020000 /* log contents of good pkts recvd */
-#define SC_LOG_OUTPKT 0x00040000 /* log contents of pkts sent */
-#define SC_LOG_RAWIN 0x00080000 /* log all chars received */
-#define SC_LOG_FLUSH 0x00100000 /* log all chars flushed */
-#define SC_RCV_B7_0 0x01000000 /* have rcvd char with bit 7 = 0 */
-#define SC_RCV_B7_1 0x02000000 /* have rcvd char with bit 7 = 1 */
-#define SC_RCV_EVNP 0x04000000 /* have rcvd char with even parity */
-#define SC_RCV_ODDP 0x08000000 /* have rcvd char with odd parity */
-#define SC_MASK 0x0fff00ff /* bits that user can change */
-
-/*
- * State bits in sc_flags, not changeable by user.
- */
-#define SC_TIMEOUT 0x00000400 /* timeout is currently pending */
-#define SC_VJ_RESET 0x00000800 /* need to reset VJ decomp */
-#define SC_COMP_RUN 0x00001000 /* compressor has been initiated */
-#define SC_DECOMP_RUN 0x00002000 /* decompressor has been initiated */
-#define SC_DC_ERROR 0x00004000 /* non-fatal decomp error detected */
-#define SC_DC_FERROR 0x00008000 /* fatal decomp error detected */
-#define SC_TBUSY 0x10000000 /* xmitter doesn't need a packet yet */
-#define SC_PKTLOST 0x20000000 /* have lost or dropped a packet */
-#define SC_FLUSH 0x40000000 /* flush input until next PPP_FLAG */
-#define SC_ESCAPED 0x80000000 /* saw a PPP_ESCAPE */
-
-/*
- * Ioctl definitions.
- */
-
-struct npioctl {
- int protocol; /* PPP procotol, e.g. PPP_IP */
- enum NPmode mode;
-};
-
-/* Structure describing a CCP configuration option, for PPPIOCSCOMPRESS */
-struct ppp_option_data {
- u_char *ptr;
- u_int length;
- int transmit;
-};
-
-struct ifpppstatsreq {
- char ifr_name[IFNAMSIZ];
- struct ppp_stats stats;
-};
-
-struct ifpppcstatsreq {
- char ifr_name[IFNAMSIZ];
- struct ppp_comp_stats stats;
-};
-
-/*
- * Ioctl definitions.
- */
-
-#define PPPIOCGFLAGS _IOR('t', 90, int) /* get configuration flags */
-#define PPPIOCSFLAGS _IOW('t', 89, int) /* set configuration flags */
-#define PPPIOCGASYNCMAP _IOR('t', 88, int) /* get async map */
-#define PPPIOCSASYNCMAP _IOW('t', 87, int) /* set async map */
-#define PPPIOCGUNIT _IOR('t', 86, int) /* get ppp unit number */
-#define PPPIOCGRASYNCMAP _IOR('t', 85, int) /* get receive async map */
-#define PPPIOCSRASYNCMAP _IOW('t', 84, int) /* set receive async map */
-#define PPPIOCGMRU _IOR('t', 83, int) /* get max receive unit */
-#define PPPIOCSMRU _IOW('t', 82, int) /* set max receive unit */
-#define PPPIOCSMAXCID _IOW('t', 81, int) /* set VJ max slot ID */
-#define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm) /* get extended ACCM */
-#define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm) /* set extended ACCM */
-#define PPPIOCXFERUNIT _IO('t', 78) /* transfer PPP unit */
-#define PPPIOCSCOMPRESS _IOW('t', 77, struct ppp_option_data)
-#define PPPIOCGNPMODE _IOWR('t', 76, struct npioctl) /* get NP mode */
-#define PPPIOCSNPMODE _IOW('t', 75, struct npioctl) /* set NP mode */
-#define PPPIOCGIDLE _IOR('t', 74, struct ppp_idle) /* get idle time */
-#define PPPIOCSPASS _IOW('t', 71, struct bpf_program) /* set pass filter */
-#define PPPIOCSACTIVE _IOW('t', 70, struct bpf_program) /* set active filt */
-
-/* PPPIOC[GS]MTU are alternatives to SIOC[GS]IFMTU, used under Ultrix */
-#define PPPIOCGMTU _IOR('t', 73, int) /* get interface MTU */
-#define PPPIOCSMTU _IOW('t', 72, int) /* set interface MTU */
-
-/*
- * These two are interface ioctls so that pppstats can do them on
- * a socket without having to open the serial device.
- */
-#define SIOCGPPPSTATS _IOWR('i', 123, struct ifpppstatsreq)
-#define SIOCGPPPCSTATS _IOWR('i', 122, struct ifpppcstatsreq)
-
-#if !defined(ifr_mtu)
-#define ifr_mtu ifr_ifru.ifru_metric
-#endif
-
-#endif /* _IF_PPP_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_pppvar.h b/newlib/libc/sys/linux/include/net/if_pppvar.h
deleted file mode 100644
index b4380f4ec..000000000
--- a/newlib/libc/sys/linux/include/net/if_pppvar.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * if_pppvar.h - private structures and declarations for PPP.
- *
- * Copyright (c) 1994 The Australian National University.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation is hereby granted, provided that the above copyright
- * notice appears in all copies. This software is provided without any
- * warranty, express or implied. The Australian National University
- * makes no representations about the suitability of this software for
- * any purpose.
- *
- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- *
- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
- * OR MODIFICATIONS.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $FreeBSD: src/sys/net/if_pppvar.h,v 1.19 2002/03/24 09:34:04 bde Exp $
- */
-
-/*
- * Supported network protocols. These values are used for
- * indexing sc_npmode.
- */
-#define NP_IP 0 /* Internet Protocol */
-#define NUM_NP 1 /* Number of NPs. */
-
-/*
- * Structure describing each ppp unit.
- */
-struct ppp_softc {
- struct ifnet sc_if; /* network-visible interface */
-/*hi*/ u_int sc_flags; /* control/status bits; see if_ppp.h */
- struct callout_handle sc_ch; /* Used for scheduling timeouts */
- void *sc_devp; /* pointer to device-dep structure */
- void (*sc_start)(struct ppp_softc *); /* start output proc */
- void (*sc_ctlp)(struct ppp_softc *); /* rcvd control pkt */
- void (*sc_relinq)(struct ppp_softc *); /* relinquish ifunit */
- void (*sc_setmtu)(struct ppp_softc *); /* set mtu */
- short sc_mru; /* max receive unit */
- pid_t sc_xfer; /* used in transferring unit */
-/*hi*/ struct ifqueue sc_rawq; /* received packets */
-/*net*/ struct ifqueue sc_inq; /* queue of input packets for daemon */
-/*net*/ struct ifqueue sc_fastq; /* interactive output packet q */
- struct mbuf *sc_npqueue; /* output packets not to be sent yet */
- struct mbuf **sc_npqtail; /* ptr to last next ptr in npqueue */
- struct pppstat sc_stats; /* count of bytes/pkts sent/rcvd */
- enum NPmode sc_npmode[NUM_NP]; /* what to do with each NP */
- struct compressor *sc_xcomp; /* transmit compressor */
- void *sc_xc_state; /* transmit compressor state */
- struct compressor *sc_rcomp; /* receive decompressor */
- void *sc_rc_state; /* receive decompressor state */
- time_t sc_last_sent; /* time (secs) last NP pkt sent */
- time_t sc_last_recv; /* time (secs) last NP pkt rcvd */
-#ifdef PPP_FILTER
- struct bpf_program sc_pass_filt; /* filter for packets to pass */
- struct bpf_program sc_active_filt; /* filter for "non-idle" packets */
-#endif /* PPP_FILTER */
-#ifdef VJC
- struct slcompress *sc_comp; /* vjc control buffer */
-#endif
-
- /* Device-dependent part for async lines. */
- ext_accm sc_asyncmap; /* async control character map */
- u_long sc_rasyncmap; /* receive async control char map */
- struct mbuf *sc_outm; /* mbuf chain currently being output */
- struct mbuf *sc_m; /* pointer to input mbuf chain */
- struct mbuf *sc_mc; /* pointer to current input mbuf */
- char *sc_mp; /* ptr to next char in input mbuf */
- short sc_ilen; /* length of input packet so far */
- u_short sc_fcs; /* FCS so far (input) */
- u_short sc_outfcs; /* FCS so far for output packet */
- u_char sc_rawin[16]; /* chars as received */
- int sc_rawin_count; /* # in sc_rawin */
-};
-
-struct ppp_softc *pppalloc(pid_t pid);
-void pppdealloc(struct ppp_softc *sc);
-int pppioctl(struct ppp_softc *sc, u_long cmd, caddr_t data, int flag,
- struct thread *td);
-int pppoutput(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
- struct rtentry *rtp);
-void ppp_restart(struct ppp_softc *sc);
-void ppppktin(struct ppp_softc *sc, struct mbuf *m, int lost);
-struct mbuf *ppp_dequeue(struct ppp_softc *sc);
diff --git a/newlib/libc/sys/linux/include/net/if_slvar.h b/newlib/libc/sys/linux/include/net/if_slvar.h
deleted file mode 100644
index 5f7008909..000000000
--- a/newlib/libc/sys/linux/include/net/if_slvar.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*-
- * Copyright (c) 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_slvar.h 8.3 (Berkeley) 2/1/94
- *
- * $FreeBSD: src/sys/net/if_slvar.h,v 1.21 2001/10/27 20:31:24 dillon Exp $
- */
-
-#ifndef _NET_IF_SLVAR_H_
-#define _NET_IF_SLVAR_H_
-
-#include <sys/callout.h>
-
-/*
- * Definitions for SLIP interface data structures
- *
- * (This exists so programs like slstats can get at the definition
- * of sl_softc.)
- */
-struct sl_softc {
- struct ifnet sc_if; /* network-visible interface */
- struct ifqueue sc_fastq; /* interactive output queue */
- struct tty *sc_ttyp; /* pointer to tty structure */
- struct mbuf *sc_mbuf; /* pointer to mbuf containing buffer */
- u_char *sc_mp; /* pointer to next available buf char */
- u_char *sc_ep; /* pointer to last available buf char */
- u_char *sc_buf; /* input buffer */
- u_int sc_flags; /* see below */
- u_int sc_escape; /* =1 if last char input was FRAME_ESCAPE */
- time_t sc_lasttime; /* last time a char arrived */
- long sc_abortcount; /* number of abort escape chars */
- time_t sc_starttime; /* time of first abort in window */
- u_int sc_keepalive; /* time to decide link hang */
- u_int sc_outfill; /* time to send FRAME_END when output idle */
- /*
- * Handles for scheduling outfill and
- * keepalive timeouts.
- */
- struct callout_handle sc_ofhandle;
- struct callout_handle sc_kahandle;
- struct slcompress sc_comp; /* tcp compression data */
- LIST_ENTRY(sl_softc) sl_next;
- u_char *bpfbuf; /* hang buffer for bpf here */
-};
-
-/* internal flags */
-#define SC_ERROR 0x0001 /* had an input error */
-#define SC_OUTWAIT 0x0002 /* waiting for output fill */
-#define SC_KEEPALIVE 0x0004 /* input keepalive */
-
-/* visible flags */
-#define SC_COMPRESS IFF_LINK0 /* compress TCP traffic */
-#define SC_NOICMP IFF_LINK1 /* suppress ICMP traffic */
-#define SC_AUTOCOMP IFF_LINK2 /* auto-enable TCP compression */
-
-
-#endif
diff --git a/newlib/libc/sys/linux/include/net/if_sppp.h b/newlib/libc/sys/linux/include/net/if_sppp.h
deleted file mode 100644
index 182651c1f..000000000
--- a/newlib/libc/sys/linux/include/net/if_sppp.h
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Defines for synchronous PPP/Cisco link level subroutines.
- *
- * Copyright (C) 1994 Cronyx Ltd.
- * Author: Serge Vakulenko, <vak@cronyx.ru>
- *
- * Heavily revamped to conform to RFC 1661.
- * Copyright (C) 1997, Joerg Wunsch.
- *
- * This software is distributed with NO WARRANTIES, not even the implied
- * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Authors grant any other persons or organizations permission to use
- * or modify this software as long as this message is kept with the software,
- * all derivative works or modified versions.
- *
- * From: Version 2.0, Fri Oct 6 20:39:21 MSK 1995
- *
- * $FreeBSD: src/sys/net/if_sppp.h,v 1.24 2001/12/30 20:42:29 joerg Exp $
- */
-
-#ifndef _NET_IF_SPPP_H_
-#define _NET_IF_SPPP_H_ 1
-
-#define IDX_LCP 0 /* idx into state table */
-
-struct slcp {
- u_long opts; /* LCP options to send (bitfield) */
- u_long magic; /* local magic number */
- u_long mru; /* our max receive unit */
- u_long their_mru; /* their max receive unit */
- u_long protos; /* bitmask of protos that are started */
- u_char echoid; /* id of last keepalive echo request */
- /* restart max values, see RFC 1661 */
- int timeout;
- int max_terminate;
- int max_configure;
- int max_failure;
-};
-
-#define IDX_IPCP 1 /* idx into state table */
-#define IDX_IPV6CP 2 /* idx into state table */
-
-struct sipcp {
- u_long opts; /* IPCP options to send (bitfield) */
- u_int flags;
-#define IPCP_HISADDR_SEEN 1 /* have seen his address already */
-#define IPCP_MYADDR_DYN 2 /* my address is dynamically assigned */
-#define IPCP_MYADDR_SEEN 4 /* have seen his address already */
-#ifdef notdef
-#define IPV6CP_MYIFID_DYN 8 /* my ifid is dynamically assigned */
-#endif
-#define IPV6CP_MYIFID_SEEN 0x10 /* have seen his ifid already */
-#define IPCP_VJ 0x20 /* can use VJ compression */
- int max_state; /* VJ: Max-Slot-Id */
- int compress_cid; /* VJ: Comp-Slot-Id */
-};
-
-#define AUTHNAMELEN 64
-#define AUTHKEYLEN 16
-
-struct sauth {
- u_short proto; /* authentication protocol to use */
- u_short flags;
-#define AUTHFLAG_NOCALLOUT 1 /* do not require authentication on */
- /* callouts */
-#define AUTHFLAG_NORECHALLENGE 2 /* do not re-challenge CHAP */
- u_char name[AUTHNAMELEN]; /* system identification name */
- u_char secret[AUTHKEYLEN]; /* secret password */
- u_char challenge[AUTHKEYLEN]; /* random challenge */
-};
-
-#define IDX_PAP 3
-#define IDX_CHAP 4
-
-#define IDX_COUNT (IDX_CHAP + 1) /* bump this when adding cp's! */
-
-/*
- * Don't change the order of this. Ordering the phases this way allows
- * for a comparision of ``pp_phase >= PHASE_AUTHENTICATE'' in order to
- * know whether LCP is up.
- */
-enum ppp_phase {
- PHASE_DEAD, PHASE_ESTABLISH, PHASE_TERMINATE,
- PHASE_AUTHENTICATE, PHASE_NETWORK
-};
-
-#define PP_MTU 1500 /* default/minimal MRU */
-#define PP_MAX_MRU 2048 /* maximal MRU we want to negotiate */
-
-/*
- * This is a cut down struct sppp (see below) that can easily be
- * exported to/ imported from userland without the need to include
- * dozens of kernel-internal header files. It is used by the
- * SPPPIO[GS]DEFS ioctl commands below.
- */
-struct sppp_parms {
- enum ppp_phase pp_phase; /* phase we're currently in */
- int enable_vj; /* VJ header compression enabled */
- int enable_ipv6; /*
- * Enable IPv6 negotiations -- only
- * needed since each IPv4 i/f auto-
- * matically gets an IPv6 address
- * assigned, so we can't use this as
- * a decision.
- */
- struct slcp lcp; /* LCP params */
- struct sipcp ipcp; /* IPCP params */
- struct sipcp ipv6cp; /* IPv6CP params */
- struct sauth myauth; /* auth params, i'm peer */
- struct sauth hisauth; /* auth params, i'm authenticator */
-};
-
-/*
- * Definitions to pass struct sppp_parms data down into the kernel
- * using the SIOC[SG]IFGENERIC ioctl interface.
- *
- * In order to use this, create a struct spppreq, fill in the cmd
- * field with SPPPIOGDEFS, and put the address of this structure into
- * the ifr_data portion of a struct ifreq. Pass this struct to a
- * SIOCGIFGENERIC ioctl. Then replace the cmd field by SPPPIOSDEFS,
- * modify the defs field as desired, and pass the struct ifreq now
- * to a SIOCSIFGENERIC ioctl.
- */
-
-#define SPPPIOGDEFS ((caddr_t)(('S' << 24) + (1 << 16) +\
- sizeof(struct sppp_parms)))
-#define SPPPIOSDEFS ((caddr_t)(('S' << 24) + (2 << 16) +\
- sizeof(struct sppp_parms)))
-
-struct spppreq {
- int cmd;
- struct sppp_parms defs;
-};
-
-#ifdef _KERNEL
-struct sppp {
- /* NB: pp_if _must_ be first */
- struct ifnet pp_if; /* network interface data */
- struct ifqueue pp_fastq; /* fast output queue */
- struct ifqueue pp_cpq; /* PPP control protocol queue */
- struct sppp *pp_next; /* next interface in keepalive list */
- u_int pp_mode; /* major protocol modes (cisco/ppp/...) */
- u_int pp_flags; /* sub modes */
- u_short pp_alivecnt; /* keepalive packets counter */
- u_short pp_loopcnt; /* loopback detection counter */
- u_long pp_seq[IDX_COUNT]; /* local sequence number */
- u_long pp_rseq[IDX_COUNT]; /* remote sequence number */
- enum ppp_phase pp_phase; /* phase we're currently in */
- int state[IDX_COUNT]; /* state machine */
- u_char confid[IDX_COUNT]; /* id of last configuration request */
- int rst_counter[IDX_COUNT]; /* restart counter */
- int fail_counter[IDX_COUNT]; /* negotiation failure counter */
- int confflags; /* administrative configuration flags */
-#define CONF_ENABLE_VJ 0x01 /* VJ header compression enabled */
-#define CONF_ENABLE_IPV6 0x02 /* IPv6 administratively enabled */
- time_t pp_last_recv; /* time last packet has been received */
- time_t pp_last_sent; /* time last packet has been sent */
- struct callout_handle ch[IDX_COUNT]; /* per-proto and if callouts */
- struct callout_handle pap_my_to_ch; /* PAP needs one more... */
- struct slcp lcp; /* LCP params */
- struct sipcp ipcp; /* IPCP params */
- struct sipcp ipv6cp; /* IPv6CP params */
- struct sauth myauth; /* auth params, i'm peer */
- struct sauth hisauth; /* auth params, i'm authenticator */
- struct slcompress *pp_comp; /* for VJ compression */
- /*
- * These functions are filled in by sppp_attach(), and are
- * expected to be used by the lower layer (hardware) drivers
- * in order to communicate the (un)availability of the
- * communication link. Lower layer drivers that are always
- * ready to communicate (like hardware HDLC) can shortcut
- * pp_up from pp_tls, and pp_down from pp_tlf.
- */
- void (*pp_up)(struct sppp *sp);
- void (*pp_down)(struct sppp *sp);
- /*
- * These functions need to be filled in by the lower layer
- * (hardware) drivers if they request notification from the
- * PPP layer whether the link is actually required. They
- * correspond to the tls and tlf actions.
- */
- void (*pp_tls)(struct sppp *sp);
- void (*pp_tlf)(struct sppp *sp);
- /*
- * These (optional) functions may be filled by the hardware
- * driver if any notification of established connections
- * (currently: IPCP up) is desired (pp_con) or any internal
- * state change of the interface state machine should be
- * signaled for monitoring purposes (pp_chg).
- */
- void (*pp_con)(struct sppp *sp);
- void (*pp_chg)(struct sppp *sp, int new_state);
- /* These two fields are for use by the lower layer */
- void *pp_lowerp;
- int pp_loweri;
-};
-
-/* bits for pp_flags */
-#define PP_KEEPALIVE 0x01 /* use keepalive protocol */
- /* 0x04 was PP_TIMO */
-#define PP_CALLIN 0x08 /* we are being called */
-#define PP_NEEDAUTH 0x10 /* remote requested authentication */
-
-void sppp_attach (struct ifnet *ifp);
-void sppp_detach (struct ifnet *ifp);
-void sppp_input (struct ifnet *ifp, struct mbuf *m);
-int sppp_ioctl (struct ifnet *ifp, u_long cmd, void *data);
-struct mbuf *sppp_dequeue (struct ifnet *ifp);
-struct mbuf *sppp_pick(struct ifnet *ifp);
-int sppp_isempty (struct ifnet *ifp);
-void sppp_flush (struct ifnet *ifp);
-#endif
-
-#endif /* _NET_IF_SPPP_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_stf.h b/newlib/libc/sys/linux/include/net/if_stf.h
deleted file mode 100644
index 3dbc61a0d..000000000
--- a/newlib/libc/sys/linux/include/net/if_stf.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* $FreeBSD: src/sys/net/if_stf.h,v 1.4 2002/04/19 04:46:21 suz Exp $ */
-/* $KAME: if_stf.h,v 1.5 2001/10/12 10:09:17 keiichi Exp $ */
-
-/*
- * Copyright (C) 2000 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-#ifndef _NET_IF_STF_H_
-#define _NET_IF_STF_H_
-
-void in_stf_input(struct mbuf *, int);
-
-#endif /* _NET_IF_STF_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_tap.h b/newlib/libc/sys/linux/include/net/if_tap.h
deleted file mode 100644
index 14a4a8fd3..000000000
--- a/newlib/libc/sys/linux/include/net/if_tap.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 1999-2000 by Maksim Yevmenkin <m_evmenkin@yahoo.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.
- *
- * BASED ON:
- * -------------------------------------------------------------------------
- *
- * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
- * Nottingham University 1987.
- */
-
-/*
- * $FreeBSD: src/sys/net/if_tap.h,v 1.1 2000/07/20 17:01:10 nsayer Exp $
- * $Id$
- */
-
-#ifndef _NET_IF_TAP_H_
-#define _NET_IF_TAP_H_
-
-/* refer to if_tapvar.h for the softc stuff */
-
-/* maximum receive packet size (hard limit) */
-#define TAPMRU 16384
-
-struct tapinfo {
- int baudrate; /* linespeed */
- short mtu; /* maximum transmission unit */
- u_char type; /* ethernet, tokenring, etc. */
- u_char dummy; /* place holder */
-};
-
-/* ioctl's for get/set debug */
-#define TAPSDEBUG _IOW('t', 90, int)
-#define TAPGDEBUG _IOR('t', 89, int)
-#define TAPSIFINFO _IOW('t', 91, struct tapinfo)
-#define TAPGIFINFO _IOR('t', 92, struct tapinfo)
-
-/* VMware ioctl's */
-#define VMIO_SIOCSIFFLAGS _IO('V', 0)
-#define VMIO_SIOCSKEEP _IO('V', 1)
-#define VMIO_SIOCSIFBR _IO('V', 2)
-#define VMIO_SIOCSLADRF _IO('V', 3)
-
-/* XXX -- unimplemented */
-#define VMIO_SIOCSETMACADDR _IO('V', 4)
-
-/* XXX -- not used? */
-#define VMIO_SIOCPORT _IO('V', 5)
-#define VMIO_SIOCBRIDGE _IO('V', 6)
-#define VMIO_SIOCNETIF _IO('V', 7)
-
-#endif /* !_NET_IF_TAP_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_tapvar.h b/newlib/libc/sys/linux/include/net/if_tapvar.h
deleted file mode 100644
index d131f085f..000000000
--- a/newlib/libc/sys/linux/include/net/if_tapvar.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 1999-2000 by Maksim Yevmenkin <m_evmenkin@yahoo.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.
- *
- * BASED ON:
- * -------------------------------------------------------------------------
- *
- * Copyright (c) 1998 Brian Somers <brian@Awfulhak.org>
- * All rights reserved.
- *
- * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
- * Nottingham University 1987.
- */
-
-/*
- * $FreeBSD: src/sys/net/if_tapvar.h,v 1.4 2001/09/05 01:06:21 brooks Exp $
- * $Id$
- */
-
-#ifndef _NET_IF_TAPVAR_H_
-#define _NET_IF_TAPVAR_H_
-
-struct tap_softc {
- struct arpcom arpcom; /* ethernet common data */
-#define tap_if arpcom.ac_if
- struct resource *tap_unit; /* unit */
-
- u_short tap_flags; /* misc flags */
-#define TAP_OPEN (1 << 0)
-#define TAP_INITED (1 << 1)
-#define TAP_RWAIT (1 << 2)
-#define TAP_ASYNC (1 << 3)
-#define TAP_READY (TAP_OPEN|TAP_INITED)
-#define TAP_VMNET (1 << 4)
-
- u_int8_t ether_addr[ETHER_ADDR_LEN]; /* ether addr of the remote side */
-
- pid_t tap_pid; /* PID of process to open */
- struct sigio *tap_sigio; /* information for async I/O */
- struct selinfo tap_rsel; /* read select */
-
- SLIST_ENTRY(tap_softc) tap_next; /* next device in chain */
-};
-
-#endif /* !_NET_IF_TAPVAR_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_tun.h b/newlib/libc/sys/linux/include/net/if_tun.h
deleted file mode 100644
index ed98e43fd..000000000
--- a/newlib/libc/sys/linux/include/net/if_tun.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* $NetBSD: if_tun.h,v 1.5 1994/06/29 06:36:27 cgd Exp $ */
-
-/*
- * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
- * Nottingham University 1987.
- *
- * This source may be freely distributed, however I would be interested
- * in any changes that are made.
- *
- * This driver takes packets off the IP i/f and hands them up to a
- * user process to have its wicked way with. This driver has it's
- * roots in a similar driver written by Phil Cockcroft (formerly) at
- * UCL. This driver is based much more on read/write/select mode of
- * operation though.
- *
- * $FreeBSD: src/sys/net/if_tun.h,v 1.17 2000/01/23 01:47:12 brian Exp $
- */
-
-#ifndef _NET_IF_TUN_H_
-#define _NET_IF_TUN_H_
-
-/* Refer to if_tunvar.h for the softc stuff */
-
-/* Maximum transmit packet size (default) */
-#define TUNMTU 1500
-
-/* Maximum receive packet size (hard limit) */
-#define TUNMRU 16384
-
-struct tuninfo {
- int baudrate; /* linespeed */
- short mtu; /* maximum transmission unit */
- u_char type; /* ethernet, tokenring, etc. */
- u_char dummy; /* place holder */
-};
-
-/* ioctl's for get/set debug */
-#define TUNSDEBUG _IOW('t', 90, int)
-#define TUNGDEBUG _IOR('t', 89, int)
-#define TUNSIFINFO _IOW('t', 91, struct tuninfo)
-#define TUNGIFINFO _IOR('t', 92, struct tuninfo)
-#define TUNSLMODE _IOW('t', 93, int)
-#define TUNSIFMODE _IOW('t', 94, int)
-#define TUNSIFPID _IO('t', 95)
-#define TUNSIFHEAD _IOW('t', 96, int)
-#define TUNGIFHEAD _IOR('t', 97, int)
-
-#endif /* !_NET_IF_TUN_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_tunvar.h b/newlib/libc/sys/linux/include/net/if_tunvar.h
deleted file mode 100644
index b85a25f71..000000000
--- a/newlib/libc/sys/linux/include/net/if_tunvar.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * Copyright (c) 1998 Brian Somers <brian@Awfulhak.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: src/sys/net/if_tunvar.h,v 1.9 2001/06/01 15:51:10 brian Exp $
- */
-
-#ifndef _NET_IF_TUNVAR_H_
-#define _NET_IF_TUNVAR_H_
-
-struct tun_softc {
- u_short tun_flags; /* misc flags */
-#define TUN_OPEN 0x0001
-#define TUN_INITED 0x0002
-#define TUN_RCOLL 0x0004
-#define TUN_IASET 0x0008
-#define TUN_DSTADDR 0x0010
-#define TUN_LMODE 0x0020
-#define TUN_RWAIT 0x0040
-#define TUN_ASYNC 0x0080
-#define TUN_IFHEAD 0x0100
-
-#define TUN_READY (TUN_OPEN | TUN_INITED)
-
- pid_t tun_pid; /* PID of process to open */
- struct ifnet tun_if; /* the interface */
- struct sigio *tun_sigio; /* information for async I/O */
- struct selinfo tun_rsel; /* read select */
- struct selinfo tun_wsel; /* write select (not used) */
-
- struct tun_softc *next; /* Next softc in list */
- struct resource *r_unit; /* resource allocated for this unit */
-};
-
-#endif /* !_NET_IF_TUNVAR_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_types.h b/newlib/libc/sys/linux/include/net/if_types.h
deleted file mode 100644
index e24d18875..000000000
--- a/newlib/libc/sys/linux/include/net/if_types.h
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Copyright (c) 1989, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_types.h 8.3 (Berkeley) 4/28/95
- * $FreeBSD: src/sys/net/if_types.h,v 1.13 2001/04/04 14:18:57 yar Exp $
- * $NetBSD: if_types.h,v 1.16 2000/04/19 06:30:53 itojun Exp $
- */
-
-#ifndef _NET_IF_TYPES_H_
-#define _NET_IF_TYPES_H_
-
-/*
- * Interface types for benefit of parsing media address headers.
- * This list is derived from the SNMP list of ifTypes, originally
- * documented in RFC1573, now maintained as:
- *
- * ftp.isi.edu/in-notes/iana/assignments/smi-numbers
- */
-
-#define IFT_OTHER 0x1 /* none of the following */
-#define IFT_1822 0x2 /* old-style arpanet imp */
-#define IFT_HDH1822 0x3 /* HDH arpanet imp */
-#define IFT_X25DDN 0x4 /* x25 to imp */
-#define IFT_X25 0x5 /* PDN X25 interface (RFC877) */
-#define IFT_ETHER 0x6 /* Ethernet CSMA/CD */
-#define IFT_ISO88023 0x7 /* CMSA/CD */
-#define IFT_ISO88024 0x8 /* Token Bus */
-#define IFT_ISO88025 0x9 /* Token Ring */
-#define IFT_ISO88026 0xa /* MAN */
-#define IFT_STARLAN 0xb
-#define IFT_P10 0xc /* Proteon 10MBit ring */
-#define IFT_P80 0xd /* Proteon 80MBit ring */
-#define IFT_HY 0xe /* Hyperchannel */
-#define IFT_FDDI 0xf
-#define IFT_LAPB 0x10
-#define IFT_SDLC 0x11
-#define IFT_T1 0x12
-#define IFT_CEPT 0x13 /* E1 - european T1 */
-#define IFT_ISDNBASIC 0x14
-#define IFT_ISDNPRIMARY 0x15
-#define IFT_PTPSERIAL 0x16 /* Proprietary PTP serial */
-#define IFT_PPP 0x17 /* RFC 1331 */
-#define IFT_LOOP 0x18 /* loopback */
-#define IFT_EON 0x19 /* ISO over IP */
-#define IFT_XETHER 0x1a /* obsolete 3MB experimental ethernet */
-#define IFT_NSIP 0x1b /* XNS over IP */
-#define IFT_SLIP 0x1c /* IP over generic TTY */
-#define IFT_ULTRA 0x1d /* Ultra Technologies */
-#define IFT_DS3 0x1e /* Generic T3 */
-#define IFT_SIP 0x1f /* SMDS */
-#define IFT_FRELAY 0x20 /* Frame Relay DTE only */
-#define IFT_RS232 0x21
-#define IFT_PARA 0x22 /* parallel-port */
-#define IFT_ARCNET 0x23
-#define IFT_ARCNETPLUS 0x24
-#define IFT_ATM 0x25 /* ATM cells */
-#define IFT_MIOX25 0x26
-#define IFT_SONET 0x27 /* SONET or SDH */
-#define IFT_X25PLE 0x28
-#define IFT_ISO88022LLC 0x29
-#define IFT_LOCALTALK 0x2a
-#define IFT_SMDSDXI 0x2b
-#define IFT_FRELAYDCE 0x2c /* Frame Relay DCE */
-#define IFT_V35 0x2d
-#define IFT_HSSI 0x2e
-#define IFT_HIPPI 0x2f
-#define IFT_MODEM 0x30 /* Generic Modem */
-#define IFT_AAL5 0x31 /* AAL5 over ATM */
-#define IFT_SONETPATH 0x32
-#define IFT_SONETVT 0x33
-#define IFT_SMDSICIP 0x34 /* SMDS InterCarrier Interface */
-#define IFT_PROPVIRTUAL 0x35 /* Proprietary Virtual/internal */
-#define IFT_PROPMUX 0x36 /* Proprietary Multiplexing */
-#define IFT_IEEE80212 0x37 /* 100BaseVG */
-#define IFT_FIBRECHANNEL 0x38 /* Fibre Channel */
-#define IFT_HIPPIINTERFACE 0x39 /* HIPPI interfaces */
-#define IFT_FRAMERELAYINTERCONNECT 0x3a /* Obsolete, use either 0x20 or 0x2c */
-#define IFT_AFLANE8023 0x3b /* ATM Emulated LAN for 802.3 */
-#define IFT_AFLANE8025 0x3c /* ATM Emulated LAN for 802.5 */
-#define IFT_CCTEMUL 0x3d /* ATM Emulated circuit */
-#define IFT_FASTETHER 0x3e /* Fast Ethernet (100BaseT) */
-#define IFT_ISDN 0x3f /* ISDN and X.25 */
-#define IFT_V11 0x40 /* CCITT V.11/X.21 */
-#define IFT_V36 0x41 /* CCITT V.36 */
-#define IFT_G703AT64K 0x42 /* CCITT G703 at 64Kbps */
-#define IFT_G703AT2MB 0x43 /* Obsolete see DS1-MIB */
-#define IFT_QLLC 0x44 /* SNA QLLC */
-#define IFT_FASTETHERFX 0x45 /* Fast Ethernet (100BaseFX) */
-#define IFT_CHANNEL 0x46 /* channel */
-#define IFT_IEEE80211 0x47 /* radio spread spectrum */
-#define IFT_IBM370PARCHAN 0x48 /* IBM System 360/370 OEMI Channel */
-#define IFT_ESCON 0x49 /* IBM Enterprise Systems Connection */
-#define IFT_DLSW 0x4a /* Data Link Switching */
-#define IFT_ISDNS 0x4b /* ISDN S/T interface */
-#define IFT_ISDNU 0x4c /* ISDN U interface */
-#define IFT_LAPD 0x4d /* Link Access Protocol D */
-#define IFT_IPSWITCH 0x4e /* IP Switching Objects */
-#define IFT_RSRB 0x4f /* Remote Source Route Bridging */
-#define IFT_ATMLOGICAL 0x50 /* ATM Logical Port */
-#define IFT_DS0 0x51 /* Digital Signal Level 0 */
-#define IFT_DS0BUNDLE 0x52 /* group of ds0s on the same ds1 */
-#define IFT_BSC 0x53 /* Bisynchronous Protocol */
-#define IFT_ASYNC 0x54 /* Asynchronous Protocol */
-#define IFT_CNR 0x55 /* Combat Net Radio */
-#define IFT_ISO88025DTR 0x56 /* ISO 802.5r DTR */
-#define IFT_EPLRS 0x57 /* Ext Pos Loc Report Sys */
-#define IFT_ARAP 0x58 /* Appletalk Remote Access Protocol */
-#define IFT_PROPCNLS 0x59 /* Proprietary Connectionless Protocol*/
-#define IFT_HOSTPAD 0x5a /* CCITT-ITU X.29 PAD Protocol */
-#define IFT_TERMPAD 0x5b /* CCITT-ITU X.3 PAD Facility */
-#define IFT_FRAMERELAYMPI 0x5c /* Multiproto Interconnect over FR */
-#define IFT_X213 0x5d /* CCITT-ITU X213 */
-#define IFT_ADSL 0x5e /* Asymmetric Digital Subscriber Loop */
-#define IFT_RADSL 0x5f /* Rate-Adapt. Digital Subscriber Loop*/
-#define IFT_SDSL 0x60 /* Symmetric Digital Subscriber Loop */
-#define IFT_VDSL 0x61 /* Very H-Speed Digital Subscrib. Loop*/
-#define IFT_ISO88025CRFPINT 0x62 /* ISO 802.5 CRFP */
-#define IFT_MYRINET 0x63 /* Myricom Myrinet */
-#define IFT_VOICEEM 0x64 /* voice recEive and transMit */
-#define IFT_VOICEFXO 0x65 /* voice Foreign Exchange Office */
-#define IFT_VOICEFXS 0x66 /* voice Foreign Exchange Station */
-#define IFT_VOICEENCAP 0x67 /* voice encapsulation */
-#define IFT_VOICEOVERIP 0x68 /* voice over IP encapsulation */
-#define IFT_ATMDXI 0x69 /* ATM DXI */
-#define IFT_ATMFUNI 0x6a /* ATM FUNI */
-#define IFT_ATMIMA 0x6b /* ATM IMA */
-#define IFT_PPPMULTILINKBUNDLE 0x6c /* PPP Multilink Bundle */
-#define IFT_IPOVERCDLC 0x6d /* IBM ipOverCdlc */
-#define IFT_IPOVERCLAW 0x6e /* IBM Common Link Access to Workstn */
-#define IFT_STACKTOSTACK 0x6f /* IBM stackToStack */
-#define IFT_VIRTUALIPADDRESS 0x70 /* IBM VIPA */
-#define IFT_MPC 0x71 /* IBM multi-protocol channel support */
-#define IFT_IPOVERATM 0x72 /* IBM ipOverAtm */
-#define IFT_ISO88025FIBER 0x73 /* ISO 802.5j Fiber Token Ring */
-#define IFT_TDLC 0x74 /* IBM twinaxial data link control */
-#define IFT_GIGABITETHERNET 0x75 /* Gigabit Ethernet */
-#define IFT_HDLC 0x76 /* HDLC */
-#define IFT_LAPF 0x77 /* LAP F */
-#define IFT_V37 0x78 /* V.37 */
-#define IFT_X25MLP 0x79 /* Multi-Link Protocol */
-#define IFT_X25HUNTGROUP 0x7a /* X25 Hunt Group */
-#define IFT_TRANSPHDLC 0x7b /* Transp HDLC */
-#define IFT_INTERLEAVE 0x7c /* Interleave channel */
-#define IFT_FAST 0x7d /* Fast channel */
-#define IFT_IP 0x7e /* IP (for APPN HPR in IP networks) */
-#define IFT_DOCSCABLEMACLAYER 0x7f /* CATV Mac Layer */
-#define IFT_DOCSCABLEDOWNSTREAM 0x80 /* CATV Downstream interface */
-#define IFT_DOCSCABLEUPSTREAM 0x81 /* CATV Upstream interface */
-#define IFT_A12MPPSWITCH 0x82 /* Avalon Parallel Processor */
-#define IFT_TUNNEL 0x83 /* Encapsulation interface */
-#define IFT_COFFEE 0x84 /* coffee pot */
-#define IFT_CES 0x85 /* Circiut Emulation Service */
-#define IFT_ATMSUBINTERFACE 0x86 /* (x) ATM Sub Interface */
-#define IFT_L2VLAN 0x87 /* Layer 2 Virtual LAN using 802.1Q */
-#define IFT_L3IPVLAN 0x88 /* Layer 3 Virtual LAN - IP Protocol */
-#define IFT_L3IPXVLAN 0x89 /* Layer 3 Virtual LAN - IPX Prot. */
-#define IFT_DIGITALPOWERLINE 0x8a /* IP over Power Lines */
-#define IFT_MEDIAMAILOVERIP 0x8b /* (xxx) Multimedia Mail over IP */
-#define IFT_DTM 0x8c /* Dynamic synchronous Transfer Mode */
-#define IFT_DCN 0x8d /* Data Communications Network */
-#define IFT_IPFORWARD 0x8e /* IP Forwarding Interface */
-#define IFT_MSDSL 0x8f /* Multi-rate Symmetric DSL */
-#define IFT_IEEE1394 0x90 /* IEEE1394 High Performance SerialBus*/
-#define IFT_IFGSN 0x91 /* HIPPI-6400 */
-#define IFT_DVBRCCMACLAYER 0x92 /* DVB-RCC MAC Layer */
-#define IFT_DVBRCCDOWNSTREAM 0x93 /* DVB-RCC Downstream Channel */
-#define IFT_DVBRCCUPSTREAM 0x94 /* DVB-RCC Upstream Channel */
-#define IFT_ATMVIRTUAL 0x95 /* ATM Virtual Interface */
-#define IFT_MPLSTUNNEL 0x96 /* MPLS Tunnel Virtual Interface */
-#define IFT_SRP 0x97 /* Spatial Reuse Protocol */
-#define IFT_VOICEOVERATM 0x98 /* Voice over ATM */
-#define IFT_VOICEOVERFRAMERELAY 0x99 /* Voice Over Frame Relay */
-#define IFT_IDSL 0x9a /* Digital Subscriber Loop over ISDN */
-#define IFT_COMPOSITELINK 0x9b /* Avici Composite Link Interface */
-#define IFT_SS7SIGLINK 0x9c /* SS7 Signaling Link */
-#define IFT_PROPWIRELESSP2P 0x9d /* Prop. P2P wireless interface */
-#define IFT_FRFORWARD 0x9e /* Frame forward Interface */
-#define IFT_RFC1483 0x9f /* Multiprotocol over ATM AAL5 */
-#define IFT_USB 0xa0 /* USB Interface */
-#define IFT_IEEE8023ADLAG 0xa1 /* IEEE 802.3ad Link Aggregate*/
-#define IFT_BGPPOLICYACCOUNTING 0xa2 /* BGP Policy Accounting */
-#define IFT_FRF16MFRBUNDLE 0xa3 /* FRF.16 Multilik Frame Relay*/
-#define IFT_H323GATEKEEPER 0xa4 /* H323 Gatekeeper */
-#define IFT_H323PROXY 0xa5 /* H323 Voice and Video Proxy */
-#define IFT_MPLS 0xa6 /* MPLS */
-#define IFT_MFSIGLINK 0xa7 /* Multi-frequency signaling link */
-#define IFT_HDSL2 0xa8 /* High Bit-Rate DSL, 2nd gen. */
-#define IFT_SHDSL 0xa9 /* Multirate HDSL2 */
-#define IFT_DS1FDL 0xaa /* Facility Data Link (4Kbps) on a DS1*/
-#define IFT_POS 0xab /* Packet over SONET/SDH Interface */
-#define IFT_DVBASILN 0xac /* DVB-ASI Input */
-#define IFT_DVBASIOUT 0xad /* DVB-ASI Output */
-#define IFT_PLC 0xae /* Power Line Communications */
-#define IFT_NFAS 0xaf /* Non-Facility Associated Signaling */
-#define IFT_TR008 0xb0 /* TROO8 */
-#define IFT_GR303RDT 0xb1 /* Remote Digital Terminal */
-#define IFT_GR303IDT 0xb2 /* Integrated Digital Terminal */
-#define IFT_ISUP 0xb3 /* ISUP */
-#define IFT_PROPDOCSWIRELESSMACLAYER 0xb4 /* prop/Wireless MAC Layer */
-#define IFT_PROPDOCSWIRELESSDOWNSTREAM 0xb5 /* prop/Wireless Downstream */
-#define IFT_PROPDOCSWIRELESSUPSTREAM 0xb6 /* prop/Wireless Upstream */
-#define IFT_HIPERLAN2 0xb7 /* HIPERLAN Type 2 Radio Interface */
-#define IFT_PROPBWAP2MP 0xb8 /* PropBroadbandWirelessAccess P2MP*/
-#define IFT_SONETOVERHEADCHANNEL 0xb9 /* SONET Overhead Channel */
-#define IFT_DIGITALWRAPPEROVERHEADCHANNEL 0xba /* Digital Wrapper Overhead */
-#define IFT_AAL2 0xbb /* ATM adaptation layer 2 */
-#define IFT_RADIOMAC 0xbc /* MAC layer over radio links */
-#define IFT_ATMRADIO 0xbd /* ATM over radio links */
-#define IFT_IMT 0xbe /* Inter-Machine Trunks */
-#define IFT_MVL 0xbf /* Multiple Virtual Lines DSL */
-#define IFT_REACHDSL 0xc0 /* Long Reach DSL */
-#define IFT_FRDLCIENDPT 0xc1 /* Frame Relay DLCI End Point */
-#define IFT_ATMVCIENDPT 0xc2 /* ATM VCI End Point */
-#define IFT_OPTICALCHANNEL 0xc3 /* Optical Channel */
-#define IFT_OPTICALTRANSPORT 0xc4 /* Optical Transport */
-
-/* not based on IANA assignments */
-#define IFT_GIF 0xf0
-#define IFT_PVC 0xf1
-#define IFT_FAITH 0xf2
-#define IFT_STF 0xf3
-#endif /* !_NET_IF_TYPES_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_var.h b/newlib/libc/sys/linux/include/net/if_var.h
deleted file mode 100644
index cc53626ba..000000000
--- a/newlib/libc/sys/linux/include/net/if_var.h
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * From: @(#)if.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/net/if_var.h,v 1.46 2002/05/07 18:11:55 imp Exp $
- */
-
-#ifndef _NET_IF_VAR_H_
-#define _NET_IF_VAR_H_
-
-/*
- * Structures defining a network interface, providing a packet
- * transport mechanism (ala level 0 of the PUP protocols).
- *
- * Each interface accepts output datagrams of a specified maximum
- * length, and provides higher level routines with input datagrams
- * received from its medium.
- *
- * Output occurs when the routine if_output is called, with three parameters:
- * (*ifp->if_output)(ifp, m, dst, rt)
- * Here m is the mbuf chain to be sent and dst is the destination address.
- * The output routine encapsulates the supplied datagram if necessary,
- * and then transmits it on its medium.
- *
- * On input, each interface unwraps the data received by it, and either
- * places it on the input queue of a internetwork datagram routine
- * and posts the associated software interrupt, or passes the datagram to a raw
- * packet input routine.
- *
- * Routines exist for locating interfaces by their addresses
- * or for locating a interface on a certain network, as well as more general
- * routing and gateway routines maintaining information used to locate
- * interfaces. These routines live in the files if.c and route.c
- */
-
-#ifdef __STDC__
-/*
- * Forward structure declarations for function prototypes [sic].
- */
-struct mbuf;
-struct thread;
-struct rtentry;
-struct rt_addrinfo;
-struct socket;
-struct ether_header;
-#endif
-
-#include <sys/queue.h> /* get TAILQ macros */
-
-#ifdef _KERNEL
-#include <sys/mbuf.h>
-#include <sys/systm.h> /* XXX */
-#endif /* _KERNEL */
-#include <sys/lock.h> /* XXX */
-#include <sys/mutex.h> /* XXX */
-#include <sys/event.h> /* XXX */
-
-TAILQ_HEAD(ifnethead, ifnet); /* we use TAILQs so that the order of */
-TAILQ_HEAD(ifaddrhead, ifaddr); /* instantiation is preserved in the list */
-TAILQ_HEAD(ifprefixhead, ifprefix);
-TAILQ_HEAD(ifmultihead, ifmultiaddr);
-
-/*
- * Structure defining a queue for a network interface.
- */
-struct ifqueue {
- struct mbuf *ifq_head;
- struct mbuf *ifq_tail;
- int ifq_len;
- int ifq_maxlen;
- int ifq_drops;
- struct mtx ifq_mtx;
-};
-
-/*
- * Structure defining a network interface.
- *
- * (Would like to call this struct ``if'', but C isn't PL/1.)
- */
-
-/*
- * NB: For FreeBSD, it is assumed that each NIC driver's softc starts with
- * one of these structures, typically held within an arpcom structure.
- *
- * struct <foo>_softc {
- * struct arpcom {
- * struct ifnet ac_if;
- * ...
- * } <arpcom> ;
- * ...
- * };
- *
- * The assumption is used in a number of places, including many
- * files in sys/net, device drivers, and sys/dev/mii.c:miibus_attach().
- *
- * Unfortunately devices' softc are opaque, so we depend on this layout
- * to locate the struct ifnet from the softc in the generic code.
- *
- */
-struct ifnet {
- void *if_softc; /* pointer to driver state */
- char *if_name; /* name, e.g. ``en'' or ``lo'' */
- TAILQ_ENTRY(ifnet) if_link; /* all struct ifnets are chained */
- struct ifaddrhead if_addrhead; /* linked list of addresses per if */
- struct klist if_klist; /* events attached to this if */
- int if_pcount; /* number of promiscuous listeners */
- struct bpf_if *if_bpf; /* packet filter structure */
- u_short if_index; /* numeric abbreviation for this if */
- short if_unit; /* sub-unit for lower level driver */
- short if_timer; /* time 'til if_watchdog called */
- short if_flags; /* up/down, broadcast, etc. */
- int if_capabilities; /* interface capabilities */
- int if_capenable; /* enabled features */
- int if_ipending; /* interrupts pending */
- void *if_linkmib; /* link-type-specific MIB data */
- size_t if_linkmiblen; /* length of above data */
- struct if_data if_data;
- struct ifmultihead if_multiaddrs; /* multicast addresses configured */
- int if_amcount; /* number of all-multicast requests */
-/* procedure handles */
- int (*if_output) /* output routine (enqueue) */
- (struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *);
- void (*if_start) /* initiate output routine */
- (struct ifnet *);
- int (*if_done) /* output complete routine */
- (struct ifnet *); /* (XXX not used; fake prototype) */
- int (*if_ioctl) /* ioctl routine */
- (struct ifnet *, u_long, caddr_t);
- void (*if_watchdog) /* timer routine */
- (struct ifnet *);
- int (*if_poll_recv) /* polled receive routine */
- (struct ifnet *, int *);
- int (*if_poll_xmit) /* polled transmit routine */
- (struct ifnet *, int *);
- void (*if_poll_intren) /* polled interrupt reenable routine */
- (struct ifnet *);
- void (*if_poll_slowinput) /* input routine for slow devices */
- (struct ifnet *, struct mbuf *);
- void (*if_init) /* Init routine */
- (void *);
- int (*if_resolvemulti) /* validate/resolve multicast */
- (struct ifnet *, struct sockaddr **, struct sockaddr *);
- struct ifqueue if_snd; /* output queue */
- struct ifqueue *if_poll_slowq; /* input queue for slow devices */
- struct ifprefixhead if_prefixhead; /* list of prefixes per if */
- u_int8_t *if_broadcastaddr; /* linklevel broadcast bytestring */
-};
-
-typedef void if_init_f_t(void *);
-
-#define if_mtu if_data.ifi_mtu
-#define if_type if_data.ifi_type
-#define if_physical if_data.ifi_physical
-#define if_addrlen if_data.ifi_addrlen
-#define if_hdrlen if_data.ifi_hdrlen
-#define if_metric if_data.ifi_metric
-#define if_baudrate if_data.ifi_baudrate
-#define if_hwassist if_data.ifi_hwassist
-#define if_ipackets if_data.ifi_ipackets
-#define if_ierrors if_data.ifi_ierrors
-#define if_opackets if_data.ifi_opackets
-#define if_oerrors if_data.ifi_oerrors
-#define if_collisions if_data.ifi_collisions
-#define if_ibytes if_data.ifi_ibytes
-#define if_obytes if_data.ifi_obytes
-#define if_imcasts if_data.ifi_imcasts
-#define if_omcasts if_data.ifi_omcasts
-#define if_iqdrops if_data.ifi_iqdrops
-#define if_noproto if_data.ifi_noproto
-#define if_lastchange if_data.ifi_lastchange
-#define if_recvquota if_data.ifi_recvquota
-#define if_xmitquota if_data.ifi_xmitquota
-#define if_rawoutput(if, m, sa) if_output(if, m, sa, (struct rtentry *)0)
-
-/* for compatibility with other BSDs */
-#define if_addrlist if_addrhead
-#define if_list if_link
-
-/*
- * Bit values in if_ipending
- */
-#define IFI_RECV 1 /* I want to receive */
-#define IFI_XMIT 2 /* I want to transmit */
-
-/*
- * Output queues (ifp->if_snd) and slow device input queues (*ifp->if_slowq)
- * are queues of messages stored on ifqueue structures
- * (defined above). Entries are added to and deleted from these structures
- * by these macros, which should be called with ipl raised to splimp().
- */
-#define IF_LOCK(ifq) mtx_lock(&(ifq)->ifq_mtx)
-#define IF_UNLOCK(ifq) mtx_unlock(&(ifq)->ifq_mtx)
-#define _IF_QFULL(ifq) ((ifq)->ifq_len >= (ifq)->ifq_maxlen)
-#define _IF_DROP(ifq) ((ifq)->ifq_drops++)
-#define _IF_QLEN(ifq) ((ifq)->ifq_len)
-
-#define _IF_ENQUEUE(ifq, m) do { \
- (m)->m_nextpkt = NULL; \
- if ((ifq)->ifq_tail == NULL) \
- (ifq)->ifq_head = m; \
- else \
- (ifq)->ifq_tail->m_nextpkt = m; \
- (ifq)->ifq_tail = m; \
- (ifq)->ifq_len++; \
-} while (0)
-
-#define IF_ENQUEUE(ifq, m) do { \
- IF_LOCK(ifq); \
- _IF_ENQUEUE(ifq, m); \
- IF_UNLOCK(ifq); \
-} while (0)
-
-#define _IF_PREPEND(ifq, m) do { \
- (m)->m_nextpkt = (ifq)->ifq_head; \
- if ((ifq)->ifq_tail == NULL) \
- (ifq)->ifq_tail = (m); \
- (ifq)->ifq_head = (m); \
- (ifq)->ifq_len++; \
-} while (0)
-
-#define IF_PREPEND(ifq, m) do { \
- IF_LOCK(ifq); \
- _IF_PREPEND(ifq, m); \
- IF_UNLOCK(ifq); \
-} while (0)
-
-#define _IF_DEQUEUE(ifq, m) do { \
- (m) = (ifq)->ifq_head; \
- if (m) { \
- if (((ifq)->ifq_head = (m)->m_nextpkt) == 0) \
- (ifq)->ifq_tail = NULL; \
- (m)->m_nextpkt = NULL; \
- (ifq)->ifq_len--; \
- } \
-} while (0)
-
-#define IF_DEQUEUE(ifq, m) do { \
- IF_LOCK(ifq); \
- _IF_DEQUEUE(ifq, m); \
- IF_UNLOCK(ifq); \
-} while (0)
-
-#define IF_DRAIN(ifq) do { \
- struct mbuf *m; \
- IF_LOCK(ifq); \
- for (;;) { \
- _IF_DEQUEUE(ifq, m); \
- if (m == NULL) \
- break; \
- m_freem(m); \
- } \
- IF_UNLOCK(ifq); \
-} while (0)
-
-#ifdef _KERNEL
-#define IF_HANDOFF(ifq, m, ifp) if_handoff(ifq, m, ifp, 0)
-#define IF_HANDOFF_ADJ(ifq, m, ifp, adj) if_handoff(ifq, m, ifp, adj)
-
-static __inline int
-if_handoff(struct ifqueue *ifq, struct mbuf *m, struct ifnet *ifp, int adjust)
-{
- int active = 0;
-
- IF_LOCK(ifq);
- if (_IF_QFULL(ifq)) {
- _IF_DROP(ifq);
- IF_UNLOCK(ifq);
- m_freem(m);
- return (0);
- }
- if (ifp != NULL) {
- ifp->if_obytes += m->m_pkthdr.len + adjust;
- if (m->m_flags & M_MCAST)
- ifp->if_omcasts++;
- active = ifp->if_flags & IFF_OACTIVE;
- }
- _IF_ENQUEUE(ifq, m);
- IF_UNLOCK(ifq);
- if (ifp != NULL && !active)
- (*ifp->if_start)(ifp);
- return (1);
-}
-
-/*
- * 72 was chosen below because it is the size of a TCP/IP
- * header (40) + the minimum mss (32).
- */
-#define IF_MINMTU 72
-#define IF_MAXMTU 65535
-
-#endif /* _KERNEL */
-
-/*
- * The ifaddr structure contains information about one address
- * of an interface. They are maintained by the different address families,
- * are allocated and attached when an address is set, and are linked
- * together so all addresses for an interface can be located.
- */
-struct ifaddr {
- struct sockaddr *ifa_addr; /* address of interface */
- struct sockaddr *ifa_dstaddr; /* other end of p-to-p link */
-#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
- struct sockaddr *ifa_netmask; /* used to determine subnet */
- struct if_data if_data; /* not all members are meaningful */
- struct ifnet *ifa_ifp; /* back-pointer to interface */
- TAILQ_ENTRY(ifaddr) ifa_link; /* queue macro glue */
- void (*ifa_rtrequest) /* check or clean routes (+ or -)'d */
- (int, struct rtentry *, struct rt_addrinfo *);
- u_short ifa_flags; /* mostly rt_flags for cloning */
- u_int ifa_refcnt; /* references to this structure */
- int ifa_metric; /* cost of going out this interface */
-#ifdef notdef
- struct rtentry *ifa_rt; /* XXXX for ROUTETOIF ????? */
-#endif
- int (*ifa_claim_addr) /* check if an addr goes to this if */
- (struct ifaddr *, struct sockaddr *);
-
-};
-#define IFA_ROUTE RTF_UP /* route installed */
-
-/* for compatibility with other BSDs */
-#define ifa_list ifa_link
-
-/*
- * The prefix structure contains information about one prefix
- * of an interface. They are maintained by the different address families,
- * are allocated and attached when an prefix or an address is set,
- * and are linked together so all prefixes for an interface can be located.
- */
-struct ifprefix {
- struct sockaddr *ifpr_prefix; /* prefix of interface */
- struct ifnet *ifpr_ifp; /* back-pointer to interface */
- TAILQ_ENTRY(ifprefix) ifpr_list; /* queue macro glue */
- u_char ifpr_plen; /* prefix length in bits */
- u_char ifpr_type; /* protocol dependent prefix type */
-};
-
-/*
- * Multicast address structure. This is analogous to the ifaddr
- * structure except that it keeps track of multicast addresses.
- * Also, the reference count here is a count of requests for this
- * address, not a count of pointers to this structure.
- */
-struct ifmultiaddr {
- TAILQ_ENTRY(ifmultiaddr) ifma_link; /* queue macro glue */
- struct sockaddr *ifma_addr; /* address this membership is for */
- struct sockaddr *ifma_lladdr; /* link-layer translation, if any */
- struct ifnet *ifma_ifp; /* back-pointer to interface */
- u_int ifma_refcount; /* reference count */
- void *ifma_protospec; /* protocol-specific state, if any */
-};
-
-#ifdef _KERNEL
-#define IFAFREE(ifa) \
- do { \
- if ((ifa)->ifa_refcnt <= 0) \
- ifafree(ifa); \
- else \
- (ifa)->ifa_refcnt--; \
- } while (0)
-
-struct ifindex_entry {
- struct ifnet *ife_ifnet;
- struct ifaddr *ife_ifnet_addr;
- dev_t ife_dev;
-};
-
-#define ifnet_byindex(idx) ifindex_table[(idx)].ife_ifnet
-#define ifaddr_byindex(idx) ifindex_table[(idx)].ife_ifnet_addr
-#define ifdev_byindex(idx) ifindex_table[(idx)].ife_dev
-
-extern struct ifnethead ifnet;
-extern struct ifindex_entry *ifindex_table;
-extern int ifqmaxlen;
-extern struct ifnet *loif; /* first loopback interface */
-extern int if_index;
-
-void ether_ifattach(struct ifnet *, int);
-void ether_ifdetach(struct ifnet *, int);
-void ether_input(struct ifnet *, struct ether_header *, struct mbuf *);
-void ether_demux(struct ifnet *, struct ether_header *, struct mbuf *);
-int ether_output(struct ifnet *,
- struct mbuf *, struct sockaddr *, struct rtentry *);
-int ether_output_frame(struct ifnet *, struct mbuf *);
-int ether_ioctl(struct ifnet *, int, caddr_t);
-
-int if_addmulti(struct ifnet *, struct sockaddr *, struct ifmultiaddr **);
-int if_allmulti(struct ifnet *, int);
-void if_attach(struct ifnet *);
-int if_delmulti(struct ifnet *, struct sockaddr *);
-void if_detach(struct ifnet *);
-void if_down(struct ifnet *);
-void if_route(struct ifnet *, int flag, int fam);
-int if_setlladdr(struct ifnet *, const u_char *, int);
-void if_unroute(struct ifnet *, int flag, int fam);
-void if_up(struct ifnet *);
-/*void ifinit(void);*/ /* declared in systm.h for main() */
-int ifioctl(struct socket *, u_long, caddr_t, struct thread *);
-int ifpromisc(struct ifnet *, int);
-struct ifnet *ifunit(const char *);
-struct ifnet *if_withname(struct sockaddr *);
-
-int if_poll_recv_slow(struct ifnet *ifp, int *quotap);
-void if_poll_xmit_slow(struct ifnet *ifp, int *quotap);
-void if_poll_throttle(void);
-void if_poll_unthrottle(void *);
-void if_poll_init(void);
-void if_poll(void);
-
-struct ifaddr *ifa_ifwithaddr(struct sockaddr *);
-struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *);
-struct ifaddr *ifa_ifwithnet(struct sockaddr *);
-struct ifaddr *ifa_ifwithroute(int, struct sockaddr *, struct sockaddr *);
-struct ifaddr *ifaof_ifpforaddr(struct sockaddr *, struct ifnet *);
-void ifafree(struct ifaddr *);
-
-struct ifmultiaddr *ifmaof_ifpforaddr(struct sockaddr *, struct ifnet *);
-int if_simloop(struct ifnet *ifp, struct mbuf *m, int af, int hlen);
-
-void if_clone_attach(struct if_clone *);
-void if_clone_detach(struct if_clone *);
-
-int if_clone_create(char *, int);
-int if_clone_destroy(const char *);
-
-#define IF_LLADDR(ifp) \
- LLADDR((struct sockaddr_dl *) ifaddr_byindex((ifp)->if_index)->ifa_addr)
-
-#ifdef DEVICE_POLLING
-enum poll_cmd { POLL_ONLY, POLL_AND_CHECK_STATUS, POLL_DEREGISTER };
-
-typedef void poll_handler_t(struct ifnet *ifp, enum poll_cmd cmd, int count);
-int ether_poll_register(poll_handler_t *h, struct ifnet *ifp);
-int ether_poll_deregister(struct ifnet *ifp);
-#endif /* DEVICE_POLLING */
-
-#endif /* _KERNEL */
-
-#endif /* !_NET_IF_VAR_H_ */
diff --git a/newlib/libc/sys/linux/include/net/if_vlan_var.h b/newlib/libc/sys/linux/include/net/if_vlan_var.h
deleted file mode 100644
index 249543b66..000000000
--- a/newlib/libc/sys/linux/include/net/if_vlan_var.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright 1998 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that both the above copyright notice and this
- * permission notice appear in all copies, that both the above
- * copyright notice and this permission notice appear in all
- * supporting documentation, and that the name of M.I.T. not be used
- * in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. M.I.T. makes
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
- * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
- * SHALL M.I.T. 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: src/sys/net/if_vlan_var.h,v 1.11 2002/03/11 09:26:07 mux Exp $
- */
-
-#ifndef _NET_IF_VLAN_VAR_H_
-#define _NET_IF_VLAN_VAR_H_ 1
-
-#ifdef _KERNEL
-struct vlan_mc_entry {
- struct ether_addr mc_addr;
- SLIST_ENTRY(vlan_mc_entry) mc_entries;
-};
-
-struct ifvlan {
- struct arpcom ifv_ac; /* make this an interface */
- struct ifnet *ifv_p; /* parent inteface of this vlan */
- struct ifv_linkmib {
- int ifvm_parent;
- u_int16_t ifvm_proto; /* encapsulation ethertype */
- u_int16_t ifvm_tag; /* tag to apply on packets leaving if */
- } ifv_mib;
- SLIST_HEAD(__vlan_mchead, vlan_mc_entry) vlan_mc_listhead;
- LIST_ENTRY(ifvlan) ifv_list;
-};
-#define ifv_if ifv_ac.ac_if
-#define ifv_tag ifv_mib.ifvm_tag
-#endif /* _KERNEL */
-
-struct ether_vlan_header {
- u_char evl_dhost[ETHER_ADDR_LEN];
- u_char evl_shost[ETHER_ADDR_LEN];
- u_int16_t evl_encap_proto;
- u_int16_t evl_tag;
- u_int16_t evl_proto;
-};
-
-#define EVL_VLANOFTAG(tag) ((tag) & 4095)
-#define EVL_PRIOFTAG(tag) (((tag) >> 13) & 7)
-#define EVL_ENCAPLEN 4 /* length in octets of encapsulation */
-
-/* sysctl(3) tags, for compatibility purposes */
-#define VLANCTL_PROTO 1
-#define VLANCTL_MAX 2
-
-/*
- * Configuration structure for SIOCSETVLAN and SIOCGETVLAN ioctls.
- */
-struct vlanreq {
- char vlr_parent[IFNAMSIZ];
- u_short vlr_tag;
-};
-#define SIOCSETVLAN SIOCSIFGENERIC
-#define SIOCGETVLAN SIOCGIFGENERIC
-
-#endif /* _NET_IF_VLAN_VAR_H_ */
diff --git a/newlib/libc/sys/linux/include/net/intrq.h b/newlib/libc/sys/linux/include/net/intrq.h
deleted file mode 100644
index 68e2e4afe..000000000
--- a/newlib/libc/sys/linux/include/net/intrq.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-
- * Copyright (c) 2000 Brian Somers <brian@Awfulhak.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: src/sys/net/intrq.h,v 1.4 2002/03/19 21:54:18 alfred Exp $
- */
-
-#ifndef _NET_INTRQ_H_
-#define _NET_INTRQ_H_
-
-#ifdef _KERNEL
-extern int atintrq1_present;
-extern int atintrq2_present;
-extern int atmintrq_present;
-extern int ipintrq_present;
-extern int ip6intrq_present;
-extern int ipxintrq_present;
-extern int natmintrq_present;
-extern int nsintrq_present;
-
-extern int family_enqueue(sa_family_t, struct mbuf *);
-#endif
-
-#endif /* _NET_INTRQ_H_ */
diff --git a/newlib/libc/sys/linux/include/net/iso88025.h b/newlib/libc/sys/linux/include/net/iso88025.h
deleted file mode 100644
index 898fc1c3d..000000000
--- a/newlib/libc/sys/linux/include/net/iso88025.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 1998, Larry Lile
- * All rights reserved.
- *
- * For latest sources and information on this driver, please
- * go to http://anarchy.stdio.com.
- *
- * Questions, comments or suggestions should be directed to
- * Larry Lile <lile@stdio.com>.
- *
- * 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 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: src/sys/net/iso88025.h,v 1.7 2002/05/08 01:08:26 kbyanc Exp $
- *
- * Information gathered from tokenring@freebsd, /sys/net/ethernet.h and
- * the Mach token ring driver.
- */
-
-/*
- * Fundamental constants relating to iso 802.5
- */
-
-#ifndef _NET_ISO88025_H_
-#define _NET_ISO88025_H_
-
-/*
- * General ISO 802.5 definitions
- */
-#define ISO88025_ADDR_LEN 6
-#define ISO88025_HDR_LEN (ISO88025_CF_LEN + (ISO88025_ADDR_LEN * 2))
-#define ISO88025_CF_LEN 2
-#define RCF_LEN 2
-#define RIF_MAX_RD 14
-#define RIF_MAX_LEN 16
-
-#define TR_AC 0x10
-#define TR_LLC_FRAME 0x40
-
-#define TR_4MBPS 4000000
-#define TR_16MBPS 16000000
-#define TR_100MBPS 100000000
-
-/*
- * Source routing
- */
-#define TR_RII 0x80
-#define TR_RCF_BCST_MASK 0xe000
-#define TR_RCF_LEN_MASK 0x1f00
-#define TR_RCF_DIR 0x0080
-#define TR_RCF_LF_MASK 0x0070
-
-#define TR_RCF_RIFLEN(x) ((ntohs(x) & TR_RCF_LEN_MASK) >> 8)
-
-/*
- * Minimum and maximum packet payload lengths.
- */
-#define ISO88025_MIN_LEN 0
-#define ISO88025_MAX_LEN_4 4464
-#define ISO88025_MAX_LEN_16 17960
-#define ISO88025_MAX_LEN ISO88025_MAX_LEN_16
-
-/*
- * A macro to validate a length with
- */
-#define ISO88025_IS_VALID_LEN(foo) \
- ((foo) >= ISO88025_MIN_LEN && (foo) <= ISO88025_MAX_LEN)
-
-/*
- * ISO 802.5 physical header
- */
-struct iso88025_header {
- u_int8_t ac; /* access control field */
- u_int8_t fc; /* frame control field */
- u_int8_t iso88025_dhost[ISO88025_ADDR_LEN]; /* destination address */
- u_int8_t iso88025_shost[ISO88025_ADDR_LEN]; /* source address */
- u_int16_t rcf; /* route control field */
- u_int16_t rd[RIF_MAX_RD]; /* routing designators */
-} __attribute__ ((__packed__));
-
-struct iso88025_rif {
- u_int16_t rcf; /* route control field */
- u_int16_t rd[RIF_MAX_RD]; /* routing designators */
-} __attribute__ ((__packed__));
-
-struct iso88025_sockaddr_data {
- u_char ether_dhost[ISO88025_ADDR_LEN];
- u_char ether_shost[ISO88025_ADDR_LEN];
- u_char ac;
- u_char fc;
-};
-
-struct iso88025_sockaddr_dl_data {
- u_short trld_rcf;
- u_short *trld_route[RIF_MAX_LEN];
-};
-
-#define ISO88025_MIN(a, b) (((a)<(b))?(a):(b))
-#define SDL_ISO88025(s) ((struct iso88025_sockaddr_dl_data *) \
- ((s)->sdl_data + \
- ISO88025_MIN((s)->sdl_nlen + (s)->sdl_alen + \
- (s)->sdl_slen, 12)))
-
-/*
- * Structure of a 48-bit iso 802.5 address.
- * ( We could also add the 16 bit addresses as a union)
- */
-struct iso88025_addr {
- u_char octet[ISO88025_ADDR_LEN];
-};
-
-#define ISO88025_MAX_MTU 18000
-#define ISO88025_DEFAULT_MTU 1500
-#define senderr(e) { error = (e); goto bad;}
-
-void iso88025_ifattach (struct ifnet *);
-void iso88025_ifdetach (struct ifnet *, int);
-int iso88025_ioctl (struct ifnet *, int , caddr_t );
-int iso88025_output (struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *);
-void iso88025_input (struct ifnet *, struct iso88025_header *,
- struct mbuf *);
-
-#endif
diff --git a/newlib/libc/sys/linux/include/net/net_osdep.h b/newlib/libc/sys/linux/include/net/net_osdep.h
deleted file mode 100644
index 19c4b1a4a..000000000
--- a/newlib/libc/sys/linux/include/net/net_osdep.h
+++ /dev/null
@@ -1,343 +0,0 @@
-/* $FreeBSD: src/sys/net/net_osdep.h,v 1.8 2002/04/19 04:46:21 suz Exp $ */
-/* $KAME: net_osdep.h,v 1.68 2001/12/21 08:14:58 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-/*
- * glue for kernel code programming differences.
- */
-
-/*
- * OS dependencies:
- * - ioctl
- * FreeBSD 3 and later warn when sys/ioctl.h is included in a kernel source
- * file. For socket ioctl, we are suggested to use sys/sockio.h.
- *
- * - RTFREE()
- * bsdi does not escape this macro using do-clause, so it is recommended
- * to escape the macro explicitly.
- * e.g.
- * if (rt) {
- * RTFREE(rt);
- * }
- *
- * - whether the IPv4 input routine convert the byte order of some fileds
- * of the IP header (x: convert to the host byte order, s: strip the header
- * length for possible reassembly)
- * ip_len ip_id ip_off
- * bsdi3: xs x x
- * bsdi4: xs x
- * freebsd[23]: xs x x
- * freebsd4: xs x
- * NetBSD: x x
- * OpenBSD: xs x x
- *
- * - ifa_ifwithaf()
- * bsdi[34], netbsd, and openbsd define it in sys/net/if.c
- * freebsd (all versions) does not have it.
- *
- * - struct rt_addrinfo
- * bsdi4, netbsd 1.5R and beyond: rti_addrs, rti_info[], rti_flags, rti_ifa,
- * rti_ifp, and rti_rtm.
- * others: rti_addrs and rti_info[] only.
- *
- * - ifa->ifa_rtrequest
- * bsdi4, netbsd 1.5R and beyond: rt_addrinfo *
- * others: sockaddr * (note that sys/net/route.c:rtrequest() has an unsafe
- * typecast code, from 4.3BSD-reno)
- *
- * - side effects of rtrequest{,1}(RTM_DELETE)
- * BSDI[34]: delete all cloned routes underneath the route.
- * FreeBSD[234]: delete all protocol-cloned routes underneath the route.
- * note that cloned routes from an interface direct route
- * still remain.
- * NetBSD: 1.5 have no side effects. KAME/netbsd15, and post-1.5R, have
- * the same effects as of BSDI.
- * OpenBSD: have no side effects. KAME/openbsd has the same effects as
- * of BSDI (the change is not merged - yet).
- *
- * - privileged process
- * NetBSD, FreeBSD 3
- * struct proc *p;
- * if (p && !suser(p->p_ucred, &p->p_acflag))
- * privileged;
- * FreeBSD 4
- * struct proc *p;
- * if (p && !suser(p))
- * privileged;
- * FreeBSD 5
- * struct thread *td;
- * if (suser(td))
- * privileged;
- * OpenBSD, BSDI [34], FreeBSD 2
- * struct socket *so;
- * if (so->so_state & SS_PRIV)
- * privileged;
- * - foo_control
- * NetBSD, FreeBSD 3
- * needs to give struct proc * as argument
- * OpenBSD, BSDI [34], FreeBSD 2
- * do not need struct proc *
- *
- * - bpf:
- * OpenBSD, NetBSD 1.5, BSDI [34]
- * need caddr_t * (= if_bpf **) and struct ifnet *
- * FreeBSD 2, FreeBSD 3, NetBSD post-1.5N
- * need only struct ifnet * as argument
- *
- * - struct ifnet
- * use queue.h? member names if name
- * --- --- ---
- * FreeBSD 2 no old standard if_name+unit
- * FreeBSD 3 yes strange if_name+unit
- * OpenBSD yes standard if_xname
- * NetBSD yes standard if_xname
- * BSDI [34] no old standard if_name+unit
- *
- * - usrreq
- * NetBSD, OpenBSD, BSDI [34], FreeBSD 2
- * single function with PRU_xx, arguments are mbuf
- * FreeBSD 3
- * separates functions, non-mbuf arguments
- *
- * - {set,get}sockopt
- * NetBSD, OpenBSD, BSDI [34], FreeBSD 2
- * manipulation based on mbuf
- * FreeBSD 3
- * non-mbuf manipulation using sooptcopy{in,out}()
- *
- * - timeout() and untimeout()
- * NetBSD 1.4.x, OpenBSD, BSDI [34], FreeBSD 2
- * timeout() is a void function
- * FreeBSD 3
- * timeout() is non-void, must keep returned value for untimeout()
- * callout_xx is also available (sys/callout.h)
- * NetBSD 1.5
- * timeout() is obsoleted, use callout_xx (sys/callout.h)
- * OpenBSD 2.8
- * timeout_{add,set,del} is encouraged (sys/timeout.h)
- *
- * - kernel internal time structure
- * FreeBSD 2, NetBSD, OpenBSD, BSD/OS
- * mono_time.tv_u?sec, time.tv_u?sec
- * FreeBSD [34]
- * time_second
- * if you need portability, #ifdef out FreeBSD[34], or use microtime(&tv)
- * then touch tv.tv_sec (note: microtime is an expensive operation).
- *
- * - sysctl
- * NetBSD, OpenBSD
- * foo_sysctl()
- * BSDI [34]
- * foo_sysctl() but with different style. sysctl_int_arr() takes
- * care of most of the cases.
- * FreeBSD
- * linker hack. however, there are freebsd version differences
- * (how wonderful!).
- * on FreeBSD[23] function arg #define includes paren.
- * int foo SYSCTL_HANDLER_ARGS;
- * on FreeBSD4, function arg #define does not include paren.
- * int foo(SYSCTL_HANDLER_ARGS);
- * on some versions, forward reference to the tree is okay.
- * on some versions, you need SYSCTL_DECL(). you need things
- * like this.
- * #ifdef SYSCTL_DECL
- * SYSCTL_DECL(net_inet_ip6);
- * #endif
- * it is hard to share functions between freebsd and non-freebsd.
- *
- * - if_ioctl
- * NetBSD, FreeBSD 3, BSDI [34]
- * 2nd argument is u_long cmd
- * FreeBSD 2
- * 2nd argument is int cmd
- *
- * - if attach routines
- * NetBSD
- * void xxattach(int);
- * FreeBSD 2, FreeBSD 3
- * void xxattach(void *);
- * PSEUDO_SET(xxattach, if_xx);
- *
- * - ovbcopy()
- * in NetBSD 1.4 or later, ovbcopy() is not supplied in the kernel.
- * we have updated sys/systm.h to include declaration.
- *
- * - splnet()
- * NetBSD 1.4 or later requires splsoftnet().
- * other operating systems use splnet().
- *
- * - splimp()
- * NetBSD-current (2001/4/13): use splnet() in network, splvm() in vm.
- * other operating systems: use splimp().
- *
- * - dtom()
- * NEVER USE IT!
- *
- * - struct ifnet for loopback interface
- * BSDI3: struct ifnet loif;
- * BSDI4: struct ifnet *loifp;
- * NetBSD, OpenBSD 2.8, FreeBSD2: struct ifnet loif[NLOOP];
- * OpenBSD 2.9: struct ifnet *lo0ifp;
- *
- * odd thing is that many of them refers loif as ifnet *loif,
- * not loif[NLOOP], from outside of if_loop.c.
- *
- * - number of bpf pseudo devices
- * others: bpfilter.h, NBPFILTER
- * FreeBSD4: bpf.h, NBPF
- * solution:
- * #if defined(__FreeBSD__) && __FreeBSD__ >= 4
- * #include "bpf.h"
- * #define NBPFILTER NBPF
- * #else
- * #include "bpfilter.h"
- * #endif
- *
- * - protosw for IPv4 (sys/netinet)
- * FreeBSD4: struct ipprotosw in netinet/ipprotosw.h
- * others: struct protosw in sys/protosw.h
- *
- * - protosw in general.
- * NetBSD 1.5 has extra member for ipfilter (netbsd-current dropped
- * it so it will go away in 1.6).
- * NetBSD 1.5 requires PR_LISTEN flag bit with protocols that permit
- * listen/accept (like tcp).
- *
- * - header files with defopt (opt_xx.h)
- * FreeBSD3: opt_{inet,ipsec,ip6fw,altq}.h
- * FreeBSD4: opt_{inet,inet6,ipsec,ip6fw,altq}.h
- * NetBSD: opt_{inet,ipsec,altq}.h
- * others: does not use defopt
- *
- * - IN_MULTICAST/IN_CLASS[A-D] macro.
- * OpenBSD and NetBSD: net endian (kernel) or host endian (userland)
- * others: always host endian
- *
- * - (m->m_flags & M_EXT) != 0 does *not* mean that the max data length of
- * the mbuf == MCLBYTES.
- *
- * - sys/kern/uipc_mbuf.c:m_dup()
- * freebsd[34]: copies the whole mbuf chain.
- * netbsd: similar arg with m_copym().
- * others: no m_dup().
- *
- * - ifa_refcnt (struct ifaddr) management (IFAREF/IFAFREE).
- * NetBSD 1.5: always use IFAREF whenever reference gets added.
- * always use IFAFREE whenever reference gets freed.
- * IFAFREE frees ifaddr when ifa_refcnt reaches 0.
- * others: do not increase refcnt for ifp->if_addrlist and in_ifaddr.
- * use IFAFREE once when ifaddr is disconnected from
- * ifp->if_addrlist and in_ifaddr. IFAFREE frees ifaddr when
- * ifa_refcnt goes negative. in KAME environment, IFAREF is
- * provided as a compatibility wrapper (use it instead of
- * ifa_refcnt++ to reduce #ifdef).
- *
- * - ifnet.if_lastchange
- * freebsd, bsdi, netbsd-current (jun 14 2001-),
- * openbsd-current (jun 15 2001-): updated only when IFF_UP changes.
- * (RFC1573 ifLastChange interpretation)
- * netbsd151, openbsd29: updated whenever packets go through the interface.
- * (4.4BSD interpretation)
- *
- * - kernel compilation options ("options HOGE" in kernel config file)
- * freebsd4: sys/conf/options has to have mapping between option
- * and a header file (opt_hoge.h).
- * netbsd: by default, -DHOGE will go into
- * sys/arch/foo/compile/BAR/Makefile.
- * if you define mapping in sys/conf/files, you can create
- * a header file like opt_hoge.h to help make dependencies.
- * bsdi/openbsd: always use -DHOGE in Makefile. there's no need/way
- * to have opt_hoge.h.
- *
- * therefore, opt_hoge.h is mandatory on freebsd4 only.
- *
- * - MALLOC() macro
- * Use it only if the size of the allocation is constant.
- * When we do NOT collect statistics about kernel memory usage, the result
- * of macro expansion contains a large set of condition branches. If the
- * size is not constant, compilation optimization cannot be applied, and
- * a bunch of the large branch will be embedded in the kernel code.
- *
- * - M_COPY_PKTHDR
- * openbsd30: M_COPY_PKTHDR is deprecated. use M_MOVE_PKTHDR or
- * M_DUP_PKTHDR, depending on how you want to handle m_tag.
- * others: M_COPY_PKTHDR is available as usual.
- */
-
-#ifndef __NET_NET_OSDEP_H_DEFINED_
-#define __NET_NET_OSDEP_H_DEFINED_
-#ifdef _KERNEL
-
-struct ifnet;
-extern const char *if_name(struct ifnet *);
-
-#define HAVE_OLD_BPF
-
-#define ifa_list ifa_link
-#define if_addrlist if_addrhead
-#define if_list if_link
-
-/* sys/net/if.h */
-#define IFAREF(ifa) do { ++(ifa)->ifa_refcnt; } while (0)
-
-#define WITH_CONVERT_AND_STRIP_IP_LEN
-
-#if 1 /* at this moment, all OSes do this */
-#define WITH_CONVERT_IP_OFF
-#endif
-
-/*
- * Deprecated.
- */
-#include <sys/module.h>
-#define PSEUDO_SET(sym, name) \
- static int name ## _modevent(module_t mod, int type, void *data) \
- { \
- void (*initfunc)(void *) = (void (*)(void *))data; \
- switch (type) { \
- case MOD_LOAD: \
- /* printf(#name " module load\n"); */ \
- initfunc(NULL); \
- break; \
- case MOD_UNLOAD: \
- printf(#name " module unload - not possible for this module type\n"); \
- return EINVAL; \
- } \
- return 0; \
- } \
- static moduledata_t name ## _mod = { \
- #name, \
- name ## _modevent, \
- (void *)sym \
- }; \
- DECLARE_MODULE(name, name ## _mod, SI_SUB_PSEUDO, SI_ORDER_ANY)
-
-#endif /*_KERNEL*/
-#endif /*__NET_NET_OSDEP_H_DEFINED_ */
diff --git a/newlib/libc/sys/linux/include/net/netisr.h b/newlib/libc/sys/linux/include/net/netisr.h
deleted file mode 100644
index 717e77bf2..000000000
--- a/newlib/libc/sys/linux/include/net/netisr.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)netisr.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/net/netisr.h,v 1.26 2002/03/19 21:54:18 alfred Exp $
- */
-
-#ifndef _NET_NETISR_H_
-#define _NET_NETISR_H_
-
-/*
- * The networking code runs off software interrupts.
- *
- * You can switch into the network by doing splnet() and return by splx().
- * The software interrupt level for the network is higher than the software
- * level for the clock (so you can enter the network in routines called
- * at timeout time).
- */
-
-/*
- * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status
- * word which is used to de-multiplex a single software
- * interrupt used for scheduling the network code to calls
- * on the lowest level routine of each protocol.
- */
-#define NETISR_POLL 0 /* polling callback, must be first */
-#define NETISR_IP 2 /* same as AF_INET */
-#define NETISR_NS 6 /* same as AF_NS */
-#define NETISR_ATALK 16 /* same as AF_APPLETALK */
-#define NETISR_ARP 18 /* same as AF_LINK */
-#define NETISR_IPX 23 /* same as AF_IPX */
-#define NETISR_USB 25 /* USB soft interrupt */
-#define NETISR_PPP 27 /* PPP soft interrupt */
-#define NETISR_IPV6 28 /* same as AF_INET6 */
-#define NETISR_NATM 29 /* same as AF_NATM */
-#define NETISR_ATM 30 /* same as AF_ATM */
-#define NETISR_NETGRAPH 31 /* same as AF_NETGRAPH */
-
-
-#ifndef LOCORE
-#ifdef _KERNEL
-
-void legacy_setsoftnet(void);
-
-extern volatile unsigned int netisr; /* scheduling bits for network */
-extern void (*netisrs[32])(void);
-#define schednetisr(anisr) do { \
- atomic_set_rel_int(&netisr, 1 << (anisr)); \
- legacy_setsoftnet(); \
-} while (0)
-
-typedef void netisr_t(void);
-
-int register_netisr(int, netisr_t *);
-int unregister_netisr(int);
-
-#endif
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/net/pfil.h b/newlib/libc/sys/linux/include/net/pfil.h
deleted file mode 100644
index 48ed4b779..000000000
--- a/newlib/libc/sys/linux/include/net/pfil.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* $FreeBSD: src/sys/net/pfil.h,v 1.9 2002/03/24 09:34:04 bde Exp $ */
-
-/*
- * Copyright (c) 1996 Matthew R. Green
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef _NET_PFIL_H_
-#define _NET_PFIL_H_
-
-#include <sys/queue.h>
-
-struct mbuf;
-struct ifnet;
-
-/*
- * The packet filter hooks are designed for anything to call them to
- * possibly intercept the packet.
- */
-struct packet_filter_hook {
- TAILQ_ENTRY(packet_filter_hook) pfil_link;
- int (*pfil_func)(void *, int, struct ifnet *, int, struct mbuf **);
- int pfil_flags;
-};
-
-#define PFIL_IN 0x00000001
-#define PFIL_OUT 0x00000002
-#define PFIL_WAITOK 0x00000004
-#define PFIL_ALL (PFIL_IN|PFIL_OUT)
-
-typedef TAILQ_HEAD(pfil_list, packet_filter_hook) pfil_list_t;
-
-struct pfil_head {
- pfil_list_t ph_in;
- pfil_list_t ph_out;
- int ph_init;
-};
-
-struct packet_filter_hook *pfil_hook_get(int, struct pfil_head *);
-int pfil_add_hook(int (*func)(void *, int,
- struct ifnet *, int, struct mbuf **), int, struct pfil_head *);
-int pfil_remove_hook(int (*func)(void *, int,
- struct ifnet *, int, struct mbuf **), int, struct pfil_head *);
-
-/* XXX */
-#if defined(_KERNEL) && !defined(KLD_MODULE)
-#include "opt_ipfilter.h"
-#endif
-
-#if IPFILTER > 0
-#ifdef PFIL_HOOKS
-#undef PFIL_HOOKS
-#endif
-#define PFIL_HOOKS
-#endif /* IPFILTER */
-
-#endif /* _NET_PFIL_H_ */
diff --git a/newlib/libc/sys/linux/include/net/pfkeyv2.h b/newlib/libc/sys/linux/include/net/pfkeyv2.h
deleted file mode 100644
index 229ef716c..000000000
--- a/newlib/libc/sys/linux/include/net/pfkeyv2.h
+++ /dev/null
@@ -1,392 +0,0 @@
-/* $FreeBSD: src/sys/net/pfkeyv2.h,v 1.7 2001/08/06 19:39:59 ume Exp $ */
-/* $KAME: pfkeyv2.h,v 1.26 2001/06/27 10:49:49 sakane Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * This file has been derived rfc 2367,
- * And added some flags of SADB_KEY_FLAGS_ as SADB_X_EXT_.
- * sakane@ydc.co.jp
- */
-
-#ifndef _NET_PFKEYV2_H_
-#define _NET_PFKEYV2_H_
-
-/*
-This file defines structures and symbols for the PF_KEY Version 2
-key management interface. It was written at the U.S. Naval Research
-Laboratory. This file is in the public domain. The authors ask that
-you leave this credit intact on any copies of this file.
-*/
-#ifndef __PFKEY_V2_H
-#define __PFKEY_V2_H 1
-
-#define PF_KEY_V2 2
-#define PFKEYV2_REVISION 199806L
-
-#define SADB_RESERVED 0
-#define SADB_GETSPI 1
-#define SADB_UPDATE 2
-#define SADB_ADD 3
-#define SADB_DELETE 4
-#define SADB_GET 5
-#define SADB_ACQUIRE 6
-#define SADB_REGISTER 7
-#define SADB_EXPIRE 8
-#define SADB_FLUSH 9
-#define SADB_DUMP 10
-#define SADB_X_PROMISC 11
-#define SADB_X_PCHANGE 12
-
-#define SADB_X_SPDUPDATE 13
-#define SADB_X_SPDADD 14
-#define SADB_X_SPDDELETE 15 /* by policy index */
-#define SADB_X_SPDGET 16
-#define SADB_X_SPDACQUIRE 17
-#define SADB_X_SPDDUMP 18
-#define SADB_X_SPDFLUSH 19
-#define SADB_X_SPDSETIDX 20
-#define SADB_X_SPDEXPIRE 21
-#define SADB_X_SPDDELETE2 22 /* by policy id */
-#define SADB_MAX 22
-
-struct sadb_msg {
- u_int8_t sadb_msg_version;
- u_int8_t sadb_msg_type;
- u_int8_t sadb_msg_errno;
- u_int8_t sadb_msg_satype;
- u_int16_t sadb_msg_len;
- u_int16_t sadb_msg_reserved;
- u_int32_t sadb_msg_seq;
- u_int32_t sadb_msg_pid;
-};
-
-struct sadb_ext {
- u_int16_t sadb_ext_len;
- u_int16_t sadb_ext_type;
-};
-
-struct sadb_sa {
- u_int16_t sadb_sa_len;
- u_int16_t sadb_sa_exttype;
- u_int32_t sadb_sa_spi;
- u_int8_t sadb_sa_replay;
- u_int8_t sadb_sa_state;
- u_int8_t sadb_sa_auth;
- u_int8_t sadb_sa_encrypt;
- u_int32_t sadb_sa_flags;
-};
-
-struct sadb_lifetime {
- u_int16_t sadb_lifetime_len;
- u_int16_t sadb_lifetime_exttype;
- u_int32_t sadb_lifetime_allocations;
- u_int64_t sadb_lifetime_bytes;
- u_int64_t sadb_lifetime_addtime;
- u_int64_t sadb_lifetime_usetime;
-};
-
-struct sadb_address {
- u_int16_t sadb_address_len;
- u_int16_t sadb_address_exttype;
- u_int8_t sadb_address_proto;
- u_int8_t sadb_address_prefixlen;
- u_int16_t sadb_address_reserved;
-};
-
-struct sadb_key {
- u_int16_t sadb_key_len;
- u_int16_t sadb_key_exttype;
- u_int16_t sadb_key_bits;
- u_int16_t sadb_key_reserved;
-};
-
-struct sadb_ident {
- u_int16_t sadb_ident_len;
- u_int16_t sadb_ident_exttype;
- u_int16_t sadb_ident_type;
- u_int16_t sadb_ident_reserved;
- u_int64_t sadb_ident_id;
-};
-
-struct sadb_sens {
- u_int16_t sadb_sens_len;
- u_int16_t sadb_sens_exttype;
- u_int32_t sadb_sens_dpd;
- u_int8_t sadb_sens_sens_level;
- u_int8_t sadb_sens_sens_len;
- u_int8_t sadb_sens_integ_level;
- u_int8_t sadb_sens_integ_len;
- u_int32_t sadb_sens_reserved;
-};
-
-struct sadb_prop {
- u_int16_t sadb_prop_len;
- u_int16_t sadb_prop_exttype;
- u_int8_t sadb_prop_replay;
- u_int8_t sadb_prop_reserved[3];
-};
-
-struct sadb_comb {
- u_int8_t sadb_comb_auth;
- u_int8_t sadb_comb_encrypt;
- u_int16_t sadb_comb_flags;
- u_int16_t sadb_comb_auth_minbits;
- u_int16_t sadb_comb_auth_maxbits;
- u_int16_t sadb_comb_encrypt_minbits;
- u_int16_t sadb_comb_encrypt_maxbits;
- u_int32_t sadb_comb_reserved;
- u_int32_t sadb_comb_soft_allocations;
- u_int32_t sadb_comb_hard_allocations;
- u_int64_t sadb_comb_soft_bytes;
- u_int64_t sadb_comb_hard_bytes;
- u_int64_t sadb_comb_soft_addtime;
- u_int64_t sadb_comb_hard_addtime;
- u_int64_t sadb_comb_soft_usetime;
- u_int64_t sadb_comb_hard_usetime;
-};
-
-struct sadb_supported {
- u_int16_t sadb_supported_len;
- u_int16_t sadb_supported_exttype;
- u_int32_t sadb_supported_reserved;
-};
-
-struct sadb_alg {
- u_int8_t sadb_alg_id;
- u_int8_t sadb_alg_ivlen;
- u_int16_t sadb_alg_minbits;
- u_int16_t sadb_alg_maxbits;
- u_int16_t sadb_alg_reserved;
-};
-
-struct sadb_spirange {
- u_int16_t sadb_spirange_len;
- u_int16_t sadb_spirange_exttype;
- u_int32_t sadb_spirange_min;
- u_int32_t sadb_spirange_max;
- u_int32_t sadb_spirange_reserved;
-};
-
-struct sadb_x_kmprivate {
- u_int16_t sadb_x_kmprivate_len;
- u_int16_t sadb_x_kmprivate_exttype;
- u_int32_t sadb_x_kmprivate_reserved;
-};
-
-/*
- * XXX Additional SA Extension.
- * mode: tunnel or transport
- * reqid: to make SA unique nevertheless the address pair of SA are same.
- * Mainly it's for VPN.
- */
-struct sadb_x_sa2 {
- u_int16_t sadb_x_sa2_len;
- u_int16_t sadb_x_sa2_exttype;
- u_int8_t sadb_x_sa2_mode;
- u_int8_t sadb_x_sa2_reserved1;
- u_int16_t sadb_x_sa2_reserved2;
- u_int32_t sadb_x_sa2_sequence;
- u_int32_t sadb_x_sa2_reqid;
-};
-
-/* XXX Policy Extension */
-/* sizeof(struct sadb_x_policy) == 16 */
-struct sadb_x_policy {
- u_int16_t sadb_x_policy_len;
- u_int16_t sadb_x_policy_exttype;
- u_int16_t sadb_x_policy_type; /* See policy type of ipsec.h */
- u_int8_t sadb_x_policy_dir; /* direction, see ipsec.h */
- u_int8_t sadb_x_policy_reserved;
- u_int32_t sadb_x_policy_id;
- u_int32_t sadb_x_policy_reserved2;
-};
-/*
- * When policy_type == IPSEC, it is followed by some of
- * the ipsec policy request.
- * [total length of ipsec policy requests]
- * = (sadb_x_policy_len * sizeof(uint64_t) - sizeof(struct sadb_x_policy))
- */
-
-/* XXX IPsec Policy Request Extension */
-/*
- * This structure is aligned 8 bytes.
- */
-struct sadb_x_ipsecrequest {
- u_int16_t sadb_x_ipsecrequest_len; /* structure length aligned to 8 bytes.
- * This value is true length of bytes.
- * Not in units of 64 bits. */
- u_int16_t sadb_x_ipsecrequest_proto; /* See ipsec.h */
- u_int8_t sadb_x_ipsecrequest_mode; /* See IPSEC_MODE_XX in ipsec.h. */
- u_int8_t sadb_x_ipsecrequest_level; /* See IPSEC_LEVEL_XX in ipsec.h */
- u_int16_t sadb_x_ipsecrequest_reqid; /* See ipsec.h */
-
- /*
- * followed by source IP address of SA, and immediately followed by
- * destination IP address of SA. These encoded into two of sockaddr
- * structure without any padding. Must set each sa_len exactly.
- * Each of length of the sockaddr structure are not aligned to 64bits,
- * but sum of x_request and addresses is aligned to 64bits.
- */
-};
-
-#define SADB_EXT_RESERVED 0
-#define SADB_EXT_SA 1
-#define SADB_EXT_LIFETIME_CURRENT 2
-#define SADB_EXT_LIFETIME_HARD 3
-#define SADB_EXT_LIFETIME_SOFT 4
-#define SADB_EXT_ADDRESS_SRC 5
-#define SADB_EXT_ADDRESS_DST 6
-#define SADB_EXT_ADDRESS_PROXY 7
-#define SADB_EXT_KEY_AUTH 8
-#define SADB_EXT_KEY_ENCRYPT 9
-#define SADB_EXT_IDENTITY_SRC 10
-#define SADB_EXT_IDENTITY_DST 11
-#define SADB_EXT_SENSITIVITY 12
-#define SADB_EXT_PROPOSAL 13
-#define SADB_EXT_SUPPORTED_AUTH 14
-#define SADB_EXT_SUPPORTED_ENCRYPT 15
-#define SADB_EXT_SPIRANGE 16
-#define SADB_X_EXT_KMPRIVATE 17
-#define SADB_X_EXT_POLICY 18
-#define SADB_X_EXT_SA2 19
-#define SADB_EXT_MAX 19
-
-#define SADB_SATYPE_UNSPEC 0
-#define SADB_SATYPE_AH 2
-#define SADB_SATYPE_ESP 3
-#define SADB_SATYPE_RSVP 5
-#define SADB_SATYPE_OSPFV2 6
-#define SADB_SATYPE_RIPV2 7
-#define SADB_SATYPE_MIP 8
-#define SADB_X_SATYPE_IPCOMP 9
-#define SADB_X_SATYPE_POLICY 10
-#define SADB_SATYPE_MAX 11
-
-#define SADB_SASTATE_LARVAL 0
-#define SADB_SASTATE_MATURE 1
-#define SADB_SASTATE_DYING 2
-#define SADB_SASTATE_DEAD 3
-#define SADB_SASTATE_MAX 3
-
-#define SADB_SAFLAGS_PFS 1
-
-/* RFC2367 numbers - meets RFC2407 */
-#define SADB_AALG_NONE 0
-#define SADB_AALG_MD5HMAC 1 /*2*/
-#define SADB_AALG_SHA1HMAC 2 /*3*/
-#define SADB_AALG_MAX 8
-/* private allocations - based on RFC2407/IANA assignment */
-#define SADB_X_AALG_SHA2_256 6 /*5*/
-#define SADB_X_AALG_SHA2_384 7 /*6*/
-#define SADB_X_AALG_SHA2_512 8 /*7*/
-/* private allocations should use 249-255 (RFC2407) */
-#define SADB_X_AALG_MD5 3 /*249*/ /* Keyed MD5 */
-#define SADB_X_AALG_SHA 4 /*250*/ /* Keyed SHA */
-#define SADB_X_AALG_NULL 5 /*251*/ /* null authentication */
-
-/* RFC2367 numbers - meets RFC2407 */
-#define SADB_EALG_NONE 0
-#define SADB_EALG_DESCBC 1 /*2*/
-#define SADB_EALG_3DESCBC 2 /*3*/
-#define SADB_EALG_NULL 3 /*11*/
-#define SADB_EALG_MAX 12
-/* private allocations - based on RFC2407/IANA assignment */
-#define SADB_X_EALG_CAST128CBC 5 /*6*/
-#define SADB_X_EALG_BLOWFISHCBC 4 /*7*/
-#define SADB_X_EALG_RIJNDAELCBC 12
-#define SADB_X_EALG_AES 12
-/* private allocations should use 249-255 (RFC2407) */
-
-#if 1 /*nonstandard */
-#define SADB_X_CALG_NONE 0
-#define SADB_X_CALG_OUI 1
-#define SADB_X_CALG_DEFLATE 2
-#define SADB_X_CALG_LZS 3
-#define SADB_X_CALG_MAX 4
-#endif
-
-#define SADB_IDENTTYPE_RESERVED 0
-#define SADB_IDENTTYPE_PREFIX 1
-#define SADB_IDENTTYPE_FQDN 2
-#define SADB_IDENTTYPE_USERFQDN 3
-#define SADB_X_IDENTTYPE_ADDR 4
-#define SADB_IDENTTYPE_MAX 4
-
-/* `flags' in sadb_sa structure holds followings */
-#define SADB_X_EXT_NONE 0x0000 /* i.e. new format. */
-#define SADB_X_EXT_OLD 0x0001 /* old format. */
-
-#define SADB_X_EXT_IV4B 0x0010 /* IV length of 4 bytes in use */
-#define SADB_X_EXT_DERIV 0x0020 /* DES derived */
-#define SADB_X_EXT_CYCSEQ 0x0040 /* allowing to cyclic sequence. */
-
- /* three of followings are exclusive flags each them */
-#define SADB_X_EXT_PSEQ 0x0000 /* sequencial padding for ESP */
-#define SADB_X_EXT_PRAND 0x0100 /* random padding for ESP */
-#define SADB_X_EXT_PZERO 0x0200 /* zero padding for ESP */
-#define SADB_X_EXT_PMASK 0x0300 /* mask for padding flag */
-
-#if 1
-#define SADB_X_EXT_RAWCPI 0x0080 /* use well known CPI (IPComp) */
-#endif
-
-#define SADB_KEY_FLAGS_MAX 0x0fff
-
-/* SPI size for PF_KEYv2 */
-#define PFKEY_SPI_SIZE sizeof(u_int32_t)
-
-/* Identifier for menber of lifetime structure */
-#define SADB_X_LIFETIME_ALLOCATIONS 0
-#define SADB_X_LIFETIME_BYTES 1
-#define SADB_X_LIFETIME_ADDTIME 2
-#define SADB_X_LIFETIME_USETIME 3
-
-/* The rate for SOFT lifetime against HARD one. */
-#define PFKEY_SOFT_LIFETIME_RATE 80
-
-/* Utilities */
-#define PFKEY_ALIGN8(a) (1 + (((a) - 1) | (8 - 1)))
-#define PFKEY_EXTLEN(msg) \
- PFKEY_UNUNIT64(((struct sadb_ext *)(msg))->sadb_ext_len)
-#define PFKEY_ADDR_PREFIX(ext) \
- (((struct sadb_address *)(ext))->sadb_address_prefixlen)
-#define PFKEY_ADDR_PROTO(ext) \
- (((struct sadb_address *)(ext))->sadb_address_proto)
-#define PFKEY_ADDR_SADDR(ext) \
- ((struct sockaddr *)((caddr_t)(ext) + sizeof(struct sadb_address)))
-
-/* in 64bits */
-#define PFKEY_UNUNIT64(a) ((a) << 3)
-#define PFKEY_UNIT64(a) ((a) >> 3)
-
-#endif /* __PFKEY_V2_H */
-
-#endif /* _NET_PFKEYV2_H_ */
diff --git a/newlib/libc/sys/linux/include/net/ppp_comp.h b/newlib/libc/sys/linux/include/net/ppp_comp.h
deleted file mode 100644
index 9f63329f5..000000000
--- a/newlib/libc/sys/linux/include/net/ppp_comp.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * ppp_comp.h - Definitions for doing PPP packet compression.
- *
- * Copyright (c) 1994 The Australian National University.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation is hereby granted, provided that the above copyright
- * notice appears in all copies. This software is provided without any
- * warranty, express or implied. The Australian National University
- * makes no representations about the suitability of this software for
- * any purpose.
- *
- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- *
- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
- * OR MODIFICATIONS.
- *
- * $FreeBSD: src/sys/net/ppp_comp.h,v 1.11 2002/03/24 09:34:04 bde Exp $
- */
-
-#ifndef _NET_PPP_COMP_H
-#define _NET_PPP_COMP_H
-
-/*
- * Structure giving methods for compression/decompression.
- */
-#ifdef PACKETPTR
-struct compressor {
- int compress_proto; /* CCP compression protocol number */
-
- /* Allocate space for a compressor (transmit side) */
- void *(*comp_alloc)(u_char *options, int opt_len);
- /* Free space used by a compressor */
- void (*comp_free)(void *state);
- /* Initialize a compressor */
- int (*comp_init)(void *state, u_char *options, int opt_len,
- int unit, int hdrlen, int debug);
- /* Reset a compressor */
- void (*comp_reset)(void *state);
- /* Compress a packet */
- int (*compress)(void *state, PACKETPTR *mret, PACKETPTR mp,
- int orig_len, int max_len);
- /* Return compression statistics */
- void (*comp_stat)(void *state, struct compstat *stats);
-
- /* Allocate space for a decompressor (receive side) */
- void *(*decomp_alloc)(u_char *options, int opt_len);
- /* Free space used by a decompressor */
- void (*decomp_free)(void *state);
- /* Initialize a decompressor */
- int (*decomp_init)(void *state, u_char *options, int opt_len,
- int unit, int hdrlen, int mru, int debug);
- /* Reset a decompressor */
- void (*decomp_reset)(void *state);
- /* Decompress a packet. */
- int (*decompress)(void *state, PACKETPTR mp, PACKETPTR *dmpp);
- /* Update state for an incompressible packet received */
- void (*incomp)(void *state, PACKETPTR mp);
- /* Return decompression statistics */
- void (*decomp_stat)(void *state, struct compstat *stats);
-};
-#endif /* PACKETPTR */
-
-/*
- * Return values for decompress routine.
- * We need to make these distinctions so that we can disable certain
- * useful functionality, namely sending a CCP reset-request as a result
- * of an error detected after decompression. This is to avoid infringing
- * a patent held by Motorola.
- * Don't you just lurve software patents.
- */
-#define DECOMP_OK 0 /* everything went OK */
-#define DECOMP_ERROR 1 /* error detected before decomp. */
-#define DECOMP_FATALERROR 2 /* error detected after decomp. */
-
-/*
- * CCP codes.
- */
-#define CCP_CONFREQ 1
-#define CCP_CONFACK 2
-#define CCP_TERMREQ 5
-#define CCP_TERMACK 6
-#define CCP_RESETREQ 14
-#define CCP_RESETACK 15
-
-/*
- * Max # bytes for a CCP option
- */
-#define CCP_MAX_OPTION_LENGTH 32
-
-/*
- * Parts of a CCP packet.
- */
-#define CCP_CODE(dp) ((dp)[0])
-#define CCP_ID(dp) ((dp)[1])
-#define CCP_LENGTH(dp) (((dp)[2] << 8) + (dp)[3])
-#define CCP_HDRLEN 4
-
-#define CCP_OPT_CODE(dp) ((dp)[0])
-#define CCP_OPT_LENGTH(dp) ((dp)[1])
-#define CCP_OPT_MINLEN 2
-
-/*
- * Definitions for BSD-Compress.
- */
-#define CI_BSD_COMPRESS 21 /* config. option for BSD-Compress */
-#define CILEN_BSD_COMPRESS 3 /* length of config. option */
-
-/* Macros for handling the 3rd byte of the BSD-Compress config option. */
-#define BSD_NBITS(x) ((x) & 0x1F) /* number of bits requested */
-#define BSD_VERSION(x) ((x) >> 5) /* version of option format */
-#define BSD_CURRENT_VERSION 1 /* current version number */
-#define BSD_MAKE_OPT(v, n) (((v) << 5) | (n))
-
-#define BSD_MIN_BITS 9 /* smallest code size supported */
-#define BSD_MAX_BITS 15 /* largest code size supported */
-
-/*
- * Definitions for Deflate.
- */
-#define CI_DEFLATE 26 /* config option for Deflate */
-#define CI_DEFLATE_DRAFT 24 /* value used in original draft RFC */
-#define CILEN_DEFLATE 4 /* length of its config option */
-
-#define DEFLATE_MIN_SIZE 8
-#define DEFLATE_MAX_SIZE 15
-#define DEFLATE_METHOD_VAL 8
-#define DEFLATE_SIZE(x) (((x) >> 4) + DEFLATE_MIN_SIZE)
-#define DEFLATE_METHOD(x) ((x) & 0x0F)
-#define DEFLATE_MAKE_OPT(w) ((((w) - DEFLATE_MIN_SIZE) << 4) \
- + DEFLATE_METHOD_VAL)
-#define DEFLATE_CHK_SEQUENCE 0
-
-/*
- * Definitions for other, as yet unsupported, compression methods.
- */
-#define CI_PREDICTOR_1 1 /* config option for Predictor-1 */
-#define CILEN_PREDICTOR_1 2 /* length of its config option */
-#define CI_PREDICTOR_2 2 /* config option for Predictor-2 */
-#define CILEN_PREDICTOR_2 2 /* length of its config option */
-
-#endif /* _NET_PPP_COMP_H */
diff --git a/newlib/libc/sys/linux/include/net/ppp_defs.h b/newlib/libc/sys/linux/include/net/ppp_defs.h
deleted file mode 100644
index 11a3fef1d..000000000
--- a/newlib/libc/sys/linux/include/net/ppp_defs.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * ppp_defs.h - PPP definitions.
- *
- * Copyright (c) 1994 The Australian National University.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation is hereby granted, provided that the above copyright
- * notice appears in all copies. This software is provided without any
- * warranty, express or implied. The Australian National University
- * makes no representations about the suitability of this software for
- * any purpose.
- *
- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- *
- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
- * OR MODIFICATIONS.
- *
- * $FreeBSD: src/sys/net/ppp_defs.h,v 1.7 2001/06/11 12:38:58 ume Exp $
- */
-
-#ifndef _PPP_DEFS_H_
-#define _PPP_DEFS_H_
-
-/*
- * The basic PPP frame.
- */
-#define PPP_HDRLEN 4 /* octets for standard ppp header */
-#define PPP_FCSLEN 2 /* octets for FCS */
-#define PPP_MRU 1500 /* default MRU = max length of info field */
-
-#define PPP_ADDRESS(p) (((u_char *)(p))[0])
-#define PPP_CONTROL(p) (((u_char *)(p))[1])
-#define PPP_PROTOCOL(p) ((((u_char *)(p))[2] << 8) + ((u_char *)(p))[3])
-
-/*
- * Significant octet values.
- */
-#define PPP_ALLSTATIONS 0xff /* All-Stations broadcast address */
-#define PPP_UI 0x03 /* Unnumbered Information */
-#define PPP_FLAG 0x7e /* Flag Sequence */
-#define PPP_ESCAPE 0x7d /* Asynchronous Control Escape */
-#define PPP_TRANS 0x20 /* Asynchronous transparency modifier */
-
-/*
- * Protocol field values.
- */
-#define PPP_IP 0x21 /* Internet Protocol */
-#define PPP_XNS 0x25 /* Xerox NS */
-#define PPP_AT 0x29 /* AppleTalk Protocol */
-#define PPP_IPX 0x2b /* IPX Datagram (RFC1552) */
-#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */
-#define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */
-#define PPP_COMP 0xfd /* compressed packet */
-#define PPP_IPCP 0x8021 /* IP Control Protocol */
-#define PPP_ATCP 0x8029 /* AppleTalk Control Protocol */
-#define PPP_IPXCP 0x802b /* IPX Control Protocol (RFC1552) */
-#define PPP_CCP 0x80fd /* Compression Control Protocol */
-#define PPP_LCP 0xc021 /* Link Control Protocol */
-#define PPP_PAP 0xc023 /* Password Authentication Protocol */
-#define PPP_LQR 0xc025 /* Link Quality Report protocol */
-#define PPP_CHAP 0xc223 /* Cryptographic Handshake Auth. Protocol */
-#define PPP_CBCP 0xc029 /* Callback Control Protocol */
-#define PPP_IPV6 0x57 /* Internet Protocol version 6*/
-#define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */
-
-/*
- * Values for FCS calculations.
- */
-#define PPP_INITFCS 0xffff /* Initial FCS value */
-#define PPP_GOODFCS 0xf0b8 /* Good final FCS value */
-#define PPP_FCS(fcs, c) (((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff])
-
-/*
- * Extended asyncmap - allows any character to be escaped.
- */
-typedef u_int32_t ext_accm[8];
-
-/*
- * What to do with network protocol (NP) packets.
- */
-enum NPmode {
- NPMODE_PASS, /* pass the packet through */
- NPMODE_DROP, /* silently drop the packet */
- NPMODE_ERROR, /* return an error */
- NPMODE_QUEUE /* save it up for later. */
-};
-
-/*
- * Statistics.
- */
-struct pppstat {
- unsigned int ppp_ibytes; /* bytes received */
- unsigned int ppp_ipackets; /* packets received */
- unsigned int ppp_ierrors; /* receive errors */
- unsigned int ppp_obytes; /* bytes sent */
- unsigned int ppp_opackets; /* packets sent */
- unsigned int ppp_oerrors; /* transmit errors */
-};
-
-struct vjstat {
- unsigned int vjs_packets; /* outbound packets */
- unsigned int vjs_compressed; /* outbound compressed packets */
- unsigned int vjs_searches; /* searches for connection state */
- unsigned int vjs_misses; /* times couldn't find conn. state */
- unsigned int vjs_uncompressedin; /* inbound uncompressed packets */
- unsigned int vjs_compressedin; /* inbound compressed packets */
- unsigned int vjs_errorin; /* inbound unknown type packets */
- unsigned int vjs_tossed; /* inbound packets tossed because of error */
-};
-
-struct ppp_stats {
- struct pppstat p; /* basic PPP statistics */
- struct vjstat vj; /* VJ header compression statistics */
-};
-
-struct compstat {
- unsigned int unc_bytes; /* total uncompressed bytes */
- unsigned int unc_packets; /* total uncompressed packets */
- unsigned int comp_bytes; /* compressed bytes */
- unsigned int comp_packets; /* compressed packets */
- unsigned int inc_bytes; /* incompressible bytes */
- unsigned int inc_packets; /* incompressible packets */
- unsigned int ratio; /* recent compression ratio << 8 */
-};
-
-struct ppp_comp_stats {
- struct compstat c; /* packet compression statistics */
- struct compstat d; /* packet decompression statistics */
-};
-
-/*
- * The following structure records the time in seconds since
- * the last NP packet was sent or received.
- */
-struct ppp_idle {
- time_t xmit_idle; /* time since last NP packet sent */
- time_t recv_idle; /* time since last NP packet received */
-};
-
-#ifndef __P
-#ifdef __STDC__
-#define __P(x) x
-#else
-#define __P(x) ()
-#endif
-#endif
-
-#endif /* _PPP_DEFS_H_ */
diff --git a/newlib/libc/sys/linux/include/net/radix.h b/newlib/libc/sys/linux/include/net/radix.h
deleted file mode 100644
index 7f1984e96..000000000
--- a/newlib/libc/sys/linux/include/net/radix.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 1988, 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)radix.h 8.2 (Berkeley) 10/31/94
- * $FreeBSD: src/sys/net/radix.h,v 1.18 2002/03/19 21:54:18 alfred Exp $
- */
-
-#ifndef _RADIX_H_
-#define _RADIX_H_
-
-#ifdef MALLOC_DECLARE
-MALLOC_DECLARE(M_RTABLE);
-#endif
-
-/*
- * Radix search tree node layout.
- */
-
-struct radix_node {
- struct radix_mask *rn_mklist; /* list of masks contained in subtree */
- struct radix_node *rn_parent; /* parent */
- short rn_bit; /* bit offset; -1-index(netmask) */
- char rn_bmask; /* node: mask for bit test*/
- u_char rn_flags; /* enumerated next */
-#define RNF_NORMAL 1 /* leaf contains normal route */
-#define RNF_ROOT 2 /* leaf is root leaf for tree */
-#define RNF_ACTIVE 4 /* This node is alive (for rtfree) */
- union {
- struct { /* leaf only data: */
- caddr_t rn_Key; /* object of search */
- caddr_t rn_Mask; /* netmask, if present */
- struct radix_node *rn_Dupedkey;
- } rn_leaf;
- struct { /* node only data: */
- int rn_Off; /* where to start compare */
- struct radix_node *rn_L;/* progeny */
- struct radix_node *rn_R;/* progeny */
- } rn_node;
- } rn_u;
-#ifdef RN_DEBUG
- int rn_info;
- struct radix_node *rn_twin;
- struct radix_node *rn_ybro;
-#endif
-};
-
-#define rn_dupedkey rn_u.rn_leaf.rn_Dupedkey
-#define rn_key rn_u.rn_leaf.rn_Key
-#define rn_mask rn_u.rn_leaf.rn_Mask
-#define rn_offset rn_u.rn_node.rn_Off
-#define rn_left rn_u.rn_node.rn_L
-#define rn_right rn_u.rn_node.rn_R
-
-/*
- * Annotations to tree concerning potential routes applying to subtrees.
- */
-
-struct radix_mask {
- short rm_bit; /* bit offset; -1-index(netmask) */
- char rm_unused; /* cf. rn_bmask */
- u_char rm_flags; /* cf. rn_flags */
- struct radix_mask *rm_mklist; /* more masks to try */
- union {
- caddr_t rmu_mask; /* the mask */
- struct radix_node *rmu_leaf; /* for normal routes */
- } rm_rmu;
- int rm_refs; /* # of references to this struct */
-};
-
-#define rm_mask rm_rmu.rmu_mask
-#define rm_leaf rm_rmu.rmu_leaf /* extra field would make 32 bytes */
-
-#define MKGet(m) {\
- if (rn_mkfreelist) {\
- m = rn_mkfreelist; \
- rn_mkfreelist = (m)->rm_mklist; \
- } else \
- R_Malloc(m, struct radix_mask *, sizeof (*(m))); }\
-
-#define MKFree(m) { (m)->rm_mklist = rn_mkfreelist; rn_mkfreelist = (m);}
-
-typedef int walktree_f_t(struct radix_node *, void *);
-
-struct radix_node_head {
- struct radix_node *rnh_treetop;
- int rnh_addrsize; /* permit, but not require fixed keys */
- int rnh_pktsize; /* permit, but not require fixed keys */
- struct radix_node *(*rnh_addaddr) /* add based on sockaddr */
- (void *v, void *mask,
- struct radix_node_head *head, struct radix_node nodes[]);
- struct radix_node *(*rnh_addpkt) /* add based on packet hdr */
- (void *v, void *mask,
- struct radix_node_head *head, struct radix_node nodes[]);
- struct radix_node *(*rnh_deladdr) /* remove based on sockaddr */
- (void *v, void *mask, struct radix_node_head *head);
- struct radix_node *(*rnh_delpkt) /* remove based on packet hdr */
- (void *v, void *mask, struct radix_node_head *head);
- struct radix_node *(*rnh_matchaddr) /* locate based on sockaddr */
- (void *v, struct radix_node_head *head);
- struct radix_node *(*rnh_lookup) /* locate based on sockaddr */
- (void *v, void *mask, struct radix_node_head *head);
- struct radix_node *(*rnh_matchpkt) /* locate based on packet hdr */
- (void *v, struct radix_node_head *head);
- int (*rnh_walktree) /* traverse tree */
- (struct radix_node_head *head, walktree_f_t *f, void *w);
- int (*rnh_walktree_from) /* traverse tree below a */
- (struct radix_node_head *head, void *a, void *m,
- walktree_f_t *f, void *w);
- void (*rnh_close) /* do something when the last ref drops */
- (struct radix_node *rn, struct radix_node_head *head);
- struct radix_node rnh_nodes[3]; /* empty tree for common case */
-};
-
-#ifndef _KERNEL
-#define Bcmp(a, b, n) bcmp(((char *)(a)), ((char *)(b)), (n))
-#define Bcopy(a, b, n) bcopy(((char *)(a)), ((char *)(b)), (unsigned)(n))
-#define Bzero(p, n) bzero((char *)(p), (int)(n));
-#define R_Malloc(p, t, n) (p = (t) malloc((unsigned int)(n)))
-#define Free(p) free((char *)p);
-#else
-#define Bcmp(a, b, n) bcmp(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
-#define Bcopy(a, b, n) bcopy(((caddr_t)(a)), ((caddr_t)(b)), (unsigned)(n))
-#define Bzero(p, n) bzero((caddr_t)(p), (unsigned)(n));
-#define R_Malloc(p, t, n) (p = (t) malloc((unsigned long)(n), M_RTABLE, M_DONTWAIT))
-#define Free(p) free((caddr_t)p, M_RTABLE);
-#endif /* _KERNEL */
-
-void rn_init(void);
-int rn_inithead(void **, int);
-int rn_refines(void *, void *);
-struct radix_node
- *rn_addmask(void *, int, int),
- *rn_addroute (void *, void *, struct radix_node_head *,
- struct radix_node [2]),
- *rn_delete(void *, void *, struct radix_node_head *),
- *rn_lookup (void *v_arg, void *m_arg,
- struct radix_node_head *head),
- *rn_match(void *, struct radix_node_head *);
-
-
-#endif /* _RADIX_H_ */
diff --git a/newlib/libc/sys/linux/include/net/raw_cb.h b/newlib/libc/sys/linux/include/net/raw_cb.h
deleted file mode 100644
index d17712d30..000000000
--- a/newlib/libc/sys/linux/include/net/raw_cb.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)raw_cb.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/net/raw_cb.h,v 1.16 2002/03/19 21:54:18 alfred Exp $
- */
-
-#ifndef _NET_RAW_CB_H_
-#define _NET_RAW_CB_H_
-
-#include <sys/queue.h>
-
-/*
- * Raw protocol interface control block. Used
- * to tie a socket to the generic raw interface.
- */
-struct rawcb {
- LIST_ENTRY(rawcb) list;
- struct socket *rcb_socket; /* back pointer to socket */
- struct sockaddr *rcb_faddr; /* destination address */
- struct sockaddr *rcb_laddr; /* socket's address */
- struct sockproto rcb_proto; /* protocol family, protocol */
-};
-
-#define sotorawcb(so) ((struct rawcb *)(so)->so_pcb)
-
-/*
- * Nominal space allocated to a raw socket.
- */
-#define RAWSNDQ 8192
-#define RAWRCVQ 8192
-
-#ifdef _KERNEL
-extern LIST_HEAD(rawcb_list_head, rawcb) rawcb_list;
-
-/* protosw entries */
-pr_ctlinput_t raw_ctlinput;
-pr_init_t raw_init;
-
-/* usrreq entries */
-int raw_attach(struct socket *, int);
-void raw_detach(struct rawcb *);
-void raw_disconnect(struct rawcb *);
-
-#if 0 /* what the ??? */
-pr_input_t raw_input;
-#else
-void raw_input(struct mbuf *,
- struct sockproto *, struct sockaddr *, struct sockaddr *);
-#endif
-
-extern struct pr_usrreqs raw_usrreqs;
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/net/route.h b/newlib/libc/sys/linux/include/net/route.h
deleted file mode 100644
index c60bf3537..000000000
--- a/newlib/libc/sys/linux/include/net/route.h
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Copyright (c) 1980, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)route.h 8.4 (Berkeley) 1/9/95
- * $FreeBSD: src/sys/net/route.h,v 1.45 2002/03/24 09:34:04 bde Exp $
- */
-
-#ifndef _NET_ROUTE_H_
-#define _NET_ROUTE_H_
-
-/*
- * Kernel resident routing tables.
- *
- * The routing tables are initialized when interface addresses
- * are set by making entries for all directly connected interfaces.
- */
-
-/*
- * A route consists of a destination address and a reference
- * to a routing entry. These are often held by protocols
- * in their control blocks, e.g. inpcb.
- */
-struct route {
- struct rtentry *ro_rt;
- struct sockaddr ro_dst;
-};
-
-/*
- * These numbers are used by reliable protocols for determining
- * retransmission behavior and are included in the routing structure.
- */
-struct rt_metrics {
- u_long rmx_locks; /* Kernel must leave these values alone */
- u_long rmx_mtu; /* MTU for this path */
- u_long rmx_hopcount; /* max hops expected */
- u_long rmx_expire; /* lifetime for route, e.g. redirect */
- u_long rmx_recvpipe; /* inbound delay-bandwidth product */
- u_long rmx_sendpipe; /* outbound delay-bandwidth product */
- u_long rmx_ssthresh; /* outbound gateway buffer limit */
- u_long rmx_rtt; /* estimated round trip time */
- u_long rmx_rttvar; /* estimated rtt variance */
- u_long rmx_pksent; /* packets sent using this route */
- u_long rmx_filler[4]; /* will be used for T/TCP later */
-};
-
-/*
- * rmx_rtt and rmx_rttvar are stored as microseconds;
- * RTTTOPRHZ(rtt) converts to a value suitable for use
- * by a protocol slowtimo counter.
- */
-#define RTM_RTTUNIT 1000000 /* units for rtt, rttvar, as units per sec */
-#define RTTTOPRHZ(r) ((r) / (RTM_RTTUNIT / PR_SLOWHZ))
-
-/*
- * XXX kernel function pointer `rt_output' is visible to applications.
- */
-struct mbuf;
-
-/*
- * We distinguish between routes to hosts and routes to networks,
- * preferring the former if available. For each route we infer
- * the interface to use from the gateway address supplied when
- * the route was entered. Routes that forward packets through
- * gateways are marked so that the output routines know to address the
- * gateway rather than the ultimate destination.
- */
-#ifndef RNF_NORMAL
-#include <net/radix.h>
-#endif
-struct rtentry {
- struct radix_node rt_nodes[2]; /* tree glue, and other values */
-#define rt_key(r) ((struct sockaddr *)((r)->rt_nodes->rn_key))
-#define rt_mask(r) ((struct sockaddr *)((r)->rt_nodes->rn_mask))
- struct sockaddr *rt_gateway; /* value */
- long rt_refcnt; /* # held references */
- u_long rt_flags; /* up/down?, host/net */
- struct ifnet *rt_ifp; /* the answer: interface to use */
- struct ifaddr *rt_ifa; /* the answer: interface to use */
- struct sockaddr *rt_genmask; /* for generation of cloned routes */
- caddr_t rt_llinfo; /* pointer to link level info cache */
- struct rt_metrics rt_rmx; /* metrics used by rx'ing protocols */
- struct rtentry *rt_gwroute; /* implied entry for gatewayed routes */
- int (*rt_output)(struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *);
- /* output routine for this (rt,if) */
- struct rtentry *rt_parent; /* cloning parent of this route */
- void *rt_filler2; /* more filler */
-};
-
-/*
- * Following structure necessary for 4.3 compatibility;
- * We should eventually move it to a compat file.
- */
-struct ortentry {
- u_long rt_hash; /* to speed lookups */
- struct sockaddr rt_dst; /* key */
- struct sockaddr rt_gateway; /* value */
- short rt_flags; /* up/down?, host/net */
- short rt_refcnt; /* # held references */
- u_long rt_use; /* raw # packets forwarded */
- struct ifnet *rt_ifp; /* the answer: interface to use */
-};
-
-#define rt_use rt_rmx.rmx_pksent
-
-#define RTF_UP 0x1 /* route usable */
-#define RTF_GATEWAY 0x2 /* destination is a gateway */
-#define RTF_HOST 0x4 /* host entry (net otherwise) */
-#define RTF_REJECT 0x8 /* host or net unreachable */
-#define RTF_DYNAMIC 0x10 /* created dynamically (by redirect) */
-#define RTF_MODIFIED 0x20 /* modified dynamically (by redirect) */
-#define RTF_DONE 0x40 /* message confirmed */
-/* 0x80 unused, was RTF_DELCLONE */
-#define RTF_CLONING 0x100 /* generate new routes on use */
-#define RTF_XRESOLVE 0x200 /* external daemon resolves name */
-#define RTF_LLINFO 0x400 /* generated by link layer (e.g. ARP) */
-#define RTF_STATIC 0x800 /* manually added */
-#define RTF_BLACKHOLE 0x1000 /* just discard pkts (during updates) */
-#define RTF_PROTO2 0x4000 /* protocol specific routing flag */
-#define RTF_PROTO1 0x8000 /* protocol specific routing flag */
-
-#define RTF_PRCLONING 0x10000 /* protocol requires cloning */
-#define RTF_WASCLONED 0x20000 /* route generated through cloning */
-#define RTF_PROTO3 0x40000 /* protocol specific routing flag */
-/* 0x80000 unused */
-#define RTF_PINNED 0x100000 /* future use */
-#define RTF_LOCAL 0x200000 /* route represents a local address */
-#define RTF_BROADCAST 0x400000 /* route represents a bcast address */
-#define RTF_MULTICAST 0x800000 /* route represents a mcast address */
- /* 0x1000000 and up unassigned */
-
-/*
- * Routing statistics.
- */
-struct rtstat {
- short rts_badredirect; /* bogus redirect calls */
- short rts_dynamic; /* routes created by redirects */
- short rts_newgateway; /* routes modified by redirects */
- short rts_unreach; /* lookups which failed */
- short rts_wildcard; /* lookups satisfied by a wildcard */
-};
-/*
- * Structures for routing messages.
- */
-struct rt_msghdr {
- u_short rtm_msglen; /* to skip over non-understood messages */
- u_char rtm_version; /* future binary compatibility */
- u_char rtm_type; /* message type */
- u_short rtm_index; /* index for associated ifp */
- int rtm_flags; /* flags, incl. kern & message, e.g. DONE */
- int rtm_addrs; /* bitmask identifying sockaddrs in msg */
- pid_t rtm_pid; /* identify sender */
- int rtm_seq; /* for sender to identify action */
- int rtm_errno; /* why failed */
- int rtm_use; /* from rtentry */
- u_long rtm_inits; /* which metrics we are initializing */
- struct rt_metrics rtm_rmx; /* metrics themselves */
-};
-
-#define RTM_VERSION 5 /* Up the ante and ignore older versions */
-
-/*
- * Message types.
- */
-#define RTM_ADD 0x1 /* Add Route */
-#define RTM_DELETE 0x2 /* Delete Route */
-#define RTM_CHANGE 0x3 /* Change Metrics or flags */
-#define RTM_GET 0x4 /* Report Metrics */
-#define RTM_LOSING 0x5 /* Kernel Suspects Partitioning */
-#define RTM_REDIRECT 0x6 /* Told to use different route */
-#define RTM_MISS 0x7 /* Lookup failed on this address */
-#define RTM_LOCK 0x8 /* fix specified metrics */
-#define RTM_OLDADD 0x9 /* caused by SIOCADDRT */
-#define RTM_OLDDEL 0xa /* caused by SIOCDELRT */
-#define RTM_RESOLVE 0xb /* req to resolve dst to LL addr */
-#define RTM_NEWADDR 0xc /* address being added to iface */
-#define RTM_DELADDR 0xd /* address being removed from iface */
-#define RTM_IFINFO 0xe /* iface going up/down etc. */
-#define RTM_NEWMADDR 0xf /* mcast group membership being added to if */
-#define RTM_DELMADDR 0x10 /* mcast group membership being deleted */
-#define RTM_IFANNOUNCE 0x11 /* iface arrival/departure */
-
-/*
- * Bitmask values for rtm_inits and rmx_locks.
- */
-#define RTV_MTU 0x1 /* init or lock _mtu */
-#define RTV_HOPCOUNT 0x2 /* init or lock _hopcount */
-#define RTV_EXPIRE 0x4 /* init or lock _expire */
-#define RTV_RPIPE 0x8 /* init or lock _recvpipe */
-#define RTV_SPIPE 0x10 /* init or lock _sendpipe */
-#define RTV_SSTHRESH 0x20 /* init or lock _ssthresh */
-#define RTV_RTT 0x40 /* init or lock _rtt */
-#define RTV_RTTVAR 0x80 /* init or lock _rttvar */
-
-/*
- * Bitmask values for rtm_addrs.
- */
-#define RTA_DST 0x1 /* destination sockaddr present */
-#define RTA_GATEWAY 0x2 /* gateway sockaddr present */
-#define RTA_NETMASK 0x4 /* netmask sockaddr present */
-#define RTA_GENMASK 0x8 /* cloning mask sockaddr present */
-#define RTA_IFP 0x10 /* interface name sockaddr present */
-#define RTA_IFA 0x20 /* interface addr sockaddr present */
-#define RTA_AUTHOR 0x40 /* sockaddr for author of redirect */
-#define RTA_BRD 0x80 /* for NEWADDR, broadcast or p-p dest addr */
-
-/*
- * Index offsets for sockaddr array for alternate internal encoding.
- */
-#define RTAX_DST 0 /* destination sockaddr present */
-#define RTAX_GATEWAY 1 /* gateway sockaddr present */
-#define RTAX_NETMASK 2 /* netmask sockaddr present */
-#define RTAX_GENMASK 3 /* cloning mask sockaddr present */
-#define RTAX_IFP 4 /* interface name sockaddr present */
-#define RTAX_IFA 5 /* interface addr sockaddr present */
-#define RTAX_AUTHOR 6 /* sockaddr for author of redirect */
-#define RTAX_BRD 7 /* for NEWADDR, broadcast or p-p dest addr */
-#define RTAX_MAX 8 /* size of array to allocate */
-
-struct rt_addrinfo {
- int rti_addrs;
- struct sockaddr *rti_info[RTAX_MAX];
- int rti_flags;
- struct ifaddr *rti_ifa;
- struct ifnet *rti_ifp;
-};
-
-struct route_cb {
- int ip_count;
- int ip6_count;
- int ipx_count;
- int ns_count;
- int any_count;
-};
-
-#ifdef _KERNEL
-#define RTFREE(rt) \
- do { \
- if ((rt)->rt_refcnt <= 1) \
- rtfree(rt); \
- else \
- (rt)->rt_refcnt--; \
- } while (0)
-
-extern struct route_cb route_cb;
-extern struct radix_node_head *rt_tables[AF_MAX+1];
-
-struct ifmultiaddr;
-
-void route_init(void);
-int rt_getifa(struct rt_addrinfo *);
-void rt_ifannouncemsg(struct ifnet *, int);
-void rt_ifmsg(struct ifnet *);
-void rt_missmsg(int, struct rt_addrinfo *, int, int);
-void rt_newaddrmsg(int, struct ifaddr *, int, struct rtentry *);
-void rt_newmaddrmsg(int, struct ifmultiaddr *);
-int rt_setgate(struct rtentry *, struct sockaddr *, struct sockaddr *);
-void rtalloc(struct route *);
-void rtalloc_ign(struct route *, u_long);
-struct rtentry *
- rtalloc1(struct sockaddr *, int, u_long);
-void rtfree(struct rtentry *);
-int rtinit(struct ifaddr *, int, int);
-int rtioctl(u_long, caddr_t);
-void rtredirect(struct sockaddr *, struct sockaddr *,
- struct sockaddr *, int, struct sockaddr *, struct rtentry **);
-int rtrequest(int, struct sockaddr *,
- struct sockaddr *, struct sockaddr *, int, struct rtentry **);
-int rtrequest1(int, struct rt_addrinfo *, struct rtentry **);
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/net/slcompress.h b/newlib/libc/sys/linux/include/net/slcompress.h
deleted file mode 100644
index a054246bc..000000000
--- a/newlib/libc/sys/linux/include/net/slcompress.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Definitions for tcp compression routines.
- *
- * 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
- * - Initial distribution.
- * $FreeBSD: src/sys/net/slcompress.h,v 1.17 2002/03/19 21:54:18 alfred Exp $
- */
-
-#ifndef _NET_SLCOMPRESS_H_
-#define _NET_SLCOMPRESS_H_
-
-#define MAX_STATES 16 /* must be > 2 and < 256 */
-#define MAX_HDR 128
-
-/*
- * Compressed packet format:
- *
- * The first octet contains the packet type (top 3 bits), TCP
- * 'push' bit, and flags that indicate which of the 4 TCP sequence
- * numbers have changed (bottom 5 bits). The next octet is a
- * conversation number that associates a saved IP/TCP header with
- * the compressed packet. The next two octets are the TCP checksum
- * from the original datagram. The next 0 to 15 octets are
- * sequence number changes, one change per bit set in the header
- * (there may be no changes and there are two special cases where
- * the receiver implicitly knows what changed -- see below).
- *
- * There are 5 numbers which can change (they are always inserted
- * in the following order): TCP urgent pointer, window,
- * acknowledgement, sequence number and IP ID. (The urgent pointer
- * is different from the others in that its value is sent, not the
- * change in value.) Since typical use of SLIP links is biased
- * toward small packets (see comments on MTU/MSS below), changes
- * use a variable length coding with one octet for numbers in the
- * range 1 - 255 and 3 octets (0, MSB, LSB) for numbers in the
- * range 256 - 65535 or 0. (If the change in sequence number or
- * ack is more than 65535, an uncompressed packet is sent.)
- */
-
-/*
- * Packet types (must not conflict with IP protocol version)
- *
- * The top nibble of the first octet is the packet type. There are
- * three possible types: IP (not proto TCP or tcp with one of the
- * control flags set); uncompressed TCP (a normal IP/TCP packet but
- * with the 8-bit protocol field replaced by an 8-bit connection id --
- * this type of packet syncs the sender & receiver); and compressed
- * TCP (described above).
- *
- * LSB of 4-bit field is TCP "PUSH" bit (a worthless anachronism) and
- * is logically part of the 4-bit "changes" field that follows. Top
- * three bits are actual packet type. For backward compatibility
- * and in the interest of conserving bits, numbers are chosen so the
- * IP protocol version number (4) which normally appears in this nibble
- * means "IP packet".
- */
-
-/* packet types */
-#define TYPE_IP 0x40
-#define TYPE_UNCOMPRESSED_TCP 0x70
-#define TYPE_COMPRESSED_TCP 0x80
-#define TYPE_ERROR 0x00
-
-/* Bits in first octet of compressed packet */
-#define NEW_C 0x40 /* flag bits for what changed in a packet */
-#define NEW_I 0x20
-#define NEW_S 0x08
-#define NEW_A 0x04
-#define NEW_W 0x02
-#define NEW_U 0x01
-
-/* reserved, special-case values of above */
-#define SPECIAL_I (NEW_S|NEW_W|NEW_U) /* echoed interactive traffic */
-#define SPECIAL_D (NEW_S|NEW_A|NEW_W|NEW_U) /* unidirectional data */
-#define SPECIALS_MASK (NEW_S|NEW_A|NEW_W|NEW_U)
-
-#define TCP_PUSH_BIT 0x10
-
-
-/*
- * "state" data for each active tcp conversation on the wire. This is
- * basically a copy of the entire IP/TCP header from the last packet
- * we saw from the conversation together with a small identifier
- * the transmit & receive ends of the line use to locate saved header.
- */
-struct cstate {
- struct cstate *cs_next; /* next most recently used cstate (xmit only) */
- u_int16_t cs_hlen; /* size of hdr (receive only) */
- u_char cs_id; /* connection # associated with this state */
- u_char cs_filler;
- union {
- char csu_hdr[MAX_HDR];
- struct ip csu_ip; /* ip/tcp hdr from most recent packet */
- } slcs_u;
-};
-#define cs_ip slcs_u.csu_ip
-#define cs_hdr slcs_u.csu_hdr
-
-/*
- * all the state data for one serial line (we need one of these
- * per line).
- */
-struct slcompress {
- struct cstate *last_cs; /* most recently used tstate */
- u_char last_recv; /* last rcvd conn. id */
- u_char last_xmit; /* last sent conn. id */
- u_int16_t flags;
-#ifndef SL_NO_STATS
- int sls_packets; /* outbound packets */
- int sls_compressed; /* outbound compressed packets */
- int sls_searches; /* searches for connection state */
- int sls_misses; /* times couldn't find conn. state */
- int sls_uncompressedin; /* inbound uncompressed packets */
- int sls_compressedin; /* inbound compressed packets */
- int sls_errorin; /* inbound unknown type packets */
- int sls_tossed; /* inbound packets tossed because of error */
-#endif
- struct cstate tstate[MAX_STATES]; /* xmit connection states */
- struct cstate rstate[MAX_STATES]; /* receive connection states */
-};
-/* flag values */
-#define SLF_TOSS 1 /* tossing rcvd frames because of input err */
-
-void sl_compress_init(struct slcompress *, int);
-u_int sl_compress_tcp(struct mbuf *, struct ip *, struct slcompress *, int);
-int sl_uncompress_tcp(u_char **, int, u_int, struct slcompress *);
-int sl_uncompress_tcp_core(u_char *, int, int, u_int,
- struct slcompress *, u_char **, u_int *);
-
-#endif /* !_NET_SLCOMPRESS_H_ */
diff --git a/newlib/libc/sys/linux/include/net/slip.h b/newlib/libc/sys/linux/include/net/slip.h
deleted file mode 100644
index 595b935a1..000000000
--- a/newlib/libc/sys/linux/include/net/slip.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-
- * Copyright (c) 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)slip.h 8.1 (Berkeley) 2/12/94
- * $FreeBSD: src/sys/net/slip.h,v 1.9 1999/08/28 00:48:29 peter Exp $
- */
-
-#ifndef _NET_SLIP_H_
-#define _NET_SLIP_H_
-
-/* Ioctls operating on SLIP ttys. */
-#define SLIOCGUNIT _IOR('t', 88, int) /* get slip unit number */
-#define SLIOCSKEEPAL _IOW('t', 84, int) /* set keepalive */
-#define SLIOCSOUTFILL _IOW('t', 83, int) /* set out fill time */
-#define SLIOCGKEEPAL _IOR('t', 82, int) /* get keepalive time */
-#define SLIOCGOUTFILL _IOR('t', 81, int) /* get out fill time */
-#define SLIOCSUNIT _IOW('t', 80, int) /* set slip unit number */
-
-/*
- * Definitions of the pseudo-link-level header attached to slip
- * packets grabbed by the packet filter (bpf) traffic monitor.
- */
-#define SLIP_HDRLEN 16 /* BPF SLIP header length */
-
-/* Offsets into BPF SLIP header. */
-#define SLX_DIR 0 /* direction; see below */
-#define SLX_CHDR 1 /* compressed header data */
-#define CHDR_LEN 15 /* length of compressed header data */
-
-#define SLIPDIR_IN 0 /* incoming */
-#define SLIPDIR_OUT 1 /* outgoing */
-
-#endif /* !_NET_SLIP_H */
diff --git a/newlib/libc/sys/linux/include/net/zlib.h b/newlib/libc/sys/linux/include/net/zlib.h
deleted file mode 100644
index c2d32be1f..000000000
--- a/newlib/libc/sys/linux/include/net/zlib.h
+++ /dev/null
@@ -1,1013 +0,0 @@
-/* $FreeBSD: src/sys/net/zlib.h,v 1.7 1999/12/29 04:38:38 peter Exp $ */
-
-/*
- * This file is derived from zlib.h and zconf.h from the zlib-1.0.4
- * distribution by Jean-loup Gailly and Mark Adler, with some additions
- * by Paul Mackerras to aid in implementing Deflate compression and
- * decompression for PPP packets.
- */
-
-/*
- * ==FILEVERSION 971127==
- *
- * This marker is used by the Linux installation script to determine
- * whether an up-to-date version of this file is already installed.
- */
-
-
-/* +++ zlib.h */
-/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 1.0.4, Jul 24th, 1996.
-
- Copyright (C) 1995-1996 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
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Jean-loup Gailly Mark Adler
- gzip@prep.ai.mit.edu madler@alumni.caltech.edu
-
-
- The data format used by the zlib library is described by RFCs (Request for
- Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt
- (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
-*/
-
-#ifndef _ZLIB_H
-#define _ZLIB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* +++ zconf.h */
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-1996 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* From: zconf.h,v 1.20 1996/07/02 15:09:28 me Exp $ */
-
-#ifndef _ZCONF_H
-#define _ZCONF_H
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- */
-#ifdef Z_PREFIX
-# define deflateInit_ z_deflateInit_
-# define deflate z_deflate
-# define deflateEnd z_deflateEnd
-# define inflateInit_ z_inflateInit_
-# define inflate z_inflate
-# define inflateEnd z_inflateEnd
-# define deflateInit2_ z_deflateInit2_
-# define deflateSetDictionary z_deflateSetDictionary
-# define deflateCopy z_deflateCopy
-# define deflateReset z_deflateReset
-# define deflateParams z_deflateParams
-# define inflateInit2_ z_inflateInit2_
-# define inflateSetDictionary z_inflateSetDictionary
-# define inflateSync z_inflateSync
-# define inflateReset z_inflateReset
-# define compress z_compress
-# define uncompress z_uncompress
-# define adler32 z_adler32
-# define crc32 z_crc32
-# define get_crc_table z_get_crc_table
-
-# define Byte z_Byte
-# define uInt z_uInt
-# define uLong z_uLong
-# define Bytef z_Bytef
-# define charf z_charf
-# define intf z_intf
-# define uIntf z_uIntf
-# define uLongf z_uLongf
-# define voidpf z_voidpf
-# define voidp z_voidp
-#endif
-
-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
-# define WIN32
-#endif
-#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
-# ifndef __32BIT__
-# define __32BIT__
-# endif
-#endif
-#if defined(__MSDOS__) && !defined(MSDOS)
-# define MSDOS
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#if defined(MSDOS) && !defined(__32BIT__)
-# define MAXSEG_64K
-#endif
-#ifdef MSDOS
-# define UNALIGNED_OK
-#endif
-
-#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC)
-# define STDC
-#endif
-#if (defined(__STDC__) || defined(__cplusplus)) && !defined(STDC)
-# define STDC
-#endif
-
-#ifndef STDC
-# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-# define const
-# endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
-# define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-# ifdef MAXSEG_64K
-# define MAX_MEM_LEVEL 8
-# else
-# define MAX_MEM_LEVEL 9
-# endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2 */
-#ifndef MAX_WBITS
-# define MAX_WBITS 15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
- 1 << (windowBits+2) + 1 << (memLevel+9)
- that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
- make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
- The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
- /* Type declarations */
-
-#ifndef OF /* function prototypes */
-# ifdef STDC
-# define OF(args) args
-# else
-# define OF(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
- * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
- /* MSC small or medium model */
-# define SMALL_MEDIUM
-# ifdef _MSC_VER
-# define FAR __far
-# else
-# define FAR far
-# endif
-#endif
-#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
-# ifndef __32BIT__
-# define SMALL_MEDIUM
-# define FAR __far
-# endif
-#endif
-#ifndef FAR
-# define FAR
-#endif
-
-typedef unsigned char Byte; /* 8 bits */
-typedef unsigned int uInt; /* 16 bits or more */
-typedef unsigned long uLong; /* 32 bits or more */
-
-#if defined(__BORLANDC__) && defined(SMALL_MEDIUM)
- /* Borland C/C++ ignores FAR inside typedef */
-# define Bytef Byte FAR
-#else
- typedef Byte FAR Bytef;
-#endif
-typedef char FAR charf;
-typedef int FAR intf;
-typedef uInt FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
- typedef void FAR *voidpf;
- typedef void *voidp;
-#else
- typedef Byte FAR *voidpf;
- typedef Byte *voidp;
-#endif
-
-
-/* Compile with -DZLIB_DLL for Windows DLL support */
-#if (defined(_WINDOWS) || defined(WINDOWS)) && defined(ZLIB_DLL)
-# include <windows.h>
-# define EXPORT WINAPI
-#else
-# define EXPORT
-#endif
-
-#endif /* _ZCONF_H */
-/* --- zconf.h */
-
-#define ZLIB_VERSION "1.0.4P"
-
-/*
- The 'zlib' compression library provides in-memory compression and
- decompression functions, including integrity checks of the uncompressed
- data. This version of the library supports only one compression method
- (deflation) but other algorithms may be added later and will have the same
- stream interface.
-
- For compression the application must provide the output buffer and
- may optionally provide the input buffer for optimization. For decompression,
- the application must provide the input buffer and may optionally provide
- the output buffer for optimization.
-
- Compression can be done in a single step if the buffers are large
- enough (for example if an input file is mmap'ed), or can be done by
- repeated calls of the compression function. In the latter case, the
- application must provide more input and/or consume the output
- (providing more output space) before each call.
-
- The library does not install any signal handler. It is recommended to
- add at least a handler for SIGSEGV when decompressing; the library checks
- the consistency of the input data whenever possible but may go nuts
- for some forms of corrupted input.
-*/
-
-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
-typedef void (*free_func) OF((voidpf opaque, voidpf address));
-
-struct internal_state;
-
-typedef struct z_stream_s {
- 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 */
-
- 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 */
-
- 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 */
- free_func zfree; /* used to free the internal state */
- voidpf opaque; /* private data object passed to zalloc and zfree */
-
- int data_type; /* best guess about the data type: ascii or binary */
- uLong adler; /* adler32 value of the uncompressed data */
- uLong reserved; /* reserved for future use */
-} z_stream;
-
-typedef z_stream FAR *z_streamp;
-
-/*
- The application must update next_in and avail_in when avail_in has
- dropped to zero. It must update next_out and avail_out when avail_out
- has dropped to zero. The application must initialize zalloc, zfree and
- opaque before calling the init function. All other fields are set by the
- compression library and must not be updated by the application.
-
- The opaque value provided by the application will be passed as the first
- parameter for calls of zalloc and zfree. This can be useful for custom
- memory management. The compression library attaches no meaning to the
- opaque value.
-
- zalloc must return Z_NULL if there is not enough memory for the object.
- On 16-bit systems, the functions zalloc and zfree must be able to allocate
- exactly 65536 bytes, but will not be required to allocate more than this
- if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
- pointers returned by zalloc for objects of exactly 65536 bytes *must*
- have their offset normalized to zero. The default allocation function
- provided by this library ensures this (see zutil.c). To reduce memory
- requirements and avoid any allocation of 64K objects, at the expense of
- compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-
- The fields total_in and total_out can be used for statistics or
- progress reports. After compression, total_in holds the total size of
- the uncompressed data and may be saved for use in the decompressor
- (particularly if the decompressor wants to decompress everything in
- a single step).
-*/
-
- /* constants */
-
-#define Z_NO_FLUSH 0
-#define Z_PARTIAL_FLUSH 1
-#define Z_PACKET_FLUSH 2
-#define Z_SYNC_FLUSH 3
-#define Z_FULL_FLUSH 4
-#define Z_FINISH 5
-/* Allowed flush values; see deflate() below for details */
-
-#define Z_OK 0
-#define Z_STREAM_END 1
-#define Z_NEED_DICT 2
-#define Z_ERRNO (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR (-3)
-#define Z_MEM_ERROR (-4)
-#define Z_BUF_ERROR (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION 0
-#define Z_BEST_SPEED 1
-#define Z_BEST_COMPRESSION 9
-#define Z_DEFAULT_COMPRESSION (-1)
-/* compression levels */
-
-#define Z_FILTERED 1
-#define Z_HUFFMAN_ONLY 2
-#define Z_DEFAULT_STRATEGY 0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY 0
-#define Z_ASCII 1
-#define Z_UNKNOWN 2
-/* Possible values of the data_type field */
-
-#define Z_DEFLATED 8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
-
-#define zlib_version zlibVersion()
-/* for compatibility with versions < 1.0.2 */
-
- /* basic functions */
-
-extern const char * EXPORT zlibVersion OF((void));
-/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
- If the first character differs, the library code actually used is
- not compatible with the zlib.h header file used by the application.
- This check is automatically made by deflateInit and inflateInit.
- */
-
-/*
-extern int EXPORT deflateInit OF((z_streamp strm, int level));
-
- Initializes the internal stream state for compression. The fields
- zalloc, zfree and opaque must be initialized before by the caller.
- If zalloc and zfree are set to Z_NULL, deflateInit updates them to
- use default allocation functions.
-
- The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
- 1 gives best speed, 9 gives best compression, 0 gives no compression at
- all (the input data is simply copied a block at a time).
- Z_DEFAULT_COMPRESSION requests a default compromise between speed and
- compression (currently equivalent to level 6).
-
- deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if level is not a valid compression level,
- Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
- with the version assumed by the caller (ZLIB_VERSION).
- msg is set to null if there is no error message. deflateInit does not
- perform any compression: this will be done by deflate().
-*/
-
-
-extern int EXPORT deflate OF((z_streamp strm, int flush));
-/*
- Performs one or both of the following actions:
-
- - Compress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in and avail_in are updated and
- processing will resume at this point for the next call of deflate().
-
- - Provide more output starting at next_out and update next_out and avail_out
- accordingly. This action is forced if the parameter flush is non zero.
- Forcing flush frequently degrades the compression ratio, so this parameter
- should be set only when necessary (in interactive applications).
- Some output may be provided even if flush is not set.
-
- Before the call of deflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating avail_in or avail_out accordingly; avail_out
- should never be zero before the call. The application can consume the
- compressed output when it wants, for example when the output buffer is full
- (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
- and with zero avail_out, it must be called again after making room in the
- output buffer because there might be more output pending.
-
- If the parameter flush is set to Z_PARTIAL_FLUSH, the current compression
- block is terminated and flushed to the output buffer so that the
- decompressor can get all input data available so far. For method 9, a future
- variant on method 8, the current block will be flushed but not terminated.
- Z_SYNC_FLUSH has the same effect as partial flush except that the compressed
- output is byte aligned (the compressor can clear its internal bit buffer)
- and the current block is always terminated; this can be useful if the
- compressor has to be restarted from scratch after an interruption (in which
- case the internal state of the compressor may be lost).
- If flush is set to Z_FULL_FLUSH, the compression block is terminated, a
- special marker is output and the compression dictionary is discarded; this
- is useful to allow the decompressor to synchronize if one compressed block
- has been damaged (see inflateSync below). Flushing degrades compression and
- so should be used only when necessary. Using Z_FULL_FLUSH too often can
- seriously degrade the compression. If deflate returns with avail_out == 0,
- this function must be called again with the same value of the flush
- parameter and more output space (updated avail_out), until the flush is
- complete (deflate returns with non-zero avail_out).
-
- If the parameter flush is set to Z_PACKET_FLUSH, the compression
- block is terminated, and a zero-length stored block is output,
- omitting the length bytes (the effect of this is that the 3-bit type
- code 000 for a stored block is output, and the output is then
- byte-aligned). This is designed for use at the end of a PPP packet.
-
- If the parameter flush is set to Z_FINISH, pending input is processed,
- pending output is flushed and deflate returns with Z_STREAM_END if there
- was enough output space; if deflate returns with Z_OK, this function must be
- called again with Z_FINISH and more output space (updated avail_out) but no
- more input data, until it returns with Z_STREAM_END or an error. After
- deflate has returned Z_STREAM_END, the only possible operations on the
- stream are deflateReset or deflateEnd.
-
- 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
- 0.1% larger than avail_in plus 12 bytes. If deflate does not return
- Z_STREAM_END, then it must be called again as described above.
-
- deflate() may update data_type if it can make a good guess about
- the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered
- binary. This field is only for information purposes and does not affect
- the compression algorithm in any manner.
-
- deflate() returns Z_OK if some progress has been made (more input
- processed or more output produced), Z_STREAM_END if all input has been
- consumed and all output has been produced (only when flush is set to
- Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
- if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible.
-*/
-
-
-extern int EXPORT deflateEnd OF((z_streamp strm));
-/*
- All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
-
- deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
- stream state was inconsistent, Z_DATA_ERROR if the stream was freed
- prematurely (some input or output was discarded). In the error case,
- msg may be set but then points to a static string (which must not be
- deallocated).
-*/
-
-
-/*
-extern int EXPORT inflateInit OF((z_streamp strm));
-
- Initializes the internal stream state for decompression. The fields
- zalloc, zfree and opaque must be initialized before by the caller. If
- zalloc and zfree are set to Z_NULL, inflateInit updates them to use default
- allocation functions.
-
- inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_VERSION_ERROR if the zlib library version is incompatible
- with the version assumed by the caller. msg is set to null if there is no
- error message. inflateInit does not perform any decompression: this will be
- done by inflate().
-*/
-
-#if defined(__FreeBSD__) && defined(_KERNEL)
-#define inflate inflate_ppp /* FreeBSD already has an inflate :-( */
-#endif
-
-extern int EXPORT inflate OF((z_streamp strm, int flush));
-/*
- Performs one or both of the following actions:
-
- - Decompress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in is updated and processing
- will resume at this point for the next call of inflate().
-
- - Provide more output starting at next_out and update next_out and avail_out
- accordingly. inflate() provides as much output as possible, until there
- is no more input data or no more space in the output buffer (see below
- about the flush parameter).
-
- Before the call of inflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating the next_* and avail_* values accordingly.
- The application can consume the uncompressed output when it wants, for
- example when the output buffer is full (avail_out == 0), or after each
- call of inflate(). If inflate returns Z_OK and with zero avail_out, it
- must be called again after making room in the output buffer because there
- might be more output pending.
-
- If the parameter flush is set to Z_PARTIAL_FLUSH or Z_PACKET_FLUSH,
- inflate flushes as much output as possible to the output buffer. The
- flushing behavior of inflate is not specified for values of the flush
- parameter other than Z_PARTIAL_FLUSH, Z_PACKET_FLUSH or Z_FINISH, but the
- current implementation actually flushes as much output as possible
- anyway. For Z_PACKET_FLUSH, inflate checks that once all the input data
- has been consumed, it is expecting to see the length field of a stored
- block; if not, it returns Z_DATA_ERROR.
-
- inflate() should normally be called until it returns Z_STREAM_END or an
- 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 routine
- may be used for the single inflate() call.
-
- 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 been reached and all uncompressed output has been
- produced, Z_NEED_DICT if a preset dictionary is needed at this point (see
- inflateSetDictionary below), Z_DATA_ERROR if the input data was corrupted,
- Z_STREAM_ERROR if the stream structure was inconsistent (for example if
- next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
- Z_BUF_ERROR if no progress is possible or if there was not enough room in
- the output buffer when Z_FINISH is used. In the Z_DATA_ERROR case, the
- application may then call inflateSync to look for a good compression block.
- In the Z_NEED_DICT case, strm->adler is set to the Adler32 value of the
- dictionary chosen by the compressor.
-*/
-
-
-extern int EXPORT inflateEnd OF((z_streamp strm));
-/*
- All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
-
- inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
- was inconsistent. In the error case, msg may be set but then points to a
- static string (which must not be deallocated).
-*/
-
- /* Advanced functions */
-
-/*
- The following functions are needed only in some special applications.
-*/
-
-/*
-extern int EXPORT deflateInit2 OF((z_streamp strm,
- int level,
- int method,
- int windowBits,
- int memLevel,
- int strategy));
-
- This is another version of deflateInit with more compression options. The
- fields next_in, zalloc, zfree and opaque must be initialized before by
- the caller.
-
- The method parameter is the compression method. It must be Z_DEFLATED in
- this version of the library. (Method 9 will allow a 64K history buffer and
- partial block flushes.)
-
- The windowBits parameter is the base two logarithm of the window size
- (the size of the history buffer). It should be in the range 8..15 for this
- version of the library (the value 16 will be allowed for method 9). Larger
- values of this parameter result in better compression at the expense of
- memory usage. The default value is 15 if deflateInit is used instead.
-
- The memLevel parameter specifies how much memory should be allocated
- for the internal compression state. memLevel=1 uses minimum memory but
- is slow and reduces compression ratio; memLevel=9 uses maximum memory
- for optimal speed. The default value is 8. See zconf.h for total memory
- usage as a function of windowBits and memLevel.
-
- The strategy parameter is used to tune the compression algorithm. Use the
- value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
- filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no
- string match). Filtered data consists mostly of small values with a
- somewhat random distribution. In this case, the compression algorithm is
- tuned to compress them better. The effect of Z_FILTERED is to force more
- Huffman coding and less string matching; it is somewhat intermediate
- between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects
- the compression ratio but not the correctness of the compressed output even
- if it is not set appropriately.
-
- If next_in is not null, the library will use this buffer to hold also
- some history information; the buffer must either hold the entire input
- data, or have at least 1<<(windowBits+1) bytes and be writable. If next_in
- is null, the library will allocate its own history buffer (and leave next_in
- null). next_out need not be provided here but must be provided by the
- application for the next call of deflate().
-
- If the history buffer is provided by the application, next_in must
- must never be changed by the application since the compressor maintains
- information inside this buffer from call to call; the application
- must provide more input only by increasing avail_in. next_in is always
- reset by the library in this case.
-
- deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was
- not enough memory, Z_STREAM_ERROR if a parameter is invalid (such as
- an invalid method). msg is set to null if there is no error message.
- deflateInit2 does not perform any compression: this will be done by
- deflate().
-*/
-
-extern int EXPORT deflateSetDictionary OF((z_streamp strm,
- const Bytef *dictionary,
- uInt dictLength));
-/*
- Initializes the compression dictionary (history buffer) from the given
- byte sequence without producing any compressed output. This function must
- be called immediately after deflateInit or deflateInit2, before any call
- of deflate. 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
- used strings preferably put towards the end of the dictionary. Using a
- dictionary is most useful when the data to be compressed is short and
- can be predicted with good accuracy; the data can then be compressed better
- than with the default empty dictionary. In this version of the library,
- only the last 32K bytes of the dictionary are used.
- Upon return of this function, strm->adler is set to the Adler32 value
- of the dictionary; the decompressor may later use this value to determine
- which dictionary has been used by the compressor. (The Adler32 value
- applies to the whole dictionary even if only a subset of the dictionary is
- actually used by the compressor.)
-
- deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state
- is inconsistent (for example if deflate has already been called for this
- stream). deflateSetDictionary does not perform any compression: this will
- be done by deflate().
-*/
-
-extern int EXPORT deflateCopy OF((z_streamp dest,
- z_streamp source));
-/*
- Sets the destination stream as a complete copy of the source stream. If
- the source stream is using an application-supplied history buffer, a new
- buffer is allocated for the destination stream. The compressed output
- buffer is always application-supplied. It's the responsibility of the
- application to provide the correct values of next_out and avail_out for the
- next call of deflate.
-
- This function can be useful when several compression strategies will be
- tried, for example when there are several ways of pre-processing the input
- data with a filter. The streams that will be discarded should then be freed
- by calling deflateEnd. Note that deflateCopy duplicates the internal
- compression state which can be quite large, so this strategy is slow and
- can consume lots of memory.
-
- deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
- (such as zalloc being NULL). msg is left unchanged in both source and
- destination.
-*/
-
-extern int EXPORT deflateReset OF((z_streamp strm));
-/*
- This function is equivalent to deflateEnd followed by deflateInit,
- but does not free and reallocate all the internal compression state.
- The stream will keep the same compression level and any other attributes
- that may have been set by deflateInit2.
-
- deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-extern int EXPORT deflateParams OF((z_streamp strm, int level, int strategy));
-/*
- Dynamically update the compression level and compression strategy.
- This can be used to switch between compression and straight copy of
- the input data, or to switch to a different kind of input data requiring
- a different strategy. If the compression level is changed, the input
- available so far is compressed with the old level (and may be flushed);
- the new level will take effect only at the next call of deflate().
-
- Before the call of deflateParams, the stream state must be set as for
- a call of deflate(), since the currently available input may have to
- be compressed and flushed. In particular, strm->avail_out must be non-zero.
-
- deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
- stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
- if strm->avail_out was zero.
-*/
-
-extern int EXPORT deflateOutputPending OF((z_streamp strm));
-/*
- Returns the number of bytes of output which are immediately
- available from the compressor (i.e. without any further input
- or flush).
-*/
-
-/*
-extern int EXPORT inflateInit2 OF((z_streamp strm,
- int windowBits));
-
- This is another version of inflateInit with more compression options. The
- fields next_out, zalloc, zfree and opaque must be initialized before by
- the caller.
-
- The windowBits parameter is the base two logarithm of the maximum window
- size (the size of the history buffer). It should be in the range 8..15 for
- this version of the library (the value 16 will be allowed soon). The
- default value is 15 if inflateInit is used instead. If a compressed stream
- with a larger window size is given as input, inflate() will return with
- the error code Z_DATA_ERROR instead of trying to allocate a larger window.
-
- If next_out is not null, the library will use this buffer for the history
- buffer; the buffer must either be large enough to hold the entire output
- data, or have at least 1<<windowBits bytes. If next_out is null, the
- library will allocate its own buffer (and leave next_out null). next_in
- need not be provided here but must be provided by the application for the
- next call of inflate().
-
- If the history buffer is provided by the application, next_out must
- never be changed by the application since the decompressor maintains
- history information inside this buffer from call to call; the application
- can only reset next_out to the beginning of the history buffer when
- avail_out is zero and all output has been consumed.
-
- inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was
- not enough memory, Z_STREAM_ERROR if a parameter is invalid (such as
- windowBits < 8). msg is set to null if there is no error message.
- inflateInit2 does not perform any decompression: this will be done by
- inflate().
-*/
-
-extern int EXPORT inflateSetDictionary OF((z_streamp strm,
- const Bytef *dictionary,
- uInt dictLength));
-/*
- Initializes the decompression dictionary (history buffer) from the given
- uncompressed byte sequence. This function must be called immediately after
- a call of inflate if this call returned Z_NEED_DICT. The dictionary chosen
- by the compressor can be determined from the Adler32 value returned by this
- call of inflate. The compressor and decompressor must use exactly the same
- dictionary (see deflateSetDictionary).
-
- inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state is
- inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
- expected one (incorrect Adler32 value). inflateSetDictionary does not
- perform any decompression: this will be done by subsequent calls of
- inflate().
-*/
-
-extern int EXPORT inflateSync OF((z_streamp strm));
-/*
- Skips invalid compressed data until the special marker (see deflate()
- above) can be found, or until all available input is skipped. No output
- is provided.
-
- inflateSync returns Z_OK if the special marker has been found, Z_BUF_ERROR
- if no more input was provided, Z_DATA_ERROR if no marker 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.
-*/
-
-extern int EXPORT inflateReset OF((z_streamp strm));
-/*
- This function is equivalent to inflateEnd followed by inflateInit,
- but does not free and reallocate all the internal decompression state.
- The stream will keep attributes that may have been set by inflateInit2.
-
- inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-extern int inflateIncomp OF((z_stream *strm));
-/*
- This function adds the data at next_in (avail_in bytes) to the output
- history without performing any output. There must be no pending output,
- and the decompressor must be expecting to see the start of a block.
- Calling this function is equivalent to decompressing a stored block
- containing the data at next_in (except that the data is not output).
-*/
-
- /* utility functions */
-
-/*
- The following utility functions are implemented on top of the
- basic stream-oriented functions. To simplify the interface, some
- default options are assumed (compression level, window size,
- standard memory allocation functions). The source code of these
- utility functions can easily be modified if you need special options.
-*/
-
-extern int EXPORT compress OF((Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen));
-/*
- Compresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be at least 0.1% larger than
- sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the
- compressed buffer.
- This function can be used to compress a whole file at once if the
- input file is mmap'ed.
- compress 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.
-*/
-
-extern int EXPORT uncompress OF((Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen));
-/*
- Decompresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be large enough to hold the
- entire uncompressed data. (The size of the uncompressed data must have
- been saved previously by the compressor and transmitted to the decompressor
- by some mechanism outside the scope of this compression library.)
- Upon exit, destLen is the actual size of the compressed buffer.
- This function can be used to decompress a whole file at once if the
- input file is mmap'ed.
-
- 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.
-*/
-
-
-typedef voidp gzFile;
-
-extern gzFile EXPORT gzopen OF((const char *path, const char *mode));
-/*
- Opens a gzip (.gz) file for reading or writing. The mode parameter
- is as in fopen ("rb" or "wb") but can also include a compression level
- ("wb9"). 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.
- gzopen returns NULL if the file could not be opened or if there was
- insufficient memory to allocate the (de)compression state; errno
- can be checked to distinguish the two cases (if errno is zero, the
- zlib error is Z_MEM_ERROR).
-*/
-
-extern gzFile EXPORT gzdopen OF((int fd, const char *mode));
-/*
- gzdopen() associates a gzFile with the file descriptor fd. File
- descriptors are obtained from calls like open, dup, creat, pipe or
- fileno (in the file has been previously opened with fopen).
- The mode parameter is as in gzopen.
- The next call of gzclose on the returned gzFile will also close the
- file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
- descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
- gzdopen returns NULL if there was insufficient memory to allocate
- the (de)compression state.
-*/
-
-extern int EXPORT 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.
- gzread returns the number of uncompressed bytes actually read (0 for
- end of file, -1 for error). */
-
-extern int EXPORT gzwrite OF((gzFile file, const voidp buf, unsigned len));
-/*
- Writes the given number of uncompressed bytes into the compressed file.
- gzwrite returns the number of uncompressed bytes actually written
- (0 in case of error).
-*/
-
-extern int EXPORT gzflush OF((gzFile file, int flush));
-/*
- Flushes all pending output into the compressed file. The parameter
- flush is as in the deflate() function. The return value is the zlib
- error number (see function gzerror below). gzflush returns Z_OK if
- the flush parameter is Z_FINISH and all output could be flushed.
- gzflush should be called only when strictly necessary because it can
- degrade compression.
-*/
-
-extern int EXPORT gzclose OF((gzFile file));
-/*
- Flushes all pending output if necessary, closes the compressed file
- and deallocates all the (de)compression state. The return value is the zlib
- error number (see function gzerror below).
-*/
-
-extern const char * EXPORT gzerror OF((gzFile file, int *errnum));
-/*
- Returns the error message for the last error which occurred on the
- given compressed file. errnum is set to zlib error number. If an
- error occurred in the file system and not in the compression library,
- errnum is set to Z_ERRNO and the application may consult errno
- to get the exact error code.
-*/
-
- /* checksum functions */
-
-/*
- These functions are not related to compression but are exported
- anyway because they might be useful in applications using the
- compression library.
-*/
-
-extern uLong EXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
-
-/*
- Update a running Adler-32 checksum with the bytes buf[0..len-1] and
- return the updated checksum. If buf is NULL, this function returns
- the required initial value for the checksum.
- An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
- much faster. Usage example:
-
- uLong adler = adler32(0L, Z_NULL, 0);
-
- while (read_buffer(buffer, length) != EOF) {
- adler = adler32(adler, buffer, length);
- }
- if (adler != original_adler) error();
-*/
-
-extern uLong EXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
-/*
- Update a running crc with the bytes buf[0..len-1] and return the updated
- crc. If buf is NULL, this function returns the required 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:
-
- uLong crc = crc32(0L, Z_NULL, 0);
-
- while (read_buffer(buffer, length) != EOF) {
- crc = crc32(crc, buffer, length);
- }
- if (crc != original_crc) error();
-*/
-
-
- /* various hacks, don't look :) */
-
-/* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
-extern int EXPORT deflateInit_ OF((z_streamp strm, int level,
- const char *version, int stream_size));
-extern int EXPORT inflateInit_ OF((z_streamp strm,
- const char *version, int stream_size));
-extern int EXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
- int windowBits, int memLevel, int strategy,
- const char *version, int stream_size));
-extern int EXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
- const char *version, int stream_size));
-#define deflateInit(strm, level) \
- deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit(strm) \
- inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
- deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
- (strategy), ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit2(strm, windowBits) \
- inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
-
-#if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL)
- struct internal_state {int dummy;}; /* hack for buggy compilers */
-#endif
-
-uLongf *get_crc_table OF((void)); /* can be used by asm versions of crc32() */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ZLIB_H */
-/* --- zlib.h */
diff --git a/newlib/libc/sys/linux/include/netconfig.h b/newlib/libc/sys/linux/include/netconfig.h
deleted file mode 100644
index cead32109..000000000
--- a/newlib/libc/sys/linux/include/netconfig.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* $NetBSD: netconfig.h,v 1.1 2000/06/02 22:57:54 fvdl Exp $ */
-/* $FreeBSD: src/include/netconfig.h,v 1.3 2002/03/23 17:24:53 imp Exp $ */
-
-
-#ifndef _NETCONFIG_H_
-#define _NETCONFIG_H_
-
-#include <sys/cdefs.h>
-
-#define NETCONFIG "/etc/netconfig"
-#define NETPATH "NETPATH"
-
-struct netconfig {
- char *nc_netid; /* Network ID */
- unsigned long nc_semantics; /* Semantics (see below) */
- unsigned long nc_flag; /* Flags (see below) */
- char *nc_protofmly; /* Protocol family */
- char *nc_proto; /* Protocol name */
- char *nc_device; /* Network device pathname */
- unsigned long nc_nlookups; /* Number of directory lookup libs */
- char **nc_lookups; /* Names of the libraries */
- unsigned long nc_unused[9]; /* reserved */
-};
-
-typedef struct {
- struct netconfig **nc_head;
- struct netconfig **nc_curr;
-} NCONF_HANDLE;
-
-/*
- * nc_semantics values
- */
-#define NC_TPI_CLTS 1
-#define NC_TPI_COTS 2
-#define NC_TPI_COTS_ORD 3
-#define NC_TPI_RAW 4
-
-/*
- * nc_flag values
- */
-#define NC_NOFLAG 0x00
-#define NC_VISIBLE 0x01
-#define NC_BROADCAST 0x02
-
-/*
- * nc_protofmly values
- */
-#define NC_NOPROTOFMLY "-"
-#define NC_LOOPBACK "loopback"
-#define NC_INET "inet"
-#define NC_INET6 "inet6"
-#define NC_IMPLINK "implink"
-#define NC_PUP "pup"
-#define NC_CHAOS "chaos"
-#define NC_NS "ns"
-#define NC_NBS "nbs"
-#define NC_ECMA "ecma"
-#define NC_DATAKIT "datakit"
-#define NC_CCITT "ccitt"
-#define NC_SNA "sna"
-#define NC_DECNET "decnet"
-#define NC_DLI "dli"
-#define NC_LAT "lat"
-#define NC_HYLINK "hylink"
-#define NC_APPLETALK "appletalk"
-#define NC_NIT "nit"
-#define NC_IEEE802 "ieee802"
-#define NC_OSI "osi"
-#define NC_X25 "x25"
-#define NC_OSINET "osinet"
-#define NC_GOSIP "gosip"
-
-/*
- * nc_proto values
- */
-#define NC_NOPROTO "-"
-#define NC_TCP "tcp"
-#define NC_UDP "udp"
-#define NC_ICMP "icmp"
-
-__BEGIN_DECLS
-void *setnetconfig(void);
-struct netconfig *getnetconfig(void *);
-struct netconfig *getnetconfigent(const char *);
-void freenetconfigent(struct netconfig *);
-int endnetconfig(void *);
-
-void *setnetpath(void);
-struct netconfig *getnetpath(void *);
-int endnetpath(void *);
-
-void nc_perror(const char *);
-char *nc_sperror(void);
-__END_DECLS
-
-#endif /* _NETCONFIG_H_ */
diff --git a/newlib/libc/sys/linux/include/netdb.h b/newlib/libc/sys/linux/include/netdb.h
deleted file mode 100644
index e92b269e2..000000000
--- a/newlib/libc/sys/linux/include/netdb.h
+++ /dev/null
@@ -1,277 +0,0 @@
-/*-
- * Copyright (c) 1980, 1983, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-/*
- * @(#)netdb.h 8.1 (Berkeley) 6/2/93
- * From: Id: netdb.h,v 8.9 1996/11/19 08:39:29 vixie Exp $
- * $FreeBSD: src/include/netdb.h,v 1.23 2002/03/23 17:24:53 imp Exp $
- */
-
-#ifndef _NETDB_H_
-#define _NETDB_H_
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/ansi.h>
-#include <stdio.h>
-
-#ifndef __socklen_t_defined
-typedef unsigned int socklen_t;
-#define __socklen_t_defined 1
-#endif
-
-#ifdef _BSD_SOCKLEN_T_
-typedef _BSD_SOCKLEN_T_ socklen_t;
-#undef _BSD_SOCKLEN_T_
-#endif
-
-#ifndef _PATH_HEQUIV
-# define _PATH_HEQUIV "/etc/hosts.equiv"
-#endif
-#define _PATH_HOSTS "/etc/hosts"
-#define _PATH_NETWORKS "/etc/networks"
-#define _PATH_PROTOCOLS "/etc/protocols"
-#define _PATH_SERVICES "/etc/services"
-
-extern int h_errno;
-
-#define MAXALIASES 35
- /* For now, only support one return address. */
-#define MAXADDRS 2
-/*
- * Structures returned by network data base library. All addresses are
- * supplied in host order, and returned in network order (suitable for
- * use in system calls).
- */
-struct hostent {
- char *h_name; /* official name of host */
- char **h_aliases; /* alias list */
- int h_addrtype; /* host address type */
- int h_length; /* length of address */
- char **h_addr_list; /* list of addresses from name server */
- char *h_addr; /* address, for backward compatibility */
- /* private data, for re-entrancy */
- char *__host_addrs[MAXADDRS];
- char *__host_aliases[MAXALIASES];
- unsigned int __host_addr[4];
-};
-
-/*
- * Assumption here is that a network number
- * fits in an unsigned long -- probably a poor one.
- */
-struct netent {
- char *n_name; /* official name of net */
- char **n_aliases; /* alias list */
- int n_addrtype; /* net address type */
- unsigned long n_net; /* network # */
-};
-
-struct servent {
- char *s_name; /* official service name */
- char **s_aliases; /* alias list */
- int s_port; /* port # */
- char *s_proto; /* protocol to use */
-};
-
-struct protoent {
- char *p_name; /* official protocol name */
- char **p_aliases; /* alias list */
- int p_proto; /* protocol # */
-};
-
-struct addrinfo {
- int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
- int ai_family; /* PF_xxx */
- int ai_socktype; /* SOCK_xxx */
- int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
- size_t ai_addrlen; /* length of ai_addr */
- char *ai_canonname; /* canonical name for hostname */
- struct sockaddr *ai_addr; /* binary address */
- struct addrinfo *ai_next; /* next structure in linked list */
-};
-
-/*
- * Error return codes from gethostbyname() and gethostbyaddr()
- * (left in extern int h_errno).
- */
-
-#define NETDB_INTERNAL -1 /* see errno */
-#define NETDB_SUCCESS 0 /* no problem */
-#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
-#define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */
-#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
-#define NO_DATA 4 /* Valid name, no data record of requested type */
-#define NO_ADDRESS NO_DATA /* no address, look for MX record */
-
-/*
- * Error return codes from getaddrinfo()
- */
-#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */
-#define EAI_AGAIN 2 /* temporary failure in name resolution */
-#define EAI_BADFLAGS 3 /* invalid value for ai_flags */
-#define EAI_FAIL 4 /* non-recoverable failure in name resolution */
-#define EAI_FAMILY 5 /* ai_family not supported */
-#define EAI_MEMORY 6 /* memory allocation failure */
-#define EAI_NODATA 7 /* no address associated with hostname */
-#define EAI_NONAME 8 /* hostname nor servname provided, or not known */
-#define EAI_SERVICE 9 /* servname not supported for ai_socktype */
-#define EAI_SOCKTYPE 10 /* ai_socktype not supported */
-#define EAI_SYSTEM 11 /* system error returned in errno */
-#define EAI_BADHINTS 12
-#define EAI_PROTOCOL 13
-#define EAI_MAX 14
-
-/*
- * Flag values for getaddrinfo()
- */
-#define AI_PASSIVE 0x00000001 /* get address to use bind() */
-#define AI_CANONNAME 0x00000002 /* fill ai_canonname */
-#define AI_NUMERICHOST 0x00000004 /* prevent name resolution */
-/* valid flags for addrinfo */
-#define AI_MASK \
- (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_ADDRCONFIG)
-
-#define AI_ALL 0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */
-#define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */
-#define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */
-#define AI_V4MAPPED 0x00000800 /* accept IPv4-mapped IPv6 address */
-/* special recommended flags for getipnodebyname */
-#define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG)
-
-/*
- * Constants for getnameinfo()
- */
-#define NI_MAXHOST 1025
-#define NI_MAXSERV 32
-
-/*
- * Flag values for getnameinfo()
- */
-#define NI_NOFQDN 0x00000001
-#define NI_NUMERICHOST 0x00000002
-#define NI_NAMEREQD 0x00000004
-#define NI_NUMERICSERV 0x00000008
-#define NI_DGRAM 0x00000010
-#define NI_WITHSCOPEID 0x00000020
-
-/*
- * Scope delimit character
- */
-#define SCOPE_DELIMITER '%'
-
-__BEGIN_DECLS
-void endhostent(void);
-void endhostent_r(FILE **, int *);
-void endnetent(void);
-void endnetgrent(void);
-void endprotoent(void);
-void endservent(void);
-void freehostent(struct hostent *);
-struct hostent *gethostbyaddr(const char *, int, int);
-struct hostent *gethostbyname(const char *);
-struct hostent *gethostbyname2(const char *, int);
-struct hostent *gethostent(void);
-int gethostent_r(struct hostent *, char *, int, int *, FILE **);
-struct hostent *getipnodebyaddr(const void *, size_t, int, int *);
-struct hostent *getipnodebyname(const char *, int, int, int *);
-struct netent *getnetbyaddr(unsigned long, int);
-struct netent *getnetbyname(const char *);
-struct netent *getnetent(void);
-int getnetgrent(char **, char **, char **);
-struct protoent *getprotobyname(const char *);
-struct protoent *getprotobynumber(int);
-struct protoent *getprotoent(void);
-struct servent *getservbyname(const char *, const char *);
-struct servent *getservbyport(int, const char *);
-struct servent *getservent(void);
-void herror(const char *);
-__const char *hstrerror(int);
-int innetgr(const char *, const char *, const char *, const char *);
-void sethostent(int);
-void sethostent_r(int, FILE **, int *);
-/* void sethostfile(const char *); */
-void setnetent(int);
-void setprotoent(int);
-int getaddrinfo(const char *, const char *,
- const struct addrinfo *, struct addrinfo **);
-int getnameinfo(const struct sockaddr *, socklen_t, char *,
- size_t, char *, size_t, int);
-void freeaddrinfo(struct addrinfo *);
-char *gai_strerror(int);
-void setnetgrent(const char *);
-void setservent(int);
-
-/*
- * PRIVATE functions specific to the FreeBSD implementation
- */
-
-/* DO NOT USE THESE, THEY ARE SUBJECT TO CHANGE AND ARE NOT PORTABLE!!! */
-void _sethosthtent(int);
-void _sethosthtent_r(int, FILE **, int *);
-void _endhosthtent(void);
-void _endhosthtent_r(FILE **, int *);
-void _sethostdnsent(int);
-void _endhostdnsent(void);
-void _setnethtent(int);
-void _endnethtent(void);
-void _setnetdnsent(int);
-void _endnetdnsent(void);
-struct hostent * _gethostbynisname(const char *, int);
-struct hostent * _gethostbynisaddr(const char *, int, int);
-void _map_v4v6_address(const char *, char *);
-void _map_v4v6_hostent(struct hostent *, char **, int *);
-__END_DECLS
-
-#endif /* !_NETDB_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet/icmp6.h b/newlib/libc/sys/linux/include/netinet/icmp6.h
deleted file mode 100644
index 915efda64..000000000
--- a/newlib/libc/sys/linux/include/netinet/icmp6.h
+++ /dev/null
@@ -1,740 +0,0 @@
-/* $FreeBSD: src/sys/netinet/icmp6.h,v 1.8 2002/05/06 16:28:25 ume Exp $ */
-/* $KAME: icmp6.h,v 1.46 2001/04/27 15:09:48 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93
- */
-
-#ifndef _NETINET_ICMP6_H_
-#define _NETINET_ICMP6_H_
-
-#define ICMPV6_PLD_MAXLEN 1232 /* IPV6_MMTU - sizeof(struct ip6_hdr)
- - sizeof(struct icmp6_hdr) */
-
-struct icmp6_hdr {
- u_int8_t icmp6_type; /* type field */
- u_int8_t icmp6_code; /* code field */
- u_int16_t icmp6_cksum; /* checksum field */
- union {
- u_int32_t icmp6_un_data32[1]; /* type-specific field */
- u_int16_t icmp6_un_data16[2]; /* type-specific field */
- u_int8_t icmp6_un_data8[4]; /* type-specific field */
- } icmp6_dataun;
-} __attribute__((__packed__));
-
-#define icmp6_data32 icmp6_dataun.icmp6_un_data32
-#define icmp6_data16 icmp6_dataun.icmp6_un_data16
-#define icmp6_data8 icmp6_dataun.icmp6_un_data8
-#define icmp6_pptr icmp6_data32[0] /* parameter prob */
-#define icmp6_mtu icmp6_data32[0] /* packet too big */
-#define icmp6_id icmp6_data16[0] /* echo request/reply */
-#define icmp6_seq icmp6_data16[1] /* echo request/reply */
-#define icmp6_maxdelay icmp6_data16[0] /* mcast group membership */
-
-#define ICMP6_DST_UNREACH 1 /* dest unreachable, codes: */
-#define ICMP6_PACKET_TOO_BIG 2 /* packet too big */
-#define ICMP6_TIME_EXCEEDED 3 /* time exceeded, code: */
-#define ICMP6_PARAM_PROB 4 /* ip6 header bad */
-
-#define ICMP6_ECHO_REQUEST 128 /* echo service */
-#define ICMP6_ECHO_REPLY 129 /* echo reply */
-#define ICMP6_MEMBERSHIP_QUERY 130 /* group membership query */
-#define MLD_LISTENER_QUERY 130 /* multicast listener query */
-#define ICMP6_MEMBERSHIP_REPORT 131 /* group membership report */
-#define MLD_LISTENER_REPORT 131 /* multicast listener report */
-#define ICMP6_MEMBERSHIP_REDUCTION 132 /* group membership termination */
-#define MLD_LISTENER_DONE 132 /* multicast listener done */
-
-#ifndef _KERNEL
-/* the followings are for backward compatibility to old KAME apps. */
-#define MLD6_LISTENER_QUERY MLD_LISTENER_QUERY
-#define MLD6_LISTENER_REPORT MLD_LISTENER_REPORT
-#define MLD6_LISTENER_DONE MLD_LISTENER_DONE
-#endif
-
-#define ND_ROUTER_SOLICIT 133 /* router solicitation */
-#define ND_ROUTER_ADVERT 134 /* router advertisment */
-#define ND_NEIGHBOR_SOLICIT 135 /* neighbor solicitation */
-#define ND_NEIGHBOR_ADVERT 136 /* neighbor advertisment */
-#define ND_REDIRECT 137 /* redirect */
-
-#define ICMP6_ROUTER_RENUMBERING 138 /* router renumbering */
-
-#define ICMP6_WRUREQUEST 139 /* who are you request */
-#define ICMP6_WRUREPLY 140 /* who are you reply */
-#define ICMP6_FQDN_QUERY 139 /* FQDN query */
-#define ICMP6_FQDN_REPLY 140 /* FQDN reply */
-#define ICMP6_NI_QUERY 139 /* node information request */
-#define ICMP6_NI_REPLY 140 /* node information reply */
-
-/* The definitions below are experimental. TBA */
-#define MLD_MTRACE_RESP 200 /* mtrace resp (to sender) */
-#define MLD_MTRACE 201 /* mtrace messages */
-
-#define ICMP6_HADISCOV_REQUEST 202 /* XXX To be defined */
-#define ICMP6_HADISCOV_REPLY 203 /* XXX To be defined */
-
-#ifndef _KERNEL
-#define MLD6_MTRACE_RESP MLD_MTRACE_RESP
-#define MLD6_MTRACE MLD_MTRACE
-#endif
-
-#define ICMP6_MAXTYPE 203
-
-#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */
-#define ICMP6_DST_UNREACH_ADMIN 1 /* administratively prohibited */
-#define ICMP6_DST_UNREACH_NOTNEIGHBOR 2 /* not a neighbor(obsolete) */
-#define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */
-#define ICMP6_DST_UNREACH_ADDR 3 /* address unreachable */
-#define ICMP6_DST_UNREACH_NOPORT 4 /* port unreachable */
-
-#define ICMP6_TIME_EXCEED_TRANSIT 0 /* ttl==0 in transit */
-#define ICMP6_TIME_EXCEED_REASSEMBLY 1 /* ttl==0 in reass */
-
-#define ICMP6_PARAMPROB_HEADER 0 /* erroneous header field */
-#define ICMP6_PARAMPROB_NEXTHEADER 1 /* unrecognized next header */
-#define ICMP6_PARAMPROB_OPTION 2 /* unrecognized option */
-
-#define ICMP6_INFOMSG_MASK 0x80 /* all informational messages */
-
-#define ICMP6_NI_SUBJ_IPV6 0 /* Query Subject is an IPv6 address */
-#define ICMP6_NI_SUBJ_FQDN 1 /* Query Subject is a Domain name */
-#define ICMP6_NI_SUBJ_IPV4 2 /* Query Subject is an IPv4 address */
-
-#define ICMP6_NI_SUCCESS 0 /* node information successful reply */
-#define ICMP6_NI_REFUSED 1 /* node information request is refused */
-#define ICMP6_NI_UNKNOWN 2 /* unknown Qtype */
-
-#define ICMP6_ROUTER_RENUMBERING_COMMAND 0 /* rr command */
-#define ICMP6_ROUTER_RENUMBERING_RESULT 1 /* rr result */
-#define ICMP6_ROUTER_RENUMBERING_SEQNUM_RESET 255 /* rr seq num reset */
-
-/* Used in kernel only */
-#define ND_REDIRECT_ONLINK 0 /* redirect to an on-link node */
-#define ND_REDIRECT_ROUTER 1 /* redirect to a better router */
-
-/*
- * Multicast Listener Discovery
- */
-struct mld_hdr {
- struct icmp6_hdr mld_icmp6_hdr;
- struct in6_addr mld_addr; /* multicast address */
-} __attribute__((__packed__));
-
-/* definitions to provide backward compatibility to old KAME applications */
-#ifndef _KERNEL
-#define mld6_hdr mld_hdr
-#define mld6_type mld_type
-#define mld6_code mld_code
-#define mld6_cksum mld_cksum
-#define mld6_maxdelay mld_maxdelay
-#define mld6_reserved mld_reserved
-#define mld6_addr mld_addr
-#endif
-
-/* shortcut macro definitions */
-#define mld_type mld_icmp6_hdr.icmp6_type
-#define mld_code mld_icmp6_hdr.icmp6_code
-#define mld_cksum mld_icmp6_hdr.icmp6_cksum
-#define mld_maxdelay mld_icmp6_hdr.icmp6_data16[0]
-#define mld_reserved mld_icmp6_hdr.icmp6_data16[1]
-
-/*
- * Neighbor Discovery
- */
-
-struct nd_router_solicit { /* router solicitation */
- struct icmp6_hdr nd_rs_hdr;
- /* could be followed by options */
-} __attribute__((__packed__));
-
-#define nd_rs_type nd_rs_hdr.icmp6_type
-#define nd_rs_code nd_rs_hdr.icmp6_code
-#define nd_rs_cksum nd_rs_hdr.icmp6_cksum
-#define nd_rs_reserved nd_rs_hdr.icmp6_data32[0]
-
-struct nd_router_advert { /* router advertisement */
- struct icmp6_hdr nd_ra_hdr;
- u_int32_t nd_ra_reachable; /* reachable time */
- u_int32_t nd_ra_retransmit; /* retransmit timer */
- /* could be followed by options */
-} __attribute__((__packed__));
-
-#define nd_ra_type nd_ra_hdr.icmp6_type
-#define nd_ra_code nd_ra_hdr.icmp6_code
-#define nd_ra_cksum nd_ra_hdr.icmp6_cksum
-#define nd_ra_curhoplimit nd_ra_hdr.icmp6_data8[0]
-#define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1]
-#define ND_RA_FLAG_MANAGED 0x80
-#define ND_RA_FLAG_OTHER 0x40
-#define ND_RA_FLAG_HA 0x20
-
-/*
- * Router preference values based on draft-draves-ipngwg-router-selection-01.
- * These are non-standard definitions.
- */
-#define ND_RA_FLAG_RTPREF_MASK 0x18 /* 00011000 */
-
-#define ND_RA_FLAG_RTPREF_HIGH 0x08 /* 00001000 */
-#define ND_RA_FLAG_RTPREF_MEDIUM 0x00 /* 00000000 */
-#define ND_RA_FLAG_RTPREF_LOW 0x18 /* 00011000 */
-#define ND_RA_FLAG_RTPREF_RSV 0x10 /* 00010000 */
-
-#define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1]
-
-struct nd_neighbor_solicit { /* neighbor solicitation */
- struct icmp6_hdr nd_ns_hdr;
- struct in6_addr nd_ns_target; /*target address */
- /* could be followed by options */
-} __attribute__((__packed__));
-
-#define nd_ns_type nd_ns_hdr.icmp6_type
-#define nd_ns_code nd_ns_hdr.icmp6_code
-#define nd_ns_cksum nd_ns_hdr.icmp6_cksum
-#define nd_ns_reserved nd_ns_hdr.icmp6_data32[0]
-
-struct nd_neighbor_advert { /* neighbor advertisement */
- struct icmp6_hdr nd_na_hdr;
- struct in6_addr nd_na_target; /* target address */
- /* could be followed by options */
-} __attribute__((__packed__));
-
-#define nd_na_type nd_na_hdr.icmp6_type
-#define nd_na_code nd_na_hdr.icmp6_code
-#define nd_na_cksum nd_na_hdr.icmp6_cksum
-#define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0]
-#if BYTE_ORDER == BIG_ENDIAN
-#define ND_NA_FLAG_ROUTER 0x80000000
-#define ND_NA_FLAG_SOLICITED 0x40000000
-#define ND_NA_FLAG_OVERRIDE 0x20000000
-#else
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define ND_NA_FLAG_ROUTER 0x80
-#define ND_NA_FLAG_SOLICITED 0x40
-#define ND_NA_FLAG_OVERRIDE 0x20
-#endif
-#endif
-
-struct nd_redirect { /* redirect */
- struct icmp6_hdr nd_rd_hdr;
- struct in6_addr nd_rd_target; /* target address */
- struct in6_addr nd_rd_dst; /* destination address */
- /* could be followed by options */
-} __attribute__((__packed__));
-
-#define nd_rd_type nd_rd_hdr.icmp6_type
-#define nd_rd_code nd_rd_hdr.icmp6_code
-#define nd_rd_cksum nd_rd_hdr.icmp6_cksum
-#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0]
-
-struct nd_opt_hdr { /* Neighbor discovery option header */
- u_int8_t nd_opt_type;
- u_int8_t nd_opt_len;
- /* followed by option specific data*/
-} __attribute__((__packed__));
-
-#define ND_OPT_SOURCE_LINKADDR 1
-#define ND_OPT_TARGET_LINKADDR 2
-#define ND_OPT_PREFIX_INFORMATION 3
-#define ND_OPT_REDIRECTED_HEADER 4
-#define ND_OPT_MTU 5
-
-#define ND_OPT_ROUTE_INFO 200 /* draft-ietf-ipngwg-router-preference, not officially assigned yet */
-
-struct nd_opt_prefix_info { /* prefix information */
- u_int8_t nd_opt_pi_type;
- u_int8_t nd_opt_pi_len;
- u_int8_t nd_opt_pi_prefix_len;
- u_int8_t nd_opt_pi_flags_reserved;
- u_int32_t nd_opt_pi_valid_time;
- u_int32_t nd_opt_pi_preferred_time;
- u_int32_t nd_opt_pi_reserved2;
- struct in6_addr nd_opt_pi_prefix;
-} __attribute__((__packed__));
-
-#define ND_OPT_PI_FLAG_ONLINK 0x80
-#define ND_OPT_PI_FLAG_AUTO 0x40
-
-struct nd_opt_rd_hdr { /* redirected header */
- u_int8_t nd_opt_rh_type;
- u_int8_t nd_opt_rh_len;
- u_int16_t nd_opt_rh_reserved1;
- u_int32_t nd_opt_rh_reserved2;
- /* followed by IP header and data */
-} __attribute__((__packed__));
-
-struct nd_opt_mtu { /* MTU option */
- u_int8_t nd_opt_mtu_type;
- u_int8_t nd_opt_mtu_len;
- u_int16_t nd_opt_mtu_reserved;
- u_int32_t nd_opt_mtu_mtu;
-} __attribute__((__packed__));
-
-struct nd_opt_route_info { /* route info */
- u_int8_t nd_opt_rti_type;
- u_int8_t nd_opt_rti_len;
- u_int8_t nd_opt_rti_prefixlen;
- u_int8_t nd_opt_rti_flags;
- u_int32_t nd_opt_rti_lifetime;
- /* prefix follows */
-} __attribute__((__packed__));
-
-/*
- * icmp6 namelookup
- */
-
-struct icmp6_namelookup {
- struct icmp6_hdr icmp6_nl_hdr;
- u_int8_t icmp6_nl_nonce[8];
- int32_t icmp6_nl_ttl;
-#if 0
- u_int8_t icmp6_nl_len;
- u_int8_t icmp6_nl_name[3];
-#endif
- /* could be followed by options */
-} __attribute__((__packed__));
-
-/*
- * icmp6 node information
- */
-struct icmp6_nodeinfo {
- struct icmp6_hdr icmp6_ni_hdr;
- u_int8_t icmp6_ni_nonce[8];
- /* could be followed by reply data */
-} __attribute__((__packed__));
-
-#define ni_type icmp6_ni_hdr.icmp6_type
-#define ni_code icmp6_ni_hdr.icmp6_code
-#define ni_cksum icmp6_ni_hdr.icmp6_cksum
-#define ni_qtype icmp6_ni_hdr.icmp6_data16[0]
-#define ni_flags icmp6_ni_hdr.icmp6_data16[1]
-
-#define NI_QTYPE_NOOP 0 /* NOOP */
-#define NI_QTYPE_SUPTYPES 1 /* Supported Qtypes */
-#define NI_QTYPE_FQDN 2 /* FQDN (draft 04) */
-#define NI_QTYPE_DNSNAME 2 /* DNS Name */
-#define NI_QTYPE_NODEADDR 3 /* Node Addresses */
-#define NI_QTYPE_IPV4ADDR 4 /* IPv4 Addresses */
-
-#if BYTE_ORDER == BIG_ENDIAN
-#define NI_SUPTYPE_FLAG_COMPRESS 0x1
-#define NI_FQDN_FLAG_VALIDTTL 0x1
-#elif BYTE_ORDER == LITTLE_ENDIAN
-#define NI_SUPTYPE_FLAG_COMPRESS 0x0100
-#define NI_FQDN_FLAG_VALIDTTL 0x0100
-#endif
-
-#ifdef NAME_LOOKUPS_04
-#if BYTE_ORDER == BIG_ENDIAN
-#define NI_NODEADDR_FLAG_LINKLOCAL 0x1
-#define NI_NODEADDR_FLAG_SITELOCAL 0x2
-#define NI_NODEADDR_FLAG_GLOBAL 0x4
-#define NI_NODEADDR_FLAG_ALL 0x8
-#define NI_NODEADDR_FLAG_TRUNCATE 0x10
-#define NI_NODEADDR_FLAG_ANYCAST 0x20 /* just experimental. not in spec */
-#elif BYTE_ORDER == LITTLE_ENDIAN
-#define NI_NODEADDR_FLAG_LINKLOCAL 0x0100
-#define NI_NODEADDR_FLAG_SITELOCAL 0x0200
-#define NI_NODEADDR_FLAG_GLOBAL 0x0400
-#define NI_NODEADDR_FLAG_ALL 0x0800
-#define NI_NODEADDR_FLAG_TRUNCATE 0x1000
-#define NI_NODEADDR_FLAG_ANYCAST 0x2000 /* just experimental. not in spec */
-#endif
-#else /* draft-ietf-ipngwg-icmp-name-lookups-05 (and later?) */
-#if BYTE_ORDER == BIG_ENDIAN
-#define NI_NODEADDR_FLAG_TRUNCATE 0x1
-#define NI_NODEADDR_FLAG_ALL 0x2
-#define NI_NODEADDR_FLAG_COMPAT 0x4
-#define NI_NODEADDR_FLAG_LINKLOCAL 0x8
-#define NI_NODEADDR_FLAG_SITELOCAL 0x10
-#define NI_NODEADDR_FLAG_GLOBAL 0x20
-#define NI_NODEADDR_FLAG_ANYCAST 0x40 /* just experimental. not in spec */
-#elif BYTE_ORDER == LITTLE_ENDIAN
-#define NI_NODEADDR_FLAG_TRUNCATE 0x0100
-#define NI_NODEADDR_FLAG_ALL 0x0200
-#define NI_NODEADDR_FLAG_COMPAT 0x0400
-#define NI_NODEADDR_FLAG_LINKLOCAL 0x0800
-#define NI_NODEADDR_FLAG_SITELOCAL 0x1000
-#define NI_NODEADDR_FLAG_GLOBAL 0x2000
-#define NI_NODEADDR_FLAG_ANYCAST 0x4000 /* just experimental. not in spec */
-#endif
-#endif
-
-struct ni_reply_fqdn {
- u_int32_t ni_fqdn_ttl; /* TTL */
- u_int8_t ni_fqdn_namelen; /* length in octets of the FQDN */
- u_int8_t ni_fqdn_name[3]; /* XXX: alignment */
-} __attribute__((__packed__));
-
-/*
- * Router Renumbering. as router-renum-08.txt
- */
-struct icmp6_router_renum { /* router renumbering header */
- struct icmp6_hdr rr_hdr;
- u_int8_t rr_segnum;
- u_int8_t rr_flags;
- u_int16_t rr_maxdelay;
- u_int32_t rr_reserved;
-} __attribute__((__packed__));
-
-#define ICMP6_RR_FLAGS_TEST 0x80
-#define ICMP6_RR_FLAGS_REQRESULT 0x40
-#define ICMP6_RR_FLAGS_FORCEAPPLY 0x20
-#define ICMP6_RR_FLAGS_SPECSITE 0x10
-#define ICMP6_RR_FLAGS_PREVDONE 0x08
-
-#define rr_type rr_hdr.icmp6_type
-#define rr_code rr_hdr.icmp6_code
-#define rr_cksum rr_hdr.icmp6_cksum
-#define rr_seqnum rr_hdr.icmp6_data32[0]
-
-struct rr_pco_match { /* match prefix part */
- u_int8_t rpm_code;
- u_int8_t rpm_len;
- u_int8_t rpm_ordinal;
- u_int8_t rpm_matchlen;
- u_int8_t rpm_minlen;
- u_int8_t rpm_maxlen;
- u_int16_t rpm_reserved;
- struct in6_addr rpm_prefix;
-} __attribute__((__packed__));
-
-#define RPM_PCO_ADD 1
-#define RPM_PCO_CHANGE 2
-#define RPM_PCO_SETGLOBAL 3
-#define RPM_PCO_MAX 4
-
-struct rr_pco_use { /* use prefix part */
- u_int8_t rpu_uselen;
- u_int8_t rpu_keeplen;
- u_int8_t rpu_ramask;
- u_int8_t rpu_raflags;
- u_int32_t rpu_vltime;
- u_int32_t rpu_pltime;
- u_int32_t rpu_flags;
- struct in6_addr rpu_prefix;
-} __attribute__((__packed__));
-#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x80
-#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x40
-
-#if BYTE_ORDER == BIG_ENDIAN
-#define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80000000
-#define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40000000
-#elif BYTE_ORDER == LITTLE_ENDIAN
-#define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80
-#define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40
-#endif
-
-struct rr_result { /* router renumbering result message */
- u_int16_t rrr_flags;
- u_int8_t rrr_ordinal;
- u_int8_t rrr_matchedlen;
- u_int32_t rrr_ifid;
- struct in6_addr rrr_prefix;
-} __attribute__((__packed__));
-#if BYTE_ORDER == BIG_ENDIAN
-#define ICMP6_RR_RESULT_FLAGS_OOB 0x0002
-#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001
-#elif BYTE_ORDER == LITTLE_ENDIAN
-#define ICMP6_RR_RESULT_FLAGS_OOB 0x0200
-#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0100
-#endif
-
-/*
- * icmp6 filter structures.
- */
-
-struct icmp6_filter {
- u_int32_t icmp6_filt[8];
-};
-
-#ifdef _KERNEL
-#define ICMP6_FILTER_SETPASSALL(filterp) \
-do { \
- int i; u_char *p; \
- p = (u_char *)filterp; \
- for (i = 0; i < sizeof(struct icmp6_filter); i++) \
- p[i] = 0xff; \
-} while (0)
-#define ICMP6_FILTER_SETBLOCKALL(filterp) \
- bzero(filterp, sizeof(struct icmp6_filter))
-#else /* _KERNEL */
-#define ICMP6_FILTER_SETPASSALL(filterp) \
- memset(filterp, 0xff, sizeof(struct icmp6_filter))
-#define ICMP6_FILTER_SETBLOCKALL(filterp) \
- memset(filterp, 0x00, sizeof(struct icmp6_filter))
-#endif /* _KERNEL */
-
-#define ICMP6_FILTER_SETPASS(type, filterp) \
- (((filterp)->icmp6_filt[(type) >> 5]) |= (1 << ((type) & 31)))
-#define ICMP6_FILTER_SETBLOCK(type, filterp) \
- (((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31)))
-#define ICMP6_FILTER_WILLPASS(type, filterp) \
- ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0)
-#define ICMP6_FILTER_WILLBLOCK(type, filterp) \
- ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0)
-
-/*
- * Variables related to this implementation
- * of the internet control message protocol version 6.
- */
-struct icmp6errstat {
- u_quad_t icp6errs_dst_unreach_noroute;
- u_quad_t icp6errs_dst_unreach_admin;
- u_quad_t icp6errs_dst_unreach_beyondscope;
- u_quad_t icp6errs_dst_unreach_addr;
- u_quad_t icp6errs_dst_unreach_noport;
- u_quad_t icp6errs_packet_too_big;
- u_quad_t icp6errs_time_exceed_transit;
- u_quad_t icp6errs_time_exceed_reassembly;
- u_quad_t icp6errs_paramprob_header;
- u_quad_t icp6errs_paramprob_nextheader;
- u_quad_t icp6errs_paramprob_option;
- u_quad_t icp6errs_redirect; /* we regard redirect as an error here */
- u_quad_t icp6errs_unknown;
-};
-
-struct icmp6stat {
-/* statistics related to icmp6 packets generated */
- u_quad_t icp6s_error; /* # of calls to icmp6_error */
- u_quad_t icp6s_canterror; /* no error 'cuz old was icmp */
- u_quad_t icp6s_toofreq; /* no error 'cuz rate limitation */
- u_quad_t icp6s_outhist[256];
-/* statistics related to input message processed */
- u_quad_t icp6s_badcode; /* icmp6_code out of range */
- u_quad_t icp6s_tooshort; /* packet < sizeof(struct icmp6_hdr) */
- u_quad_t icp6s_checksum; /* bad checksum */
- u_quad_t icp6s_badlen; /* calculated bound mismatch */
- /*
- * number of responses: this member is inherited from netinet code, but
- * for netinet6 code, it is already available in icp6s_outhist[].
- */
- u_quad_t icp6s_reflect;
- u_quad_t icp6s_inhist[256];
- u_quad_t icp6s_nd_toomanyopt; /* too many ND options */
- struct icmp6errstat icp6s_outerrhist;
-#define icp6s_odst_unreach_noroute \
- icp6s_outerrhist.icp6errs_dst_unreach_noroute
-#define icp6s_odst_unreach_admin icp6s_outerrhist.icp6errs_dst_unreach_admin
-#define icp6s_odst_unreach_beyondscope \
- icp6s_outerrhist.icp6errs_dst_unreach_beyondscope
-#define icp6s_odst_unreach_addr icp6s_outerrhist.icp6errs_dst_unreach_addr
-#define icp6s_odst_unreach_noport icp6s_outerrhist.icp6errs_dst_unreach_noport
-#define icp6s_opacket_too_big icp6s_outerrhist.icp6errs_packet_too_big
-#define icp6s_otime_exceed_transit \
- icp6s_outerrhist.icp6errs_time_exceed_transit
-#define icp6s_otime_exceed_reassembly \
- icp6s_outerrhist.icp6errs_time_exceed_reassembly
-#define icp6s_oparamprob_header icp6s_outerrhist.icp6errs_paramprob_header
-#define icp6s_oparamprob_nextheader \
- icp6s_outerrhist.icp6errs_paramprob_nextheader
-#define icp6s_oparamprob_option icp6s_outerrhist.icp6errs_paramprob_option
-#define icp6s_oredirect icp6s_outerrhist.icp6errs_redirect
-#define icp6s_ounknown icp6s_outerrhist.icp6errs_unknown
- u_quad_t icp6s_pmtuchg; /* path MTU changes */
- u_quad_t icp6s_nd_badopt; /* bad ND options */
- u_quad_t icp6s_badns; /* bad neighbor solicitation */
- u_quad_t icp6s_badna; /* bad neighbor advertisement */
- u_quad_t icp6s_badrs; /* bad router advertisement */
- u_quad_t icp6s_badra; /* bad router advertisement */
- u_quad_t icp6s_badredirect; /* bad redirect message */
-};
-
-/*
- * Names for ICMP sysctl objects
- */
-#define ICMPV6CTL_STATS 1
-#define ICMPV6CTL_REDIRACCEPT 2 /* accept/process redirects */
-#define ICMPV6CTL_REDIRTIMEOUT 3 /* redirect cache time */
-#if 0 /*obsoleted*/
-#define ICMPV6CTL_ERRRATELIMIT 5 /* ICMPv6 error rate limitation */
-#endif
-#define ICMPV6CTL_ND6_PRUNE 6
-#define ICMPV6CTL_ND6_DELAY 8
-#define ICMPV6CTL_ND6_UMAXTRIES 9
-#define ICMPV6CTL_ND6_MMAXTRIES 10
-#define ICMPV6CTL_ND6_USELOOPBACK 11
-/*#define ICMPV6CTL_ND6_PROXYALL 12 obsoleted, do not reuse here */
-#define ICMPV6CTL_NODEINFO 13
-#define ICMPV6CTL_ERRPPSLIMIT 14 /* ICMPv6 error pps limitation */
-#define ICMPV6CTL_ND6_MAXNUDHINT 15
-#define ICMPV6CTL_MTUDISC_HIWAT 16
-#define ICMPV6CTL_MTUDISC_LOWAT 17
-#define ICMPV6CTL_ND6_DEBUG 18
-#define ICMPV6CTL_ND6_DRLIST 19
-#define ICMPV6CTL_ND6_PRLIST 20
-#define ICMPV6CTL_MAXID 21
-
-#define ICMPV6CTL_NAMES { \
- { 0, 0 }, \
- { 0, 0 }, \
- { "rediraccept", CTLTYPE_INT }, \
- { "redirtimeout", CTLTYPE_INT }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "nd6_prune", CTLTYPE_INT }, \
- { 0, 0 }, \
- { "nd6_delay", CTLTYPE_INT }, \
- { "nd6_umaxtries", CTLTYPE_INT }, \
- { "nd6_mmaxtries", CTLTYPE_INT }, \
- { "nd6_useloopback", CTLTYPE_INT }, \
- { 0, 0 }, \
- { "nodeinfo", CTLTYPE_INT }, \
- { "errppslimit", CTLTYPE_INT }, \
- { "nd6_maxnudhint", CTLTYPE_INT }, \
- { "mtudisc_hiwat", CTLTYPE_INT }, \
- { "mtudisc_lowat", CTLTYPE_INT }, \
- { "nd6_debug", CTLTYPE_INT }, \
- { 0, 0 }, \
- { 0, 0 }, \
-}
-
-#define RTF_PROBEMTU RTF_PROTO1
-
-#ifdef _KERNEL
-# ifdef __STDC__
-struct rtentry;
-struct rttimer;
-struct in6_multi;
-# endif
-void icmp6_init(void);
-void icmp6_paramerror(struct mbuf *, int);
-void icmp6_error(struct mbuf *, int, int, int);
-int icmp6_input(struct mbuf **, int *, int);
-void icmp6_fasttimo(void);
-void icmp6_reflect(struct mbuf *, size_t);
-void icmp6_prepare(struct mbuf *);
-void icmp6_redirect_input(struct mbuf *, int);
-void icmp6_redirect_output(struct mbuf *, struct rtentry *);
-
-struct ip6ctlparam;
-void icmp6_mtudisc_update(struct ip6ctlparam *, int);
-
-/* XXX: is this the right place for these macros? */
-#define icmp6_ifstat_inc(ifp, tag) \
-do { \
- if ((ifp) && (ifp)->if_index <= if_index \
- && (ifp)->if_index < icmp6_ifstatmax \
- && icmp6_ifstat && icmp6_ifstat[(ifp)->if_index]) { \
- icmp6_ifstat[(ifp)->if_index]->tag++; \
- } \
-} while (0)
-
-#define icmp6_ifoutstat_inc(ifp, type, code) \
-do { \
- icmp6_ifstat_inc(ifp, ifs6_out_msg); \
- if (type < ICMP6_INFOMSG_MASK) \
- icmp6_ifstat_inc(ifp, ifs6_out_error); \
- switch(type) { \
- case ICMP6_DST_UNREACH: \
- icmp6_ifstat_inc(ifp, ifs6_out_dstunreach); \
- if (code == ICMP6_DST_UNREACH_ADMIN) \
- icmp6_ifstat_inc(ifp, ifs6_out_adminprohib); \
- break; \
- case ICMP6_PACKET_TOO_BIG: \
- icmp6_ifstat_inc(ifp, ifs6_out_pkttoobig); \
- break; \
- case ICMP6_TIME_EXCEEDED: \
- icmp6_ifstat_inc(ifp, ifs6_out_timeexceed); \
- break; \
- case ICMP6_PARAM_PROB: \
- icmp6_ifstat_inc(ifp, ifs6_out_paramprob); \
- break; \
- case ICMP6_ECHO_REQUEST: \
- icmp6_ifstat_inc(ifp, ifs6_out_echo); \
- break; \
- case ICMP6_ECHO_REPLY: \
- icmp6_ifstat_inc(ifp, ifs6_out_echoreply); \
- break; \
- case MLD_LISTENER_QUERY: \
- icmp6_ifstat_inc(ifp, ifs6_out_mldquery); \
- break; \
- case MLD_LISTENER_REPORT: \
- icmp6_ifstat_inc(ifp, ifs6_out_mldreport); \
- break; \
- case MLD_LISTENER_DONE: \
- icmp6_ifstat_inc(ifp, ifs6_out_mlddone); \
- break; \
- case ND_ROUTER_SOLICIT: \
- icmp6_ifstat_inc(ifp, ifs6_out_routersolicit); \
- break; \
- case ND_ROUTER_ADVERT: \
- icmp6_ifstat_inc(ifp, ifs6_out_routeradvert); \
- break; \
- case ND_NEIGHBOR_SOLICIT: \
- icmp6_ifstat_inc(ifp, ifs6_out_neighborsolicit); \
- break; \
- case ND_NEIGHBOR_ADVERT: \
- icmp6_ifstat_inc(ifp, ifs6_out_neighboradvert); \
- break; \
- case ND_REDIRECT: \
- icmp6_ifstat_inc(ifp, ifs6_out_redirect); \
- break; \
- } \
-} while (0)
-
-extern int icmp6_rediraccept; /* accept/process redirects */
-extern int icmp6_redirtimeout; /* cache time for redirect routes */
-#endif /* _KERNEL */
-
-#endif /* not _NETINET_ICMP6_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet/icmp_var.h b/newlib/libc/sys/linux/include/netinet/icmp_var.h
deleted file mode 100644
index 79ce146db..000000000
--- a/newlib/libc/sys/linux/include/netinet/icmp_var.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)icmp_var.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/icmp_var.h,v 1.21 2002/03/19 21:25:46 alfred Exp $
- */
-
-#ifndef _NETINET_ICMP_VAR_H_
-#define _NETINET_ICMP_VAR_H_
-
-
-/*
- * Variables related to this implementation
- * of the internet control message protocol.
- */
-struct icmpstat {
-/* statistics related to icmp packets generated */
- u_long icps_error; /* # of calls to icmp_error */
- u_long icps_oldshort; /* no error 'cuz old ip too short */
- u_long icps_oldicmp; /* no error 'cuz old was icmp */
- u_long icps_outhist[ICMP_MAXTYPE + 1];
-/* statistics related to input messages processed */
- u_long icps_badcode; /* icmp_code out of range */
- u_long icps_tooshort; /* packet < ICMP_MINLEN */
- u_long icps_checksum; /* bad checksum */
- u_long icps_badlen; /* calculated bound mismatch */
- u_long icps_reflect; /* number of responses */
- u_long icps_inhist[ICMP_MAXTYPE + 1];
- u_long icps_bmcastecho; /* b/mcast echo requests dropped */
- u_long icps_bmcasttstamp; /* b/mcast tstamp requests dropped */
- u_long icps_badaddr; /* bad return address */
- u_long icps_noroute; /* no route back */
-};
-
-/*
- * Names for ICMP sysctl objects
- */
-#define ICMPCTL_MASKREPL 1 /* allow replies to netmask requests */
-#define ICMPCTL_STATS 2 /* statistics (read-only) */
-#define ICMPCTL_ICMPLIM 3
-#define ICMPCTL_MAXID 4
-
-#define ICMPCTL_NAMES { \
- { 0, 0 }, \
- { "maskrepl", CTLTYPE_INT }, \
- { "stats", CTLTYPE_STRUCT }, \
- { "icmplim", CTLTYPE_INT }, \
-}
-
-#ifdef _KERNEL
-SYSCTL_DECL(_net_inet_icmp);
-extern int badport_bandlim(int);
-#define BANDLIM_UNLIMITED -1
-#define BANDLIM_ICMP_UNREACH 0
-#define BANDLIM_ICMP_ECHO 1
-#define BANDLIM_ICMP_TSTAMP 2
-#define BANDLIM_RST_CLOSEDPORT 3 /* No connection, and no listeners */
-#define BANDLIM_RST_OPENPORT 4 /* No connection, listener */
-#define BANDLIM_MAX 4
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netinet/if_atm.h b/newlib/libc/sys/linux/include/netinet/if_atm.h
deleted file mode 100644
index 04ce13ea2..000000000
--- a/newlib/libc/sys/linux/include/netinet/if_atm.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* $FreeBSD: src/sys/netinet/if_atm.h,v 1.5 2002/03/19 21:25:46 alfred Exp $ */
-/* $NetBSD: if_atm.h,v 1.2 1996/07/03 17:17:17 chuck Exp $ */
-
-/*
- *
- * Copyright (c) 1996 Charles D. Cranor and Washington University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Charles D. Cranor and
- * Washington University.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * if_atm.h
- */
-
-struct atm_pseudohdr;
-struct mbuf;
-struct rtentry;
-struct sockaddr;
-
-void atm_rtrequest(int, struct rtentry *, struct rt_addrinfo *);
-int atmresolve(struct rtentry *, struct mbuf *, struct sockaddr *,
- struct atm_pseudohdr *);
diff --git a/newlib/libc/sys/linux/include/netinet/if_ether.h b/newlib/libc/sys/linux/include/netinet/if_ether.h
deleted file mode 100644
index ec65a3e58..000000000
--- a/newlib/libc/sys/linux/include/netinet/if_ether.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)if_ether.h 8.3 (Berkeley) 5/2/95
- * $FreeBSD: src/sys/netinet/if_ether.h,v 1.27 2002/03/24 10:19:10 bde Exp $
- */
-
-#ifndef _NETINET_IF_ETHER_H_
-#define _NETINET_IF_ETHER_H_
-
-#include <net/ethernet.h>
-#include <net/if_arp.h>
-
-/*
- * Macro to map an IP multicast address to an Ethernet multicast address.
- * The high-order 25 bits of the Ethernet address are statically assigned,
- * and the low-order 23 bits are taken from the low end of the IP address.
- */
-#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
- /* struct in_addr *ipaddr; */ \
- /* u_char enaddr[ETHER_ADDR_LEN]; */ \
-{ \
- (enaddr)[0] = 0x01; \
- (enaddr)[1] = 0x00; \
- (enaddr)[2] = 0x5e; \
- (enaddr)[3] = ((u_char *)ipaddr)[1] & 0x7f; \
- (enaddr)[4] = ((u_char *)ipaddr)[2]; \
- (enaddr)[5] = ((u_char *)ipaddr)[3]; \
-}
-/*
- * Macro to map an IP6 multicast address to an Ethernet multicast address.
- * The high-order 16 bits of the Ethernet address are statically assigned,
- * and the low-order 32 bits are taken from the low end of the IP6 address.
- */
-#define ETHER_MAP_IPV6_MULTICAST(ip6addr, enaddr) \
-/* struct in6_addr *ip6addr; */ \
-/* u_char enaddr[ETHER_ADDR_LEN]; */ \
-{ \
- (enaddr)[0] = 0x33; \
- (enaddr)[1] = 0x33; \
- (enaddr)[2] = ((u_char *)ip6addr)[12]; \
- (enaddr)[3] = ((u_char *)ip6addr)[13]; \
- (enaddr)[4] = ((u_char *)ip6addr)[14]; \
- (enaddr)[5] = ((u_char *)ip6addr)[15]; \
-}
-
-/*
- * Ethernet Address Resolution Protocol.
- *
- * See RFC 826 for protocol description. Structure below is adapted
- * to resolving internet addresses. Field names used correspond to
- * RFC 826.
- */
-struct ether_arp {
- struct arphdr ea_hdr; /* fixed-size header */
- u_char arp_sha[ETHER_ADDR_LEN]; /* sender hardware address */
- u_char arp_spa[4]; /* sender protocol address */
- u_char arp_tha[ETHER_ADDR_LEN]; /* target hardware address */
- u_char arp_tpa[4]; /* target protocol address */
-};
-#define arp_hrd ea_hdr.ar_hrd
-#define arp_pro ea_hdr.ar_pro
-#define arp_hln ea_hdr.ar_hln
-#define arp_pln ea_hdr.ar_pln
-#define arp_op ea_hdr.ar_op
-
-struct sockaddr_inarp {
- u_char sin_len;
- u_char sin_family;
- u_short sin_port;
- struct in_addr sin_addr;
- struct in_addr sin_srcaddr;
- u_short sin_tos;
- u_short sin_other;
-#define SIN_PROXY 1
-};
-/*
- * IP and ethernet specific routing flags
- */
-#define RTF_USETRAILERS RTF_PROTO1 /* use trailers */
-#define RTF_ANNOUNCE RTF_PROTO2 /* announce new arp entry */
-
-#ifdef _KERNEL
-extern u_char ether_ipmulticast_min[ETHER_ADDR_LEN];
-extern u_char ether_ipmulticast_max[ETHER_ADDR_LEN];
-extern struct ifqueue arpintrq;
-
-int arpresolve(struct ifnet *, struct rtentry *, struct mbuf *,
- struct sockaddr *, u_char *, struct rtentry *);
-void arp_ifinit(struct ifnet *, struct ifaddr *);
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netinet/igmp.h b/newlib/libc/sys/linux/include/netinet/igmp.h
deleted file mode 100644
index 448265abf..000000000
--- a/newlib/libc/sys/linux/include/netinet/igmp.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 1988 Stephen Deering.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Stephen Deering of Stanford University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)igmp.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/igmp.h,v 1.10 1999/08/28 00:49:15 peter Exp $
- */
-
-#ifndef _NETINET_IGMP_H_
-#define _NETINET_IGMP_H_
-
-/*
- * Internet Group Management Protocol (IGMP) definitions.
- *
- * Written by Steve Deering, Stanford, May 1988.
- *
- * MULTICAST Revision: 3.5.1.2
- */
-
-/*
- * IGMP packet format.
- */
-struct igmp {
- u_char igmp_type; /* version & type of IGMP message */
- u_char igmp_code; /* subtype for routing msgs */
- u_short igmp_cksum; /* IP-style checksum */
- struct in_addr igmp_group; /* group address being reported */
-}; /* (zero for queries) */
-
-#define IGMP_MINLEN 8
-
-/*
- * Message types, including version number.
- */
-#define IGMP_MEMBERSHIP_QUERY 0x11 /* membership query */
-#define IGMP_V1_MEMBERSHIP_REPORT 0x12 /* Ver. 1 membership report */
-#define IGMP_V2_MEMBERSHIP_REPORT 0x16 /* Ver. 2 membership report */
-#define IGMP_V2_LEAVE_GROUP 0x17 /* Leave-group message */
-
-#define IGMP_DVMRP 0x13 /* DVMRP routing message */
-#define IGMP_PIM 0x14 /* PIM routing message */
-
-#define IGMP_MTRACE_RESP 0x1e /* traceroute resp.(to sender)*/
-#define IGMP_MTRACE 0x1f /* mcast traceroute messages */
-
-#define IGMP_MAX_HOST_REPORT_DELAY 10 /* max delay for response to */
- /* query (in seconds) according */
- /* to RFC1112 */
-
-
-#define IGMP_TIMER_SCALE 10 /* denotes that the igmp code field */
- /* specifies time in 10th of seconds*/
-
-/*
- * The following four defininitions are for backwards compatibility.
- * They should be removed as soon as all applications are updated to
- * use the new constant names.
- */
-#define IGMP_HOST_MEMBERSHIP_QUERY IGMP_MEMBERSHIP_QUERY
-#define IGMP_HOST_MEMBERSHIP_REPORT IGMP_V1_MEMBERSHIP_REPORT
-#define IGMP_HOST_NEW_MEMBERSHIP_REPORT IGMP_V2_MEMBERSHIP_REPORT
-#define IGMP_HOST_LEAVE_MESSAGE IGMP_V2_LEAVE_GROUP
-
-#endif /* _NETINET_IGMP_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet/igmp_var.h b/newlib/libc/sys/linux/include/netinet/igmp_var.h
deleted file mode 100644
index 1cb6570f8..000000000
--- a/newlib/libc/sys/linux/include/netinet/igmp_var.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 1988 Stephen Deering.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Stephen Deering of Stanford University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)igmp_var.h 8.1 (Berkeley) 7/19/93
- * $FreeBSD: src/sys/netinet/igmp_var.h,v 1.19 2002/03/19 21:25:46 alfred Exp $
- */
-
-#ifndef _NETINET_IGMP_VAR_H_
-#define _NETINET_IGMP_VAR_H_
-
-/*
- * Internet Group Management Protocol (IGMP),
- * implementation-specific definitions.
- *
- * Written by Steve Deering, Stanford, May 1988.
- *
- * MULTICAST Revision: 3.5.1.3
- */
-
-struct igmpstat {
- u_int igps_rcv_total; /* total IGMP messages received */
- u_int igps_rcv_tooshort; /* received with too few bytes */
- u_int igps_rcv_badsum; /* received with bad checksum */
- u_int igps_rcv_queries; /* received membership queries */
- u_int igps_rcv_badqueries; /* received invalid queries */
- u_int igps_rcv_reports; /* received membership reports */
- u_int igps_rcv_badreports; /* received invalid reports */
- u_int igps_rcv_ourreports; /* received reports for our groups */
- u_int igps_snd_reports; /* sent membership reports */
-};
-
-#ifdef _KERNEL
-#define IGMP_RANDOM_DELAY(X) (random() % (X) + 1)
-
-/*
- * States for IGMPv2's leave processing
- */
-#define IGMP_OTHERMEMBER 0
-#define IGMP_IREPORTEDLAST 1
-
-/*
- * We must remember what version the subnet's querier is.
- * We conveniently use the IGMP message type for the proper
- * membership report to keep this state.
- */
-#define IGMP_V1_ROUTER IGMP_V1_MEMBERSHIP_REPORT
-#define IGMP_V2_ROUTER IGMP_V2_MEMBERSHIP_REPORT
-
-/*
- * Revert to new router if we haven't heard from an old router in
- * this amount of time.
- */
-#define IGMP_AGE_THRESHOLD 540
-
-void igmp_init(void);
-void igmp_input(struct mbuf *, int);
-void igmp_joingroup(struct in_multi *);
-void igmp_leavegroup(struct in_multi *);
-void igmp_fasttimo(void);
-void igmp_slowtimo(void);
-
-SYSCTL_DECL(_net_inet_igmp);
-
-#endif
-
-/*
- * Names for IGMP sysctl objects
- */
-#define IGMPCTL_STATS 1 /* statistics (read-only) */
-#define IGMPCTL_MAXID 2
-
-#define IGMPCTL_NAMES { \
- { 0, 0 }, \
- { "stats", CTLTYPE_STRUCT }, \
-}
-#endif
diff --git a/newlib/libc/sys/linux/include/netinet/in.h b/newlib/libc/sys/linux/include/netinet/in.h
deleted file mode 100644
index 19bc3f1bc..000000000
--- a/newlib/libc/sys/linux/include/netinet/in.h
+++ /dev/null
@@ -1,569 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in.h 8.3 (Berkeley) 1/3/94
- * $FreeBSD: src/sys/netinet/in.h,v 1.68 2002/04/24 01:26:11 mike Exp $
- */
-
-#ifndef _NETINET_IN_H_
-#define _NETINET_IN_H_
-
-#include <sys/cdefs.h>
-#include <sys/config.h>
-#include <sys/_types.h>
-#include <machine/endian.h>
-
-/* Protocols common to RFC 1700, POSIX, and X/Open. */
-#define IPPROTO_IP 0 /* dummy for IP */
-#define IPPROTO_ICMP 1 /* control message protocol */
-#define IPPROTO_TCP 6 /* tcp */
-#define IPPROTO_UDP 17 /* user datagram protocol */
-
-#define INADDR_ANY (u_int32_t)0x00000000
-#define INADDR_BROADCAST (u_int32_t)0xffffffff /* must be masked */
-
-#ifndef _UINT8_T_DECLARED
-typedef __uint8_t uint8_t;
-#define _UINT8_T_DECLARED
-#endif
-
-#ifndef _UINT16_T_DECLARED
-typedef __uint16_t uint16_t;
-#define _UINT16_T_DECLARED
-#endif
-
-#ifndef _UINT32_T_DECLARED
-typedef __uint32_t uint32_t;
-#define _UINT32_T_DECLARED
-#endif
-
-#ifndef _IN_ADDR_T_DECLARED
-typedef uint32_t in_addr_t;
-#define _IN_ADDR_T_DECLARED
-#endif
-
-#ifndef _IN_PORT_T_DECLARED
-typedef uint16_t in_port_t;
-#define _IN_PORT_T_DECLARED
-#endif
-
-typedef unsigned short sa_family_t;
-
-#ifdef _BSD_SA_FAMILY_T_
-typedef _BSD_SA_FAMILY_T_ sa_family_t;
-#undef _BSD_SA_FAMILY_T_
-#endif
-
-/* Internet address (a structure for historical reasons). */
-#ifndef _STRUCT_IN_ADDR_DECLARED
-struct in_addr {
- in_addr_t s_addr;
-};
-#define _STRUCT_IN_ADDR_DECLARED
-#endif
-
-/* Socket address, internet style. */
-struct sockaddr_in {
- sa_family_t sin_family;
- in_port_t sin_port;
- struct in_addr sin_addr;
- char sin_zero[8];
-};
-
-#if __POSIX_VISIBLE >= 200112
-#define IPPROTO_RAW 255 /* raw IP packet */
-#define INET_ADDRSTRLEN 16
-#endif
-
-#define __BSD_VISIBLE 1
-#if __BSD_VISIBLE
-/*
- * Constants and structures defined by the internet system,
- * Per RFC 790, September 1981, and numerous additions.
- */
-
-/*
- * Protocols (RFC 1700)
- */
-#define IPPROTO_HOPOPTS 0 /* IP6 hop-by-hop options */
-#define IPPROTO_IGMP 2 /* group mgmt protocol */
-#define IPPROTO_GGP 3 /* gateway^2 (deprecated) */
-#define IPPROTO_IPV4 4 /* IPv4 encapsulation */
-#define IPPROTO_IPIP IPPROTO_IPV4 /* for compatibility */
-#define IPPROTO_ST 7 /* Stream protocol II */
-#define IPPROTO_EGP 8 /* exterior gateway protocol */
-#define IPPROTO_PIGP 9 /* private interior gateway */
-#define IPPROTO_RCCMON 10 /* BBN RCC Monitoring */
-#define IPPROTO_NVPII 11 /* network voice protocol*/
-#define IPPROTO_PUP 12 /* pup */
-#define IPPROTO_ARGUS 13 /* Argus */
-#define IPPROTO_EMCON 14 /* EMCON */
-#define IPPROTO_XNET 15 /* Cross Net Debugger */
-#define IPPROTO_CHAOS 16 /* Chaos*/
-#define IPPROTO_MUX 18 /* Multiplexing */
-#define IPPROTO_MEAS 19 /* DCN Measurement Subsystems */
-#define IPPROTO_HMP 20 /* Host Monitoring */
-#define IPPROTO_PRM 21 /* Packet Radio Measurement */
-#define IPPROTO_IDP 22 /* xns idp */
-#define IPPROTO_TRUNK1 23 /* Trunk-1 */
-#define IPPROTO_TRUNK2 24 /* Trunk-2 */
-#define IPPROTO_LEAF1 25 /* Leaf-1 */
-#define IPPROTO_LEAF2 26 /* Leaf-2 */
-#define IPPROTO_RDP 27 /* Reliable Data */
-#define IPPROTO_IRTP 28 /* Reliable Transaction */
-#define IPPROTO_TP 29 /* tp-4 w/ class negotiation */
-#define IPPROTO_BLT 30 /* Bulk Data Transfer */
-#define IPPROTO_NSP 31 /* Network Services */
-#define IPPROTO_INP 32 /* Merit Internodal */
-#define IPPROTO_SEP 33 /* Sequential Exchange */
-#define IPPROTO_3PC 34 /* Third Party Connect */
-#define IPPROTO_IDPR 35 /* InterDomain Policy Routing */
-#define IPPROTO_XTP 36 /* XTP */
-#define IPPROTO_DDP 37 /* Datagram Delivery */
-#define IPPROTO_CMTP 38 /* Control Message Transport */
-#define IPPROTO_TPXX 39 /* TP++ Transport */
-#define IPPROTO_IL 40 /* IL transport protocol */
-#define IPPROTO_IPV6 41 /* IP6 header */
-#define IPPROTO_SDRP 42 /* Source Demand Routing */
-#define IPPROTO_ROUTING 43 /* IP6 routing header */
-#define IPPROTO_FRAGMENT 44 /* IP6 fragmentation header */
-#define IPPROTO_IDRP 45 /* InterDomain Routing*/
-#define IPPROTO_RSVP 46 /* resource reservation */
-#define IPPROTO_GRE 47 /* General Routing Encap. */
-#define IPPROTO_MHRP 48 /* Mobile Host Routing */
-#define IPPROTO_BHA 49 /* BHA */
-#define IPPROTO_ESP 50 /* IP6 Encap Sec. Payload */
-#define IPPROTO_AH 51 /* IP6 Auth Header */
-#define IPPROTO_INLSP 52 /* Integ. Net Layer Security */
-#define IPPROTO_SWIPE 53 /* IP with encryption */
-#define IPPROTO_NHRP 54 /* Next Hop Resolution */
-#define IPPROTO_MOBILE 55 /* IP Mobility */
-#define IPPROTO_TLSP 56 /* Transport Layer Security */
-#define IPPROTO_SKIP 57 /* SKIP */
-#define IPPROTO_ICMPV6 58 /* ICMP6 */
-#define IPPROTO_NONE 59 /* IP6 no next header */
-#define IPPROTO_DSTOPTS 60 /* IP6 destination option */
-#define IPPROTO_AHIP 61 /* any host internal protocol */
-#define IPPROTO_CFTP 62 /* CFTP */
-#define IPPROTO_HELLO 63 /* "hello" routing protocol */
-#define IPPROTO_SATEXPAK 64 /* SATNET/Backroom EXPAK */
-#define IPPROTO_KRYPTOLAN 65 /* Kryptolan */
-#define IPPROTO_RVD 66 /* Remote Virtual Disk */
-#define IPPROTO_IPPC 67 /* Pluribus Packet Core */
-#define IPPROTO_ADFS 68 /* Any distributed FS */
-#define IPPROTO_SATMON 69 /* Satnet Monitoring */
-#define IPPROTO_VISA 70 /* VISA Protocol */
-#define IPPROTO_IPCV 71 /* Packet Core Utility */
-#define IPPROTO_CPNX 72 /* Comp. Prot. Net. Executive */
-#define IPPROTO_CPHB 73 /* Comp. Prot. HeartBeat */
-#define IPPROTO_WSN 74 /* Wang Span Network */
-#define IPPROTO_PVP 75 /* Packet Video Protocol */
-#define IPPROTO_BRSATMON 76 /* BackRoom SATNET Monitoring */
-#define IPPROTO_ND 77 /* Sun net disk proto (temp.) */
-#define IPPROTO_WBMON 78 /* WIDEBAND Monitoring */
-#define IPPROTO_WBEXPAK 79 /* WIDEBAND EXPAK */
-#define IPPROTO_EON 80 /* ISO cnlp */
-#define IPPROTO_VMTP 81 /* VMTP */
-#define IPPROTO_SVMTP 82 /* Secure VMTP */
-#define IPPROTO_VINES 83 /* Banyon VINES */
-#define IPPROTO_TTP 84 /* TTP */
-#define IPPROTO_IGP 85 /* NSFNET-IGP */
-#define IPPROTO_DGP 86 /* dissimilar gateway prot. */
-#define IPPROTO_TCF 87 /* TCF */
-#define IPPROTO_IGRP 88 /* Cisco/GXS IGRP */
-#define IPPROTO_OSPFIGP 89 /* OSPFIGP */
-#define IPPROTO_SRPC 90 /* Strite RPC protocol */
-#define IPPROTO_LARP 91 /* Locus Address Resoloution */
-#define IPPROTO_MTP 92 /* Multicast Transport */
-#define IPPROTO_AX25 93 /* AX.25 Frames */
-#define IPPROTO_IPEIP 94 /* IP encapsulated in IP */
-#define IPPROTO_MICP 95 /* Mobile Int.ing control */
-#define IPPROTO_SCCSP 96 /* Semaphore Comm. security */
-#define IPPROTO_ETHERIP 97 /* Ethernet IP encapsulation */
-#define IPPROTO_ENCAP 98 /* encapsulation header */
-#define IPPROTO_APES 99 /* any private encr. scheme */
-#define IPPROTO_GMTP 100 /* GMTP*/
-#define IPPROTO_IPCOMP 108 /* payload compression (IPComp) */
-/* 101-254: Partly Unassigned */
-#define IPPROTO_PIM 103 /* Protocol Independent Mcast */
-#define IPPROTO_PGM 113 /* PGM */
-/* 255: Reserved */
-/* BSD Private, local use, namespace incursion */
-#define IPPROTO_DIVERT 254 /* divert pseudo-protocol */
-#define IPPROTO_MAX 256
-
-/* last return value of *_input(), meaning "all job for this pkt is done". */
-#define IPPROTO_DONE 257
-
-/*
- * Local port number conventions:
- *
- * When a user does a bind(2) or connect(2) with a port number of zero,
- * a non-conflicting local port address is chosen.
- * The default range is IPPORT_HIFIRSTAUTO through
- * IPPORT_HILASTAUTO, although that is settable by sysctl.
- *
- * A user may set the IPPROTO_IP option IP_PORTRANGE to change this
- * default assignment range.
- *
- * The value IP_PORTRANGE_DEFAULT causes the default behavior.
- *
- * The value IP_PORTRANGE_HIGH changes the range of candidate port numbers
- * into the "high" range. These are reserved for client outbound connections
- * which do not want to be filtered by any firewalls. Note that by default
- * this is the same as IP_PORTRANGE_DEFAULT.
- *
- * The value IP_PORTRANGE_LOW changes the range to the "low" are
- * that is (by convention) restricted to privileged processes. This
- * convention is based on "vouchsafe" principles only. It is only secure
- * if you trust the remote host to restrict these ports.
- *
- * The default range of ports and the high range can be changed by
- * sysctl(3). (net.inet.ip.port{hi,low}{first,last}_auto)
- *
- * Changing those values has bad security implications if you are
- * using a a stateless firewall that is allowing packets outside of that
- * range in order to allow transparent outgoing connections.
- *
- * Such a firewall configuration will generally depend on the use of these
- * default values. If you change them, you may find your Security
- * Administrator looking for you with a heavy object.
- *
- * For a slightly more orthodox text view on this:
- *
- * ftp://ftp.isi.edu/in-notes/iana/assignments/port-numbers
- *
- * port numbers are divided into three ranges:
- *
- * 0 - 1023 Well Known Ports
- * 1024 - 49151 Registered Ports
- * 49152 - 65535 Dynamic and/or Private Ports
- *
- */
-
-/*
- * Ports < IPPORT_RESERVED are reserved for
- * privileged processes (e.g. root). (IP_PORTRANGE_LOW)
- */
-#define IPPORT_RESERVED 1024
-
-/*
- * Default local port range, used by both IP_PORTRANGE_DEFAULT
- * and IP_PORTRANGE_HIGH.
- */
-#define IPPORT_HIFIRSTAUTO 49152
-#define IPPORT_HILASTAUTO 65535
-
-/*
- * Scanning for a free reserved port return a value below IPPORT_RESERVED,
- * but higher than IPPORT_RESERVEDSTART. Traditionally the start value was
- * 512, but that conflicts with some well-known-services that firewalls may
- * have a fit if we use.
- */
-#define IPPORT_RESERVEDSTART 600
-
-#define IPPORT_MAX 65535
-
-#ifndef _UINT8_T_DECLARED
-typedef __uint8_t uint8_t;
-#define _UINT8_T_DECLARED
-#endif
-
-#ifndef _UINT16_T_DECLARED
-typedef __uint16_t uint16_t;
-#define _UINT16_T_DECLARED
-#endif
-
-#ifndef _UINT32_T_DECLARED
-typedef __uint32_t uint32_t;
-#define _UINT32_T_DECLARED
-#endif
-
-#ifndef _IN_ADDR_T_DECLARED
-typedef uint32_t in_addr_t;
-#define _IN_ADDR_T_DECLARED
-#endif
-
-#ifndef _IN_PORT_T_DECLARED
-typedef uint16_t in_port_t;
-#define _IN_PORT_T_DECLARED
-#endif
-
-#ifdef _BSD_SA_FAMILY_T_
-typedef _BSD_SA_FAMILY_T_ sa_family_t;
-#undef _BSD_SA_FAMILY_T_
-#endif
-
-/*
- * Internet address (a structure for historical reasons)
- */
-#ifndef _STRUCT_IN_ADDR_DECLARED
-struct in_addr {
- in_addr_t s_addr;
-};
-#define _STRUCT_IN_ADDR_DECLARED
-#endif
-
-/*
- * Definitions of bits in internet address integers.
- * On subnets, the decomposition of addresses to host and net parts
- * is done according to subnet mask, not the masks here.
- */
-#define IN_CLASSA(i) (((u_int32_t)(i) & 0x80000000) == 0)
-#define IN_CLASSA_NET 0xff000000
-#define IN_CLASSA_NSHIFT 24
-#define IN_CLASSA_HOST 0x00ffffff
-#define IN_CLASSA_MAX 128
-
-#define IN_CLASSB(i) (((u_int32_t)(i) & 0xc0000000) == 0x80000000)
-#define IN_CLASSB_NET 0xffff0000
-#define IN_CLASSB_NSHIFT 16
-#define IN_CLASSB_HOST 0x0000ffff
-#define IN_CLASSB_MAX 65536
-
-#define IN_CLASSC(i) (((u_int32_t)(i) & 0xe0000000) == 0xc0000000)
-#define IN_CLASSC_NET 0xffffff00
-#define IN_CLASSC_NSHIFT 8
-#define IN_CLASSC_HOST 0x000000ff
-
-#define IN_CLASSD(i) (((u_int32_t)(i) & 0xf0000000) == 0xe0000000)
-#define IN_CLASSD_NET 0xf0000000 /* These ones aren't really */
-#define IN_CLASSD_NSHIFT 28 /* net and host fields, but */
-#define IN_CLASSD_HOST 0x0fffffff /* routing needn't know. */
-#define IN_MULTICAST(i) IN_CLASSD(i)
-
-#define IN_EXPERIMENTAL(i) (((u_int32_t)(i) & 0xf0000000) == 0xf0000000)
-#define IN_BADCLASS(i) (((u_int32_t)(i) & 0xf0000000) == 0xf0000000)
-
-#define INADDR_LOOPBACK (u_int32_t)0x7f000001
-#ifndef _KERNEL
-#define INADDR_NONE 0xffffffff /* -1 return */
-#endif
-
-#define INADDR_UNSPEC_GROUP (u_int32_t)0xe0000000 /* 224.0.0.0 */
-#define INADDR_ALLHOSTS_GROUP (u_int32_t)0xe0000001 /* 224.0.0.1 */
-#define INADDR_ALLRTRS_GROUP (u_int32_t)0xe0000002 /* 224.0.0.2 */
-#define INADDR_MAX_LOCAL_GROUP (u_int32_t)0xe00000ff /* 224.0.0.255 */
-
-#define IN_LOOPBACKNET 127 /* official! */
-
-/*
- * Options for use with [gs]etsockopt at the IP level.
- * First word of comment is data type; bool is stored in int.
- */
-#define IP_OPTIONS 1 /* buf/ip_opts; set/get IP options */
-#define IP_HDRINCL 2 /* int; header is included with data */
-#define IP_TOS 3 /* int; IP type of service and preced. */
-#define IP_TTL 4 /* int; IP time to live */
-#define IP_RECVOPTS 5 /* bool; receive all IP opts w/dgram */
-#define IP_RECVRETOPTS 6 /* bool; receive IP opts for response */
-#define IP_RECVDSTADDR 7 /* bool; receive IP dst addr w/dgram */
-#define IP_RETOPTS 8 /* ip_opts; set/get IP options */
-#define IP_MULTICAST_IF 9 /* u_char; set/get IP multicast i/f */
-#define IP_MULTICAST_TTL 10 /* u_char; set/get IP multicast ttl */
-#define IP_MULTICAST_LOOP 11 /* u_char; set/get IP multicast loopback */
-#define IP_ADD_MEMBERSHIP 12 /* ip_mreq; add an IP group membership */
-#define IP_DROP_MEMBERSHIP 13 /* ip_mreq; drop an IP group membership */
-#define IP_MULTICAST_VIF 14 /* set/get IP mcast virt. iface */
-#define IP_RSVP_ON 15 /* enable RSVP in kernel */
-#define IP_RSVP_OFF 16 /* disable RSVP in kernel */
-#define IP_RSVP_VIF_ON 17 /* set RSVP per-vif socket */
-#define IP_RSVP_VIF_OFF 18 /* unset RSVP per-vif socket */
-#define IP_PORTRANGE 19 /* int; range to choose for unspec port */
-#define IP_RECVIF 20 /* bool; receive reception if w/dgram */
-/* for IPSEC */
-#define IP_IPSEC_POLICY 21 /* int; set/get security policy */
-#define IP_FAITH 22 /* bool; accept FAITH'ed connections */
-
-#define IP_FW_ADD 50 /* add a firewall rule to chain */
-#define IP_FW_DEL 51 /* delete a firewall rule from chain */
-#define IP_FW_FLUSH 52 /* flush firewall rule chain */
-#define IP_FW_ZERO 53 /* clear single/all firewall counter(s) */
-#define IP_FW_GET 54 /* get entire firewall rule chain */
-#define IP_FW_RESETLOG 55 /* reset logging counters */
-
-#define IP_DUMMYNET_CONFIGURE 60 /* add/configure a dummynet pipe */
-#define IP_DUMMYNET_DEL 61 /* delete a dummynet pipe from chain */
-#define IP_DUMMYNET_FLUSH 62 /* flush dummynet */
-#define IP_DUMMYNET_GET 64 /* get entire dummynet pipes */
-
-/*
- * Defaults and limits for options
- */
-#define IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */
-#define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */
-#define IP_MAX_MEMBERSHIPS 20 /* per socket */
-
-/*
- * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
- */
-struct ip_mreq {
- struct in_addr imr_multiaddr; /* IP multicast address of group */
- struct in_addr imr_interface; /* local IP address of interface */
-};
-
-/*
- * Argument for IP_PORTRANGE:
- * - which range to search when port is unspecified at bind() or connect()
- */
-#define IP_PORTRANGE_DEFAULT 0 /* default range */
-#define IP_PORTRANGE_HIGH 1 /* "high" - request firewall bypass */
-#define IP_PORTRANGE_LOW 2 /* "low" - vouchsafe security */
-
-/*
- * Definitions for inet sysctl operations.
- *
- * Third level is protocol number.
- * Fourth level is desired variable within that protocol.
- */
-#define IPPROTO_MAXID (IPPROTO_AH + 1) /* don't list to IPPROTO_MAX */
-
-#define CTL_IPPROTO_NAMES { \
- { "ip", CTLTYPE_NODE }, \
- { "icmp", CTLTYPE_NODE }, \
- { "igmp", CTLTYPE_NODE }, \
- { "ggp", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "tcp", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { "egp", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "pup", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "udp", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "idp", CTLTYPE_NODE }, \
- { 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 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "ipsec", CTLTYPE_NODE }, \
-}
-
-/*
- * Names for IP sysctl objects
- */
-#define IPCTL_FORWARDING 1 /* act as router */
-#define IPCTL_SENDREDIRECTS 2 /* may send redirects when forwarding */
-#define IPCTL_DEFTTL 3 /* default TTL */
-#ifdef notyet
-#define IPCTL_DEFMTU 4 /* default MTU */
-#endif
-#define IPCTL_RTEXPIRE 5 /* cloned route expiration time */
-#define IPCTL_RTMINEXPIRE 6 /* min value for expiration time */
-#define IPCTL_RTMAXCACHE 7 /* trigger level for dynamic expire */
-#define IPCTL_SOURCEROUTE 8 /* may perform source routes */
-#define IPCTL_DIRECTEDBROADCAST 9 /* may re-broadcast received packets */
-#define IPCTL_INTRQMAXLEN 10 /* max length of netisr queue */
-#define IPCTL_INTRQDROPS 11 /* number of netisr q drops */
-#define IPCTL_STATS 12 /* ipstat structure */
-#define IPCTL_ACCEPTSOURCEROUTE 13 /* may accept source routed packets */
-#define IPCTL_FASTFORWARDING 14 /* use fast IP forwarding code */
-#define IPCTL_KEEPFAITH 15 /* FAITH IPv4->IPv6 translater ctl */
-#define IPCTL_GIF_TTL 16 /* default TTL for gif encap packet */
-#define IPCTL_MAXID 17
-
-#define IPCTL_NAMES { \
- { 0, 0 }, \
- { "forwarding", CTLTYPE_INT }, \
- { "redirect", CTLTYPE_INT }, \
- { "ttl", CTLTYPE_INT }, \
- { "mtu", CTLTYPE_INT }, \
- { "rtexpire", CTLTYPE_INT }, \
- { "rtminexpire", CTLTYPE_INT }, \
- { "rtmaxcache", CTLTYPE_INT }, \
- { "sourceroute", CTLTYPE_INT }, \
- { "directed-broadcast", CTLTYPE_INT }, \
- { "intr-queue-maxlen", CTLTYPE_INT }, \
- { "intr-queue-drops", CTLTYPE_INT }, \
- { "stats", CTLTYPE_STRUCT }, \
- { "accept_sourceroute", CTLTYPE_INT }, \
- { "fastforwarding", CTLTYPE_INT }, \
-}
-
-#endif /* __BSD_VISIBLE */
-
-#ifdef _KERNEL
-
-struct ifnet; struct mbuf; /* forward declarations for Standard C */
-
-int in_broadcast(struct in_addr, struct ifnet *);
-int in_canforward(struct in_addr);
-int in_localaddr(struct in_addr);
-char *inet_ntoa(struct in_addr); /* in libkern */
-char *inet_ntoa_r(struct in_addr ina, char *buf); /* in libkern */
-
-#define satosin(sa) ((struct sockaddr_in *)(sa))
-#define sintosa(sin) ((struct sockaddr *)(sin))
-#define ifatoia(ifa) ((struct in_ifaddr *)(ifa))
-
-#endif /* _KERNEL */
-
-/* INET6 stuff */
-#define __KAME_NETINET_IN_H_INCLUDED_
-#include <netinet6/in6.h>
-#undef __KAME_NETINET_IN_H_INCLUDED_
-
-#endif /* !_NETINET_IN_H_*/
diff --git a/newlib/libc/sys/linux/include/netinet/in_gif.h b/newlib/libc/sys/linux/include/netinet/in_gif.h
deleted file mode 100644
index cf5392009..000000000
--- a/newlib/libc/sys/linux/include/netinet/in_gif.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* $FreeBSD: src/sys/netinet/in_gif.h,v 1.8 2002/03/19 21:25:46 alfred Exp $ */
-/* $KAME: in_gif.h,v 1.5 2000/04/14 08:36:02 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-#ifndef _NETINET_IN_GIF_H_
-#define _NETINET_IN_GIF_H_
-
-#define GIF_TTL 30
-
-void in_gif_input(struct mbuf *, int off);
-int in_gif_output(struct ifnet *, int, struct mbuf *, struct rtentry *);
-int gif_encapcheck4(const struct mbuf *, int, int, void *);
-
-#endif /*_NETINET_IN_GIF_H_*/
diff --git a/newlib/libc/sys/linux/include/netinet/in_pcb.h b/newlib/libc/sys/linux/include/netinet/in_pcb.h
deleted file mode 100644
index 50ddd273c..000000000
--- a/newlib/libc/sys/linux/include/netinet/in_pcb.h
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_pcb.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/in_pcb.h,v 1.48 2002/04/09 20:04:10 jhb Exp $
- */
-
-#ifndef _NETINET_IN_PCB_H_
-#define _NETINET_IN_PCB_H_
-
-#include <sys/queue.h>
-
-#include <net/route.h>
-#include <netinet6/ipsec.h> /* for IPSEC */
-#include <vm/uma.h>
-
-#define in6pcb inpcb /* for KAME src sync over BSD*'s */
-#define in6p_sp inp_sp /* for KAME src sync over BSD*'s */
-
-/*
- * Common structure pcb for internet protocol implementation.
- * Here are stored pointers to local and foreign host table
- * entries, local and foreign socket numbers, and pointers
- * up (to a socket structure) and down (to a protocol-specific)
- * control block.
- */
-LIST_HEAD(inpcbhead, inpcb);
-LIST_HEAD(inpcbporthead, inpcbport);
-typedef u_quad_t inp_gen_t;
-
-/*
- * PCB with AF_INET6 null bind'ed laddr can receive AF_INET input packet.
- * So, AF_INET6 null laddr is also used as AF_INET null laddr,
- * by utilize following structure. (At last, same as INRIA)
- */
-struct in_addr_4in6 {
- u_int32_t ia46_pad32[3];
- struct in_addr ia46_addr4;
-};
-
-/*
- * NOTE: ipv6 addrs should be 64-bit aligned, per RFC 2553.
- * in_conninfo has some extra padding to accomplish this.
- */
-struct in_endpoints {
- u_int16_t ie_fport; /* foreign port */
- u_int16_t ie_lport; /* local port */
- /* protocol dependent part, local and foreign addr */
- union {
- /* foreign host table entry */
- struct in_addr_4in6 ie46_foreign;
- struct in6_addr ie6_foreign;
- } ie_dependfaddr;
- union {
- /* local host table entry */
- struct in_addr_4in6 ie46_local;
- struct in6_addr ie6_local;
- } ie_dependladdr;
-#define ie_faddr ie_dependfaddr.ie46_foreign.ia46_addr4
-#define ie_laddr ie_dependladdr.ie46_local.ia46_addr4
-#define ie6_faddr ie_dependfaddr.ie6_foreign
-#define ie6_laddr ie_dependladdr.ie6_local
-};
-
-/*
- * XXX
- * At some point struct route should possibly change to:
- * struct rtentry *rt
- * struct in_endpoints *ie;
- */
-struct in_conninfo {
- u_int8_t inc_flags;
- u_int8_t inc_len;
- u_int16_t inc_pad; /* XXX alignment for in_endpoints */
- /* protocol dependent part; cached route */
- struct in_endpoints inc_ie;
- union {
- /* placeholder for routing entry */
- struct route inc4_route;
- struct route_in6 inc6_route;
- } inc_dependroute;
-};
-#define inc_isipv6 inc_flags /* temp compatability */
-#define inc_fport inc_ie.ie_fport
-#define inc_lport inc_ie.ie_lport
-#define inc_faddr inc_ie.ie_faddr
-#define inc_laddr inc_ie.ie_laddr
-#define inc_route inc_dependroute.inc4_route
-#define inc6_faddr inc_ie.ie6_faddr
-#define inc6_laddr inc_ie.ie6_laddr
-#define inc6_route inc_dependroute.inc6_route
-
-struct icmp6_filter;
-
-struct inpcb {
- LIST_ENTRY(inpcb) inp_hash; /* hash list */
- LIST_ENTRY(inpcb) inp_list; /* list for all PCBs of this proto */
- u_int32_t inp_flow;
-
- /* local and foreign ports, local and foreign addr */
- struct in_conninfo inp_inc;
-
- caddr_t inp_ppcb; /* pointer to per-protocol pcb */
- struct inpcbinfo *inp_pcbinfo; /* PCB list info */
- struct socket *inp_socket; /* back pointer to socket */
- /* list for this PCB's local port */
- int inp_flags; /* generic IP/datagram flags */
-
- struct inpcbpolicy *inp_sp; /* for IPSEC */
- u_char inp_vflag; /* IP version flag (v4/v6) */
-#define INP_IPV4 0x1
-#define INP_IPV6 0x2
- u_char inp_ip_ttl; /* time to live proto */
- u_char inp_ip_p; /* protocol proto */
-
- /* protocol dependent part; options */
- struct {
- u_char inp4_ip_tos; /* type of service proto */
- struct mbuf *inp4_options; /* IP options */
- struct ip_moptions *inp4_moptions; /* IP multicast options */
- } inp_depend4;
-#define inp_fport inp_inc.inc_fport
-#define inp_lport inp_inc.inc_lport
-#define inp_faddr inp_inc.inc_faddr
-#define inp_laddr inp_inc.inc_laddr
-#define inp_route inp_inc.inc_route
-#define inp_ip_tos inp_depend4.inp4_ip_tos
-#define inp_options inp_depend4.inp4_options
-#define inp_moptions inp_depend4.inp4_moptions
- struct {
- /* IP options */
- struct mbuf *inp6_options;
- /* IP6 options for outgoing packets */
- struct ip6_pktopts *inp6_outputopts;
- /* IP multicast options */
- struct ip6_moptions *inp6_moptions;
- /* ICMPv6 code type filter */
- struct icmp6_filter *inp6_icmp6filt;
- /* IPV6_CHECKSUM setsockopt */
- int inp6_cksum;
- u_short inp6_ifindex;
- short inp6_hops;
- u_int8_t inp6_hlim;
- } inp_depend6;
- LIST_ENTRY(inpcb) inp_portlist;
- struct inpcbport *inp_phd; /* head of this list */
- inp_gen_t inp_gencnt; /* generation count of this instance */
-#define in6p_faddr inp_inc.inc6_faddr
-#define in6p_laddr inp_inc.inc6_laddr
-#define in6p_route inp_inc.inc6_route
-#define in6p_ip6_hlim inp_depend6.inp6_hlim
-#define in6p_hops inp_depend6.inp6_hops /* default hop limit */
-#define in6p_ip6_nxt inp_ip_p
-#define in6p_flowinfo inp_flow
-#define in6p_vflag inp_vflag
-#define in6p_options inp_depend6.inp6_options
-#define in6p_outputopts inp_depend6.inp6_outputopts
-#define in6p_moptions inp_depend6.inp6_moptions
-#define in6p_icmp6filt inp_depend6.inp6_icmp6filt
-#define in6p_cksum inp_depend6.inp6_cksum
-#define inp6_ifindex inp_depend6.inp6_ifindex
-#define in6p_flags inp_flags /* for KAME src sync over BSD*'s */
-#define in6p_socket inp_socket /* for KAME src sync over BSD*'s */
-#define in6p_lport inp_lport /* for KAME src sync over BSD*'s */
-#define in6p_fport inp_fport /* for KAME src sync over BSD*'s */
-#define in6p_ppcb inp_ppcb /* for KAME src sync over BSD*'s */
-};
-/*
- * The range of the generation count, as used in this implementation,
- * is 9e19. We would have to create 300 billion connections per
- * second for this number to roll over in a year. This seems sufficiently
- * unlikely that we simply don't concern ourselves with that possibility.
- */
-
-/*
- * Interface exported to userland by various protocols which use
- * inpcbs. Hack alert -- only define if struct xsocket is in scope.
- */
-#ifdef _SYS_SOCKETVAR_H_
-struct xinpcb {
- size_t xi_len; /* length of this structure */
- struct inpcb xi_inp;
- struct xsocket xi_socket;
- u_quad_t xi_alignment_hack;
-};
-
-struct xinpgen {
- size_t xig_len; /* length of this structure */
- u_int xig_count; /* number of PCBs at this time */
- inp_gen_t xig_gen; /* generation count at this time */
- so_gen_t xig_sogen; /* socket generation count at this time */
-};
-#endif /* _SYS_SOCKETVAR_H_ */
-
-struct inpcbport {
- LIST_ENTRY(inpcbport) phd_hash;
- struct inpcbhead phd_pcblist;
- u_short phd_port;
-};
-
-struct inpcbinfo { /* XXX documentation, prefixes */
- struct inpcbhead *hashbase;
- u_long hashmask;
- struct inpcbporthead *porthashbase;
- u_long porthashmask;
- struct inpcbhead *listhead;
- u_short lastport;
- u_short lastlow;
- u_short lasthi;
- uma_zone_t ipi_zone; /* zone to allocate pcbs from */
- u_int ipi_count; /* number of pcbs in this list */
- u_quad_t ipi_gencnt; /* current generation count */
-};
-
-#define INP_PCBHASH(faddr, lport, fport, mask) \
- (((faddr) ^ ((faddr) >> 16) ^ ntohs((lport) ^ (fport))) & (mask))
-#define INP_PCBPORTHASH(lport, mask) \
- (ntohs((lport)) & (mask))
-
-/* flags in inp_flags: */
-#define INP_RECVOPTS 0x01 /* receive incoming IP options */
-#define INP_RECVRETOPTS 0x02 /* receive IP options for reply */
-#define INP_RECVDSTADDR 0x04 /* receive IP dst address */
-#define INP_HDRINCL 0x08 /* user supplies entire IP header */
-#define INP_HIGHPORT 0x10 /* user wants "high" port binding */
-#define INP_LOWPORT 0x20 /* user wants "low" port binding */
-#define INP_ANONPORT 0x40 /* port chosen for user */
-#define INP_RECVIF 0x80 /* receive incoming interface */
-#define INP_MTUDISC 0x100 /* user can do MTU discovery */
-#define INP_FAITH 0x200 /* accept FAITH'ed connections */
-
-#define IN6P_IPV6_V6ONLY 0x008000 /* restrict AF_INET6 socket for v6 */
-
-#define IN6P_PKTINFO 0x010000 /* receive IP6 dst and I/F */
-#define IN6P_HOPLIMIT 0x020000 /* receive hoplimit */
-#define IN6P_HOPOPTS 0x040000 /* receive hop-by-hop options */
-#define IN6P_DSTOPTS 0x080000 /* receive dst options after rthdr */
-#define IN6P_RTHDR 0x100000 /* receive routing header */
-#define IN6P_RTHDRDSTOPTS 0x200000 /* receive dstoptions before rthdr */
-#define IN6P_AUTOFLOWLABEL 0x800000 /* attach flowlabel automatically */
-#define IN6P_BINDV6ONLY 0x10000000 /* do not grab IPv4 traffic */
-
-#define INP_CONTROLOPTS (INP_RECVOPTS|INP_RECVRETOPTS|INP_RECVDSTADDR|\
- INP_RECVIF|\
- IN6P_PKTINFO|IN6P_HOPLIMIT|IN6P_HOPOPTS|\
- IN6P_DSTOPTS|IN6P_RTHDR|IN6P_RTHDRDSTOPTS|\
- IN6P_AUTOFLOWLABEL)
-#define INP_UNMAPPABLEOPTS (IN6P_HOPOPTS|IN6P_DSTOPTS|IN6P_RTHDR|\
- IN6P_AUTOFLOWLABEL)
-
- /* for KAME src sync over BSD*'s */
-#define IN6P_HIGHPORT INP_HIGHPORT
-#define IN6P_LOWPORT INP_LOWPORT
-#define IN6P_ANONPORT INP_ANONPORT
-#define IN6P_RECVIF INP_RECVIF
-#define IN6P_MTUDISC INP_MTUDISC
-#define IN6P_FAITH INP_FAITH
-#define IN6P_CONTROLOPTS INP_CONTROLOPTS
- /*
- * socket AF version is {newer than,or include}
- * actual datagram AF version
- */
-
-#define INPLOOKUP_WILDCARD 1
-#define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb)
-#define sotoin6pcb(so) sotoinpcb(so) /* for KAME src sync over BSD*'s */
-
-#define INP_SOCKAF(so) so->so_proto->pr_domain->dom_family
-
-#define INP_CHECK_SOCKAF(so, af) (INP_SOCKAF(so) == af)
-
-#ifdef _KERNEL
-extern int ipport_lowfirstauto;
-extern int ipport_lowlastauto;
-extern int ipport_firstauto;
-extern int ipport_lastauto;
-extern int ipport_hifirstauto;
-extern int ipport_hilastauto;
-
-void in_pcbpurgeif0(struct inpcb *, struct ifnet *);
-void in_losing(struct inpcb *);
-void in_rtchange(struct inpcb *, int);
-int in_pcballoc(struct socket *, struct inpcbinfo *, struct thread *);
-int in_pcbbind(struct inpcb *, struct sockaddr *, struct thread *);
-int in_pcbconnect(struct inpcb *, struct sockaddr *, struct thread *);
-void in_pcbdetach(struct inpcb *);
-void in_pcbdisconnect(struct inpcb *);
-int in_pcbinshash(struct inpcb *);
-int in_pcbladdr(struct inpcb *, struct sockaddr *,
- struct sockaddr_in **);
-struct inpcb *
- in_pcblookup_local(struct inpcbinfo *,
- struct in_addr, u_int, int);
-struct inpcb *
- in_pcblookup_hash(struct inpcbinfo *, struct in_addr, u_int,
- struct in_addr, u_int, int, struct ifnet *);
-void in_pcbnotifyall(struct inpcbhead *, struct in_addr,
- int, void (*)(struct inpcb *, int));
-void in_pcbrehash(struct inpcb *);
-int in_setpeeraddr(struct socket *so, struct sockaddr **nam);
-int in_setsockaddr(struct socket *so, struct sockaddr **nam);
-void in_pcbremlists(struct inpcb *inp);
-int prison_xinpcb(struct thread *td, struct inpcb *inp);
-#endif /* _KERNEL */
-
-#endif /* !_NETINET_IN_PCB_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet/in_systm.h b/newlib/libc/sys/linux/include/netinet/in_systm.h
deleted file mode 100644
index 62cea64f1..000000000
--- a/newlib/libc/sys/linux/include/netinet/in_systm.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_systm.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/in_systm.h,v 1.10 2002/03/19 21:25:46 alfred Exp $
- */
-
-#ifndef _NETINET_IN_SYSTM_H_
-#define _NETINET_IN_SYSTM_H_
-
-/*
- * Miscellaneous internetwork
- * definitions for kernel.
- */
-
-/*
- * Network types.
- *
- * Internally the system keeps counters in the headers with the bytes
- * swapped so that VAX instructions will work on them. It reverses
- * the bytes before transmission at each protocol level. The n_ types
- * represent the types with the bytes in ``high-ender'' order.
- */
-typedef u_int16_t n_short; /* short as received from the net */
-typedef u_int32_t n_long; /* long as received from the net */
-
-typedef u_int32_t n_time; /* ms since 00:00 GMT, byte rev */
-
-#ifdef _KERNEL
-n_time iptime(void);
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netinet/in_var.h b/newlib/libc/sys/linux/include/netinet/in_var.h
deleted file mode 100644
index ce97b5a11..000000000
--- a/newlib/libc/sys/linux/include/netinet/in_var.h
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright (c) 1985, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_var.h 8.2 (Berkeley) 1/9/95
- * $FreeBSD: src/sys/netinet/in_var.h,v 1.45 2002/03/24 10:19:10 bde Exp $
- */
-
-#ifndef _NETINET_IN_VAR_H_
-#define _NETINET_IN_VAR_H_
-
-#include <sys/queue.h>
-#include <sys/fnv_hash.h>
-
-/*
- * Interface address, Internet version. One of these structures
- * is allocated for each Internet address on an interface.
- * The ifaddr structure contains the protocol-independent part
- * of the structure and is assumed to be first.
- */
-struct in_ifaddr {
- struct ifaddr ia_ifa; /* protocol-independent info */
-#define ia_ifp ia_ifa.ifa_ifp
-#define ia_flags ia_ifa.ifa_flags
- /* ia_{,sub}net{,mask} in host order */
- u_long ia_net; /* network number of interface */
- u_long ia_netmask; /* mask of net part */
- u_long ia_subnet; /* subnet number, including net */
- u_long ia_subnetmask; /* mask of subnet part */
- struct in_addr ia_netbroadcast; /* to recognize net broadcasts */
- LIST_ENTRY(in_ifaddr) ia_hash; /* entry in bucket of inet addresses */
- TAILQ_ENTRY(in_ifaddr) ia_link; /* list of internet addresses */
- struct sockaddr_in ia_addr; /* reserve space for interface name */
- struct sockaddr_in ia_dstaddr; /* reserve space for broadcast addr */
-#define ia_broadaddr ia_dstaddr
- struct sockaddr_in ia_sockmask; /* reserve space for general netmask */
-};
-
-struct in_aliasreq {
- char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- struct sockaddr_in ifra_addr;
- struct sockaddr_in ifra_broadaddr;
-#define ifra_dstaddr ifra_broadaddr
- struct sockaddr_in ifra_mask;
-};
-/*
- * Given a pointer to an in_ifaddr (ifaddr),
- * return a pointer to the addr as a sockaddr_in.
- */
-#define IA_SIN(ia) (&(((struct in_ifaddr *)(ia))->ia_addr))
-#define IA_DSTSIN(ia) (&(((struct in_ifaddr *)(ia))->ia_dstaddr))
-
-#define IN_LNAOF(in, ifa) \
- ((ntohl((in).s_addr) & ~((struct in_ifaddr *)(ifa)->ia_subnetmask))
-
-
-#ifdef _KERNEL
-extern struct ifqueue ipintrq; /* ip packet input queue */
-extern struct in_addr zeroin_addr;
-extern u_char inetctlerrmap[];
-
-/*
- * Hash table for IP addresses.
- */
-extern LIST_HEAD(in_ifaddrhashhead, in_ifaddr) *in_ifaddrhashtbl;
-extern TAILQ_HEAD(in_ifaddrhead, in_ifaddr) in_ifaddrhead;
-extern u_long in_ifaddrhmask; /* mask for hash table */
-
-#define INADDR_NHASH_LOG2 9
-#define INADDR_NHASH (1 << INADDR_NHASH_LOG2)
-#define INADDR_HASHVAL(x) fnv_32_buf((&(x)), sizeof(x), FNV1_32_INIT)
-#define INADDR_HASH(x) \
- (&in_ifaddrhashtbl[INADDR_HASHVAL(x) & in_ifaddrhmask])
-
-
-/*
- * Macro for finding the interface (ifnet structure) corresponding to one
- * of our IP addresses.
- */
-#define INADDR_TO_IFP(addr, ifp) \
- /* struct in_addr addr; */ \
- /* struct ifnet *ifp; */ \
-{ \
- struct in_ifaddr *ia; \
-\
- LIST_FOREACH(ia, INADDR_HASH((addr).s_addr), ia_hash) \
- if (IA_SIN(ia)->sin_addr.s_addr == (addr).s_addr) \
- break; \
- (ifp) = (ia == NULL) ? NULL : ia->ia_ifp; \
-}
-
-/*
- * Macro for finding the internet address structure (in_ifaddr) corresponding
- * to a given interface (ifnet structure).
- */
-#define IFP_TO_IA(ifp, ia) \
- /* struct ifnet *ifp; */ \
- /* struct in_ifaddr *ia; */ \
-{ \
- for ((ia) = TAILQ_FIRST(&in_ifaddrhead); \
- (ia) != NULL && (ia)->ia_ifp != (ifp); \
- (ia) = TAILQ_NEXT((ia), ia_link)) \
- continue; \
-}
-#endif
-
-/*
- * This information should be part of the ifnet structure but we don't wish
- * to change that - as it might break a number of things
- */
-
-struct router_info {
- struct ifnet *rti_ifp;
- int rti_type; /* type of router which is querier on this interface */
- int rti_time; /* # of slow timeouts since last old query */
- struct router_info *rti_next;
-};
-
-/*
- * Internet multicast address structure. There is one of these for each IP
- * multicast group to which this host belongs on a given network interface.
- * For every entry on the interface's if_multiaddrs list which represents
- * an IP multicast group, there is one of these structures. They are also
- * kept on a system-wide list to make it easier to keep our legacy IGMP code
- * compatible with the rest of the world (see IN_FIRST_MULTI et al, below).
- */
-struct in_multi {
- LIST_ENTRY(in_multi) inm_link; /* queue macro glue */
- struct in_addr inm_addr; /* IP multicast address, convenience */
- struct ifnet *inm_ifp; /* back pointer to ifnet */
- struct ifmultiaddr *inm_ifma; /* back pointer to ifmultiaddr */
- u_int inm_timer; /* IGMP membership report timer */
- u_int inm_state; /* state of the membership */
- struct router_info *inm_rti; /* router info*/
-};
-
-#ifdef _KERNEL
-
-#ifdef SYSCTL_DECL
-SYSCTL_DECL(_net_inet_ip);
-SYSCTL_DECL(_net_inet_raw);
-#endif
-
-extern LIST_HEAD(in_multihead, in_multi) in_multihead;
-
-/*
- * Structure used by macros below to remember position when stepping through
- * all of the in_multi records.
- */
-struct in_multistep {
- struct in_multi *i_inm;
-};
-
-/*
- * Macro for looking up the in_multi record for a given IP multicast address
- * on a given interface. If no matching record is found, "inm" is set null.
- */
-#define IN_LOOKUP_MULTI(addr, ifp, inm) \
- /* struct in_addr addr; */ \
- /* struct ifnet *ifp; */ \
- /* struct in_multi *inm; */ \
-do { \
- struct ifmultiaddr *ifma; \
-\
- TAILQ_FOREACH(ifma, &((ifp)->if_multiaddrs), ifma_link) { \
- if (ifma->ifma_addr->sa_family == AF_INET \
- && ((struct sockaddr_in *)ifma->ifma_addr)->sin_addr.s_addr == \
- (addr).s_addr) \
- break; \
- } \
- (inm) = ifma ? ifma->ifma_protospec : 0; \
-} while(0)
-
-/*
- * Macro to step through all of the in_multi records, one at a time.
- * The current position is remembered in "step", which the caller must
- * provide. IN_FIRST_MULTI(), below, must be called to initialize "step"
- * and get the first record. Both macros return a NULL "inm" when there
- * are no remaining records.
- */
-#define IN_NEXT_MULTI(step, inm) \
- /* struct in_multistep step; */ \
- /* struct in_multi *inm; */ \
-do { \
- if (((inm) = (step).i_inm) != NULL) \
- (step).i_inm = LIST_NEXT((step).i_inm, inm_link); \
-} while(0)
-
-#define IN_FIRST_MULTI(step, inm) \
- /* struct in_multistep step; */ \
- /* struct in_multi *inm; */ \
-do { \
- (step).i_inm = LIST_FIRST(&in_multihead); \
- IN_NEXT_MULTI((step), (inm)); \
-} while(0)
-
-struct route;
-struct in_multi *in_addmulti(struct in_addr *, struct ifnet *);
-void in_delmulti(struct in_multi *);
-int in_control(struct socket *, u_long, caddr_t, struct ifnet *,
- struct thread *);
-void in_rtqdrain(void);
-void ip_input(struct mbuf *);
-int in_ifadown(struct ifaddr *ifa, int);
-void in_ifscrub(struct ifnet *, struct in_ifaddr *);
-int ipflow_fastforward(struct mbuf *);
-void ipflow_create(const struct route *, struct mbuf *);
-void ipflow_slowtimo(void);
-
-#endif /* _KERNEL */
-
-/* INET6 stuff */
-#include <netinet6/in6_var.h>
-
-#endif /* _NETINET_IN_VAR_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet/ip.h b/newlib/libc/sys/linux/include/netinet/ip.h
deleted file mode 100644
index 0e6df1eea..000000000
--- a/newlib/libc/sys/linux/include/netinet/ip.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip.h 8.2 (Berkeley) 6/1/94
- * $FreeBSD: src/sys/netinet/ip.h,v 1.19 2001/12/14 19:37:32 rwatson Exp $
- */
-
-#ifndef _NETINET_IP_H_
-#define _NETINET_IP_H_
-
-/*
- * Definitions for internet protocol version 4.
- * Per RFC 791, September 1981.
- */
-#define IPVERSION 4
-
-/*
- * Structure of an internet header, naked of options.
- */
-struct ip {
-#ifdef _IP_VHL
- u_char ip_vhl; /* version << 4 | header length >> 2 */
-#else
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_int ip_hl:4, /* header length */
- ip_v:4; /* version */
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_int ip_v:4, /* version */
- ip_hl:4; /* header length */
-#endif
-#endif /* not _IP_VHL */
- u_char ip_tos; /* type of service */
- u_short ip_len; /* total length */
- u_short ip_id; /* identification */
- u_short ip_off; /* fragment offset field */
-#define IP_RF 0x8000 /* reserved fragment flag */
-#define IP_DF 0x4000 /* dont fragment flag */
-#define IP_MF 0x2000 /* more fragments flag */
-#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
- u_char ip_ttl; /* time to live */
- u_char ip_p; /* protocol */
- u_short ip_sum; /* checksum */
- struct in_addr ip_src,ip_dst; /* source and dest address */
-};
-
-#ifdef _IP_VHL
-#define IP_MAKE_VHL(v, hl) ((v) << 4 | (hl))
-#define IP_VHL_HL(vhl) ((vhl) & 0x0f)
-#define IP_VHL_V(vhl) ((vhl) >> 4)
-#define IP_VHL_BORING 0x45
-#endif
-
-#define IP_MAXPACKET 65535 /* maximum packet size */
-
-/*
- * Definitions for IP type of service (ip_tos)
- */
-#define IPTOS_LOWDELAY 0x10
-#define IPTOS_THROUGHPUT 0x08
-#define IPTOS_RELIABILITY 0x04
-#define IPTOS_MINCOST 0x02
-/* ECN bits proposed by Sally Floyd */
-#define IPTOS_CE 0x01 /* congestion experienced */
-#define IPTOS_ECT 0x02 /* ECN-capable transport */
-
-
-/*
- * Definitions for IP precedence (also in ip_tos) (hopefully unused)
- */
-#define IPTOS_PREC_NETCONTROL 0xe0
-#define IPTOS_PREC_INTERNETCONTROL 0xc0
-#define IPTOS_PREC_CRITIC_ECP 0xa0
-#define IPTOS_PREC_FLASHOVERRIDE 0x80
-#define IPTOS_PREC_FLASH 0x60
-#define IPTOS_PREC_IMMEDIATE 0x40
-#define IPTOS_PREC_PRIORITY 0x20
-#define IPTOS_PREC_ROUTINE 0x00
-
-/*
- * Definitions for options.
- */
-#define IPOPT_COPIED(o) ((o)&0x80)
-#define IPOPT_CLASS(o) ((o)&0x60)
-#define IPOPT_NUMBER(o) ((o)&0x1f)
-
-#define IPOPT_CONTROL 0x00
-#define IPOPT_RESERVED1 0x20
-#define IPOPT_DEBMEAS 0x40
-#define IPOPT_RESERVED2 0x60
-
-#define IPOPT_EOL 0 /* end of option list */
-#define IPOPT_NOP 1 /* no operation */
-
-#define IPOPT_RR 7 /* record packet route */
-#define IPOPT_TS 68 /* timestamp */
-#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
-#define IPOPT_LSRR 131 /* loose source route */
-#define IPOPT_ESO 133 /* extended security */
-#define IPOPT_CIPSO 134 /* commerical security */
-#define IPOPT_SATID 136 /* satnet id */
-#define IPOPT_SSRR 137 /* strict source route */
-#define IPOPT_RA 148 /* router alert */
-
-/*
- * Offsets to fields in options other than EOL and NOP.
- */
-#define IPOPT_OPTVAL 0 /* option ID */
-#define IPOPT_OLEN 1 /* option length */
-#define IPOPT_OFFSET 2 /* offset within option */
-#define IPOPT_MINOFF 4 /* min value of above */
-
-/*
- * Time stamp option structure.
- */
-struct ip_timestamp {
- u_char ipt_code; /* IPOPT_TS */
- u_char ipt_len; /* size of structure (variable) */
- u_char ipt_ptr; /* index of current entry */
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_int ipt_flg:4, /* flags, see below */
- ipt_oflw:4; /* overflow counter */
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_int ipt_oflw:4, /* overflow counter */
- ipt_flg:4; /* flags, see below */
-#endif
- union ipt_timestamp {
- n_long ipt_time[1];
- struct ipt_ta {
- struct in_addr ipt_addr;
- n_long ipt_time;
- } ipt_ta[1];
- } ipt_timestamp;
-};
-
-/* flag bits for ipt_flg */
-#define IPOPT_TS_TSONLY 0 /* timestamps only */
-#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
-#define IPOPT_TS_PRESPEC 3 /* specified modules only */
-
-/* bits for security (not byte swapped) */
-#define IPOPT_SECUR_UNCLASS 0x0000
-#define IPOPT_SECUR_CONFID 0xf135
-#define IPOPT_SECUR_EFTO 0x789a
-#define IPOPT_SECUR_MMMM 0xbc4d
-#define IPOPT_SECUR_RESTR 0xaf13
-#define IPOPT_SECUR_SECRET 0xd788
-#define IPOPT_SECUR_TOPSECRET 0x6bc5
-
-/*
- * Internet implementation parameters.
- */
-#define MAXTTL 255 /* maximum time to live (seconds) */
-#define IPDEFTTL 64 /* default ttl, from RFC 1340 */
-#define IPFRAGTTL 60 /* time to live for frags, slowhz */
-#define IPTTLDEC 1 /* subtracted when forwarding */
-
-#define IP_MSS 576 /* default maximum segment size */
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netinet/ip6.h b/newlib/libc/sys/linux/include/netinet/ip6.h
deleted file mode 100644
index 6c5cbe1d1..000000000
--- a/newlib/libc/sys/linux/include/netinet/ip6.h
+++ /dev/null
@@ -1,308 +0,0 @@
-/* $FreeBSD: src/sys/netinet/ip6.h,v 1.5 2001/06/11 12:39:00 ume Exp $ */
-/* $KAME: ip6.h,v 1.18 2001/03/29 05:34:30 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip.h 8.1 (Berkeley) 6/10/93
- */
-
-#ifndef _NETINET_IP6_H_
-#define _NETINET_IP6_H_
-
-/*
- * Definition for internet protocol version 6.
- * RFC 2460
- */
-
-struct ip6_hdr {
- union {
- struct ip6_hdrctl {
- u_int32_t ip6_un1_flow; /* 20 bits of flow-ID */
- u_int16_t ip6_un1_plen; /* payload length */
- u_int8_t ip6_un1_nxt; /* next header */
- u_int8_t ip6_un1_hlim; /* hop limit */
- } ip6_un1;
- u_int8_t ip6_un2_vfc; /* 4 bits version, top 4 bits class */
- } ip6_ctlun;
- struct in6_addr ip6_src; /* source address */
- struct in6_addr ip6_dst; /* destination address */
-} __attribute__((__packed__));
-
-#define ip6_vfc ip6_ctlun.ip6_un2_vfc
-#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
-#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen
-#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
-#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim
-#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
-
-#define IPV6_VERSION 0x60
-#define IPV6_VERSION_MASK 0xf0
-
-#if BYTE_ORDER == BIG_ENDIAN
-#define IPV6_FLOWINFO_MASK 0x0fffffff /* flow info (28 bits) */
-#define IPV6_FLOWLABEL_MASK 0x000fffff /* flow label (20 bits) */
-#else
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define IPV6_FLOWINFO_MASK 0xffffff0f /* flow info (28 bits) */
-#define IPV6_FLOWLABEL_MASK 0xffff0f00 /* flow label (20 bits) */
-#endif /* LITTLE_ENDIAN */
-#endif
-#if 1
-/* ECN bits proposed by Sally Floyd */
-#define IP6TOS_CE 0x01 /* congestion experienced */
-#define IP6TOS_ECT 0x02 /* ECN-capable transport */
-#endif
-
-/*
- * Extension Headers
- */
-
-struct ip6_ext {
- u_int8_t ip6e_nxt;
- u_int8_t ip6e_len;
-} __attribute__((__packed__));
-
-/* Hop-by-Hop options header */
-/* XXX should we pad it to force alignment on an 8-byte boundary? */
-struct ip6_hbh {
- u_int8_t ip6h_nxt; /* next header */
- u_int8_t ip6h_len; /* length in units of 8 octets */
- /* followed by options */
-} __attribute__((__packed__));
-
-/* Destination options header */
-/* XXX should we pad it to force alignment on an 8-byte boundary? */
-struct ip6_dest {
- u_int8_t ip6d_nxt; /* next header */
- u_int8_t ip6d_len; /* length in units of 8 octets */
- /* followed by options */
-} __attribute__((__packed__));
-
-/* Option types and related macros */
-#define IP6OPT_PAD1 0x00 /* 00 0 00000 */
-#define IP6OPT_PADN 0x01 /* 00 0 00001 */
-#define IP6OPT_JUMBO 0xC2 /* 11 0 00010 = 194 */
-#define IP6OPT_NSAP_ADDR 0xC3 /* 11 0 00011 */
-#define IP6OPT_TUNNEL_LIMIT 0x04 /* 00 0 00100 */
-#define IP6OPT_RTALERT 0x05 /* 00 0 00101 (KAME definition) */
-
-#define IP6OPT_RTALERT_LEN 4
-#define IP6OPT_RTALERT_MLD 0 /* Datagram contains an MLD message */
-#define IP6OPT_RTALERT_RSVP 1 /* Datagram contains an RSVP message */
-#define IP6OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */
-#define IP6OPT_MINLEN 2
-
-#define IP6OPT_BINDING_UPDATE 0xc6 /* 11 0 00110 */
-#define IP6OPT_BINDING_ACK 0x07 /* 00 0 00111 */
-#define IP6OPT_BINDING_REQ 0x08 /* 00 0 01000 */
-#define IP6OPT_HOME_ADDRESS 0xc9 /* 11 0 01001 */
-#define IP6OPT_EID 0x8a /* 10 0 01010 */
-
-#define IP6OPT_TYPE(o) ((o) & 0xC0)
-#define IP6OPT_TYPE_SKIP 0x00
-#define IP6OPT_TYPE_DISCARD 0x40
-#define IP6OPT_TYPE_FORCEICMP 0x80
-#define IP6OPT_TYPE_ICMP 0xC0
-
-#define IP6OPT_MUTABLE 0x20
-
-#define IP6OPT_JUMBO_LEN 6
-
-/* Routing header */
-struct ip6_rthdr {
- u_int8_t ip6r_nxt; /* next header */
- u_int8_t ip6r_len; /* length in units of 8 octets */
- u_int8_t ip6r_type; /* routing type */
- u_int8_t ip6r_segleft; /* segments left */
- /* followed by routing type specific data */
-} __attribute__((__packed__));
-
-/* Type 0 Routing header */
-struct ip6_rthdr0 {
- u_int8_t ip6r0_nxt; /* next header */
- u_int8_t ip6r0_len; /* length in units of 8 octets */
- u_int8_t ip6r0_type; /* always zero */
- u_int8_t ip6r0_segleft; /* segments left */
- u_int8_t ip6r0_reserved; /* reserved field */
- u_int8_t ip6r0_slmap[3]; /* strict/loose bit map */
- struct in6_addr ip6r0_addr[1]; /* up to 23 addresses */
-} __attribute__((__packed__));
-
-/* Fragment header */
-struct ip6_frag {
- u_int8_t ip6f_nxt; /* next header */
- u_int8_t ip6f_reserved; /* reserved field */
- u_int16_t ip6f_offlg; /* offset, reserved, and flag */
- u_int32_t ip6f_ident; /* identification */
-} __attribute__((__packed__));
-
-#if BYTE_ORDER == BIG_ENDIAN
-#define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */
-#define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */
-#define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */
-#else /* BYTE_ORDER == LITTLE_ENDIAN */
-#define IP6F_OFF_MASK 0xf8ff /* mask out offset from _offlg */
-#define IP6F_RESERVED_MASK 0x0600 /* reserved bits in ip6f_offlg */
-#define IP6F_MORE_FRAG 0x0100 /* more-fragments flag */
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
-
-/*
- * Internet implementation parameters.
- */
-#define IPV6_MAXHLIM 255 /* maximun hoplimit */
-#define IPV6_DEFHLIM 64 /* default hlim */
-#define IPV6_FRAGTTL 120 /* ttl for fragment packets, in slowtimo tick */
-#define IPV6_HLIMDEC 1 /* subtracted when forwaeding */
-
-#define IPV6_MMTU 1280 /* minimal MTU and reassembly. 1024 + 256 */
-#define IPV6_MAXPACKET 65535 /* ip6 max packet size without Jumbo payload*/
-
-#ifdef _KERNEL
-/*
- * IP6_EXTHDR_CHECK ensures that region between the IP6 header and the
- * target header (including IPv6 itself, extension headers and
- * TCP/UDP/ICMP6 headers) are continuous. KAME requires drivers
- * to store incoming data into one internal mbuf or one or more external
- * mbufs(never into two or more internal mbufs). Thus, the third case is
- * supposed to never be matched but is prepared just in case.
- */
-
-#define IP6_EXTHDR_CHECK(m, off, hlen, ret) \
-do { \
- if ((m)->m_next != NULL) { \
- if (((m)->m_flags & M_LOOP) && \
- ((m)->m_len < (off) + (hlen)) && \
- (((m) = m_pullup((m), (off) + (hlen))) == NULL)) { \
- ip6stat.ip6s_exthdrtoolong++; \
- return ret; \
- } else if ((m)->m_flags & M_EXT) { \
- if ((m)->m_len < (off) + (hlen)) { \
- ip6stat.ip6s_exthdrtoolong++; \
- m_freem(m); \
- return ret; \
- } \
- } else { \
- if ((m)->m_len < (off) + (hlen)) { \
- ip6stat.ip6s_exthdrtoolong++; \
- m_freem(m); \
- return ret; \
- } \
- } \
- } else { \
- if ((m)->m_len < (off) + (hlen)) { \
- ip6stat.ip6s_tooshort++; \
- in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_truncated); \
- m_freem(m); \
- return ret; \
- } \
- } \
-} while (0)
-
-/*
- * IP6_EXTHDR_GET ensures that intermediate protocol header (from "off" to
- * "len") is located in single mbuf, on contiguous memory region.
- * The pointer to the region will be returned to pointer variable "val",
- * with type "typ".
- * IP6_EXTHDR_GET0 does the same, except that it aligns the structure at the
- * very top of mbuf. GET0 is likely to make memory copy than GET.
- *
- * XXX we're now testing this, needs m_pulldown()
- */
-#define IP6_EXTHDR_GET(val, typ, m, off, len) \
-do { \
- struct mbuf *t; \
- int tmp; \
- if ((m)->m_len >= (off) + (len)) \
- (val) = (typ)(mtod((m), caddr_t) + (off)); \
- else { \
- t = m_pulldown((m), (off), (len), &tmp); \
- if (t) { \
- if (t->m_len < tmp + (len)) \
- panic("m_pulldown malfunction"); \
- (val) = (typ)(mtod(t, caddr_t) + tmp); \
- } else { \
- (val) = (typ)NULL; \
- (m) = NULL; \
- } \
- } \
-} while (0)
-
-#define IP6_EXTHDR_GET0(val, typ, m, off, len) \
-do { \
- struct mbuf *t; \
- if ((off) == 0) \
- (val) = (typ)mtod(m, caddr_t); \
- else { \
- t = m_pulldown((m), (off), (len), NULL); \
- if (t) { \
- if (t->m_len < (len)) \
- panic("m_pulldown malfunction"); \
- (val) = (typ)mtod(t, caddr_t); \
- } else { \
- (val) = (typ)NULL; \
- (m) = NULL; \
- } \
- } \
-} while (0)
-#endif /*_KERNEL*/
-
-#endif /* not _NETINET_IP6_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet/ip_dummynet.h b/newlib/libc/sys/linux/include/netinet/ip_dummynet.h
deleted file mode 100644
index 509172f29..000000000
--- a/newlib/libc/sys/linux/include/netinet/ip_dummynet.h
+++ /dev/null
@@ -1,361 +0,0 @@
-/*
- * Copyright (c) 1998-2002 Luigi Rizzo, Universita` di Pisa
- * Portions Copyright (c) 2000 Akamba Corp.
- * 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: src/sys/netinet/ip_dummynet.h,v 1.18 2002/05/05 21:27:47 luigi Exp $
- */
-
-#ifndef _IP_DUMMYNET_H
-#define _IP_DUMMYNET_H
-
-/*
- * Definition of dummynet data structures. In the structures, I decided
- * not to use the macros in <sys/queue.h> in the hope of making the code
- * easier to port to other architectures. The type of lists and queue we
- * use here is pretty simple anyways.
- */
-
-/*
- * We start with a heap, which is used in the scheduler to decide when
- * to transmit packets etc.
- *
- * The key for the heap is used for two different values:
- *
- * 1. timer ticks- max 10K/second, so 32 bits are enough;
- *
- * 2. virtual times. These increase in steps of len/x, where len is the
- * packet length, and x is either the weight of the flow, or the
- * sum of all weights.
- * If we limit to max 1000 flows and a max weight of 100, then
- * x needs 17 bits. The packet size is 16 bits, so we can easily
- * overflow if we do not allow errors.
- * So we use a key "dn_key" which is 64 bits. Some macros are used to
- * compare key values and handle wraparounds.
- * MAX64 returns the largest of two key values.
- * MY_M is used as a shift count when doing fixed point arithmetic
- * (a better name would be useful...).
- */
-typedef u_int64_t dn_key ; /* sorting key */
-#define DN_KEY_LT(a,b) ((int64_t)((a)-(b)) < 0)
-#define DN_KEY_LEQ(a,b) ((int64_t)((a)-(b)) <= 0)
-#define DN_KEY_GT(a,b) ((int64_t)((a)-(b)) > 0)
-#define DN_KEY_GEQ(a,b) ((int64_t)((a)-(b)) >= 0)
-#define MAX64(x,y) (( (int64_t) ( (y)-(x) )) > 0 ) ? (y) : (x)
-#define MY_M 16 /* number of left shift to obtain a larger precision */
-
-/*
- * XXX With this scaling, max 1000 flows, max weight 100, 1Gbit/s, the
- * virtual time wraps every 15 days.
- */
-
-/*
- * The OFFSET_OF macro is used to return the offset of a field within
- * a structure. It is used by the heap management routines.
- */
-#define OFFSET_OF(type, field) ((int)&( ((type *)0)->field) )
-
-/*
- * A heap entry is made of a key and a pointer to the actual
- * object stored in the heap.
- * The heap is an array of dn_heap_entry entries, dynamically allocated.
- * Current size is "size", with "elements" actually in use.
- * The heap normally supports only ordered insert and extract from the top.
- * If we want to extract an object from the middle of the heap, we
- * have to know where the object itself is located in the heap (or we
- * need to scan the whole array). To this purpose, an object has a
- * field (int) which contains the index of the object itself into the
- * heap. When the object is moved, the field must also be updated.
- * The offset of the index in the object is stored in the 'offset'
- * field in the heap descriptor. The assumption is that this offset
- * is non-zero if we want to support extract from the middle.
- */
-struct dn_heap_entry {
- dn_key key ; /* sorting key. Topmost element is smallest one */
- void *object ; /* object pointer */
-} ;
-
-struct dn_heap {
- int size ;
- int elements ;
- int offset ; /* XXX if > 0 this is the offset of direct ptr to obj */
- struct dn_heap_entry *p ; /* really an array of "size" entries */
-} ;
-
-/*
- * MT_DUMMYNET is a new (fake) mbuf type that is prepended to the
- * packet when it comes out of a pipe. The definition
- * ought to go in /sys/sys/mbuf.h but here it is less intrusive.
- */
-
-#define MT_DUMMYNET MT_CONTROL
-
-/*
- * struct dn_pkt identifies a packet in the dummynet queue. The
- * first part is really an m_hdr for implementation purposes, and some
- * fields are saved there. When passing the packet back to the ip_input/
- * ip_output()/bdg_forward, the struct is prepended to the mbuf chain with type
- * MT_DUMMYNET, and contains the pointer to the matching rule.
- *
- * Note: there is no real need to make this structure contain an m_hdr,
- * in the future this should be changed to a normal data structure.
- */
-struct dn_pkt {
- struct m_hdr hdr ;
-#define dn_next hdr.mh_nextpkt /* next element in queue */
-#define DN_NEXT(x) (struct dn_pkt *)(x)->dn_next
-#define dn_m hdr.mh_next /* packet to be forwarded */
-#define dn_dir hdr.mh_flags /* action when pkt extracted from a queue */
-#define DN_TO_IP_OUT 1
-#define DN_TO_IP_IN 2
-#define DN_TO_BDG_FWD 3
-
- dn_key output_time; /* when the pkt is due for delivery */
- struct ifnet *ifp; /* interface, for ip_output */
- struct sockaddr_in *dn_dst ;
- struct route ro; /* route, for ip_output. MUST COPY */
- int flags ; /* flags, for ip_output (IPv6 ?) */
-};
-
-/*
- * Overall structure of dummynet (with WF2Q+):
-
-In dummynet, packets are selected with the firewall rules, and passed
-to two different objects: PIPE or QUEUE.
-
-A QUEUE is just a queue with configurable size and queue management
-policy. It is also associated with a mask (to discriminate among
-different flows), a weight (used to give different shares of the
-bandwidth to different flows) and a "pipe", which essentially
-supplies the transmit clock for all queues associated with that
-pipe.
-
-A PIPE emulates a fixed-bandwidth link, whose bandwidth is
-configurable. The "clock" for a pipe can come from either an
-internal timer, or from the transmit interrupt of an interface.
-A pipe is also associated with one (or more, if masks are used)
-queue, where all packets for that pipe are stored.
-
-The bandwidth available on the pipe is shared by the queues
-associated with that pipe (only one in case the packet is sent
-to a PIPE) according to the WF2Q+ scheduling algorithm and the
-configured weights.
-
-In general, incoming packets are stored in the appropriate queue,
-which is then placed into one of a few heaps managed by a scheduler
-to decide when the packet should be extracted.
-The scheduler (a function called dummynet()) is run at every timer
-tick, and grabs queues from the head of the heaps when they are
-ready for processing.
-
-There are three data structures definining a pipe and associated queues:
-
- + dn_pipe, which contains the main configuration parameters related
- to delay and bandwidth;
- + dn_flow_set, which contains WF2Q+ configuration, flow
- masks, plr and RED configuration;
- + dn_flow_queue, which is the per-flow queue (containing the packets)
-
-Multiple dn_flow_set can be linked to the same pipe, and multiple
-dn_flow_queue can be linked to the same dn_flow_set.
-All data structures are linked in a linear list which is used for
-housekeeping purposes.
-
-During configuration, we create and initialize the dn_flow_set
-and dn_pipe structures (a dn_pipe also contains a dn_flow_set).
-
-At runtime: packets are sent to the appropriate dn_flow_set (either
-WFQ ones, or the one embedded in the dn_pipe for fixed-rate flows),
-which in turn dispatches them to the appropriate dn_flow_queue
-(created dynamically according to the masks).
-
-The transmit clock for fixed rate flows (ready_event()) selects the
-dn_flow_queue to be used to transmit the next packet. For WF2Q,
-wfq_ready_event() extract a pipe which in turn selects the right
-flow using a number of heaps defined into the pipe itself.
-
- *
- */
-
-/*
- * per flow queue. This contains the flow identifier, the queue
- * of packets, counters, and parameters used to support both RED and
- * WF2Q+.
- *
- * A dn_flow_queue is created and initialized whenever a packet for
- * a new flow arrives.
- */
-struct dn_flow_queue {
- struct dn_flow_queue *next ;
- struct ipfw_flow_id id ;
-
- struct dn_pkt *head, *tail ; /* queue of packets */
- u_int len ;
- u_int len_bytes ;
- long numbytes ; /* credit for transmission (dynamic queues) */
-
- u_int64_t tot_pkts ; /* statistics counters */
- u_int64_t tot_bytes ;
- u_int32_t drops ;
-
- int hash_slot ; /* debugging/diagnostic */
-
- /* RED parameters */
- int avg ; /* average queue length est. (scaled) */
- int count ; /* arrivals since last RED drop */
- int random ; /* random value (scaled) */
- u_int32_t q_time ; /* start of queue idle time */
-
- /* WF2Q+ support */
- struct dn_flow_set *fs ; /* parent flow set */
- int heap_pos ; /* position (index) of struct in heap */
- dn_key sched_time ; /* current time when queue enters ready_heap */
-
- dn_key S,F ; /* start time, finish time */
- /*
- * Setting F < S means the timestamp is invalid. We only need
- * to test this when the queue is empty.
- */
-} ;
-
-/*
- * flow_set descriptor. Contains the "template" parameters for the
- * queue configuration, and pointers to the hash table of dn_flow_queue's.
- *
- * The hash table is an array of lists -- we identify the slot by
- * hashing the flow-id, then scan the list looking for a match.
- * The size of the hash table (buckets) is configurable on a per-queue
- * basis.
- *
- * A dn_flow_set is created whenever a new queue or pipe is created (in the
- * latter case, the structure is located inside the struct dn_pipe).
- */
-struct dn_flow_set {
- struct dn_flow_set *next; /* next flow set in all_flow_sets list */
-
- u_short fs_nr ; /* flow_set number */
- u_short flags_fs;
-#define DN_HAVE_FLOW_MASK 0x0001
-#define DN_IS_RED 0x0002
-#define DN_IS_GENTLE_RED 0x0004
-#define DN_QSIZE_IS_BYTES 0x0008 /* queue size is measured in bytes */
-#define DN_IS_PIPE 0x4000
-#define DN_IS_QUEUE 0x8000
-
- struct dn_pipe *pipe ; /* pointer to parent pipe */
- u_short parent_nr ; /* parent pipe#, 0 if local to a pipe */
-
- int weight ; /* WFQ queue weight */
- int qsize ; /* queue size in slots or bytes */
- int plr ; /* pkt loss rate (2^31-1 means 100%) */
-
- struct ipfw_flow_id flow_mask ;
-
- /* hash table of queues onto this flow_set */
- int rq_size ; /* number of slots */
- int rq_elements ; /* active elements */
- struct dn_flow_queue **rq; /* array of rq_size entries */
-
- u_int32_t last_expired ; /* do not expire too frequently */
- int backlogged ; /* #active queues for this flowset */
-
- /* RED parameters */
-#define SCALE_RED 16
-#define SCALE(x) ( (x) << SCALE_RED )
-#define SCALE_VAL(x) ( (x) >> SCALE_RED )
-#define SCALE_MUL(x,y) ( ( (x) * (y) ) >> SCALE_RED )
- int w_q ; /* queue weight (scaled) */
- int max_th ; /* maximum threshold for queue (scaled) */
- int min_th ; /* minimum threshold for queue (scaled) */
- int max_p ; /* maximum value for p_b (scaled) */
- u_int c_1 ; /* max_p/(max_th-min_th) (scaled) */
- u_int c_2 ; /* max_p*min_th/(max_th-min_th) (scaled) */
- u_int c_3 ; /* for GRED, (1-max_p)/max_th (scaled) */
- u_int c_4 ; /* for GRED, 1 - 2*max_p (scaled) */
- u_int * w_q_lookup ; /* lookup table for computing (1-w_q)^t */
- u_int lookup_depth ; /* depth of lookup table */
- int lookup_step ; /* granularity inside the lookup table */
- int lookup_weight ; /* equal to (1-w_q)^t / (1-w_q)^(t+1) */
- int avg_pkt_size ; /* medium packet size */
- int max_pkt_size ; /* max packet size */
-} ;
-
-/*
- * Pipe descriptor. Contains global parameters, delay-line queue,
- * and the flow_set used for fixed-rate queues.
- *
- * For WF2Q+ support it also has 3 heaps holding dn_flow_queue:
- * not_eligible_heap, for queues whose start time is higher
- * than the virtual time. Sorted by start time.
- * scheduler_heap, for queues eligible for scheduling. Sorted by
- * finish time.
- * idle_heap, all flows that are idle and can be removed. We
- * do that on each tick so we do not slow down too much
- * operations during forwarding.
- *
- */
-struct dn_pipe { /* a pipe */
- struct dn_pipe *next ;
-
- int pipe_nr ; /* number */
- int bandwidth; /* really, bytes/tick. */
- int delay ; /* really, ticks */
-
- struct dn_pkt *head, *tail ; /* packets in delay line */
-
- /* WF2Q+ */
- struct dn_heap scheduler_heap ; /* top extract - key Finish time*/
- struct dn_heap not_eligible_heap; /* top extract- key Start time */
- struct dn_heap idle_heap ; /* random extract - key Start=Finish time */
-
- dn_key V ; /* virtual time */
- int sum; /* sum of weights of all active sessions */
- int numbytes; /* bits I can transmit (more or less). */
-
- dn_key sched_time ; /* time pipe was scheduled in ready_heap */
-
- /*
- * When the tx clock come from an interface (if_name[0] != '\0'), its name
- * is stored below, whereas the ifp is filled when the rule is configured.
- */
- char if_name[16];
- struct ifnet *ifp ;
- int ready ; /* set if ifp != NULL and we got a signal from it */
-
- struct dn_flow_set fs ; /* used with fixed-rate flows */
-};
-
-#ifdef _KERNEL
-typedef int ip_dn_ctl_t(struct sockopt *); /* raw_ip.c */
-typedef void ip_dn_ruledel_t(void *); /* ip_fw.c */
-typedef int ip_dn_io_t(int pipe, int dir, struct mbuf *m,
- struct ifnet *ifp, struct route *ro, struct sockaddr_in * dst,
- struct ip_fw *rule, int flags); /* ip_{in,out}put.c, bridge.c */
-extern ip_dn_ctl_t *ip_dn_ctl_ptr;
-extern ip_dn_ruledel_t *ip_dn_ruledel_ptr;
-extern ip_dn_io_t *ip_dn_io_ptr;
-#define DUMMYNET_LOADED (ip_dn_io_ptr != NULL)
-#endif
-
-#endif /* _IP_DUMMYNET_H */
diff --git a/newlib/libc/sys/linux/include/netinet/ip_ecn.h b/newlib/libc/sys/linux/include/netinet/ip_ecn.h
deleted file mode 100644
index 9f82168b6..000000000
--- a/newlib/libc/sys/linux/include/netinet/ip_ecn.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* $FreeBSD: src/sys/netinet/ip_ecn.h,v 1.5 2002/03/19 21:25:46 alfred Exp $ */
-/* $KAME: ip_ecn.h,v 1.6 2001/05/03 14:51:48 itojun Exp $ */
-
-/*
- * Copyright (C) 1999 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- *
- */
-/*
- * ECN consideration on tunnel ingress/egress operation.
- * http://www.aciri.org/floyd/papers/draft-ipsec-ecn-00.txt
- */
-
-#if defined(_KERNEL) && !defined(_LKM)
-#include "opt_inet.h"
-#endif
-
-#define ECN_ALLOWED 1 /* ECN allowed */
-#define ECN_FORBIDDEN 0 /* ECN forbidden */
-#define ECN_NOCARE (-1) /* no consideration to ECN */
-
-#ifdef _KERNEL
-extern void ip_ecn_ingress(int, u_int8_t *, const u_int8_t *);
-extern void ip_ecn_egress(int, const u_int8_t *, u_int8_t *);
-#endif
diff --git a/newlib/libc/sys/linux/include/netinet/ip_encap.h b/newlib/libc/sys/linux/include/netinet/ip_encap.h
deleted file mode 100644
index cfc6bca8c..000000000
--- a/newlib/libc/sys/linux/include/netinet/ip_encap.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* $FreeBSD: src/sys/netinet/ip_encap.h,v 1.3 2002/03/19 21:25:46 alfred Exp $ */
-/* $KAME: ip_encap.h,v 1.7 2000/03/25 07:23:37 sumikawa Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-#ifndef _NETINET_IP_ENCAP_H_
-#define _NETINET_IP_ENCAP_H_
-
-#ifdef _KERNEL
-
-struct encaptab {
- LIST_ENTRY(encaptab) chain;
- int af;
- int proto; /* -1: don't care, I'll check myself */
- struct sockaddr_storage src; /* my addr */
- struct sockaddr_storage srcmask;
- struct sockaddr_storage dst; /* remote addr */
- struct sockaddr_storage dstmask;
- int (*func)(const struct mbuf *, int, int, void *);
- const struct protosw *psw; /* only pr_input will be used */
- void *arg; /* passed via m->m_pkthdr.aux */
-};
-
-void encap_init(void);
-void encap4_input(struct mbuf *, int);
-int encap6_input(struct mbuf **, int *, int);
-const struct encaptab *encap_attach(int, int, const struct sockaddr *,
- const struct sockaddr *, const struct sockaddr *,
- const struct sockaddr *, const struct protosw *, void *);
-const struct encaptab *encap_attach_func(int, int,
- int (*)(const struct mbuf *, int, int, void *),
- const struct protosw *, void *);
-int encap_detach(const struct encaptab *);
-void *encap_getarg(struct mbuf *);
-#endif
-
-#endif /*_NETINET_IP_ENCAP_H_*/
diff --git a/newlib/libc/sys/linux/include/netinet/ip_flow.h b/newlib/libc/sys/linux/include/netinet/ip_flow.h
deleted file mode 100644
index 90561f07b..000000000
--- a/newlib/libc/sys/linux/include/netinet/ip_flow.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1998 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by the 3am Software Foundry ("3am"). It was developed by Matt Thomas.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the 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
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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: src/sys/netinet/ip_flow.h,v 1.4 2000/05/26 02:05:46 jake Exp $
- */
-
-#ifndef _NETINET_IP_FLOW_H
-#define _NETINET_IP_FLOW_H
-
-struct ipflow {
- LIST_ENTRY(ipflow) ipf_next; /* next ipflow in bucket */
- struct in_addr ipf_dst; /* destination address */
- struct in_addr ipf_src; /* source address */
-
- u_int8_t ipf_tos; /* type-of-service */
- struct route ipf_ro; /* associated route entry */
- u_long ipf_uses; /* number of uses in this period */
-
- int ipf_timer; /* remaining lifetime of this entry */
- u_long ipf_dropped; /* ENOBUFS returned by if_output */
- u_long ipf_errors; /* other errors returned by if_output */
- u_long ipf_last_uses; /* number of uses in last period */
-};
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netinet/ip_fw.h b/newlib/libc/sys/linux/include/netinet/ip_fw.h
deleted file mode 100644
index 3c2b1c743..000000000
--- a/newlib/libc/sys/linux/include/netinet/ip_fw.h
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * Copyright (c) 1993 Daniel Boulet
- * Copyright (c) 1994 Ugen J.S.Antsilevich
- *
- * Redistribution and use in source forms, with and without modification,
- * are permitted provided that this entire comment appears intact.
- *
- * Redistribution in binary form may occur without any restrictions.
- * Obviously, it would be nice if you gave credit where credit is due
- * but requiring it would be too onerous.
- *
- * This software is provided ``AS IS'' without any warranties of any kind.
- *
- * $FreeBSD: src/sys/netinet/ip_fw.h,v 1.66 2002/05/09 10:34:57 luigi Exp $
- */
-
-#ifndef _IP_FW_H
-#define _IP_FW_H
-
-#include <sys/queue.h>
-
-/*
- * This union structure identifies an interface, either explicitly
- * by name or implicitly by IP address. The flags IP_FW_F_IIFNAME
- * and IP_FW_F_OIFNAME say how to interpret this structure. An
- * interface unit number of -1 matches any unit number, while an
- * IP address of 0.0.0.0 indicates matches any interface.
- *
- * The receive and transmit interfaces are only compared against the
- * the packet if the corresponding bit (IP_FW_F_IIFACE or IP_FW_F_OIFACE)
- * is set. Note some packets lack a receive or transmit interface
- * (in which case the missing "interface" never matches).
- */
-
-union ip_fw_if {
- struct in_addr fu_via_ip; /* Specified by IP address */
- struct { /* Specified by interface name */
-#define FW_IFNLEN 10 /* need room ! was IFNAMSIZ */
- char name[FW_IFNLEN];
- short unit; /* -1 means match any unit */
- } fu_via_if;
-};
-
-/*
- * Format of an IP firewall descriptor
- *
- * fw_src, fw_dst, fw_smsk, fw_dmsk are always stored in network byte order.
- * fw_flg and fw_n*p are stored in host byte order (of course).
- * Port numbers are stored in HOST byte order.
- */
-
-/*
- * To match MAC headers:
- * 12 bytes at fw_mac_hdr contain the dst-src MAC address after masking.
- * 12 bytes at fw_mac_mask contain the mask to apply to dst-src
- * 2 bytes at fw_mac_type contain the mac type after mask (in net format)
- * 2 bytes at fw_mac_type_mask contain the mac type mask
- * If IP_FW_F_SRNG, the two contain the low-high of a range of types.
- * IP_FW_F_DRNG is used to indicare we want to match a vlan.
- */
-#define fw_mac_hdr fw_src
-#define fw_mac_mask fw_uar
-#define fw_mac_type fw_iplen
-#define fw_mac_mask_type fw_ipid
-
-struct ip_fw {
- LIST_ENTRY(ip_fw) next; /* bidirectional list of rules */
- u_int fw_flg; /* Operational Flags word */
- u_int64_t fw_pcnt; /* Packet counters */
- u_int64_t fw_bcnt; /* Byte counters */
-
- struct in_addr fw_src; /* Source IP address */
- struct in_addr fw_dst; /* Destination IP address */
- struct in_addr fw_smsk; /* Mask for source IP address */
- struct in_addr fw_dmsk; /* Mask for destination address */
- u_short fw_number; /* Rule number */
- u_char fw_prot; /* IP protocol */
-#if 1
- u_char fw_nports; /* # of src/dst port in array */
-#define IP_FW_GETNSRCP(rule) ((rule)->fw_nports & 0x0f)
-#define IP_FW_SETNSRCP(rule, n) do { \
- (rule)->fw_nports &= ~0x0f; \
- (rule)->fw_nports |= (n); \
- } while (0)
-#define IP_FW_GETNDSTP(rule) ((rule)->fw_nports >> 4)
-#define IP_FW_SETNDSTP(rule, n) do { \
- (rule)->fw_nports &= ~0xf0; \
- (rule)->fw_nports |= (n) << 4;\
- } while (0)
-#define IP_FW_HAVEPORTS(rule) ((rule)->fw_nports != 0)
-#else
- u_char __pad[1];
- u_int _nsrcp;
- u_int _ndstp;
-#define IP_FW_GETNSRCP(rule) (rule)->_nsrcp
-#define IP_FW_SETNSRCP(rule,n) (rule)->_nsrcp = n
-#define IP_FW_GETNDSTP(rule) (rule)->_ndstp
-#define IP_FW_SETNDSTP(rule,n) (rule)->_ndstp = n
-#define IP_FW_HAVEPORTS(rule) ((rule)->_ndstp + (rule)->_nsrcp != 0)
-#endif
-#define IP_FW_MAX_PORTS 10 /* A reasonable maximum */
- union {
- u_short fw_pts[IP_FW_MAX_PORTS]; /* port numbers to match */
-#define IP_FW_ICMPTYPES_MAX 128
-#define IP_FW_ICMPTYPES_DIM (IP_FW_ICMPTYPES_MAX / (sizeof(unsigned) * 8))
- unsigned fw_icmptypes[IP_FW_ICMPTYPES_DIM]; /*ICMP types bitmap*/
- } fw_uar;
-
- u_int fw_ipflg; /* IP flags word */
- u_short fw_iplen; /* IP length */
- u_short fw_ipid; /* Identification */
- u_char fw_ipopt; /* IP options set */
- u_char fw_ipnopt; /* IP options unset */
- u_char fw_iptos; /* IP type of service set */
- u_char fw_ipntos; /* IP type of service unset */
- u_char fw_ipttl; /* IP time to live */
- u_int fw_ipver:4; /* IP version */
- u_char fw_tcpopt; /* TCP options set */
- u_char fw_tcpnopt; /* TCP options unset */
- u_char fw_tcpf; /* TCP flags set */
- u_char fw_tcpnf; /* TCP flags unset */
- u_short fw_tcpwin; /* TCP window size */
- u_int32_t fw_tcpseq; /* TCP sequence */
- u_int32_t fw_tcpack; /* TCP acknowledgement */
- long timestamp; /* timestamp (tv_sec) of last match */
- union ip_fw_if fw_in_if; /* Incoming interfaces */
- union ip_fw_if fw_out_if; /* Outgoing interfaces */
- union {
- u_short fu_divert_port; /* Divert/tee port (options IPDIVERT) */
- u_short fu_pipe_nr; /* queue number (option DUMMYNET) */
- u_short fu_skipto_rule; /* SKIPTO command rule number */
- u_short fu_reject_code; /* REJECT response code */
- struct sockaddr_in fu_fwd_ip;
- } fw_un;
- void *pipe_ptr; /* flow_set ptr for dummynet pipe */
- void *next_rule_ptr; /* next rule in case of match */
- uid_t fw_uid; /* uid to match */
- gid_t fw_gid; /* gid to match */
- int fw_logamount; /* amount to log */
- u_int64_t fw_loghighest; /* highest number packet to log */
-
- long dont_match_prob; /* 0x7fffffff means 1.0, always fail */
- u_char dyn_type; /* type for dynamic rule */
-
-#define DYN_KEEP_STATE 0 /* type for keep-state rules */
-#define DYN_LIMIT 1 /* type for limit connection rules */
-#define DYN_LIMIT_PARENT 2 /* parent entry for limit connection rules */
-
- /* following two fields are used to limit number of connections
- * basing on either src, srcport, dst, dstport.
- */
- u_char limit_mask; /* mask type for limit rule, can
- * have many.
- */
-#define DYN_SRC_ADDR 0x1
-#define DYN_SRC_PORT 0x2
-#define DYN_DST_ADDR 0x4
-#define DYN_DST_PORT 0x8
-
- u_short conn_limit; /* # of connections for limit rule */
-};
-
-#define fw_divert_port fw_un.fu_divert_port
-#define fw_skipto_rule fw_un.fu_skipto_rule
-#define fw_reject_code fw_un.fu_reject_code
-#define fw_pipe_nr fw_un.fu_pipe_nr
-#define fw_fwd_ip fw_un.fu_fwd_ip
-
-/*
- *
- * rule_ptr -------------+
- * V
- * [ next.le_next ]---->[ next.le_next ]---- [ next.le_next ]--->
- * [ next.le_prev ]<----[ next.le_prev ]<----[ next.le_prev ]<---
- * [ <ip_fw> body ] [ <ip_fw> body ] [ <ip_fw> body ]
- *
- */
-
-/*
- * Flow mask/flow id for each queue.
- */
-struct ipfw_flow_id {
- u_int32_t dst_ip;
- u_int32_t src_ip;
- u_int16_t dst_port;
- u_int16_t src_port;
- u_int8_t proto;
- u_int8_t flags; /* protocol-specific flags */
-};
-
-/*
- * dynamic ipfw rule
- */
-struct ipfw_dyn_rule {
- struct ipfw_dyn_rule *next;
- struct ipfw_flow_id id; /* (masked) flow id */
- struct ip_fw *rule; /* pointer to rule */
- struct ipfw_dyn_rule *parent; /* pointer to parent rule */
- u_int32_t expire; /* expire time */
- u_int64_t pcnt; /* packet match counters */
- u_int64_t bcnt; /* byte match counters */
- u_int32_t bucket; /* which bucket in hash table */
- u_int32_t state; /* state of this rule (typically a
- * combination of TCP flags)
- */
- u_int16_t dyn_type; /* rule type */
- u_int16_t count; /* refcount */
-};
-
-/*
- * Values for "flags" field .
- */
-#define IP_FW_F_COMMAND 0x000000ff /* Mask for type of chain entry: */
-#define IP_FW_F_DENY 0x00000000 /* This is a deny rule */
-#define IP_FW_F_REJECT 0x00000001 /* Deny and send a response packet */
-#define IP_FW_F_ACCEPT 0x00000002 /* This is an accept rule */
-#define IP_FW_F_COUNT 0x00000003 /* This is a count rule */
-#define IP_FW_F_DIVERT 0x00000004 /* This is a divert rule */
-#define IP_FW_F_TEE 0x00000005 /* This is a tee rule */
-#define IP_FW_F_SKIPTO 0x00000006 /* This is a skipto rule */
-#define IP_FW_F_FWD 0x00000007 /* This is a "change forwarding
- * address" rule
- */
-#define IP_FW_F_PIPE 0x00000008 /* This is a dummynet rule */
-#define IP_FW_F_QUEUE 0x00000009 /* This is a dummynet queue */
-
-#define IP_FW_F_IN 0x00000100 /* Check inbound packets */
-#define IP_FW_F_OUT 0x00000200 /* Check outbound packets */
-#define IP_FW_F_IIFACE 0x00000400 /* Apply inbound interface test */
-#define IP_FW_F_OIFACE 0x00000800 /* Apply outbound interface test */
-#define IP_FW_F_PRN 0x00001000 /* Print if this rule matches */
-#define IP_FW_F_SRNG 0x00002000 /* The first two src ports are a min
- * and max range (stored in host byte
- * order).
- */
-#define IP_FW_F_DRNG 0x00004000 /* The first two dst ports are a min
- * and max range (stored in host byte
- * order).
- */
-#define IP_FW_F_FRAG 0x00008000 /* Fragment */
-#define IP_FW_F_IIFNAME 0x00010000 /* In interface by name/unit (not IP) */
-#define IP_FW_F_OIFNAME 0x00020000 /* Out interface by name/unit (not IP)*/
-#define IP_FW_F_INVSRC 0x00040000 /* Invert sense of src check */
-#define IP_FW_F_INVDST 0x00080000 /* Invert sense of dst check */
-#define IP_FW_F_ICMPBIT 0x00100000 /* ICMP type bitmap is valid */
-#define IP_FW_F_UID 0x00200000 /* filter by uid */
-#define IP_FW_F_GID 0x00400000 /* filter by gid */
-#define IP_FW_F_RND_MATCH 0x00800000 /* probabilistic rule match */
-#define IP_FW_F_SMSK 0x01000000 /* src-port + mask */
-#define IP_FW_F_DMSK 0x02000000 /* dst-port + mask */
-#define IP_FW_BRIDGED 0x04000000 /* only match bridged packets */
-#define IP_FW_F_KEEP_S 0x08000000 /* keep state */
-#define IP_FW_F_CHECK_S 0x10000000 /* check state */
-#define IP_FW_F_SME 0x20000000 /* source = me */
-#define IP_FW_F_DME 0x40000000 /* destination = me */
-#define IP_FW_F_MAC 0x80000000 /* match MAC header */
-
-#define IP_FW_F_MASK 0xFFFFFFFF /* All possible flag bits mask */
-
-/*
- * Flags for the 'fw_ipflg' field, for comparing values
- * of ip and its protocols.
- */
-#define IP_FW_IF_TCPOPT 0x00000001 /* tcp options */
-#define IP_FW_IF_TCPFLG 0x00000002 /* tcp flags */
-#define IP_FW_IF_TCPSEQ 0x00000004 /* tcp sequence number */
-#define IP_FW_IF_TCPACK 0x00000008 /* tcp acknowledgement number */
-#define IP_FW_IF_TCPWIN 0x00000010 /* tcp window size */
-#define IP_FW_IF_TCPEST 0x00000020 /* established TCP connection */
-#define IP_FW_IF_TCPMSK 0x0000003f /* mask of all tcp values */
-#define IP_FW_IF_IPOPT 0x00000100 /* ip options */
-#define IP_FW_IF_IPLEN 0x00000200 /* ip length */
-#define IP_FW_IF_IPID 0x00000400 /* ip identification */
-#define IP_FW_IF_IPTOS 0x00000800 /* ip type of service */
-#define IP_FW_IF_IPTTL 0x00001000 /* ip time to live */
-#define IP_FW_IF_IPVER 0x00002000 /* ip version */
-#define IP_FW_IF_IPPRE 0x00004000 /* ip precedence */
-#define IP_FW_IF_IPMSK 0x00007f00 /* mask of all ip values */
-#define IP_FW_IF_MSK 0x0000ffff /* All possible bits mask */
-
-/*
- * For backwards compatibility with rules specifying "via iface" but
- * not restricted to only "in" or "out" packets, we define this combination
- * of bits to represent this configuration.
- */
-
-#define IF_FW_F_VIAHACK (IP_FW_F_IN|IP_FW_F_OUT|IP_FW_F_IIFACE|IP_FW_F_OIFACE)
-
-/*
- * Definitions for REJECT response codes.
- * Values less than 256 correspond to ICMP unreachable codes.
- */
-#define IP_FW_REJECT_RST 0x0100 /* TCP packets: send RST */
-
-/*
- * Definitions for IP option names.
- */
-#define IP_FW_IPOPT_LSRR 0x01
-#define IP_FW_IPOPT_SSRR 0x02
-#define IP_FW_IPOPT_RR 0x04
-#define IP_FW_IPOPT_TS 0x08
-
-/*
- * Definitions for TCP option names.
- */
-#define IP_FW_TCPOPT_MSS 0x01
-#define IP_FW_TCPOPT_WINDOW 0x02
-#define IP_FW_TCPOPT_SACK 0x04
-#define IP_FW_TCPOPT_TS 0x08
-#define IP_FW_TCPOPT_CC 0x10
-
-/*
- * Definitions for TCP flags.
- */
-#define IP_FW_TCPF_FIN TH_FIN
-#define IP_FW_TCPF_SYN TH_SYN
-#define IP_FW_TCPF_RST TH_RST
-#define IP_FW_TCPF_PSH TH_PUSH
-#define IP_FW_TCPF_ACK TH_ACK
-#define IP_FW_TCPF_URG TH_URG
-
-/*
- * Main firewall chains definitions and global var's definitions.
- */
-#ifdef _KERNEL
-
-#define IP_FW_PORT_DYNT_FLAG 0x10000
-#define IP_FW_PORT_TEE_FLAG 0x20000
-#define IP_FW_PORT_DENY_FLAG 0x40000
-
-/*
- * Function definitions.
- */
-void ip_fw_init(void);
-
-/* Firewall hooks */
-struct ip;
-struct sockopt;
-typedef int ip_fw_chk_t (struct mbuf **m, struct ifnet *oif,
- u_int16_t *cookie, struct ip_fw **rule, struct sockaddr_in **next_hop);
-typedef int ip_fw_ctl_t (struct sockopt *);
-extern ip_fw_chk_t *ip_fw_chk_ptr;
-extern ip_fw_ctl_t *ip_fw_ctl_ptr;
-extern int fw_one_pass;
-extern int fw_enable;
-extern struct ipfw_flow_id last_pkt;
-#define IPFW_LOADED (ip_fw_chk_ptr != NULL)
-#endif /* _KERNEL */
-
-#endif /* _IP_FW_H */
diff --git a/newlib/libc/sys/linux/include/netinet/ip_icmp.h b/newlib/libc/sys/linux/include/netinet/ip_icmp.h
deleted file mode 100644
index 2574d07dc..000000000
--- a/newlib/libc/sys/linux/include/netinet/ip_icmp.h
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/ip_icmp.h,v 1.18 2002/03/19 21:25:46 alfred Exp $
- */
-
-#ifndef _NETINET_IP_ICMP_H_
-#define _NETINET_IP_ICMP_H_
-
-/*
- * Interface Control Message Protocol Definitions.
- * Per RFC 792, September 1981.
- */
-
-/*
- * Internal of an ICMP Router Advertisement
- */
-struct icmp_ra_addr {
- u_int32_t ira_addr;
- u_int32_t ira_preference;
-};
-
-/*
- * Structure of an icmp header.
- */
-struct icmp {
- u_char icmp_type; /* type of message, see below */
- u_char icmp_code; /* type sub code */
- u_short icmp_cksum; /* ones complement cksum of struct */
- union {
- u_char ih_pptr; /* ICMP_PARAMPROB */
- struct in_addr ih_gwaddr; /* ICMP_REDIRECT */
- struct ih_idseq {
- n_short icd_id;
- n_short icd_seq;
- } ih_idseq;
- int ih_void;
-
- /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
- struct ih_pmtu {
- n_short ipm_void;
- n_short ipm_nextmtu;
- } ih_pmtu;
-
- struct ih_rtradv {
- u_char irt_num_addrs;
- u_char irt_wpa;
- u_int16_t irt_lifetime;
- } ih_rtradv;
- } icmp_hun;
-#define icmp_pptr icmp_hun.ih_pptr
-#define icmp_gwaddr icmp_hun.ih_gwaddr
-#define icmp_id icmp_hun.ih_idseq.icd_id
-#define icmp_seq icmp_hun.ih_idseq.icd_seq
-#define icmp_void icmp_hun.ih_void
-#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
-#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
-#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs
-#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa
-#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
- union {
- struct id_ts {
- n_time its_otime;
- n_time its_rtime;
- n_time its_ttime;
- } id_ts;
- struct id_ip {
- struct ip idi_ip;
- /* options and then 64 bits of data */
- } id_ip;
- struct icmp_ra_addr id_radv;
- u_int32_t id_mask;
- char id_data[1];
- } icmp_dun;
-#define icmp_otime icmp_dun.id_ts.its_otime
-#define icmp_rtime icmp_dun.id_ts.its_rtime
-#define icmp_ttime icmp_dun.id_ts.its_ttime
-#define icmp_ip icmp_dun.id_ip.idi_ip
-#define icmp_radv icmp_dun.id_radv
-#define icmp_mask icmp_dun.id_mask
-#define icmp_data icmp_dun.id_data
-};
-
-/*
- * Lower bounds on packet lengths for various types.
- * For the error advice packets must first insure that the
- * packet is large enough to contain the returned ip header.
- * Only then can we do the check to see if 64 bits of packet
- * data have been returned, since we need to check the returned
- * ip header length.
- */
-#define ICMP_MINLEN 8 /* abs minimum */
-#define ICMP_TSLEN (8 + 3 * sizeof (n_time)) /* timestamp */
-#define ICMP_MASKLEN 12 /* address mask */
-#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8) /* min */
-#ifndef _IP_VHL
-#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8)
- /* N.B.: must separately check that ip_hl >= 5 */
-#else
-#define ICMP_ADVLEN(p) (8 + (IP_VHL_HL((p)->icmp_ip.ip_vhl) << 2) + 8)
- /* N.B.: must separately check that header length >= 5 */
-#endif
-
-/*
- * Definition of type and code field values.
- */
-#define ICMP_ECHOREPLY 0 /* echo reply */
-#define ICMP_UNREACH 3 /* dest unreachable, codes: */
-#define ICMP_UNREACH_NET 0 /* bad net */
-#define ICMP_UNREACH_HOST 1 /* bad host */
-#define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */
-#define ICMP_UNREACH_PORT 3 /* bad port */
-#define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */
-#define ICMP_UNREACH_SRCFAIL 5 /* src route failed */
-#define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */
-#define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */
-#define ICMP_UNREACH_ISOLATED 8 /* src host isolated */
-#define ICMP_UNREACH_NET_PROHIB 9 /* prohibited access */
-#define ICMP_UNREACH_HOST_PROHIB 10 /* ditto */
-#define ICMP_UNREACH_TOSNET 11 /* bad tos for net */
-#define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */
-#define ICMP_UNREACH_FILTER_PROHIB 13 /* admin prohib */
-#define ICMP_UNREACH_HOST_PRECEDENCE 14 /* host prec vio. */
-#define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 /* prec cutoff */
-#define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */
-#define ICMP_REDIRECT 5 /* shorter route, codes: */
-#define ICMP_REDIRECT_NET 0 /* for network */
-#define ICMP_REDIRECT_HOST 1 /* for host */
-#define ICMP_REDIRECT_TOSNET 2 /* for tos and net */
-#define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */
-#define ICMP_ECHO 8 /* echo service */
-#define ICMP_ROUTERADVERT 9 /* router advertisement */
-#define ICMP_ROUTERSOLICIT 10 /* router solicitation */
-#define ICMP_TIMXCEED 11 /* time exceeded, code: */
-#define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */
-#define ICMP_TIMXCEED_REASS 1 /* ttl==0 in reass */
-#define ICMP_PARAMPROB 12 /* ip header bad */
-#define ICMP_PARAMPROB_ERRATPTR 0 /* error at param ptr */
-#define ICMP_PARAMPROB_OPTABSENT 1 /* req. opt. absent */
-#define ICMP_PARAMPROB_LENGTH 2 /* bad length */
-#define ICMP_TSTAMP 13 /* timestamp request */
-#define ICMP_TSTAMPREPLY 14 /* timestamp reply */
-#define ICMP_IREQ 15 /* information request */
-#define ICMP_IREQREPLY 16 /* information reply */
-#define ICMP_MASKREQ 17 /* address mask request */
-#define ICMP_MASKREPLY 18 /* address mask reply */
-
-#define ICMP_MAXTYPE 18
-
-#define ICMP_INFOTYPE(type) \
- ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
- (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \
- (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
- (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
- (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
-
-#ifdef _KERNEL
-void icmp_error(struct mbuf *, int, int, n_long, struct ifnet *);
-void icmp_input(struct mbuf *, int);
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netinet/ip_mroute.h b/newlib/libc/sys/linux/include/netinet/ip_mroute.h
deleted file mode 100644
index 555ff4783..000000000
--- a/newlib/libc/sys/linux/include/netinet/ip_mroute.h
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * Copyright (c) 1989 Stephen Deering.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Stephen Deering of Stanford University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_mroute.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/ip_mroute.h,v 1.19 2002/03/19 21:25:46 alfred Exp $
- */
-
-#ifndef _NETINET_IP_MROUTE_H_
-#define _NETINET_IP_MROUTE_H_
-
-/*
- * Definitions for IP multicast forwarding.
- *
- * Written by David Waitzman, BBN Labs, August 1988.
- * Modified by Steve Deering, Stanford, February 1989.
- * Modified by Ajit Thyagarajan, PARC, August 1993.
- * Modified by Ajit Thyagarajan, PARC, August 1994.
- *
- * MROUTING Revision: 3.3.1.3
- */
-
-
-/*
- * Multicast Routing set/getsockopt commands.
- */
-#define MRT_INIT 100 /* initialize forwarder */
-#define MRT_DONE 101 /* shut down forwarder */
-#define MRT_ADD_VIF 102 /* create virtual interface */
-#define MRT_DEL_VIF 103 /* delete virtual interface */
-#define MRT_ADD_MFC 104 /* insert forwarding cache entry */
-#define MRT_DEL_MFC 105 /* delete forwarding cache entry */
-#define MRT_VERSION 106 /* get kernel version number */
-#define MRT_ASSERT 107 /* enable PIM assert processing */
-
-
-#define GET_TIME(t) microtime(&t)
-
-/*
- * Types and macros for handling bitmaps with one bit per virtual interface.
- */
-#define MAXVIFS 32
-typedef u_long vifbitmap_t;
-typedef u_short vifi_t; /* type of a vif index */
-#define ALL_VIFS (vifi_t)-1
-
-#define VIFM_SET(n, m) ((m) |= (1 << (n)))
-#define VIFM_CLR(n, m) ((m) &= ~(1 << (n)))
-#define VIFM_ISSET(n, m) ((m) & (1 << (n)))
-#define VIFM_CLRALL(m) ((m) = 0x00000000)
-#define VIFM_COPY(mfrom, mto) ((mto) = (mfrom))
-#define VIFM_SAME(m1, m2) ((m1) == (m2))
-
-
-/*
- * Argument structure for MRT_ADD_VIF.
- * (MRT_DEL_VIF takes a single vifi_t argument.)
- */
-struct vifctl {
- vifi_t vifc_vifi; /* the index of the vif to be added */
- u_char vifc_flags; /* VIFF_ flags defined below */
- u_char vifc_threshold; /* min ttl required to forward on vif */
- u_int vifc_rate_limit; /* max rate */
- struct in_addr vifc_lcl_addr; /* local interface address */
- struct in_addr vifc_rmt_addr; /* remote address (tunnels only) */
-};
-
-#define VIFF_TUNNEL 0x1 /* vif represents a tunnel end-point */
-#define VIFF_SRCRT 0x2 /* tunnel uses IP source routing */
-
-/*
- * Argument structure for MRT_ADD_MFC and MRT_DEL_MFC
- * (mfcc_tos to be added at a future point)
- */
-struct mfcctl {
- struct in_addr mfcc_origin; /* ip origin of mcasts */
- struct in_addr mfcc_mcastgrp; /* multicast group associated*/
- vifi_t mfcc_parent; /* incoming vif */
- u_char mfcc_ttls[MAXVIFS]; /* forwarding ttls on vifs */
-};
-
-/*
- * The kernel's multicast routing statistics.
- */
-struct mrtstat {
- u_long mrts_mfc_lookups; /* # forw. cache hash table hits */
- u_long mrts_mfc_misses; /* # forw. cache hash table misses */
- u_long mrts_upcalls; /* # calls to mrouted */
- u_long mrts_no_route; /* no route for packet's origin */
- u_long mrts_bad_tunnel; /* malformed tunnel options */
- u_long mrts_cant_tunnel; /* no room for tunnel options */
- u_long mrts_wrong_if; /* arrived on wrong interface */
- u_long mrts_upq_ovflw; /* upcall Q overflow */
- u_long mrts_cache_cleanups; /* # entries with no upcalls */
- u_long mrts_drop_sel; /* pkts dropped selectively */
- u_long mrts_q_overflow; /* pkts dropped - Q overflow */
- u_long mrts_pkt2large; /* pkts dropped - size > BKT SIZE */
- u_long mrts_upq_sockfull; /* upcalls dropped - socket full */
-};
-
-/*
- * Argument structure used by mrouted to get src-grp pkt counts
- */
-struct sioc_sg_req {
- struct in_addr src;
- struct in_addr grp;
- u_long pktcnt;
- u_long bytecnt;
- u_long wrong_if;
-};
-
-/*
- * Argument structure used by mrouted to get vif pkt counts
- */
-struct sioc_vif_req {
- vifi_t vifi; /* vif number */
- u_long icount; /* Input packet count on vif */
- u_long ocount; /* Output packet count on vif */
- u_long ibytes; /* Input byte count on vif */
- u_long obytes; /* Output byte count on vif */
-};
-
-
-/*
- * The kernel's virtual-interface structure.
- */
-struct vif {
- u_char v_flags; /* VIFF_ flags defined above */
- u_char v_threshold; /* min ttl required to forward on vif*/
- u_int v_rate_limit; /* max rate */
- struct tbf *v_tbf; /* token bucket structure at intf. */
- struct in_addr v_lcl_addr; /* local interface address */
- struct in_addr v_rmt_addr; /* remote address (tunnels only) */
- struct ifnet *v_ifp; /* pointer to interface */
- u_long v_pkt_in; /* # pkts in on interface */
- u_long v_pkt_out; /* # pkts out on interface */
- u_long v_bytes_in; /* # bytes in on interface */
- u_long v_bytes_out; /* # bytes out on interface */
- struct route v_route; /* cached route if this is a tunnel */
- u_int v_rsvp_on; /* RSVP listening on this vif */
- struct socket *v_rsvpd; /* RSVP daemon socket */
-};
-
-/*
- * The kernel's multicast forwarding cache entry structure
- * (A field for the type of service (mfc_tos) is to be added
- * at a future point)
- */
-struct mfc {
- struct in_addr mfc_origin; /* IP origin of mcasts */
- struct in_addr mfc_mcastgrp; /* multicast group associated*/
- vifi_t mfc_parent; /* incoming vif */
- u_char mfc_ttls[MAXVIFS]; /* forwarding ttls on vifs */
- u_long mfc_pkt_cnt; /* pkt count for src-grp */
- u_long mfc_byte_cnt; /* byte count for src-grp */
- u_long mfc_wrong_if; /* wrong if for src-grp */
- int mfc_expire; /* time to clean entry up */
- struct timeval mfc_last_assert; /* last time I sent an assert*/
- struct rtdetq *mfc_stall; /* q of packets awaiting mfc */
- struct mfc *mfc_next; /* next mfc entry */
-};
-
-/*
- * Struct used to communicate from kernel to multicast router
- * note the convenient similarity to an IP packet
- */
-struct igmpmsg {
- u_long unused1;
- u_long unused2;
- u_char im_msgtype; /* what type of message */
-#define IGMPMSG_NOCACHE 1
-#define IGMPMSG_WRONGVIF 2
- u_char im_mbz; /* must be zero */
- u_char im_vif; /* vif rec'd on */
- u_char unused3;
- struct in_addr im_src, im_dst;
-};
-
-/*
- * Argument structure used for pkt info. while upcall is made
- */
-struct rtdetq {
- struct mbuf *m; /* A copy of the packet */
- struct ifnet *ifp; /* Interface pkt came in on */
- vifi_t xmt_vif; /* Saved copy of imo_multicast_vif */
-#ifdef UPCALL_TIMING
- struct timeval t; /* Timestamp */
-#endif /* UPCALL_TIMING */
- struct rtdetq *next; /* Next in list of packets */
-};
-
-#define MFCTBLSIZ 256
-#if (MFCTBLSIZ & (MFCTBLSIZ - 1)) == 0 /* from sys:route.h */
-#define MFCHASHMOD(h) ((h) & (MFCTBLSIZ - 1))
-#else
-#define MFCHASHMOD(h) ((h) % MFCTBLSIZ)
-#endif
-
-#define MAX_UPQ 4 /* max. no of pkts in upcall Q */
-
-/*
- * Token Bucket filter code
- */
-#define MAX_BKT_SIZE 10000 /* 10K bytes size */
-#define MAXQSIZE 10 /* max # of pkts in queue */
-
-/*
- * the token bucket filter at each vif
- */
-struct tbf
-{
- struct timeval tbf_last_pkt_t; /* arr. time of last pkt */
- u_long tbf_n_tok; /* no of tokens in bucket */
- u_long tbf_q_len; /* length of queue at this vif */
- u_long tbf_max_q_len; /* max. queue length */
- struct mbuf *tbf_q; /* Packet queue */
- struct mbuf *tbf_t; /* tail-insertion pointer */
-};
-
-#ifdef _KERNEL
-
-struct sockopt;
-
-extern int (*ip_mrouter_set)(struct socket *, struct sockopt *);
-extern int (*ip_mrouter_get)(struct socket *, struct sockopt *);
-extern int (*ip_mrouter_done)(void);
-extern int (*mrt_ioctl)(int, caddr_t);
-
-#endif /* _KERNEL */
-
-#endif /* _NETINET_IP_MROUTE_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet/ip_var.h b/newlib/libc/sys/linux/include/netinet/ip_var.h
deleted file mode 100644
index 8ee8602a8..000000000
--- a/newlib/libc/sys/linux/include/netinet/ip_var.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_var.h 8.2 (Berkeley) 1/9/95
- * $FreeBSD: src/sys/netinet/ip_var.h,v 1.60 2002/03/19 21:25:46 alfred Exp $
- */
-
-#ifndef _NETINET_IP_VAR_H_
-#define _NETINET_IP_VAR_H_
-
-#include <sys/queue.h>
-
-/*
- * Overlay for ip header used by other protocols (tcp, udp).
- */
-struct ipovly {
- u_char ih_x1[9]; /* (unused) */
- u_char ih_pr; /* protocol */
- u_short ih_len; /* protocol length */
- struct in_addr ih_src; /* source internet address */
- struct in_addr ih_dst; /* destination internet address */
-};
-
-/*
- * Ip reassembly queue structure. Each fragment
- * being reassembled is attached to one of these structures.
- * They are timed out after ipq_ttl drops to 0, and may also
- * be reclaimed if memory becomes tight.
- */
-struct ipq {
- TAILQ_ENTRY(ipq) ipq_list; /* to other reass headers */
- u_char ipq_ttl; /* time for reass q to live */
- u_char ipq_p; /* protocol of this fragment */
- u_short ipq_id; /* sequence id for reassembly */
- struct mbuf *ipq_frags; /* to ip headers of fragments */
- struct in_addr ipq_src,ipq_dst;
-#ifdef IPDIVERT
- u_int32_t ipq_div_info; /* ipfw divert port & flags */
- u_int16_t ipq_div_cookie; /* ipfw divert cookie */
-#endif
-};
-
-/*
- * Structure stored in mbuf in inpcb.ip_options
- * and passed to ip_output when ip options are in use.
- * The actual length of the options (including ipopt_dst)
- * is in m_len.
- */
-#define MAX_IPOPTLEN 40
-
-struct ipoption {
- struct in_addr ipopt_dst; /* first-hop dst if source routed */
- char ipopt_list[MAX_IPOPTLEN]; /* options proper */
-};
-
-/*
- * Structure attached to inpcb.ip_moptions and
- * passed to ip_output when IP multicast options are in use.
- */
-struct ip_moptions {
- struct ifnet *imo_multicast_ifp; /* ifp for outgoing multicasts */
- struct in_addr imo_multicast_addr; /* ifindex/addr on MULTICAST_IF */
- u_char imo_multicast_ttl; /* TTL for outgoing multicasts */
- u_char imo_multicast_loop; /* 1 => hear sends if a member */
- u_short imo_num_memberships; /* no. memberships this socket */
- struct in_multi *imo_membership[IP_MAX_MEMBERSHIPS];
- u_long imo_multicast_vif; /* vif num outgoing multicasts */
-};
-
-struct ipstat {
- u_long ips_total; /* total packets received */
- u_long ips_badsum; /* checksum bad */
- u_long ips_tooshort; /* packet too short */
- u_long ips_toosmall; /* not enough data */
- u_long ips_badhlen; /* ip header length < data size */
- u_long ips_badlen; /* ip length < ip header length */
- u_long ips_fragments; /* fragments received */
- u_long ips_fragdropped; /* frags dropped (dups, out of space) */
- u_long ips_fragtimeout; /* fragments timed out */
- u_long ips_forward; /* packets forwarded */
- u_long ips_fastforward; /* packets fast forwarded */
- u_long ips_cantforward; /* packets rcvd for unreachable dest */
- u_long ips_redirectsent; /* packets forwarded on same net */
- u_long ips_noproto; /* unknown or unsupported protocol */
- u_long ips_delivered; /* datagrams delivered to upper level*/
- u_long ips_localout; /* total ip packets generated here */
- u_long ips_odropped; /* lost packets due to nobufs, etc. */
- u_long ips_reassembled; /* total packets reassembled ok */
- u_long ips_fragmented; /* datagrams successfully fragmented */
- u_long ips_ofragments; /* output fragments created */
- u_long ips_cantfrag; /* don't fragment flag was set, etc. */
- u_long ips_badoptions; /* error in option processing */
- u_long ips_noroute; /* packets discarded due to no route */
- u_long ips_badvers; /* ip version != 4 */
- u_long ips_rawout; /* total raw ip packets generated */
- u_long ips_toolong; /* ip length > max ip packet size */
- u_long ips_notmember; /* multicasts for unregistered grps */
- u_long ips_nogif; /* no match gif found */
- u_long ips_badaddr; /* invalid address on header */
-};
-
-#ifdef _KERNEL
-
-/* flags passed to ip_output as last parameter */
-#define IP_FORWARDING 0x1 /* most of ip header exists */
-#define IP_RAWOUTPUT 0x2 /* raw ip header exists */
-#define IP_ROUTETOIF SO_DONTROUTE /* bypass routing tables */
-#define IP_ALLOWBROADCAST SO_BROADCAST /* can send broadcast packets */
-
-struct ip;
-struct inpcb;
-struct route;
-struct sockopt;
-
-extern struct ipstat ipstat;
-#ifndef RANDOM_IP_ID
-extern u_short ip_id; /* ip packet ctr, for ids */
-#endif
-extern int ip_defttl; /* default IP ttl */
-extern int ipforwarding; /* ip forwarding */
-extern struct route ipforward_rt; /* ip forwarding cached route */
-extern u_char ip_protox[];
-extern struct socket *ip_rsvpd; /* reservation protocol daemon */
-extern struct socket *ip_mrouter; /* multicast routing daemon */
-extern int (*legal_vif_num)(int);
-extern u_long (*ip_mcast_src)(int);
-extern int rsvp_on;
-extern struct pr_usrreqs rip_usrreqs;
-
-int ip_ctloutput(struct socket *, struct sockopt *sopt);
-void ip_drain(void);
-void ip_freemoptions(struct ip_moptions *);
-void ip_init(void);
-extern int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *,
- struct ip_moptions *);
-int ip_output(struct mbuf *,
- struct mbuf *, struct route *, int, struct ip_moptions *);
-struct in_ifaddr *
- ip_rtaddr(struct in_addr, struct route *);
-void ip_savecontrol(struct inpcb *, struct mbuf **, struct ip *,
- struct mbuf *);
-void ip_slowtimo(void);
-struct mbuf *
- ip_srcroute(void);
-void ip_stripoptions(struct mbuf *, struct mbuf *);
-#ifdef RANDOM_IP_ID
-u_int16_t
- ip_randomid(void);
-#endif
-int rip_ctloutput(struct socket *, struct sockopt *);
-void rip_ctlinput(int, struct sockaddr *, void *);
-void rip_init(void);
-void rip_input(struct mbuf *, int);
-int rip_output(struct mbuf *, struct socket *, u_long);
-void ipip_input(struct mbuf *, int);
-void rsvp_input(struct mbuf *, int);
-int ip_rsvp_init(struct socket *);
-int ip_rsvp_done(void);
-int ip_rsvp_vif_init(struct socket *, struct sockopt *);
-int ip_rsvp_vif_done(struct socket *, struct sockopt *);
-void ip_rsvp_force_done(struct socket *);
-
-#ifdef IPDIVERT
-void div_init(void);
-void div_input(struct mbuf *, int);
-void divert_packet(struct mbuf *, int, int);
-extern struct pr_usrreqs div_usrreqs;
-extern u_int16_t ip_divert_cookie;
-#endif
-
-extern struct sockaddr_in *ip_fw_fwd_addr;
-
-void in_delayed_cksum(struct mbuf *m);
-
-#endif /* _KERNEL */
-
-#endif /* !_NETINET_IP_VAR_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet/ipprotosw.h b/newlib/libc/sys/linux/include/netinet/ipprotosw.h
deleted file mode 100644
index 0367ca2ed..000000000
--- a/newlib/libc/sys/linux/include/netinet/ipprotosw.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*-
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)protosw.h 8.1 (Berkeley) 6/2/93
- * $FreeBSD: src/sys/netinet/ipprotosw.h,v 1.4 2001/09/12 08:37:54 julian Exp $
- */
-
-#ifndef _NETINET_IPPROTOSW_H_
-#define _NETINET_IPPROTOSW_H_
-
-/*
- * For pfil_head structure.
- */
-#include <net/pfil.h>
-
-/* Forward declare these structures referenced from prototypes below. */
-struct mbuf;
-struct sockaddr;
-struct socket;
-struct sockopt;
-
-struct ipprotosw {
- short pr_type; /* socket type used for */
- struct domain *pr_domain; /* domain protocol a member of */
- short pr_protocol; /* protocol number */
- short pr_flags; /* see below */
-/* protocol-protocol hooks */
- pr_in_input_t *pr_input; /* input to protocol (from below) */
- pr_output_t *pr_output; /* output to protocol (from above) */
- pr_ctlinput_t *pr_ctlinput; /* control input (from below) */
- pr_ctloutput_t *pr_ctloutput; /* control output (from above) */
-/* user-protocol hook */
- void *pr_ousrreq;
-/* utility hooks */
- pr_init_t *pr_init;
- pr_fasttimo_t *pr_fasttimo; /* fast timeout (200ms) */
- pr_slowtimo_t *pr_slowtimo; /* slow timeout (500ms) */
- pr_drain_t *pr_drain; /* flush any excess space possible */
-
- struct pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */
- struct pfil_head pr_pfh;
-};
-
-#endif /* !_NETINET_IPPROTOSW_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet/tcp.h b/newlib/libc/sys/linux/include/netinet/tcp.h
deleted file mode 100644
index a6154e0ee..000000000
--- a/newlib/libc/sys/linux/include/netinet/tcp.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/tcp.h,v 1.16 2001/01/09 18:26:17 rwatson Exp $
- */
-
-#ifndef _NETINET_TCP_H_
-#define _NETINET_TCP_H_
-
-typedef u_int32_t tcp_seq;
-typedef u_int32_t tcp_cc; /* connection count per rfc1644 */
-
-#define tcp6_seq tcp_seq /* for KAME src sync over BSD*'s */
-#define tcp6hdr tcphdr /* for KAME src sync over BSD*'s */
-
-/*
- * TCP header.
- * Per RFC 793, September, 1981.
- */
-struct tcphdr {
- u_short th_sport; /* source port */
- u_short th_dport; /* destination port */
- tcp_seq th_seq; /* sequence number */
- tcp_seq th_ack; /* acknowledgement number */
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_int th_x2:4, /* (unused) */
- th_off:4; /* data offset */
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_int th_off:4, /* data offset */
- th_x2:4; /* (unused) */
-#endif
- u_char th_flags;
-#define TH_FIN 0x01
-#define TH_SYN 0x02
-#define TH_RST 0x04
-#define TH_PUSH 0x08
-#define TH_ACK 0x10
-#define TH_URG 0x20
-#define TH_ECE 0x40
-#define TH_CWR 0x80
-#define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG|TH_ECE|TH_CWR)
-
- u_short th_win; /* window */
- u_short th_sum; /* checksum */
- u_short th_urp; /* urgent pointer */
-};
-
-#define TCPOPT_EOL 0
-#define TCPOPT_NOP 1
-#define TCPOPT_MAXSEG 2
-#define TCPOLEN_MAXSEG 4
-#define TCPOPT_WINDOW 3
-#define TCPOLEN_WINDOW 3
-#define TCPOPT_SACK_PERMITTED 4 /* Experimental */
-#define TCPOLEN_SACK_PERMITTED 2
-#define TCPOPT_SACK 5 /* Experimental */
-#define TCPOPT_TIMESTAMP 8
-#define TCPOLEN_TIMESTAMP 10
-#define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */
-#define TCPOPT_TSTAMP_HDR \
- (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
-
-#define TCPOPT_CC 11 /* CC options: RFC-1644 */
-#define TCPOPT_CCNEW 12
-#define TCPOPT_CCECHO 13
-#define TCPOLEN_CC 6
-#define TCPOLEN_CC_APPA (TCPOLEN_CC+2)
-#define TCPOPT_CC_HDR(ccopt) \
- (TCPOPT_NOP<<24|TCPOPT_NOP<<16|(ccopt)<<8|TCPOLEN_CC)
-
-/*
- * Default maximum segment size for TCP.
- * With an IP MSS of 576, this is 536,
- * but 512 is probably more convenient.
- * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)).
- */
-#define TCP_MSS 512
-
-/*
- * Default maximum segment size for TCP6.
- * With an IP6 MSS of 1280, this is 1220,
- * but 1024 is probably more convenient. (xxx kazu in doubt)
- * This should be defined as MIN(1024, IP6_MSS - sizeof (struct tcpip6hdr))
- */
-#define TCP6_MSS 1024
-
-#define TCP_MAXWIN 65535 /* largest value for (unscaled) window */
-#define TTCP_CLIENT_SND_WND 4096 /* dflt send window for T/TCP client */
-
-#define TCP_MAX_WINSHIFT 14 /* maximum window shift */
-
-#define TCP_MAXBURST 4 /* maximum segments in a burst */
-
-#define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */
-#define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr))
- /* max space left for options */
-
-/*
- * User-settable options (used with setsockopt).
- */
-#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */
-#define TCP_MAXSEG 0x02 /* set maximum segment size */
-#define TCP_NOPUSH 0x04 /* don't push last block of write */
-#define TCP_NOOPT 0x08 /* don't use TCP options */
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netinet/tcp_debug.h b/newlib/libc/sys/linux/include/netinet/tcp_debug.h
deleted file mode 100644
index 3b27d09ac..000000000
--- a/newlib/libc/sys/linux/include/netinet/tcp_debug.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_debug.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/tcp_debug.h,v 1.11 2000/01/29 11:49:05 shin Exp $
- */
-
-#ifndef _NETINET_TCP_DEBUG_H_
-#define _NETINET_TCP_DEBUG_H_
-
-struct tcp_debug {
- n_time td_time;
- short td_act;
- short td_ostate;
- caddr_t td_tcb;
- int td_family;
- /*
- * Co-existense of td_ti and td_ti6 below is ugly, but it is necessary
- * to achieve backword compatibility to some extent.
- */
- struct tcpiphdr td_ti;
- struct {
-#if !defined(_KERNEL) && defined(INET6)
- struct ip6_hdr ip6;
-#else
- u_char ip6buf[40]; /* sizeof(struct ip6_hdr) */
-#endif
- struct tcphdr th;
- } td_ti6;
-#define td_ip6buf td_ti6.ip6buf
- short td_req;
- struct tcpcb td_cb;
-};
-
-#define TA_INPUT 0
-#define TA_OUTPUT 1
-#define TA_USER 2
-#define TA_RESPOND 3
-#define TA_DROP 4
-
-#ifdef TANAMES
-static char *tanames[] =
- { "input", "output", "user", "respond", "drop" };
-#endif
-
-#define TCP_NDEBUG 100
-
-#ifndef _KERNEL
-/* XXX common variables for broken applications. */
-struct tcp_debug tcp_debug[TCP_NDEBUG];
-int tcp_debx;
-#endif
-
-#endif /* !_NETINET_TCP_DEBUG_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet/tcp_fsm.h b/newlib/libc/sys/linux/include/netinet/tcp_fsm.h
deleted file mode 100644
index a45cbc76e..000000000
--- a/newlib/libc/sys/linux/include/netinet/tcp_fsm.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_fsm.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/tcp_fsm.h,v 1.15 2002/02/03 11:57:32 markm Exp $
- */
-
-#ifndef _NETINET_TCP_FSM_H_
-#define _NETINET_TCP_FSM_H_
-
-/*
- * TCP FSM state definitions.
- * Per RFC793, September, 1981.
- */
-
-#define TCP_NSTATES 11
-
-#define TCPS_CLOSED 0 /* closed */
-#define TCPS_LISTEN 1 /* listening for connection */
-#define TCPS_SYN_SENT 2 /* active, have sent syn */
-#define TCPS_SYN_RECEIVED 3 /* have send and received syn */
-/* states < TCPS_ESTABLISHED are those where connections not established */
-#define TCPS_ESTABLISHED 4 /* established */
-#define TCPS_CLOSE_WAIT 5 /* rcvd fin, waiting for close */
-/* states > TCPS_CLOSE_WAIT are those where user has closed */
-#define TCPS_FIN_WAIT_1 6 /* have closed, sent fin */
-#define TCPS_CLOSING 7 /* closed xchd FIN; await FIN ACK */
-#define TCPS_LAST_ACK 8 /* had fin and close; await FIN ACK */
-/* states > TCPS_CLOSE_WAIT && < TCPS_FIN_WAIT_2 await ACK of FIN */
-#define TCPS_FIN_WAIT_2 9 /* have closed, fin is acked */
-#define TCPS_TIME_WAIT 10 /* in 2*msl quiet wait after close */
-
-/* for KAME src sync over BSD*'s */
-#define TCP6_NSTATES TCP_NSTATES
-#define TCP6S_CLOSED TCPS_CLOSED
-#define TCP6S_LISTEN TCPS_LISTEN
-#define TCP6S_SYN_SENT TCPS_SYN_SENT
-#define TCP6S_SYN_RECEIVED TCPS_SYN_RECEIVED
-#define TCP6S_ESTABLISHED TCPS_ESTABLISHED
-#define TCP6S_CLOSE_WAIT TCPS_CLOSE_WAIT
-#define TCP6S_FIN_WAIT_1 TCPS_FIN_WAIT_1
-#define TCP6S_CLOSING TCPS_CLOSING
-#define TCP6S_LAST_ACK TCPS_LAST_ACK
-#define TCP6S_FIN_WAIT_2 TCPS_FIN_WAIT_2
-#define TCP6S_TIME_WAIT TCPS_TIME_WAIT
-
-#define TCPS_HAVERCVDSYN(s) ((s) >= TCPS_SYN_RECEIVED)
-#define TCPS_HAVEESTABLISHED(s) ((s) >= TCPS_ESTABLISHED)
-#define TCPS_HAVERCVDFIN(s) ((s) >= TCPS_TIME_WAIT)
-
-#ifdef TCPOUTFLAGS
-/*
- * Flags used when sending segments in tcp_output.
- * Basic flags (TH_RST,TH_ACK,TH_SYN,TH_FIN) are totally
- * determined by state, with the proviso that TH_FIN is sent only
- * if all data queued for output is included in the segment.
- */
-static u_char tcp_outflags[TCP_NSTATES] = {
- TH_RST|TH_ACK, /* 0, CLOSED */
- 0, /* 1, LISTEN */
- TH_SYN, /* 2, SYN_SENT */
- TH_SYN|TH_ACK, /* 3, SYN_RECEIVED */
- TH_ACK, /* 4, ESTABLISHED */
- TH_ACK, /* 5, CLOSE_WAIT */
- TH_FIN|TH_ACK, /* 6, FIN_WAIT_1 */
- TH_FIN|TH_ACK, /* 7, CLOSING */
- TH_FIN|TH_ACK, /* 8, LAST_ACK */
- TH_ACK, /* 9, FIN_WAIT_2 */
- TH_ACK, /* 10, TIME_WAIT */
-};
-#endif
-
-#ifdef KPROF
-int tcp_acounts[TCP_NSTATES][PRU_NREQ];
-#endif
-
-#ifdef TCPSTATES
-const char *tcpstates[] = {
- "CLOSED", "LISTEN", "SYN_SENT", "SYN_RCVD",
- "ESTABLISHED", "CLOSE_WAIT", "FIN_WAIT_1", "CLOSING",
- "LAST_ACK", "FIN_WAIT_2", "TIME_WAIT",
-};
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netinet/tcp_seq.h b/newlib/libc/sys/linux/include/netinet/tcp_seq.h
deleted file mode 100644
index bb15401ec..000000000
--- a/newlib/libc/sys/linux/include/netinet/tcp_seq.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_seq.h 8.3 (Berkeley) 6/21/95
- * $FreeBSD: src/sys/netinet/tcp_seq.h,v 1.18 2001/11/21 18:45:51 jlemon Exp $
- */
-
-#ifndef _NETINET_TCP_SEQ_H_
-#define _NETINET_TCP_SEQ_H_
-/*
- * TCP sequence numbers are 32 bit integers operated
- * on with modular arithmetic. These macros can be
- * used to compare such integers.
- */
-#define SEQ_LT(a,b) ((int)((a)-(b)) < 0)
-#define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0)
-#define SEQ_GT(a,b) ((int)((a)-(b)) > 0)
-#define SEQ_GEQ(a,b) ((int)((a)-(b)) >= 0)
-
-/* for modulo comparisons of timestamps */
-#define TSTMP_LT(a,b) ((int)((a)-(b)) < 0)
-#define TSTMP_GEQ(a,b) ((int)((a)-(b)) >= 0)
-
-/*
- * TCP connection counts are 32 bit integers operated
- * on with modular arithmetic. These macros can be
- * used to compare such integers.
- */
-#define CC_LT(a,b) ((int)((a)-(b)) < 0)
-#define CC_LEQ(a,b) ((int)((a)-(b)) <= 0)
-#define CC_GT(a,b) ((int)((a)-(b)) > 0)
-#define CC_GEQ(a,b) ((int)((a)-(b)) >= 0)
-
-/* Macro to increment a CC: skip 0 which has a special meaning */
-#define CC_INC(c) (++(c) == 0 ? ++(c) : (c))
-
-/*
- * Macros to initialize tcp sequence numbers for
- * send and receive from initial send and receive
- * sequence numbers.
- */
-#define tcp_rcvseqinit(tp) \
- (tp)->rcv_adv = (tp)->rcv_nxt = (tp)->irs + 1
-
-#define tcp_sendseqinit(tp) \
- (tp)->snd_una = (tp)->snd_nxt = (tp)->snd_max = (tp)->snd_up = \
- (tp)->snd_recover = (tp)->iss
-
-#define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * hz)
- /* timestamp wrap-around time */
-
-#ifdef _KERNEL
-extern tcp_cc tcp_ccgen; /* global connection count */
-#endif /* _KERNEL */
-#endif /* _NETINET_TCP_SEQ_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet/tcp_timer.h b/newlib/libc/sys/linux/include/netinet/tcp_timer.h
deleted file mode 100644
index 1af128148..000000000
--- a/newlib/libc/sys/linux/include/netinet/tcp_timer.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_timer.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/tcp_timer.h,v 1.19 2002/03/19 21:25:46 alfred Exp $
- */
-
-#ifndef _NETINET_TCP_TIMER_H_
-#define _NETINET_TCP_TIMER_H_
-
-/*
- * The TCPT_REXMT timer is used to force retransmissions.
- * The TCP has the TCPT_REXMT timer set whenever segments
- * have been sent for which ACKs are expected but not yet
- * received. If an ACK is received which advances tp->snd_una,
- * then the retransmit timer is cleared (if there are no more
- * outstanding segments) or reset to the base value (if there
- * are more ACKs expected). Whenever the retransmit timer goes off,
- * we retransmit one unacknowledged segment, and do a backoff
- * on the retransmit timer.
- *
- * The TCPT_PERSIST timer is used to keep window size information
- * flowing even if the window goes shut. If all previous transmissions
- * have been acknowledged (so that there are no retransmissions in progress),
- * and the window is too small to bother sending anything, then we start
- * the TCPT_PERSIST timer. When it expires, if the window is nonzero,
- * we go to transmit state. Otherwise, at intervals send a single byte
- * into the peer's window to force him to update our window information.
- * We do this at most as often as TCPT_PERSMIN time intervals,
- * but no more frequently than the current estimate of round-trip
- * packet time. The TCPT_PERSIST timer is cleared whenever we receive
- * a window update from the peer.
- *
- * The TCPT_KEEP timer is used to keep connections alive. If an
- * connection is idle (no segments received) for TCPTV_KEEP_INIT amount of time,
- * but not yet established, then we drop the connection. Once the connection
- * is established, if the connection is idle for TCPTV_KEEP_IDLE time
- * (and keepalives have been enabled on the socket), we begin to probe
- * the connection. We force the peer to send us a segment by sending:
- * <SEQ=SND.UNA-1><ACK=RCV.NXT><CTL=ACK>
- * This segment is (deliberately) outside the window, and should elicit
- * an ack segment in response from the peer. If, despite the TCPT_KEEP
- * initiated segments we cannot elicit a response from a peer in TCPT_MAXIDLE
- * amount of time probing, then we drop the connection.
- */
-
-/*
- * Time constants.
- */
-#define TCPTV_MSL ( 30*hz) /* max seg lifetime (hah!) */
-#define TCPTV_SRTTBASE 0 /* base roundtrip time;
- if 0, no idea yet */
-#define TCPTV_RTOBASE ( 3*hz) /* assumed RTO if no info */
-#define TCPTV_SRTTDFLT ( 3*hz) /* assumed RTT if no info */
-
-#define TCPTV_PERSMIN ( 5*hz) /* retransmit persistence */
-#define TCPTV_PERSMAX ( 60*hz) /* maximum persist interval */
-
-#define TCPTV_KEEP_INIT ( 75*hz) /* initial connect keepalive */
-#define TCPTV_KEEP_IDLE (120*60*hz) /* dflt time before probing */
-#define TCPTV_KEEPINTVL ( 75*hz) /* default probe interval */
-#define TCPTV_KEEPCNT 8 /* max probes before drop */
-
-#define TCPTV_MIN ( 1*hz) /* minimum allowable value */
-#define TCPTV_REXMTMAX ( 64*hz) /* max allowable REXMT value */
-
-#define TCPTV_TWTRUNC 8 /* RTO factor to truncate TW */
-
-#define TCP_LINGERTIME 120 /* linger at most 2 minutes */
-
-#define TCP_MAXRXTSHIFT 12 /* maximum retransmits */
-
-#define TCPTV_DELACK (hz / PR_FASTHZ / 2) /* 100ms timeout */
-
-#ifdef TCPTIMERS
-static char *tcptimers[] =
- { "REXMT", "PERSIST", "KEEP", "2MSL" };
-#endif
-
-/*
- * Force a time value to be in a certain range.
- */
-#define TCPT_RANGESET(tv, value, tvmin, tvmax) do { \
- (tv) = (value); \
- if ((u_long)(tv) < (u_long)(tvmin)) \
- (tv) = (tvmin); \
- else if ((u_long)(tv) > (u_long)(tvmax)) \
- (tv) = (tvmax); \
-} while(0)
-
-#ifdef _KERNEL
-extern int tcp_keepinit; /* time to establish connection */
-extern int tcp_keepidle; /* time before keepalive probes begin */
-extern int tcp_keepintvl; /* time between keepalive probes */
-extern int tcp_maxidle; /* time to drop after starting probes */
-extern int tcp_delacktime; /* time before sending a delayed ACK */
-extern int tcp_maxpersistidle;
-extern int tcp_msl;
-extern int tcp_ttl; /* time to live for TCP segs */
-extern int tcp_backoff[];
-
-void tcp_timer_2msl(void *xtp);
-void tcp_timer_keep(void *xtp);
-void tcp_timer_persist(void *xtp);
-void tcp_timer_rexmt(void *xtp);
-void tcp_timer_delack(void *xtp);
-
-#endif /* _KERNEL */
-
-#endif /* !_NETINET_TCP_TIMER_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet/tcp_var.h b/newlib/libc/sys/linux/include/netinet/tcp_var.h
deleted file mode 100644
index adb5208e9..000000000
--- a/newlib/libc/sys/linux/include/netinet/tcp_var.h
+++ /dev/null
@@ -1,486 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993, 1994, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_var.h 8.4 (Berkeley) 5/24/95
- * $FreeBSD: src/sys/netinet/tcp_var.h,v 1.76 2002/03/19 21:25:46 alfred Exp $
- */
-
-#ifndef _NETINET_TCP_VAR_H_
-#define _NETINET_TCP_VAR_H_
-
-#include <netinet/in_pcb.h> /* needed for in_conninfo, inp_gen_t */
-
-/*
- * Kernel variables for tcp.
- */
-extern int tcp_do_rfc1323;
-extern int tcp_do_rfc1644;
-
-/* TCP segment queue entry */
-struct tseg_qent {
- LIST_ENTRY(tseg_qent) tqe_q;
- int tqe_len; /* TCP segment data length */
- struct tcphdr *tqe_th; /* a pointer to tcp header */
- struct mbuf *tqe_m; /* mbuf contains packet */
-};
-LIST_HEAD(tsegqe_head, tseg_qent);
-#ifdef MALLOC_DECLARE
-MALLOC_DECLARE(M_TSEGQ);
-#endif
-
-struct tcptemp {
- u_char tt_ipgen[40]; /* the size must be of max ip header, now IPv6 */
- struct tcphdr tt_t;
-};
-
-#define tcp6cb tcpcb /* for KAME src sync over BSD*'s */
-
-/*
- * Tcp control block, one per tcp; fields:
- * Organized for 16 byte cacheline efficiency.
- */
-struct tcpcb {
- struct tsegqe_head t_segq;
- int t_dupacks; /* consecutive dup acks recd */
- struct tcptemp *unused; /* unused */
-
- struct callout *tt_rexmt; /* retransmit timer */
- struct callout *tt_persist; /* retransmit persistence */
- struct callout *tt_keep; /* keepalive */
- struct callout *tt_2msl; /* 2*msl TIME_WAIT timer */
- struct callout *tt_delack; /* delayed ACK timer */
-
- struct inpcb *t_inpcb; /* back pointer to internet pcb */
- int t_state; /* state of this connection */
- u_int t_flags;
-#define TF_ACKNOW 0x00001 /* ack peer immediately */
-#define TF_DELACK 0x00002 /* ack, but try to delay it */
-#define TF_NODELAY 0x00004 /* don't delay packets to coalesce */
-#define TF_NOOPT 0x00008 /* don't use tcp options */
-#define TF_SENTFIN 0x00010 /* have sent FIN */
-#define TF_REQ_SCALE 0x00020 /* have/will request window scaling */
-#define TF_RCVD_SCALE 0x00040 /* other side has requested scaling */
-#define TF_REQ_TSTMP 0x00080 /* have/will request timestamps */
-#define TF_RCVD_TSTMP 0x00100 /* a timestamp was received in SYN */
-#define TF_SACK_PERMIT 0x00200 /* other side said I could SACK */
-#define TF_NEEDSYN 0x00400 /* send SYN (implicit state) */
-#define TF_NEEDFIN 0x00800 /* send FIN (implicit state) */
-#define TF_NOPUSH 0x01000 /* don't push */
-#define TF_REQ_CC 0x02000 /* have/will request CC */
-#define TF_RCVD_CC 0x04000 /* a CC was received in SYN */
-#define TF_SENDCCNEW 0x08000 /* send CCnew instead of CC in SYN */
-#define TF_MORETOCOME 0x10000 /* More data to be appended to sock */
-#define TF_LQ_OVERFLOW 0x20000 /* listen queue overflow */
-#define TF_LASTIDLE 0x40000 /* connection was previously idle */
-#define TF_RXWIN0SENT 0x80000 /* sent a receiver win 0 in response */
- int t_force; /* 1 if forcing out a byte */
-
- tcp_seq snd_una; /* send unacknowledged */
- tcp_seq snd_max; /* highest sequence number sent;
- * used to recognize retransmits
- */
- tcp_seq snd_nxt; /* send next */
- tcp_seq snd_up; /* send urgent pointer */
-
- tcp_seq snd_wl1; /* window update seg seq number */
- tcp_seq snd_wl2; /* window update seg ack number */
- tcp_seq iss; /* initial send sequence number */
- tcp_seq irs; /* initial receive sequence number */
-
- tcp_seq rcv_nxt; /* receive next */
- tcp_seq rcv_adv; /* advertised window */
- u_long rcv_wnd; /* receive window */
- tcp_seq rcv_up; /* receive urgent pointer */
-
- u_long snd_wnd; /* send window */
- u_long snd_cwnd; /* congestion-controlled window */
- u_long snd_ssthresh; /* snd_cwnd size threshold for
- * for slow start exponential to
- * linear switch
- */
- tcp_seq snd_recover; /* for use in fast recovery */
-
- u_int t_maxopd; /* mss plus options */
-
- u_long t_rcvtime; /* inactivity time */
- u_long t_starttime; /* time connection was established */
- int t_rtttime; /* round trip time */
- tcp_seq t_rtseq; /* sequence number being timed */
-
- int t_rxtcur; /* current retransmit value (ticks) */
- u_int t_maxseg; /* maximum segment size */
- int t_srtt; /* smoothed round-trip time */
- int t_rttvar; /* variance in round-trip time */
-
- int t_rxtshift; /* log(2) of rexmt exp. backoff */
- u_int t_rttmin; /* minimum rtt allowed */
- u_long t_rttupdated; /* number of times rtt sampled */
- u_long max_sndwnd; /* largest window peer has offered */
-
- int t_softerror; /* possible error not yet reported */
-/* out-of-band data */
- char t_oobflags; /* have some */
- char t_iobc; /* input character */
-#define TCPOOB_HAVEDATA 0x01
-#define TCPOOB_HADDATA 0x02
-/* RFC 1323 variables */
- u_char snd_scale; /* window scaling for send window */
- u_char rcv_scale; /* window scaling for recv window */
- u_char request_r_scale; /* pending window scaling */
- u_char requested_s_scale;
- u_long ts_recent; /* timestamp echo data */
-
- u_long ts_recent_age; /* when last updated */
- tcp_seq last_ack_sent;
-/* RFC 1644 variables */
- tcp_cc cc_send; /* send connection count */
- tcp_cc cc_recv; /* receive connection count */
-/* experimental */
- u_long snd_cwnd_prev; /* cwnd prior to retransmit */
- u_long snd_ssthresh_prev; /* ssthresh prior to retransmit */
- u_long t_badrxtwin; /* window for retransmit recovery */
-};
-
-/*
- * Structure to hold TCP options that are only used during segment
- * processing (in tcp_input), but not held in the tcpcb.
- * It's basically used to reduce the number of parameters
- * to tcp_dooptions.
- */
-struct tcpopt {
- u_long to_flags; /* which options are present */
-#define TOF_TS 0x0001 /* timestamp */
-#define TOF_CC 0x0002 /* CC and CCnew are exclusive */
-#define TOF_CCNEW 0x0004
-#define TOF_CCECHO 0x0008
-#define TOF_MSS 0x0010
-#define TOF_SCALE 0x0020
- u_int32_t to_tsval;
- u_int32_t to_tsecr;
- tcp_cc to_cc; /* holds CC or CCnew */
- tcp_cc to_ccecho;
- u_int16_t to_mss;
- u_int8_t to_requested_s_scale;
- u_int8_t to_pad;
-};
-
-struct syncache {
- inp_gen_t sc_inp_gencnt; /* pointer check */
- struct tcpcb *sc_tp; /* tcb for listening socket */
- struct mbuf *sc_ipopts; /* source route */
- struct in_conninfo sc_inc; /* addresses */
-#define sc_route sc_inc.inc_route
-#define sc_route6 sc_inc.inc6_route
- u_int32_t sc_tsrecent;
- tcp_cc sc_cc_send; /* holds CC or CCnew */
- tcp_cc sc_cc_recv;
- tcp_seq sc_irs; /* seq from peer */
- tcp_seq sc_iss; /* our ISS */
- u_long sc_rxttime; /* retransmit time */
- u_int16_t sc_rxtslot; /* retransmit counter */
- u_int16_t sc_peer_mss; /* peer's MSS */
- u_int16_t sc_wnd; /* advertised window */
- u_int8_t sc_requested_s_scale:4,
- sc_request_r_scale:4;
- u_int8_t sc_flags;
-#define SCF_NOOPT 0x01 /* no TCP options */
-#define SCF_WINSCALE 0x02 /* negotiated window scaling */
-#define SCF_TIMESTAMP 0x04 /* negotiated timestamps */
-#define SCF_CC 0x08 /* negotiated CC */
-#define SCF_UNREACH 0x10 /* icmp unreachable received */
-#define SCF_KEEPROUTE 0x20 /* keep cloned route */
- TAILQ_ENTRY(syncache) sc_hash;
- TAILQ_ENTRY(syncache) sc_timerq;
-};
-
-struct syncache_head {
- TAILQ_HEAD(, syncache) sch_bucket;
- u_int sch_length;
-};
-
-/*
- * The TAO cache entry which is stored in the protocol family specific
- * portion of the route metrics.
- */
-struct rmxp_tao {
- tcp_cc tao_cc; /* latest CC in valid SYN */
- tcp_cc tao_ccsent; /* latest CC sent to peer */
- u_short tao_mssopt; /* peer's cached MSS */
-#ifdef notyet
- u_short tao_flags; /* cache status flags */
-#define TAOF_DONT 0x0001 /* peer doesn't understand rfc1644 */
-#define TAOF_OK 0x0002 /* peer does understand rfc1644 */
-#define TAOF_UNDEF 0 /* we don't know yet */
-#endif /* notyet */
-};
-#define rmx_taop(r) ((struct rmxp_tao *)(r).rmx_filler)
-
-#define intotcpcb(ip) ((struct tcpcb *)(ip)->inp_ppcb)
-#define sototcpcb(so) (intotcpcb(sotoinpcb(so)))
-
-/*
- * The smoothed round-trip time and estimated variance
- * are stored as fixed point numbers scaled by the values below.
- * For convenience, these scales are also used in smoothing the average
- * (smoothed = (1/scale)sample + ((scale-1)/scale)smoothed).
- * With these scales, srtt has 3 bits to the right of the binary point,
- * and thus an "ALPHA" of 0.875. rttvar has 2 bits to the right of the
- * binary point, and is smoothed with an ALPHA of 0.75.
- */
-#define TCP_RTT_SCALE 32 /* multiplier for srtt; 3 bits frac. */
-#define TCP_RTT_SHIFT 5 /* shift for srtt; 3 bits frac. */
-#define TCP_RTTVAR_SCALE 16 /* multiplier for rttvar; 2 bits */
-#define TCP_RTTVAR_SHIFT 4 /* shift for rttvar; 2 bits */
-#define TCP_DELTA_SHIFT 2 /* see tcp_input.c */
-
-/*
- * The initial retransmission should happen at rtt + 4 * rttvar.
- * Because of the way we do the smoothing, srtt and rttvar
- * will each average +1/2 tick of bias. When we compute
- * the retransmit timer, we want 1/2 tick of rounding and
- * 1 extra tick because of +-1/2 tick uncertainty in the
- * firing of the timer. The bias will give us exactly the
- * 1.5 tick we need. But, because the bias is
- * statistical, we have to test that we don't drop below
- * the minimum feasible timer (which is 2 ticks).
- * This version of the macro adapted from a paper by Lawrence
- * Brakmo and Larry Peterson which outlines a problem caused
- * by insufficient precision in the original implementation,
- * which results in inappropriately large RTO values for very
- * fast networks.
- */
-#define TCP_REXMTVAL(tp) \
- max((tp)->t_rttmin, (((tp)->t_srtt >> (TCP_RTT_SHIFT - TCP_DELTA_SHIFT)) \
- + (tp)->t_rttvar) >> TCP_DELTA_SHIFT)
-
-/*
- * TCP statistics.
- * Many of these should be kept per connection,
- * but that's inconvenient at the moment.
- */
-struct tcpstat {
- u_long tcps_connattempt; /* connections initiated */
- u_long tcps_accepts; /* connections accepted */
- u_long tcps_connects; /* connections established */
- u_long tcps_drops; /* connections dropped */
- u_long tcps_conndrops; /* embryonic connections dropped */
- u_long tcps_closed; /* conn. closed (includes drops) */
- u_long tcps_segstimed; /* segs where we tried to get rtt */
- u_long tcps_rttupdated; /* times we succeeded */
- u_long tcps_delack; /* delayed acks sent */
- u_long tcps_timeoutdrop; /* conn. dropped in rxmt timeout */
- u_long tcps_rexmttimeo; /* retransmit timeouts */
- u_long tcps_persisttimeo; /* persist timeouts */
- u_long tcps_keeptimeo; /* keepalive timeouts */
- u_long tcps_keepprobe; /* keepalive probes sent */
- u_long tcps_keepdrops; /* connections dropped in keepalive */
-
- u_long tcps_sndtotal; /* total packets sent */
- u_long tcps_sndpack; /* data packets sent */
- u_long tcps_sndbyte; /* data bytes sent */
- u_long tcps_sndrexmitpack; /* data packets retransmitted */
- u_long tcps_sndrexmitbyte; /* data bytes retransmitted */
- u_long tcps_sndacks; /* ack-only packets sent */
- u_long tcps_sndprobe; /* window probes sent */
- u_long tcps_sndurg; /* packets sent with URG only */
- u_long tcps_sndwinup; /* window update-only packets sent */
- u_long tcps_sndctrl; /* control (SYN|FIN|RST) packets sent */
-
- u_long tcps_rcvtotal; /* total packets received */
- u_long tcps_rcvpack; /* packets received in sequence */
- u_long tcps_rcvbyte; /* bytes received in sequence */
- u_long tcps_rcvbadsum; /* packets received with ccksum errs */
- u_long tcps_rcvbadoff; /* packets received with bad offset */
- u_long tcps_rcvmemdrop; /* packets dropped for lack of memory */
- u_long tcps_rcvshort; /* packets received too short */
- u_long tcps_rcvduppack; /* duplicate-only packets received */
- u_long tcps_rcvdupbyte; /* duplicate-only bytes received */
- u_long tcps_rcvpartduppack; /* packets with some duplicate data */
- u_long tcps_rcvpartdupbyte; /* dup. bytes in part-dup. packets */
- u_long tcps_rcvoopack; /* out-of-order packets received */
- u_long tcps_rcvoobyte; /* out-of-order bytes received */
- u_long tcps_rcvpackafterwin; /* packets with data after window */
- u_long tcps_rcvbyteafterwin; /* bytes rcvd after window */
- u_long tcps_rcvafterclose; /* packets rcvd after "close" */
- u_long tcps_rcvwinprobe; /* rcvd window probe packets */
- u_long tcps_rcvdupack; /* rcvd duplicate acks */
- u_long tcps_rcvacktoomuch; /* rcvd acks for unsent data */
- u_long tcps_rcvackpack; /* rcvd ack packets */
- u_long tcps_rcvackbyte; /* bytes acked by rcvd acks */
- u_long tcps_rcvwinupd; /* rcvd window update packets */
- u_long tcps_pawsdrop; /* segments dropped due to PAWS */
- u_long tcps_predack; /* times hdr predict ok for acks */
- u_long tcps_preddat; /* times hdr predict ok for data pkts */
- u_long tcps_pcbcachemiss;
- u_long tcps_cachedrtt; /* times cached RTT in route updated */
- u_long tcps_cachedrttvar; /* times cached rttvar updated */
- u_long tcps_cachedssthresh; /* times cached ssthresh updated */
- u_long tcps_usedrtt; /* times RTT initialized from route */
- u_long tcps_usedrttvar; /* times RTTVAR initialized from rt */
- u_long tcps_usedssthresh; /* times ssthresh initialized from rt*/
- u_long tcps_persistdrop; /* timeout in persist state */
- u_long tcps_badsyn; /* bogus SYN, e.g. premature ACK */
- u_long tcps_mturesent; /* resends due to MTU discovery */
- u_long tcps_listendrop; /* listen queue overflows */
-
- u_long tcps_sc_added; /* entry added to syncache */
- u_long tcps_sc_retransmitted; /* syncache entry was retransmitted */
- u_long tcps_sc_dupsyn; /* duplicate SYN packet */
- u_long tcps_sc_dropped; /* could not reply to packet */
- u_long tcps_sc_completed; /* successful extraction of entry */
- u_long tcps_sc_bucketoverflow; /* syncache per-bucket limit hit */
- u_long tcps_sc_cacheoverflow; /* syncache cache limit hit */
- u_long tcps_sc_reset; /* RST removed entry from syncache */
- u_long tcps_sc_stale; /* timed out or listen socket gone */
- u_long tcps_sc_aborted; /* syncache entry aborted */
- u_long tcps_sc_badack; /* removed due to bad ACK */
- u_long tcps_sc_unreach; /* ICMP unreachable received */
- u_long tcps_sc_zonefail; /* zalloc() failed */
- u_long tcps_sc_sendcookie; /* SYN cookie sent */
- u_long tcps_sc_recvcookie; /* SYN cookie received */
-};
-
-/*
- * TCB structure exported to user-land via sysctl(3).
- * Evil hack: declare only if in_pcb.h and sys/socketvar.h have been
- * included. Not all of our clients do.
- */
-#if defined(_NETINET_IN_PCB_H_) && defined(_SYS_SOCKETVAR_H_)
-struct xtcpcb {
- size_t xt_len;
- struct inpcb xt_inp;
- struct tcpcb xt_tp;
- struct xsocket xt_socket;
- u_quad_t xt_alignment_hack;
-};
-#endif
-
-/*
- * Names for TCP sysctl objects
- */
-#define TCPCTL_DO_RFC1323 1 /* use RFC-1323 extensions */
-#define TCPCTL_DO_RFC1644 2 /* use RFC-1644 extensions */
-#define TCPCTL_MSSDFLT 3 /* MSS default */
-#define TCPCTL_STATS 4 /* statistics (read-only) */
-#define TCPCTL_RTTDFLT 5 /* default RTT estimate */
-#define TCPCTL_KEEPIDLE 6 /* keepalive idle timer */
-#define TCPCTL_KEEPINTVL 7 /* interval to send keepalives */
-#define TCPCTL_SENDSPACE 8 /* send buffer space */
-#define TCPCTL_RECVSPACE 9 /* receive buffer space */
-#define TCPCTL_KEEPINIT 10 /* timeout for establishing syn */
-#define TCPCTL_PCBLIST 11 /* list of all outstanding PCBs */
-#define TCPCTL_DELACKTIME 12 /* time before sending delayed ACK */
-#define TCPCTL_V6MSSDFLT 13 /* MSS default for IPv6 */
-#define TCPCTL_MAXID 14
-
-#define TCPCTL_NAMES { \
- { 0, 0 }, \
- { "rfc1323", CTLTYPE_INT }, \
- { "rfc1644", CTLTYPE_INT }, \
- { "mssdflt", CTLTYPE_INT }, \
- { "stats", CTLTYPE_STRUCT }, \
- { "rttdflt", CTLTYPE_INT }, \
- { "keepidle", CTLTYPE_INT }, \
- { "keepintvl", CTLTYPE_INT }, \
- { "sendspace", CTLTYPE_INT }, \
- { "recvspace", CTLTYPE_INT }, \
- { "keepinit", CTLTYPE_INT }, \
- { "pcblist", CTLTYPE_STRUCT }, \
- { "delacktime", CTLTYPE_INT }, \
- { "v6mssdflt", CTLTYPE_INT }, \
-}
-
-
-#ifdef _KERNEL
-#ifdef SYSCTL_DECL
-SYSCTL_DECL(_net_inet_tcp);
-#endif
-
-extern struct inpcbhead tcb; /* head of queue of active tcpcb's */
-extern struct inpcbinfo tcbinfo;
-extern struct tcpstat tcpstat; /* tcp statistics */
-extern int tcp_mssdflt; /* XXX */
-extern int tcp_delack_enabled;
-extern int tcp_do_newreno;
-extern int ss_fltsz;
-extern int ss_fltsz_local;
-
-void tcp_canceltimers(struct tcpcb *);
-struct tcpcb *
- tcp_close(struct tcpcb *);
-void tcp_ctlinput(int, struct sockaddr *, void *);
-int tcp_ctloutput(struct socket *, struct sockopt *);
-struct tcpcb *
- tcp_drop(struct tcpcb *, int);
-void tcp_drain(void);
-void tcp_fasttimo(void);
-struct rmxp_tao *
- tcp_gettaocache(struct in_conninfo *);
-void tcp_init(void);
-void tcp_input(struct mbuf *, int);
-void tcp_mss(struct tcpcb *, int);
-int tcp_mssopt(struct tcpcb *);
-void tcp_drop_syn_sent(struct inpcb *, int);
-void tcp_mtudisc(struct inpcb *, int);
-struct tcpcb *
- tcp_newtcpcb(struct inpcb *);
-int tcp_output(struct tcpcb *);
-void tcp_quench(struct inpcb *, int);
-void tcp_respond(struct tcpcb *, void *,
- struct tcphdr *, struct mbuf *, tcp_seq, tcp_seq, int);
-struct rtentry *
- tcp_rtlookup(struct in_conninfo *);
-void tcp_setpersist(struct tcpcb *);
-void tcp_slowtimo(void);
-struct tcptemp *
- tcp_maketemplate(struct tcpcb *);
-void tcp_fillheaders(struct tcpcb *, void *, void *);
-struct tcpcb *
- tcp_timers(struct tcpcb *, int);
-void tcp_trace(int, int, struct tcpcb *, void *, struct tcphdr *, int);
-void syncache_init(void);
-void syncache_unreach(struct in_conninfo *, struct tcphdr *);
-int syncache_expand(struct in_conninfo *, struct tcphdr *,
- struct socket **, struct mbuf *);
-int syncache_add(struct in_conninfo *, struct tcpopt *,
- struct tcphdr *, struct socket **, struct mbuf *);
-void syncache_chkrst(struct in_conninfo *, struct tcphdr *);
-void syncache_badack(struct in_conninfo *);
-
-extern struct pr_usrreqs tcp_usrreqs;
-extern u_long tcp_sendspace;
-extern u_long tcp_recvspace;
-tcp_seq tcp_new_isn(struct tcpcb *);
-
-#endif /* _KERNEL */
-
-#endif /* _NETINET_TCP_VAR_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet/tcpip.h b/newlib/libc/sys/linux/include/netinet/tcpip.h
deleted file mode 100644
index 53ecb8de0..000000000
--- a/newlib/libc/sys/linux/include/netinet/tcpip.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcpip.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/tcpip.h,v 1.9 2001/02/26 20:10:16 asmodai Exp $
- */
-
-#ifndef _NETINET_TCPIP_H_
-#define _NETINET_TCPIP_H_
-
-/*
- * Tcp+ip header, after ip options removed.
- */
-struct tcpiphdr {
- struct ipovly ti_i; /* overlaid ip structure */
- struct tcphdr ti_t; /* tcp header */
-};
-#define ti_x1 ti_i.ih_x1
-#define ti_pr ti_i.ih_pr
-#define ti_len ti_i.ih_len
-#define ti_src ti_i.ih_src
-#define ti_dst ti_i.ih_dst
-#define ti_sport ti_t.th_sport
-#define ti_dport ti_t.th_dport
-#define ti_seq ti_t.th_seq
-#define ti_ack ti_t.th_ack
-#define ti_x2 ti_t.th_x2
-#define ti_off ti_t.th_off
-#define ti_flags ti_t.th_flags
-#define ti_win ti_t.th_win
-#define ti_sum ti_t.th_sum
-#define ti_urp ti_t.th_urp
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netinet/udp.h b/newlib/libc/sys/linux/include/netinet/udp.h
deleted file mode 100644
index 747e76436..000000000
--- a/newlib/libc/sys/linux/include/netinet/udp.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)udp.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/udp.h,v 1.7 1999/08/28 00:49:34 peter Exp $
- */
-
-#ifndef _NETINET_UDP_H_
-#define _NETINET_UDP_H_
-
-/*
- * Udp protocol header.
- * Per RFC 768, September, 1981.
- */
-struct udphdr {
- u_short uh_sport; /* source port */
- u_short uh_dport; /* destination port */
- u_short uh_ulen; /* udp length */
- u_short uh_sum; /* udp checksum */
-};
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netinet/udp_var.h b/newlib/libc/sys/linux/include/netinet/udp_var.h
deleted file mode 100644
index fc00e6e63..000000000
--- a/newlib/libc/sys/linux/include/netinet/udp_var.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)udp_var.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/udp_var.h,v 1.25 2002/03/19 21:25:46 alfred Exp $
- */
-
-#ifndef _NETINET_UDP_VAR_H_
-#define _NETINET_UDP_VAR_H_
-
-/*
- * UDP kernel structures and variables.
- */
-struct udpiphdr {
- struct ipovly ui_i; /* overlaid ip structure */
- struct udphdr ui_u; /* udp header */
-};
-#define ui_x1 ui_i.ih_x1
-#define ui_pr ui_i.ih_pr
-#define ui_len ui_i.ih_len
-#define ui_src ui_i.ih_src
-#define ui_dst ui_i.ih_dst
-#define ui_sport ui_u.uh_sport
-#define ui_dport ui_u.uh_dport
-#define ui_ulen ui_u.uh_ulen
-#define ui_sum ui_u.uh_sum
-
-struct udpstat {
- /* input statistics: */
- u_long udps_ipackets; /* total input packets */
- u_long udps_hdrops; /* packet shorter than header */
- u_long udps_badsum; /* checksum error */
- u_long udps_nosum; /* no checksum */
- u_long udps_badlen; /* data length larger than packet */
- u_long udps_noport; /* no socket on port */
- u_long udps_noportbcast; /* of above, arrived as broadcast */
- u_long udps_fullsock; /* not delivered, input socket full */
- u_long udpps_pcbcachemiss; /* input packets missing pcb cache */
- u_long udpps_pcbhashmiss; /* input packets not for hashed pcb */
- /* output statistics: */
- u_long udps_opackets; /* total output packets */
- u_long udps_fastout; /* output packets on fast path */
- /* of no socket on port, arrived as multicast */
- u_long udps_noportmcast;
-};
-
-/*
- * Names for UDP sysctl objects
- */
-#define UDPCTL_CHECKSUM 1 /* checksum UDP packets */
-#define UDPCTL_STATS 2 /* statistics (read-only) */
-#define UDPCTL_MAXDGRAM 3 /* max datagram size */
-#define UDPCTL_RECVSPACE 4 /* default receive buffer space */
-#define UDPCTL_PCBLIST 5 /* list of PCBs for UDP sockets */
-#define UDPCTL_MAXID 6
-
-#define UDPCTL_NAMES { \
- { 0, 0 }, \
- { "checksum", CTLTYPE_INT }, \
- { "stats", CTLTYPE_STRUCT }, \
- { "maxdgram", CTLTYPE_INT }, \
- { "recvspace", CTLTYPE_INT }, \
- { "pcblist", CTLTYPE_STRUCT }, \
-}
-
-#ifdef _KERNEL
-SYSCTL_DECL(_net_inet_udp);
-
-extern struct pr_usrreqs udp_usrreqs;
-extern struct inpcbhead udb;
-extern struct inpcbinfo udbinfo;
-extern u_long udp_sendspace;
-extern u_long udp_recvspace;
-extern struct udpstat udpstat;
-extern int log_in_vain;
-
-void udp_ctlinput(int, struct sockaddr *, void *);
-void udp_init(void);
-void udp_input(struct mbuf *, int);
-
-void udp_notify(struct inpcb *inp, int errno);
-int udp_shutdown(struct socket *so);
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netinet6/ah.h b/newlib/libc/sys/linux/include/netinet6/ah.h
deleted file mode 100644
index ce7c5e824..000000000
--- a/newlib/libc/sys/linux/include/netinet6/ah.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/ah.h,v 1.7 2002/04/19 04:46:22 suz Exp $ */
-/* $KAME: ah.h,v 1.16 2001/09/04 08:43:19 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * RFC1826/2402 authentication header.
- */
-
-#ifndef _NETINET6_AH_H_
-#define _NETINET6_AH_H_
-
-#if defined(_KERNEL) && !defined(_LKM)
-#include "opt_inet.h"
-#endif
-
-struct ah {
- u_int8_t ah_nxt; /* Next Header */
- u_int8_t ah_len; /* Length of data, in 32bit */
- u_int16_t ah_reserve; /* Reserved for future use */
- u_int32_t ah_spi; /* Security parameter index */
- /* variable size, 32bit bound*/ /* Authentication data */
-};
-
-struct newah {
- u_int8_t ah_nxt; /* Next Header */
- u_int8_t ah_len; /* Length of data + 1, in 32bit */
- u_int16_t ah_reserve; /* Reserved for future use */
- u_int32_t ah_spi; /* Security parameter index */
- u_int32_t ah_seq; /* Sequence number field */
- /* variable size, 32bit bound*/ /* Authentication data */
-};
-
-#ifdef _KERNEL
-struct secasvar;
-
-struct ah_algorithm_state {
- struct secasvar *sav;
- void* foo; /* per algorithm data - maybe */
-};
-
-struct ah_algorithm {
- int (*sumsiz) __P((struct secasvar *));
- int (*mature) __P((struct secasvar *));
- int keymin; /* in bits */
- int keymax; /* in bits */
- const char *name;
- int (*init) __P((struct ah_algorithm_state *, struct secasvar *));
- void (*update) __P((struct ah_algorithm_state *, caddr_t, size_t));
- void (*result) __P((struct ah_algorithm_state *, caddr_t));
-};
-
-#define AH_MAXSUMSIZE 16
-
-extern const struct ah_algorithm *ah_algorithm_lookup __P((int));
-
-/* cksum routines */
-extern int ah_hdrlen __P((struct secasvar *));
-
-extern size_t ah_hdrsiz __P((struct ipsecrequest *));
-extern void ah4_input __P((struct mbuf *, int));
-extern int ah4_output __P((struct mbuf *, struct ipsecrequest *));
-extern int ah4_calccksum __P((struct mbuf *, caddr_t, size_t,
- const struct ah_algorithm *, struct secasvar *));
-#endif /* _KERNEL */
-
-#endif /* _NETINET6_AH_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/ah6.h b/newlib/libc/sys/linux/include/netinet6/ah6.h
deleted file mode 100644
index a2d16d886..000000000
--- a/newlib/libc/sys/linux/include/netinet6/ah6.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/ah6.h,v 1.4 2001/06/11 12:39:03 ume Exp $ */
-/* $KAME: ah.h,v 1.13 2000/10/18 21:28:00 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * RFC1826/2402 authentication header.
- */
-
-#ifndef _NETINET6_AH6_H_
-#define _NETINET6_AH6_H_
-
-#ifdef _KERNEL
-struct secasvar;
-
-extern int ah6_input __P((struct mbuf **, int *, int));
-extern int ah6_output __P((struct mbuf *, u_char *, struct mbuf *,
- struct ipsecrequest *));
-extern int ah6_calccksum __P((struct mbuf *, caddr_t, size_t,
- const struct ah_algorithm *, struct secasvar *));
-
-extern void ah6_ctlinput __P((int, struct sockaddr *, void *));
-#endif
-
-#endif /*_NETINET6_AH6_H_*/
diff --git a/newlib/libc/sys/linux/include/netinet6/esp.h b/newlib/libc/sys/linux/include/netinet6/esp.h
deleted file mode 100644
index 0a22f7a03..000000000
--- a/newlib/libc/sys/linux/include/netinet6/esp.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/esp.h,v 1.6 2002/04/19 04:46:22 suz Exp $ */
-/* $KAME: esp.h,v 1.19 2001/09/04 08:43:19 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * RFC1827/2406 Encapsulated Security Payload.
- */
-
-#ifndef _NETINET6_ESP_H_
-#define _NETINET6_ESP_H_
-
-#if defined(_KERNEL) && !defined(_LKM)
-#include "opt_inet.h"
-#endif
-
-struct esp {
- u_int32_t esp_spi; /* ESP */
- /* variable size, 32bit bound */ /* Initialization Vector */
- /* variable size */ /* Payload data */
- /* variable size */ /* padding */
- /* 8bit */ /* pad size */
- /* 8bit */ /* next header */
- /* 8bit */ /* next header */
- /* variable size, 32bit bound */ /* Authentication data (new IPsec) */
-};
-
-struct newesp {
- u_int32_t esp_spi; /* ESP */
- u_int32_t esp_seq; /* Sequence number */
- /* variable size */ /* (IV and) Payload data */
- /* variable size */ /* padding */
- /* 8bit */ /* pad size */
- /* 8bit */ /* next header */
- /* 8bit */ /* next header */
- /* variable size, 32bit bound *//* Authentication data */
-};
-
-struct esptail {
- u_int8_t esp_padlen; /* pad length */
- u_int8_t esp_nxt; /* Next header */
- /* variable size, 32bit bound *//* Authentication data (new IPsec)*/
-};
-
-#ifdef _KERNEL
-struct secasvar;
-
-struct esp_algorithm {
- size_t padbound; /* pad boundary, in byte */
- int ivlenval; /* iv length, in byte */
- int (*mature) __P((struct secasvar *));
- int keymin; /* in bits */
- int keymax; /* in bits */
- int (*schedlen) __P((const struct esp_algorithm *));
- const char *name;
- int (*ivlen) __P((const struct esp_algorithm *, struct secasvar *));
- int (*decrypt) __P((struct mbuf *, size_t,
- struct secasvar *, const struct esp_algorithm *, int));
- int (*encrypt) __P((struct mbuf *, size_t, size_t,
- struct secasvar *, const struct esp_algorithm *, int));
- /* not supposed to be called directly */
- int (*schedule) __P((const struct esp_algorithm *, struct secasvar *));
- int (*blockdecrypt) __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
- int (*blockencrypt) __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
-};
-
-extern const struct esp_algorithm *esp_algorithm_lookup __P((int));
-extern int esp_max_ivlen __P((void));
-
-/* crypt routines */
-extern int esp4_output __P((struct mbuf *, struct ipsecrequest *));
-extern void esp4_input __P((struct mbuf *, int));
-extern size_t esp_hdrsiz __P((struct ipsecrequest *));
-
-extern int esp_schedule __P((const struct esp_algorithm *, struct secasvar *));
-extern int esp_auth __P((struct mbuf *, size_t, size_t,
- struct secasvar *, u_char *));
-#endif /* _KERNEL */
-
-#endif /* _NETINET6_ESP_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/esp6.h b/newlib/libc/sys/linux/include/netinet6/esp6.h
deleted file mode 100644
index 933fe2ac7..000000000
--- a/newlib/libc/sys/linux/include/netinet6/esp6.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/esp6.h,v 1.4 2001/06/11 12:39:04 ume Exp $ */
-/* $KAME: esp.h,v 1.16 2000/10/18 21:28:00 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * RFC1827/2406 Encapsulated Security Payload.
- */
-
-#ifndef _NETINET6_ESP6_H_
-#define _NETINET6_ESP6_H_
-
-#ifdef _KERNEL
-extern int esp6_output __P((struct mbuf *, u_char *, struct mbuf *,
- struct ipsecrequest *));
-extern int esp6_input __P((struct mbuf **, int *, int));
-
-extern void esp6_ctlinput __P((int, struct sockaddr *, void *));
-#endif /*_KERNEL*/
-
-#endif /*_NETINET6_ESP6_H_*/
diff --git a/newlib/libc/sys/linux/include/netinet6/esp_rijndael.h b/newlib/libc/sys/linux/include/netinet6/esp_rijndael.h
deleted file mode 100644
index 8c7d44e0f..000000000
--- a/newlib/libc/sys/linux/include/netinet6/esp_rijndael.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/esp_rijndael.h,v 1.1 2001/06/11 12:39:05 ume Exp $ */
-/* $KAME: esp_rijndael.h,v 1.1 2000/09/20 18:15:22 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-int esp_rijndael_schedlen __P((const struct esp_algorithm *));
-int esp_rijndael_schedule __P((const struct esp_algorithm *,
- struct secasvar *));
-int esp_rijndael_blockdecrypt __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
-int esp_rijndael_blockencrypt __P((const struct esp_algorithm *,
- struct secasvar *, u_int8_t *, u_int8_t *));
diff --git a/newlib/libc/sys/linux/include/netinet6/icmp6.h b/newlib/libc/sys/linux/include/netinet6/icmp6.h
deleted file mode 100644
index 300b8aca2..000000000
--- a/newlib/libc/sys/linux/include/netinet6/icmp6.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/icmp6.h,v 1.6 2000/07/04 16:35:09 itojun Exp $ */
-/* $KAME: icmp6.h,v 1.17 2000/06/11 17:23:40 jinmei Exp $ */
-
-#error "netinet6/icmp6.h is obsolete. use netinet/icmp6.h"
diff --git a/newlib/libc/sys/linux/include/netinet6/in6.h b/newlib/libc/sys/linux/include/netinet6/in6.h
deleted file mode 100644
index e4d1c1cf2..000000000
--- a/newlib/libc/sys/linux/include/netinet6/in6.h
+++ /dev/null
@@ -1,651 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/in6.h,v 1.19 2002/04/19 04:46:22 suz Exp $ */
-/* $KAME: in6.h,v 1.89 2001/05/27 13:28:35 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * Copyright (c) 1982, 1986, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in.h 8.3 (Berkeley) 1/3/94
- */
-
-#ifndef __KAME_NETINET_IN_H_INCLUDED_
-#error "do not include netinet6/in6.h directly, include netinet/in.h. see RFC2553"
-#endif
-
-#ifndef _NETINET6_IN6_H_
-#define _NETINET6_IN6_H_
-
-#include <sys/types.h>
-
-/*
- * Identification of the network protocol stack
- * for *BSD-current/release: http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE
- * has the table of implementation/integration differences.
- */
-#define __KAME__
-#define __KAME_VERSION "20010528/FreeBSD"
-
-/*
- * Local port number conventions:
- *
- * Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root),
- * unless a kernel is compiled with IPNOPRIVPORTS defined.
- *
- * When a user does a bind(2) or connect(2) with a port number of zero,
- * a non-conflicting local port address is chosen.
- *
- * The default range is IPPORT_ANONMIN to IPPORT_ANONMAX, although
- * that is settable by sysctl(3); net.inet.ip.anonportmin and
- * net.inet.ip.anonportmax respectively.
- *
- * A user may set the IPPROTO_IP option IP_PORTRANGE to change this
- * default assignment range.
- *
- * The value IP_PORTRANGE_DEFAULT causes the default behavior.
- *
- * The value IP_PORTRANGE_HIGH is the same as IP_PORTRANGE_DEFAULT,
- * and exists only for FreeBSD compatibility purposes.
- *
- * The value IP_PORTRANGE_LOW changes the range to the "low" are
- * that is (by convention) restricted to privileged processes.
- * This convention is based on "vouchsafe" principles only.
- * It is only secure if you trust the remote host to restrict these ports.
- * The range is IPPORT_RESERVEDMIN to IPPORT_RESERVEDMAX.
- */
-
-#define IPV6PORT_RESERVED 1024
-#define IPV6PORT_ANONMIN 49152
-#define IPV6PORT_ANONMAX 65535
-#define IPV6PORT_RESERVEDMIN 600
-#define IPV6PORT_RESERVEDMAX (IPV6PORT_RESERVED-1)
-
-/*
- * IPv6 address
- */
-struct in6_addr {
- union {
- uint8_t __u6_addr8[16];
- uint16_t __u6_addr16[8];
- uint32_t __u6_addr32[4];
- } __u6_addr; /* 128-bit IP6 address */
-};
-
-#define s6_addr __u6_addr.__u6_addr8
-#ifdef _KERNEL /* XXX nonstandard */
-#define s6_addr8 __u6_addr.__u6_addr8
-#define s6_addr16 __u6_addr.__u6_addr16
-#define s6_addr32 __u6_addr.__u6_addr32
-#endif
-
-#define INET6_ADDRSTRLEN 46
-
-/*
- * Socket address for IPv6
- */
-#ifndef _XOPEN_SOURCE
-#define SIN6_LEN
-#endif
-struct sockaddr_in6 {
- uint8_t sin6_family; /* AF_INET6 (sa_family_t) */
- uint16_t sin6_port; /* Transport layer port # (in_port_t)*/
- uint32_t sin6_flowinfo; /* IP6 flow information */
- struct in6_addr sin6_addr; /* IP6 address */
- uint32_t sin6_scope_id; /* scope zone index */
-};
-
-/*
- * Local definition for masks
- */
-#ifdef _KERNEL /* XXX nonstandard */
-#define IN6MASK0 {{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}}
-#define IN6MASK32 {{{ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, \
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
-#define IN6MASK64 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
-#define IN6MASK96 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
- 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}}
-#define IN6MASK128 {{{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }}}
-#endif
-
-#ifdef _KERNEL
-extern const struct sockaddr_in6 sa6_any;
-
-extern const struct in6_addr in6mask0;
-extern const struct in6_addr in6mask32;
-extern const struct in6_addr in6mask64;
-extern const struct in6_addr in6mask96;
-extern const struct in6_addr in6mask128;
-#endif /* _KERNEL */
-
-/*
- * Macros started with IPV6_ADDR is KAME local
- */
-#ifdef _KERNEL /* XXX nonstandard */
-#if BYTE_ORDER == BIG_ENDIAN
-#define IPV6_ADDR_INT32_ONE 1
-#define IPV6_ADDR_INT32_TWO 2
-#define IPV6_ADDR_INT32_MNL 0xff010000
-#define IPV6_ADDR_INT32_MLL 0xff020000
-#define IPV6_ADDR_INT32_SMP 0x0000ffff
-#define IPV6_ADDR_INT16_ULL 0xfe80
-#define IPV6_ADDR_INT16_USL 0xfec0
-#define IPV6_ADDR_INT16_MLL 0xff02
-#elif BYTE_ORDER == LITTLE_ENDIAN
-#define IPV6_ADDR_INT32_ONE 0x01000000
-#define IPV6_ADDR_INT32_TWO 0x02000000
-#define IPV6_ADDR_INT32_MNL 0x000001ff
-#define IPV6_ADDR_INT32_MLL 0x000002ff
-#define IPV6_ADDR_INT32_SMP 0xffff0000
-#define IPV6_ADDR_INT16_ULL 0x80fe
-#define IPV6_ADDR_INT16_USL 0xc0fe
-#define IPV6_ADDR_INT16_MLL 0x02ff
-#endif
-#endif
-
-/*
- * Definition of some useful macros to handle IP6 addresses
- */
-#define IN6ADDR_ANY_INIT \
- {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
-#define IN6ADDR_LOOPBACK_INIT \
- {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
-#define IN6ADDR_NODELOCAL_ALLNODES_INIT \
- {{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
-#define IN6ADDR_LINKLOCAL_ALLNODES_INIT \
- {{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
-#define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT \
- {{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }}}
-
-extern const struct in6_addr in6addr_any;
-extern const struct in6_addr in6addr_loopback;
-extern const struct in6_addr in6addr_nodelocal_allnodes;
-extern const struct in6_addr in6addr_linklocal_allnodes;
-extern const struct in6_addr in6addr_linklocal_allrouters;
-
-/*
- * Equality
- * NOTE: Some of kernel programming environment (for example, openbsd/sparc)
- * does not supply memcmp(). For userland memcmp() is preferred as it is
- * in ANSI standard.
- */
-#ifdef _KERNEL
-#define IN6_ARE_ADDR_EQUAL(a, b) \
- (bcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0)
-#else
-#define IN6_ARE_ADDR_EQUAL(a, b) \
- (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0)
-#endif
-
-#ifdef _KERNEL /* non standard */
-/* see if two addresses are equal in a scope-conscious manner. */
-#define SA6_ARE_ADDR_EQUAL(a, b) \
- (((a)->sin6_scope_id == 0 || (b)->sin6_scope_id == 0 || \
- ((a)->sin6_scope_id == (b)->sin6_scope_id)) && \
- (bcmp(&(a)->sin6_addr, &(b)->sin6_addr, sizeof(struct in6_addr)) == 0))
-#endif
-
-/*
- * Unspecified
- */
-#define IN6_IS_ADDR_UNSPECIFIED(a) \
- ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
- (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
- (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
- (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) == 0))
-
-/*
- * Loopback
- */
-#define IN6_IS_ADDR_LOOPBACK(a) \
- ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
- (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
- (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
- (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) == ntohl(1)))
-
-/*
- * IPv4 compatible
- */
-#define IN6_IS_ADDR_V4COMPAT(a) \
- ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
- (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
- (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
- (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) != 0) && \
- (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) != ntohl(1)))
-
-/*
- * Mapped
- */
-#define IN6_IS_ADDR_V4MAPPED(a) \
- ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
- (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
- (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
-
-/*
- * KAME Scope Values
- */
-
-#ifdef _KERNEL /* XXX nonstandard */
-#define IPV6_ADDR_SCOPE_NODELOCAL 0x01
-#define IPV6_ADDR_SCOPE_LINKLOCAL 0x02
-#define IPV6_ADDR_SCOPE_SITELOCAL 0x05
-#define IPV6_ADDR_SCOPE_ORGLOCAL 0x08 /* just used in this file */
-#define IPV6_ADDR_SCOPE_GLOBAL 0x0e
-#else
-#define __IPV6_ADDR_SCOPE_NODELOCAL 0x01
-#define __IPV6_ADDR_SCOPE_LINKLOCAL 0x02
-#define __IPV6_ADDR_SCOPE_SITELOCAL 0x05
-#define __IPV6_ADDR_SCOPE_ORGLOCAL 0x08 /* just used in this file */
-#define __IPV6_ADDR_SCOPE_GLOBAL 0x0e
-#endif
-
-/*
- * Unicast Scope
- * Note that we must check topmost 10 bits only, not 16 bits (see RFC2373).
- */
-#define IN6_IS_ADDR_LINKLOCAL(a) \
- (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80))
-#define IN6_IS_ADDR_SITELOCAL(a) \
- (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0))
-
-/*
- * Multicast
- */
-#define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff)
-
-#ifdef _KERNEL /* XXX nonstandard */
-#define IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f)
-#else
-#define __IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f)
-#endif
-
-/*
- * Multicast Scope
- */
-#ifdef _KERNEL /* refers nonstandard items */
-#define IN6_IS_ADDR_MC_NODELOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) && \
- (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_NODELOCAL))
-#define IN6_IS_ADDR_MC_LINKLOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) && \
- (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_LINKLOCAL))
-#define IN6_IS_ADDR_MC_SITELOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) && \
- (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_SITELOCAL))
-#define IN6_IS_ADDR_MC_ORGLOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) && \
- (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_ORGLOCAL))
-#define IN6_IS_ADDR_MC_GLOBAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) && \
- (IPV6_ADDR_MC_SCOPE(a) == IPV6_ADDR_SCOPE_GLOBAL))
-#else
-#define IN6_IS_ADDR_MC_NODELOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) && \
- (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_NODELOCAL))
-#define IN6_IS_ADDR_MC_LINKLOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) && \
- (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_LINKLOCAL))
-#define IN6_IS_ADDR_MC_SITELOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) && \
- (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_SITELOCAL))
-#define IN6_IS_ADDR_MC_ORGLOCAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) && \
- (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_ORGLOCAL))
-#define IN6_IS_ADDR_MC_GLOBAL(a) \
- (IN6_IS_ADDR_MULTICAST(a) && \
- (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_GLOBAL))
-#endif
-
-#ifdef _KERNEL /* nonstandard */
-/*
- * KAME Scope
- */
-#define IN6_IS_SCOPE_LINKLOCAL(a) \
- ((IN6_IS_ADDR_LINKLOCAL(a)) || \
- (IN6_IS_ADDR_MC_LINKLOCAL(a)))
-
-#define IFA6_IS_DEPRECATED(a) \
- ((a)->ia6_lifetime.ia6t_preferred != 0 && \
- (a)->ia6_lifetime.ia6t_preferred < time_second)
-#define IFA6_IS_INVALID(a) \
- ((a)->ia6_lifetime.ia6t_expire != 0 && \
- (a)->ia6_lifetime.ia6t_expire < time_second)
-#endif /* _KERNEL */
-
-/*
- * IP6 route structure
- */
-#ifndef _XOPEN_SOURCE
-struct route_in6 {
- struct rtentry *ro_rt;
- struct sockaddr_in6 ro_dst;
-};
-#endif
-
-/*
- * Options for use with [gs]etsockopt at the IPV6 level.
- * First word of comment is data type; bool is stored in int.
- */
-/* no hdrincl */
-#if 0 /* the followings are relic in IPv4 and hence are disabled */
-#define IPV6_OPTIONS 1 /* buf/ip6_opts; set/get IP6 options */
-#define IPV6_RECVOPTS 5 /* bool; receive all IP6 opts w/dgram */
-#define IPV6_RECVRETOPTS 6 /* bool; receive IP6 opts for response */
-#define IPV6_RECVDSTADDR 7 /* bool; receive IP6 dst addr w/dgram */
-#define IPV6_RETOPTS 8 /* ip6_opts; set/get IP6 options */
-#endif
-#define IPV6_SOCKOPT_RESERVED1 3 /* reserved for future use */
-#define IPV6_UNICAST_HOPS 4 /* int; IP6 hops */
-#define IPV6_MULTICAST_IF 9 /* u_char; set/get IP6 multicast i/f */
-#define IPV6_MULTICAST_HOPS 10 /* u_char; set/get IP6 multicast hops */
-#define IPV6_MULTICAST_LOOP 11 /* u_char; set/get IP6 multicast loopback */
-#define IPV6_JOIN_GROUP 12 /* ip6_mreq; join a group membership */
-#define IPV6_LEAVE_GROUP 13 /* ip6_mreq; leave a group membership */
-#define IPV6_PORTRANGE 14 /* int; range to choose for unspec port */
-#define ICMP6_FILTER 18 /* icmp6_filter; icmp6 filter */
-/* RFC2292 options */
-#define IPV6_PKTINFO 19 /* bool; send/recv if, src/dst addr */
-#define IPV6_HOPLIMIT 20 /* bool; hop limit */
-#define IPV6_NEXTHOP 21 /* bool; next hop addr */
-#define IPV6_HOPOPTS 22 /* bool; hop-by-hop option */
-#define IPV6_DSTOPTS 23 /* bool; destination option */
-#define IPV6_RTHDR 24 /* bool; routing header */
-#define IPV6_PKTOPTIONS 25 /* buf/cmsghdr; set/get IPv6 options */
-
-#define IPV6_CHECKSUM 26 /* int; checksum offset for raw socket */
-#define IPV6_V6ONLY 27 /* bool; only bind INET6 at wildcard bind */
-#ifndef _KERNEL
-#define IPV6_BINDV6ONLY IPV6_V6ONLY
-#endif
-
-#if 1 /* IPSEC */
-#define IPV6_IPSEC_POLICY 28 /* struct; get/set security policy */
-#endif
-#define IPV6_FAITH 29 /* bool; accept FAITH'ed connections */
-
-#if 1 /* IPV6FIREWALL */
-#define IPV6_FW_ADD 30 /* add a firewall rule to chain */
-#define IPV6_FW_DEL 31 /* delete a firewall rule from chain */
-#define IPV6_FW_FLUSH 32 /* flush firewall rule chain */
-#define IPV6_FW_ZERO 33 /* clear single/all firewall counter(s) */
-#define IPV6_FW_GET 34 /* get entire firewall rule chain */
-#endif
-
-/* to define items, should talk with KAME guys first, for *BSD compatibility */
-
-#define IPV6_RTHDR_LOOSE 0 /* this hop need not be a neighbor. XXX old spec */
-#define IPV6_RTHDR_STRICT 1 /* this hop must be a neighbor. XXX old spec */
-#define IPV6_RTHDR_TYPE_0 0 /* IPv6 routing header type 0 */
-
-/*
- * Defaults and limits for options
- */
-#define IPV6_DEFAULT_MULTICAST_HOPS 1 /* normally limit m'casts to 1 hop */
-#define IPV6_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */
-
-/*
- * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP.
- */
-struct ipv6_mreq {
- struct in6_addr ipv6mr_multiaddr;
- unsigned int ipv6mr_interface;
-};
-
-/*
- * IPV6_PKTINFO: Packet information(RFC2292 sec 5)
- */
-struct in6_pktinfo {
- struct in6_addr ipi6_addr; /* src/dst IPv6 address */
- unsigned int ipi6_ifindex; /* send/recv interface index */
-};
-
-/*
- * Argument for IPV6_PORTRANGE:
- * - which range to search when port is unspecified at bind() or connect()
- */
-#define IPV6_PORTRANGE_DEFAULT 0 /* default range */
-#define IPV6_PORTRANGE_HIGH 1 /* "high" - request firewall bypass */
-#define IPV6_PORTRANGE_LOW 2 /* "low" - vouchsafe security */
-
-#ifndef _XOPEN_SOURCE
-/*
- * Definitions for inet6 sysctl operations.
- *
- * Third level is protocol number.
- * Fourth level is desired variable within that protocol.
- */
-#define IPV6PROTO_MAXID (IPPROTO_PIM + 1) /* don't list to IPV6PROTO_MAX */
-
-#define CTL_IPV6PROTO_NAMES { \
- { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
- { 0, 0 }, \
- { "tcp6", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "udp6", CTLTYPE_NODE }, \
- { 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 }, { 0, 0 }, \
- { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
- { 0, 0 }, \
- { "ip6", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
- { 0, 0 }, \
- { "ipsec6", CTLTYPE_NODE }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "icmp6", CTLTYPE_NODE }, \
- { 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 }, \
- { 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 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
- { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "pim6", CTLTYPE_NODE }, \
-}
-
-/*
- * Names for IP sysctl objects
- */
-#define IPV6CTL_FORWARDING 1 /* act as router */
-#define IPV6CTL_SENDREDIRECTS 2 /* may send redirects when forwarding*/
-#define IPV6CTL_DEFHLIM 3 /* default Hop-Limit */
-#ifdef notyet
-#define IPV6CTL_DEFMTU 4 /* default MTU */
-#endif
-#define IPV6CTL_FORWSRCRT 5 /* forward source-routed dgrams */
-#define IPV6CTL_STATS 6 /* stats */
-#define IPV6CTL_MRTSTATS 7 /* multicast forwarding stats */
-#define IPV6CTL_MRTPROTO 8 /* multicast routing protocol */
-#define IPV6CTL_MAXFRAGPACKETS 9 /* max packets reassembly queue */
-#define IPV6CTL_SOURCECHECK 10 /* verify source route and intf */
-#define IPV6CTL_SOURCECHECK_LOGINT 11 /* minimume logging interval */
-#define IPV6CTL_ACCEPT_RTADV 12
-#define IPV6CTL_KEEPFAITH 13
-#define IPV6CTL_LOG_INTERVAL 14
-#define IPV6CTL_HDRNESTLIMIT 15
-#define IPV6CTL_DAD_COUNT 16
-#define IPV6CTL_AUTO_FLOWLABEL 17
-#define IPV6CTL_DEFMCASTHLIM 18
-#define IPV6CTL_GIF_HLIM 19 /* default HLIM for gif encap packet */
-#define IPV6CTL_KAME_VERSION 20
-#define IPV6CTL_USE_DEPRECATED 21 /* use deprecated addr (RFC2462 5.5.4) */
-#define IPV6CTL_RR_PRUNE 22 /* walk timer for router renumbering */
-#if 0 /* obsolete */
-#define IPV6CTL_MAPPED_ADDR 23
-#endif
-#define IPV6CTL_V6ONLY 24
-#define IPV6CTL_RTEXPIRE 25 /* cloned route expiration time */
-#define IPV6CTL_RTMINEXPIRE 26 /* min value for expiration time */
-#define IPV6CTL_RTMAXCACHE 27 /* trigger level for dynamic expire */
-
-#define IPV6CTL_USETEMPADDR 32 /* use temporary addresses (RFC3041) */
-#define IPV6CTL_TEMPPLTIME 33 /* preferred lifetime for tmpaddrs */
-#define IPV6CTL_TEMPVLTIME 34 /* valid lifetime for tmpaddrs */
-#define IPV6CTL_AUTO_LINKLOCAL 35 /* automatic link-local addr assign */
-#define IPV6CTL_RIP6STATS 36 /* raw_ip6 stats */
-
-/* New entries should be added here from current IPV6CTL_MAXID value. */
-/* to define items, should talk with KAME guys first, for *BSD compatibility */
-#define IPV6CTL_MAXID 37
-
-#endif /* !_XOPEN_SOURCE */
-
-/*
- * Redefinition of mbuf flags
- */
-#define M_AUTHIPHDR M_PROTO2
-#define M_DECRYPTED M_PROTO3
-#define M_LOOP M_PROTO4
-#define M_AUTHIPDGM M_PROTO5
-
-#ifdef _KERNEL
-struct cmsghdr;
-
-int in6_cksum __P((struct mbuf *, uint8_t, uint32_t, uint32_t));
-int in6_localaddr __P((struct in6_addr *));
-int in6_addrscope __P((struct in6_addr *));
-struct in6_ifaddr *in6_ifawithscope __P((struct ifnet *, struct in6_addr *));
-struct in6_ifaddr *in6_ifawithifp __P((struct ifnet *, struct in6_addr *));
-extern void in6_if_up __P((struct ifnet *));
-struct sockaddr;
-extern u_char ip6_protox[];
-
-void in6_sin6_2_sin __P((struct sockaddr_in *sin,
- struct sockaddr_in6 *sin6));
-void in6_sin_2_v4mapsin6 __P((struct sockaddr_in *sin,
- struct sockaddr_in6 *sin6));
-void in6_sin6_2_sin_in_sock __P((struct sockaddr *nam));
-void in6_sin_2_v4mapsin6_in_sock __P((struct sockaddr **nam));
-
-#define satosin6(sa) ((struct sockaddr_in6 *)(sa))
-#define sin6tosa(sin6) ((struct sockaddr *)(sin6))
-#define ifatoia6(ifa) ((struct in6_ifaddr *)(ifa))
-
-extern int (*faithprefix_p)(struct in6_addr *);
-#endif /* _KERNEL */
-
-__BEGIN_DECLS
-struct cmsghdr;
-
-extern int inet6_option_space __P((int));
-extern int inet6_option_init __P((void *, struct cmsghdr **, int));
-extern int inet6_option_append __P((struct cmsghdr *, const uint8_t *,
- int, int));
-extern uint8_t *inet6_option_alloc __P((struct cmsghdr *, int, int, int));
-extern int inet6_option_next __P((const struct cmsghdr *, uint8_t **));
-extern int inet6_option_find __P((const struct cmsghdr *, uint8_t **, int));
-
-extern size_t inet6_rthdr_space __P((int, int));
-extern struct cmsghdr *inet6_rthdr_init __P((void *, int));
-extern int inet6_rthdr_add __P((struct cmsghdr *, const struct in6_addr *,
- unsigned int));
-extern int inet6_rthdr_lasthop __P((struct cmsghdr *, unsigned int));
-#if 0 /* not implemented yet */
-extern int inet6_rthdr_reverse __P((const struct cmsghdr *, struct cmsghdr *));
-#endif
-extern int inet6_rthdr_segments __P((const struct cmsghdr *));
-extern struct in6_addr *inet6_rthdr_getaddr __P((struct cmsghdr *, int));
-extern int inet6_rthdr_getflags __P((const struct cmsghdr *, int));
-
-extern int inet6_opt_init __P((void *, size_t));
-extern int inet6_opt_append __P((void *, size_t, int, uint8_t,
- size_t, uint8_t, void **));
-extern int inet6_opt_finish __P((void *, size_t, int));
-extern int inet6_opt_set_val __P((void *, size_t, void *, int));
-
-extern int inet6_opt_next __P((void *, size_t, int, uint8_t *,
- size_t *, void **));
-extern int inet6_opt_find __P((void *, size_t, int, uint8_t,
- size_t *, void **));
-extern int inet6_opt_get_val __P((void *, size_t, void *, int));
-extern size_t inet6_rth_space __P((int, int));
-extern void *inet6_rth_init __P((void *, int, int, int));
-extern int inet6_rth_add __P((void *, const struct in6_addr *));
-extern int inet6_rth_reverse __P((const void *, void *));
-extern int inet6_rth_segments __P((const void *));
-extern struct in6_addr *inet6_rth_getaddr __P((const void *, int));
-__END_DECLS
-
-#endif /* !_NETINET6_IN6_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/in6_gif.h b/newlib/libc/sys/linux/include/netinet6/in6_gif.h
deleted file mode 100644
index cd0db9b1e..000000000
--- a/newlib/libc/sys/linux/include/netinet6/in6_gif.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/in6_gif.h,v 1.3 2000/07/04 16:35:09 itojun Exp $ */
-/* $KAME: in6_gif.h,v 1.5 2000/04/14 08:36:03 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-#ifndef _NETINET6_IN6_GIF_H_
-#define _NETINET6_IN6_GIF_H_
-
-#define GIF_HLIM 30
-
-int in6_gif_input __P((struct mbuf **, int *, int));
-int in6_gif_output __P((struct ifnet *, int, struct mbuf *, struct rtentry *));
-int gif_encapcheck6 __P((const struct mbuf *, int, int, void *));
-
-#endif /*_NETINET6_IN6_GIF_H_*/
diff --git a/newlib/libc/sys/linux/include/netinet6/in6_ifattach.h b/newlib/libc/sys/linux/include/netinet6/in6_ifattach.h
deleted file mode 100644
index 90229e4f7..000000000
--- a/newlib/libc/sys/linux/include/netinet6/in6_ifattach.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/in6_ifattach.h,v 1.3 2001/06/11 12:39:05 ume Exp $ */
-/* $KAME: in6_ifattach.h,v 1.14 2001/02/08 12:48:39 jinmei Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-#ifndef _NETINET6_IN6_IFATTACH_H_
-#define _NETINET6_IN6_IFATTACH_H_
-
-#ifdef _KERNEL
-void in6_nigroup_attach __P((const char *, int));
-void in6_nigroup_detach __P((const char *, int));
-void in6_ifattach __P((struct ifnet *, struct ifnet *));
-void in6_ifdetach __P((struct ifnet *));
-void in6_get_tmpifid __P((struct ifnet *, u_int8_t *, const u_int8_t *, int));
-void in6_tmpaddrtimer __P((void *));
-int in6_nigroup __P((struct ifnet *, const char *, int, struct in6_addr *));
-#endif /* _KERNEL */
-
-#endif /* _NETINET6_IN6_IFATTACH_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/in6_pcb.h b/newlib/libc/sys/linux/include/netinet6/in6_pcb.h
deleted file mode 100644
index c47c6c739..000000000
--- a/newlib/libc/sys/linux/include/netinet6/in6_pcb.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/in6_pcb.h,v 1.7 2002/02/27 02:44:45 alfred Exp $ */
-/* $KAME: in6_pcb.h,v 1.13 2001/02/06 09:16:53 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- *
- */
-
-/*
- * Copyright (c) 1982, 1986, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_pcb.h 8.1 (Berkeley) 6/10/93
- */
-
-#ifndef _NETINET6_IN6_PCB_H_
-#define _NETINET6_IN6_PCB_H_
-
-#ifdef _KERNEL
-#define satosin6(sa) ((struct sockaddr_in6 *)(sa))
-#define sin6tosa(sin6) ((struct sockaddr *)(sin6))
-#define ifatoia6(ifa) ((struct in6_ifaddr *)(ifa))
-
-void in6_pcbpurgeif0 __P((struct in6pcb *, struct ifnet *));
-void in6_losing __P((struct inpcb *));
-int in6_pcballoc __P((struct socket *, struct inpcbinfo *, struct thread *));
-int in6_pcbbind __P((struct inpcb *, struct sockaddr *, struct thread *));
-int in6_pcbconnect __P((struct inpcb *, struct sockaddr *, struct thread *));
-void in6_pcbdetach __P((struct inpcb *));
-void in6_pcbdisconnect __P((struct inpcb *));
-int in6_pcbladdr __P((struct inpcb *, struct sockaddr *,
- struct in6_addr **));
-struct inpcb *
- in6_pcblookup_local __P((struct inpcbinfo *,
- struct in6_addr *, u_int, int));
-struct inpcb *
- in6_pcblookup_hash __P((struct inpcbinfo *,
- struct in6_addr *, u_int, struct in6_addr *,
- u_int, int, struct ifnet *));
-void in6_pcbnotify __P((struct inpcbhead *, struct sockaddr *,
- u_int, const struct sockaddr *, u_int, int,
- void (*)(struct inpcb *, int)));
-void in6_rtchange __P((struct inpcb *, int));
-int in6_setpeeraddr __P((struct socket *so, struct sockaddr **nam));
-int in6_setsockaddr __P((struct socket *so, struct sockaddr **nam));
-int in6_mapped_sockaddr __P((struct socket *so, struct sockaddr **nam));
-int in6_mapped_peeraddr __P((struct socket *so, struct sockaddr **nam));
-struct in6_addr *in6_selectsrc __P((struct sockaddr_in6 *,
- struct ip6_pktopts *,
- struct ip6_moptions *,
- struct route_in6 *,
- struct in6_addr *, int *));
-int in6_selecthlim __P((struct in6pcb *, struct ifnet *));
-int in6_pcbsetport __P((struct in6_addr *, struct inpcb *, struct thread *));
-void init_sin6 __P((struct sockaddr_in6 *sin6, struct mbuf *m));
-#endif /* _KERNEL */
-
-#endif /* !_NETINET6_IN6_PCB_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/in6_prefix.h b/newlib/libc/sys/linux/include/netinet6/in6_prefix.h
deleted file mode 100644
index 6b2c5205d..000000000
--- a/newlib/libc/sys/linux/include/netinet6/in6_prefix.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/in6_prefix.h,v 1.5 2001/06/11 12:39:05 ume Exp $ */
-/* $KAME: in6_prefix.h,v 1.10 2001/02/08 16:30:30 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, 1998 and 1999 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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/callout.h>
-
-struct rr_prefix {
- struct ifprefix rp_ifpr;
- LIST_ENTRY(rr_prefix) rp_entry;
- LIST_HEAD(rp_addrhead, rp_addr) rp_addrhead;
- struct sockaddr_in6 rp_prefix; /* prefix */
- u_int32_t rp_vltime; /* advertised valid lifetime */
- u_int32_t rp_pltime; /* advertised preferred lifetime */
- time_t rp_expire; /* expiration time of the prefix */
- time_t rp_preferred; /* preferred time of the prefix */
- struct in6_prflags rp_flags;
- u_char rp_origin; /* from where this prefix info is obtained */
- struct rp_stateflags {
- /* if some prefix should be added to this prefix */
- u_char addmark : 1;
- u_char delmark : 1; /* if this prefix will be deleted */
- } rp_stateflags;
-};
-
-#define rp_type rp_ifpr.ifpr_type
-#define rp_ifp rp_ifpr.ifpr_ifp
-#define rp_plen rp_ifpr.ifpr_plen
-
-#define rp_raf rp_flags.prf_ra
-#define rp_raf_onlink rp_flags.prf_ra.onlink
-#define rp_raf_auto rp_flags.prf_ra.autonomous
-
-#define rp_statef_addmark rp_stateflags.addmark
-#define rp_statef_delmark rp_stateflags.delmark
-
-#define rp_rrf rp_flags.prf_rr
-#define rp_rrf_decrvalid rp_flags.prf_rr.decrvalid
-#define rp_rrf_decrprefd rp_flags.prf_rr.decrprefd
-
-struct rp_addr {
- LIST_ENTRY(rp_addr) ra_entry;
- struct in6_addr ra_ifid;
- struct in6_ifaddr *ra_addr;
- struct ra_flags {
- u_char anycast : 1;
- } ra_flags;
-};
-
-#define ifpr2rp(ifpr) ((struct rr_prefix *)(ifpr))
-#define rp2ifpr(rp) ((struct ifprefix *)(rp))
-
-#define RP_IN6(rp) (&(rp)->rp_prefix.sin6_addr)
-
-#define RR_INFINITE_LIFETIME 0xffffffff
-
-
-LIST_HEAD(rr_prhead, rr_prefix);
-
-extern struct rr_prhead rr_prefix;
-
-void in6_rr_timer __P((void *));
-extern struct callout in6_rr_timer_ch;
-int delete_each_prefix __P((struct rr_prefix *rpp, u_char origin));
diff --git a/newlib/libc/sys/linux/include/netinet6/in6_var.h b/newlib/libc/sys/linux/include/netinet6/in6_var.h
deleted file mode 100644
index 7ddfbdb7c..000000000
--- a/newlib/libc/sys/linux/include/netinet6/in6_var.h
+++ /dev/null
@@ -1,608 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/in6_var.h,v 1.10 2002/04/19 04:46:22 suz Exp $ */
-/* $KAME: in6_var.h,v 1.56 2001/03/29 05:34:31 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * Copyright (c) 1985, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)in_var.h 8.1 (Berkeley) 6/10/93
- */
-
-#ifndef _NETINET6_IN6_VAR_H_
-#define _NETINET6_IN6_VAR_H_
-
-/*
- * Interface address, Internet version. One of these structures
- * is allocated for each interface with an Internet address.
- * The ifaddr structure contains the protocol-independent part
- * of the structure and is assumed to be first.
- */
-
-/*
- * pltime/vltime are just for future reference (required to implements 2
- * hour rule for hosts). they should never be modified by nd6_timeout or
- * anywhere else.
- * userland -> kernel: accept pltime/vltime
- * kernel -> userland: throw up everything
- * in kernel: modify preferred/expire only
- */
-struct in6_addrlifetime {
- time_t ia6t_expire; /* valid lifetime expiration time */
- time_t ia6t_preferred; /* preferred lifetime expiration time */
- u_int32_t ia6t_vltime; /* valid lifetime */
- u_int32_t ia6t_pltime; /* prefix lifetime */
-};
-
-struct in6_ifaddr {
- struct ifaddr ia_ifa; /* protocol-independent info */
-#define ia_ifp ia_ifa.ifa_ifp
-#define ia_flags ia_ifa.ifa_flags
- struct sockaddr_in6 ia_addr; /* interface address */
- struct sockaddr_in6 ia_net; /* network number of interface */
- struct sockaddr_in6 ia_dstaddr; /* space for destination addr */
- struct sockaddr_in6 ia_prefixmask; /* prefix mask */
- u_int32_t ia_plen; /* prefix length */
- struct in6_ifaddr *ia_next; /* next in6 list of IP6 addresses */
- int ia6_flags;
-
- struct in6_addrlifetime ia6_lifetime;
- struct ifprefix *ia6_ifpr; /* back pointer to ifprefix */
-
- struct nd_prefix *ia6_ndpr; /* back pointer to the ND prefix
- * (for autoconfigured addresses only)
- */
-};
-
-/*
- * IPv6 interface statistics, as defined in RFC2465 Ipv6IfStatsEntry (p12).
- */
-struct in6_ifstat {
- u_quad_t ifs6_in_receive; /* # of total input datagram */
- u_quad_t ifs6_in_hdrerr; /* # of datagrams with invalid hdr */
- u_quad_t ifs6_in_toobig; /* # of datagrams exceeded MTU */
- u_quad_t ifs6_in_noroute; /* # of datagrams with no route */
- u_quad_t ifs6_in_addrerr; /* # of datagrams with invalid dst */
- u_quad_t ifs6_in_protounknown; /* # of datagrams with unknown proto */
- /* NOTE: increment on final dst if */
- u_quad_t ifs6_in_truncated; /* # of truncated datagrams */
- u_quad_t ifs6_in_discard; /* # of discarded datagrams */
- /* NOTE: fragment timeout is not here */
- u_quad_t ifs6_in_deliver; /* # of datagrams delivered to ULP */
- /* NOTE: increment on final dst if */
- u_quad_t ifs6_out_forward; /* # of datagrams forwarded */
- /* NOTE: increment on outgoing if */
- u_quad_t ifs6_out_request; /* # of outgoing datagrams from ULP */
- /* NOTE: does not include forwrads */
- u_quad_t ifs6_out_discard; /* # of discarded datagrams */
- u_quad_t ifs6_out_fragok; /* # of datagrams fragmented */
- u_quad_t ifs6_out_fragfail; /* # of datagrams failed on fragment */
- u_quad_t ifs6_out_fragcreat; /* # of fragment datagrams */
- /* NOTE: this is # after fragment */
- u_quad_t ifs6_reass_reqd; /* # of incoming fragmented packets */
- /* NOTE: increment on final dst if */
- u_quad_t ifs6_reass_ok; /* # of reassembled packets */
- /* NOTE: this is # after reass */
- /* NOTE: increment on final dst if */
- u_quad_t ifs6_reass_fail; /* # of reass failures */
- /* NOTE: may not be packet count */
- /* NOTE: increment on final dst if */
- u_quad_t ifs6_in_mcast; /* # of inbound multicast datagrams */
- u_quad_t ifs6_out_mcast; /* # of outbound multicast datagrams */
-};
-
-/*
- * ICMPv6 interface statistics, as defined in RFC2466 Ipv6IfIcmpEntry.
- * XXX: I'm not sure if this file is the right place for this structure...
- */
-struct icmp6_ifstat {
- /*
- * Input statistics
- */
- /* ipv6IfIcmpInMsgs, total # of input messages */
- u_quad_t ifs6_in_msg;
- /* ipv6IfIcmpInErrors, # of input error messages */
- u_quad_t ifs6_in_error;
- /* ipv6IfIcmpInDestUnreachs, # of input dest unreach errors */
- u_quad_t ifs6_in_dstunreach;
- /* ipv6IfIcmpInAdminProhibs, # of input administratively prohibited errs */
- u_quad_t ifs6_in_adminprohib;
- /* ipv6IfIcmpInTimeExcds, # of input time exceeded errors */
- u_quad_t ifs6_in_timeexceed;
- /* ipv6IfIcmpInParmProblems, # of input parameter problem errors */
- u_quad_t ifs6_in_paramprob;
- /* ipv6IfIcmpInPktTooBigs, # of input packet too big errors */
- u_quad_t ifs6_in_pkttoobig;
- /* ipv6IfIcmpInEchos, # of input echo requests */
- u_quad_t ifs6_in_echo;
- /* ipv6IfIcmpInEchoReplies, # of input echo replies */
- u_quad_t ifs6_in_echoreply;
- /* ipv6IfIcmpInRouterSolicits, # of input router solicitations */
- u_quad_t ifs6_in_routersolicit;
- /* ipv6IfIcmpInRouterAdvertisements, # of input router advertisements */
- u_quad_t ifs6_in_routeradvert;
- /* ipv6IfIcmpInNeighborSolicits, # of input neighbor solicitations */
- u_quad_t ifs6_in_neighborsolicit;
- /* ipv6IfIcmpInNeighborAdvertisements, # of input neighbor advertisements */
- u_quad_t ifs6_in_neighboradvert;
- /* ipv6IfIcmpInRedirects, # of input redirects */
- u_quad_t ifs6_in_redirect;
- /* ipv6IfIcmpInGroupMembQueries, # of input MLD queries */
- u_quad_t ifs6_in_mldquery;
- /* ipv6IfIcmpInGroupMembResponses, # of input MLD reports */
- u_quad_t ifs6_in_mldreport;
- /* ipv6IfIcmpInGroupMembReductions, # of input MLD done */
- u_quad_t ifs6_in_mlddone;
-
- /*
- * Output statistics. We should solve unresolved routing problem...
- */
- /* ipv6IfIcmpOutMsgs, total # of output messages */
- u_quad_t ifs6_out_msg;
- /* ipv6IfIcmpOutErrors, # of output error messages */
- u_quad_t ifs6_out_error;
- /* ipv6IfIcmpOutDestUnreachs, # of output dest unreach errors */
- u_quad_t ifs6_out_dstunreach;
- /* ipv6IfIcmpOutAdminProhibs, # of output administratively prohibited errs */
- u_quad_t ifs6_out_adminprohib;
- /* ipv6IfIcmpOutTimeExcds, # of output time exceeded errors */
- u_quad_t ifs6_out_timeexceed;
- /* ipv6IfIcmpOutParmProblems, # of output parameter problem errors */
- u_quad_t ifs6_out_paramprob;
- /* ipv6IfIcmpOutPktTooBigs, # of output packet too big errors */
- u_quad_t ifs6_out_pkttoobig;
- /* ipv6IfIcmpOutEchos, # of output echo requests */
- u_quad_t ifs6_out_echo;
- /* ipv6IfIcmpOutEchoReplies, # of output echo replies */
- u_quad_t ifs6_out_echoreply;
- /* ipv6IfIcmpOutRouterSolicits, # of output router solicitations */
- u_quad_t ifs6_out_routersolicit;
- /* ipv6IfIcmpOutRouterAdvertisements, # of output router advertisements */
- u_quad_t ifs6_out_routeradvert;
- /* ipv6IfIcmpOutNeighborSolicits, # of output neighbor solicitations */
- u_quad_t ifs6_out_neighborsolicit;
- /* ipv6IfIcmpOutNeighborAdvertisements, # of output neighbor advertisements */
- u_quad_t ifs6_out_neighboradvert;
- /* ipv6IfIcmpOutRedirects, # of output redirects */
- u_quad_t ifs6_out_redirect;
- /* ipv6IfIcmpOutGroupMembQueries, # of output MLD queries */
- u_quad_t ifs6_out_mldquery;
- /* ipv6IfIcmpOutGroupMembResponses, # of output MLD reports */
- u_quad_t ifs6_out_mldreport;
- /* ipv6IfIcmpOutGroupMembReductions, # of output MLD done */
- u_quad_t ifs6_out_mlddone;
-};
-
-struct in6_ifreq {
- char ifr_name[IFNAMSIZ];
- union {
- struct sockaddr_in6 ifru_addr;
- struct sockaddr_in6 ifru_dstaddr;
- short ifru_flags;
- int ifru_flags6;
- int ifru_metric;
- caddr_t ifru_data;
- struct in6_addrlifetime ifru_lifetime;
- struct in6_ifstat ifru_stat;
- struct icmp6_ifstat ifru_icmp6stat;
- u_int32_t ifru_scope_id[16];
- } ifr_ifru;
-};
-
-struct in6_aliasreq {
- char ifra_name[IFNAMSIZ];
- struct sockaddr_in6 ifra_addr;
- struct sockaddr_in6 ifra_dstaddr;
- struct sockaddr_in6 ifra_prefixmask;
- int ifra_flags;
- struct in6_addrlifetime ifra_lifetime;
-};
-
-/* prefix type macro */
-#define IN6_PREFIX_ND 1
-#define IN6_PREFIX_RR 2
-
-/*
- * prefix related flags passed between kernel(NDP related part) and
- * user land command(ifconfig) and daemon(rtadvd).
- */
-struct in6_prflags {
- struct prf_ra {
- u_char onlink : 1;
- u_char autonomous : 1;
- u_char reserved : 6;
- } prf_ra;
- u_char prf_reserved1;
- u_short prf_reserved2;
- /* want to put this on 4byte offset */
- struct prf_rr {
- u_char decrvalid : 1;
- u_char decrprefd : 1;
- u_char reserved : 6;
- } prf_rr;
- u_char prf_reserved3;
- u_short prf_reserved4;
-};
-
-struct in6_prefixreq {
- char ipr_name[IFNAMSIZ];
- u_char ipr_origin;
- u_char ipr_plen;
- u_int32_t ipr_vltime;
- u_int32_t ipr_pltime;
- struct in6_prflags ipr_flags;
- struct sockaddr_in6 ipr_prefix;
-};
-
-#define PR_ORIG_RA 0
-#define PR_ORIG_RR 1
-#define PR_ORIG_STATIC 2
-#define PR_ORIG_KERNEL 3
-
-#define ipr_raf_onlink ipr_flags.prf_ra.onlink
-#define ipr_raf_auto ipr_flags.prf_ra.autonomous
-
-#define ipr_statef_onlink ipr_flags.prf_state.onlink
-
-#define ipr_rrf_decrvalid ipr_flags.prf_rr.decrvalid
-#define ipr_rrf_decrprefd ipr_flags.prf_rr.decrprefd
-
-struct in6_rrenumreq {
- char irr_name[IFNAMSIZ];
- u_char irr_origin;
- u_char irr_m_len; /* match len for matchprefix */
- u_char irr_m_minlen; /* minlen for matching prefix */
- u_char irr_m_maxlen; /* maxlen for matching prefix */
- u_char irr_u_uselen; /* uselen for adding prefix */
- u_char irr_u_keeplen; /* keeplen from matching prefix */
- struct irr_raflagmask {
- u_char onlink : 1;
- u_char autonomous : 1;
- u_char reserved : 6;
- } irr_raflagmask;
- u_int32_t irr_vltime;
- u_int32_t irr_pltime;
- struct in6_prflags irr_flags;
- struct sockaddr_in6 irr_matchprefix;
- struct sockaddr_in6 irr_useprefix;
-};
-
-#define irr_raf_mask_onlink irr_raflagmask.onlink
-#define irr_raf_mask_auto irr_raflagmask.autonomous
-#define irr_raf_mask_reserved irr_raflagmask.reserved
-
-#define irr_raf_onlink irr_flags.prf_ra.onlink
-#define irr_raf_auto irr_flags.prf_ra.autonomous
-
-#define irr_statef_onlink irr_flags.prf_state.onlink
-
-#define irr_rrf irr_flags.prf_rr
-#define irr_rrf_decrvalid irr_flags.prf_rr.decrvalid
-#define irr_rrf_decrprefd irr_flags.prf_rr.decrprefd
-
-/*
- * Given a pointer to an in6_ifaddr (ifaddr),
- * return a pointer to the addr as a sockaddr_in6
- */
-#define IA6_IN6(ia) (&((ia)->ia_addr.sin6_addr))
-#define IA6_DSTIN6(ia) (&((ia)->ia_dstaddr.sin6_addr))
-#define IA6_MASKIN6(ia) (&((ia)->ia_prefixmask.sin6_addr))
-#define IA6_SIN6(ia) (&((ia)->ia_addr))
-#define IA6_DSTSIN6(ia) (&((ia)->ia_dstaddr))
-#define IFA_IN6(x) (&((struct sockaddr_in6 *)((x)->ifa_addr))->sin6_addr)
-#define IFA_DSTIN6(x) (&((struct sockaddr_in6 *)((x)->ifa_dstaddr))->sin6_addr)
-
-#define IFPR_IN6(x) (&((struct sockaddr_in6 *)((x)->ifpr_prefix))->sin6_addr)
-
-#ifdef _KERNEL
-#define IN6_ARE_MASKED_ADDR_EQUAL(d, a, m) ( \
- (((d)->s6_addr32[0] ^ (a)->s6_addr32[0]) & (m)->s6_addr32[0]) == 0 && \
- (((d)->s6_addr32[1] ^ (a)->s6_addr32[1]) & (m)->s6_addr32[1]) == 0 && \
- (((d)->s6_addr32[2] ^ (a)->s6_addr32[2]) & (m)->s6_addr32[2]) == 0 && \
- (((d)->s6_addr32[3] ^ (a)->s6_addr32[3]) & (m)->s6_addr32[3]) == 0 )
-#endif
-
-#define SIOCSIFADDR_IN6 _IOW('i', 12, struct in6_ifreq)
-#define SIOCGIFADDR_IN6 _IOWR('i', 33, struct in6_ifreq)
-
-#ifdef _KERNEL
-/*
- * SIOCSxxx ioctls should be unused (see comments in in6.c), but
- * we do not shift numbers for binary compatibility.
- */
-#define SIOCSIFDSTADDR_IN6 _IOW('i', 14, struct in6_ifreq)
-#define SIOCSIFNETMASK_IN6 _IOW('i', 22, struct in6_ifreq)
-#endif
-
-#define SIOCGIFDSTADDR_IN6 _IOWR('i', 34, struct in6_ifreq)
-#define SIOCGIFNETMASK_IN6 _IOWR('i', 37, struct in6_ifreq)
-
-#define SIOCDIFADDR_IN6 _IOW('i', 25, struct in6_ifreq)
-#define SIOCAIFADDR_IN6 _IOW('i', 26, struct in6_aliasreq)
-
-#define SIOCSIFPHYADDR_IN6 _IOW('i', 70, struct in6_aliasreq)
-#define SIOCGIFPSRCADDR_IN6 _IOWR('i', 71, struct in6_ifreq)
-#define SIOCGIFPDSTADDR_IN6 _IOWR('i', 72, struct in6_ifreq)
-
-#define SIOCGIFAFLAG_IN6 _IOWR('i', 73, struct in6_ifreq)
-
-#define SIOCGDRLST_IN6 _IOWR('i', 74, struct in6_drlist)
-#define SIOCGPRLST_IN6 _IOWR('i', 75, struct in6_prlist)
-#ifdef _KERNEL
-#define OSIOCGIFINFO_IN6 _IOWR('i', 76, struct in6_ondireq)
-#endif
-#define SIOCGIFINFO_IN6 _IOWR('i', 108, struct in6_ndireq)
-#define SIOCSNDFLUSH_IN6 _IOWR('i', 77, struct in6_ifreq)
-#define SIOCGNBRINFO_IN6 _IOWR('i', 78, struct in6_nbrinfo)
-#define SIOCSPFXFLUSH_IN6 _IOWR('i', 79, struct in6_ifreq)
-#define SIOCSRTRFLUSH_IN6 _IOWR('i', 80, struct in6_ifreq)
-
-#define SIOCGIFALIFETIME_IN6 _IOWR('i', 81, struct in6_ifreq)
-#define SIOCSIFALIFETIME_IN6 _IOWR('i', 82, struct in6_ifreq)
-#define SIOCGIFSTAT_IN6 _IOWR('i', 83, struct in6_ifreq)
-#define SIOCGIFSTAT_ICMP6 _IOWR('i', 84, struct in6_ifreq)
-
-#define SIOCSDEFIFACE_IN6 _IOWR('i', 85, struct in6_ndifreq)
-#define SIOCGDEFIFACE_IN6 _IOWR('i', 86, struct in6_ndifreq)
-
-#define SIOCSIFINFO_FLAGS _IOWR('i', 87, struct in6_ndireq) /* XXX */
-
-#define SIOCSSCOPE6 _IOW('i', 88, struct in6_ifreq)
-#define SIOCGSCOPE6 _IOWR('i', 89, struct in6_ifreq)
-#define SIOCGSCOPE6DEF _IOWR('i', 90, struct in6_ifreq)
-
-#define SIOCSIFPREFIX_IN6 _IOW('i', 100, struct in6_prefixreq) /* set */
-#define SIOCGIFPREFIX_IN6 _IOWR('i', 101, struct in6_prefixreq) /* get */
-#define SIOCDIFPREFIX_IN6 _IOW('i', 102, struct in6_prefixreq) /* del */
-#define SIOCAIFPREFIX_IN6 _IOW('i', 103, struct in6_rrenumreq) /* add */
-#define SIOCCIFPREFIX_IN6 _IOW('i', 104, \
- struct in6_rrenumreq) /* change */
-#define SIOCSGIFPREFIX_IN6 _IOW('i', 105, \
- struct in6_rrenumreq) /* set global */
-
-#define SIOCGETSGCNT_IN6 _IOWR('u', 106, \
- struct sioc_sg_req6) /* get s,g pkt cnt */
-#define SIOCGETMIFCNT_IN6 _IOWR('u', 107, \
- struct sioc_mif_req6) /* get pkt cnt per if */
-
-#define IN6_IFF_ANYCAST 0x01 /* anycast address */
-#define IN6_IFF_TENTATIVE 0x02 /* tentative address */
-#define IN6_IFF_DUPLICATED 0x04 /* DAD detected duplicate */
-#define IN6_IFF_DETACHED 0x08 /* may be detached from the link */
-#define IN6_IFF_DEPRECATED 0x10 /* deprecated address */
-#define IN6_IFF_NODAD 0x20 /* don't perform DAD on this address
- * (used only at first SIOC* call)
- */
-#define IN6_IFF_AUTOCONF 0x40 /* autoconfigurable address. */
-#define IN6_IFF_TEMPORARY 0x80 /* temporary (anonymous) address. */
-#define IN6_IFF_NOPFX 0x8000 /* skip kernel prefix management.
- * XXX: this should be temporary.
- */
-
-/* do not input/output */
-#define IN6_IFF_NOTREADY (IN6_IFF_TENTATIVE|IN6_IFF_DUPLICATED)
-
-#ifdef _KERNEL
-#define IN6_ARE_SCOPE_CMP(a,b) ((a)-(b))
-#define IN6_ARE_SCOPE_EQUAL(a,b) ((a)==(b))
-#endif
-
-#ifdef _KERNEL
-extern struct in6_ifaddr *in6_ifaddr;
-
-extern struct in6_ifstat **in6_ifstat;
-extern size_t in6_ifstatmax;
-extern struct icmp6stat icmp6stat;
-extern struct icmp6_ifstat **icmp6_ifstat;
-extern size_t icmp6_ifstatmax;
-#define in6_ifstat_inc(ifp, tag) \
-do { \
- if ((ifp) && (ifp)->if_index <= if_index \
- && (ifp)->if_index < in6_ifstatmax \
- && in6_ifstat && in6_ifstat[(ifp)->if_index]) { \
- in6_ifstat[(ifp)->if_index]->tag++; \
- } \
-} while (0)
-
-extern struct ifqueue ip6intrq; /* IP6 packet input queue */
-extern struct in6_addr zeroin6_addr;
-extern u_char inet6ctlerrmap[];
-extern unsigned long in6_maxmtu;
-#ifdef MALLOC_DECLARE
-MALLOC_DECLARE(M_IPMADDR);
-#endif
-
-/*
- * Macro for finding the internet address structure (in6_ifaddr) corresponding
- * to a given interface (ifnet structure).
- */
-
-#define IFP_TO_IA6(ifp, ia) \
-/* struct ifnet *ifp; */ \
-/* struct in6_ifaddr *ia; */ \
-do { \
- struct ifaddr *ifa; \
- for (ifa = (ifp)->if_addrlist.tqh_first; ifa; ifa = ifa->ifa_list.tqe_next) { \
- if (!ifa->ifa_addr) \
- continue; \
- if (ifa->ifa_addr->sa_family == AF_INET6) \
- break; \
- } \
- (ia) = (struct in6_ifaddr *)ifa; \
-} while (0)
-
-#endif /* _KERNEL */
-
-/*
- * Multi-cast membership entry. One for each group/ifp that a PCB
- * belongs to.
- */
-struct in6_multi_mship {
- struct in6_multi *i6mm_maddr; /* Multicast address pointer */
- LIST_ENTRY(in6_multi_mship) i6mm_chain; /* multicast options chain */
-};
-
-struct in6_multi {
- LIST_ENTRY(in6_multi) in6m_entry; /* list glue */
- struct in6_addr in6m_addr; /* IP6 multicast address */
- struct ifnet *in6m_ifp; /* back pointer to ifnet */
- struct ifmultiaddr *in6m_ifma; /* back pointer to ifmultiaddr */
- u_int in6m_refcount; /* # membership claims by sockets */
- u_int in6m_state; /* state of the membership */
- u_int in6m_timer; /* MLD6 listener report timer */
-};
-
-#ifdef _KERNEL
-extern LIST_HEAD(in6_multihead, in6_multi) in6_multihead;
-
-/*
- * Structure used by macros below to remember position when stepping through
- * all of the in6_multi records.
- */
-struct in6_multistep {
- struct in6_ifaddr *i_ia;
- struct in6_multi *i_in6m;
-};
-
-/*
- * Macros for looking up the in6_multi record for a given IP6 multicast
- * address on a given interface. If no matching record is found, "in6m"
- * returns NLL.
- */
-
-#define IN6_LOOKUP_MULTI(addr, ifp, in6m) \
-/* struct in6_addr addr; */ \
-/* struct ifnet *ifp; */ \
-/* struct in6_multi *in6m; */ \
-do { \
- struct ifmultiaddr *ifma; \
- TAILQ_FOREACH(ifma, &(ifp)->if_multiaddrs, ifma_link) { \
- if (ifma->ifma_addr->sa_family == AF_INET6 \
- && IN6_ARE_ADDR_EQUAL(&((struct sockaddr_in6 *)ifma->ifma_addr)->sin6_addr, \
- &(addr))) \
- break; \
- } \
- (in6m) = (struct in6_multi *)(ifma ? ifma->ifma_protospec : 0); \
-} while(0)
-
-/*
- * Macro to step through all of the in6_multi records, one at a time.
- * The current position is remembered in "step", which the caller must
- * provide. IN6_FIRST_MULTI(), below, must be called to initialize "step"
- * and get the first record. Both macros return a NULL "in6m" when there
- * are no remaining records.
- */
-#define IN6_NEXT_MULTI(step, in6m) \
-/* struct in6_multistep step; */ \
-/* struct in6_multi *in6m; */ \
-do { \
- if (((in6m) = (step).i_in6m) != NULL) \
- (step).i_in6m = (step).i_in6m->in6m_entry.le_next; \
-} while(0)
-
-#define IN6_FIRST_MULTI(step, in6m) \
-/* struct in6_multistep step; */ \
-/* struct in6_multi *in6m */ \
-do { \
- (step).i_in6m = in6_multihead.lh_first; \
- IN6_NEXT_MULTI((step), (in6m)); \
-} while(0)
-
-struct in6_multi *in6_addmulti __P((struct in6_addr *, struct ifnet *,
- int *));
-void in6_delmulti __P((struct in6_multi *));
-extern int in6_ifindex2scopeid __P((int));
-extern int in6_mask2len __P((struct in6_addr *, u_char *));
-extern void in6_len2mask __P((struct in6_addr *, int));
-int in6_control __P((struct socket *,
- u_long, caddr_t, struct ifnet *, struct thread *));
-int in6_update_ifa __P((struct ifnet *, struct in6_aliasreq *,
- struct in6_ifaddr *));
-void in6_purgeaddr __P((struct ifaddr *));
-int in6if_do_dad __P((struct ifnet *));
-void in6_purgeif __P((struct ifnet *));
-void in6_savemkludge __P((struct in6_ifaddr *));
-void in6_setmaxmtu __P((void));
-void in6_restoremkludge __P((struct in6_ifaddr *, struct ifnet *));
-void in6_purgemkludge __P((struct ifnet *));
-struct in6_ifaddr *in6ifa_ifpforlinklocal __P((struct ifnet *, int));
-struct in6_ifaddr *in6ifa_ifpwithaddr __P((struct ifnet *,
- struct in6_addr *));
-char *ip6_sprintf __P((const struct in6_addr *));
-int in6_addr2scopeid __P((struct ifnet *, struct in6_addr *));
-int in6_matchlen __P((struct in6_addr *, struct in6_addr *));
-int in6_are_prefix_equal __P((struct in6_addr *p1, struct in6_addr *p2,
- int len));
-void in6_prefixlen2mask __P((struct in6_addr *maskp, int len));
-int in6_prefix_ioctl __P((struct socket *so, u_long cmd, caddr_t data,
- struct ifnet *ifp));
-int in6_prefix_add_ifid __P((int iilen, struct in6_ifaddr *ia));
-void in6_prefix_remove_ifid __P((int iilen, struct in6_ifaddr *ia));
-void in6_purgeprefix __P((struct ifnet *));
-
-int in6_is_addr_deprecated __P((struct sockaddr_in6 *));
-struct inpcb;
-int in6_embedscope __P((struct in6_addr *, const struct sockaddr_in6 *,
- struct inpcb *, struct ifnet **));
-int in6_recoverscope __P((struct sockaddr_in6 *, const struct in6_addr *,
- struct ifnet *));
-void in6_clearscope __P((struct in6_addr *));
-#endif /* _KERNEL */
-
-#endif /* _NETINET6_IN6_VAR_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/ip6.h b/newlib/libc/sys/linux/include/netinet6/ip6.h
deleted file mode 100644
index 528ff7ce3..000000000
--- a/newlib/libc/sys/linux/include/netinet6/ip6.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/ip6.h,v 1.5 2000/07/04 16:35:09 itojun Exp $ */
-/* $KAME: ip6.h,v 1.7 2000/03/25 07:23:36 sumikawa Exp $ */
-
-#error "netinet6/ip6.h is obsolete. use netinet/ip6.h"
diff --git a/newlib/libc/sys/linux/include/netinet6/ip6_ecn.h b/newlib/libc/sys/linux/include/netinet6/ip6_ecn.h
deleted file mode 100644
index f7b762d5f..000000000
--- a/newlib/libc/sys/linux/include/netinet6/ip6_ecn.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/ip6_ecn.h,v 1.4 2001/06/11 12:39:05 ume Exp $ */
-/* $KAME: ip_ecn.h,v 1.5 2000/03/27 04:58:38 sumikawa Exp $ */
-
-/*
- * Copyright (C) 1999 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- *
- */
-/*
- * ECN consideration on tunnel ingress/egress operation.
- * http://www.aciri.org/floyd/papers/draft-ipsec-ecn-00.txt
- */
-
-#ifdef _KERNEL
-extern void ip6_ecn_ingress __P((int, u_int32_t *, const u_int32_t *));
-extern void ip6_ecn_egress __P((int, const u_int32_t *, u_int32_t *));
-#endif
diff --git a/newlib/libc/sys/linux/include/netinet6/ip6_fw.h b/newlib/libc/sys/linux/include/netinet6/ip6_fw.h
deleted file mode 100644
index ee3aa818f..000000000
--- a/newlib/libc/sys/linux/include/netinet6/ip6_fw.h
+++ /dev/null
@@ -1,231 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/ip6_fw.h,v 1.12 2002/04/19 04:46:22 suz Exp $ */
-/* $KAME: ip6_fw.h,v 1.9 2001/08/01 04:29:57 sumikawa Exp $ */
-
-/*
- * Copyright (C) 1998, 1999, 2000 and 2001 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * Copyright (c) 1993 Daniel Boulet
- * Copyright (c) 1994 Ugen J.S.Antsilevich
- *
- * Redistribution and use in source forms, with and without modification,
- * are permitted provided that this entire comment appears intact.
- *
- * Redistribution in binary form may occur without any restrictions.
- * Obviously, it would be nice if you gave credit where credit is due
- * but requiring it would be too onerous.
- *
- * This software is provided ``AS IS'' without any warranties of any kind.
- *
- */
-
-#ifndef _IP6_FW_H
-#define _IP6_FW_H
-
-#include <net/if.h>
-
-/*
- * This union structure identifies an interface, either explicitly
- * by name or implicitly by IP address. The flags IP_FW_F_IIFNAME
- * and IP_FW_F_OIFNAME say how to interpret this structure. An
- * interface unit number of -1 matches any unit number, while an
- * IP address of 0.0.0.0 indicates matches any interface.
- *
- * The receive and transmit interfaces are only compared against the
- * the packet if the corresponding bit (IP_FW_F_IIFACE or IP_FW_F_OIFACE)
- * is set. Note some packets lack a receive or transmit interface
- * (in which case the missing "interface" never matches).
- */
-
-union ip6_fw_if {
- struct in6_addr fu_via_ip6; /* Specified by IPv6 address */
- struct { /* Specified by interface name */
-#define IP6FW_IFNLEN IFNAMSIZ
- char name[IP6FW_IFNLEN];
- short unit; /* -1 means match any unit */
- } fu_via_if;
-};
-
-/*
- * Format of an IP firewall descriptor
- *
- * fw_src, fw_dst, fw_smsk, fw_dmsk are always stored in network byte order.
- * fw_flg and fw_n*p are stored in host byte order (of course).
- * Port numbers are stored in HOST byte order.
- * Warning: setsockopt() will fail if sizeof(struct ip_fw) > MLEN (108)
- */
-
-struct ip6_fw {
- u_long fw_pcnt,fw_bcnt; /* Packet and byte counters */
- struct in6_addr fw_src, fw_dst; /* Source and destination IPv6 addr */
- struct in6_addr fw_smsk, fw_dmsk; /* Mask for src and dest IPv6 addr */
- u_short fw_number; /* Rule number */
- u_short fw_flg; /* Flags word */
-#define IPV6_FW_MAX_PORTS 10 /* A reasonable maximum */
- u_int fw_ipflg; /* IP flags word */
- u_short fw_pts[IPV6_FW_MAX_PORTS]; /* Array of port numbers to match */
- u_char fw_ip6opt,fw_ip6nopt; /* IPv6 options set/unset */
- u_char fw_tcpf,fw_tcpnf; /* TCP flags set/unset */
-#define IPV6_FW_ICMPTYPES_DIM (256 / (sizeof(unsigned) * 8))
- unsigned fw_icmp6types[IPV6_FW_ICMPTYPES_DIM]; /* ICMP types bitmap */
- long timestamp; /* timestamp (tv_sec) of last match */
- union ip6_fw_if fw_in_if, fw_out_if;/* Incoming and outgoing interfaces */
- union {
- u_short fu_divert_port; /* Divert/tee port (options IP6DIVERT) */
- u_short fu_skipto_rule; /* SKIPTO command rule number */
- u_short fu_reject_code; /* REJECT response code */
- } fw_un;
- u_char fw_prot; /* IPv6 protocol */
- u_char fw_nports; /* N'of src ports and # of dst ports */
- /* in ports array (dst ports follow */
- /* src ports; max of 10 ports in all; */
- /* count of 0 means match all ports) */
-};
-
-#define IPV6_FW_GETNSRCP(rule) ((rule)->fw_nports & 0x0f)
-#define IPV6_FW_SETNSRCP(rule, n) do { \
- (rule)->fw_nports &= ~0x0f; \
- (rule)->fw_nports |= (n); \
- } while (0)
-#define IPV6_FW_GETNDSTP(rule) ((rule)->fw_nports >> 4)
-#define IPV6_FW_SETNDSTP(rule, n) do { \
- (rule)->fw_nports &= ~0xf0; \
- (rule)->fw_nports |= (n) << 4;\
- } while (0)
-
-#define fw_divert_port fw_un.fu_divert_port
-#define fw_skipto_rule fw_un.fu_skipto_rule
-#define fw_reject_code fw_un.fu_reject_code
-
-struct ip6_fw_chain {
- LIST_ENTRY(ip6_fw_chain) chain;
- struct ip6_fw *rule;
-};
-
-/*
- * Values for "flags" field .
- */
-#define IPV6_FW_F_IN 0x0001 /* Check inbound packets */
-#define IPV6_FW_F_OUT 0x0002 /* Check outbound packets */
-#define IPV6_FW_F_IIFACE 0x0004 /* Apply inbound interface test */
-#define IPV6_FW_F_OIFACE 0x0008 /* Apply outbound interface test */
-
-#define IPV6_FW_F_COMMAND 0x0070 /* Mask for type of chain entry: */
-#define IPV6_FW_F_DENY 0x0000 /* This is a deny rule */
-#define IPV6_FW_F_REJECT 0x0010 /* Deny and send a response packet */
-#define IPV6_FW_F_ACCEPT 0x0020 /* This is an accept rule */
-#define IPV6_FW_F_COUNT 0x0030 /* This is a count rule */
-#define IPV6_FW_F_DIVERT 0x0040 /* This is a divert rule */
-#define IPV6_FW_F_TEE 0x0050 /* This is a tee rule */
-#define IPV6_FW_F_SKIPTO 0x0060 /* This is a skipto rule */
-
-#define IPV6_FW_F_PRN 0x0080 /* Print if this rule matches */
-
-#define IPV6_FW_F_SRNG 0x0100 /* The first two src ports are a min *
- * and max range (stored in host byte *
- * order). */
-
-#define IPV6_FW_F_DRNG 0x0200 /* The first two dst ports are a min *
- * and max range (stored in host byte *
- * order). */
-
-#define IPV6_FW_F_IIFNAME 0x0400 /* In interface by name/unit (not IP) */
-#define IPV6_FW_F_OIFNAME 0x0800 /* Out interface by name/unit (not IP) */
-
-#define IPV6_FW_F_INVSRC 0x1000 /* Invert sense of src check */
-#define IPV6_FW_F_INVDST 0x2000 /* Invert sense of dst check */
-
-#define IPV6_FW_F_FRAG 0x4000 /* Fragment */
-
-#define IPV6_FW_F_ICMPBIT 0x8000 /* ICMP type bitmap is valid */
-
-#define IPV6_FW_F_MASK 0xFFFF /* All possible flag bits mask */
-
-/*
- * Flags for the 'fw_ipflg' field, for comparing values of ip and its protocols. */
-#define IPV6_FW_IF_TCPEST 0x00000020 /* established TCP connection */
-#define IPV6_FW_IF_TCPMSK 0x00000020 /* mask of all TCP values */
-
-/*
- * For backwards compatibility with rules specifying "via iface" but
- * not restricted to only "in" or "out" packets, we define this combination
- * of bits to represent this configuration.
- */
-
-#define IF6_FW_F_VIAHACK (IPV6_FW_F_IN|IPV6_FW_F_OUT|IPV6_FW_F_IIFACE|IPV6_FW_F_OIFACE)
-
-/*
- * Definitions for REJECT response codes.
- * Values less than 256 correspond to ICMP unreachable codes.
- */
-#define IPV6_FW_REJECT_RST 0x0100 /* TCP packets: send RST */
-
-/*
- * Definitions for IPv6 option names.
- */
-#define IPV6_FW_IP6OPT_HOPOPT 0x01
-#define IPV6_FW_IP6OPT_ROUTE 0x02
-#define IPV6_FW_IP6OPT_FRAG 0x04
-#define IPV6_FW_IP6OPT_ESP 0x08
-#define IPV6_FW_IP6OPT_AH 0x10
-#define IPV6_FW_IP6OPT_NONXT 0x20
-#define IPV6_FW_IP6OPT_OPTS 0x40
-
-/*
- * Definitions for TCP flags.
- */
-#define IPV6_FW_TCPF_FIN TH_FIN
-#define IPV6_FW_TCPF_SYN TH_SYN
-#define IPV6_FW_TCPF_RST TH_RST
-#define IPV6_FW_TCPF_PSH TH_PUSH
-#define IPV6_FW_TCPF_ACK TH_ACK
-#define IPV6_FW_TCPF_URG TH_URG
-
-/*
- * Main firewall chains definitions and global var's definitions.
- */
-#ifdef _KERNEL
-
-/*
- * Function definitions.
- */
-void ip6_fw_init(void);
-
-/* Firewall hooks */
-struct ip6_hdr;
-typedef int ip6_fw_chk_t __P((struct ip6_hdr**, struct ifnet*,
- u_short *, struct mbuf**));
-typedef int ip6_fw_ctl_t __P((int, struct mbuf**));
-extern ip6_fw_chk_t *ip6_fw_chk_ptr;
-extern ip6_fw_ctl_t *ip6_fw_ctl_ptr;
-extern int ip6_fw_enable;
-
-#endif /* _KERNEL */
-
-#endif /* _IP6_FW_H */
diff --git a/newlib/libc/sys/linux/include/netinet6/ip6_mroute.h b/newlib/libc/sys/linux/include/netinet6/ip6_mroute.h
deleted file mode 100644
index 0cd915c68..000000000
--- a/newlib/libc/sys/linux/include/netinet6/ip6_mroute.h
+++ /dev/null
@@ -1,277 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/ip6_mroute.h,v 1.5 2002/04/19 04:46:23 suz Exp $ */
-/* $KAME: ip6_mroute.h,v 1.19 2001/06/14 06:12:55 suz Exp $ */
-
-/*
- * Copyright (C) 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/* BSDI ip_mroute.h,v 2.5 1996/10/11 16:01:48 pjd Exp */
-
-/*
- * Definitions for IP multicast forwarding.
- *
- * Written by David Waitzman, BBN Labs, August 1988.
- * Modified by Steve Deering, Stanford, February 1989.
- * Modified by Ajit Thyagarajan, PARC, August 1993.
- * Modified by Ajit Thyagarajan, PARC, August 1994.
- * Modified by Ahmed Helmy, USC, September 1996.
- *
- * MROUTING Revision: 1.2
- */
-
-#ifndef _NETINET6_IP6_MROUTE_H_
-#define _NETINET6_IP6_MROUTE_H_
-
-/*
- * Multicast Routing set/getsockopt commands.
- */
-#ifdef _KERNEL
-#define MRT6_OINIT 100 /* initialize forwarder (omrt6msg) */
-#endif
-#define MRT6_DONE 101 /* shut down forwarder */
-#define MRT6_ADD_MIF 102 /* add multicast interface */
-#define MRT6_DEL_MIF 103 /* delete multicast interface */
-#define MRT6_ADD_MFC 104 /* insert forwarding cache entry */
-#define MRT6_DEL_MFC 105 /* delete forwarding cache entry */
-#define MRT6_PIM 107 /* enable pim code */
-#define MRT6_INIT 108 /* initialize forwarder (mrt6msg) */
-
-#if BSD >= 199103
-#define GET_TIME(t) microtime(&t)
-#elif defined(sun)
-#define GET_TIME(t) uniqtime(&t)
-#else
-#define GET_TIME(t) ((t) = time)
-#endif
-
-/*
- * Types and macros for handling bitmaps with one bit per multicast interface.
- */
-typedef u_short mifi_t; /* type of a mif index */
-#define MAXMIFS 64
-
-#ifndef IF_SETSIZE
-#define IF_SETSIZE 256
-#endif
-
-typedef u_int32_t if_mask;
-#define NIFBITS (sizeof(if_mask) * NBBY) /* bits per mask */
-
-#ifndef howmany
-#define howmany(x, y) (((x) + ((y) - 1)) / (y))
-#endif
-
-typedef struct if_set {
- if_mask ifs_bits[howmany(IF_SETSIZE, NIFBITS)];
-} if_set;
-
-#define IF_SET(n, p) ((p)->ifs_bits[(n)/NIFBITS] |= (1 << ((n) % NIFBITS)))
-#define IF_CLR(n, p) ((p)->ifs_bits[(n)/NIFBITS] &= ~(1 << ((n) % NIFBITS)))
-#define IF_ISSET(n, p) ((p)->ifs_bits[(n)/NIFBITS] & (1 << ((n) % NIFBITS)))
-#define IF_COPY(f, t) bcopy(f, t, sizeof(*(f)))
-#define IF_ZERO(p) bzero(p, sizeof(*(p)))
-
-/*
- * Argument structure for MRT6_ADD_IF.
- */
-struct mif6ctl {
- mifi_t mif6c_mifi; /* the index of the mif to be added */
- u_char mif6c_flags; /* MIFF_ flags defined below */
- u_short mif6c_pifi; /* the index of the physical IF */
-#ifdef notyet
- u_int mif6c_rate_limit; /* max rate */
-#endif
-};
-
-#define MIFF_REGISTER 0x1 /* mif represents a register end-point */
-
-/*
- * Argument structure for MRT6_ADD_MFC and MRT6_DEL_MFC
- */
-struct mf6cctl {
- struct sockaddr_in6 mf6cc_origin; /* IPv6 origin of mcasts */
- struct sockaddr_in6 mf6cc_mcastgrp; /* multicast group associated */
- mifi_t mf6cc_parent; /* incoming ifindex */
- struct if_set mf6cc_ifset; /* set of forwarding ifs */
-};
-
-/*
- * The kernel's multicast routing statistics.
- */
-struct mrt6stat {
- u_quad_t mrt6s_mfc_lookups; /* # forw. cache hash table hits */
- u_quad_t mrt6s_mfc_misses; /* # forw. cache hash table misses */
- u_quad_t mrt6s_upcalls; /* # calls to mrouted */
- u_quad_t mrt6s_no_route; /* no route for packet's origin */
- u_quad_t mrt6s_bad_tunnel; /* malformed tunnel options */
- u_quad_t mrt6s_cant_tunnel; /* no room for tunnel options */
- u_quad_t mrt6s_wrong_if; /* arrived on wrong interface */
- u_quad_t mrt6s_upq_ovflw; /* upcall Q overflow */
- u_quad_t mrt6s_cache_cleanups; /* # entries with no upcalls */
- u_quad_t mrt6s_drop_sel; /* pkts dropped selectively */
- u_quad_t mrt6s_q_overflow; /* pkts dropped - Q overflow */
- u_quad_t mrt6s_pkt2large; /* pkts dropped - size > BKT SIZE */
- u_quad_t mrt6s_upq_sockfull; /* upcalls dropped - socket full */
-};
-
-#ifdef MRT6_OINIT
-/*
- * Struct used to communicate from kernel to multicast router
- * note the convenient similarity to an IPv6 header.
- * XXX old version, superseded by mrt6msg.
- */
-struct omrt6msg {
- u_long unused1;
- u_char im6_msgtype; /* what type of message */
-#if 0
-#define MRT6MSG_NOCACHE 1
-#define MRT6MSG_WRONGMIF 2
-#define MRT6MSG_WHOLEPKT 3 /* used for user level encap*/
-#endif
- u_char im6_mbz; /* must be zero */
- u_char im6_mif; /* mif rec'd on */
- u_char unused2;
- struct in6_addr im6_src, im6_dst;
-};
-#endif
-
-/*
- * Structure used to communicate from kernel to multicast router.
- * We'll overlay the structure onto an MLD header (not an IPv6 header
- * like igmpmsg{} used for IPv4 implementation). This is because this
- * structure will be passed via an IPv6 raw socket, on which an application
- * will only receive the payload i.e. the data after the IPv6 header and all
- * the extension headers. (see Section 3 of draft-ietf-ipngwg-2292bis-01)
- */
-struct mrt6msg {
-#define MRT6MSG_NOCACHE 1
-#define MRT6MSG_WRONGMIF 2
-#define MRT6MSG_WHOLEPKT 3 /* used for user level encap*/
- u_char im6_mbz; /* must be zero */
- u_char im6_msgtype; /* what type of message */
- u_int16_t im6_mif; /* mif rec'd on */
- u_int32_t im6_pad; /* padding for 64bit arch */
- struct in6_addr im6_src, im6_dst;
-};
-
-/*
- * Argument structure used by multicast routing daemon to get src-grp
- * packet counts
- */
-struct sioc_sg_req6 {
- struct sockaddr_in6 src;
- struct sockaddr_in6 grp;
- u_quad_t pktcnt;
- u_quad_t bytecnt;
- u_quad_t wrong_if;
-};
-
-/*
- * Argument structure used by mrouted to get mif pkt counts
- */
-struct sioc_mif_req6 {
- mifi_t mifi; /* mif number */
- u_quad_t icount; /* Input packet count on mif */
- u_quad_t ocount; /* Output packet count on mif */
- u_quad_t ibytes; /* Input byte count on mif */
- u_quad_t obytes; /* Output byte count on mif */
-};
-
-#if defined(_KERNEL) || defined(KERNEL)
-/*
- * The kernel's multicast-interface structure.
- */
-struct mif6 {
- u_char m6_flags; /* MIFF_ flags defined above */
- u_int m6_rate_limit; /* max rate */
-#ifdef notyet
- struct tbf *m6_tbf; /* token bucket structure at intf. */
-#endif
- struct in6_addr m6_lcl_addr; /* local interface address */
- struct ifnet *m6_ifp; /* pointer to interface */
- u_quad_t m6_pkt_in; /* # pkts in on interface */
- u_quad_t m6_pkt_out; /* # pkts out on interface */
- u_quad_t m6_bytes_in; /* # bytes in on interface */
- u_quad_t m6_bytes_out; /* # bytes out on interface */
- struct route_in6 m6_route;/* cached route if this is a tunnel */
-#ifdef notyet
- u_int m6_rsvp_on; /* RSVP listening on this vif */
- struct socket *m6_rsvpd; /* RSVP daemon socket */
-#endif
-};
-
-/*
- * The kernel's multicast forwarding cache entry structure
- */
-struct mf6c {
- struct sockaddr_in6 mf6c_origin; /* IPv6 origin of mcasts */
- struct sockaddr_in6 mf6c_mcastgrp; /* multicast group associated*/
- mifi_t mf6c_parent; /* incoming IF */
- struct if_set mf6c_ifset; /* set of outgoing IFs */
-
- u_quad_t mf6c_pkt_cnt; /* pkt count for src-grp */
- u_quad_t mf6c_byte_cnt; /* byte count for src-grp */
- u_quad_t mf6c_wrong_if; /* wrong if for src-grp */
- int mf6c_expire; /* time to clean entry up */
- struct timeval mf6c_last_assert; /* last time I sent an assert*/
- struct rtdetq *mf6c_stall; /* pkts waiting for route */
- struct mf6c *mf6c_next; /* hash table linkage */
-};
-
-#define MF6C_INCOMPLETE_PARENT ((mifi_t)-1)
-
-/*
- * Argument structure used for pkt info. while upcall is made
- */
-#ifndef _NETINET_IP_MROUTE_H_
-struct rtdetq { /* XXX: rtdetq is also defined in ip_mroute.h */
- struct mbuf *m; /* A copy of the packet */
- struct ifnet *ifp; /* Interface pkt came in on */
-#ifdef UPCALL_TIMING
- struct timeval t; /* Timestamp */
-#endif /* UPCALL_TIMING */
- struct rtdetq *next;
-};
-#endif /* _NETINET_IP_MROUTE_H_ */
-
-#define MF6CTBLSIZ 256
-#if (MF6CTBLSIZ & (MF6CTBLSIZ - 1)) == 0 /* from sys:route.h */
-#define MF6CHASHMOD(h) ((h) & (MF6CTBLSIZ - 1))
-#else
-#define MF6CHASHMOD(h) ((h) % MF6CTBLSIZ)
-#endif
-
-#define MAX_UPQ6 4 /* max. no of pkts in upcall Q */
-
-int ip6_mrouter_set __P((struct socket *so, struct sockopt *sopt));
-int ip6_mrouter_get __P((struct socket *so, struct sockopt *sopt));
-int ip6_mrouter_done __P((void));
-int mrt6_ioctl __P((int, caddr_t));
-#endif /* _KERNEL */
-
-#endif /* !_NETINET6_IP6_MROUTE_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/ip6_var.h b/newlib/libc/sys/linux/include/netinet6/ip6_var.h
deleted file mode 100644
index d93ade77d..000000000
--- a/newlib/libc/sys/linux/include/netinet6/ip6_var.h
+++ /dev/null
@@ -1,354 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/ip6_var.h,v 1.8 2001/09/12 08:37:55 julian Exp $ */
-/* $KAME: ip6_var.h,v 1.62 2001/05/03 14:51:48 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ip_var.h 8.1 (Berkeley) 6/10/93
- */
-
-#ifndef _NETINET6_IP6_VAR_H_
-#define _NETINET6_IP6_VAR_H_
-
-/*
- * IP6 reassembly queue structure. Each fragment
- * being reassembled is attached to one of these structures.
- */
-struct ip6q {
- u_int32_t ip6q_head;
- u_int16_t ip6q_len;
- u_int8_t ip6q_nxt; /* ip6f_nxt in first fragment */
- u_int8_t ip6q_hlim;
- struct ip6asfrag *ip6q_down;
- struct ip6asfrag *ip6q_up;
- u_int32_t ip6q_ident;
- u_int8_t ip6q_arrive;
- u_int8_t ip6q_ttl;
- struct in6_addr ip6q_src, ip6q_dst;
- struct ip6q *ip6q_next;
- struct ip6q *ip6q_prev;
- int ip6q_unfrglen; /* len of unfragmentable part */
-#ifdef notyet
- u_char *ip6q_nxtp;
-#endif
-};
-
-struct ip6asfrag {
- u_int32_t ip6af_head;
- u_int16_t ip6af_len;
- u_int8_t ip6af_nxt;
- u_int8_t ip6af_hlim;
- /* must not override the above members during reassembling */
- struct ip6asfrag *ip6af_down;
- struct ip6asfrag *ip6af_up;
- struct mbuf *ip6af_m;
- int ip6af_offset; /* offset in ip6af_m to next header */
- int ip6af_frglen; /* fragmentable part length */
- int ip6af_off; /* fragment offset */
- u_int16_t ip6af_mff; /* more fragment bit in frag off */
-};
-
-#define IP6_REASS_MBUF(ip6af) (*(struct mbuf **)&((ip6af)->ip6af_m))
-
-struct ip6_moptions {
- struct ifnet *im6o_multicast_ifp; /* ifp for outgoing multicasts */
- u_char im6o_multicast_hlim; /* hoplimit for outgoing multicasts */
- u_char im6o_multicast_loop; /* 1 >= hear sends if a member */
- LIST_HEAD(, in6_multi_mship) im6o_memberships;
-};
-
-/*
- * Control options for outgoing packets
- */
-
-/* Routing header related info */
-struct ip6po_rhinfo {
- struct ip6_rthdr *ip6po_rhi_rthdr; /* Routing header */
- struct route_in6 ip6po_rhi_route; /* Route to the 1st hop */
-};
-#define ip6po_rthdr ip6po_rhinfo.ip6po_rhi_rthdr
-#define ip6po_route ip6po_rhinfo.ip6po_rhi_route
-
-struct ip6_pktopts {
- struct mbuf *ip6po_m; /* Pointer to mbuf storing the data */
- int ip6po_hlim; /* Hoplimit for outgoing packets */
-
- /* Outgoing IF/address information */
- struct in6_pktinfo *ip6po_pktinfo;
-
- struct sockaddr *ip6po_nexthop; /* Next-hop address */
-
- struct ip6_hbh *ip6po_hbh; /* Hop-by-Hop options header */
-
- /* Destination options header (before a routing header) */
- struct ip6_dest *ip6po_dest1;
-
- /* Routing header related info. */
- struct ip6po_rhinfo ip6po_rhinfo;
-
- /* Destination options header (after a routing header) */
- struct ip6_dest *ip6po_dest2;
-};
-
-/*
- * Control options for incoming packets
- */
-
-struct ip6stat {
- u_quad_t ip6s_total; /* total packets received */
- u_quad_t ip6s_tooshort; /* packet too short */
- u_quad_t ip6s_toosmall; /* not enough data */
- u_quad_t ip6s_fragments; /* fragments received */
- u_quad_t ip6s_fragdropped; /* frags dropped(dups, out of space) */
- u_quad_t ip6s_fragtimeout; /* fragments timed out */
- u_quad_t ip6s_fragoverflow; /* fragments that exceeded limit */
- u_quad_t ip6s_forward; /* packets forwarded */
- u_quad_t ip6s_cantforward; /* packets rcvd for unreachable dest */
- u_quad_t ip6s_redirectsent; /* packets forwarded on same net */
- u_quad_t ip6s_delivered; /* datagrams delivered to upper level*/
- u_quad_t ip6s_localout; /* total ip packets generated here */
- u_quad_t ip6s_odropped; /* lost packets due to nobufs, etc. */
- u_quad_t ip6s_reassembled; /* total packets reassembled ok */
- u_quad_t ip6s_fragmented; /* datagrams sucessfully fragmented */
- u_quad_t ip6s_ofragments; /* output fragments created */
- u_quad_t ip6s_cantfrag; /* don't fragment flag was set, etc. */
- u_quad_t ip6s_badoptions; /* error in option processing */
- u_quad_t ip6s_noroute; /* packets discarded due to no route */
- u_quad_t ip6s_badvers; /* ip6 version != 6 */
- u_quad_t ip6s_rawout; /* total raw ip packets generated */
- u_quad_t ip6s_badscope; /* scope error */
- u_quad_t ip6s_notmember; /* don't join this multicast group */
- u_quad_t ip6s_nxthist[256]; /* next header history */
- u_quad_t ip6s_m1; /* one mbuf */
- u_quad_t ip6s_m2m[32]; /* two or more mbuf */
- u_quad_t ip6s_mext1; /* one ext mbuf */
- u_quad_t ip6s_mext2m; /* two or more ext mbuf */
- u_quad_t ip6s_exthdrtoolong; /* ext hdr are not continuous */
- u_quad_t ip6s_nogif; /* no match gif found */
- u_quad_t ip6s_toomanyhdr; /* discarded due to too many headers */
-
- /*
- * statistics for improvement of the source address selection
- * algorithm:
- * XXX: hardcoded 16 = # of ip6 multicast scope types + 1
- */
- /* number of times that address selection fails */
- u_quad_t ip6s_sources_none;
- /* number of times that an address on the outgoing I/F is chosen */
- u_quad_t ip6s_sources_sameif[16];
- /* number of times that an address on a non-outgoing I/F is chosen */
- u_quad_t ip6s_sources_otherif[16];
- /*
- * number of times that an address that has the same scope
- * from the destination is chosen.
- */
- u_quad_t ip6s_sources_samescope[16];
- /*
- * number of times that an address that has a different scope
- * from the destination is chosen.
- */
- u_quad_t ip6s_sources_otherscope[16];
- /* number of times that an deprecated address is chosen */
- u_quad_t ip6s_sources_deprecated[16];
-
- u_quad_t ip6s_forward_cachehit;
- u_quad_t ip6s_forward_cachemiss;
-};
-
-#ifdef _KERNEL
-/*
- * IPv6 onion peeling state.
- * it will be initialized when we come into ip6_input().
- * XXX do not make it a kitchen sink!
- */
-struct ip6aux {
- u_int32_t ip6a_flags;
-#define IP6A_SWAP 0x01 /* swapped home/care-of on packet */
-#define IP6A_HASEEN 0x02 /* HA was present */
-#define IP6A_BRUID 0x04 /* BR Unique Identifier was present */
-#define IP6A_RTALERTSEEN 0x08 /* rtalert present */
-
- /* ip6.ip6_src */
- struct in6_addr ip6a_careof; /* care-of address of the peer */
- struct in6_addr ip6a_home; /* home address of the peer */
- u_int16_t ip6a_bruid; /* BR unique identifier */
-
- /* ip6.ip6_dst */
- struct in6_ifaddr *ip6a_dstia6; /* my ifaddr that matches ip6_dst */
-
- /* rtalert */
- u_int16_t ip6a_rtalert; /* rtalert option value */
-
- /*
- * decapsulation history will be here.
- * with IPsec it may not be accurate.
- */
-};
-#endif
-
-#ifdef _KERNEL
-/* flags passed to ip6_output as last parameter */
-#define IPV6_DADOUTPUT 0x01 /* DAD */
-#define IPV6_FORWARDING 0x02 /* most of IPv6 header exists */
-#define IPV6_MINMTU 0x04 /* use minimum MTU (IPV6_USE_MIN_MTU) */
-
-extern struct ip6stat ip6stat; /* statistics */
-extern u_int32_t ip6_id; /* fragment identifier */
-extern int ip6_defhlim; /* default hop limit */
-extern int ip6_defmcasthlim; /* default multicast hop limit */
-extern int ip6_forwarding; /* act as router? */
-extern int ip6_forward_srcrt; /* forward src-routed? */
-extern int ip6_gif_hlim; /* Hop limit for gif encap packet */
-extern int ip6_use_deprecated; /* allow deprecated addr as source */
-extern int ip6_rr_prune; /* router renumbering prefix
- * walk list every 5 sec. */
-#define ip6_mapped_addr_on (!ip6_v6only)
-extern int ip6_v6only;
-
-extern struct socket *ip6_mrouter; /* multicast routing daemon */
-extern int ip6_sendredirects; /* send IP redirects when forwarding? */
-extern int ip6_maxfragpackets; /* Maximum packets in reassembly queue */
-extern int ip6_sourcecheck; /* Verify source interface */
-extern int ip6_sourcecheck_interval; /* Interval between log messages */
-extern int ip6_accept_rtadv; /* Acts as a host not a router */
-extern int ip6_keepfaith; /* Firewall Aided Internet Translator */
-extern int ip6_log_interval;
-extern time_t ip6_log_time;
-extern int ip6_hdrnestlimit; /* upper limit of # of extension headers */
-extern int ip6_dad_count; /* DupAddrDetectionTransmits */
-
-extern u_int32_t ip6_flow_seq;
-extern int ip6_auto_flowlabel;
-extern int ip6_auto_linklocal;
-
-extern int ip6_anonportmin; /* minimum ephemeral port */
-extern int ip6_anonportmax; /* maximum ephemeral port */
-extern int ip6_lowportmin; /* minimum reserved port */
-extern int ip6_lowportmax; /* maximum reserved port */
-
-extern int ip6_use_tempaddr; /* whether to use temporary addresses. */
-
-extern struct pr_usrreqs rip6_usrreqs;
-struct sockopt;
-
-struct inpcb;
-
-int icmp6_ctloutput __P((struct socket *, struct sockopt *sopt));
-
-struct in6_ifaddr;
-void ip6_init __P((void));
-void ip6intr __P((void));
-void ip6_input __P((struct mbuf *));
-struct in6_ifaddr *ip6_getdstifaddr __P((struct mbuf *));
-void ip6_freepcbopts __P((struct ip6_pktopts *));
-void ip6_freemoptions __P((struct ip6_moptions *));
-int ip6_unknown_opt __P((u_int8_t *, struct mbuf *, int));
-char * ip6_get_prevhdr __P((struct mbuf *, int));
-int ip6_nexthdr __P((struct mbuf *, int, int, int *));
-int ip6_lasthdr __P((struct mbuf *, int, int, int *));
-
-struct mbuf *ip6_addaux __P((struct mbuf *));
-struct mbuf *ip6_findaux __P((struct mbuf *));
-void ip6_delaux __P((struct mbuf *));
-
-int ip6_mforward __P((struct ip6_hdr *, struct ifnet *, struct mbuf *));
-int ip6_process_hopopts __P((struct mbuf *, u_int8_t *, int, u_int32_t *,
- u_int32_t *));
-void ip6_savecontrol __P((struct inpcb *, struct mbuf **, struct ip6_hdr *,
- struct mbuf *));
-void ip6_notify_pmtu __P((struct inpcb *, struct sockaddr_in6 *,
- u_int32_t *));
-int ip6_sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
-
-void ip6_forward __P((struct mbuf *, int));
-
-void ip6_mloopback __P((struct ifnet *, struct mbuf *, struct sockaddr_in6 *));
-int ip6_output __P((struct mbuf *, struct ip6_pktopts *,
- struct route_in6 *,
- int,
- struct ip6_moptions *, struct ifnet **));
-int ip6_ctloutput __P((struct socket *, struct sockopt *sopt));
-void init_ip6pktopts __P((struct ip6_pktopts *));
-int ip6_setpktoptions __P((struct mbuf *, struct ip6_pktopts *, int, int));
-void ip6_clearpktopts __P((struct ip6_pktopts *, int, int));
-struct ip6_pktopts *ip6_copypktopts __P((struct ip6_pktopts *, int));
-int ip6_optlen __P((struct inpcb *));
-
-int route6_input __P((struct mbuf **, int *, int));
-
-void frag6_init __P((void));
-int frag6_input __P((struct mbuf **, int *, int));
-void frag6_slowtimo __P((void));
-void frag6_drain __P((void));
-
-void rip6_init __P((void));
-int rip6_input __P((struct mbuf **mp, int *offp, int proto));
-void rip6_ctlinput __P((int, struct sockaddr *, void *));
-int rip6_ctloutput __P((struct socket *so, struct sockopt *sopt));
-int rip6_output __P((struct mbuf *, ...));
-int rip6_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *, struct thread *));
-
-int dest6_input __P((struct mbuf **, int *, int));
-int none_input __P((struct mbuf **, int *, int));
-#endif /* _KERNEL */
-
-#endif /* !_NETINET6_IP6_VAR_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/ip6protosw.h b/newlib/libc/sys/linux/include/netinet6/ip6protosw.h
deleted file mode 100644
index 98d3a1dd9..000000000
--- a/newlib/libc/sys/linux/include/netinet6/ip6protosw.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/ip6protosw.h,v 1.9 2002/04/19 04:46:23 suz Exp $ */
-/* $KAME: ip6protosw.h,v 1.25 2001/09/26 06:13:03 keiichi Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- *
- */
-
-/* BSDI protosw.h,v 2.3 1996/10/11 16:02:40 pjd Exp */
-
-/*-
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)protosw.h 8.1 (Berkeley) 6/2/93
- */
-
-#ifndef _NETINET6_IP6PROTOSW_H_
-#define _NETINET6_IP6PROTOSW_H_
-
-/*
- * For pfil_head structure.
- */
-#include <net/pfil.h>
-
-/*
- * Protocol switch table for IPv6.
- * All other definitions should refer to sys/protosw.h
- */
-
-struct mbuf;
-struct sockaddr;
-struct socket;
-struct domain;
-struct thread;
-struct ip6_hdr;
-struct icmp6_hdr;
-struct in6_addr;
-struct pr_usrreqs;
-
-/*
- * argument type for the last arg of pr_ctlinput().
- * should be consulted only with AF_INET6 family.
- *
- * IPv6 ICMP IPv6 [exthdrs] finalhdr paylaod
- * ^ ^ ^ ^
- * | | ip6c_ip6 ip6c_off
- * | ip6c_icmp6
- * ip6c_m
- *
- * ip6c_finaldst usually points to ip6c_ip6->ip6_dst. if the original
- * (internal) packet carries a routing header, it may point the final
- * dstination address in the routing header.
- *
- * ip6c_src: ip6c_ip6->ip6_src + scope info + flowlabel in ip6c_ip6
- * (beware of flowlabel, if you try to compare it against others)
- * ip6c_dst: ip6c_finaldst + scope info
- */
-struct ip6ctlparam {
- struct mbuf *ip6c_m; /* start of mbuf chain */
- struct icmp6_hdr *ip6c_icmp6; /* icmp6 header of target packet */
- struct ip6_hdr *ip6c_ip6; /* ip6 header of target packet */
- int ip6c_off; /* offset of the target proto header */
- struct sockaddr_in6 *ip6c_src; /* srcaddr w/ additional info */
- struct sockaddr_in6 *ip6c_dst; /* (final) dstaddr w/ additional info */
- struct in6_addr *ip6c_finaldst; /* final destination address */
- void *ip6c_cmdarg; /* control command dependent data */
- u_int8_t ip6c_nxt; /* final next header field */
-};
-
-struct ip6protosw {
- short pr_type; /* socket type used for */
- struct domain *pr_domain; /* domain protocol a member of */
- short pr_protocol; /* protocol number */
- short pr_flags; /* see below */
-
-/* protocol-protocol hooks */
- int (*pr_input) /* input to protocol (from below) */
- __P((struct mbuf **, int *, int));
- int (*pr_output) /* output to protocol (from above) */
- __P((struct mbuf *, ...));
- void (*pr_ctlinput) /* control input (from below) */
- __P((int, struct sockaddr *, void *));
- int (*pr_ctloutput) /* control output (from above) */
- __P((struct socket *, struct sockopt *));
-
-/* user-protocol hook */
- int (*pr_usrreq) /* user request: see list below */
- __P((struct socket *, int, struct mbuf *,
- struct mbuf *, struct mbuf *, struct thread *));
-
-/* utility hooks */
- void (*pr_init) /* initialization hook */
- __P((void));
-
- void (*pr_fasttimo) /* fast timeout (200ms) */
- __P((void));
- void (*pr_slowtimo) /* slow timeout (500ms) */
- __P((void));
- void (*pr_drain) /* flush any excess space possible */
- __P((void));
- struct pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */
- struct pfil_head pr_pfh;
-};
-
-#ifdef _KERNEL
-extern struct ip6protosw inet6sw[];
-#endif
-
-#endif /* !_NETINET6_IP6PROTOSW_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/ipcomp.h b/newlib/libc/sys/linux/include/netinet6/ipcomp.h
deleted file mode 100644
index c9302e079..000000000
--- a/newlib/libc/sys/linux/include/netinet6/ipcomp.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/ipcomp.h,v 1.4 2002/04/19 04:46:23 suz Exp $ */
-/* $KAME: ipcomp.h,v 1.11 2001/09/04 08:43:19 itojun Exp $ */
-
-/*
- * Copyright (C) 1999 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * RFC2393 IP payload compression protocol (IPComp).
- */
-
-#ifndef _NETINET6_IPCOMP_H_
-#define _NETINET6_IPCOMP_H_
-
-#if defined(_KERNEL) && !defined(_LKM)
-#include "opt_inet.h"
-#endif
-
-struct ipcomp {
- u_int8_t comp_nxt; /* Next Header */
- u_int8_t comp_flags; /* reserved, must be zero */
- u_int16_t comp_cpi; /* Compression parameter index */
-};
-
-/* well-known algorithm number (in CPI), from RFC2409 */
-#define IPCOMP_OUI 1 /* vendor specific */
-#define IPCOMP_DEFLATE 2 /* RFC2394 */
-#define IPCOMP_LZS 3 /* RFC2395 */
-#define IPCOMP_MAX 4
-
-#define IPCOMP_CPI_NEGOTIATE_MIN 256
-
-#ifdef _KERNEL
-struct ipcomp_algorithm {
- int (*compress) __P((struct mbuf *, struct mbuf *, size_t *));
- int (*decompress) __P((struct mbuf *, struct mbuf *, size_t *));
- size_t minplen; /* minimum required length for compression */
-};
-
-struct ipsecrequest;
-extern const struct ipcomp_algorithm *ipcomp_algorithm_lookup __P((int));
-extern void ipcomp4_input __P((struct mbuf *, int));
-extern int ipcomp4_output __P((struct mbuf *, struct ipsecrequest *));
-#endif /* KERNEL */
-
-#endif /* _NETINET6_IPCOMP_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/ipcomp6.h b/newlib/libc/sys/linux/include/netinet6/ipcomp6.h
deleted file mode 100644
index e5ec1537d..000000000
--- a/newlib/libc/sys/linux/include/netinet6/ipcomp6.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/ipcomp6.h,v 1.2 2001/06/11 12:39:06 ume Exp $ */
-/* $KAME: ipcomp.h,v 1.8 2000/09/26 07:55:14 itojun Exp $ */
-
-/*
- * Copyright (C) 1999 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * RFC2393 IP payload compression protocol (IPComp).
- */
-
-#ifndef _NETINET6_IPCOMP6_H_
-#define _NETINET6_IPCOMP6_H_
-
-#ifdef _KERNEL
-extern int ipcomp6_input __P((struct mbuf **, int *, int));
-extern int ipcomp6_output __P((struct mbuf *, u_char *, struct mbuf *,
- struct ipsecrequest *));
-#endif /*KERNEL*/
-
-#endif /*_NETINET6_IPCOMP6_H_*/
diff --git a/newlib/libc/sys/linux/include/netinet6/ipsec.h b/newlib/libc/sys/linux/include/netinet6/ipsec.h
deleted file mode 100644
index 5c6cbcfc6..000000000
--- a/newlib/libc/sys/linux/include/netinet6/ipsec.h
+++ /dev/null
@@ -1,354 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/ipsec.h,v 1.9 2002/04/19 04:46:23 suz Exp $ */
-/* $KAME: ipsec.h,v 1.53 2001/11/20 08:32:38 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * IPsec controller part.
- */
-
-#ifndef _NETINET6_IPSEC_H_
-#define _NETINET6_IPSEC_H_
-
-#if defined(_KERNEL) && !defined(_LKM) && !defined(KLD_MODULE)
-#include "opt_inet.h"
-#include "opt_ipsec.h"
-#endif
-
-#include <net/pfkeyv2.h>
-#include <netkey/keydb.h>
-
-#ifdef _KERNEL
-
-/*
- * Security Policy Index
- * Ensure that both address families in the "src" and "dst" are same.
- * When the value of the ul_proto is ICMPv6, the port field in "src"
- * specifies ICMPv6 type, and the port field in "dst" specifies ICMPv6 code.
- */
-struct secpolicyindex {
- u_int8_t dir; /* direction of packet flow, see blow */
- struct sockaddr_storage src; /* IP src address for SP */
- struct sockaddr_storage dst; /* IP dst address for SP */
- u_int8_t prefs; /* prefix length in bits for src */
- u_int8_t prefd; /* prefix length in bits for dst */
- u_int16_t ul_proto; /* upper layer Protocol */
-#ifdef notyet
- uid_t uids;
- uid_t uidd;
- gid_t gids;
- gid_t gidd;
-#endif
-};
-
-/* Security Policy Data Base */
-struct secpolicy {
- LIST_ENTRY(secpolicy) chain;
-
- int refcnt; /* reference count */
- struct secpolicyindex spidx; /* selector */
- u_int32_t id; /* It's unique number on the system. */
- u_int state; /* 0: dead, others: alive */
-#define IPSEC_SPSTATE_DEAD 0
-#define IPSEC_SPSTATE_ALIVE 1
-
- u_int policy; /* DISCARD, NONE or IPSEC, see keyv2.h */
- struct ipsecrequest *req;
- /* pointer to the ipsec request tree, */
- /* if policy == IPSEC else this value == NULL.*/
-
- /*
- * lifetime handler.
- * the policy can be used without limitiation if both lifetime and
- * validtime are zero.
- * "lifetime" is passed by sadb_lifetime.sadb_lifetime_addtime.
- * "validtime" is passed by sadb_lifetime.sadb_lifetime_usetime.
- */
- long created; /* time created the policy */
- long lastused; /* updated every when kernel sends a packet */
- long lifetime; /* duration of the lifetime of this policy */
- long validtime; /* duration this policy is valid without use */
-};
-
-/* Request for IPsec */
-struct ipsecrequest {
- struct ipsecrequest *next;
- /* pointer to next structure */
- /* If NULL, it means the end of chain. */
- struct secasindex saidx;/* hint for search proper SA */
- /* if __ss_len == 0 then no address specified.*/
- u_int level; /* IPsec level defined below. */
-
- struct secasvar *sav; /* place holder of SA for use */
- struct secpolicy *sp; /* back pointer to SP */
-};
-
-/* security policy in PCB */
-struct inpcbpolicy {
- struct secpolicy *sp_in;
- struct secpolicy *sp_out;
- int priv; /* privileged socket ? */
-};
-
-/* SP acquiring list table. */
-struct secspacq {
- LIST_ENTRY(secspacq) chain;
-
- struct secpolicyindex spidx;
-
- long created; /* for lifetime */
- int count; /* for lifetime */
- /* XXX: here is mbuf place holder to be sent ? */
-};
-#endif /* _KERNEL */
-
-/* according to IANA assignment, port 0x0000 and proto 0xff are reserved. */
-#define IPSEC_PORT_ANY 0
-#define IPSEC_ULPROTO_ANY 255
-#define IPSEC_PROTO_ANY 255
-
-/* mode of security protocol */
-/* NOTE: DON'T use IPSEC_MODE_ANY at SPD. It's only use in SAD */
-#define IPSEC_MODE_ANY 0 /* i.e. wildcard. */
-#define IPSEC_MODE_TRANSPORT 1
-#define IPSEC_MODE_TUNNEL 2
-
-/*
- * Direction of security policy.
- * NOTE: Since INVALID is used just as flag.
- * The other are used for loop counter too.
- */
-#define IPSEC_DIR_ANY 0
-#define IPSEC_DIR_INBOUND 1
-#define IPSEC_DIR_OUTBOUND 2
-#define IPSEC_DIR_MAX 3
-#define IPSEC_DIR_INVALID 4
-
-/* Policy level */
-/*
- * IPSEC, ENTRUST and BYPASS are allowed for setsockopt() in PCB,
- * DISCARD, IPSEC and NONE are allowed for setkey() in SPD.
- * DISCARD and NONE are allowed for system default.
- */
-#define IPSEC_POLICY_DISCARD 0 /* discarding packet */
-#define IPSEC_POLICY_NONE 1 /* through IPsec engine */
-#define IPSEC_POLICY_IPSEC 2 /* do IPsec */
-#define IPSEC_POLICY_ENTRUST 3 /* consulting SPD if present. */
-#define IPSEC_POLICY_BYPASS 4 /* only for privileged socket. */
-
-/* Security protocol level */
-#define IPSEC_LEVEL_DEFAULT 0 /* reference to system default */
-#define IPSEC_LEVEL_USE 1 /* use SA if present. */
-#define IPSEC_LEVEL_REQUIRE 2 /* require SA. */
-#define IPSEC_LEVEL_UNIQUE 3 /* unique SA. */
-
-#define IPSEC_MANUAL_REQID_MAX 0x3fff
- /*
- * if security policy level == unique, this id
- * indicate to a relative SA for use, else is
- * zero.
- * 1 - 0x3fff are reserved for manual keying.
- * 0 are reserved for above reason. Others is
- * for kernel use.
- * Note that this id doesn't identify SA
- * by only itself.
- */
-#define IPSEC_REPLAYWSIZE 32
-
-/* statistics for ipsec processing */
-struct ipsecstat {
- u_quad_t in_success; /* succeeded inbound process */
- u_quad_t in_polvio;
- /* security policy violation for inbound process */
- u_quad_t in_nosa; /* inbound SA is unavailable */
- u_quad_t in_inval; /* inbound processing failed due to EINVAL */
- u_quad_t in_nomem; /* inbound processing failed due to ENOBUFS */
- u_quad_t in_badspi; /* failed getting a SPI */
- u_quad_t in_ahreplay; /* AH replay check failed */
- u_quad_t in_espreplay; /* ESP replay check failed */
- u_quad_t in_ahauthsucc; /* AH authentication success */
- u_quad_t in_ahauthfail; /* AH authentication failure */
- u_quad_t in_espauthsucc; /* ESP authentication success */
- u_quad_t in_espauthfail; /* ESP authentication failure */
- u_quad_t in_esphist[256];
- u_quad_t in_ahhist[256];
- u_quad_t in_comphist[256];
- u_quad_t out_success; /* succeeded outbound process */
- u_quad_t out_polvio;
- /* security policy violation for outbound process */
- u_quad_t out_nosa; /* outbound SA is unavailable */
- u_quad_t out_inval; /* outbound process failed due to EINVAL */
- u_quad_t out_nomem; /* inbound processing failed due to ENOBUFS */
- u_quad_t out_noroute; /* there is no route */
- u_quad_t out_esphist[256];
- u_quad_t out_ahhist[256];
- u_quad_t out_comphist[256];
-};
-
-/*
- * Definitions for IPsec & Key sysctl operations.
- */
-/*
- * Names for IPsec & Key sysctl objects
- */
-#define IPSECCTL_STATS 1 /* stats */
-#define IPSECCTL_DEF_POLICY 2
-#define IPSECCTL_DEF_ESP_TRANSLEV 3 /* int; ESP transport mode */
-#define IPSECCTL_DEF_ESP_NETLEV 4 /* int; ESP tunnel mode */
-#define IPSECCTL_DEF_AH_TRANSLEV 5 /* int; AH transport mode */
-#define IPSECCTL_DEF_AH_NETLEV 6 /* int; AH tunnel mode */
-#if 0 /* obsolete, do not reuse */
-#define IPSECCTL_INBOUND_CALL_IKE 7
-#endif
-#define IPSECCTL_AH_CLEARTOS 8
-#define IPSECCTL_AH_OFFSETMASK 9
-#define IPSECCTL_DFBIT 10
-#define IPSECCTL_ECN 11
-#define IPSECCTL_DEBUG 12
-#define IPSECCTL_ESP_RANDPAD 13
-#define IPSECCTL_MAXID 14
-
-#define IPSECCTL_NAMES { \
- { 0, 0 }, \
- { 0, 0 }, \
- { "def_policy", CTLTYPE_INT }, \
- { "esp_trans_deflev", CTLTYPE_INT }, \
- { "esp_net_deflev", CTLTYPE_INT }, \
- { "ah_trans_deflev", CTLTYPE_INT }, \
- { "ah_net_deflev", CTLTYPE_INT }, \
- { 0, 0 }, \
- { "ah_cleartos", CTLTYPE_INT }, \
- { "ah_offsetmask", CTLTYPE_INT }, \
- { "dfbit", CTLTYPE_INT }, \
- { "ecn", CTLTYPE_INT }, \
- { "debug", CTLTYPE_INT }, \
- { "esp_randpad", CTLTYPE_INT }, \
-}
-
-#define IPSEC6CTL_NAMES { \
- { 0, 0 }, \
- { 0, 0 }, \
- { "def_policy", CTLTYPE_INT }, \
- { "esp_trans_deflev", CTLTYPE_INT }, \
- { "esp_net_deflev", CTLTYPE_INT }, \
- { "ah_trans_deflev", CTLTYPE_INT }, \
- { "ah_net_deflev", CTLTYPE_INT }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { 0, 0 }, \
- { "ecn", CTLTYPE_INT }, \
- { "debug", CTLTYPE_INT }, \
- { "esp_randpad", CTLTYPE_INT }, \
-}
-
-#ifdef _KERNEL
-struct ipsec_output_state {
- struct mbuf *m;
- struct route *ro;
- struct sockaddr *dst;
-};
-
-struct ipsec_history {
- int ih_proto;
- u_int32_t ih_spi;
-};
-
-extern int ipsec_debug;
-
-extern struct ipsecstat ipsecstat;
-extern struct secpolicy ip4_def_policy;
-extern int ip4_esp_trans_deflev;
-extern int ip4_esp_net_deflev;
-extern int ip4_ah_trans_deflev;
-extern int ip4_ah_net_deflev;
-extern int ip4_ah_cleartos;
-extern int ip4_ah_offsetmask;
-extern int ip4_ipsec_dfbit;
-extern int ip4_ipsec_ecn;
-extern int ip4_esp_randpad;
-
-#define ipseclog(x) do { if (ipsec_debug) log x; } while (0)
-
-extern struct secpolicy *ipsec4_getpolicybysock
- __P((struct mbuf *, u_int, struct socket *, int *));
-extern struct secpolicy *ipsec4_getpolicybyaddr
- __P((struct mbuf *, u_int, int, int *));
-
-struct inpcb;
-extern int ipsec_init_policy __P((struct socket *so, struct inpcbpolicy **));
-extern int ipsec_copy_policy
- __P((struct inpcbpolicy *, struct inpcbpolicy *));
-extern u_int ipsec_get_reqlevel __P((struct ipsecrequest *));
-
-extern int ipsec4_set_policy __P((struct inpcb *inp, int optname,
- caddr_t request, size_t len, int priv));
-extern int ipsec4_get_policy __P((struct inpcb *inpcb, caddr_t request,
- size_t len, struct mbuf **mp));
-extern int ipsec4_delete_pcbpolicy __P((struct inpcb *));
-extern int ipsec4_in_reject_so __P((struct mbuf *, struct socket *));
-extern int ipsec4_in_reject __P((struct mbuf *, struct inpcb *));
-
-struct secas;
-struct tcpcb;
-extern int ipsec_chkreplay __P((u_int32_t, struct secasvar *));
-extern int ipsec_updatereplay __P((u_int32_t, struct secasvar *));
-
-extern size_t ipsec4_hdrsiz __P((struct mbuf *, u_int, struct inpcb *));
-extern size_t ipsec_hdrsiz_tcp __P((struct tcpcb *));
-
-struct ip;
-extern const char *ipsec4_logpacketstr __P((struct ip *, u_int32_t));
-extern const char *ipsec_logsastr __P((struct secasvar *));
-
-extern void ipsec_dumpmbuf __P((struct mbuf *));
-
-extern int ipsec4_output __P((struct ipsec_output_state *, struct secpolicy *,
- int));
-extern int ipsec4_tunnel_validate __P((struct mbuf *, int, u_int,
- struct secasvar *));
-extern struct mbuf *ipsec_copypkt __P((struct mbuf *));
-extern void ipsec_delaux __P((struct mbuf *));
-extern int ipsec_setsocket __P((struct mbuf *, struct socket *));
-extern struct socket *ipsec_getsocket __P((struct mbuf *));
-extern int ipsec_addhist __P((struct mbuf *, int, u_int32_t));
-extern struct ipsec_history *ipsec_gethist __P((struct mbuf *, int *));
-extern void ipsec_clearhist __P((struct mbuf *));
-#endif /* _KERNEL */
-
-#ifndef _KERNEL
-extern caddr_t ipsec_set_policy __P((char *, int));
-extern int ipsec_get_policylen __P((caddr_t));
-extern char *ipsec_dump_policy __P((caddr_t, char *));
-
-extern const char *ipsec_strerror __P((void));
-#endif /* !_KERNEL */
-
-#endif /* _NETINET6_IPSEC_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/ipsec6.h b/newlib/libc/sys/linux/include/netinet6/ipsec6.h
deleted file mode 100644
index 04a18cf72..000000000
--- a/newlib/libc/sys/linux/include/netinet6/ipsec6.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/ipsec6.h,v 1.5 2001/06/11 12:39:06 ume Exp $ */
-/* $KAME: ipsec.h,v 1.44 2001/03/23 08:08:47 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * IPsec controller part.
- */
-
-#ifndef _NETINET6_IPSEC6_H_
-#define _NETINET6_IPSEC6_H_
-
-#include <net/pfkeyv2.h>
-#include <netkey/keydb.h>
-
-#ifdef _KERNEL
-extern struct ipsecstat ipsec6stat;
-extern struct secpolicy ip6_def_policy;
-extern int ip6_esp_trans_deflev;
-extern int ip6_esp_net_deflev;
-extern int ip6_ah_trans_deflev;
-extern int ip6_ah_net_deflev;
-extern int ip6_ipsec_ecn;
-extern int ip6_esp_randpad;
-
-extern struct secpolicy *ipsec6_getpolicybysock
- __P((struct mbuf *, u_int, struct socket *, int *));
-extern struct secpolicy *ipsec6_getpolicybyaddr
- __P((struct mbuf *, u_int, int, int *));
-
-struct inpcb;
-
-extern int ipsec6_in_reject_so __P((struct mbuf *, struct socket *));
-extern int ipsec6_delete_pcbpolicy __P((struct inpcb *));
-extern int ipsec6_set_policy __P((struct inpcb *inp, int optname,
- caddr_t request, size_t len, int priv));
-extern int ipsec6_get_policy
- __P((struct inpcb *inp, caddr_t request, size_t len, struct mbuf **mp));
-extern int ipsec6_in_reject __P((struct mbuf *, struct inpcb *));
-
-struct tcp6cb;
-
-extern size_t ipsec6_hdrsiz __P((struct mbuf *, u_int, struct inpcb *));
-
-struct ip6_hdr;
-extern const char *ipsec6_logpacketstr __P((struct ip6_hdr *, u_int32_t));
-
-extern int ipsec6_output_trans __P((struct ipsec_output_state *, u_char *,
- struct mbuf *, struct secpolicy *, int, int *));
-extern int ipsec6_output_tunnel __P((struct ipsec_output_state *,
- struct secpolicy *, int));
-extern int ipsec6_tunnel_validate __P((struct mbuf *, int, u_int,
- struct secasvar *));
-#endif /*_KERNEL*/
-
-#endif /*_NETINET6_IPSEC6_H_*/
diff --git a/newlib/libc/sys/linux/include/netinet6/mld6_var.h b/newlib/libc/sys/linux/include/netinet6/mld6_var.h
deleted file mode 100644
index 85f0da24a..000000000
--- a/newlib/libc/sys/linux/include/netinet6/mld6_var.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/mld6_var.h,v 1.2 2000/07/04 16:35:10 itojun Exp $ */
-/* $KAME: mld6_var.h,v 1.4 2000/03/25 07:23:54 sumikawa Exp $ */
-
-/*
- * Copyright (C) 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-#ifndef _NETINET6_MLD6_VAR_H_
-#define _NETINET6_MLD6_VAR_H_
-
-#ifdef _KERNEL
-
-#define MLD6_RANDOM_DELAY(X) (random() % (X) + 1)
-
-/*
- * States for MLD stop-listening processing
- */
-#define MLD6_OTHERLISTENER 0
-#define MLD6_IREPORTEDLAST 1
-
-void mld6_init __P((void));
-void mld6_input __P((struct mbuf *, int));
-void mld6_start_listening __P((struct in6_multi *));
-void mld6_stop_listening __P((struct in6_multi *));
-void mld6_fasttimeo __P((void));
-#endif /* _KERNEL */
-
-#endif /* _NETINET6_MLD6_VAR_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/nd6.h b/newlib/libc/sys/linux/include/netinet6/nd6.h
deleted file mode 100644
index c6e644df8..000000000
--- a/newlib/libc/sys/linux/include/netinet6/nd6.h
+++ /dev/null
@@ -1,404 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/nd6.h,v 1.10 2002/04/19 04:46:23 suz Exp $ */
-/* $KAME: nd6.h,v 1.76 2001/12/18 02:10:31 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-#ifndef _NETINET6_ND6_H_
-#define _NETINET6_ND6_H_
-
-/* see net/route.h, or net/if_inarp.h */
-#ifndef RTF_ANNOUNCE
-#define RTF_ANNOUNCE RTF_PROTO2
-#endif
-
-#include <sys/queue.h>
-#include <sys/callout.h>
-
-struct llinfo_nd6 {
- struct llinfo_nd6 *ln_next;
- struct llinfo_nd6 *ln_prev;
- struct rtentry *ln_rt;
- struct mbuf *ln_hold; /* last packet until resolved/timeout */
- long ln_asked; /* number of queries already sent for this addr */
- u_long ln_expire; /* lifetime for NDP state transition */
- short ln_state; /* reachability state */
- short ln_router; /* 2^0: ND6 router bit */
- int ln_byhint; /* # of times we made it reachable by UL hint */
-};
-
-#define ND6_LLINFO_NOSTATE -2
-/*
- * We don't need the WAITDELETE state any more, but we keep the definition
- * in a comment line instead of removing it. This is necessary to avoid
- * unintentionally reusing the value for another purpose, which might
- * affect backward compatibility with old applications.
- * (20000711 jinmei@kame.net)
- */
-/* #define ND6_LLINFO_WAITDELETE -1 */
-#define ND6_LLINFO_INCOMPLETE 0
-#define ND6_LLINFO_REACHABLE 1
-#define ND6_LLINFO_STALE 2
-#define ND6_LLINFO_DELAY 3
-#define ND6_LLINFO_PROBE 4
-
-#define ND6_IS_LLINFO_PROBREACH(n) ((n)->ln_state > ND6_LLINFO_INCOMPLETE)
-
-struct nd_ifinfo {
- u_int32_t linkmtu; /* LinkMTU */
- u_int32_t maxmtu; /* Upper bound of LinkMTU */
- u_int32_t basereachable; /* BaseReachableTime */
- u_int32_t reachable; /* Reachable Time */
- u_int32_t retrans; /* Retrans Timer */
- u_int32_t flags; /* Flags */
- int recalctm; /* BaseReacable re-calculation timer */
- u_int8_t chlim; /* CurHopLimit */
- u_int8_t receivedra;
- /* the following 3 members are for privacy extension for addrconf */
- u_int8_t randomseed0[8]; /* upper 64 bits of MD5 digest */
- u_int8_t randomseed1[8]; /* lower 64 bits (usually the EUI64 IFID) */
- u_int8_t randomid[8]; /* current random ID */
-};
-
-#define ND6_IFF_PERFORMNUD 0x1
-
-struct in6_nbrinfo {
- char ifname[IFNAMSIZ]; /* if name, e.g. "en0" */
- struct in6_addr addr; /* IPv6 address of the neighbor */
- long asked; /* number of queries already sent for this addr */
- int isrouter; /* if it acts as a router */
- int state; /* reachability state */
- int expire; /* lifetime for NDP state transition */
-};
-
-#define DRLSTSIZ 10
-#define PRLSTSIZ 10
-struct in6_drlist {
- char ifname[IFNAMSIZ];
- struct {
- struct in6_addr rtaddr;
- u_char flags;
- u_short rtlifetime;
- u_long expire;
- u_short if_index;
- } defrouter[DRLSTSIZ];
-};
-
-struct in6_defrouter {
- struct sockaddr_in6 rtaddr;
- u_char flags;
- u_short rtlifetime;
- u_long expire;
- u_short if_index;
-};
-
-struct in6_prlist {
- char ifname[IFNAMSIZ];
- struct {
- struct in6_addr prefix;
- struct prf_ra raflags;
- u_char prefixlen;
- u_char origin;
- u_int32_t vltime;
- u_int32_t pltime;
- time_t expire;
- u_short if_index;
- u_short advrtrs; /* number of advertisement routers */
- struct in6_addr advrtr[DRLSTSIZ]; /* XXX: explicit limit */
- } prefix[PRLSTSIZ];
-};
-
-struct in6_prefix {
- struct sockaddr_in6 prefix;
- struct prf_ra raflags;
- u_char prefixlen;
- u_char origin;
- u_long vltime;
- u_long pltime;
- u_long expire;
- u_int32_t flags;
- int refcnt;
- u_short if_index;
- u_short advrtrs; /* number of advertisement routers */
- /* struct sockaddr_in6 advrtr[] */
-};
-
-#ifdef _KERNEL
-struct in6_ondireq {
- char ifname[IFNAMSIZ];
- struct {
- u_int32_t linkmtu; /* LinkMTU */
- u_int32_t maxmtu; /* Upper bound of LinkMTU */
- u_int32_t basereachable; /* BaseReachableTime */
- u_int32_t reachable; /* Reachable Time */
- u_int32_t retrans; /* Retrans Timer */
- u_int32_t flags; /* Flags */
- int recalctm; /* BaseReacable re-calculation timer */
- u_int8_t chlim; /* CurHopLimit */
- u_int8_t receivedra;
- } ndi;
-};
-#endif
-
-struct in6_ndireq {
- char ifname[IFNAMSIZ];
- struct nd_ifinfo ndi;
-};
-
-struct in6_ndifreq {
- char ifname[IFNAMSIZ];
- u_long ifindex;
-};
-
-/* Prefix status */
-#define NDPRF_ONLINK 0x1
-#define NDPRF_DETACHED 0x2
-
-/* protocol constants */
-#define MAX_RTR_SOLICITATION_DELAY 1 /* 1sec */
-#define RTR_SOLICITATION_INTERVAL 4 /* 4sec */
-#define MAX_RTR_SOLICITATIONS 3
-
-#define ND6_INFINITE_LIFETIME 0xffffffff
-
-#ifdef _KERNEL
-/* node constants */
-#define MAX_REACHABLE_TIME 3600000 /* msec */
-#define REACHABLE_TIME 30000 /* msec */
-#define RETRANS_TIMER 1000 /* msec */
-#define MIN_RANDOM_FACTOR 512 /* 1024 * 0.5 */
-#define MAX_RANDOM_FACTOR 1536 /* 1024 * 1.5 */
-#define DEF_TEMP_VALID_LIFETIME 604800 /* 1 week */
-#define DEF_TEMP_PREFERRED_LIFETIME 86400 /* 1 day */
-#define TEMPADDR_REGEN_ADVANCE 5 /* sec */
-#define MAX_TEMP_DESYNC_FACTOR 600 /* 10 min */
-#define ND_COMPUTE_RTIME(x) \
- (((MIN_RANDOM_FACTOR * (x >> 10)) + (random() & \
- ((MAX_RANDOM_FACTOR - MIN_RANDOM_FACTOR) * (x >> 10)))) /1000)
-
-TAILQ_HEAD(nd_drhead, nd_defrouter);
-struct nd_defrouter {
- TAILQ_ENTRY(nd_defrouter) dr_entry;
- struct in6_addr rtaddr;
- u_char flags; /* flags on RA message */
- u_short rtlifetime;
- u_long expire;
- u_long advint; /* Mobile IPv6 addition (milliseconds) */
- u_long advint_expire; /* Mobile IPv6 addition */
- int advints_lost; /* Mobile IPv6 addition */
- struct ifnet *ifp;
-};
-
-struct nd_prefix {
- struct ifnet *ndpr_ifp;
- LIST_ENTRY(nd_prefix) ndpr_entry;
- struct sockaddr_in6 ndpr_prefix; /* prefix */
- struct in6_addr ndpr_mask; /* netmask derived from the prefix */
- struct in6_addr ndpr_addr; /* address that is derived from the prefix */
- u_int32_t ndpr_vltime; /* advertised valid lifetime */
- u_int32_t ndpr_pltime; /* advertised preferred lifetime */
- time_t ndpr_expire; /* expiration time of the prefix */
- time_t ndpr_preferred; /* preferred time of the prefix */
- struct prf_ra ndpr_flags;
- u_int32_t ndpr_stateflags; /* actual state flags */
- /* list of routers that advertise the prefix: */
- LIST_HEAD(pr_rtrhead, nd_pfxrouter) ndpr_advrtrs;
- u_char ndpr_plen;
- int ndpr_refcnt; /* reference couter from addresses */
-};
-
-#define ndpr_next ndpr_entry.le_next
-
-#define ndpr_raf ndpr_flags
-#define ndpr_raf_onlink ndpr_flags.onlink
-#define ndpr_raf_auto ndpr_flags.autonomous
-
-/*
- * We keep expired prefix for certain amount of time, for validation purposes.
- * 1800s = MaxRtrAdvInterval
- */
-#define NDPR_KEEP_EXPIRED (1800 * 2)
-
-/*
- * Message format for use in obtaining information about prefixes
- * from inet6 sysctl function
- */
-struct inet6_ndpr_msghdr {
- u_short inpm_msglen; /* to skip over non-understood messages */
- u_char inpm_version; /* future binary compatibility */
- u_char inpm_type; /* message type */
- struct in6_addr inpm_prefix;
- u_long prm_vltim;
- u_long prm_pltime;
- u_long prm_expire;
- u_long prm_preferred;
- struct in6_prflags prm_flags;
- u_short prm_index; /* index for associated ifp */
- u_char prm_plen; /* length of prefix in bits */
-};
-
-#define prm_raf_onlink prm_flags.prf_ra.onlink
-#define prm_raf_auto prm_flags.prf_ra.autonomous
-
-#define prm_statef_onlink prm_flags.prf_state.onlink
-
-#define prm_rrf_decrvalid prm_flags.prf_rr.decrvalid
-#define prm_rrf_decrprefd prm_flags.prf_rr.decrprefd
-
-#define ifpr2ndpr(ifpr) ((struct nd_prefix *)(ifpr))
-#define ndpr2ifpr(ndpr) ((struct ifprefix *)(ndpr))
-
-struct nd_pfxrouter {
- LIST_ENTRY(nd_pfxrouter) pfr_entry;
-#define pfr_next pfr_entry.le_next
- struct nd_defrouter *router;
-};
-
-LIST_HEAD(nd_prhead, nd_prefix);
-
-/* nd6.c */
-extern int nd6_prune;
-extern int nd6_delay;
-extern int nd6_umaxtries;
-extern int nd6_mmaxtries;
-extern int nd6_useloopback;
-extern int nd6_maxnudhint;
-extern int nd6_gctimer;
-extern struct llinfo_nd6 llinfo_nd6;
-extern struct nd_ifinfo *nd_ifinfo;
-extern struct nd_drhead nd_defrouter;
-extern struct nd_prhead nd_prefix;
-extern int nd6_debug;
-
-#define nd6log(x) do { if (nd6_debug) log x; } while (0)
-
-extern struct callout nd6_timer_ch;
-
-/* nd6_rtr.c */
-extern int nd6_defifindex;
-extern int ip6_desync_factor; /* seconds */
-extern u_int32_t ip6_temp_preferred_lifetime; /* seconds */
-extern u_int32_t ip6_temp_valid_lifetime; /* seconds */
-extern int ip6_temp_regen_advance; /* seconds */
-
-union nd_opts {
- struct nd_opt_hdr *nd_opt_array[9]; /* max = home agent info */
- struct {
- struct nd_opt_hdr *zero;
- struct nd_opt_hdr *src_lladdr;
- struct nd_opt_hdr *tgt_lladdr;
- struct nd_opt_prefix_info *pi_beg; /* multiple opts, start */
- struct nd_opt_rd_hdr *rh;
- struct nd_opt_mtu *mtu;
- struct nd_opt_hdr *six;
- struct nd_opt_advint *adv;
- struct nd_opt_hai *hai;
- struct nd_opt_hdr *search; /* multiple opts */
- struct nd_opt_hdr *last; /* multiple opts */
- int done;
- struct nd_opt_prefix_info *pi_end;/* multiple opts, end */
- } nd_opt_each;
-};
-#define nd_opts_src_lladdr nd_opt_each.src_lladdr
-#define nd_opts_tgt_lladdr nd_opt_each.tgt_lladdr
-#define nd_opts_pi nd_opt_each.pi_beg
-#define nd_opts_pi_end nd_opt_each.pi_end
-#define nd_opts_rh nd_opt_each.rh
-#define nd_opts_mtu nd_opt_each.mtu
-#define nd_opts_adv nd_opt_each.adv
-#define nd_opts_hai nd_opt_each.hai
-#define nd_opts_search nd_opt_each.search
-#define nd_opts_last nd_opt_each.last
-#define nd_opts_done nd_opt_each.done
-
-/* XXX: need nd6_var.h?? */
-/* nd6.c */
-void nd6_init __P((void));
-void nd6_ifattach __P((struct ifnet *));
-int nd6_is_addr_neighbor __P((struct sockaddr_in6 *, struct ifnet *));
-void nd6_option_init __P((void *, int, union nd_opts *));
-struct nd_opt_hdr *nd6_option __P((union nd_opts *));
-int nd6_options __P((union nd_opts *));
-struct rtentry *nd6_lookup __P((struct in6_addr *, int, struct ifnet *));
-void nd6_setmtu __P((struct ifnet *));
-void nd6_timer __P((void *));
-void nd6_purge __P((struct ifnet *));
-struct llinfo_nd6 *nd6_free __P((struct rtentry *));
-void nd6_nud_hint __P((struct rtentry *, struct in6_addr *, int));
-int nd6_resolve __P((struct ifnet *, struct rtentry *,
- struct mbuf *, struct sockaddr *, u_char *));
-void nd6_rtrequest __P((int, struct rtentry *, struct rt_addrinfo *));
-int nd6_ioctl __P((u_long, caddr_t, struct ifnet *));
-struct rtentry *nd6_cache_lladdr __P((struct ifnet *, struct in6_addr *,
- char *, int, int, int));
-int nd6_output __P((struct ifnet *, struct ifnet *, struct mbuf *,
- struct sockaddr_in6 *, struct rtentry *));
-int nd6_storelladdr __P((struct ifnet *, struct rtentry *, struct mbuf *,
- struct sockaddr *, u_char *));
-int nd6_need_cache __P((struct ifnet *));
-
-/* nd6_nbr.c */
-void nd6_na_input __P((struct mbuf *, int, int));
-void nd6_na_output __P((struct ifnet *, const struct in6_addr *,
- const struct in6_addr *, u_long, int, struct sockaddr *));
-void nd6_ns_input __P((struct mbuf *, int, int));
-void nd6_ns_output __P((struct ifnet *, const struct in6_addr *,
- const struct in6_addr *, struct llinfo_nd6 *, int));
-caddr_t nd6_ifptomac __P((struct ifnet *));
-void nd6_dad_start __P((struct ifaddr *, int *));
-void nd6_dad_stop __P((struct ifaddr *));
-void nd6_dad_duplicated __P((struct ifaddr *));
-
-/* nd6_rtr.c */
-void nd6_rs_input __P((struct mbuf *, int, int));
-void nd6_ra_input __P((struct mbuf *, int, int));
-void prelist_del __P((struct nd_prefix *));
-void defrouter_addreq __P((struct nd_defrouter *));
-void defrouter_delreq __P((struct nd_defrouter *, int));
-void defrouter_select __P((void));
-void defrtrlist_del __P((struct nd_defrouter *));
-void prelist_remove __P((struct nd_prefix *));
-int prelist_update __P((struct nd_prefix *, struct nd_defrouter *,
- struct mbuf *));
-int nd6_prelist_add __P((struct nd_prefix *, struct nd_defrouter *,
- struct nd_prefix **));
-int nd6_prefix_onlink __P((struct nd_prefix *));
-int nd6_prefix_offlink __P((struct nd_prefix *));
-void pfxlist_onlink_check __P((void));
-struct nd_defrouter *defrouter_lookup __P((struct in6_addr *,
- struct ifnet *));
-struct nd_prefix *nd6_prefix_lookup __P((struct nd_prefix *));
-int in6_init_prefix_ltimes __P((struct nd_prefix *ndpr));
-void rt6_flush __P((struct in6_addr *, struct ifnet *));
-int nd6_setdefaultiface __P((int));
-int in6_tmpifadd __P((const struct in6_ifaddr *, int));
-
-#endif /* _KERNEL */
-
-#endif /* _NETINET6_ND6_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/pim6.h b/newlib/libc/sys/linux/include/netinet6/pim6.h
deleted file mode 100644
index b5c5fd8b2..000000000
--- a/newlib/libc/sys/linux/include/netinet6/pim6.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/pim6.h,v 1.2 2000/07/04 16:35:10 itojun Exp $ */
-/* $KAME: pim6.h,v 1.3 2000/03/25 07:23:58 sumikawa Exp $ */
-
-/*
- * Copyright (C) 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-/*
- * Protocol Independent Multicast (PIM) definitions
- *
- * Written by Ahmed Helmy, SGI, July 1996
- *
- * MULTICAST
- */
-
-/*
- * PIM packet header
- */
-#define PIM_VERSION 2
-struct pim {
-#if defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN)
- u_char pim_type:4, /* the PIM message type, currently they are:
- * Hello, Register, Register-Stop, Join/Prune,
- * Bootstrap, Assert, Graft (PIM-DM only),
- * Graft-Ack (PIM-DM only), C-RP-Adv
- */
- pim_ver:4; /* PIM version number; 2 for PIMv2 */
-#else
- u_char pim_ver:4, /* PIM version */
- pim_type:4; /* PIM type */
-#endif
- u_char pim_rsv; /* Reserved */
- u_short pim_cksum; /* IP style check sum */
-};
-
-#define PIM_MINLEN 8 /* The header min. length is 8 */
-#define PIM6_REG_MINLEN (PIM_MINLEN+40) /* Register message + inner IP6 header */
-
-/*
- * Message types
- */
-#define PIM_REGISTER 1 /* PIM Register type is 1 */
-
-/* second bit in reg_head is the null bit */
-#define PIM_NULL_REGISTER 0x40000000
diff --git a/newlib/libc/sys/linux/include/netinet6/pim6_var.h b/newlib/libc/sys/linux/include/netinet6/pim6_var.h
deleted file mode 100644
index 6fe6f6abe..000000000
--- a/newlib/libc/sys/linux/include/netinet6/pim6_var.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/pim6_var.h,v 1.3 2000/07/04 16:35:10 itojun Exp $ */
-/* $KAME: pim6_var.h,v 1.8 2000/06/06 08:07:43 jinmei Exp $ */
-
-/*
- * Copyright (C) 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-#ifndef _NETINET6_PIM6_VAR_H_
-#define _NETINET6_PIM6_VAR_H_
-
-/*
- * Protocol Independent Multicast (PIM),
- * implementation-specific definitions.
- *
- * Written by George Edmond Eddy (Rusty), ISI, February 1998
- * Modified by Pavlin Ivanov Radoslavov, USC/ISI, May 1998
- */
-
-struct pim6stat {
- u_quad_t pim6s_rcv_total; /* total PIM messages received */
- u_quad_t pim6s_rcv_tooshort; /* received with too few bytes */
- u_quad_t pim6s_rcv_badsum; /* received with bad checksum */
- u_quad_t pim6s_rcv_badversion; /* received bad PIM version */
- u_quad_t pim6s_rcv_registers; /* received registers */
- u_quad_t pim6s_rcv_badregisters; /* received invalid registers */
- u_quad_t pim6s_snd_registers; /* sent registers */
-};
-
-#if (defined(KERNEL)) || (defined(_KERNEL))
-extern struct pim6stat pim6stat;
-
-int pim6_input __P((struct mbuf **, int*, int));
-#endif /* KERNEL */
-
-/*
- * Names for PIM sysctl objects
- */
-#define PIM6CTL_STATS 1 /* statistics (read-only) */
-#define PIM6CTL_MAXID 2
-
-#define PIM6CTL_NAMES { \
- { 0, 0 }, \
- { 0, 0 }, \
-}
-#endif /* _NETINET6_PIM6_VAR_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/raw_ip6.h b/newlib/libc/sys/linux/include/netinet6/raw_ip6.h
deleted file mode 100644
index 7efd75dcb..000000000
--- a/newlib/libc/sys/linux/include/netinet6/raw_ip6.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/raw_ip6.h,v 1.1 2001/06/11 12:39:06 ume Exp $ */
-/* $KAME: raw_ip6.h,v 1.2 2001/05/27 13:28:35 itojun Exp $ */
-
-/*
- * Copyright (C) 2001 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-#ifndef _NETINET6_RAW_IP6_H_
-#define _NETINET6_RAW_IP6_H_
-
-/*
- * ICMPv6 stat is counted separately. see netinet/icmp6.h
- */
-struct rip6stat {
- u_quad_t rip6s_ipackets; /* total input packets */
- u_quad_t rip6s_isum; /* input checksum computations */
- u_quad_t rip6s_badsum; /* of above, checksum error */
- u_quad_t rip6s_nosock; /* no matching socket */
- u_quad_t rip6s_nosockmcast; /* of above, arrived as multicast */
- u_quad_t rip6s_fullsock; /* not delivered, input socket full */
-
- u_quad_t rip6s_opackets; /* total output packets */
-};
-
-#ifdef _KERNEL
-extern struct rip6stat rip6stat;
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netinet6/scope6_var.h b/newlib/libc/sys/linux/include/netinet6/scope6_var.h
deleted file mode 100644
index 4f66c53f8..000000000
--- a/newlib/libc/sys/linux/include/netinet6/scope6_var.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* $FreeBSD: src/sys/netinet6/scope6_var.h,v 1.1 2000/07/04 16:35:10 itojun Exp $ */
-/* $KAME: scope6_var.h,v 1.4 2000/05/18 15:03:27 jinmei Exp $ */
-
-/*
- * Copyright (C) 2000 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-#ifndef _NETINET6_SCOPE6_VAR_H_
-#define _NETINET6_SCOPE6_VAR_H_
-
-#ifdef _KERNEL
-void scope6_ifattach __P((struct ifnet *));
-int scope6_set __P((struct ifnet *, u_int32_t *));
-int scope6_get __P((struct ifnet *, u_int32_t *));
-void scope6_setdefault __P((struct ifnet *));
-int scope6_get_default __P((u_int32_t *));
-u_int32_t scope6_in6_addrscope __P((struct in6_addr *));
-u_int32_t scope6_addr2default __P((struct in6_addr *));
-#endif /* _KERNEL */
-
-#endif /* _NETINET6_SCOPE6_VAR_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/tcp6_var.h b/newlib/libc/sys/linux/include/netinet6/tcp6_var.h
deleted file mode 100644
index 62541ef00..000000000
--- a/newlib/libc/sys/linux/include/netinet6/tcp6_var.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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: src/sys/netinet6/tcp6_var.h,v 1.5 2001/11/22 04:50:44 jlemon Exp $
- */
-
-/*
- * Copyright (c) 1982, 1986, 1993, 1994, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tcp_var.h 8.4 (Berkeley) 5/24/95
- * $FreeBSD: src/sys/netinet6/tcp6_var.h,v 1.5 2001/11/22 04:50:44 jlemon Exp $
- */
-
-#ifndef _NETINET_TCP6_VAR_H_
-#define _NETINET_TCP6_VAR_H_
-
-#ifdef _KERNEL
-#ifdef SYSCTL_DECL
-SYSCTL_DECL(_net_inet6_tcp6);
-#endif
-
-extern int tcp_v6mssdflt; /* XXX */
-
-struct ip6_hdr;
-void tcp6_ctlinput __P((int, struct sockaddr *, void *));
-void tcp6_init __P((void));
-int tcp6_input __P((struct mbuf **, int *, int));
-struct rtentry *tcp_rtlookup6(struct in_conninfo *);
-
-extern struct pr_usrreqs tcp6_usrreqs;
-
-#endif /* _KERNEL */
-
-#endif /* _NETINET_TCP6_VAR_H_ */
diff --git a/newlib/libc/sys/linux/include/netinet6/udp6_var.h b/newlib/libc/sys/linux/include/netinet6/udp6_var.h
deleted file mode 100644
index 222d6443a..000000000
--- a/newlib/libc/sys/linux/include/netinet6/udp6_var.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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: src/sys/netinet6/udp6_var.h,v 1.5 2001/09/12 08:37:55 julian Exp $
- */
-
-/*
- * Copyright (c) 1982, 1986, 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)udp_var.h 8.1 (Berkeley) 6/10/93
- */
-
-#ifndef _NETINET6_UDP6_VAR_H_
-#define _NETINET6_UDP6_VAR_H_
-
-#ifdef _KERNEL
-SYSCTL_DECL(_net_inet6_udp6);
-
-extern struct pr_usrreqs udp6_usrreqs;
-
-void udp6_ctlinput __P((int, struct sockaddr *, void *));
-int udp6_input __P((struct mbuf **, int *, int));
-int udp6_output __P((struct inpcb *inp, struct mbuf *m,
- struct sockaddr *addr, struct mbuf *control,
- struct thread *td));
-#endif
-
-#endif /*_NETINET6_UDP6_VAR_H_*/
diff --git a/newlib/libc/sys/linux/include/netns/idp.h b/newlib/libc/sys/linux/include/netns/idp.h
deleted file mode 100644
index 05cd4252b..000000000
--- a/newlib/libc/sys/linux/include/netns/idp.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1984, 1985, 1986, 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)idp.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netns/idp.h,v 1.8 1999/08/28 00:49:46 peter Exp $
- */
-
-#ifndef _NETNS_IDP_H_
-#define _NETNS_IDP_H_
-
-/*
- * Definitions for NS(tm) Internet Datagram Protocol
- */
-struct idp {
- u_short idp_sum; /* Checksum */
- u_short idp_len; /* Length, in bytes, including header */
- u_char idp_tc; /* Transport Control (i.e. hop count) */
- u_char idp_pt; /* Packet Type (i.e. level 2 protocol) */
- struct ns_addr idp_dna; /* Destination Network Address */
- struct ns_addr idp_sna; /* Source Network Address */
-};
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netns/idp_var.h b/newlib/libc/sys/linux/include/netns/idp_var.h
deleted file mode 100644
index aaeb1e028..000000000
--- a/newlib/libc/sys/linux/include/netns/idp_var.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1984, 1985, 1986, 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)idp_var.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netns/idp_var.h,v 1.10 1999/12/29 04:46:18 peter Exp $
- */
-
-#ifndef _NETNS_IDP_VAR_H_
-#define _NETNS_IDP_VAR_H_
-
-/*
- * IDP Kernel Structures and Variables
- */
-struct idpstat {
- int idps_badsum; /* checksum bad */
- int idps_tooshort; /* packet too short */
- int idps_toosmall; /* not enough data */
- int idps_badhlen; /* ip header length < data size */
- int idps_badlen; /* ip length < ip header length */
-};
-
-#ifdef _KERNEL
-struct idpstat idpstat;
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netns/ns.h b/newlib/libc/sys/linux/include/netns/ns.h
deleted file mode 100644
index 94c801713..000000000
--- a/newlib/libc/sys/linux/include/netns/ns.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (c) 1984, 1985, 1986, 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ns.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netns/ns.h,v 1.15 2002/03/20 02:39:27 alfred Exp $
- */
-
-#ifndef _NETNS_NS_H_
-#define _NETNS_NS_H_
-
-/*
- * Constants and Structures defined by the Xerox Network Software
- * per "Internet Transport Protocols", XSIS 028112, December 1981
- */
-
-/*
- * Protocols
- */
-#define NSPROTO_RI 1 /* Routing Information */
-#define NSPROTO_ECHO 2 /* Echo Protocol */
-#define NSPROTO_ERROR 3 /* Error Protocol */
-#define NSPROTO_PE 4 /* Packet Exchange */
-#define NSPROTO_SPP 5 /* Sequenced Packet */
-#define NSPROTO_RAW 255 /* Placemarker*/
-#define NSPROTO_MAX 256 /* Placemarker*/
-
-
-/*
- * Port/Socket numbers: network standard functions
- */
-
-#define NSPORT_RI 1 /* Routing Information */
-#define NSPORT_ECHO 2 /* Echo */
-#define NSPORT_RE 3 /* Router Error */
-
-/*
- * Ports < NSPORT_RESERVED are reserved for priveleged
- * processes (e.g. root).
- */
-#define NSPORT_RESERVED 3000
-
-/* flags passed to ns_output as last parameter */
-
-#define NS_FORWARDING 0x1 /* most of idp header exists */
-#define NS_ROUTETOIF 0x10 /* same as SO_DONTROUTE */
-#define NS_ALLOWBROADCAST SO_BROADCAST /* can send broadcast packets */
-
-#define NS_MAXHOPS 15
-
-/* flags passed to get/set socket option */
-#define SO_HEADERS_ON_INPUT 1
-#define SO_HEADERS_ON_OUTPUT 2
-#define SO_DEFAULT_HEADERS 3
-#define SO_LAST_HEADER 4
-#define SO_NSIP_ROUTE 5
-#define SO_SEQNO 6
-#define SO_ALL_PACKETS 7
-#define SO_MTU 8
-
-
-/*
- * NS addressing
- */
-union ns_host {
- u_char c_host[6];
- u_short s_host[3];
-};
-
-union ns_net {
- u_char c_net[4];
- u_short s_net[2];
-};
-
-union ns_net_u {
- union ns_net net_e;
- u_long long_e;
-};
-
-struct ns_addr {
- union ns_net x_net;
- union ns_host x_host;
- u_short x_port;
-};
-
-/*
- * Socket address, Xerox style
- */
-struct sockaddr_ns {
- u_char sns_len;
- u_char sns_family;
- struct ns_addr sns_addr;
- char sns_zero[2];
-};
-#define sns_port sns_addr.x_port
-
-#define ns_neteqnn(a,b) (((a).s_net[0]==(b).s_net[0]) && \
- ((a).s_net[1]==(b).s_net[1]))
-#define ns_neteq(a,b) ns_neteqnn((a).x_net, (b).x_net)
-#define satons_addr(sa) (((struct sockaddr_ns *)&(sa))->sns_addr)
-#define ns_hosteqnh(s,t) ((s).s_host[0] == (t).s_host[0] && \
- (s).s_host[1] == (t).s_host[1] && (s).s_host[2] == (t).s_host[2])
-#define ns_hosteq(s,t) (ns_hosteqnh((s).x_host,(t).x_host))
-#define ns_nullhost(x) (((x).x_host.s_host[0]==0) && \
- ((x).x_host.s_host[1]==0) && ((x).x_host.s_host[2]==0))
-
-#ifdef _KERNEL
-extern struct domain nsdomain;
-union ns_host ns_thishost;
-union ns_host ns_zerohost;
-union ns_host ns_broadhost;
-union ns_net ns_zeronet;
-union ns_net ns_broadnet;
-u_short ns_cksum();
-#else
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-extern struct ns_addr ns_addr(const char *);
-extern char *ns_ntoa(struct ns_addr);
-__END_DECLS
-
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netns/ns_error.h b/newlib/libc/sys/linux/include/netns/ns_error.h
deleted file mode 100644
index ae4474722..000000000
--- a/newlib/libc/sys/linux/include/netns/ns_error.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 1984, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ns_error.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netns/ns_error.h,v 1.10 1999/12/29 04:46:19 peter Exp $
- */
-
-#ifndef _NETNS_NS_ERROR_H_
-#define _NETNS_NS_ERROR_H_
-
-/*
- * Xerox NS error messages
- */
-
-struct ns_errp {
- u_short ns_err_num; /* Error Number */
- u_short ns_err_param; /* Error Parameter */
- struct idp ns_err_idp; /* Initial segment of offending
- packet */
- u_char ns_err_lev2[12]; /* at least this much higher
- level protocol */
-};
-struct ns_epidp {
- struct idp ns_ep_idp;
- struct ns_errp ns_ep_errp;
-};
-
-#define NS_ERR_UNSPEC 0 /* Unspecified Error detected at dest. */
-#define NS_ERR_BADSUM 1 /* Bad Checksum detected at dest */
-#define NS_ERR_NOSOCK 2 /* Specified socket does not exist at dest*/
-#define NS_ERR_FULLUP 3 /* Dest. refuses packet due to resource lim.*/
-#define NS_ERR_UNSPEC_T 0x200 /* Unspec. Error occured before reaching dest*/
-#define NS_ERR_BADSUM_T 0x201 /* Bad Checksum detected in transit */
-#define NS_ERR_UNREACH_HOST 0x202 /* Dest cannot be reached from here*/
-#define NS_ERR_TOO_OLD 0x203 /* Packet x'd 15 routers without delivery*/
-#define NS_ERR_TOO_BIG 0x204 /* Packet too large to be forwarded through
- some intermediate gateway. The error
- parameter field contains the max packet
- size that can be accommodated */
-#define NS_ERR_MAX 20
-
-/*
- * Variables related to this implementation
- * of the network systems error message protocol.
- */
-struct ns_errstat {
-/* statistics related to ns_err packets generated */
- int ns_es_error; /* # of calls to ns_error */
- int ns_es_oldshort; /* no error 'cuz old ip too short */
- int ns_es_oldns_err; /* no error 'cuz old was ns_err */
- int ns_es_outhist[NS_ERR_MAX];
-/* statistics related to input messages processed */
- int ns_es_badcode; /* ns_err_code out of range */
- int ns_es_tooshort; /* packet < IDP_MINLEN */
- int ns_es_checksum; /* bad checksum */
- int ns_es_badlen; /* calculated bound mismatch */
- int ns_es_reflect; /* number of responses */
- int ns_es_inhist[NS_ERR_MAX];
- u_short ns_es_codes[NS_ERR_MAX];/* which error code for outhist
- since we might not know all */
-};
-
-#ifdef _KERNEL
-struct ns_errstat ns_errstat;
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netns/ns_if.h b/newlib/libc/sys/linux/include/netns/ns_if.h
deleted file mode 100644
index 4487b44f6..000000000
--- a/newlib/libc/sys/linux/include/netns/ns_if.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 1984, 1985, 1986, 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ns_if.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netns/ns_if.h,v 1.13 2002/03/20 02:39:27 alfred Exp $
- */
-
-#ifndef _NETNS_NS_IF_H_
-#define _NETNS_NS_IF_H_
-
-/*
- * Interface address, xerox version. One of these structures
- * is allocated for each interface with an internet address.
- * The ifaddr structure contains the protocol-independent part
- * of the structure and is assumed to be first.
- */
-
-struct ns_ifaddr {
- struct ifaddr ia_ifa; /* protocol-independent info */
-#define ia_ifp ia_ifa.ifa_ifp
-#define ia_flags ia_ifa.ifa_flags
- struct ns_ifaddr *ia_next; /* next in list of xerox addresses */
- struct sockaddr_ns ia_addr; /* reserve space for my address */
- struct sockaddr_ns ia_dstaddr; /* space for my broadcast address */
-#define ia_broadaddr ia_dstaddr
- struct sockaddr_ns ia_netmask; /* space for my network mask */
-};
-
-struct ns_aliasreq {
- char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- struct sockaddr_ns ifra_addr;
- struct sockaddr_ns ifra_broadaddr;
-#define ifra_dstaddr ifra_broadaddr
-};
-/*
- * Given a pointer to an ns_ifaddr (ifaddr),
- * return a pointer to the addr as a sockadd_ns.
- */
-
-#define IA_SNS(ia) (&(((struct ns_ifaddr *)(ia))->ia_addr))
-
-/* This is not the right place for this but where is? */
-#define ETHERTYPE_NS 0x0600
-
-#ifdef NSIP
-struct nsip_req {
- struct sockaddr rq_ns; /* must be ns format destination */
- struct sockaddr rq_ip; /* must be ip format gateway */
- short rq_flags;
-};
-#endif
-
-#ifdef _KERNEL
-struct ns_ifaddr *ns_ifaddr;
-struct ns_ifaddr *ns_iaonnetof();
-void nsintr(void);
-struct ifqueue nsintrq; /* XNS input packet queue */
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netns/ns_pcb.h b/newlib/libc/sys/linux/include/netns/ns_pcb.h
deleted file mode 100644
index 359d839c0..000000000
--- a/newlib/libc/sys/linux/include/netns/ns_pcb.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 1984, 1985, 1986, 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ns_pcb.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netns/ns_pcb.h,v 1.11 1999/12/29 04:46:20 peter Exp $
- */
-
-#ifndef _NETNS_NS_PCB_H_
-#define _NETNS_NS_PCB_H_
-
-/*
- * Ns protocol interface control block.
- */
-struct nspcb {
- struct nspcb *nsp_next; /* doubly linked list */
- struct nspcb *nsp_prev;
- struct socket *nsp_socket; /* back pointer to socket */
- struct ns_addr nsp_faddr; /* destination address */
- struct ns_addr nsp_laddr; /* socket's address */
- caddr_t nsp_pcb; /* protocol specific stuff */
- struct route nsp_route; /* routing information */
- struct ns_addr nsp_lastdst; /* validate cached route for dg socks*/
- long nsp_notify_param; /* extra info passed via ns_pcbnotify*/
- short nsp_flags;
- u_char nsp_dpt; /* default packet type for idp_output*/
- u_char nsp_rpt; /* last received packet type by
- idp_input() */
-};
-
-/* possible flags */
-
-#define NSP_IN_ABORT 0x1 /* calling abort through socket */
-#define NSP_RAWIN 0x2 /* show headers on input */
-#define NSP_RAWOUT 0x4 /* show header on output */
-#define NSP_ALL_PACKETS 0x8 /* Turn off higher proto processing */
-
-#define NS_WILDCARD 1
-
-#define nsp_lport nsp_laddr.x_port
-#define nsp_fport nsp_faddr.x_port
-
-#define sotonspcb(so) ((struct nspcb *)((so)->so_pcb))
-
-/*
- * Nominal space allocated to a ns socket.
- */
-#define NSSNDQ 2048
-#define NSRCVQ 2048
-
-
-#ifdef _KERNEL
-struct nspcb nspcb; /* head of list */
-struct nspcb *ns_pcblookup();
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netns/sp.h b/newlib/libc/sys/linux/include/netns/sp.h
deleted file mode 100644
index 90f26c93d..000000000
--- a/newlib/libc/sys/linux/include/netns/sp.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1984, 1985, 1986, 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)sp.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netns/sp.h,v 1.8 1999/08/28 00:49:52 peter Exp $
- */
-
-#ifndef _NETNS_SP_H_
-#define _NETNS_SP_H_
-
-/*
- * Definitions for Xerox NS style sequenced packet protocol
- */
-
-struct sphdr {
- u_char sp_cc; /* connection control */
- u_char sp_dt; /* datastream type */
-#define SP_SP 0x80 /* system packet */
-#define SP_SA 0x40 /* send acknowledgement */
-#define SP_OB 0x20 /* attention (out of band data) */
-#define SP_EM 0x10 /* end of message */
- u_short sp_sid; /* source connection identifier */
- u_short sp_did; /* destination connection identifier */
- u_short sp_seq; /* sequence number */
- u_short sp_ack; /* acknowledge number */
- u_short sp_alo; /* allocation number */
-};
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netns/spidp.h b/newlib/libc/sys/linux/include/netns/spidp.h
deleted file mode 100644
index 310a2b204..000000000
--- a/newlib/libc/sys/linux/include/netns/spidp.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1984, 1985, 1986, 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)spidp.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netns/spidp.h,v 1.8 1999/08/28 00:49:52 peter Exp $
- */
-
-#ifndef _NETNS_SPIDP_H_
-#define _NETNS_SPIDP_H_
-
-/*
- * Definitions for NS(tm) Internet Datagram Protocol
- * containing a Sequenced Packet Protocol packet.
- */
-struct spidp {
- struct idp si_i;
- struct sphdr si_s;
-};
-struct spidp_q {
- struct spidp_q *si_next;
- struct spidp_q *si_prev;
-};
-#define SI(x) ((struct spidp *)x)
-#define si_sum si_i.idp_sum
-#define si_len si_i.idp_len
-#define si_tc si_i.idp_tc
-#define si_pt si_i.idp_pt
-#define si_dna si_i.idp_dna
-#define si_sna si_i.idp_sna
-#define si_sport si_i.idp_sna.x_port
-#define si_cc si_s.sp_cc
-#define si_dt si_s.sp_dt
-#define si_sid si_s.sp_sid
-#define si_did si_s.sp_did
-#define si_seq si_s.sp_seq
-#define si_ack si_s.sp_ack
-#define si_alo si_s.sp_alo
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netns/spp_debug.h b/newlib/libc/sys/linux/include/netns/spp_debug.h
deleted file mode 100644
index f85cc3901..000000000
--- a/newlib/libc/sys/linux/include/netns/spp_debug.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1984, 1985, 1986, 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)spp_debug.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netns/spp_debug.h,v 1.9 1999/08/28 00:49:53 peter Exp $
- */
-
-#ifndef _NETNS_SPP_DEBUG_H_
-#define _NETNS_SPP_DEBUG_H_
-
-struct spp_debug {
- u_long sd_time;
- short sd_act;
- short sd_ostate;
- caddr_t sd_cb;
- short sd_req;
- struct spidp sd_si;
- struct sppcb sd_sp;
-};
-
-#define SA_INPUT 0
-#define SA_OUTPUT 1
-#define SA_USER 2
-#define SA_RESPOND 3
-#define SA_DROP 4
-
-#ifdef SANAMES
-char *sanames[] =
- { "input", "output", "user", "respond", "drop" };
-#endif
-
-#define SPP_NDEBUG 100
-struct spp_debug spp_debug[SPP_NDEBUG];
-int spp_debx;
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netns/spp_timer.h b/newlib/libc/sys/linux/include/netns/spp_timer.h
deleted file mode 100644
index e28ecad7f..000000000
--- a/newlib/libc/sys/linux/include/netns/spp_timer.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 1982, 1986, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)spp_timer.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netns/spp_timer.h,v 1.9 1999/12/29 04:46:20 peter Exp $
- */
-
-#ifndef _NETNS_SPP_TIMER_H_
-#define _NETNS_SPP_TIMER_H_
-
-/*
- * Definitions of the SPP timers. These timers are counted
- * down PR_SLOWHZ times a second.
- */
-#define SPPT_NTIMERS 4
-
-#define SPPT_REXMT 0 /* retransmit */
-#define SPPT_PERSIST 1 /* retransmit persistance */
-#define SPPT_KEEP 2 /* keep alive */
-#define SPPT_2MSL 3 /* 2*msl quiet time timer */
-
-/*
- * The SPPT_REXMT timer is used to force retransmissions.
- * The SPP has the SPPT_REXMT timer set whenever segments
- * have been sent for which ACKs are expected but not yet
- * received. If an ACK is received which advances tp->snd_una,
- * then the retransmit timer is cleared (if there are no more
- * outstanding segments) or reset to the base value (if there
- * are more ACKs expected). Whenever the retransmit timer goes off,
- * we retransmit one unacknowledged segment, and do a backoff
- * on the retransmit timer.
- *
- * The SPPT_PERSIST timer is used to keep window size information
- * flowing even if the window goes shut. If all previous transmissions
- * have been acknowledged (so that there are no retransmissions in progress),
- * and the window is too small to bother sending anything, then we start
- * the SPPT_PERSIST timer. When it expires, if the window is nonzero,
- * we go to transmit state. Otherwise, at intervals send a single byte
- * into the peer's window to force him to update our window information.
- * We do this at most as often as SPPT_PERSMIN time intervals,
- * but no more frequently than the current estimate of round-trip
- * packet time. The SPPT_PERSIST timer is cleared whenever we receive
- * a window update from the peer.
- *
- * The SPPT_KEEP timer is used to keep connections alive. If an
- * connection is idle (no segments received) for SPPTV_KEEP amount of time,
- * but not yet established, then we drop the connection. If the connection
- * is established, then we force the peer to send us a segment by sending:
- * <SEQ=SND.UNA-1><ACK=RCV.NXT><CTL=ACK>
- * This segment is (deliberately) outside the window, and should elicit
- * an ack segment in response from the peer. If, despite the SPPT_KEEP
- * initiated segments we cannot elicit a response from a peer in SPPT_MAXIDLE
- * amount of time, then we drop the connection.
- */
-
-#define SPP_TTL 30 /* default time to live for SPP segs */
-/*
- * Time constants.
- */
-#define SPPTV_MSL ( 15*PR_SLOWHZ) /* max seg lifetime */
-#define SPPTV_SRTTBASE 0 /* base roundtrip time;
- if 0, no idea yet */
-#define SPPTV_SRTTDFLT ( 3*PR_SLOWHZ) /* assumed RTT if no info */
-
-#define SPPTV_PERSMIN ( 5*PR_SLOWHZ) /* retransmit persistance */
-#define SPPTV_PERSMAX ( 60*PR_SLOWHZ) /* maximum persist interval */
-
-#define SPPTV_KEEP ( 75*PR_SLOWHZ) /* keep alive - 75 secs */
-#define SPPTV_MAXIDLE ( 8*SPPTV_KEEP) /* maximum allowable idle
- time before drop conn */
-
-#define SPPTV_MIN ( 1*PR_SLOWHZ) /* minimum allowable value */
-#define SPPTV_REXMTMAX ( 64*PR_SLOWHZ) /* max allowable REXMT value */
-
-#define SPP_LINGERTIME 120 /* linger at most 2 minutes */
-
-#define SPP_MAXRXTSHIFT 12 /* maximum retransmits */
-
-#ifdef SPPTIMERS
-char *spptimers[] =
- { "REXMT", "PERSIST", "KEEP", "2MSL" };
-#endif
-
-/*
- * Force a time value to be in a certain range.
- */
-#define SPPT_RANGESET(tv, value, tvmin, tvmax) { \
- (tv) = (value); \
- if ((tv) < (tvmin)) \
- (tv) = (tvmin); \
- else if ((tv) > (tvmax)) \
- (tv) = (tvmax); \
-}
-
-#ifdef _KERNEL
-extern int spp_backoff[];
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/netns/spp_var.h b/newlib/libc/sys/linux/include/netns/spp_var.h
deleted file mode 100644
index ed1ec050d..000000000
--- a/newlib/libc/sys/linux/include/netns/spp_var.h
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Copyright (c) 1984, 1985, 1986, 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)spp_var.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netns/spp_var.h,v 1.11 1999/12/29 04:46:21 peter Exp $
- */
-
-#ifndef _NETNS_SPP_VAR_H_
-#define _NETNS_SPP_VAR_H_
-
-/*
- * Sp control block, one per connection
- */
-struct sppcb {
- struct spidp_q s_q; /* queue for out-of-order receipt */
- struct nspcb *s_nspcb; /* backpointer to internet pcb */
- u_char s_state;
- u_char s_flags;
-#define SF_ACKNOW 0x01 /* Ack peer immediately */
-#define SF_DELACK 0x02 /* Ack, but try to delay it */
-#define SF_HI 0x04 /* Show headers on input */
-#define SF_HO 0x08 /* Show headers on output */
-#define SF_PI 0x10 /* Packet (datagram) interface */
-#define SF_WIN 0x20 /* Window info changed */
-#define SF_RXT 0x40 /* Rxt info changed */
-#define SF_RVD 0x80 /* Calling from read usrreq routine */
- u_short s_mtu; /* Max packet size for this stream */
-/* use sequence fields in headers to store sequence numbers for this
- connection */
- struct idp *s_idp;
- struct sphdr s_shdr; /* prototype header to transmit */
-#define s_cc s_shdr.sp_cc /* connection control (for EM bit) */
-#define s_dt s_shdr.sp_dt /* datastream type */
-#define s_sid s_shdr.sp_sid /* source connection identifier */
-#define s_did s_shdr.sp_did /* destination connection identifier */
-#define s_seq s_shdr.sp_seq /* sequence number */
-#define s_ack s_shdr.sp_ack /* acknowledge number */
-#define s_alo s_shdr.sp_alo /* allocation number */
-#define s_dport s_idp->idp_dna.x_port /* where we are sending */
- struct sphdr s_rhdr; /* last received header (in effect!)*/
- u_short s_rack; /* their acknowledge number */
- u_short s_ralo; /* their allocation number */
- u_short s_smax; /* highest packet # we have sent */
- u_short s_snxt; /* which packet to send next */
-
-/* congestion control */
-#define CUNIT 1024 /* scaling for ... */
- int s_cwnd; /* Congestion-controlled window */
- /* in packets * CUNIT */
- short s_swnd; /* == tcp snd_wnd, in packets */
- short s_smxw; /* == tcp max_sndwnd */
- /* difference of two spp_seq's can be
- no bigger than a short */
- u_short s_swl1; /* == tcp snd_wl1 */
- u_short s_swl2; /* == tcp snd_wl2 */
- int s_cwmx; /* max allowable cwnd */
- int s_ssthresh; /* s_cwnd size threshhold for
- * slow start exponential-to-
- * linear switch */
-/* transmit timing stuff
- * srtt and rttvar are stored as fixed point, for convenience in smoothing.
- * srtt has 3 bits to the right of the binary point, rttvar has 2.
- */
- short s_idle; /* time idle */
- short s_timer[SPPT_NTIMERS]; /* timers */
- short s_rxtshift; /* log(2) of rexmt exp. backoff */
- short s_rxtcur; /* current retransmit value */
- u_short s_rtseq; /* packet being timed */
- short s_rtt; /* timer for round trips */
- short s_srtt; /* averaged timer */
- short s_rttvar; /* variance in round trip time */
- char s_force; /* which timer expired */
- char s_dupacks; /* counter to intuit xmt loss */
-
-/* out of band data */
- char s_oobflags;
-#define SF_SOOB 0x08 /* sending out of band data */
-#define SF_IOOB 0x10 /* receiving out of band data */
- char s_iobc; /* input characters */
-/* debug stuff */
- u_short s_want; /* Last candidate for sending */
- char s_outx; /* exit taken from spp_output */
- char s_inx; /* exit taken from spp_input */
- u_short s_flags2; /* more flags for testing */
-#define SF_NEWCALL 0x100 /* for new_recvmsg */
-#define SO_NEWCALL 10 /* for new_recvmsg */
-};
-
-#define nstosppcb(np) ((struct sppcb *)(np)->nsp_pcb)
-#define sotosppcb(so) (nstosppcb(sotonspcb(so)))
-
-struct sppstat {
- long spps_connattempt; /* connections initiated */
- long spps_accepts; /* connections accepted */
- long spps_connects; /* connections established */
- long spps_drops; /* connections dropped */
- long spps_conndrops; /* embryonic connections dropped */
- long spps_closed; /* conn. closed (includes drops) */
- long spps_segstimed; /* segs where we tried to get rtt */
- long spps_rttupdated; /* times we succeeded */
- long spps_delack; /* delayed acks sent */
- long spps_timeoutdrop; /* conn. dropped in rxmt timeout */
- long spps_rexmttimeo; /* retransmit timeouts */
- long spps_persisttimeo; /* persist timeouts */
- long spps_keeptimeo; /* keepalive timeouts */
- long spps_keepprobe; /* keepalive probes sent */
- long spps_keepdrops; /* connections dropped in keepalive */
-
- long spps_sndtotal; /* total packets sent */
- long spps_sndpack; /* data packets sent */
- long spps_sndbyte; /* data bytes sent */
- long spps_sndrexmitpack; /* data packets retransmitted */
- long spps_sndrexmitbyte; /* data bytes retransmitted */
- long spps_sndacks; /* ack-only packets sent */
- long spps_sndprobe; /* window probes sent */
- long spps_sndurg; /* packets sent with URG only */
- long spps_sndwinup; /* window update-only packets sent */
- long spps_sndctrl; /* control (SYN|FIN|RST) packets sent */
- long spps_sndvoid; /* couldn't find requested packet*/
-
- long spps_rcvtotal; /* total packets received */
- long spps_rcvpack; /* packets received in sequence */
- long spps_rcvbyte; /* bytes received in sequence */
- long spps_rcvbadsum; /* packets received with ccksum errs */
- long spps_rcvbadoff; /* packets received with bad offset */
- long spps_rcvshort; /* packets received too short */
- long spps_rcvduppack; /* duplicate-only packets received */
- long spps_rcvdupbyte; /* duplicate-only bytes received */
- long spps_rcvpartduppack; /* packets with some duplicate data */
- long spps_rcvpartdupbyte; /* dup. bytes in part-dup. packets */
- long spps_rcvoopack; /* out-of-order packets received */
- long spps_rcvoobyte; /* out-of-order bytes received */
- long spps_rcvpackafterwin; /* packets with data after window */
- long spps_rcvbyteafterwin; /* bytes rcvd after window */
- long spps_rcvafterclose; /* packets rcvd after "close" */
- long spps_rcvwinprobe; /* rcvd window probe packets */
- long spps_rcvdupack; /* rcvd duplicate acks */
- long spps_rcvacktoomuch; /* rcvd acks for unsent data */
- long spps_rcvackpack; /* rcvd ack packets */
- long spps_rcvackbyte; /* bytes acked by rcvd acks */
- long spps_rcvwinupd; /* rcvd window update packets */
-};
-struct spp_istat {
- short hdrops;
- short badsum;
- short badlen;
- short slotim;
- short fastim;
- short nonucn;
- short noconn;
- short notme;
- short wrncon;
- short bdreas;
- short gonawy;
- short notyet;
- short lstdup;
- struct sppstat newstats;
-};
-
-#ifdef _KERNEL
-struct spp_istat spp_istat;
-
-/* Following was struct sppstat sppstat; */
-#ifndef sppstat
-#define sppstat spp_istat.newstats
-#endif
-
-u_short spp_iss;
-extern struct sppcb *spp_close(), *spp_disconnect(),
- *spp_usrclosed(), *spp_timers(), *spp_drop();
-#endif
-
-#define SPP_ISSINCR 128
-/*
- * SPP sequence numbers are 16 bit integers operated
- * on with modular arithmetic. These macros can be
- * used to compare such integers.
- */
-#ifdef sun
-short xnsCbug;
-#define SSEQ_LT(a,b) ((xnsCbug = (short)((a)-(b))) < 0)
-#define SSEQ_LEQ(a,b) ((xnsCbug = (short)((a)-(b))) <= 0)
-#define SSEQ_GT(a,b) ((xnsCbug = (short)((a)-(b))) > 0)
-#define SSEQ_GEQ(a,b) ((xnsCbug = (short)((a)-(b))) >= 0)
-#else
-#define SSEQ_LT(a,b) (((short)((a)-(b))) < 0)
-#define SSEQ_LEQ(a,b) (((short)((a)-(b))) <= 0)
-#define SSEQ_GT(a,b) (((short)((a)-(b))) > 0)
-#define SSEQ_GEQ(a,b) (((short)((a)-(b))) >= 0)
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/include/nsswitch.h b/newlib/libc/sys/linux/include/nsswitch.h
deleted file mode 100644
index 3a578e4ff..000000000
--- a/newlib/libc/sys/linux/include/nsswitch.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/* $NetBSD: nsswitch.h,v 1.6 1999/01/26 01:04:07 lukem Exp $ */
-/* $FreeBSD: src/include/nsswitch.h,v 1.2 2002/03/23 17:24:53 imp Exp $ */
-
-/*-
- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Luke Mewburn.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the 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
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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.
- */
-
-#ifndef _NSSWITCH_H
-#define _NSSWITCH_H 1
-
-#include <sys/types.h>
-
-#include <stdarg.h>
-
-#ifndef _PATH_NS_CONF
-#define _PATH_NS_CONF "/etc/nsswitch.conf"
-#endif
-
-#define NS_CONTINUE 0
-#define NS_RETURN 1
-
-#define NS_SUCCESS (1<<0) /* entry was found */
-#define NS_UNAVAIL (1<<1) /* source not responding, or corrupt */
-#define NS_NOTFOUND (1<<2) /* source responded 'no such entry' */
-#define NS_TRYAGAIN (1<<3) /* source busy, may respond to retrys */
-#define NS_STATUSMASK 0x000000ff /* bitmask to get the status flags */
-
-/*
- * currently implemented sources
- */
-#define NSSRC_FILES "files" /* local files */
-#define NSSRC_DNS "dns" /* DNS; IN for hosts, HS for others */
-#define NSSRC_NIS "nis" /* YP/NIS */
-#define NSSRC_COMPAT "compat" /* passwd,group in YP compat mode */
-
-/*
- * currently implemented databases
- */
-#define NSDB_HOSTS "hosts"
-#define NSDB_GROUP "group"
-#define NSDB_GROUP_COMPAT "group_compat"
-#define NSDB_NETGROUP "netgroup"
-#define NSDB_NETWORKS "networks"
-#define NSDB_PASSWD "passwd"
-#define NSDB_PASSWD_COMPAT "passwd_compat"
-#define NSDB_SHELLS "shells"
-
-/*
- * suggested databases to implement
- */
-#define NSDB_ALIASES "aliases"
-#define NSDB_AUTH "auth"
-#define NSDB_AUTOMOUNT "automount"
-#define NSDB_BOOTPARAMS "bootparams"
-#define NSDB_ETHERS "ethers"
-#define NSDB_EXPORTS "exports"
-#define NSDB_NETMASKS "netmasks"
-#define NSDB_PHONES "phones"
-#define NSDB_PRINTCAP "printcap"
-#define NSDB_PROTOCOLS "protocols"
-#define NSDB_REMOTE "remote"
-#define NSDB_RPC "rpc"
-#define NSDB_SENDMAILVARS "sendmailvars"
-#define NSDB_SERVICES "services"
-#define NSDB_TERMCAP "termcap"
-#define NSDB_TTYS "ttys"
-
-/*
- * ns_dtab - `nsswitch dispatch table'
- * contains an entry for each source and the appropriate function to call
- */
-typedef struct {
- const char *src;
- int (*callback)(void *retval, void *cb_data, va_list ap);
- void *cb_data;
-} ns_dtab;
-
-/*
- * macros to help build an ns_dtab[]
- */
-#define NS_FILES_CB(F,C) { NSSRC_FILES, F, C },
-#define NS_COMPAT_CB(F,C) { NSSRC_COMPAT, F, C },
-
-#ifdef HESIOD
-# define NS_DNS_CB(F,C) { NSSRC_DNS, F, C },
-#else
-# define NS_DNS_CB(F,C)
-#endif
-
-#ifdef YP
-# define NS_NIS_CB(F,C) { NSSRC_NIS, F, C },
-#else
-# define NS_NIS_CB(F,C)
-#endif
-
-/*
- * ns_src - `nsswitch source'
- * used by the nsparser routines to store a mapping between a source
- * and its dispatch control flags for a given database.
- */
-typedef struct {
- const char *name;
- u_int32_t flags;
-} ns_src;
-
-
-/*
- * default sourcelist (if nsswitch.conf is missing, corrupt,
- * or the requested database doesn't have an entry.
- */
-extern const ns_src __nsdefaultsrc[];
-
-
-#ifdef _NS_PRIVATE
-
-/*
- * private data structures for back-end nsswitch implementation
- */
-
-/*
- * ns_dbt - `nsswitch database thang'
- * for each database in /etc/nsswitch.conf there is a ns_dbt, with its
- * name and a list of ns_src's containing the source information.
- */
-typedef struct {
- const char *name; /* name of database */
- ns_src *srclist; /* list of sources */
- int srclistsize; /* size of srclist */
-} ns_dbt;
-
-#endif /* _NS_PRIVATE */
-
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-extern int nsdispatch(void *, const ns_dtab [], const char *,
- const char *, const ns_src [], ...);
-
-#ifdef _NS_PRIVATE
-extern void _nsdbtaddsrc(ns_dbt *, const ns_src *);
-extern void _nsdbtdump(const ns_dbt *);
-extern const ns_dbt *_nsdbtget(const char *);
-extern void _nsdbtput(const ns_dbt *);
-extern void _nsyyerror(const char *);
-extern int _nsyylex(void);
-extern int _nsyylineno;
-#endif /* _NS_PRIVATE */
-
-__END_DECLS
-
-#endif /* !_NSSWITCH_H */
diff --git a/newlib/libc/sys/linux/include/paths.h b/newlib/libc/sys/linux/include/paths.h
deleted file mode 100644
index a87831e74..000000000
--- a/newlib/libc/sys/linux/include/paths.h
+++ /dev/null
@@ -1,74 +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.
- *
- * @(#)paths.h 8.1 (Berkeley) 6/2/93
- */
-
-#ifndef _PATHS_H_
-#define _PATHS_H_
-
-/* Default search path. */
-#define _PATH_DEFPATH "/usr/bin:/bin"
-/* All standard utilities path. */
-#define _PATH_STDPATH \
- "/usr/bin:/bin:/usr/sbin:/sbin"
-
-#define _PATH_BSHELL "/bin/sh"
-#define _PATH_CONSOLE "/dev/console"
-#define _PATH_CSHELL "/bin/csh"
-#define _PATH_DEVDB "/var/run/dev.db"
-#define _PATH_DEVNULL "/dev/null"
-#define _PATH_DRUM "/dev/drum"
-#define _PATH_KLOG "/proc/kmsg"
-#define _PATH_KMEM "/dev/kmem"
-#define _PATH_LASTLOG "/var/log/lastlog"
-#define _PATH_MAILDIR "/var/mail"
-#define _PATH_MAN "/usr/share/man"
-#define _PATH_MEM "/dev/mem"
-#define _PATH_MNTTAB "/etc/fstab"
-#define _PATH_MOUNTED "/etc/mtab"
-#define _PATH_NOLOGIN "/etc/nologin"
-#define _PATH_PRESERVE "/var/lib"
-#define _PATH_RWHODIR "/var/spool/rwho"
-#define _PATH_SENDMAIL "/usr/sbin/sendmail"
-#define _PATH_SHADOW "/etc/shadow"
-#define _PATH_SHELLS "/etc/shells"
-#define _PATH_TTY "/dev/tty"
-#define _PATH_UNIX "/boot/vmlinux"
-#define _PATH_UTMP "/var/run/utmp"
-#define _PATH_VI "/bin/vi"
-#define _PATH_WTMP "/var/log/wtmp"
-
-/* Provide trailing slash, since mostly used for building pathnames. */
-#define _PATH_DEV "/dev/"
-#define _PATH_TMP "/tmp/"
-#define _PATH_VARDB "/var/db/"
-#define _PATH_VARRUN "/var/run/"
-#define _PATH_VARTMP "/var/tmp/"
-
-#endif /* !_PATHS_H_ */
diff --git a/newlib/libc/sys/linux/include/pthread.h b/newlib/libc/sys/linux/include/pthread.h
deleted file mode 100644
index d7addbe46..000000000
--- a/newlib/libc/sys/linux/include/pthread.h
+++ /dev/null
@@ -1,682 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-#ifndef _PTHREAD_H
-#define _PTHREAD_H 1
-
-#include <features.h>
-
-#include <sched.h>
-#include <time.h>
-
-#define __need_sigset_t
-#include <signal.h>
-#include <bits/pthreadtypes.h>
-#include <bits/initspin.h>
-
-
-__BEGIN_DECLS
-
-/* Initializers. */
-
-#define PTHREAD_MUTEX_INITIALIZER \
- {0, 0, 0, PTHREAD_MUTEX_TIMED_NP, __LOCK_INITIALIZER}
-#ifdef __USE_GNU
-# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
- {0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, __LOCK_INITIALIZER}
-# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
- {0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, __LOCK_INITIALIZER}
-# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
- {0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __LOCK_INITIALIZER}
-#endif
-
-#define PTHREAD_COND_INITIALIZER {__LOCK_INITIALIZER, 0}
-
-#ifdef __USE_UNIX98
-# define PTHREAD_RWLOCK_INITIALIZER \
- { __LOCK_INITIALIZER, 0, NULL, NULL, NULL, \
- PTHREAD_RWLOCK_DEFAULT_NP, PTHREAD_PROCESS_PRIVATE }
-#endif
-#ifdef __USE_GNU
-# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
- { __LOCK_INITIALIZER, 0, NULL, NULL, NULL, \
- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_PROCESS_PRIVATE }
-#endif
-
-/* Values for attributes. */
-
-enum
-{
- PTHREAD_CREATE_JOINABLE,
-#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
- PTHREAD_CREATE_DETACHED
-#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
-};
-
-enum
-{
- PTHREAD_INHERIT_SCHED,
-#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED
- PTHREAD_EXPLICIT_SCHED
-#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED
-};
-
-enum
-{
- PTHREAD_SCOPE_SYSTEM,
-#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM
- PTHREAD_SCOPE_PROCESS
-#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS
-};
-
-enum
-{
- PTHREAD_MUTEX_TIMED_NP,
- PTHREAD_MUTEX_RECURSIVE_NP,
- PTHREAD_MUTEX_ERRORCHECK_NP,
- PTHREAD_MUTEX_ADAPTIVE_NP
-#ifdef __USE_UNIX98
- ,
- PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
- PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
- PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
- PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
-#endif
-#ifdef __USE_GNU
- /* For compatibility. */
- , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_ADAPTIVE_NP
-#endif
-};
-
-enum
-{
- PTHREAD_PROCESS_PRIVATE,
-#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE
- PTHREAD_PROCESS_SHARED
-#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED
-};
-
-#ifdef __USE_UNIX98
-enum
-{
- PTHREAD_RWLOCK_PREFER_READER_NP,
- PTHREAD_RWLOCK_PREFER_WRITER_NP,
- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
- PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_WRITER_NP
-};
-#endif /* Unix98 */
-
-#define PTHREAD_ONCE_INIT 0
-
-/* Special constants */
-
-#ifdef __USE_XOPEN2K
-/* -1 is distinct from 0 and all errno constants */
-# define PTHREAD_BARRIER_SERIAL_THREAD -1
-#endif
-
-/* Cleanup buffers */
-
-struct _pthread_cleanup_buffer
-{
- void (*__routine) (void *); /* Function to call. */
- void *__arg; /* Its argument. */
- int __canceltype; /* Saved cancellation type. */
- struct _pthread_cleanup_buffer *__prev; /* Chaining of cleanup functions. */
-};
-
-/* Cancellation */
-
-enum
-{
- PTHREAD_CANCEL_ENABLE,
-#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE
- PTHREAD_CANCEL_DISABLE
-#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE
-};
-enum
-{
- PTHREAD_CANCEL_DEFERRED,
-#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED
- PTHREAD_CANCEL_ASYNCHRONOUS
-#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS
-};
-#define PTHREAD_CANCELED ((void *) -1)
-
-
-/* Function for handling threads. */
-
-/* Create a thread with given attributes ATTR (or default attributes
- if ATTR is NULL), and call function START_ROUTINE with given
- arguments ARG. */
-extern int pthread_create (pthread_t *__restrict __thread1,
- __const pthread_attr_t *__restrict __attr,
- void *(*__start_routine) (void *),
- void *__restrict __arg) __THROW;
-
-/* Obtain the identifier of the current thread. */
-extern pthread_t pthread_self (void) __THROW;
-
-/* Compare two thread identifiers. */
-extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __THROW;
-
-/* Terminate calling thread. */
-extern void pthread_exit (void *__retval)
- __THROW __attribute__ ((__noreturn__));
-
-/* Make calling thread wait for termination of the thread TH. The
- exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN
- is not NULL. */
-extern int pthread_join (pthread_t __th, void **__thread_return) __THROW;
-
-/* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.
- The resources of TH will therefore be freed immediately when it
- terminates, instead of waiting for another thread to perform PTHREAD_JOIN
- on it. */
-extern int pthread_detach (pthread_t __th) __THROW;
-
-
-/* Functions for handling attributes. */
-
-/* Initialize thread attribute *ATTR with default attributes
- (detachstate is PTHREAD_JOINABLE, scheduling policy is SCHED_OTHER,
- no user-provided stack). */
-extern int pthread_attr_init (pthread_attr_t *__attr) __THROW;
-
-/* Destroy thread attribute *ATTR. */
-extern int pthread_attr_destroy (pthread_attr_t *__attr) __THROW;
-
-/* Set the `detachstate' attribute in *ATTR according to DETACHSTATE. */
-extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
- int __detachstate) __THROW;
-
-/* Return in *DETACHSTATE the `detachstate' attribute in *ATTR. */
-extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
- int *__detachstate) __THROW;
-
-/* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */
-extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
- __const struct sched_param *__restrict
- __param) __THROW;
-
-/* Return in *PARAM the scheduling parameters of *ATTR. */
-extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
- __attr,
- struct sched_param *__restrict __param)
- __THROW;
-
-/* Set scheduling policy in *ATTR according to POLICY. */
-extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
- __THROW;
-
-/* Return in *POLICY the scheduling policy of *ATTR. */
-extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
- __attr, int *__restrict __policy)
- __THROW;
-
-/* Set scheduling inheritance mode in *ATTR according to INHERIT. */
-extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
- int __inherit) __THROW;
-
-/* Return in *INHERIT the scheduling inheritance mode of *ATTR. */
-extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
- __attr, int *__restrict __inherit)
- __THROW;
-
-/* Set scheduling contention scope in *ATTR according to SCOPE. */
-extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
- __THROW;
-
-/* Return in *SCOPE the scheduling contention scope of *ATTR. */
-extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
- int *__restrict __scope) __THROW;
-
-#ifdef __USE_UNIX98
-/* Set the size of the guard area at the bottom of the thread. */
-extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
- size_t __guardsize) __THROW;
-
-/* Get the size of the guard area at the bottom of the thread. */
-extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict
- __attr, size_t *__restrict __guardsize)
- __THROW;
-#endif
-
-/* Set the starting address of the stack of the thread to be created.
- Depending on whether the stack grows up or down the value must either
- be higher or lower than all the address in the memory block. The
- minimal size of the block must be PTHREAD_STACK_SIZE. */
-extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
- void *__stackaddr) __THROW;
-
-/* Return the previously set address for the stack. */
-extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
- __attr, void **__restrict __stackaddr)
- __THROW;
-
-#ifdef __USE_XOPEN2K
-/* The following two interfaces are intended to replace the last two. They
- require setting the address as well as the size since only setting the
- address will make the implementation on some architectures impossible. */
-extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
- size_t __stacksize) __THROW;
-
-/* Return the previously set address for the stack. */
-extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
- void **__restrict __stackaddr,
- size_t *__restrict __stacksize) __THROW;
-#endif
-
-/* Add information about the minimum stack size needed for the thread
- to be started. This size must never be less than PTHREAD_STACK_SIZE
- and must also not exceed the system limits. */
-extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
- size_t __stacksize) __THROW;
-
-/* Return the currently used minimal stack size. */
-extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
- __attr, size_t *__restrict __stacksize)
- __THROW;
-
-#ifdef __USE_GNU
-/* Get thread attributes corresponding to the already running thread TH. */
-extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW;
-#endif
-
-/* Functions for scheduling control. */
-
-/* Set the scheduling parameters for TARGET_THREAD according to POLICY
- and *PARAM. */
-extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
- __const struct sched_param *__param)
- __THROW;
-
-/* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */
-extern int pthread_getschedparam (pthread_t __target_thread,
- int *__restrict __policy,
- struct sched_param *__restrict __param)
- __THROW;
-
-#ifdef __USE_UNIX98
-/* Determine level of concurrency. */
-extern int pthread_getconcurrency (void) __THROW;
-
-/* Set new concurrency level to LEVEL. */
-extern int pthread_setconcurrency (int __level) __THROW;
-#endif
-
-#ifdef __USE_GNU
-/* Yield the processor to another thread or process.
- This function is similar to the POSIX `sched_yield' function but
- might be differently implemented in the case of a m-on-n thread
- implementation. */
-extern int pthread_yield (void) __THROW;
-#endif
-
-/* Functions for mutex handling. */
-
-/* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the
- default values if later is NULL. */
-extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex,
- __const pthread_mutexattr_t *__restrict
- __mutex_attr) __THROW;
-
-/* Destroy MUTEX. */
-extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __THROW;
-
-/* Try to lock MUTEX. */
-extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) __THROW;
-
-/* Wait until lock for MUTEX becomes available and lock it. */
-extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __THROW;
-
-#ifdef __USE_XOPEN2K
-/* Wait until lock becomes available, or specified time passes. */
-extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
- __const struct timespec *__restrict
- __abstime) __THROW;
-#endif
-
-/* Unlock MUTEX. */
-extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __THROW;
-
-
-/* Functions for handling mutex attributes. */
-
-/* Initialize mutex attribute object ATTR with default attributes
- (kind is PTHREAD_MUTEX_TIMED_NP). */
-extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __THROW;
-
-/* Destroy mutex attribute object ATTR. */
-extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW;
-
-/* Get the process-shared flag of the mutex attribute ATTR. */
-extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
- __restrict __attr,
- int *__restrict __pshared) __THROW;
-
-/* Set the process-shared flag of the mutex attribute ATTR. */
-extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
- int __pshared) __THROW;
-
-#ifdef __USE_UNIX98
-/* Set the mutex kind attribute in *ATTR to KIND (either PTHREAD_MUTEX_NORMAL,
- PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_ERRORCHECK, or
- PTHREAD_MUTEX_DEFAULT). */
-extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
- __THROW;
-
-/* Return in *KIND the mutex kind attribute in *ATTR. */
-extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
- __attr, int *__restrict __kind) __THROW;
-#endif
-
-
-/* Functions for handling conditional variables. */
-
-/* Initialize condition variable COND using attributes ATTR, or use
- the default values if later is NULL. */
-extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
- __const pthread_condattr_t *__restrict
- __cond_attr) __THROW;
-
-/* Destroy condition variable COND. */
-extern int pthread_cond_destroy (pthread_cond_t *__cond) __THROW;
-
-/* Wake up one thread waiting for condition variable COND. */
-extern int pthread_cond_signal (pthread_cond_t *__cond) __THROW;
-
-/* Wake up all threads waiting for condition variables COND. */
-extern int pthread_cond_broadcast (pthread_cond_t *__cond) __THROW;
-
-/* Wait for condition variable COND to be signaled or broadcast.
- MUTEX is assumed to be locked before. */
-extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
- pthread_mutex_t *__restrict __mutex) __THROW;
-
-/* Wait for condition variable COND to be signaled or broadcast until
- ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an
- absolute time specification; zero is the beginning of the epoch
- (00:00:00 GMT, January 1, 1970). */
-extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
- pthread_mutex_t *__restrict __mutex,
- __const struct timespec *__restrict
- __abstime) __THROW;
-
-/* Functions for handling condition variable attributes. */
-
-/* Initialize condition variable attribute ATTR. */
-extern int pthread_condattr_init (pthread_condattr_t *__attr) __THROW;
-
-/* Destroy condition variable attribute ATTR. */
-extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW;
-
-/* Get the process-shared flag of the condition variable attribute ATTR. */
-extern int pthread_condattr_getpshared (__const pthread_condattr_t *
- __restrict __attr,
- int *__restrict __pshared) __THROW;
-
-/* Set the process-shared flag of the condition variable attribute ATTR. */
-extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
- int __pshared) __THROW;
-
-
-#ifdef __USE_UNIX98
-/* Functions for handling read-write locks. */
-
-/* Initialize read-write lock RWLOCK using attributes ATTR, or use
- the default values if later is NULL. */
-extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
- __const pthread_rwlockattr_t *__restrict
- __attr) __THROW;
-
-/* Destroy read-write lock RWLOCK. */
-extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) __THROW;
-
-/* Acquire read lock for RWLOCK. */
-extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) __THROW;
-
-/* Try to acquire read lock for RWLOCK. */
-extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __THROW;
-
-#ifdef __USE_XOPEN2K
-/* Try to acquire read lock for RWLOCK or return after specfied time. */
-extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
- __const struct timespec *__restrict
- __abstime) __THROW;
-#endif
-
-/* Acquire write lock for RWLOCK. */
-extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __THROW;
-
-/* Try to acquire write lock for RWLOCK. */
-extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROW;
-
-#ifdef __USE_XOPEN2K
-/* Try to acquire write lock for RWLOCK or return after specfied time. */
-extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
- __const struct timespec *__restrict
- __abstime) __THROW;
-#endif
-
-/* Unlock RWLOCK. */
-extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __THROW;
-
-
-/* Functions for handling read-write lock attributes. */
-
-/* Initialize attribute object ATTR with default values. */
-extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) __THROW;
-
-/* Destroy attribute object ATTR. */
-extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW;
-
-/* Return current setting of process-shared attribute of ATTR in PSHARED. */
-extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
- __restrict __attr,
- int *__restrict __pshared) __THROW;
-
-/* Set process-shared attribute of ATTR to PSHARED. */
-extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
- int __pshared) __THROW;
-
-/* Return current setting of reader/writer preference. */
-extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *__attr,
- int *__pref) __THROW;
-
-/* Set reader/write preference. */
-extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
- int __pref) __THROW;
-#endif
-
-#ifdef __USE_XOPEN2K
-/* The IEEE Std. 1003.1j-2000 introduces functions to implement
- spinlocks. */
-
-/* Initialize the spinlock LOCK. If PSHARED is nonzero the spinlock can
- be shared between different processes. */
-extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
- __THROW;
-
-/* Destroy the spinlock LOCK. */
-extern int pthread_spin_destroy (pthread_spinlock_t *__lock) __THROW;
-
-/* Wait until spinlock LOCK is retrieved. */
-extern int pthread_spin_lock (pthread_spinlock_t *__lock) __THROW;
-
-/* Try to lock spinlock LOCK. */
-extern int pthread_spin_trylock (pthread_spinlock_t *__lock) __THROW;
-
-/* Release spinlock LOCK. */
-extern int pthread_spin_unlock (pthread_spinlock_t *__lock) __THROW;
-
-
-/* Barriers are a also a new feature in 1003.1j-2000. */
-
-extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
- __const pthread_barrierattr_t *__restrict
- __attr, unsigned int __count) __THROW;
-
-extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __THROW;
-
-extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) __THROW;
-
-extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW;
-
-extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
- __restrict __attr,
- int *__restrict __pshared) __THROW;
-
-extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
- int __pshared) __THROW;
-
-extern int pthread_barrier_wait (pthread_barrier_t *__barrier) __THROW;
-#endif
-
-
-/* Functions for handling thread-specific data. */
-
-/* Create a key value identifying a location in the thread-specific
- data area. Each thread maintains a distinct thread-specific data
- area. DESTR_FUNCTION, if non-NULL, is called with the value
- associated to that key when the key is destroyed.
- DESTR_FUNCTION is not called if the value associated is NULL when
- the key is destroyed. */
-extern int pthread_key_create (pthread_key_t *__key,
- void (*__destr_function) (void *)) __THROW;
-
-/* Destroy KEY. */
-extern int pthread_key_delete (pthread_key_t __key) __THROW;
-
-/* Store POINTER in the thread-specific data slot identified by KEY. */
-extern int pthread_setspecific (pthread_key_t __key,
- __const void *__pointer) __THROW;
-
-/* Return current value of the thread-specific data slot identified by KEY. */
-extern void *pthread_getspecific (pthread_key_t __key) __THROW;
-
-
-/* Functions for handling initialization. */
-
-/* Guarantee that the initialization function INIT_ROUTINE will be called
- only once, even if pthread_once is executed several times with the
- same ONCE_CONTROL argument. ONCE_CONTROL must point to a static or
- extern variable initialized to PTHREAD_ONCE_INIT. */
-extern int pthread_once (pthread_once_t *__once_control,
- void (*__init_routine) (void)) __THROW;
-
-
-/* Functions for handling cancellation. */
-
-/* Set cancelability state of current thread to STATE, returning old
- state in *OLDSTATE if OLDSTATE is not NULL. */
-extern int pthread_setcancelstate (int __state, int *__oldstate) __THROW;
-
-/* Set cancellation state of current thread to TYPE, returning the old
- type in *OLDTYPE if OLDTYPE is not NULL. */
-extern int pthread_setcanceltype (int __type, int *__oldtype) __THROW;
-
-/* Cancel THREAD immediately or at the next possibility. */
-extern int pthread_cancel (pthread_t __thread1) __THROW;
-
-/* Test for pending cancellation for the current thread and terminate
- the thread as per pthread_exit(PTHREAD_CANCELED) if it has been
- cancelled. */
-extern void pthread_testcancel (void) __THROW;
-
-
-/* Install a cleanup handler: ROUTINE will be called with arguments ARG
- when the thread is cancelled or calls pthread_exit. ROUTINE will also
- be called with arguments ARG when the matching pthread_cleanup_pop
- is executed with non-zero EXECUTE argument.
- pthread_cleanup_push and pthread_cleanup_pop are macros and must always
- be used in matching pairs at the same nesting level of braces. */
-
-#define pthread_cleanup_push(routine,arg) \
- { struct _pthread_cleanup_buffer _buffer; \
- _pthread_cleanup_push (&_buffer, (routine), (arg));
-
-extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *__buffer,
- void (*__routine) (void *),
- void *__arg) __THROW;
-
-/* Remove a cleanup handler installed by the matching pthread_cleanup_push.
- If EXECUTE is non-zero, the handler function is called. */
-
-#define pthread_cleanup_pop(execute) \
- _pthread_cleanup_pop (&_buffer, (execute)); }
-
-extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *__buffer,
- int __execute) __THROW;
-
-/* Install a cleanup handler as pthread_cleanup_push does, but also
- saves the current cancellation type and set it to deferred cancellation. */
-
-#ifdef __USE_GNU
-# define pthread_cleanup_push_defer_np(routine,arg) \
- { struct _pthread_cleanup_buffer _buffer; \
- _pthread_cleanup_push_defer (&_buffer, (routine), (arg));
-
-extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buffer,
- void (*__routine) (void *),
- void *__arg) __THROW;
-
-/* Remove a cleanup handler as pthread_cleanup_pop does, but also
- restores the cancellation type that was in effect when the matching
- pthread_cleanup_push_defer was called. */
-
-# define pthread_cleanup_pop_restore_np(execute) \
- _pthread_cleanup_pop_restore (&_buffer, (execute)); }
-
-extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *__buffer,
- int __execute) __THROW;
-#endif
-
-
-#ifdef __USE_XOPEN2K
-/* Get ID of CPU-time clock for thread THREAD_ID. */
-extern int pthread_getcpuclockid (pthread_t __thread_id,
- clockid_t *__clock_id) __THROW;
-#endif
-
-
-/* Functions for handling signals. */
-#include <bits/sigthread.h>
-
-
-/* Functions for handling process creation and process execution. */
-
-/* Install handlers to be called when a new process is created with FORK.
- The PREPARE handler is called in the parent process just before performing
- FORK. The PARENT handler is called in the parent process just after FORK.
- The CHILD handler is called in the child process. Each of the three
- handlers can be NULL, meaning that no handler needs to be called at that
- point.
- PTHREAD_ATFORK can be called several times, in which case the PREPARE
- handlers are called in LIFO order (last added with PTHREAD_ATFORK,
- first called before FORK), and the PARENT and CHILD handlers are called
- in FIFO (first added, first called). */
-
-extern int pthread_atfork (void (*__prepare) (void),
- void (*__parent) (void),
- void (*__child) (void)) __THROW;
-
-/* Terminate all threads in the program except the calling process.
- Should be called just before invoking one of the exec*() functions. */
-
-extern void pthread_kill_other_threads_np (void) __THROW;
-
-__END_DECLS
-
-#endif /* pthread.h */
diff --git a/newlib/libc/sys/linux/include/regex.h b/newlib/libc/sys/linux/include/regex.h
deleted file mode 100644
index d71c0ceee..000000000
--- a/newlib/libc/sys/linux/include/regex.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*-
- * Copyright (c) 1992 Henry Spencer.
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer of the University of Toronto.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regex.h 8.2 (Berkeley) 1/3/94
- * $FreeBSD: src/include/regex.h,v 1.4 2002/03/23 17:24:53 imp Exp $
- */
-
-#ifndef _REGEX_H_
-#define _REGEX_H_
-
-#include <sys/cdefs.h>
-
-/* types */
-typedef off_t regoff_t;
-
-typedef struct {
- int re_magic;
- size_t re_nsub; /* number of parenthesized subexpressions */
- __const char *re_endp; /* end pointer for REG_PEND */
- struct re_guts *re_g; /* none of your business :-) */
-} regex_t;
-
-typedef struct {
- regoff_t rm_so; /* start of match */
- regoff_t rm_eo; /* end of match */
-} regmatch_t;
-
-/* regcomp() flags */
-#define REG_BASIC 0000
-#define REG_EXTENDED 0001
-#define REG_ICASE 0002
-#define REG_NOSUB 0004
-#define REG_NEWLINE 0010
-#define REG_NOSPEC 0020
-#define REG_PEND 0040
-#define REG_DUMP 0200
-
-/* regerror() flags */
-#define REG_NOMATCH 1
-#define REG_BADPAT 2
-#define REG_ECOLLATE 3
-#define REG_ECTYPE 4
-#define REG_EESCAPE 5
-#define REG_ESUBREG 6
-#define REG_EBRACK 7
-#define REG_EPAREN 8
-#define REG_EBRACE 9
-#define REG_BADBR 10
-#define REG_ERANGE 11
-#define REG_ESPACE 12
-#define REG_BADRPT 13
-#define REG_EMPTY 14
-#define REG_ASSERT 15
-#define REG_INVARG 16
-#define REG_ATOI 255 /* convert name to number (!) */
-#define REG_ITOA 0400 /* convert number to name (!) */
-
-/* regexec() flags */
-#define REG_NOTBOL 00001
-#define REG_NOTEOL 00002
-#define REG_STARTEND 00004
-#define REG_TRACE 00400 /* tracing of execution */
-#define REG_LARGE 01000 /* force large representation */
-#define REG_BACKR 02000 /* force use of backref code */
-
-__BEGIN_DECLS
-int regcomp(regex_t *, const char *, int);
-size_t regerror(int, const regex_t *, char *, size_t);
-int regexec(const regex_t *, const char *, size_t, regmatch_t [], int);
-void regfree(regex_t *);
-__END_DECLS
-
-#endif /* !_REGEX_H_ */
diff --git a/newlib/libc/sys/linux/include/resolv.h b/newlib/libc/sys/linux/include/resolv.h
deleted file mode 100644
index 1114f2d92..000000000
--- a/newlib/libc/sys/linux/include/resolv.h
+++ /dev/null
@@ -1,319 +0,0 @@
-/*-
- * Copyright (c) 1983, 1987, 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * @(#)resolv.h 8.1 (Berkeley) 6/2/93
- * From Id: resolv.h,v 8.12 1998/04/28 19:36:46 halley Exp $
- * $FreeBSD: src/include/resolv.h,v 1.21 2002/03/23 17:24:53 imp Exp $
- */
-
-#ifndef _RESOLV_H_
-#define _RESOLV_H_
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/cdefs.h>
-#include <sys/socket.h>
-#include <stdio.h>
-
-/*
- * Revision information. This is the release date in YYYYMMDD format.
- * It can change every day so the right thing to do with it is use it
- * in preprocessor commands such as "#if (__RES > 19931104)". Do not
- * compare for equality; rather, use it to determine whether your resolver
- * is new enough to contain a certain feature.
- */
-
-#define __RES 19960801
-
-/*
- * Resolver configuration file.
- * Normally not present, but may contain the address of the
- * inital name server(s) to query and the domain search list.
- */
-
-#ifndef _PATH_RESCONF
-#define _PATH_RESCONF "/etc/resolv.conf"
-#endif
-
-/*
- * Global defines and variables for resolver stub.
- */
-#define MAXNS 3 /* max # name servers we'll track */
-#define MAXDFLSRCH 3 /* # default domain levels to try */
-#define MAXDNSRCH 6 /* max # domains in search path */
-#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */
-
-#define RES_TIMEOUT 5 /* min. seconds between retries */
-#define MAXRESOLVSORT 10 /* number of net to sort on */
-#define RES_MAXNDOTS 15 /* should reflect bit field size */
-
-struct __res_state {
- int retrans; /* retransmition time interval */
- int retry; /* number of times to retransmit */
- u_long options; /* option flags - see below. */
- int nscount; /* number of name servers */
- struct sockaddr_in
- nsaddr_list[MAXNS]; /* address of name server */
-#define nsaddr nsaddr_list[0] /* for backward compatibility */
- u_short id; /* current message id */
- char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
- char defdname[256]; /* default domain (deprecated) */
- u_long pfcode; /* RES_PRF_ flags - see below. */
- unsigned ndots:4; /* threshold for initial abs. query */
- unsigned nsort:4; /* number of elements in sort_list[] */
- char unused[3];
- struct {
- struct in_addr addr;
- u_int32_t mask;
- } sort_list[MAXRESOLVSORT];
- char pad[72]; /* on an i386 this means 512b total */
-};
-
-/* for INET6 */
-/*
- * replacement of __res_state, separated to keep binary compatibility.
- */
-struct __res_state_ext {
- struct sockaddr_storage nsaddr_list[MAXNS];
- struct {
- int af; /* address family for addr, mask */
- union {
- struct in_addr ina;
- struct in6_addr in6a;
- } addr, mask;
- } sort_list[MAXRESOLVSORT];
-};
-
-/*
- * Resolver options (keep these in synch with res_debug.c, please)
- */
-#define RES_INIT 0x00000001 /* address initialized */
-#define RES_DEBUG 0x00000002 /* print debug messages */
-#define RES_AAONLY 0x00000004 /* authoritative answers only (!IMPL)*/
-#define RES_USEVC 0x00000008 /* use virtual circuit */
-#define RES_PRIMARY 0x00000010 /* query primary server only (!IMPL) */
-#define RES_IGNTC 0x00000020 /* ignore truncation errors */
-#define RES_RECURSE 0x00000040 /* recursion desired */
-#define RES_DEFNAMES 0x00000080 /* use default domain name */
-#define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */
-#define RES_DNSRCH 0x00000200 /* search up local domain tree */
-#define RES_INSECURE1 0x00000400 /* type 1 security disabled */
-#define RES_INSECURE2 0x00000800 /* type 2 security disabled */
-#define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */
-#define RES_USE_INET6 0x00002000 /* use/map IPv6 in gethostbyname() */
-#define RES_NOTLDQUERY 0x00004000 /* Don't query TLD names */
-/* KAME extensions: use higher bit to avoid conflict with ISC use */
-#define RES_USE_EDNS0 0x40000000 /* use EDNS0 */
-
-#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
-
-/*
- * Resolver "pfcode" values. Used by dig.
- */
-#define RES_PRF_STATS 0x00000001
-#define RES_PRF_UPDATE 0x00000002
-#define RES_PRF_CLASS 0x00000004
-#define RES_PRF_CMD 0x00000008
-#define RES_PRF_QUES 0x00000010
-#define RES_PRF_ANS 0x00000020
-#define RES_PRF_AUTH 0x00000040
-#define RES_PRF_ADD 0x00000080
-#define RES_PRF_HEAD1 0x00000100
-#define RES_PRF_HEAD2 0x00000200
-#define RES_PRF_TTLID 0x00000400
-#define RES_PRF_HEADX 0x00000800
-#define RES_PRF_QUERY 0x00001000
-#define RES_PRF_REPLY 0x00002000
-#define RES_PRF_INIT 0x00004000
-/* 0x00008000 */
-
-typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
- res_sendhookact;
-
-typedef res_sendhookact (*res_send_qhook)(struct sockaddr_in * const *ns,
- const u_char **query,
- int *querylen,
- u_char *ans,
- int anssiz,
- int *resplen);
-
-typedef res_sendhookact (*res_send_rhook)(const struct sockaddr_in *ns,
- const u_char *query,
- int querylen,
- u_char *ans,
- int anssiz,
- int *resplen);
-
-struct res_sym {
- int number; /* Identifying number, like T_MX */
- char * name; /* Its symbolic name, like "MX" */
- char * humanname; /* Its fun name, like "mail exchanger" */
-};
-
-extern struct __res_state _res;
-/* for INET6 */
-extern struct __res_state_ext _res_ext;
-
-extern const struct res_sym __p_class_syms[];
-extern const struct res_sym __p_type_syms[];
-
-/* Private routines shared between libc/net, named, nslookup and others. */
-#define res_hnok __res_hnok
-#define res_ownok __res_ownok
-#define res_mailok __res_mailok
-#define res_dnok __res_dnok
-#define sym_ston __sym_ston
-#define sym_ntos __sym_ntos
-#define sym_ntop __sym_ntop
-#define b64_ntop __b64_ntop
-#define b64_pton __b64_pton
-#define loc_ntoa __loc_ntoa
-#define loc_aton __loc_aton
-#define fp_resstat __fp_resstat
-#define p_query __p_query
-#define dn_skipname __dn_skipname
-#define fp_resstat __fp_resstat
-#define fp_query __fp_query
-#define fp_nquery __fp_nquery
-#define hostalias __hostalias
-#define putlong __putlong
-#define putshort __putshort
-#define p_class __p_class
-#define p_time __p_time
-#define p_type __p_type
-#define p_query __p_query
-#define p_cdnname __p_cdnname
-#define p_section __p_section
-#define p_cdname __p_cdname
-#define p_fqnname __p_fqnname
-#define p_fqname __p_fqname
-#define p_option __p_option
-#define p_secstodate __p_secstodate
-#define dn_count_labels __dn_count_labels
-#define dn_comp __dn_comp
-#define dn_expand __dn_expand
-#define res_init __res_init
-#define res_randomid __res_randomid
-#define res_query __res_query
-#define res_search __res_search
-#define res_querydomain __res_querydomain
-#define res_mkquery __res_mkquery
-#define res_send __res_send
-#define res_isourserver __res_isourserver
-#define res_nameinquery __res_nameinquery
-#define res_queriesmatch __res_queriesmatch
-#define res_close __res_close
-#define res_opt __res_opt
-#define res_mkupdate __res_mkupdate
-#define res_mkupdrec __res_mkupdrec
-#define res_freeupdrec __res_freeupdrec
-
-__BEGIN_DECLS
-int res_hnok(const char *);
-int res_ownok(const char *);
-int res_mailok(const char *);
-int res_dnok(const char *);
-int sym_ston(const struct res_sym *, const char *, int *);
-const char * sym_ntos(const struct res_sym *, int, int *);
-const char * sym_ntop(const struct res_sym *, int, int *);
-int b64_ntop(u_char const *, size_t, char *, size_t);
-int b64_pton(char const *, u_char *, size_t);
-int loc_aton(const char *, u_char *);
-const char * loc_ntoa(const u_char *, char *);
-int dn_skipname(const u_char *, const u_char *);
-void fp_resstat(struct __res_state *, FILE *);
-void fp_query(const u_char *, FILE *);
-void fp_nquery(const u_char *, int, FILE *);
-const char * hostalias(const char *);
-void putlong(u_int32_t, u_char *);
-void putshort(u_int16_t, u_char *);
-const char * p_class(int);
-const char * p_time(u_int32_t);
-const char * p_type(int);
-void p_query(const u_char *);
-const u_char * p_cdnname(const u_char *, const u_char *, int, FILE *);
-const u_char * p_cdname(const u_char *, const u_char *, FILE *);
-const u_char * p_fqnname(const u_char *, const u_char *,
- int, char *, int);
-const u_char * p_fqname(const u_char *, const u_char *, FILE *);
-const char * p_option(u_long);
-char * p_secstodate(u_long);
-int dn_count_labels(const char *);
-int dn_comp(const char *, u_char *, int, u_char **, u_char **);
-int dn_expand(const u_char *, const u_char *, const u_char *,
- char *, int);
-int res_init(void);
-u_int res_randomid(void);
-int res_query(const char *, int, int, u_char *, int);
-int res_search(const char *, int, int, u_char *, int);
-int res_querydomain(const char *, const char *, int, int,
- u_char *, int);
-int res_mkquery(int, const char *, int, int, const u_char *,
- int, const u_char *, u_char *, int);
-int res_send(const u_char *, int, u_char *, int);
-int res_isourserver(const struct sockaddr_in *);
-int res_nameinquery(const char *, int, int,
- const u_char *, const u_char *);
-int res_queriesmatch(const u_char *, const u_char *,
- const u_char *, const u_char *);
-void res_close(void);
-int res_opt(int, u_char *, int, int);
-const char * p_section(int, int);
-/* XXX The following depend on the ns_updrec typedef in arpa/nameser.h */
-#ifdef _ARPA_NAMESER_H_
-int res_update(ns_updrec *);
-int res_mkupdate(ns_updrec *, u_char *, int);
-ns_updrec * res_mkupdrec(int, const char *, u_int, u_int, u_long);
-void res_freeupdrec(ns_updrec *);
-#endif
-__END_DECLS
-
-#endif /* !_RESOLV_H_ */
diff --git a/newlib/libc/sys/linux/include/rpc/Makefile b/newlib/libc/sys/linux/include/rpc/Makefile
deleted file mode 100644
index 43a762bfc..000000000
--- a/newlib/libc/sys/linux/include/rpc/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-# from: @(#)Makefile 2.3 88/08/11 4.0 RPCSRC
-# $FreeBSD: src/include/rpc/Makefile,v 1.1 2001/03/19 12:49:46 alfred Exp $
-
-.SUFFIXES: .x
-
-RPCCOM = rpcgen -C
-
-HDRS= rpcb_prot.h
-
-XFILES= rpcb_prot.x
-
-HFILES= auth.h auth_unix.h clnt.h clnt_soc.h clnt_stat.h \
- nettype.h pmap_clnt.h pmap_prot.h pmap_rmt.h raw.h \
- rpc.h rpc_msg.h rpcb_clnt.h rpcent.h rpc_com.h \
- svc.h svc_auth.h svc_soc.h svc_dg.h types.h xdr.h
-
-# Secure RPC
-HFILES+= auth_des.h des.h des_crypt.h
-
-# Kerberos
-HFILES+= auth_kerb.h
-
-CLEANFILES+= ${HDRS}
-
-all: ${HDRS}
-
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
- ${HFILES:S;^;${.CURDIR}/;} \
- ${XFILES:S;^;${.CURDIR}/;} \
- ${HDRS} \
- ${DESTDIR}/usr/include/rpc
-
-.x.h:
- ${RPCCOM} -h -DWANT_NFS3 ${.IMPSRC} -o ${.TARGET}
-
-.include <bsd.prog.mk>
diff --git a/newlib/libc/sys/linux/include/rpc/auth.h b/newlib/libc/sys/linux/include/rpc/auth.h
deleted file mode 100644
index 811814740..000000000
--- a/newlib/libc/sys/linux/include/rpc/auth.h
+++ /dev/null
@@ -1,356 +0,0 @@
-/* $NetBSD: auth.h,v 1.15 2000/06/02 22:57:55 fvdl Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)auth.h 1.17 88/02/08 SMI
- * from: @(#)auth.h 2.3 88/08/07 4.0 RPCSRC
- * from: @(#)auth.h 1.43 98/02/02 SMI
- * $FreeBSD: src/include/rpc/auth.h,v 1.19 2002/03/23 17:24:55 imp Exp $
- */
-
-/*
- * auth.h, Authentication interface.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * The data structures are completely opaque to the client. The client
- * is required to pass a AUTH * to routines that create rpc
- * "sessions".
- */
-
-#ifndef _RPC_AUTH_H
-#define _RPC_AUTH_H
-#include <rpc/xdr.h>
-#include <rpc/clnt_stat.h>
-#include <sys/cdefs.h>
-#include <sys/socket.h>
-
-#define MAX_AUTH_BYTES 400
-#define MAXNETNAMELEN 255 /* maximum length of network user's name */
-
-/*
- * Client side authentication/security data
- */
-
-typedef struct sec_data {
- u_int secmod; /* security mode number e.g. in nfssec.conf */
- u_int rpcflavor; /* rpc flavors:AUTH_UNIX,AUTH_DES,RPCSEC_GSS */
- int flags; /* AUTH_F_xxx flags */
- caddr_t data; /* opaque data per flavor */
-} sec_data_t;
-
-#ifdef _SYSCALL32_IMPL
-struct sec_data32 {
- uint32_t secmod; /* security mode number e.g. in nfssec.conf */
- uint32_t rpcflavor; /* rpc flavors:AUTH_UNIX,AUTH_DES,RPCSEC_GSS */
- int32_t flags; /* AUTH_F_xxx flags */
- caddr32_t data; /* opaque data per flavor */
-};
-#endif /* _SYSCALL32_IMPL */
-
-/*
- * AUTH_DES flavor specific data from sec_data opaque data field.
- * AUTH_KERB has the same structure.
- */
-typedef struct des_clnt_data {
- struct netbuf syncaddr; /* time sync addr */
- struct knetconfig *knconf; /* knetconfig info that associated */
- /* with the syncaddr. */
- char *netname; /* server's netname */
- int netnamelen; /* server's netname len */
-} dh_k4_clntdata_t;
-
-#ifdef _SYSCALL32_IMPL
-struct des_clnt_data32 {
- struct netbuf32 syncaddr; /* time sync addr */
- caddr32_t knconf; /* knetconfig info that associated */
- /* with the syncaddr. */
- caddr32_t netname; /* server's netname */
- int32_t netnamelen; /* server's netname len */
-};
-#endif /* _SYSCALL32_IMPL */
-
-#ifdef KERBEROS
-/*
- * flavor specific data to hold the data for AUTH_DES/AUTH_KERB(v4)
- * in sec_data->data opaque field.
- */
-typedef struct krb4_svc_data {
- int window; /* window option value */
-} krb4_svcdata_t;
-
-typedef struct krb4_svc_data des_svcdata_t;
-#endif /* KERBEROS */
-
-/*
- * authentication/security specific flags
- */
-#define AUTH_F_RPCTIMESYNC 0x001 /* use RPC to do time sync */
-#define AUTH_F_TRYNONE 0x002 /* allow fall back to AUTH_NONE */
-
-
-/*
- * Status returned from authentication check
- */
-enum auth_stat {
- AUTH_OK=0,
- /*
- * failed at remote end
- */
- AUTH_BADCRED=1, /* bogus credentials (seal broken) */
- AUTH_REJECTEDCRED=2, /* client should begin new session */
- AUTH_BADVERF=3, /* bogus verifier (seal broken) */
- AUTH_REJECTEDVERF=4, /* verifier expired or was replayed */
- AUTH_TOOWEAK=5, /* rejected due to security reasons */
- /*
- * failed locally
- */
- AUTH_INVALIDRESP=6, /* bogus response verifier */
- AUTH_FAILED=7 /* some unknown reason */
-#ifdef KERBEROS
- /*
- * kerberos errors
- */
- ,
- AUTH_KERB_GENERIC = 8, /* kerberos generic error */
- AUTH_TIMEEXPIRE = 9, /* time of credential expired */
- AUTH_TKT_FILE = 10, /* something wrong with ticket file */
- AUTH_DECODE = 11, /* can't decode authenticator */
- AUTH_NET_ADDR = 12 /* wrong net address in ticket */
-#endif /* KERBEROS */
-};
-
-union des_block {
- struct {
- uint32_t high;
- uint32_t low;
- } key;
- char c[8];
-};
-typedef union des_block des_block;
-__BEGIN_DECLS
-extern bool_t xdr_des_block(XDR *, des_block *);
-__END_DECLS
-
-/*
- * Authentication info. Opaque to client.
- */
-struct opaque_auth {
- enum_t oa_flavor; /* flavor of auth */
- caddr_t oa_base; /* address of more auth stuff */
- u_int oa_length; /* not to exceed MAX_AUTH_BYTES */
-};
-
-
-/*
- * Auth handle, interface to client side authenticators.
- */
-typedef struct __auth {
- struct opaque_auth ah_cred;
- struct opaque_auth ah_verf;
- union des_block ah_key;
- struct auth_ops {
- void (*ah_nextverf) (struct __auth *);
- /* nextverf & serialize */
- int (*ah_marshal) (struct __auth *, XDR *);
- /* validate verifier */
- int (*ah_validate) (struct __auth *,
- struct opaque_auth *);
- /* refresh credentials */
- int (*ah_refresh) (struct __auth *, void *);
- /* destroy this structure */
- void (*ah_destroy) (struct __auth *);
- } *ah_ops;
- void *ah_private;
-} AUTH;
-
-
-/*
- * Authentication ops.
- * The ops and the auth handle provide the interface to the authenticators.
- *
- * AUTH *auth;
- * XDR *xdrs;
- * struct opaque_auth verf;
- */
-#define AUTH_NEXTVERF(auth) \
- ((*((auth)->ah_ops->ah_nextverf))(auth))
-#define auth_nextverf(auth) \
- ((*((auth)->ah_ops->ah_nextverf))(auth))
-
-#define AUTH_MARSHALL(auth, xdrs) \
- ((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
-#define auth_marshall(auth, xdrs) \
- ((*((auth)->ah_ops->ah_marshal))(auth, xdrs))
-
-#define AUTH_VALIDATE(auth, verfp) \
- ((*((auth)->ah_ops->ah_validate))((auth), verfp))
-#define auth_validate(auth, verfp) \
- ((*((auth)->ah_ops->ah_validate))((auth), verfp))
-
-#define AUTH_REFRESH(auth, msg) \
- ((*((auth)->ah_ops->ah_refresh))(auth, msg))
-#define auth_refresh(auth, msg) \
- ((*((auth)->ah_ops->ah_refresh))(auth, msg))
-
-#define AUTH_DESTROY(auth) \
- ((*((auth)->ah_ops->ah_destroy))(auth))
-#define auth_destroy(auth) \
- ((*((auth)->ah_ops->ah_destroy))(auth))
-
-
-__BEGIN_DECLS
-extern struct opaque_auth _null_auth;
-__END_DECLS
-
-/*
- * These are the various implementations of client side authenticators.
- */
-
-/*
- * System style authentication
- * AUTH *authunix_create(machname, uid, gid, len, aup_gids)
- * char *machname;
- * int uid;
- * int gid;
- * int len;
- * int *aup_gids;
- */
-__BEGIN_DECLS
-extern AUTH *authunix_create(char *, int, int, int,
- int *);
-extern AUTH *authunix_create_default(void); /* takes no parameters */
-extern AUTH *authnone_create(void); /* takes no parameters */
-__END_DECLS
-/*
- * DES style authentication
- * AUTH *authsecdes_create(servername, window, timehost, ckey)
- * char *servername; - network name of server
- * u_int window; - time to live
- * const char *timehost; - optional hostname to sync with
- * des_block *ckey; - optional conversation key to use
- */
-__BEGIN_DECLS
-extern AUTH *authdes_create (char *, u_int, struct sockaddr *, des_block *);
-extern AUTH *authdes_seccreate (const char *, const u_int, const char *,
- const des_block *);
-__END_DECLS
-
-__BEGIN_DECLS
-extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *);
-__END_DECLS
-
-#define authsys_create(c,i1,i2,i3,ip) authunix_create((c),(i1),(i2),(i3),(ip))
-#define authsys_create_default() authunix_create_default()
-
-/*
- * Netname manipulation routines.
- */
-__BEGIN_DECLS
-extern int getnetname(char *);
-extern int host2netname(char *, const char *, const char *);
-extern int user2netname(char *, const uid_t, const char *);
-extern int netname2user(char *, uid_t *, gid_t *, int *, gid_t *);
-extern int netname2host(char *, char *, const int);
-extern void passwd2des ( char *, char * );
-__END_DECLS
-
-/*
- *
- * These routines interface to the keyserv daemon
- *
- */
-__BEGIN_DECLS
-extern int key_decryptsession(const char *, des_block *);
-extern int key_encryptsession(const char *, des_block *);
-extern int key_gendes(des_block *);
-extern int key_setsecret(const char *);
-extern int key_secretkey_is_set(void);
-__END_DECLS
-
-/*
- * Publickey routines.
- */
-__BEGIN_DECLS
-extern int getpublickey (const char *, char *);
-extern int getpublicandprivatekey (char *, char *);
-extern int getsecretkey (char *, char *, char *);
-__END_DECLS
-
-#ifdef KERBEROS
-/*
- * Kerberos style authentication
- * AUTH *authkerb_seccreate(service, srv_inst, realm, window, timehost, status)
- * const char *service; - service name
- * const char *srv_inst; - server instance
- * const char *realm; - server realm
- * const u_int window; - time to live
- * const char *timehost; - optional hostname to sync with
- * int *status; - kerberos status returned
- */
-__BEGIN_DECLS
-extern AUTH *authkerb_seccreate(const char *, const char *, const char *,
- const u_int, const char *, int *);
-__END_DECLS
-
-/*
- * Map a kerberos credential into a unix cred.
- *
- * authkerb_getucred(rqst, uid, gid, grouplen, groups)
- * const struct svc_req *rqst; - request pointer
- * uid_t *uid;
- * gid_t *gid;
- * short *grouplen;
- * int *groups;
- *
- */
-__BEGIN_DECLS
-extern int authkerb_getucred(/* struct svc_req *, uid_t *, gid_t *,
- short *, int * */);
-__END_DECLS
-#endif /* KERBEROS */
-
-__BEGIN_DECLS
-struct svc_req;
-struct rpc_msg;
-enum auth_stat _svcauth_null (struct svc_req *, struct rpc_msg *);
-enum auth_stat _svcauth_short (struct svc_req *, struct rpc_msg *);
-enum auth_stat _svcauth_unix (struct svc_req *, struct rpc_msg *);
-__END_DECLS
-
-#define AUTH_NONE 0 /* no authentication */
-#define AUTH_NULL 0 /* backward compatibility */
-#define AUTH_SYS 1 /* unix style (uid, gids) */
-#define AUTH_UNIX AUTH_SYS
-#define AUTH_SHORT 2 /* short hand unix style */
-#define AUTH_DH 3 /* for Diffie-Hellman mechanism */
-#define AUTH_DES AUTH_DH /* for backward compatibility */
-#define AUTH_KERB 4 /* kerberos style */
-
-#endif /* !_RPC_AUTH_H */
diff --git a/newlib/libc/sys/linux/include/rpc/auth_des.h b/newlib/libc/sys/linux/include/rpc/auth_des.h
deleted file mode 100644
index 24ef5d344..000000000
--- a/newlib/libc/sys/linux/include/rpc/auth_des.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/* @(#)auth_des.h 2.2 88/07/29 4.0 RPCSRC; from 1.3 88/02/08 SMI */
-/* $FreeBSD: src/include/rpc/auth_des.h,v 1.3 2002/03/23 17:24:55 imp Exp $ */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)auth_des.h 2.2 88/07/29 4.0 RPCSRC
- * from: @(#)auth_des.h 1.14 94/04/25 SMI
- */
-
-/*
- * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
- */
-
-/*
- * auth_des.h, Protocol for DES style authentication for RPC
- */
-
-#ifndef _AUTH_DES_
-#define _AUTH_DES_
-
-/*
- * There are two kinds of "names": fullnames and nicknames
- */
-enum authdes_namekind {
- ADN_FULLNAME,
- ADN_NICKNAME
-};
-
-/*
- * A fullname contains the network name of the client,
- * a conversation key and the window
- */
-struct authdes_fullname {
- char *name; /* network name of client, up to MAXNETNAMELEN */
- des_block key; /* conversation key */
- u_long window; /* associated window */
-};
-
-
-/*
- * A credential
- */
-struct authdes_cred {
- enum authdes_namekind adc_namekind;
- struct authdes_fullname adc_fullname;
- u_long adc_nickname;
-};
-
-
-
-/*
- * A des authentication verifier
- */
-struct authdes_verf {
- union {
- struct timeval adv_ctime; /* clear time */
- des_block adv_xtime; /* crypt time */
- } adv_time_u;
- u_long adv_int_u;
-};
-
-/*
- * des authentication verifier: client variety
- *
- * adv_timestamp is the current time.
- * adv_winverf is the credential window + 1.
- * Both are encrypted using the conversation key.
- */
-#define adv_timestamp adv_time_u.adv_ctime
-#define adv_xtimestamp adv_time_u.adv_xtime
-#define adv_winverf adv_int_u
-
-/*
- * des authentication verifier: server variety
- *
- * adv_timeverf is the client's timestamp + client's window
- * adv_nickname is the server's nickname for the client.
- * adv_timeverf is encrypted using the conversation key.
- */
-#define adv_timeverf adv_time_u.adv_ctime
-#define adv_xtimeverf adv_time_u.adv_xtime
-#define adv_nickname adv_int_u
-
-/*
- * Map a des credential into a unix cred.
- *
- */
-__BEGIN_DECLS
-extern int authdes_getucred( struct authdes_cred *, uid_t *, gid_t *, int *, gid_t * );
-__END_DECLS
-
-__BEGIN_DECLS
-extern bool_t xdr_authdes_cred(XDR *, struct authdes_cred *);
-extern bool_t xdr_authdes_verf(XDR *, struct authdes_verf *);
-extern int rtime(dev_t, struct netbuf *, int, struct timeval *,
- struct timeval *);
-extern void kgetnetname(char *);
-extern enum auth_stat _svcauth_des(struct svc_req *, struct rpc_msg *);
-__END_DECLS
-
-#endif /* ndef _AUTH_DES_ */
diff --git a/newlib/libc/sys/linux/include/rpc/auth_kerb.h b/newlib/libc/sys/linux/include/rpc/auth_kerb.h
deleted file mode 100644
index b686b7883..000000000
--- a/newlib/libc/sys/linux/include/rpc/auth_kerb.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* $FreeBSD: src/include/rpc/auth_kerb.h,v 1.1 2001/03/19 12:49:46 alfred Exp $ */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * auth_kerb.h, Protocol for Kerberos style authentication for RPC
- *
- * Copyright (C) 1986, Sun Microsystems, Inc.
- */
-
-#ifndef _RPC_AUTH_KERB_H
-#define _RPC_AUTH_KERB_H
-
-#ifdef KERBEROS
-
-#pragma ident "@(#)auth_kerb.h 1.10 94/04/25 SMI"
-
-#include <kerberos/krb.h>
-#include <sys/socket.h>
-#include <sys/t_kuser.h>
-#include <netinet/in.h>
-#include <rpc/svc.h>
-
-/*
- * There are two kinds of "names": fullnames and nicknames
- */
-enum authkerb_namekind {
- AKN_FULLNAME,
- AKN_NICKNAME
-};
-/*
- * A fullname contains the ticket and the window
- */
-struct authkerb_fullname {
- KTEXT_ST ticket;
- u_long window; /* associated window */
-};
-
-/*
- * cooked credential stored in rq_clntcred
- */
-struct authkerb_clnt_cred {
- /* start of AUTH_DAT */
- unsigned char k_flags; /* Flags from ticket */
- char pname[ANAME_SZ]; /* Principal's name */
- char pinst[INST_SZ]; /* His Instance */
- char prealm[REALM_SZ]; /* His Realm */
- unsigned long checksum; /* Data checksum (opt) */
- C_Block session; /* Session Key */
- int life; /* Life of ticket */
- unsigned long time_sec; /* Time ticket issued */
- unsigned long address; /* Address in ticket */
- /* KTEXT_ST reply; Auth reply (opt) */
- /* end of AUTH_DAT */
- unsigned long expiry; /* time the ticket is expiring */
- u_long nickname; /* Nickname into cache */
- u_long window; /* associated window */
-};
-
-typedef struct authkerb_clnt_cred authkerb_clnt_cred;
-
-/*
- * A credential
- */
-struct authkerb_cred {
- enum authkerb_namekind akc_namekind;
- struct authkerb_fullname akc_fullname;
- u_long akc_nickname;
-};
-
-/*
- * A kerb authentication verifier
- */
-struct authkerb_verf {
- union {
- struct timeval akv_ctime; /* clear time */
- des_block akv_xtime; /* crypt time */
- } akv_time_u;
- u_long akv_int_u;
-};
-
-/*
- * des authentication verifier: client variety
- *
- * akv_timestamp is the current time.
- * akv_winverf is the credential window + 1.
- * Both are encrypted using the conversation key.
- */
-#ifndef akv_timestamp
-#define akv_timestamp akv_time_u.akv_ctime
-#define akv_xtimestamp akv_time_u.akv_xtime
-#define akv_winverf akv_int_u
-#endif
-/*
- * des authentication verifier: server variety
- *
- * akv_timeverf is the client's timestamp + client's window
- * akv_nickname is the server's nickname for the client.
- * akv_timeverf is encrypted using the conversation key.
- */
-#ifndef akv_timeverf
-#define akv_timeverf akv_time_u.akv_ctime
-#define akv_xtimeverf akv_time_u.akv_xtime
-#define akv_nickname akv_int_u
-#endif
-
-/*
- * Register the service name, instance and realm.
- */
-extern int authkerb_create(char *, char *, char *, u_int,
- struct netbuf *, int *, dev_t, int, AUTH **);
-extern bool_t xdr_authkerb_cred(XDR *, struct authkerb_cred *);
-extern bool_t xdr_authkerb_verf(XDR *, struct authkerb_verf *);
-extern int svc_kerb_reg(SVCXPRT *, char *, char *, char *);
-extern enum auth_stat _svcauth_kerb(struct svc_req *, struct rpc_msg *);
-
-#endif KERBEROS
-#endif /* !_RPC_AUTH_KERB_H */
diff --git a/newlib/libc/sys/linux/include/rpc/auth_unix.h b/newlib/libc/sys/linux/include/rpc/auth_unix.h
deleted file mode 100644
index 721a5c942..000000000
--- a/newlib/libc/sys/linux/include/rpc/auth_unix.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)auth_unix.h 1.8 88/02/08 SMI
- * from: @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC
- * $FreeBSD: src/include/rpc/auth_unix.h,v 1.11 2002/03/23 17:24:55 imp Exp $
- */
-
-/*
- * auth_unix.h, Protocol for UNIX style authentication parameters for RPC
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-/*
- * The system is very weak. The client uses no encryption for it
- * credentials and only sends null verifiers. The server sends backs
- * null verifiers or optionally a verifier that suggests a new short hand
- * for the credentials.
- */
-
-#ifndef _RPC_AUTH_UNIX_H
-#define _RPC_AUTH_UNIX_H
-#include <sys/cdefs.h>
-
-/* The machine name is part of a credential; it may not exceed 255 bytes */
-#define MAX_MACHINE_NAME 255
-
-/* gids compose part of a credential; there may not be more than 16 of them */
-#define NGRPS 16
-
-/*
- * Unix style credentials.
- */
-struct authunix_parms {
- u_long aup_time;
- char *aup_machname;
- int aup_uid;
- int aup_gid;
- u_int aup_len;
- int *aup_gids;
-};
-
-#define authsys_parms authunix_parms
-
-__BEGIN_DECLS
-extern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *);
-__END_DECLS
-
-/*
- * If a response verifier has flavor AUTH_SHORT,
- * then the body of the response verifier encapsulates the following structure;
- * again it is serialized in the obvious fashion.
- */
-struct short_hand_verf {
- struct opaque_auth new_cred;
-};
-
-#endif /* !_RPC_AUTH_UNIX_H */
diff --git a/newlib/libc/sys/linux/include/rpc/clnt.h b/newlib/libc/sys/linux/include/rpc/clnt.h
deleted file mode 100644
index 9a23404c3..000000000
--- a/newlib/libc/sys/linux/include/rpc/clnt.h
+++ /dev/null
@@ -1,504 +0,0 @@
-/* $NetBSD: clnt.h,v 1.14 2000/06/02 22:57:55 fvdl Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)clnt.h 1.31 94/04/29 SMI
- * from: @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC
- * $FreeBSD: src/include/rpc/clnt.h,v 1.17 2002/04/28 15:18:45 des Exp $
- */
-
-/*
- * clnt.h - Client side remote procedure call interface.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#ifndef _RPC_CLNT_H_
-#define _RPC_CLNT_H_
-#include <rpc/clnt_stat.h>
-#include <sys/cdefs.h>
-#include <netconfig.h>
-#include <sys/un.h>
-
-/*
- * Well-known IPV6 RPC broadcast address.
- */
-#define RPCB_MULTICAST_ADDR "ff02::202"
-
-/*
- * the following errors are in general unrecoverable. The caller
- * should give up rather than retry.
- */
-#define IS_UNRECOVERABLE_RPC(s) (((s) == RPC_AUTHERROR) || \
- ((s) == RPC_CANTENCODEARGS) || \
- ((s) == RPC_CANTDECODERES) || \
- ((s) == RPC_VERSMISMATCH) || \
- ((s) == RPC_PROCUNAVAIL) || \
- ((s) == RPC_PROGUNAVAIL) || \
- ((s) == RPC_PROGVERSMISMATCH) || \
- ((s) == RPC_CANTDECODEARGS))
-
-/*
- * Error info.
- */
-struct rpc_err {
- enum clnt_stat re_status;
- union {
- int RE_errno; /* related system error */
- enum auth_stat RE_why; /* why the auth error occurred */
- struct {
- rpcvers_t low; /* lowest version supported */
- rpcvers_t high; /* highest version supported */
- } RE_vers;
- struct { /* maybe meaningful if RPC_FAILED */
- int32_t s1;
- int32_t s2;
- } RE_lb; /* life boot & debugging only */
- } ru;
-#define re_errno ru.RE_errno
-#define re_why ru.RE_why
-#define re_vers ru.RE_vers
-#define re_lb ru.RE_lb
-};
-
-
-/*
- * Client rpc handle.
- * Created by individual implementations
- * Client is responsible for initializing auth, see e.g. auth_none.c.
- */
-typedef struct __rpc_client {
- AUTH *cl_auth; /* authenticator */
- struct clnt_ops {
- /* call remote procedure */
- enum clnt_stat (*cl_call)(struct __rpc_client *,
- rpcproc_t, xdrproc_t, void *, xdrproc_t,
- void *, struct timeval);
- /* abort a call */
- void (*cl_abort)(struct __rpc_client *);
- /* get specific error code */
- void (*cl_geterr)(struct __rpc_client *,
- struct rpc_err *);
- /* frees results */
- bool_t (*cl_freeres)(struct __rpc_client *,
- xdrproc_t, void *);
- /* destroy this structure */
- void (*cl_destroy)(struct __rpc_client *);
- /* the ioctl() of rpc */
- bool_t (*cl_control)(struct __rpc_client *, u_int,
- void *);
- } *cl_ops;
- void *cl_private; /* private stuff */
- char *cl_netid; /* network token */
- char *cl_tp; /* device name */
-} CLIENT;
-
-
-/*
- * Timers used for the pseudo-transport protocol when using datagrams
- */
-struct rpc_timers {
- u_short rt_srtt; /* smoothed round-trip time */
- u_short rt_deviate; /* estimated deviation */
- u_long rt_rtxcur; /* current (backed-off) rto */
-};
-
-/*
- * Feedback values used for possible congestion and rate control
- */
-#define FEEDBACK_REXMIT1 1 /* first retransmit */
-#define FEEDBACK_OK 2 /* no retransmits */
-
-/* Used to set version of portmapper used in broadcast */
-
-#define CLCR_SET_LOWVERS 3
-#define CLCR_GET_LOWVERS 4
-
-#define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */
-
-/*
- * client side rpc interface ops
- *
- * Parameter types are:
- *
- */
-
-/*
- * enum clnt_stat
- * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout)
- * CLIENT *rh;
- * rpcproc_t proc;
- * xdrproc_t xargs;
- * void *argsp;
- * xdrproc_t xres;
- * void *resp;
- * struct timeval timeout;
- */
-#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \
- ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, \
- argsp, xres, resp, secs))
-#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \
- ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, \
- argsp, xres, resp, secs))
-
-/*
- * void
- * CLNT_ABORT(rh);
- * CLIENT *rh;
- */
-#define CLNT_ABORT(rh) ((*(rh)->cl_ops->cl_abort)(rh))
-#define clnt_abort(rh) ((*(rh)->cl_ops->cl_abort)(rh))
-
-/*
- * struct rpc_err
- * CLNT_GETERR(rh);
- * CLIENT *rh;
- */
-#define CLNT_GETERR(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp))
-#define clnt_geterr(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp))
-
-
-/*
- * bool_t
- * CLNT_FREERES(rh, xres, resp);
- * CLIENT *rh;
- * xdrproc_t xres;
- * void *resp;
- */
-#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
-#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
-
-/*
- * bool_t
- * CLNT_CONTROL(cl, request, info)
- * CLIENT *cl;
- * u_int request;
- * char *info;
- */
-#define CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
-#define clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
-
-/*
- * control operations that apply to both udp and tcp transports
- */
-#define CLSET_TIMEOUT 1 /* set timeout (timeval) */
-#define CLGET_TIMEOUT 2 /* get timeout (timeval) */
-#define CLGET_SERVER_ADDR 3 /* get server's address (sockaddr) */
-#define CLGET_FD 6 /* get connections file descriptor */
-#define CLGET_SVC_ADDR 7 /* get server's address (netbuf) */
-#define CLSET_FD_CLOSE 8 /* close fd while clnt_destroy */
-#define CLSET_FD_NCLOSE 9 /* Do not close fd while clnt_destroy */
-#define CLGET_XID 10 /* Get xid */
-#define CLSET_XID 11 /* Set xid */
-#define CLGET_VERS 12 /* Get version number */
-#define CLSET_VERS 13 /* Set version number */
-#define CLGET_PROG 14 /* Get program number */
-#define CLSET_PROG 15 /* Set program number */
-#define CLSET_SVC_ADDR 16 /* get server's address (netbuf) */
-#define CLSET_PUSH_TIMOD 17 /* push timod if not already present */
-#define CLSET_POP_TIMOD 18 /* pop timod */
-/*
- * Connectionless only control operations
- */
-#define CLSET_RETRY_TIMEOUT 4 /* set retry timeout (timeval) */
-#define CLGET_RETRY_TIMEOUT 5 /* get retry timeout (timeval) */
-#define CLSET_ASYNC 19
-#define CLSET_CONNECT 20 /* Use connect() for UDP. (int) */
-
-/*
- * void
- * CLNT_DESTROY(rh);
- * CLIENT *rh;
- */
-#define CLNT_DESTROY(rh) ((*(rh)->cl_ops->cl_destroy)(rh))
-#define clnt_destroy(rh) ((*(rh)->cl_ops->cl_destroy)(rh))
-
-
-/*
- * RPCTEST is a test program which is accessible on every rpc
- * transport/port. It is used for testing, performance evaluation,
- * and network administration.
- */
-
-#define RPCTEST_PROGRAM ((rpcprog_t)1)
-#define RPCTEST_VERSION ((rpcvers_t)1)
-#define RPCTEST_NULL_PROC ((rpcproc_t)2)
-#define RPCTEST_NULL_BATCH_PROC ((rpcproc_t)3)
-
-/*
- * By convention, procedure 0 takes null arguments and returns them
- */
-
-#define NULLPROC ((rpcproc_t)0)
-
-/*
- * Below are the client handle creation routines for the various
- * implementations of client side rpc. They can return NULL if a
- * creation failure occurs.
- */
-
-/*
- * Generic client creation routine. Supported protocols are those that
- * belong to the nettype namespace (/etc/netconfig).
- * CLIENT *
- * clnt_create(host, prog, vers, prot);
- * const char *host; -- hostname
- * const rpcprog_t prog; -- program number
- * const rpcvers_t vers; -- version number
- * const char *prot; -- protocol
- */
-__BEGIN_DECLS
-extern CLIENT *clnt_create(const char *, const rpcprog_t, const rpcvers_t,
- const char *);
-/*
- *
- * const char *hostname; -- hostname
- * const rpcprog_t prog; -- program number
- * const rpcvers_t vers; -- version number
- * const char *nettype; -- network type
- */
-
-/*
- * Generic client creation routine. Supported protocols are which belong
- * to the nettype name space.
- */
-extern CLIENT *clnt_create_vers(const char *, const rpcprog_t, rpcvers_t *,
- const rpcvers_t, const rpcvers_t,
- const char *);
-/*
- * const char *host; -- hostname
- * const rpcprog_t prog; -- program number
- * rpcvers_t *vers_out; -- servers highest available version
- * const rpcvers_t vers_low; -- low version number
- * const rpcvers_t vers_high; -- high version number
- * const char *nettype; -- network type
- */
-
-
-/*
- * Generic client creation routine. It takes a netconfig structure
- * instead of nettype
- */
-extern CLIENT *clnt_tp_create(const char *, const rpcprog_t,
- const rpcvers_t, const struct netconfig *);
-/*
- * const char *hostname; -- hostname
- * const rpcprog_t prog; -- program number
- * const rpcvers_t vers; -- version number
- * const struct netconfig *netconf; -- network config structure
- */
-
-/*
- * Generic TLI create routine. Only provided for compatibility.
- */
-
-extern CLIENT *clnt_tli_create(const int, const struct netconfig *,
- const struct netbuf *, const rpcprog_t,
- const rpcvers_t, const u_int, const u_int);
-/*
- * const register int fd; -- fd
- * const struct netconfig *nconf; -- netconfig structure
- * const struct netbuf *svcaddr; -- servers address
- * const u_long prog; -- program number
- * const u_long vers; -- version number
- * const u_int sendsz; -- send size
- * const u_int recvsz; -- recv size
- */
-
-/*
- * Low level clnt create routine for connectionful transports, e.g. tcp.
- */
-extern CLIENT *clnt_vc_create(const int, const struct netbuf *,
- const rpcprog_t, const rpcvers_t,
- const u_int, const u_int);
-/*
- * Added for compatibility to old rpc 4.0. Obsoleted by clnt_vc_create().
- */
-extern CLIENT *clntunix_create(struct sockaddr_un *,
- u_long, u_long, int *, u_int, u_int);
-/*
- * const int fd; -- open file descriptor
- * const struct netbuf *svcaddr; -- servers address
- * const rpcprog_t prog; -- program number
- * const rpcvers_t vers; -- version number
- * const u_int sendsz; -- buffer recv size
- * const u_int recvsz; -- buffer send size
- */
-
-/*
- * Low level clnt create routine for connectionless transports, e.g. udp.
- */
-extern CLIENT *clnt_dg_create(const int, const struct netbuf *,
- const rpcprog_t, const rpcvers_t,
- const u_int, const u_int);
-/*
- * const int fd; -- open file descriptor
- * const struct netbuf *svcaddr; -- servers address
- * const rpcprog_t program; -- program number
- * const rpcvers_t version; -- version number
- * const u_int sendsz; -- buffer recv size
- * const u_int recvsz; -- buffer send size
- */
-
-/*
- * Memory based rpc (for speed check and testing)
- * CLIENT *
- * clnt_raw_create(prog, vers)
- * u_long prog;
- * u_long vers;
- */
-extern CLIENT *clnt_raw_create(rpcprog_t, rpcvers_t);
-
-__END_DECLS
-
-
-/*
- * Print why creation failed
- */
-__BEGIN_DECLS
-extern void clnt_pcreateerror(const char *); /* stderr */
-extern char *clnt_spcreateerror(const char *); /* string */
-__END_DECLS
-
-/*
- * Like clnt_perror(), but is more verbose in its output
- */
-__BEGIN_DECLS
-extern void clnt_perrno(enum clnt_stat); /* stderr */
-extern char *clnt_sperrno(enum clnt_stat); /* string */
-__END_DECLS
-
-/*
- * Print an English error message, given the client error code
- */
-__BEGIN_DECLS
-extern void clnt_perror(CLIENT *, const char *); /* stderr */
-extern char *clnt_sperror(CLIENT *, const char *); /* string */
-__END_DECLS
-
-
-/*
- * If a creation fails, the following allows the user to figure out why.
- */
-struct rpc_createerr {
- enum clnt_stat cf_stat;
- struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */
-};
-
-#ifdef _THREAD_SAFE
-__BEGIN_DECLS
-extern struct rpc_createerr *__rpc_createerr(void);
-__END_DECLS
-#define rpc_createerr (*(__rpc_createerr()))
-#else
-extern struct rpc_createerr rpc_createerr;
-#endif /* _THREAD_SAFE */
-
-/*
- * The simplified interface:
- * enum clnt_stat
- * rpc_call(host, prognum, versnum, procnum, inproc, in, outproc, out, nettype)
- * const char *host;
- * const rpcprog_t prognum;
- * const rpcvers_t versnum;
- * const rpcproc_t procnum;
- * const xdrproc_t inproc, outproc;
- * const char *in;
- * char *out;
- * const char *nettype;
- */
-__BEGIN_DECLS
-extern enum clnt_stat rpc_call(const char *, const rpcprog_t,
- const rpcvers_t, const rpcproc_t,
- const xdrproc_t, const char *,
- const xdrproc_t, char *, const char *);
-__END_DECLS
-
-/*
- * RPC broadcast interface
- * The call is broadcasted to all locally connected nets.
- *
- * extern enum clnt_stat
- * rpc_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp,
- * eachresult, nettype)
- * const rpcprog_t prog; -- program number
- * const rpcvers_t vers; -- version number
- * const rpcproc_t proc; -- procedure number
- * const xdrproc_t xargs; -- xdr routine for args
- * caddr_t argsp; -- pointer to args
- * const xdrproc_t xresults; -- xdr routine for results
- * caddr_t resultsp; -- pointer to results
- * const resultproc_t eachresult; -- call with each result
- * const char *nettype; -- Transport type
- *
- * For each valid response received, the procedure eachresult is called.
- * Its form is:
- * done = eachresult(resp, raddr, nconf)
- * bool_t done;
- * caddr_t resp;
- * struct netbuf *raddr;
- * struct netconfig *nconf;
- * where resp points to the results of the call and raddr is the
- * address if the responder to the broadcast. nconf is the transport
- * on which the response was received.
- *
- * extern enum clnt_stat
- * rpc_broadcast_exp(prog, vers, proc, xargs, argsp, xresults, resultsp,
- * eachresult, inittime, waittime, nettype)
- * const rpcprog_t prog; -- program number
- * const rpcvers_t vers; -- version number
- * const rpcproc_t proc; -- procedure number
- * const xdrproc_t xargs; -- xdr routine for args
- * caddr_t argsp; -- pointer to args
- * const xdrproc_t xresults; -- xdr routine for results
- * caddr_t resultsp; -- pointer to results
- * const resultproc_t eachresult; -- call with each result
- * const int inittime; -- how long to wait initially
- * const int waittime; -- maximum time to wait
- * const char *nettype; -- Transport type
- */
-
-typedef bool_t (*resultproc_t)(caddr_t, ...);
-
-__BEGIN_DECLS
-extern enum clnt_stat rpc_broadcast(const rpcprog_t, const rpcvers_t,
- const rpcproc_t, const xdrproc_t,
- caddr_t, const xdrproc_t, caddr_t,
- const resultproc_t, const char *);
-extern enum clnt_stat rpc_broadcast_exp(const rpcprog_t, const rpcvers_t,
- const rpcproc_t, const xdrproc_t,
- caddr_t, const xdrproc_t, caddr_t,
- const resultproc_t, const int,
- const int, const char *);
-__END_DECLS
-
-/* For backward compatibility */
-#include <rpc/clnt_soc.h>
-
-#endif /* !_RPC_CLNT_H_ */
diff --git a/newlib/libc/sys/linux/include/rpc/clnt_soc.h b/newlib/libc/sys/linux/include/rpc/clnt_soc.h
deleted file mode 100644
index 338d28fbd..000000000
--- a/newlib/libc/sys/linux/include/rpc/clnt_soc.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* $NetBSD: clnt_soc.h,v 1.1 2000/06/02 22:57:55 fvdl Exp $ */
-/* $FreeBSD: src/include/rpc/clnt_soc.h,v 1.2 2002/03/23 17:24:55 imp Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Copyright (c) 1984 - 1991 by Sun Microsystems, Inc.
- */
-
-/*
- * clnt.h - Client side remote procedure call interface.
- */
-
-#ifndef _RPC_CLNT_SOC_H
-#define _RPC_CLNT_SOC_H
-
-/* derived from clnt_soc.h 1.3 88/12/17 SMI */
-
-/*
- * All the following declarations are only for backward compatibility
- * with TS-RPC.
- */
-
-#include <sys/cdefs.h>
-
-#define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */
-
-/*
- * TCP based rpc
- * CLIENT *
- * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
- * struct sockaddr_in *raddr;
- * u_long prog;
- * u_long version;
- * register int *sockp;
- * u_int sendsz;
- * u_int recvsz;
- */
-__BEGIN_DECLS
-extern CLIENT *clnttcp_create(struct sockaddr_in *, u_long, u_long, int *,
- u_int, u_int);
-__END_DECLS
-
-/*
- * Raw (memory) rpc.
- */
-__BEGIN_DECLS
-extern CLIENT *clntraw_create(u_long, u_long);
-__END_DECLS
-
-
-/*
- * UDP based rpc.
- * CLIENT *
- * clntudp_create(raddr, program, version, wait, sockp)
- * struct sockaddr_in *raddr;
- * u_long program;
- * u_long version;
- * struct timeval wait;
- * int *sockp;
- *
- * Same as above, but you specify max packet sizes.
- * CLIENT *
- * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz)
- * struct sockaddr_in *raddr;
- * u_long program;
- * u_long version;
- * struct timeval wait;
- * int *sockp;
- * u_int sendsz;
- * u_int recvsz;
- */
-__BEGIN_DECLS
-extern CLIENT *clntudp_create(struct sockaddr_in *, u_long, u_long,
- struct timeval, int *);
-extern CLIENT *clntudp_bufcreate(struct sockaddr_in *, u_long, u_long,
- struct timeval, int *, u_int, u_int);
-__END_DECLS
-
-#endif /* _RPC_CLNT_SOC_H */
diff --git a/newlib/libc/sys/linux/include/rpc/clnt_stat.h b/newlib/libc/sys/linux/include/rpc/clnt_stat.h
deleted file mode 100644
index 397bdbc59..000000000
--- a/newlib/libc/sys/linux/include/rpc/clnt_stat.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* $FreeBSD: src/include/rpc/clnt_stat.h,v 1.2 2001/03/20 08:20:50 alfred Exp $ */
-/*
- * Copyright (c) 1986 - 1991, 1994, 1996, 1997 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-/*
- * clnt_stat.h - Client side remote procedure call enum
- *
- */
-
-#ifndef _RPC_CLNT_STAT_H
-#define _RPC_CLNT_STAT_H
-
-/* #pragma ident "@(#)clnt_stat.h 1.2 97/04/28 SMI" */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum clnt_stat {
- RPC_SUCCESS = 0, /* call succeeded */
- /*
- * local errors
- */
- RPC_CANTENCODEARGS = 1, /* can't encode arguments */
- RPC_CANTDECODERES = 2, /* can't decode results */
- RPC_CANTSEND = 3, /* failure in sending call */
- RPC_CANTRECV = 4,
- /* failure in receiving result */
- RPC_TIMEDOUT = 5, /* call timed out */
- RPC_INTR = 18, /* call interrupted */
- RPC_UDERROR = 23, /* recv got uderr indication */
- /*
- * remote errors
- */
- RPC_VERSMISMATCH = 6, /* rpc versions not compatible */
- RPC_AUTHERROR = 7, /* authentication error */
- RPC_PROGUNAVAIL = 8, /* program not available */
- RPC_PROGVERSMISMATCH = 9, /* program version mismatched */
- RPC_PROCUNAVAIL = 10, /* procedure unavailable */
- RPC_CANTDECODEARGS = 11, /* decode arguments error */
- RPC_SYSTEMERROR = 12, /* generic "other problem" */
-
- /*
- * rpc_call & clnt_create errors
- */
- RPC_UNKNOWNHOST = 13, /* unknown host name */
- RPC_UNKNOWNPROTO = 17, /* unknown protocol */
- RPC_UNKNOWNADDR = 19, /* Remote address unknown */
- RPC_NOBROADCAST = 21, /* Broadcasting not supported */
-
- /*
- * rpcbind errors
- */
- RPC_RPCBFAILURE = 14, /* the pmapper failed in its call */
-#define RPC_PMAPFAILURE RPC_RPCBFAILURE
- RPC_PROGNOTREGISTERED = 15, /* remote program is not registered */
- RPC_N2AXLATEFAILURE = 22,
- /* Name to address translation failed */
- /*
- * Misc error in the TLI library
- */
- RPC_TLIERROR = 20,
- /*
- * unspecified error
- */
- RPC_FAILED = 16,
- /*
- * asynchronous errors
- */
- RPC_INPROGRESS = 24,
- RPC_STALERACHANDLE = 25,
- RPC_CANTCONNECT = 26, /* couldn't make connection (cots) */
- RPC_XPRTFAILED = 27, /* received discon from remote (cots) */
- RPC_CANTCREATESTREAM = 28 /* can't push rpc module (cots) */
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_RPC_CLNT_STAT_H */
diff --git a/newlib/libc/sys/linux/include/rpc/des.h b/newlib/libc/sys/linux/include/rpc/des.h
deleted file mode 100644
index 385afde07..000000000
--- a/newlib/libc/sys/linux/include/rpc/des.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* @(#)des.h 2.2 88/08/10 4.0 RPCSRC; from 2.7 88/02/08 SMI */
-/* $FreeBSD: src/include/rpc/des.h,v 1.4 2002/03/23 17:24:55 imp Exp $ */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Generic DES driver interface
- * Keep this file hardware independent!
- * Copyright (c) 1986 by Sun Microsystems, Inc.
- */
-
-#define DES_MAXLEN 65536 /* maximum # of bytes to encrypt */
-#define DES_QUICKLEN 16 /* maximum # of bytes to encrypt quickly */
-
-enum desdir { ENCRYPT, DECRYPT };
-enum desmode { CBC, ECB };
-
-/*
- * parameters to ioctl call
- */
-struct desparams {
- u_char des_key[8]; /* key (with low bit parity) */
- enum desdir des_dir; /* direction */
- enum desmode des_mode; /* mode */
- u_char des_ivec[8]; /* input vector */
- unsigned des_len; /* number of bytes to crypt */
- union {
- u_char UDES_data[DES_QUICKLEN];
- u_char *UDES_buf;
- } UDES;
-# define des_data UDES.UDES_data /* direct data here if quick */
-# define des_buf UDES.UDES_buf /* otherwise, pointer to data */
-};
-
-#ifdef notdef
-
-/*
- * These ioctls are only implemented in SunOS. Maybe someday
- * if somebody writes a driver for DES hardware that works
- * with FreeBSD, we can being that back.
- */
-
-/*
- * Encrypt an arbitrary sized buffer
- */
-#define DESIOCBLOCK _IOWR('d', 6, struct desparams)
-
-/*
- * Encrypt of small amount of data, quickly
- */
-#define DESIOCQUICK _IOWR('d', 7, struct desparams)
-
-#endif
-
-/*
- * Software DES.
- */
-extern int _des_crypt( char *, int, struct desparams * );
diff --git a/newlib/libc/sys/linux/include/rpc/des_crypt.h b/newlib/libc/sys/linux/include/rpc/des_crypt.h
deleted file mode 100644
index eb166eded..000000000
--- a/newlib/libc/sys/linux/include/rpc/des_crypt.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * @(#)des_crypt.h 2.1 88/08/11 4.0 RPCSRC; from 1.4 88/02/08 (C) 1986 SMI
- * $FreeBSD: src/include/rpc/des_crypt.h,v 1.4 2002/03/23 17:24:55 imp Exp $
- *
- * des_crypt.h, des library routine interface
- * Copyright (C) 1986, Sun Microsystems, Inc.
- */
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
- */
-
-/*
- * des_crypt.h, des library routine interface
- */
-
-#ifndef _DES_DES_CRYPT_H
-#define _DES_DES_CRYPT_H
-
-#include <sys/cdefs.h>
-#include <rpc/rpc.h>
-
-#define DES_MAXDATA 8192 /* max bytes encrypted in one call */
-#define DES_DIRMASK (1 << 0)
-#define DES_ENCRYPT (0*DES_DIRMASK) /* Encrypt */
-#define DES_DECRYPT (1*DES_DIRMASK) /* Decrypt */
-
-
-#define DES_DEVMASK (1 << 1)
-#define DES_HW (0*DES_DEVMASK) /* Use hardware device */
-#define DES_SW (1*DES_DEVMASK) /* Use software device */
-
-
-#define DESERR_NONE 0 /* succeeded */
-#define DESERR_NOHWDEVICE 1 /* succeeded, but hw device not available */
-#define DESERR_HWERROR 2 /* failed, hardware/driver error */
-#define DESERR_BADPARAM 3 /* failed, bad parameter to call */
-
-#define DES_FAILED(err) \
- ((err) > DESERR_NOHWDEVICE)
-
-/*
- * cbc_crypt()
- * ecb_crypt()
- *
- * Encrypt (or decrypt) len bytes of a buffer buf.
- * The length must be a multiple of eight.
- * The key should have odd parity in the low bit of each byte.
- * ivec is the input vector, and is updated to the new one (cbc only).
- * The mode is created by oring together the appropriate parameters.
- * DESERR_NOHWDEVICE is returned if DES_HW was specified but
- * there was no hardware to do it on (the data will still be
- * encrypted though, in software).
- */
-
-
-/*
- * Cipher Block Chaining mode
- */
-__BEGIN_DECLS
-int cbc_crypt( char *, char *, unsigned int, unsigned int, char *);
-__END_DECLS
-
-/*
- * Electronic Code Book mode
- */
-__BEGIN_DECLS
-int ecb_crypt( char *, char *, unsigned int, unsigned int );
-__END_DECLS
-
-/*
- * Set des parity for a key.
- * DES parity is odd and in the low bit of each byte
- */
-__BEGIN_DECLS
-void des_setparity( char *);
-__END_DECLS
-
-#endif /* _DES_DES_CRYPT_H */
diff --git a/newlib/libc/sys/linux/include/rpc/nettype.h b/newlib/libc/sys/linux/include/rpc/nettype.h
deleted file mode 100644
index b18dc49fe..000000000
--- a/newlib/libc/sys/linux/include/rpc/nettype.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* $NetBSD: nettype.h,v 1.2 2000/07/06 03:17:19 christos Exp $ */
-/* $FreeBSD: src/include/rpc/nettype.h,v 1.2 2002/03/23 17:24:55 imp Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
- */
-
-/*
- * nettype.h, Nettype definitions.
- * All for the topmost layer of rpc
- *
- */
-
-#ifndef _RPC_NETTYPE_H
-#define _RPC_NETTYPE_H
-
-#include <netconfig.h>
-
-#define _RPC_NONE 0
-#define _RPC_NETPATH 1
-#define _RPC_VISIBLE 2
-#define _RPC_CIRCUIT_V 3
-#define _RPC_DATAGRAM_V 4
-#define _RPC_CIRCUIT_N 5
-#define _RPC_DATAGRAM_N 6
-#define _RPC_TCP 7
-#define _RPC_UDP 8
-
-__BEGIN_DECLS
-extern void *__rpc_setconf(const char *);
-extern void __rpc_endconf(void *);
-extern struct netconfig *__rpc_getconf(void *);
-extern struct netconfig *__rpc_getconfip(const char *);
-__END_DECLS
-
-#endif /* !_RPC_NETTYPE_H */
diff --git a/newlib/libc/sys/linux/include/rpc/pmap_clnt.h b/newlib/libc/sys/linux/include/rpc/pmap_clnt.h
deleted file mode 100644
index e6333c7c7..000000000
--- a/newlib/libc/sys/linux/include/rpc/pmap_clnt.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* $NetBSD: pmap_clnt.h,v 1.9 2000/06/02 22:57:55 fvdl Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)pmap_clnt.h 1.11 88/02/08 SMI
- * from: @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC
- * $FreeBSD: src/include/rpc/pmap_clnt.h,v 1.14 2002/04/28 15:18:45 des Exp $
- */
-
-/*
- * pmap_clnt.h
- * Supplies C routines to get to portmap services.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-/*
- * Usage:
- * success = pmap_set(program, version, protocol, port);
- * success = pmap_unset(program, version);
- * port = pmap_getport(address, program, version, protocol);
- * head = pmap_getmaps(address);
- * clnt_stat = pmap_rmtcall(address, program, version, procedure,
- * xdrargs, argsp, xdrres, resp, tout, port_ptr)
- * (works for udp only.)
- * clnt_stat = clnt_broadcast(program, version, procedure,
- * xdrargs, argsp, xdrres, resp, eachresult)
- * (like pmap_rmtcall, except the call is broadcasted to all
- * locally connected nets. For each valid response received,
- * the procedure eachresult is called. Its form is:
- * done = eachresult(resp, raddr)
- * bool_t done;
- * caddr_t resp;
- * struct sockaddr_in raddr;
- * where resp points to the results of the call and raddr is the
- * address if the responder to the broadcast.
- */
-
-#ifndef _RPC_PMAP_CLNT_H_
-#define _RPC_PMAP_CLNT_H_
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-extern bool_t pmap_set(u_long, u_long, int, int);
-extern bool_t pmap_unset(u_long, u_long);
-extern struct pmaplist *pmap_getmaps(struct sockaddr_in *);
-extern enum clnt_stat pmap_rmtcall(struct sockaddr_in *,
- u_long, u_long, u_long,
- xdrproc_t, caddr_t,
- xdrproc_t, caddr_t,
- struct timeval, u_long *);
-extern enum clnt_stat clnt_broadcast(u_long, u_long, u_long,
- xdrproc_t, void *,
- xdrproc_t, void *,
- resultproc_t);
-extern u_short pmap_getport(struct sockaddr_in *,
- u_long, u_long, u_int);
-__END_DECLS
-
-#endif /* !_RPC_PMAP_CLNT_H_ */
diff --git a/newlib/libc/sys/linux/include/rpc/pmap_prot.h b/newlib/libc/sys/linux/include/rpc/pmap_prot.h
deleted file mode 100644
index d83049943..000000000
--- a/newlib/libc/sys/linux/include/rpc/pmap_prot.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* $NetBSD: pmap_prot.h,v 1.8 2000/06/02 22:57:55 fvdl Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)pmap_prot.h 1.14 88/02/08 SMI
- * from: @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC
- * $FreeBSD: src/include/rpc/pmap_prot.h,v 1.12 2002/03/23 17:24:55 imp Exp $
- */
-
-/*
- * pmap_prot.h
- * Protocol for the local binder service, or pmap.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * The following procedures are supported by the protocol:
- *
- * PMAPPROC_NULL() returns ()
- * takes nothing, returns nothing
- *
- * PMAPPROC_SET(struct pmap) returns (bool_t)
- * TRUE is success, FALSE is failure. Registers the tuple
- * [prog, vers, prot, port].
- *
- * PMAPPROC_UNSET(struct pmap) returns (bool_t)
- * TRUE is success, FALSE is failure. Un-registers pair
- * [prog, vers]. prot and port are ignored.
- *
- * PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
- * 0 is failure. Otherwise returns the port number where the pair
- * [prog, vers] is registered. It may lie!
- *
- * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
- *
- * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
- * RETURNS (port, string<>);
- * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
- * Calls the procedure on the local machine. If it is not registered,
- * this procedure is quite; ie it does not return error information!!!
- * This procedure only is supported on rpc/udp and calls via
- * rpc/udp. This routine only passes null authentication parameters.
- * This file has no interface to xdr routines for PMAPPROC_CALLIT.
- *
- * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
- */
-
-#ifndef _RPC_PMAP_PROT_H
-#define _RPC_PMAP_PROT_H
-#include <sys/cdefs.h>
-
-#define PMAPPORT ((u_short)111)
-#define PMAPPROG ((u_long)100000)
-#define PMAPVERS ((u_long)2)
-#define PMAPVERS_PROTO ((u_long)2)
-#define PMAPVERS_ORIG ((u_long)1)
-#define PMAPPROC_NULL ((u_long)0)
-#define PMAPPROC_SET ((u_long)1)
-#define PMAPPROC_UNSET ((u_long)2)
-#define PMAPPROC_GETPORT ((u_long)3)
-#define PMAPPROC_DUMP ((u_long)4)
-#define PMAPPROC_CALLIT ((u_long)5)
-
-struct pmap {
- long unsigned pm_prog;
- long unsigned pm_vers;
- long unsigned pm_prot;
- long unsigned pm_port;
-};
-
-struct pmaplist {
- struct pmap pml_map;
- struct pmaplist *pml_next;
-};
-
-__BEGIN_DECLS
-extern bool_t xdr_pmap(XDR *, struct pmap *);
-extern bool_t xdr_pmaplist(XDR *, struct pmaplist **);
-extern bool_t xdr_pmaplist_ptr(XDR *, struct pmaplist *);
-__END_DECLS
-
-#endif /* !_RPC_PMAP_PROT_H */
diff --git a/newlib/libc/sys/linux/include/rpc/pmap_rmt.h b/newlib/libc/sys/linux/include/rpc/pmap_rmt.h
deleted file mode 100644
index 3e069e785..000000000
--- a/newlib/libc/sys/linux/include/rpc/pmap_rmt.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* $NetBSD: pmap_rmt.h,v 1.7 1998/02/11 23:01:23 lukem Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)pmap_rmt.h 1.2 88/02/08 SMI
- * from: @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC
- * $FreeBSD: src/include/rpc/pmap_rmt.h,v 1.12 2002/03/23 17:24:55 imp Exp $
- */
-
-/*
- * Structures and XDR routines for parameters to and replies from
- * the portmapper remote-call-service.
- *
- * Copyright (C) 1986, Sun Microsystems, Inc.
- */
-
-#ifndef _RPC_PMAP_RMT_H
-#define _RPC_PMAP_RMT_H
-#include <sys/cdefs.h>
-
-struct rmtcallargs {
- u_long prog, vers, proc, arglen;
- caddr_t args_ptr;
- xdrproc_t xdr_args;
-};
-
-struct rmtcallres {
- u_long *port_ptr;
- u_long resultslen;
- caddr_t results_ptr;
- xdrproc_t xdr_results;
-};
-
-__BEGIN_DECLS
-extern bool_t xdr_rmtcall_args(XDR *, struct rmtcallargs *);
-extern bool_t xdr_rmtcallres(XDR *, struct rmtcallres *);
-__END_DECLS
-
-#endif /* !_RPC_PMAP_RMT_H */
diff --git a/newlib/libc/sys/linux/include/rpc/raw.h b/newlib/libc/sys/linux/include/rpc/raw.h
deleted file mode 100644
index d418bf41e..000000000
--- a/newlib/libc/sys/linux/include/rpc/raw.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* $NetBSD: raw.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */
-/* $FreeBSD: src/include/rpc/raw.h,v 1.1 2001/03/19 12:49:47 alfred Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
- */
-
-#ifndef _RPC_RAW_H
-#define _RPC_RAW_H
-
-/* from: @(#)raw.h 1.11 94/04/25 SMI */
-/* from: @(#)raw.h 1.2 88/10/25 SMI */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * raw.h
- *
- * Raw interface
- * The common memory area over which they will communicate
- */
-extern char *__rpc_rawcombuf;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _RPC_RAW_H */
diff --git a/newlib/libc/sys/linux/include/rpc/rpc.h b/newlib/libc/sys/linux/include/rpc/rpc.h
deleted file mode 100644
index 72a717c05..000000000
--- a/newlib/libc/sys/linux/include/rpc/rpc.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* $NetBSD: rpc.h,v 1.13 2000/06/02 22:57:56 fvdl Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)rpc.h 1.9 88/02/08 SMI
- * from: @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC
- * $FreeBSD: src/include/rpc/rpc.h,v 1.17 2002/03/23 17:24:55 imp Exp $
- */
-
-/*
- * rpc.h, Just includes the billions of rpc header files necessary to
- * do remote procedure calling.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-#ifndef _RPC_RPC_H
-#define _RPC_RPC_H
-
-#include <rpc/types.h> /* some typedefs */
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-/* external data representation interfaces */
-#include <rpc/xdr.h> /* generic (de)serializer */
-
-/* Client side only authentication */
-#include <rpc/auth.h> /* generic authenticator (client side) */
-
-/* Client side (mostly) remote procedure call */
-#include <rpc/clnt.h> /* generic rpc stuff */
-
-/* semi-private protocol headers */
-#include <rpc/rpc_msg.h> /* protocol for rpc messages */
-#include <rpc/auth_unix.h> /* protocol for unix style cred */
-/*
- * Uncomment-out the next line if you are building the rpc library with
- * DES Authentication (see the README file in the secure_rpc/ directory).
- */
-#include <rpc/auth_des.h> /* protocol for des style cred */
-
-/* Server side only remote procedure callee */
-#include <rpc/svc.h> /* service manager and multiplexer */
-#include <rpc/svc_auth.h> /* service side authenticator */
-
-/* Portmapper client, server, and protocol headers */
-#include <rpc/pmap_clnt.h>
-#include <rpc/pmap_prot.h>
-
-#ifndef _KERNEL
-#include <rpc/rpcb_clnt.h> /* rpcbind interface functions */
-#endif
-
-#include <rpc/rpcent.h>
-
-__BEGIN_DECLS
-extern int get_myaddress(struct sockaddr_in *);
-extern int bindresvport(int, struct sockaddr_in *);
-extern int registerrpc(int, int, int, char *(*)(char [UDPMSGSIZE]),
- xdrproc_t, xdrproc_t);
-extern int callrpc(const char *, int, int, int, xdrproc_t, void *,
- xdrproc_t , void *);
-extern int getrpcport(char *, int, int, int);
-
-char *taddr2uaddr(const struct netconfig *, const struct netbuf *);
-struct netbuf *uaddr2taddr(const struct netconfig *, const char *);
-
-struct sockaddr;
-extern int bindresvport_sa(int, struct sockaddr *);
-__END_DECLS
-
-/*
- * The following are not exported interfaces, they are for internal library
- * and rpcbind use only. Do not use, they may change without notice.
- */
-__BEGIN_DECLS
-int __rpc_nconf2fd(const struct netconfig *);
-int __rpc_nconf2sockinfo(const struct netconfig *, struct __rpc_sockinfo *);
-int __rpc_fd2sockinfo(int, struct __rpc_sockinfo *);
-u_int __rpc_get_t_size(int, int, int);
-__END_DECLS
-
-#endif /* !_RPC_RPC_H */
diff --git a/newlib/libc/sys/linux/include/rpc/rpc_com.h b/newlib/libc/sys/linux/include/rpc/rpc_com.h
deleted file mode 100644
index 8c6a26e3e..000000000
--- a/newlib/libc/sys/linux/include/rpc/rpc_com.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* $NetBSD: rpc_com.h,v 1.3 2000/12/10 04:10:08 christos Exp $ */
-/* $FreeBSD: src/include/rpc/rpc_com.h,v 1.5 2002/03/23 17:24:55 imp Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
- */
-
-/*
- * rpc_com.h, Common definitions for both the server and client side.
- * All for the topmost layer of rpc
- *
- */
-
-#ifndef _RPC_RPCCOM_H
-#define _RPC_RPCCOM_H
-
-#include <sys/cdefs.h>
-
-/* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */
-
-/*
- * The max size of the transport, if the size cannot be determined
- * by other means.
- */
-#define RPC_MAXDATASIZE 9000
-#define RPC_MAXADDRSIZE 1024
-
-#define __RPC_GETXID(now) ((u_int32_t)getpid() ^ (u_int32_t)(now)->tv_sec ^ \
- (u_int32_t)(now)->tv_usec)
-
-__BEGIN_DECLS
-extern u_int __rpc_get_a_size(int);
-extern int __rpc_dtbsize(void);
-extern int _rpc_dtablesize(void);
-extern struct netconfig * __rpcgettp(int);
-extern int __rpc_get_default_domain(char **);
-
-char *__rpc_taddr2uaddr_af(int, const struct netbuf *);
-struct netbuf *__rpc_uaddr2taddr_af(int, const char *);
-int __rpc_fixup_addr(struct netbuf *, const struct netbuf *);
-int __rpc_sockinfo2netid(struct __rpc_sockinfo *, const char **);
-int __rpc_seman2socktype(int);
-int __rpc_socktype2seman(int);
-void *rpc_nullproc(CLIENT *);
-int __rpc_sockisbound(int);
-
-struct netbuf *__rpcb_findaddr(rpcprog_t, rpcvers_t, const struct netconfig *,
- const char *, CLIENT **);
-bool_t __rpc_control(int,void *);
-
-char *_get_next_token(char *, int);
-
-__END_DECLS
-
-#endif /* _RPC_RPCCOM_H */
diff --git a/newlib/libc/sys/linux/include/rpc/rpc_msg.h b/newlib/libc/sys/linux/include/rpc/rpc_msg.h
deleted file mode 100644
index 6cb229c21..000000000
--- a/newlib/libc/sys/linux/include/rpc/rpc_msg.h
+++ /dev/null
@@ -1,214 +0,0 @@
-/* $NetBSD: rpc_msg.h,v 1.11 2000/06/02 22:57:56 fvdl Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)rpc_msg.h 1.7 86/07/16 SMI
- * from: @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC
- * $FreeBSD: src/include/rpc/rpc_msg.h,v 1.14 2002/03/23 17:24:55 imp Exp $
- */
-
-/*
- * rpc_msg.h
- * rpc message definition
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#ifndef _RPC_RPC_MSG_H
-#define _RPC_RPC_MSG_H
-
-#define RPC_MSG_VERSION ((u_int32_t) 2)
-#define RPC_SERVICE_PORT ((u_short) 2048)
-
-/*
- * Bottom up definition of an rpc message.
- * NOTE: call and reply use the same overall stuct but
- * different parts of unions within it.
- */
-
-enum msg_type {
- CALL=0,
- REPLY=1
-};
-
-enum reply_stat {
- MSG_ACCEPTED=0,
- MSG_DENIED=1
-};
-
-enum accept_stat {
- SUCCESS=0,
- PROG_UNAVAIL=1,
- PROG_MISMATCH=2,
- PROC_UNAVAIL=3,
- GARBAGE_ARGS=4,
- SYSTEM_ERR=5
-};
-
-enum reject_stat {
- RPC_MISMATCH=0,
- AUTH_ERROR=1
-};
-
-/*
- * Reply part of an rpc exchange
- */
-
-/*
- * Reply to an rpc request that was accepted by the server.
- * Note: there could be an error even though the request was
- * accepted.
- */
-struct accepted_reply {
- struct opaque_auth ar_verf;
- enum accept_stat ar_stat;
- union {
- struct {
- rpcvers_t low;
- rpcvers_t high;
- } AR_versions;
- struct {
- caddr_t where;
- xdrproc_t proc;
- } AR_results;
- /* and many other null cases */
- } ru;
-#define ar_results ru.AR_results
-#define ar_vers ru.AR_versions
-};
-
-/*
- * Reply to an rpc request that was rejected by the server.
- */
-struct rejected_reply {
- enum reject_stat rj_stat;
- union {
- struct {
- rpcvers_t low;
- rpcvers_t high;
- } RJ_versions;
- enum auth_stat RJ_why; /* why authentication did not work */
- } ru;
-#define rj_vers ru.RJ_versions
-#define rj_why ru.RJ_why
-};
-
-/*
- * Body of a reply to an rpc request.
- */
-struct reply_body {
- enum reply_stat rp_stat;
- union {
- struct accepted_reply RP_ar;
- struct rejected_reply RP_dr;
- } ru;
-#define rp_acpt ru.RP_ar
-#define rp_rjct ru.RP_dr
-};
-
-/*
- * Body of an rpc request call.
- */
-struct call_body {
- rpcvers_t cb_rpcvers; /* must be equal to two */
- rpcprog_t cb_prog;
- rpcvers_t cb_vers;
- rpcproc_t cb_proc;
- struct opaque_auth cb_cred;
- struct opaque_auth cb_verf; /* protocol specific - provided by client */
-};
-
-/*
- * The rpc message
- */
-struct rpc_msg {
- u_int32_t rm_xid;
- enum msg_type rm_direction;
- union {
- struct call_body RM_cmb;
- struct reply_body RM_rmb;
- } ru;
-#define rm_call ru.RM_cmb
-#define rm_reply ru.RM_rmb
-};
-#define acpted_rply ru.RM_rmb.ru.RP_ar
-#define rjcted_rply ru.RM_rmb.ru.RP_dr
-
-__BEGIN_DECLS
-/*
- * XDR routine to handle a rpc message.
- * xdr_callmsg(xdrs, cmsg)
- * XDR *xdrs;
- * struct rpc_msg *cmsg;
- */
-extern bool_t xdr_callmsg(XDR *, struct rpc_msg *);
-
-/*
- * XDR routine to pre-serialize the static part of a rpc message.
- * xdr_callhdr(xdrs, cmsg)
- * XDR *xdrs;
- * struct rpc_msg *cmsg;
- */
-extern bool_t xdr_callhdr(XDR *, struct rpc_msg *);
-
-/*
- * XDR routine to handle a rpc reply.
- * xdr_replymsg(xdrs, rmsg)
- * XDR *xdrs;
- * struct rpc_msg *rmsg;
- */
-extern bool_t xdr_replymsg(XDR *, struct rpc_msg *);
-
-
-/*
- * XDR routine to handle a accepted rpc reply.
- * xdr_accepted_reply(xdrs, rej)
- * XDR *xdrs;
- * struct accepted_reply *rej;
- */
-extern bool_t xdr_accepted_reply(XDR *, struct accepted_reply *);
-
-/*
- * XDR routine to handle a rejected rpc reply.
- * xdr_rejected_reply(xdrs, rej)
- * XDR *xdrs;
- * struct rejected_reply *rej;
- */
-extern bool_t xdr_rejected_reply(XDR *, struct rejected_reply *);
-
-/*
- * Fills in the error part of a reply message.
- * _seterr_reply(msg, error)
- * struct rpc_msg *msg;
- * struct rpc_err *error;
- */
-extern void _seterr_reply(struct rpc_msg *, struct rpc_err *);
-__END_DECLS
-
-#endif /* !_RPC_RPC_MSG_H */
diff --git a/newlib/libc/sys/linux/include/rpc/rpcb_clnt.h b/newlib/libc/sys/linux/include/rpc/rpcb_clnt.h
deleted file mode 100644
index 3b9966b3b..000000000
--- a/newlib/libc/sys/linux/include/rpc/rpcb_clnt.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* $NetBSD: rpcb_clnt.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */
-/* $FreeBSD: src/include/rpc/rpcb_clnt.h,v 1.2 2002/03/23 17:24:55 imp Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
- */
-
-/*
- * rpcb_clnt.h
- * Supplies C routines to get to rpcbid services.
- *
- */
-
-/*
- * Usage:
- * success = rpcb_set(program, version, nconf, address);
- * success = rpcb_unset(program, version, nconf);
- * success = rpcb_getaddr(program, version, nconf, host);
- * head = rpcb_getmaps(nconf, host);
- * clnt_stat = rpcb_rmtcall(nconf, host, program, version, procedure,
- * xdrargs, argsp, xdrres, resp, tout, addr_ptr)
- * success = rpcb_gettime(host, timep)
- * uaddr = rpcb_taddr2uaddr(nconf, taddr);
- * taddr = rpcb_uaddr2uaddr(nconf, uaddr);
- */
-
-#ifndef _RPC_RPCB_CLNT_H
-#define _RPC_RPCB_CLNT_H
-
-/* #pragma ident "@(#)rpcb_clnt.h 1.13 94/04/25 SMI" */
-/* rpcb_clnt.h 1.3 88/12/05 SMI */
-
-#include <rpc/types.h>
-#include <rpc/rpcb_prot.h>
-
-__BEGIN_DECLS
-extern bool_t rpcb_set(const rpcprog_t, const rpcvers_t,
- const struct netconfig *, const struct netbuf *);
-extern bool_t rpcb_unset(const rpcprog_t, const rpcvers_t,
- const struct netconfig *);
-extern rpcblist *rpcb_getmaps(const struct netconfig *, const char *);
-extern enum clnt_stat rpcb_rmtcall(const struct netconfig *,
- const char *, const rpcprog_t,
- const rpcvers_t, const rpcproc_t,
- const xdrproc_t, const caddr_t,
- const xdrproc_t, const caddr_t,
- const struct timeval,
- const struct netbuf *);
-extern bool_t rpcb_getaddr(const rpcprog_t, const rpcvers_t,
- const struct netconfig *, struct netbuf *,
- const char *);
-extern bool_t rpcb_gettime(const char *, time_t *);
-extern char *rpcb_taddr2uaddr(struct netconfig *, struct netbuf *);
-extern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *);
-__END_DECLS
-
-#endif /* !_RPC_RPCB_CLNT_H */
diff --git a/newlib/libc/sys/linux/include/rpc/rpcb_prot.h b/newlib/libc/sys/linux/include/rpc/rpcb_prot.h
deleted file mode 100644
index 1442603ee..000000000
--- a/newlib/libc/sys/linux/include/rpc/rpcb_prot.h
+++ /dev/null
@@ -1,660 +0,0 @@
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#ifndef _RPCB_PROT_H_RPCGEN
-#define _RPCB_PROT_H_RPCGEN
-
-#include <rpc/rpc.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * $FreeBSD: src/include/rpc/rpcb_prot.x,v 1.3 2002/03/13 10:29:06 obrien Exp $
- *
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Copyright (c) 1988 by Sun Microsystems, Inc.
- */
-/* from rpcb_prot.x */
-
-/* #pragma ident "@(#)rpcb_prot.x 1.5 94/04/29 SMI" */
-
-#ifndef _KERNEL
-
-
-/*
- * The following procedures are supported by the protocol in version 3:
- *
- * RPCBPROC_NULL() returns ()
- * takes nothing, returns nothing
- *
- * RPCBPROC_SET(rpcb) returns (bool_t)
- * TRUE is success, FALSE is failure. Registers the tuple
- * [prog, vers, address, owner, netid].
- * Finds out owner and netid information on its own.
- *
- * RPCBPROC_UNSET(rpcb) returns (bool_t)
- * TRUE is success, FALSE is failure. Un-registers tuple
- * [prog, vers, netid]. addresses is ignored.
- * If netid is NULL, unregister all.
- *
- * RPCBPROC_GETADDR(rpcb) returns (string).
- * 0 is failure. Otherwise returns the universal address where the
- * triple [prog, vers, netid] is registered. Ignore address and owner.
- *
- * RPCBPROC_DUMP() RETURNS (rpcblist_ptr)
- * used to dump the entire rpcbind maps
- *
- * RPCBPROC_CALLIT(rpcb_rmtcallargs)
- * RETURNS (rpcb_rmtcallres);
- * Calls the procedure on the remote machine. If it is not registered,
- * this procedure is quiet; i.e. it does not return error information!!!
- * This routine only passes null authentication parameters.
- * It has no interface to xdr routines for RPCBPROC_CALLIT.
- *
- * RPCBPROC_GETTIME() returns (int).
- * Gets the remote machines time
- *
- * RPCBPROC_UADDR2TADDR(strint) RETURNS (struct netbuf)
- * Returns the netbuf address from universal address.
- *
- * RPCBPROC_TADDR2UADDR(struct netbuf) RETURNS (string)
- * Returns the universal address from netbuf address.
- *
- * END OF RPCBIND VERSION 3 PROCEDURES
- */
-/*
- * Except for RPCBPROC_CALLIT, the procedures above are carried over to
- * rpcbind version 4. Those below are added or modified for version 4.
- * NOTE: RPCBPROC_BCAST HAS THE SAME FUNCTIONALITY AND PROCEDURE NUMBER
- * AS RPCBPROC_CALLIT.
- *
- * RPCBPROC_BCAST(rpcb_rmtcallargs)
- * RETURNS (rpcb_rmtcallres);
- * Calls the procedure on the remote machine. If it is not registered,
- * this procedure IS quiet; i.e. it DOES NOT return error information!!!
- * This routine should be used for broadcasting and nothing else.
- *
- * RPCBPROC_GETVERSADDR(rpcb) returns (string).
- * 0 is failure. Otherwise returns the universal address where the
- * triple [prog, vers, netid] is registered. Ignore address and owner.
- * Same as RPCBPROC_GETADDR except that if the given version number
- * is not available, the address is not returned.
- *
- * RPCBPROC_INDIRECT(rpcb_rmtcallargs)
- * RETURNS (rpcb_rmtcallres);
- * Calls the procedure on the remote machine. If it is not registered,
- * this procedure is NOT quiet; i.e. it DOES return error information!!!
- * as any normal application would expect.
- *
- * RPCBPROC_GETADDRLIST(rpcb) returns (rpcb_entry_list_ptr).
- * Same as RPCBPROC_GETADDR except that it returns a list of all the
- * addresses registered for the combination (prog, vers) (for all
- * transports).
- *
- * RPCBPROC_GETSTAT(void) returns (rpcb_stat_byvers)
- * Returns the statistics about the kind of requests received by rpcbind.
- */
-
-/*
- * A mapping of (program, version, network ID) to address
- */
-
-struct rpcb {
- rpcprog_t r_prog;
- rpcvers_t r_vers;
- char *r_netid;
- char *r_addr;
- char *r_owner;
-};
-typedef struct rpcb rpcb;
-
-typedef rpcb RPCB;
-
-
-/*
- * A list of mappings
- *
- * Below are two definitions for the rpcblist structure. This is done because
- * xdr_rpcblist() is specified to take a struct rpcblist **, rather than a
- * struct rpcblist * that rpcgen would produce. One version of the rpcblist
- * structure (actually called rp__list) is used with rpcgen, and the other is
- * defined only in the header file for compatibility with the specified
- * interface.
- */
-
-struct rp__list {
- rpcb rpcb_map;
- struct rp__list *rpcb_next;
-};
-typedef struct rp__list rp__list;
-
-typedef rp__list *rpcblist_ptr;
-
-typedef struct rp__list rpcblist;
-typedef struct rp__list RPCBLIST;
-
-#ifndef __cplusplus
-struct rpcblist {
- RPCB rpcb_map;
- struct rpcblist *rpcb_next;
-};
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern bool_t xdr_rpcblist(XDR *, rpcblist**);
-#ifdef __cplusplus
-}
-#endif
-
-
-/*
- * Arguments of remote calls
- */
-
-struct rpcb_rmtcallargs {
- rpcprog_t prog;
- rpcvers_t vers;
- rpcproc_t proc;
- struct {
- u_int args_len;
- char *args_val;
- } args;
-};
-typedef struct rpcb_rmtcallargs rpcb_rmtcallargs;
-
-/*
- * Client-side only representation of rpcb_rmtcallargs structure.
- *
- * The routine that XDRs the rpcb_rmtcallargs structure must deal with the
- * opaque arguments in the "args" structure. xdr_rpcb_rmtcallargs() needs to
- * be passed the XDR routine that knows the args' structure. This routine
- * doesn't need to go over-the-wire (and it wouldn't make sense anyway) since
- * the application being called already knows the args structure. So we use a
- * different "XDR" structure on the client side, r_rpcb_rmtcallargs, which
- * includes the args' XDR routine.
- */
-struct r_rpcb_rmtcallargs {
- rpcprog_t prog;
- rpcvers_t vers;
- rpcproc_t proc;
- struct {
- u_int args_len;
- char *args_val;
- } args;
- xdrproc_t xdr_args; /* encodes args */
-};
-
-
-/*
- * Results of the remote call
- */
-
-struct rpcb_rmtcallres {
- char *addr;
- struct {
- u_int results_len;
- char *results_val;
- } results;
-};
-typedef struct rpcb_rmtcallres rpcb_rmtcallres;
-
-/*
- * Client-side only representation of rpcb_rmtcallres structure.
- */
-struct r_rpcb_rmtcallres {
- char *addr;
- struct {
- u_int32_t results_len;
- char *results_val;
- } results;
- xdrproc_t xdr_res; /* decodes results */
-};
-
-/*
- * rpcb_entry contains a merged address of a service on a particular
- * transport, plus associated netconfig information. A list of rpcb_entrys
- * is returned by RPCBPROC_GETADDRLIST. See netconfig.h for values used
- * in r_nc_* fields.
- */
-
-struct rpcb_entry {
- char *r_maddr;
- char *r_nc_netid;
- u_int r_nc_semantics;
- char *r_nc_protofmly;
- char *r_nc_proto;
-};
-typedef struct rpcb_entry rpcb_entry;
-
-/*
- * A list of addresses supported by a service.
- */
-
-struct rpcb_entry_list {
- rpcb_entry rpcb_entry_map;
- struct rpcb_entry_list *rpcb_entry_next;
-};
-typedef struct rpcb_entry_list rpcb_entry_list;
-
-typedef rpcb_entry_list *rpcb_entry_list_ptr;
-
-/*
- * rpcbind statistics
- */
-
-#define rpcb_highproc_2 RPCBPROC_CALLIT
-#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR
-#define rpcb_highproc_4 RPCBPROC_GETSTAT
-#define RPCBSTAT_HIGHPROC 13
-#define RPCBVERS_STAT 3
-#define RPCBVERS_4_STAT 2
-#define RPCBVERS_3_STAT 1
-#define RPCBVERS_2_STAT 0
-
-/* Link list of all the stats about getport and getaddr */
-
-struct rpcbs_addrlist {
- rpcprog_t prog;
- rpcvers_t vers;
- int success;
- int failure;
- char *netid;
- struct rpcbs_addrlist *next;
-};
-typedef struct rpcbs_addrlist rpcbs_addrlist;
-
-/* Link list of all the stats about rmtcall */
-
-struct rpcbs_rmtcalllist {
- rpcprog_t prog;
- rpcvers_t vers;
- rpcproc_t proc;
- int success;
- int failure;
- int indirect;
- char *netid;
- struct rpcbs_rmtcalllist *next;
-};
-typedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist;
-
-typedef int rpcbs_proc[RPCBSTAT_HIGHPROC];
-
-typedef rpcbs_addrlist *rpcbs_addrlist_ptr;
-
-typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr;
-
-struct rpcb_stat {
- rpcbs_proc info;
- int setinfo;
- int unsetinfo;
- rpcbs_addrlist_ptr addrinfo;
- rpcbs_rmtcalllist_ptr rmtinfo;
-};
-typedef struct rpcb_stat rpcb_stat;
-
-/*
- * One rpcb_stat structure is returned for each version of rpcbind
- * being monitored.
- */
-
-typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];
-
-/*
- * We don't define netbuf in RPCL, since it would contain structure member
- * names that would conflict with the definition of struct netbuf in
- * <tiuser.h>. Instead we merely declare the XDR routine xdr_netbuf() here,
- * and implement it ourselves in rpc/rpcb_prot.c.
- */
-#ifdef __cplusplus
-extern "C" bool_t xdr_netbuf(XDR *, struct netbuf *);
-
-#else /* __STDC__ */
-extern bool_t xdr_netbuf(XDR *, struct netbuf *);
-
-#endif
-
-#define RPCBVERS_3 RPCBVERS
-#define RPCBVERS_4 RPCBVERS4
-
-#define _PATH_RPCBINDSOCK "/var/run/rpcbind.sock"
-
-#else /* ndef _KERNEL */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * A mapping of (program, version, network ID) to address
- */
-struct rpcb {
- rpcprog_t r_prog; /* program number */
- rpcvers_t r_vers; /* version number */
- char *r_netid; /* network id */
- char *r_addr; /* universal address */
- char *r_owner; /* owner of the mapping */
-};
-typedef struct rpcb RPCB;
-
-/*
- * A list of mappings
- */
-struct rpcblist {
- RPCB rpcb_map;
- struct rpcblist *rpcb_next;
-};
-typedef struct rpcblist RPCBLIST;
-typedef struct rpcblist *rpcblist_ptr;
-
-/*
- * Remote calls arguments
- */
-struct rpcb_rmtcallargs {
- rpcprog_t prog; /* program number */
- rpcvers_t vers; /* version number */
- rpcproc_t proc; /* procedure number */
- u_int32_t arglen; /* arg len */
- caddr_t args_ptr; /* argument */
- xdrproc_t xdr_args; /* XDR routine for argument */
-};
-typedef struct rpcb_rmtcallargs rpcb_rmtcallargs;
-
-/*
- * Remote calls results
- */
-struct rpcb_rmtcallres {
- char *addr_ptr; /* remote universal address */
- u_int32_t resultslen; /* results length */
- caddr_t results_ptr; /* results */
- xdrproc_t xdr_results; /* XDR routine for result */
-};
-typedef struct rpcb_rmtcallres rpcb_rmtcallres;
-
-struct rpcb_entry {
- char *r_maddr;
- char *r_nc_netid;
- unsigned int r_nc_semantics;
- char *r_nc_protofmly;
- char *r_nc_proto;
-};
-typedef struct rpcb_entry rpcb_entry;
-
-/*
- * A list of addresses supported by a service.
- */
-
-struct rpcb_entry_list {
- rpcb_entry rpcb_entry_map;
- struct rpcb_entry_list *rpcb_entry_next;
-};
-typedef struct rpcb_entry_list rpcb_entry_list;
-
-typedef rpcb_entry_list *rpcb_entry_list_ptr;
-
-/*
- * rpcbind statistics
- */
-
-#define rpcb_highproc_2 RPCBPROC_CALLIT
-#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR
-#define rpcb_highproc_4 RPCBPROC_GETSTAT
-#define RPCBSTAT_HIGHPROC 13
-#define RPCBVERS_STAT 3
-#define RPCBVERS_4_STAT 2
-#define RPCBVERS_3_STAT 1
-#define RPCBVERS_2_STAT 0
-
-/* Link list of all the stats about getport and getaddr */
-
-struct rpcbs_addrlist {
- rpcprog_t prog;
- rpcvers_t vers;
- int success;
- int failure;
- char *netid;
- struct rpcbs_addrlist *next;
-};
-typedef struct rpcbs_addrlist rpcbs_addrlist;
-
-/* Link list of all the stats about rmtcall */
-
-struct rpcbs_rmtcalllist {
- rpcprog_t prog;
- rpcvers_t vers;
- rpcproc_t proc;
- int success;
- int failure;
- int indirect;
- char *netid;
- struct rpcbs_rmtcalllist *next;
-};
-typedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist;
-
-typedef int rpcbs_proc[RPCBSTAT_HIGHPROC];
-
-typedef rpcbs_addrlist *rpcbs_addrlist_ptr;
-
-typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr;
-
-struct rpcb_stat {
- rpcbs_proc info;
- int setinfo;
- int unsetinfo;
- rpcbs_addrlist_ptr addrinfo;
- rpcbs_rmtcalllist_ptr rmtinfo;
-};
-typedef struct rpcb_stat rpcb_stat;
-
-/*
- * One rpcb_stat structure is returned for each version of rpcbind
- * being monitored.
- */
-
-typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ndef _KERNEL */
-
-#define RPCBPROG 100000
-#define RPCBVERS 3
-
-#if defined(__STDC__) || defined(__cplusplus)
-#define RPCBPROC_SET 1
-extern bool_t * rpcbproc_set_3(rpcb *, CLIENT *);
-extern bool_t * rpcbproc_set_3_svc(rpcb *, struct svc_req *);
-#define RPCBPROC_UNSET 2
-extern bool_t * rpcbproc_unset_3(rpcb *, CLIENT *);
-extern bool_t * rpcbproc_unset_3_svc(rpcb *, struct svc_req *);
-#define RPCBPROC_GETADDR 3
-extern char ** rpcbproc_getaddr_3(rpcb *, CLIENT *);
-extern char ** rpcbproc_getaddr_3_svc(rpcb *, struct svc_req *);
-#define RPCBPROC_DUMP 4
-extern rpcblist_ptr * rpcbproc_dump_3(void *, CLIENT *);
-extern rpcblist_ptr * rpcbproc_dump_3_svc(void *, struct svc_req *);
-#define RPCBPROC_CALLIT 5
-extern rpcb_rmtcallres * rpcbproc_callit_3(rpcb_rmtcallargs *, CLIENT *);
-extern rpcb_rmtcallres * rpcbproc_callit_3_svc(rpcb_rmtcallargs *, struct svc_req *);
-#define RPCBPROC_GETTIME 6
-extern u_int * rpcbproc_gettime_3(void *, CLIENT *);
-extern u_int * rpcbproc_gettime_3_svc(void *, struct svc_req *);
-#define RPCBPROC_UADDR2TADDR 7
-extern struct netbuf * rpcbproc_uaddr2taddr_3(char **, CLIENT *);
-extern struct netbuf * rpcbproc_uaddr2taddr_3_svc(char **, struct svc_req *);
-#define RPCBPROC_TADDR2UADDR 8
-extern char ** rpcbproc_taddr2uaddr_3(struct netbuf *, CLIENT *);
-extern char ** rpcbproc_taddr2uaddr_3_svc(struct netbuf *, struct svc_req *);
-extern int rpcbprog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
-
-#else /* K&R C */
-#define RPCBPROC_SET 1
-extern bool_t * rpcbproc_set_3();
-extern bool_t * rpcbproc_set_3_svc();
-#define RPCBPROC_UNSET 2
-extern bool_t * rpcbproc_unset_3();
-extern bool_t * rpcbproc_unset_3_svc();
-#define RPCBPROC_GETADDR 3
-extern char ** rpcbproc_getaddr_3();
-extern char ** rpcbproc_getaddr_3_svc();
-#define RPCBPROC_DUMP 4
-extern rpcblist_ptr * rpcbproc_dump_3();
-extern rpcblist_ptr * rpcbproc_dump_3_svc();
-#define RPCBPROC_CALLIT 5
-extern rpcb_rmtcallres * rpcbproc_callit_3();
-extern rpcb_rmtcallres * rpcbproc_callit_3_svc();
-#define RPCBPROC_GETTIME 6
-extern u_int * rpcbproc_gettime_3();
-extern u_int * rpcbproc_gettime_3_svc();
-#define RPCBPROC_UADDR2TADDR 7
-extern struct netbuf * rpcbproc_uaddr2taddr_3();
-extern struct netbuf * rpcbproc_uaddr2taddr_3_svc();
-#define RPCBPROC_TADDR2UADDR 8
-extern char ** rpcbproc_taddr2uaddr_3();
-extern char ** rpcbproc_taddr2uaddr_3_svc();
-extern int rpcbprog_3_freeresult ();
-#endif /* K&R C */
-#define RPCBVERS4 4
-
-#if defined(__STDC__) || defined(__cplusplus)
-extern bool_t * rpcbproc_set_4(rpcb *, CLIENT *);
-extern bool_t * rpcbproc_set_4_svc(rpcb *, struct svc_req *);
-extern bool_t * rpcbproc_unset_4(rpcb *, CLIENT *);
-extern bool_t * rpcbproc_unset_4_svc(rpcb *, struct svc_req *);
-extern char ** rpcbproc_getaddr_4(rpcb *, CLIENT *);
-extern char ** rpcbproc_getaddr_4_svc(rpcb *, struct svc_req *);
-extern rpcblist_ptr * rpcbproc_dump_4(void *, CLIENT *);
-extern rpcblist_ptr * rpcbproc_dump_4_svc(void *, struct svc_req *);
-#define RPCBPROC_BCAST RPCBPROC_CALLIT
-extern rpcb_rmtcallres * rpcbproc_bcast_4(rpcb_rmtcallargs *, CLIENT *);
-extern rpcb_rmtcallres * rpcbproc_bcast_4_svc(rpcb_rmtcallargs *, struct svc_req *);
-extern u_int * rpcbproc_gettime_4(void *, CLIENT *);
-extern u_int * rpcbproc_gettime_4_svc(void *, struct svc_req *);
-extern struct netbuf * rpcbproc_uaddr2taddr_4(char **, CLIENT *);
-extern struct netbuf * rpcbproc_uaddr2taddr_4_svc(char **, struct svc_req *);
-extern char ** rpcbproc_taddr2uaddr_4(struct netbuf *, CLIENT *);
-extern char ** rpcbproc_taddr2uaddr_4_svc(struct netbuf *, struct svc_req *);
-#define RPCBPROC_GETVERSADDR 9
-extern char ** rpcbproc_getversaddr_4(rpcb *, CLIENT *);
-extern char ** rpcbproc_getversaddr_4_svc(rpcb *, struct svc_req *);
-#define RPCBPROC_INDIRECT 10
-extern rpcb_rmtcallres * rpcbproc_indirect_4(rpcb_rmtcallargs *, CLIENT *);
-extern rpcb_rmtcallres * rpcbproc_indirect_4_svc(rpcb_rmtcallargs *, struct svc_req *);
-#define RPCBPROC_GETADDRLIST 11
-extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4(rpcb *, CLIENT *);
-extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc(rpcb *, struct svc_req *);
-#define RPCBPROC_GETSTAT 12
-extern rpcb_stat * rpcbproc_getstat_4(void *, CLIENT *);
-extern rpcb_stat * rpcbproc_getstat_4_svc(void *, struct svc_req *);
-extern int rpcbprog_4_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
-
-#else /* K&R C */
-extern bool_t * rpcbproc_set_4();
-extern bool_t * rpcbproc_set_4_svc();
-extern bool_t * rpcbproc_unset_4();
-extern bool_t * rpcbproc_unset_4_svc();
-extern char ** rpcbproc_getaddr_4();
-extern char ** rpcbproc_getaddr_4_svc();
-extern rpcblist_ptr * rpcbproc_dump_4();
-extern rpcblist_ptr * rpcbproc_dump_4_svc();
-#define RPCBPROC_BCAST RPCBPROC_CALLIT
-extern rpcb_rmtcallres * rpcbproc_bcast_4();
-extern rpcb_rmtcallres * rpcbproc_bcast_4_svc();
-extern u_int * rpcbproc_gettime_4();
-extern u_int * rpcbproc_gettime_4_svc();
-extern struct netbuf * rpcbproc_uaddr2taddr_4();
-extern struct netbuf * rpcbproc_uaddr2taddr_4_svc();
-extern char ** rpcbproc_taddr2uaddr_4();
-extern char ** rpcbproc_taddr2uaddr_4_svc();
-#define RPCBPROC_GETVERSADDR 9
-extern char ** rpcbproc_getversaddr_4();
-extern char ** rpcbproc_getversaddr_4_svc();
-#define RPCBPROC_INDIRECT 10
-extern rpcb_rmtcallres * rpcbproc_indirect_4();
-extern rpcb_rmtcallres * rpcbproc_indirect_4_svc();
-#define RPCBPROC_GETADDRLIST 11
-extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4();
-extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc();
-#define RPCBPROC_GETSTAT 12
-extern rpcb_stat * rpcbproc_getstat_4();
-extern rpcb_stat * rpcbproc_getstat_4_svc();
-extern int rpcbprog_4_freeresult ();
-#endif /* K&R C */
-
-/* the xdr functions */
-
-#if defined(__STDC__) || defined(__cplusplus)
-extern bool_t xdr_rpcb (XDR *, rpcb*);
-extern bool_t xdr_rp__list (XDR *, rp__list*);
-extern bool_t xdr_rpcblist_ptr (XDR *, rpcblist_ptr*);
-extern bool_t xdr_rpcb_rmtcallargs (XDR *, rpcb_rmtcallargs*);
-extern bool_t xdr_rpcb_rmtcallres (XDR *, rpcb_rmtcallres*);
-extern bool_t xdr_rpcb_entry (XDR *, rpcb_entry*);
-extern bool_t xdr_rpcb_entry_list (XDR *, rpcb_entry_list*);
-extern bool_t xdr_rpcb_entry_list_ptr (XDR *, rpcb_entry_list_ptr*);
-extern bool_t xdr_rpcbs_addrlist (XDR *, rpcbs_addrlist*);
-extern bool_t xdr_rpcbs_rmtcalllist (XDR *, rpcbs_rmtcalllist*);
-extern bool_t xdr_rpcbs_proc (XDR *, rpcbs_proc);
-extern bool_t xdr_rpcbs_addrlist_ptr (XDR *, rpcbs_addrlist_ptr*);
-extern bool_t xdr_rpcbs_rmtcalllist_ptr (XDR *, rpcbs_rmtcalllist_ptr*);
-extern bool_t xdr_rpcb_stat (XDR *, rpcb_stat*);
-extern bool_t xdr_rpcb_stat_byvers (XDR *, rpcb_stat_byvers);
-
-#else /* K&R C */
-extern bool_t xdr_rpcb ();
-extern bool_t xdr_rp__list ();
-extern bool_t xdr_rpcblist_ptr ();
-extern bool_t xdr_rpcb_rmtcallargs ();
-extern bool_t xdr_rpcb_rmtcallres ();
-extern bool_t xdr_rpcb_entry ();
-extern bool_t xdr_rpcb_entry_list ();
-extern bool_t xdr_rpcb_entry_list_ptr ();
-extern bool_t xdr_rpcbs_addrlist ();
-extern bool_t xdr_rpcbs_rmtcalllist ();
-extern bool_t xdr_rpcbs_proc ();
-extern bool_t xdr_rpcbs_addrlist_ptr ();
-extern bool_t xdr_rpcbs_rmtcalllist_ptr ();
-extern bool_t xdr_rpcb_stat ();
-extern bool_t xdr_rpcb_stat_byvers ();
-
-#endif /* K&R C */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_RPCB_PROT_H_RPCGEN */
diff --git a/newlib/libc/sys/linux/include/rpc/rpcb_prot.x b/newlib/libc/sys/linux/include/rpc/rpcb_prot.x
deleted file mode 100644
index 39f162776..000000000
--- a/newlib/libc/sys/linux/include/rpc/rpcb_prot.x
+++ /dev/null
@@ -1,554 +0,0 @@
-%/*
-% * $FreeBSD: src/include/rpc/rpcb_prot.x,v 1.3 2002/03/13 10:29:06 obrien Exp $
-% *
-% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
-% * unrestricted use provided that this legend is included on all tape
-% * media and as a part of the software program in whole or part. Users
-% * may copy or modify Sun RPC without charge, but are not authorized
-% * to license or distribute it to anyone else except as part of a product or
-% * program developed by the user.
-% *
-% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
-% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
-% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
-% *
-% * Sun RPC is provided with no support and without any obligation on the
-% * part of Sun Microsystems, Inc. to assist in its use, correction,
-% * modification or enhancement.
-% *
-% * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
-% * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
-% * OR ANY PART THEREOF.
-% *
-% * In no event will Sun Microsystems, Inc. be liable for any lost revenue
-% * or profits or other special, indirect and consequential damages, even if
-% * Sun has been advised of the possibility of such damages.
-% *
-% * Sun Microsystems, Inc.
-% * 2550 Garcia Avenue
-% * Mountain View, California 94043
-% */
-%/*
-% * Copyright (c) 1988 by Sun Microsystems, Inc.
-% */
-
-%/* from rpcb_prot.x */
-
-#ifdef RPC_HDR
-%
-%/* #pragma ident "@(#)rpcb_prot.x 1.5 94/04/29 SMI" */
-%
-%#ifndef _KERNEL
-%
-#endif
-
-/*
- * rpcb_prot.x
- * rpcbind protocol, versions 3 and 4, in RPC Language
- */
-%
-%/*
-% * The following procedures are supported by the protocol in version 3:
-% *
-% * RPCBPROC_NULL() returns ()
-% * takes nothing, returns nothing
-% *
-% * RPCBPROC_SET(rpcb) returns (bool_t)
-% * TRUE is success, FALSE is failure. Registers the tuple
-% * [prog, vers, address, owner, netid].
-% * Finds out owner and netid information on its own.
-% *
-% * RPCBPROC_UNSET(rpcb) returns (bool_t)
-% * TRUE is success, FALSE is failure. Un-registers tuple
-% * [prog, vers, netid]. addresses is ignored.
-% * If netid is NULL, unregister all.
-% *
-% * RPCBPROC_GETADDR(rpcb) returns (string).
-% * 0 is failure. Otherwise returns the universal address where the
-% * triple [prog, vers, netid] is registered. Ignore address and owner.
-% *
-% * RPCBPROC_DUMP() RETURNS (rpcblist_ptr)
-% * used to dump the entire rpcbind maps
-% *
-% * RPCBPROC_CALLIT(rpcb_rmtcallargs)
-% * RETURNS (rpcb_rmtcallres);
-% * Calls the procedure on the remote machine. If it is not registered,
-% * this procedure is quiet; i.e. it does not return error information!!!
-% * This routine only passes null authentication parameters.
-% * It has no interface to xdr routines for RPCBPROC_CALLIT.
-% *
-% * RPCBPROC_GETTIME() returns (int).
-% * Gets the remote machines time
-% *
-% * RPCBPROC_UADDR2TADDR(strint) RETURNS (struct netbuf)
-% * Returns the netbuf address from universal address.
-% *
-% * RPCBPROC_TADDR2UADDR(struct netbuf) RETURNS (string)
-% * Returns the universal address from netbuf address.
-% *
-% * END OF RPCBIND VERSION 3 PROCEDURES
-% */
-%/*
-% * Except for RPCBPROC_CALLIT, the procedures above are carried over to
-% * rpcbind version 4. Those below are added or modified for version 4.
-% * NOTE: RPCBPROC_BCAST HAS THE SAME FUNCTIONALITY AND PROCEDURE NUMBER
-% * AS RPCBPROC_CALLIT.
-% *
-% * RPCBPROC_BCAST(rpcb_rmtcallargs)
-% * RETURNS (rpcb_rmtcallres);
-% * Calls the procedure on the remote machine. If it is not registered,
-% * this procedure IS quiet; i.e. it DOES NOT return error information!!!
-% * This routine should be used for broadcasting and nothing else.
-% *
-% * RPCBPROC_GETVERSADDR(rpcb) returns (string).
-% * 0 is failure. Otherwise returns the universal address where the
-% * triple [prog, vers, netid] is registered. Ignore address and owner.
-% * Same as RPCBPROC_GETADDR except that if the given version number
-% * is not available, the address is not returned.
-% *
-% * RPCBPROC_INDIRECT(rpcb_rmtcallargs)
-% * RETURNS (rpcb_rmtcallres);
-% * Calls the procedure on the remote machine. If it is not registered,
-% * this procedure is NOT quiet; i.e. it DOES return error information!!!
-% * as any normal application would expect.
-% *
-% * RPCBPROC_GETADDRLIST(rpcb) returns (rpcb_entry_list_ptr).
-% * Same as RPCBPROC_GETADDR except that it returns a list of all the
-% * addresses registered for the combination (prog, vers) (for all
-% * transports).
-% *
-% * RPCBPROC_GETSTAT(void) returns (rpcb_stat_byvers)
-% * Returns the statistics about the kind of requests received by rpcbind.
-% */
-%
-%/*
-% * A mapping of (program, version, network ID) to address
-% */
-struct rpcb {
- rpcprog_t r_prog; /* program number */
- rpcvers_t r_vers; /* version number */
- string r_netid<>; /* network id */
- string r_addr<>; /* universal address */
- string r_owner<>; /* owner of this service */
-};
-#ifdef RPC_HDR
-%
-%typedef rpcb RPCB;
-%
-#endif
-%
-%/*
-% * A list of mappings
-% *
-% * Below are two definitions for the rpcblist structure. This is done because
-% * xdr_rpcblist() is specified to take a struct rpcblist **, rather than a
-% * struct rpcblist * that rpcgen would produce. One version of the rpcblist
-% * structure (actually called rp__list) is used with rpcgen, and the other is
-% * defined only in the header file for compatibility with the specified
-% * interface.
-% */
-
-struct rp__list {
- rpcb rpcb_map;
- struct rp__list *rpcb_next;
-};
-
-typedef rp__list *rpcblist_ptr; /* results of RPCBPROC_DUMP */
-
-#ifdef RPC_HDR
-%
-%typedef struct rp__list rpcblist;
-%typedef struct rp__list RPCBLIST;
-%
-%#ifndef __cplusplus
-%struct rpcblist {
-% RPCB rpcb_map;
-% struct rpcblist *rpcb_next;
-%};
-%#endif
-%
-%#ifdef __cplusplus
-%extern "C" {
-%#endif
-%extern bool_t xdr_rpcblist(XDR *, rpcblist**);
-%#ifdef __cplusplus
-%}
-%#endif
-%
-#endif
-
-%
-%/*
-% * Arguments of remote calls
-% */
-struct rpcb_rmtcallargs {
- rpcprog_t prog; /* program number */
- rpcvers_t vers; /* version number */
- rpcproc_t proc; /* procedure number */
- opaque args<>; /* argument */
-};
-#ifdef RPC_HDR
-%
-%/*
-% * Client-side only representation of rpcb_rmtcallargs structure.
-% *
-% * The routine that XDRs the rpcb_rmtcallargs structure must deal with the
-% * opaque arguments in the "args" structure. xdr_rpcb_rmtcallargs() needs to
-% * be passed the XDR routine that knows the args' structure. This routine
-% * doesn't need to go over-the-wire (and it wouldn't make sense anyway) since
-% * the application being called already knows the args structure. So we use a
-% * different "XDR" structure on the client side, r_rpcb_rmtcallargs, which
-% * includes the args' XDR routine.
-% */
-%struct r_rpcb_rmtcallargs {
-% rpcprog_t prog;
-% rpcvers_t vers;
-% rpcproc_t proc;
-% struct {
-% u_int args_len;
-% char *args_val;
-% } args;
-% xdrproc_t xdr_args; /* encodes args */
-%};
-%
-#endif /* def RPC_HDR */
-%
-%/*
-% * Results of the remote call
-% */
-struct rpcb_rmtcallres {
- string addr<>; /* remote universal address */
- opaque results<>; /* result */
-};
-#ifdef RPC_HDR
-%
-%/*
-% * Client-side only representation of rpcb_rmtcallres structure.
-% */
-%struct r_rpcb_rmtcallres {
-% char *addr;
-% struct {
-% u_int32_t results_len;
-% char *results_val;
-% } results;
-% xdrproc_t xdr_res; /* decodes results */
-%};
-#endif /* RPC_HDR */
-%
-%/*
-% * rpcb_entry contains a merged address of a service on a particular
-% * transport, plus associated netconfig information. A list of rpcb_entrys
-% * is returned by RPCBPROC_GETADDRLIST. See netconfig.h for values used
-% * in r_nc_* fields.
-% */
-struct rpcb_entry {
- string r_maddr<>; /* merged address of service */
- string r_nc_netid<>; /* netid field */
- unsigned int r_nc_semantics; /* semantics of transport */
- string r_nc_protofmly<>; /* protocol family */
- string r_nc_proto<>; /* protocol name */
-};
-%
-%/*
-% * A list of addresses supported by a service.
-% */
-struct rpcb_entry_list {
- rpcb_entry rpcb_entry_map;
- struct rpcb_entry_list *rpcb_entry_next;
-};
-
-typedef rpcb_entry_list *rpcb_entry_list_ptr;
-
-%
-%/*
-% * rpcbind statistics
-% */
-%
-const rpcb_highproc_2 = RPCBPROC_CALLIT;
-const rpcb_highproc_3 = RPCBPROC_TADDR2UADDR;
-const rpcb_highproc_4 = RPCBPROC_GETSTAT;
-
-const RPCBSTAT_HIGHPROC = 13; /* # of procs in rpcbind V4 plus one */
-const RPCBVERS_STAT = 3; /* provide only for rpcbind V2, V3 and V4 */
-const RPCBVERS_4_STAT = 2;
-const RPCBVERS_3_STAT = 1;
-const RPCBVERS_2_STAT = 0;
-%
-%/* Link list of all the stats about getport and getaddr */
-struct rpcbs_addrlist {
- rpcprog_t prog;
- rpcvers_t vers;
- int success;
- int failure;
- string netid<>;
- struct rpcbs_addrlist *next;
-};
-%
-%/* Link list of all the stats about rmtcall */
-struct rpcbs_rmtcalllist {
- rpcprog_t prog;
- rpcvers_t vers;
- rpcproc_t proc;
- int success;
- int failure;
- int indirect; /* whether callit or indirect */
- string netid<>;
- struct rpcbs_rmtcalllist *next;
-};
-
-typedef int rpcbs_proc[RPCBSTAT_HIGHPROC];
-typedef rpcbs_addrlist *rpcbs_addrlist_ptr;
-typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr;
-
-struct rpcb_stat {
- rpcbs_proc info;
- int setinfo;
- int unsetinfo;
- rpcbs_addrlist_ptr addrinfo;
- rpcbs_rmtcalllist_ptr rmtinfo;
-};
-%
-%/*
-% * One rpcb_stat structure is returned for each version of rpcbind
-% * being monitored.
-% */
-
-typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];
-
-#ifdef RPC_HDR
-%
-%/*
-% * We don't define netbuf in RPCL, since it would contain structure member
-% * names that would conflict with the definition of struct netbuf in
-% * <tiuser.h>. Instead we merely declare the XDR routine xdr_netbuf() here,
-% * and implement it ourselves in rpc/rpcb_prot.c.
-% */
-%#ifdef __cplusplus
-%extern "C" bool_t xdr_netbuf(XDR *, struct netbuf *);
-%
-%#else /* __STDC__ */
-%extern bool_t xdr_netbuf(XDR *, struct netbuf *);
-%
-%#endif
-#endif /* def RPC_HDR */
-
-/*
- * rpcbind procedures
- */
-program RPCBPROG {
- version RPCBVERS {
- bool
- RPCBPROC_SET(rpcb) = 1;
-
- bool
- RPCBPROC_UNSET(rpcb) = 2;
-
- string
- RPCBPROC_GETADDR(rpcb) = 3;
-
- rpcblist_ptr
- RPCBPROC_DUMP(void) = 4;
-
- rpcb_rmtcallres
- RPCBPROC_CALLIT(rpcb_rmtcallargs) = 5;
-
- unsigned int
- RPCBPROC_GETTIME(void) = 6;
-
- struct netbuf
- RPCBPROC_UADDR2TADDR(string) = 7;
-
- string
- RPCBPROC_TADDR2UADDR(struct netbuf) = 8;
- } = 3;
-
- version RPCBVERS4 {
- bool
- RPCBPROC_SET(rpcb) = 1;
-
- bool
- RPCBPROC_UNSET(rpcb) = 2;
-
- string
- RPCBPROC_GETADDR(rpcb) = 3;
-
- rpcblist_ptr
- RPCBPROC_DUMP(void) = 4;
-
- /*
- * NOTE: RPCBPROC_BCAST has the same functionality as CALLIT;
- * the new name is intended to indicate that this
- * procedure should be used for broadcast RPC, and
- * RPCBPROC_INDIRECT should be used for indirect calls.
- */
- rpcb_rmtcallres
- RPCBPROC_BCAST(rpcb_rmtcallargs) = RPCBPROC_CALLIT;
-
- unsigned int
- RPCBPROC_GETTIME(void) = 6;
-
- struct netbuf
- RPCBPROC_UADDR2TADDR(string) = 7;
-
- string
- RPCBPROC_TADDR2UADDR(struct netbuf) = 8;
-
- string
- RPCBPROC_GETVERSADDR(rpcb) = 9;
-
- rpcb_rmtcallres
- RPCBPROC_INDIRECT(rpcb_rmtcallargs) = 10;
-
- rpcb_entry_list_ptr
- RPCBPROC_GETADDRLIST(rpcb) = 11;
-
- rpcb_stat_byvers
- RPCBPROC_GETSTAT(void) = 12;
- } = 4;
-} = 100000;
-#ifdef RPC_HDR
-%
-%#define RPCBVERS_3 RPCBVERS
-%#define RPCBVERS_4 RPCBVERS4
-%
-%#define _PATH_RPCBINDSOCK "/var/run/rpcbind.sock"
-%
-%#else /* ndef _KERNEL */
-%#ifdef __cplusplus
-%extern "C" {
-%#endif
-%
-%/*
-% * A mapping of (program, version, network ID) to address
-% */
-%struct rpcb {
-% rpcprog_t r_prog; /* program number */
-% rpcvers_t r_vers; /* version number */
-% char *r_netid; /* network id */
-% char *r_addr; /* universal address */
-% char *r_owner; /* owner of the mapping */
-%};
-%typedef struct rpcb RPCB;
-%
-%/*
-% * A list of mappings
-% */
-%struct rpcblist {
-% RPCB rpcb_map;
-% struct rpcblist *rpcb_next;
-%};
-%typedef struct rpcblist RPCBLIST;
-%typedef struct rpcblist *rpcblist_ptr;
-%
-%/*
-% * Remote calls arguments
-% */
-%struct rpcb_rmtcallargs {
-% rpcprog_t prog; /* program number */
-% rpcvers_t vers; /* version number */
-% rpcproc_t proc; /* procedure number */
-% u_int32_t arglen; /* arg len */
-% caddr_t args_ptr; /* argument */
-% xdrproc_t xdr_args; /* XDR routine for argument */
-%};
-%typedef struct rpcb_rmtcallargs rpcb_rmtcallargs;
-%
-%/*
-% * Remote calls results
-% */
-%struct rpcb_rmtcallres {
-% char *addr_ptr; /* remote universal address */
-% u_int32_t resultslen; /* results length */
-% caddr_t results_ptr; /* results */
-% xdrproc_t xdr_results; /* XDR routine for result */
-%};
-%typedef struct rpcb_rmtcallres rpcb_rmtcallres;
-%
-%struct rpcb_entry {
-% char *r_maddr;
-% char *r_nc_netid;
-% unsigned int r_nc_semantics;
-% char *r_nc_protofmly;
-% char *r_nc_proto;
-%};
-%typedef struct rpcb_entry rpcb_entry;
-%
-%/*
-% * A list of addresses supported by a service.
-% */
-%
-%struct rpcb_entry_list {
-% rpcb_entry rpcb_entry_map;
-% struct rpcb_entry_list *rpcb_entry_next;
-%};
-%typedef struct rpcb_entry_list rpcb_entry_list;
-%
-%typedef rpcb_entry_list *rpcb_entry_list_ptr;
-%
-%/*
-% * rpcbind statistics
-% */
-%
-%#define rpcb_highproc_2 RPCBPROC_CALLIT
-%#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR
-%#define rpcb_highproc_4 RPCBPROC_GETSTAT
-%#define RPCBSTAT_HIGHPROC 13
-%#define RPCBVERS_STAT 3
-%#define RPCBVERS_4_STAT 2
-%#define RPCBVERS_3_STAT 1
-%#define RPCBVERS_2_STAT 0
-%
-%/* Link list of all the stats about getport and getaddr */
-%
-%struct rpcbs_addrlist {
-% rpcprog_t prog;
-% rpcvers_t vers;
-% int success;
-% int failure;
-% char *netid;
-% struct rpcbs_addrlist *next;
-%};
-%typedef struct rpcbs_addrlist rpcbs_addrlist;
-%
-%/* Link list of all the stats about rmtcall */
-%
-%struct rpcbs_rmtcalllist {
-% rpcprog_t prog;
-% rpcvers_t vers;
-% rpcproc_t proc;
-% int success;
-% int failure;
-% int indirect;
-% char *netid;
-% struct rpcbs_rmtcalllist *next;
-%};
-%typedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist;
-%
-%typedef int rpcbs_proc[RPCBSTAT_HIGHPROC];
-%
-%typedef rpcbs_addrlist *rpcbs_addrlist_ptr;
-%
-%typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr;
-%
-%struct rpcb_stat {
-% rpcbs_proc info;
-% int setinfo;
-% int unsetinfo;
-% rpcbs_addrlist_ptr addrinfo;
-% rpcbs_rmtcalllist_ptr rmtinfo;
-%};
-%typedef struct rpcb_stat rpcb_stat;
-%
-%/*
-% * One rpcb_stat structure is returned for each version of rpcbind
-% * being monitored.
-% */
-%
-%typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];
-%
-%#ifdef __cplusplus
-%}
-%#endif
-%
-%#endif /* ndef _KERNEL */
-#endif /* RPC_HDR */
diff --git a/newlib/libc/sys/linux/include/rpc/rpcent.h b/newlib/libc/sys/linux/include/rpc/rpcent.h
deleted file mode 100644
index dbc8b0e5f..000000000
--- a/newlib/libc/sys/linux/include/rpc/rpcent.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* $NetBSD: rpcent.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */
-/* $FreeBSD: src/include/rpc/rpcent.h,v 1.2 2002/03/23 17:24:55 imp Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
- */
-
-/*
- * rpcent.h,
- * For converting rpc program numbers to names etc.
- *
- */
-
-#ifndef _RPC_RPCENT_H
-#define _RPC_RPCENT_H
-
-/* #pragma ident "@(#)rpcent.h 1.13 94/04/25 SMI" */
-/* @(#)rpcent.h 1.1 88/12/06 SMI */
-
-
-struct rpcent {
- char *r_name; /* name of server for this rpc program */
- char **r_aliases; /* alias list */
- int r_number; /* rpc program number */
-};
-
-__BEGIN_DECLS
-extern struct rpcent *getrpcbyname_r(const char *, struct rpcent *,
- char *, int);
-extern struct rpcent *getrpcbynumber_r(int, struct rpcent *, char *, int);
-extern struct rpcent *getrpcent_r(struct rpcent *, char *, int);
-
-/* Old interfaces that return a pointer to a static area; MT-unsafe */
-extern struct rpcent *getrpcbyname(char *);
-extern struct rpcent *getrpcbynumber(int);
-extern struct rpcent *getrpcent(void);
-extern void setrpcent(int);
-extern void endrpcent(void);
-__END_DECLS
-
-#endif /* !_RPC_CENT_H */
diff --git a/newlib/libc/sys/linux/include/rpc/svc.h b/newlib/libc/sys/linux/include/rpc/svc.h
deleted file mode 100644
index 6a8997bda..000000000
--- a/newlib/libc/sys/linux/include/rpc/svc.h
+++ /dev/null
@@ -1,429 +0,0 @@
-/* $NetBSD: svc.h,v 1.17 2000/06/02 22:57:56 fvdl Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)svc.h 1.35 88/12/17 SMI
- * from: @(#)svc.h 1.27 94/04/25 SMI
- * $FreeBSD: src/include/rpc/svc.h,v 1.22 2002/04/28 15:18:45 des Exp $
- */
-
-/*
- * svc.h, Server-side remote procedure call interface.
- *
- * Copyright (C) 1986-1993 by Sun Microsystems, Inc.
- */
-
-#ifndef _RPC_SVC_H
-#define _RPC_SVC_H
-#include <sys/cdefs.h>
-
-/*
- * This interface must manage two items concerning remote procedure calling:
- *
- * 1) An arbitrary number of transport connections upon which rpc requests
- * are received. The two most notable transports are TCP and UDP; they are
- * created and registered by routines in svc_tcp.c and svc_udp.c, respectively;
- * they in turn call xprt_register and xprt_unregister.
- *
- * 2) An arbitrary number of locally registered services. Services are
- * described by the following four data: program number, version number,
- * "service dispatch" function, a transport handle, and a boolean that
- * indicates whether or not the exported program should be registered with a
- * local binder service; if true the program's number and version and the
- * port number from the transport handle are registered with the binder.
- * These data are registered with the rpc svc system via svc_register.
- *
- * A service's dispatch function is called whenever an rpc request comes in
- * on a transport. The request's program and version numbers must match
- * those of the registered service. The dispatch function is passed two
- * parameters, struct svc_req * and SVCXPRT *, defined below.
- */
-
-/*
- * Service control requests
- */
-#define SVCGET_VERSQUIET 1
-#define SVCSET_VERSQUIET 2
-
-
-enum xprt_stat {
- XPRT_DIED,
- XPRT_MOREREQS,
- XPRT_IDLE
-};
-
-/*
- * Server side transport handle
- */
-typedef struct __rpc_svcxprt {
- int xp_fd;
- u_short xp_port; /* associated port number */
- const struct xp_ops {
- /* receive incoming requests */
- bool_t (*xp_recv)(struct __rpc_svcxprt *, struct rpc_msg *);
- /* get transport status */
- enum xprt_stat (*xp_stat)(struct __rpc_svcxprt *);
- /* get arguments */
- bool_t (*xp_getargs)(struct __rpc_svcxprt *, xdrproc_t,
- void *);
- /* send reply */
- bool_t (*xp_reply)(struct __rpc_svcxprt *, struct rpc_msg *);
- /* free mem allocated for args */
- bool_t (*xp_freeargs)(struct __rpc_svcxprt *, xdrproc_t,
- void *);
- /* destroy this struct */
- void (*xp_destroy)(struct __rpc_svcxprt *);
- } *xp_ops;
- int xp_addrlen; /* length of remote address */
- struct sockaddr_in xp_raddr; /* remote addr. (backward ABI compat) */
- /* XXX - fvdl stick this here for ABI backward compat reasons */
- const struct xp_ops2 {
- /* catch-all function */
- bool_t (*xp_control)(struct __rpc_svcxprt *, const u_int,
- void *);
- } *xp_ops2;
- char *xp_tp; /* transport provider device name */
- char *xp_netid; /* network token */
- struct netbuf xp_ltaddr; /* local transport address */
- struct netbuf xp_rtaddr; /* remote transport address */
- struct opaque_auth xp_verf; /* raw response verifier */
- void *xp_p1; /* private: for use by svc ops */
- void *xp_p2; /* private: for use by svc ops */
- void *xp_p3; /* private: for use by svc lib */
- int xp_type; /* transport type */
-} SVCXPRT;
-
-/*
- * Service request
- */
-struct svc_req {
- u_int32_t rq_prog; /* service program number */
- u_int32_t rq_vers; /* service protocol version */
- u_int32_t rq_proc; /* the desired procedure */
- struct opaque_auth rq_cred; /* raw creds from the wire */
- void *rq_clntcred; /* read only cooked cred */
- SVCXPRT *rq_xprt; /* associated transport */
-};
-
-/*
- * Approved way of getting address of caller
- */
-#define svc_getrpccaller(x) (&(x)->xp_rtaddr)
-
-/*
- * FreeBSD-only definition to get the creds of the caller (AF_LOCAL).
- */
-#define __svc_getcallercreds(x) ((struct cmsgcred *)(x)->xp_p2)
-
-/*
- * Operations defined on an SVCXPRT handle
- *
- * SVCXPRT *xprt;
- * struct rpc_msg *msg;
- * xdrproc_t xargs;
- * void * argsp;
- */
-#define SVC_RECV(xprt, msg) \
- (*(xprt)->xp_ops->xp_recv)((xprt), (msg))
-#define svc_recv(xprt, msg) \
- (*(xprt)->xp_ops->xp_recv)((xprt), (msg))
-
-#define SVC_STAT(xprt) \
- (*(xprt)->xp_ops->xp_stat)(xprt)
-#define svc_stat(xprt) \
- (*(xprt)->xp_ops->xp_stat)(xprt)
-
-#define SVC_GETARGS(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp))
-#define svc_getargs(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp))
-
-#define SVC_REPLY(xprt, msg) \
- (*(xprt)->xp_ops->xp_reply) ((xprt), (msg))
-#define svc_reply(xprt, msg) \
- (*(xprt)->xp_ops->xp_reply) ((xprt), (msg))
-
-#define SVC_FREEARGS(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp))
-#define svc_freeargs(xprt, xargs, argsp) \
- (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp))
-
-#define SVC_DESTROY(xprt) \
- (*(xprt)->xp_ops->xp_destroy)(xprt)
-#define svc_destroy(xprt) \
- (*(xprt)->xp_ops->xp_destroy)(xprt)
-
-#define SVC_CONTROL(xprt, rq, in) \
- (*(xprt)->xp_ops2->xp_control)((xprt), (rq), (in))
-
-/*
- * Service registration
- *
- * svc_reg(xprt, prog, vers, dispatch, nconf)
- * const SVCXPRT *xprt;
- * const rpcprog_t prog;
- * const rpcvers_t vers;
- * const void (*dispatch)();
- * const struct netconfig *nconf;
- */
-
-__BEGIN_DECLS
-extern bool_t svc_reg(SVCXPRT *, const rpcprog_t, const rpcvers_t,
- void (*)(struct svc_req *, SVCXPRT *),
- const struct netconfig *);
-__END_DECLS
-
-/*
- * Service un-registration
- *
- * svc_unreg(prog, vers)
- * const rpcprog_t prog;
- * const rpcvers_t vers;
- */
-
-__BEGIN_DECLS
-extern void svc_unreg(const rpcprog_t, const rpcvers_t);
-__END_DECLS
-
-/*
- * Transport registration.
- *
- * xprt_register(xprt)
- * SVCXPRT *xprt;
- */
-__BEGIN_DECLS
-extern void xprt_register(SVCXPRT *);
-__END_DECLS
-
-/*
- * Transport un-register
- *
- * xprt_unregister(xprt)
- * SVCXPRT *xprt;
- */
-__BEGIN_DECLS
-extern void xprt_unregister(SVCXPRT *);
-__END_DECLS
-
-
-/*
- * When the service routine is called, it must first check to see if it
- * knows about the procedure; if not, it should call svcerr_noproc
- * and return. If so, it should deserialize its arguments via
- * SVC_GETARGS (defined above). If the deserialization does not work,
- * svcerr_decode should be called followed by a return. Successful
- * decoding of the arguments should be followed the execution of the
- * procedure's code and a call to svc_sendreply.
- *
- * Also, if the service refuses to execute the procedure due to too-
- * weak authentication parameters, svcerr_weakauth should be called.
- * Note: do not confuse access-control failure with weak authentication!
- *
- * NB: In pure implementations of rpc, the caller always waits for a reply
- * msg. This message is sent when svc_sendreply is called.
- * Therefore pure service implementations should always call
- * svc_sendreply even if the function logically returns void; use
- * xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows
- * for the abuse of pure rpc via batched calling or pipelining. In the
- * case of a batched call, svc_sendreply should NOT be called since
- * this would send a return message, which is what batching tries to avoid.
- * It is the service/protocol writer's responsibility to know which calls are
- * batched and which are not. Warning: responding to batch calls may
- * deadlock the caller and server processes!
- */
-
-__BEGIN_DECLS
-extern bool_t svc_sendreply(SVCXPRT *, xdrproc_t, void *);
-extern void svcerr_decode(SVCXPRT *);
-extern void svcerr_weakauth(SVCXPRT *);
-extern void svcerr_noproc(SVCXPRT *);
-extern void svcerr_progvers(SVCXPRT *, rpcvers_t, rpcvers_t);
-extern void svcerr_auth(SVCXPRT *, enum auth_stat);
-extern void svcerr_noprog(SVCXPRT *);
-extern void svcerr_systemerr(SVCXPRT *);
-extern int rpc_reg(rpcprog_t, rpcvers_t, rpcproc_t,
- char *(*)(char *), xdrproc_t, xdrproc_t,
- char *);
-__END_DECLS
-
-/*
- * Lowest level dispatching -OR- who owns this process anyway.
- * Somebody has to wait for incoming requests and then call the correct
- * service routine. The routine svc_run does infinite waiting; i.e.,
- * svc_run never returns.
- * Since another (co-existant) package may wish to selectively wait for
- * incoming calls or other events outside of the rpc architecture, the
- * routine svc_getreq is provided. It must be passed readfds, the
- * "in-place" results of a select system call (see select, section 2).
- */
-
-/*
- * Global keeper of rpc service descriptors in use
- * dynamic; must be inspected before each call to select
- */
-extern int svc_maxfd;
-#ifdef FD_SETSIZE
-extern fd_set svc_fdset;
-#define svc_fds svc_fdset.fds_bits[0] /* compatibility */
-#else
-extern int svc_fds;
-#endif /* def FD_SETSIZE */
-
-/*
- * a small program implemented by the svc_rpc implementation itself;
- * also see clnt.h for protocol numbers.
- */
-__BEGIN_DECLS
-extern void rpctest_service(void);
-__END_DECLS
-
-__BEGIN_DECLS
-extern void svc_getreq(int);
-extern void svc_getreqset(fd_set *);
-extern void svc_getreq_common(int);
-struct pollfd;
-extern void svc_getreq_poll(struct pollfd *, int);
-
-extern void svc_run(void);
-extern void svc_exit(void);
-__END_DECLS
-
-/*
- * Socket to use on svcxxx_create call to get default socket
- */
-#define RPC_ANYSOCK -1
-#define RPC_ANYFD RPC_ANYSOCK
-
-/*
- * These are the existing service side transport implementations
- */
-
-__BEGIN_DECLS
-/*
- * Transport independent svc_create routine.
- */
-extern int svc_create(void (*)(struct svc_req *, SVCXPRT *),
- const rpcprog_t, const rpcvers_t, const char *);
-/*
- * void (*dispatch)(); -- dispatch routine
- * const rpcprog_t prognum; -- program number
- * const rpcvers_t versnum; -- version number
- * const char *nettype; -- network type
- */
-
-
-/*
- * Generic server creation routine. It takes a netconfig structure
- * instead of a nettype.
- */
-
-extern SVCXPRT *svc_tp_create(void (*)(struct svc_req *, SVCXPRT *),
- const rpcprog_t, const rpcvers_t,
- const struct netconfig *);
- /*
- * void (*dispatch)(); -- dispatch routine
- * const rpcprog_t prognum; -- program number
- * const rpcvers_t versnum; -- version number
- * const struct netconfig *nconf; -- netconfig structure
- */
-
-
-/*
- * Generic TLI create routine
- */
-extern SVCXPRT *svc_tli_create(const int, const struct netconfig *,
- const struct t_bind *, const u_int,
- const u_int);
-/*
- * const int fd; -- connection end point
- * const struct netconfig *nconf; -- netconfig structure for network
- * const struct t_bind *bindaddr; -- local bind address
- * const u_int sendsz; -- max sendsize
- * const u_int recvsz; -- max recvsize
- */
-
-/*
- * Connectionless and connectionful create routines
- */
-
-extern SVCXPRT *svc_vc_create(const int, const u_int, const u_int);
-/*
- * const int fd; -- open connection end point
- * const u_int sendsize; -- max send size
- * const u_int recvsize; -- max recv size
- */
-
-/*
- * Added for compatibility to old rpc 4.0. Obsoleted by svc_vc_create().
- */
-extern SVCXPRT *svcunix_create(int, u_int, u_int, char *);
-
-extern SVCXPRT *svc_dg_create(const int, const u_int, const u_int);
- /*
- * const int fd; -- open connection
- * const u_int sendsize; -- max send size
- * const u_int recvsize; -- max recv size
- */
-
-
-/*
- * the routine takes any *open* connection
- * descriptor as its first input and is used for open connections.
- */
-extern SVCXPRT *svc_fd_create(const int, const u_int, const u_int);
-/*
- * const int fd; -- open connection end point
- * const u_int sendsize; -- max send size
- * const u_int recvsize; -- max recv size
- */
-
-/*
- * Added for compatibility to old rpc 4.0. Obsoleted by svc_fd_create().
- */
-extern SVCXPRT *svcunixfd_create(int, u_int, u_int);
-
-/*
- * Memory based rpc (for speed check and testing)
- */
-extern SVCXPRT *svc_raw_create(void);
-
-/*
- * svc_dg_enable_cache() enables the cache on dg transports.
- */
-int svc_dg_enablecache(SVCXPRT *, const u_int);
-
-int __rpc_get_local_uid(SVCXPRT *_transp, uid_t *_uid);
-
-__END_DECLS
-
-
-/* for backward compatibility */
-#include <rpc/svc_soc.h>
-
-#endif /* !_RPC_SVC_H */
diff --git a/newlib/libc/sys/linux/include/rpc/svc_auth.h b/newlib/libc/sys/linux/include/rpc/svc_auth.h
deleted file mode 100644
index 366f752d9..000000000
--- a/newlib/libc/sys/linux/include/rpc/svc_auth.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* $NetBSD: svc_auth.h,v 1.8 2000/06/02 22:57:57 fvdl Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)svc_auth.h 1.6 86/07/16 SMI
- * @(#)svc_auth.h 2.1 88/07/29 4.0 RPCSRC
- * $FreeBSD: src/include/rpc/svc_auth.h,v 1.14 2002/03/23 17:24:55 imp Exp $
- */
-
-/*
- * svc_auth.h, Service side of rpc authentication.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#ifndef _RPC_SVC_AUTH_H
-#define _RPC_SVC_AUTH_H
-
-/*
- * Server side authenticator
- */
-__BEGIN_DECLS
-extern enum auth_stat _authenticate(struct svc_req *, struct rpc_msg *);
-extern int svc_auth_reg(int, enum auth_stat (*)(struct svc_req *,
- struct rpc_msg *));
-
-__END_DECLS
-
-#endif /* !_RPC_SVC_AUTH_H */
diff --git a/newlib/libc/sys/linux/include/rpc/svc_dg.h b/newlib/libc/sys/linux/include/rpc/svc_dg.h
deleted file mode 100644
index 67d25643b..000000000
--- a/newlib/libc/sys/linux/include/rpc/svc_dg.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* $NetBSD: svc_dg.h,v 1.1 2000/06/02 23:11:16 fvdl Exp $ */
-/* $FreeBSD: src/include/rpc/svc_dg.h,v 1.1 2001/03/19 12:49:47 alfred Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-/*
- * XXX - this file exists only so that the rpcbind code can pull it in.
- * This should go away. It should only be include by svc_dg.c and
- * rpcb_svc_com.c in the rpcbind code.
- */
-
-/*
- * kept in xprt->xp_p2
- */
-struct svc_dg_data {
- /* XXX: optbuf should be the first field, used by ti_opts.c code */
- size_t su_iosz; /* size of send.recv buffer */
- u_int32_t su_xid; /* transaction id */
- XDR su_xdrs; /* XDR handle */
- char su_verfbody[MAX_AUTH_BYTES]; /* verifier body */
- void *su_cache; /* cached data, NULL if none */
-};
-
-#define __rpcb_get_dg_xidp(x) (&((struct svc_dg_data *)(x)->xp_p2)->su_xid)
diff --git a/newlib/libc/sys/linux/include/rpc/svc_soc.h b/newlib/libc/sys/linux/include/rpc/svc_soc.h
deleted file mode 100644
index ceb4392c7..000000000
--- a/newlib/libc/sys/linux/include/rpc/svc_soc.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/* $NetBSD: svc_soc.h,v 1.1 2000/06/02 22:57:57 fvdl Exp $ */
-/* $FreeBSD: src/include/rpc/svc_soc.h,v 1.2 2002/03/23 17:24:55 imp Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
- */
-
-/*
- * svc.h, Server-side remote procedure call interface.
- */
-
-#ifndef _RPC_SVC_SOC_H
-#define _RPC_SVC_SOC_H
-#include <sys/cdefs.h>
-
-/* #pragma ident "@(#)svc_soc.h 1.11 94/04/25 SMI" */
-/* svc_soc.h 1.8 89/05/01 SMI */
-
-/*
- * All the following declarations are only for backward compatibility
- * with TS-RPC
- */
-
-/*
- * Approved way of getting address of caller
- */
-#define svc_getcaller(x) (&(x)->xp_raddr)
-
-/*
- * Service registration
- *
- * svc_register(xprt, prog, vers, dispatch, protocol)
- * SVCXPRT *xprt;
- * u_long prog;
- * u_long vers;
- * void (*dispatch)();
- * int protocol; like TCP or UDP, zero means do not register
- */
-__BEGIN_DECLS
-extern bool_t svc_register(SVCXPRT *, u_long, u_long,
- void (*)(struct svc_req *, SVCXPRT *), int);
-__END_DECLS
-
-/*
- * Service un-registration
- *
- * svc_unregister(prog, vers)
- * u_long prog;
- * u_long vers;
- */
-__BEGIN_DECLS
-extern void svc_unregister(u_long, u_long);
-__END_DECLS
-
-
-/*
- * Memory based rpc for testing and timing.
- */
-__BEGIN_DECLS
-extern SVCXPRT *svcraw_create(void);
-__END_DECLS
-
-
-/*
- * Udp based rpc.
- */
-__BEGIN_DECLS
-extern SVCXPRT *svcudp_create(int);
-extern SVCXPRT *svcudp_bufcreate(int, u_int, u_int);
-extern int svcudp_enablecache(SVCXPRT *, u_long);
-__END_DECLS
-
-
-/*
- * Tcp based rpc.
- */
-__BEGIN_DECLS
-extern SVCXPRT *svctcp_create(int, u_int, u_int);
-__END_DECLS
-
-/*
- * Fd based rpc.
- */
-__BEGIN_DECLS
-extern SVCXPRT *svcfd_create(int, u_int, u_int);
-__END_DECLS
-
-#endif /* !_RPC_SVC_SOC_H */
diff --git a/newlib/libc/sys/linux/include/rpc/types.h b/newlib/libc/sys/linux/include/rpc/types.h
deleted file mode 100644
index 259127c00..000000000
--- a/newlib/libc/sys/linux/include/rpc/types.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* $NetBSD: types.h,v 1.13 2000/06/13 01:02:44 thorpej Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)types.h 1.18 87/07/24 SMI
- * from: @(#)types.h 2.3 88/08/15 4.0 RPCSRC
- * $FreeBSD: src/include/rpc/types.h,v 1.10 2001/03/19 12:49:47 alfred Exp $
- */
-
-/*
- * Rpc additions to <sys/types.h>
- */
-#ifndef _RPC_TYPES_H
-#define _RPC_TYPES_H
-
-#include <sys/types.h>
-
-typedef int32_t bool_t;
-typedef int32_t enum_t;
-
-typedef u_int32_t rpcprog_t;
-typedef u_int32_t rpcvers_t;
-typedef u_int32_t rpcproc_t;
-typedef u_int32_t rpcprot_t;
-typedef u_int32_t rpcport_t;
-typedef int32_t rpc_inline_t;
-
-#define __dontcare__ -1
-
-#ifndef FALSE
-# define FALSE (0)
-#endif
-#ifndef TRUE
-# define TRUE (1)
-#endif
-#ifndef NULL
-# define NULL 0
-#endif
-
-#define mem_alloc(bsize) calloc(1, bsize)
-#define mem_free(ptr, bsize) free(ptr)
-
-#include <sys/time.h>
-#include <netconfig.h>
-
-/*
- * The netbuf structure is defined here, because FreeBSD / NetBSD only use
- * it inside the RPC code. It's in <xti.h> on SVR4, but it would be confusing
- * to have an xti.h, since FreeBSD / NetBSD does not support XTI/TLI.
- */
-
-/*
- * The netbuf structure is used for transport-independent address storage.
- */
-struct netbuf {
- unsigned int maxlen;
- unsigned int len;
- void *buf;
-};
-
-/*
- * The format of the addres and options arguments of the XTI t_bind call.
- * Only provided for compatibility, it should not be used.
- */
-
-struct t_bind {
- struct netbuf addr;
- unsigned int qlen;
-};
-
-/*
- * Internal library and rpcbind use. This is not an exported interface, do
- * not use.
- */
-struct __rpc_sockinfo {
- int si_af;
- int si_proto;
- int si_socktype;
- int si_alen;
-};
-
-#endif /* !_RPC_TYPES_H */
diff --git a/newlib/libc/sys/linux/include/rpc/xdr.h b/newlib/libc/sys/linux/include/rpc/xdr.h
deleted file mode 100644
index 678dbe417..000000000
--- a/newlib/libc/sys/linux/include/rpc/xdr.h
+++ /dev/null
@@ -1,365 +0,0 @@
-/* $NetBSD: xdr.h,v 1.19 2000/07/17 05:00:45 matt Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- *
- * from: @(#)xdr.h 1.19 87/04/22 SMI
- * from: @(#)xdr.h 2.2 88/07/29 4.0 RPCSRC
- * $FreeBSD: src/include/rpc/xdr.h,v 1.21 2002/04/28 15:18:45 des Exp $
- */
-
-/*
- * xdr.h, External Data Representation Serialization Routines.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#ifndef _RPC_XDR_H
-#define _RPC_XDR_H
-#include <sys/cdefs.h>
-
-/*
- * XDR provides a conventional way for converting between C data
- * types and an external bit-string representation. Library supplied
- * routines provide for the conversion on built-in C data types. These
- * routines and utility routines defined here are used to help implement
- * a type encode/decode routine for each user-defined type.
- *
- * Each data type provides a single procedure which takes two arguments:
- *
- * bool_t
- * xdrproc(xdrs, argresp)
- * XDR *xdrs;
- * <type> *argresp;
- *
- * xdrs is an instance of a XDR handle, to which or from which the data
- * type is to be converted. argresp is a pointer to the structure to be
- * converted. The XDR handle contains an operation field which indicates
- * which of the operations (ENCODE, DECODE * or FREE) is to be performed.
- *
- * XDR_DECODE may allocate space if the pointer argresp is null. This
- * data can be freed with the XDR_FREE operation.
- *
- * We write only one procedure per data type to make it easy
- * to keep the encode and decode procedures for a data type consistent.
- * In many cases the same code performs all operations on a user defined type,
- * because all the hard work is done in the component type routines.
- * decode as a series of calls on the nested data types.
- */
-
-/*
- * Xdr operations. XDR_ENCODE causes the type to be encoded into the
- * stream. XDR_DECODE causes the type to be extracted from the stream.
- * XDR_FREE can be used to release the space allocated by an XDR_DECODE
- * request.
- */
-enum xdr_op {
- XDR_ENCODE=0,
- XDR_DECODE=1,
- XDR_FREE=2
-};
-
-/*
- * This is the number of bytes per unit of external data.
- */
-#define BYTES_PER_XDR_UNIT (4)
-#define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \
- * BYTES_PER_XDR_UNIT)
-
-/*
- * The XDR handle.
- * Contains operation which is being applied to the stream,
- * an operations vector for the particular implementation (e.g. see xdr_mem.c),
- * and two private fields for the use of the particular implementation.
- */
-typedef struct __rpc_xdr {
- enum xdr_op x_op; /* operation; fast additional param */
- const struct xdr_ops {
- /* get a long from underlying stream */
- bool_t (*x_getlong)(struct __rpc_xdr *, long *);
- /* put a long to " */
- bool_t (*x_putlong)(struct __rpc_xdr *, const long *);
- /* get some bytes from " */
- bool_t (*x_getbytes)(struct __rpc_xdr *, char *, u_int);
- /* put some bytes to " */
- bool_t (*x_putbytes)(struct __rpc_xdr *, const char *, u_int);
- /* returns bytes off from beginning */
- u_int (*x_getpostn)(struct __rpc_xdr *);
- /* lets you reposition the stream */
- bool_t (*x_setpostn)(struct __rpc_xdr *, u_int);
- /* buf quick ptr to buffered data */
- int32_t *(*x_inline)(struct __rpc_xdr *, u_int);
- /* free privates of this xdr_stream */
- void (*x_destroy)(struct __rpc_xdr *);
- bool_t (*x_control)(struct __rpc_xdr *, int, void *);
- } *x_ops;
- char * x_public; /* users' data */
- void * x_private; /* pointer to private data */
- char * x_base; /* private used for position info */
- int x_handy; /* extra private word */
-} XDR;
-
-/*
- * A xdrproc_t exists for each data type which is to be encoded or decoded.
- *
- * The second argument to the xdrproc_t is a pointer to an opaque pointer.
- * The opaque pointer generally points to a structure of the data type
- * to be decoded. If this pointer is 0, then the type routines should
- * allocate dynamic storage of the appropriate size and return it.
- */
-#ifdef _KERNEL
-typedef bool_t (*xdrproc_t)(XDR *, void *, u_int);
-#else
-/*
- * XXX can't actually prototype it, because some take three args!!!
- */
-typedef bool_t (*xdrproc_t)(XDR *, ...);
-#endif
-
-/*
- * Operations defined on a XDR handle
- *
- * XDR *xdrs;
- * long *longp;
- * char * addr;
- * u_int len;
- * u_int pos;
- */
-#define XDR_GETLONG(xdrs, longp) \
- (*(xdrs)->x_ops->x_getlong)(xdrs, longp)
-#define xdr_getlong(xdrs, longp) \
- (*(xdrs)->x_ops->x_getlong)(xdrs, longp)
-
-#define XDR_PUTLONG(xdrs, longp) \
- (*(xdrs)->x_ops->x_putlong)(xdrs, longp)
-#define xdr_putlong(xdrs, longp) \
- (*(xdrs)->x_ops->x_putlong)(xdrs, longp)
-
-static __inline int
-xdr_getint32(XDR *xdrs, int32_t *ip)
-{
- long l;
-
- if (!xdr_getlong(xdrs, &l))
- return (FALSE);
- *ip = (int32_t)l;
- return (TRUE);
-}
-
-static __inline int
-xdr_putint32(XDR *xdrs, int32_t *ip)
-{
- long l;
-
- l = (long)*ip;
- return xdr_putlong(xdrs, &l);
-}
-
-#define XDR_GETINT32(xdrs, int32p) xdr_getint32(xdrs, int32p)
-#define XDR_PUTINT32(xdrs, int32p) xdr_putint32(xdrs, int32p)
-
-#define XDR_GETBYTES(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
-#define xdr_getbytes(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len)
-
-#define XDR_PUTBYTES(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
-#define xdr_putbytes(xdrs, addr, len) \
- (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len)
-
-#define XDR_GETPOS(xdrs) \
- (*(xdrs)->x_ops->x_getpostn)(xdrs)
-#define xdr_getpos(xdrs) \
- (*(xdrs)->x_ops->x_getpostn)(xdrs)
-
-#define XDR_SETPOS(xdrs, pos) \
- (*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
-#define xdr_setpos(xdrs, pos) \
- (*(xdrs)->x_ops->x_setpostn)(xdrs, pos)
-
-#define XDR_INLINE(xdrs, len) \
- (*(xdrs)->x_ops->x_inline)(xdrs, len)
-#define xdr_inline(xdrs, len) \
- (*(xdrs)->x_ops->x_inline)(xdrs, len)
-
-#define XDR_DESTROY(xdrs) \
- if ((xdrs)->x_ops->x_destroy) \
- (*(xdrs)->x_ops->x_destroy)(xdrs)
-#define xdr_destroy(xdrs) \
- if ((xdrs)->x_ops->x_destroy) \
- (*(xdrs)->x_ops->x_destroy)(xdrs)
-
-#define XDR_CONTROL(xdrs, req, op) \
- if ((xdrs)->x_ops->x_control) \
- (*(xdrs)->x_ops->x_control)(xdrs, req, op)
-#define xdr_control(xdrs, req, op) XDR_CONTROL(xdrs, req, op)
-
-/*
- * Solaris strips the '_t' from these types -- not sure why.
- * But, let's be compatible.
- */
-#define xdr_rpcvers(xdrs, versp) xdr_u_int32(xdrs, versp)
-#define xdr_rpcprog(xdrs, progp) xdr_u_int32(xdrs, progp)
-#define xdr_rpcproc(xdrs, procp) xdr_u_int32(xdrs, procp)
-#define xdr_rpcprot(xdrs, protp) xdr_u_int32(xdrs, protp)
-#define xdr_rpcport(xdrs, portp) xdr_u_int32(xdrs, portp)
-
-/*
- * Support struct for discriminated unions.
- * You create an array of xdrdiscrim structures, terminated with
- * a entry with a null procedure pointer. The xdr_union routine gets
- * the discriminant value and then searches the array of structures
- * for a matching value. If a match is found the associated xdr routine
- * is called to handle that part of the union. If there is
- * no match, then a default routine may be called.
- * If there is no match and no default routine it is an error.
- */
-#define NULL_xdrproc_t ((xdrproc_t)0)
-struct xdr_discrim {
- int value;
- xdrproc_t proc;
-};
-
-/*
- * In-line routines for fast encode/decode of primitive data types.
- * Caveat emptor: these use single memory cycles to get the
- * data from the underlying buffer, and will fail to operate
- * properly if the data is not aligned. The standard way to use these
- * is to say:
- * if ((buf = XDR_INLINE(xdrs, count)) == NULL)
- * return (FALSE);
- * <<< macro calls >>>
- * where ``count'' is the number of bytes of data occupied
- * by the primitive data types.
- *
- * N.B. and frozen for all time: each data type here uses 4 bytes
- * of external representation.
- */
-#define IXDR_GET_INT32(buf) ((int32_t)__ntohl((u_int32_t)*(buf)++))
-#define IXDR_PUT_INT32(buf, v) (*(buf)++ =(int32_t)__htonl((u_int32_t)v))
-#define IXDR_GET_U_INT32(buf) ((u_int32_t)IXDR_GET_INT32(buf))
-#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_INT32((buf), ((int32_t)(v)))
-
-#define IXDR_GET_LONG(buf) ((long)__ntohl((u_int32_t)*(buf)++))
-#define IXDR_PUT_LONG(buf, v) (*(buf)++ =(int32_t)__htonl((u_int32_t)v))
-
-#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf))
-#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf))
-#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf))
-#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf))
-#define IXDR_GET_U_SHORT(buf) ((u_short)IXDR_GET_LONG(buf))
-
-#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG((buf), (v))
-#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG((buf), (v))
-#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), (v))
-#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG((buf), (v))
-#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG((buf), (v))
-
-/*
- * These are the "generic" xdr routines.
- */
-__BEGIN_DECLS
-extern bool_t xdr_void(void);
-extern bool_t xdr_int(XDR *, int *);
-extern bool_t xdr_u_int(XDR *, u_int *);
-extern bool_t xdr_long(XDR *, long *);
-extern bool_t xdr_u_long(XDR *, u_long *);
-extern bool_t xdr_short(XDR *, short *);
-extern bool_t xdr_u_short(XDR *, u_short *);
-extern bool_t xdr_int16_t(XDR *, int16_t *);
-extern bool_t xdr_u_int16_t(XDR *, u_int16_t *);
-extern bool_t xdr_int32_t(XDR *, int32_t *);
-extern bool_t xdr_u_int32_t(XDR *, u_int32_t *);
-extern bool_t xdr_int64_t(XDR *, int64_t *);
-extern bool_t xdr_u_int64_t(XDR *, u_int64_t *);
-extern bool_t xdr_bool(XDR *, bool_t *);
-extern bool_t xdr_enum(XDR *, enum_t *);
-extern bool_t xdr_array(XDR *, char **, u_int *, u_int, u_int, xdrproc_t);
-extern bool_t xdr_bytes(XDR *, char **, u_int *, u_int);
-extern bool_t xdr_opaque(XDR *, char *, u_int);
-extern bool_t xdr_string(XDR *, char **, u_int);
-extern bool_t xdr_union(XDR *, enum_t *, char *, const struct xdr_discrim *, xdrproc_t);
-extern bool_t xdr_char(XDR *, char *);
-extern bool_t xdr_u_char(XDR *, u_char *);
-extern bool_t xdr_vector(XDR *, char *, u_int, u_int, xdrproc_t);
-extern bool_t xdr_float(XDR *, float *);
-extern bool_t xdr_double(XDR *, double *);
-extern bool_t xdr_quadruple(XDR *, long double *);
-extern bool_t xdr_reference(XDR *, char **, u_int, xdrproc_t);
-extern bool_t xdr_pointer(XDR *, char **, u_int, xdrproc_t);
-extern bool_t xdr_wrapstring(XDR *, char **);
-extern void xdr_free(xdrproc_t, void *);
-extern bool_t xdr_hyper(XDR *, long long *);
-extern bool_t xdr_u_hyper(XDR *, unsigned long long *);
-extern bool_t xdr_longlong_t(XDR *, long long *);
-extern bool_t xdr_u_longlong_t(XDR *, unsigned long long *);
-__END_DECLS
-
-/*
- * Common opaque bytes objects used by many rpc protocols;
- * declared here due to commonality.
- */
-#define MAX_NETOBJ_SZ 1024
-struct netobj {
- u_int n_len;
- char *n_bytes;
-};
-typedef struct netobj netobj;
-extern bool_t xdr_netobj(XDR *, struct netobj *);
-
-/*
- * These are the public routines for the various implementations of
- * xdr streams.
- */
-__BEGIN_DECLS
-/* XDR using memory buffers */
-extern void xdrmem_create(XDR *, char *, u_int, enum xdr_op);
-
-/* XDR using stdio library */
-#ifdef _STDIO_H_
-extern void xdrstdio_create(XDR *, FILE *, enum xdr_op);
-#endif
-
-/* XDR pseudo records for tcp */
-extern void xdrrec_create(XDR *, u_int, u_int, void *,
- int (*)(void *, void *, int),
- int (*)(void *, void *, int));
-
-/* make end of xdr record */
-extern bool_t xdrrec_endofrecord(XDR *, int);
-
-/* move to beginning of next record */
-extern bool_t xdrrec_skiprecord(XDR *);
-
-/* true if no more input */
-extern bool_t xdrrec_eof(XDR *);
-extern u_int xdrrec_readbytes(XDR *, caddr_t, u_int);
-__END_DECLS
-
-#endif /* !_RPC_XDR_H */
diff --git a/newlib/libc/sys/linux/include/rune.h b/newlib/libc/sys/linux/include/rune.h
deleted file mode 100644
index d8aa03dda..000000000
--- a/newlib/libc/sys/linux/include/rune.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)rune.h 8.1 (Berkeley) 6/27/93
- * $FreeBSD: src/include/rune.h,v 1.2 2002/03/23 17:24:53 imp Exp $
- */
-
-#ifndef _RUNE_H_
-#define _RUNE_H_
-
-#include <runetype.h>
-#include <stdio.h>
-
-#define _PATH_LOCALE "/usr/share/locale"
-
-#define _INVALID_RUNE _CurrentRuneLocale->invalid_rune
-
-#define __sgetrune _CurrentRuneLocale->sgetrune
-#define __sputrune _CurrentRuneLocale->sputrune
-
-#define sgetrune(s, n, r) (*__sgetrune)((s), (n), (r))
-#define sputrune(c, s, n, r) (*__sputrune)((c), (s), (n), (r))
-
-__BEGIN_DECLS
-char *mbrune(const char *, rune_t);
-char *mbrrune(const char *, rune_t);
-char *mbmb(const char *, char *);
-long fgetrune(FILE *);
-int fputrune(rune_t, FILE *);
-int fungetrune(rune_t, FILE *);
-int setrunelocale(char *);
-void setinvalidrune(rune_t);
-__END_DECLS
-
-#endif /*! _RUNE_H_ */
diff --git a/newlib/libc/sys/linux/include/runetype.h b/newlib/libc/sys/linux/include/runetype.h
deleted file mode 100644
index a0a3a4316..000000000
--- a/newlib/libc/sys/linux/include/runetype.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)runetype.h 8.1 (Berkeley) 6/2/93
- * $FreeBSD: src/include/runetype.h,v 1.5 2002/03/26 01:35:05 bde Exp $
- */
-
-#ifndef _RUNETYPE_H_
-#define _RUNETYPE_H_
-
-#include <sys/cdefs.h>
-#include <machine/ansi.h>
-
-#ifdef _BSD_RUNE_T_
-typedef _BSD_RUNE_T_ rune_t;
-#undef _BSD_RUNE_T_
-#endif
-
-typedef int rune_t;
-
-#ifdef _BSD_SIZE_T_
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
-#endif
-
-typedef unsigned int size_t;
-
-#ifdef _BSD_WCHAR_T_
-typedef _BSD_WCHAR_T_ wchar_t;
-#undef _BSD_WCHAR_T_
-#endif
-
-#define _CACHED_RUNES (1 <<8 ) /* Must be a power of 2 */
-#define _CRMASK (~(_CACHED_RUNES - 1))
-
-/*
- * The lower 8 bits of runetype[] contain the digit value of the rune.
- */
-typedef struct {
- rune_t min; /* First rune of the range */
- rune_t max; /* Last rune (inclusive) of the range */
- rune_t map; /* What first maps to in maps */
- unsigned long *types; /* Array of types in range */
-} _RuneEntry;
-
-typedef struct {
- int nranges; /* Number of ranges stored */
- _RuneEntry *ranges; /* Pointer to the ranges */
-} _RuneRange;
-
-typedef struct {
- char magic[8]; /* Magic saying what version we are */
- char encoding[32]; /* ASCII name of this encoding */
-
- rune_t (*sgetrune)(const char *, size_t, char const **);
- int (*sputrune)(rune_t, char *, size_t, char **);
- rune_t invalid_rune;
-
- unsigned long runetype[_CACHED_RUNES];
- rune_t maplower[_CACHED_RUNES];
- rune_t mapupper[_CACHED_RUNES];
-
- /*
- * The following are to deal with Runes larger than _CACHED_RUNES - 1.
- * Their data is actually contiguous with this structure so as to make
- * it easier to read/write from/to disk.
- */
- _RuneRange runetype_ext;
- _RuneRange maplower_ext;
- _RuneRange mapupper_ext;
-
- void *variable; /* Data which depends on the encoding */
- int variable_len; /* how long that data is */
-} _RuneLocale;
-
-#define _RUNE_MAGIC_1 "RuneMagi" /* Indicates version 0 of RuneLocale */
-
-extern _RuneLocale _DefaultRuneLocale;
-extern _RuneLocale *_CurrentRuneLocale;
-
-#endif /* !_RUNETYPE_H_ */
diff --git a/newlib/libc/sys/linux/include/semaphore.h b/newlib/libc/sys/linux/include/semaphore.h
deleted file mode 100644
index 8793768a8..000000000
--- a/newlib/libc/sys/linux/include/semaphore.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <linuxthreads/semaphore.h>
diff --git a/newlib/libc/sys/linux/include/setjmp.h b/newlib/libc/sys/linux/include/setjmp.h
deleted file mode 100644
index f07dbab6d..000000000
--- a/newlib/libc/sys/linux/include/setjmp.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- setjmp.h
- stubs for future use.
-*/
-
-#ifndef _SETJMP_H_
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define _SETJMP_H_
-
-#include "_ansi.h"
-#include <machine/setjmp.h>
-#include <signal.h> /* for sigset_t and sigprocmask */
-
-typedef struct __sigjmpbuf
-{
- __jmp_buf __buf;
- int __is_mask_saved;
- sigset_t __saved_mask;
-} sigjmp_buf;
-
-typedef __jmp_buf jmp_buf;
-
-void _EXFUN(longjmp,(jmp_buf __jmpb, int __retval));
-int _EXFUN(setjmp,(jmp_buf __jmpb));
-void _EXFUN(siglongjmp,(sigjmp_buf __jmpb, int __retval));
-int _EXFUN(sigsetjmp,(sigjmp_buf __jmpb, int __savemask));
-
-/* sigsetjmp is implemented as macro using setjmp */
-
-#define sigsetjmp(__jmpb, __savemask) \
- ( __jmpb.__is_mask_saved = __savemask && \
- (sigprocmask (SIG_BLOCK, NULL, &__jmpb.__saved_mask) == 0), \
- setjmp (__jmpb.__buf) )
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _SETJMP_H_ */
-
diff --git a/newlib/libc/sys/linux/include/setlocale.h b/newlib/libc/sys/linux/include/setlocale.h
deleted file mode 100644
index 3eb769863..000000000
--- a/newlib/libc/sys/linux/include/setlocale.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*-
- * Copyright (C) 1997 by Andrey A. Chernov, Moscow, Russia.
- * 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 ``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.
- *
- * $FreeBSD: src/lib/libc/locale/setlocale.h,v 1.4 2001/12/20 18:28:52 phantom Exp $
- */
-
-#ifndef _SETLOCALE_H_
-#define _SETLOCALE_H_
-
-#define ENCODING_LEN 31
-#define CATEGORY_LEN 11
-
-extern char *_PathLocale;
-
-#endif /* !_SETLOCALE_H_ */
diff --git a/newlib/libc/sys/linux/include/stdint.h b/newlib/libc/sys/linux/include/stdint.h
deleted file mode 100644
index d1197f66c..000000000
--- a/newlib/libc/sys/linux/include/stdint.h
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (c) 2004, 2005 by
- * Ralf Corsepius, Ulm/Germany. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software
- * is freely granted, provided that this notice is preserved.
- */
-
-/*
- * @todo - Add fast<N>_t types.
- * @todo - Add support for wint_t types.
- */
-
-#ifndef _STDINT_H
-#define _STDINT_H
-
-#include <sys/types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(__GNUC__) && (__GNUC__ >= 3 ) \
- && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ > 2 )
-#define __STDINT_EXP(x) __##x##__
-#else
-#define __STDINT_EXP(x) x
-#include <limits.h>
-#endif
-
-#if __STDINT_EXP(SCHAR_MAX) == 0x7f
-#define __int8_t_defined 1
-#endif
-
-#if __int8_t_defined
-typedef signed char int_least8_t;
-typedef unsigned char uint_least8_t;
-#define __int_least8_t_defined 1
-#endif
-
-#if __STDINT_EXP(SHRT_MAX) == 0x7fff
-#define __int16_t_defined 1
-#elif __STDINT_EXP(INT_MAX) == 0x7fff
-#define __int16_t_defined 1
-#elif __STDINT_EXP(SCHAR_MAX) == 0x7fff
-#define __int16_t_defined 1
-#endif
-
-#if __int16_t_defined
-typedef int16_t int_least16_t;
-typedef uint16_t uint_least16_t;
-#define __int_least16_t_defined 1
-
-#ifndef __int_least8_t_defined
-typedef int16_t int_least8_t;
-typedef uint16_t uint_least8_t;
-#define __int_least8_t_defined 1
-#endif
-#endif
-
-#if __STDINT_EXP(INT_MAX) == 0x7fffffffL
-#define __int32_t_defined 1
-#elif __STDINT_EXP(LONG_MAX) == 0x7fffffffL
-#define __int32_t_defined 1
-#define __have_long32 1
-#elif __STDINT_EXP(SHRT_MAX) == 0x7fffffffL
-#define __int32_t_defined 1
-#elif __STDINT_EXP(SCHAR_MAX) == 0x7fffffffL
-#define __int32_t_defined 1
-#endif
-
-#if __int32_t_defined
-typedef int32_t int_least32_t;
-typedef uint32_t uint_least32_t;
-#define __int_least32_t_defined 1
-
-#ifndef __int_least8_t_defined
-typedef int32_t int_least8_t;
-typedef uint32_t uint_least8_t;
-#define __int_least8_t_defined 1
-#endif
-
-#ifndef __int_least16_t_defined
-typedef int32_t int_least16_t;
-typedef uint32_t uint_least16_t;
-#define __int_least16_t_defined 1
-#endif
-#endif
-
-#if __STDINT_EXP(LONG_MAX) > 0x7fffffff
-#define __int64_t_defined 1
-#define __have_long64 1
-#elif defined(__LONG_LONG_MAX__) && (__LONG_LONG_MAX__ > 0x7fffffff)
-#define __int64_t_defined 1
-#define __have_longlong64 1
-#elif defined(LLONG_MAX) && (LLONG_MAX > 0x7fffffff)
-#define __int64_t_defined 1
-#define __have_longlong64 1
-#elif __STDINT_EXP(INT_MAX) > 0x7fffffff
-#define __int64_t_defined 1
-#endif
-
-#if __int64_t_defined
-typedef int64_t int_least64_t;
-typedef uint64_t uint_least64_t;
-#define __int_least64_t_defined 1
-
-#ifndef __int_least8_t_defined
-typedef int64_t int_least8_t;
-typedef uint64_t uint_least8_t;
-#define __int_least8_t_defined 1
-#endif
-
-#ifndef __int_least16_t_defined
-typedef int64_t int_least16_t;
-typedef uint64_t uint_least16_t;
-#define __int_least16_t_defined 1
-#endif
-
-#ifndef __int_least32_t_defined
-typedef int64_t int_least32_t;
-typedef uint64_t uint_least32_t;
-#define __int_least32_t_defined 1
-#endif
-#endif
-
-/* Greatest-width integer types */
-/* Modern GCCs provide __INTMAX_TYPE__ */
-#if defined(__INTMAX_TYPE__)
- typedef __INTMAX_TYPE__ intmax_t;
-#elif __have_longlong64
- typedef signed long long intmax_t;
-#else
- typedef signed long intmax_t;
-#endif
-
-/* Modern GCCs provide __UINTMAX_TYPE__ */
-#if defined(__UINTMAX_TYPE__)
- typedef __UINTMAX_TYPE__ uintmax_t;
-#elif __have_longlong64
- typedef unsigned long long uintmax_t;
-#else
- typedef unsigned long uintmax_t;
-#endif
-
-/* Limits of Specified-Width Integer Types */
-
-#if __int8_t_defined
-#define INT8_MIN -128
-#define INT8_MAX 127
-#define UINT8_MAX 255
-#endif
-
-#if __int_least8_t_defined
-#define INT_LEAST8_MIN -128
-#define INT_LEAST8_MAX 127
-#define UINT_LEAST8_MAX 255
-#else
-#error required type int_least8_t missing
-#endif
-
-#if __int16_t_defined
-#define INT16_MIN -32768
-#define INT16_MAX 32767
-#define UINT16_MAX 65535
-#endif
-
-#if __int_least16_t_defined
-#define INT_LEAST16_MIN -32768
-#define INT_LEAST16_MAX 32767
-#define UINT_LEAST16_MAX 65535
-#else
-#error required type int_least16_t missing
-#endif
-
-#if __int32_t_defined
-#define INT32_MIN (-2147483647-1)
-#define INT32_MAX 2147483647
-#define UINT32_MAX 4294967295U
-#endif
-
-#if __int_least32_t_defined
-#define INT_LEAST32_MIN (-2147483647-1)
-#define INT_LEAST32_MAX 2147483647
-#define UINT_LEAST32_MAX 4294967295U
-#else
-#error required type int_least32_t missing
-#endif
-
-#if __int64_t_defined
-#ifdef __have_long64
-#define INT64_MIN (-9223372036854775807L-1L)
-#define INT64_MAX 9223372036854775807L
-#define UINT64_MAX 18446744073709551615U
-#elif defined(__have_longlong64)
-#define INT64_MIN (-9223372036854775807LL-1LL)
-#define INT64_MAX 9223372036854775807LL
-#define UINT64_MAX 18446744073709551615ULL
-#endif
-#endif
-
-#if __int_least64_t_defined
-#ifdef __have_long64
-#define INT_LEAST64_MIN (-9223372036854775807L-1L)
-#define INT_LEAST64_MAX 9223372036854775807L
-#define UINT_LEAST64_MAX 18446744073709551615U
-#elif defined(__have_longlong64)
-#define INT_LEAST64_MIN (-9223372036854775807LL-1LL)
-#define INT_LEAST64_MAX 9223372036854775807LL
-#define UINT_LEAST64_MAX 18446744073709551615ULL
-#endif
-#endif
-
-/* This must match size_t in stddef.h, currently long unsigned int */
-#define SIZE_MIN (-__STDINT_EXP(LONG_MAX) - 1L)
-#define SIZE_MAX __STDINT_EXP(LONG_MAX)
-
-/* This must match sig_atomic_t in <signal.h> (currently int) */
-#define SIG_ATOMIC_MIN (-__STDINT_EXP(INT_MAX) - 1)
-#define SIG_ATOMIC_MAX __STDINT_EXP(INT_MAX)
-
-/* This must match ptrdiff_t in <stddef.h> (currently long int) */
-#define PTRDIFF_MIN (-__STDINT_EXP(LONG_MAX) - 1L)
-#define PTRDIFF_MAX __STDINT_EXP(LONG_MAX)
-
-/** Macros for minimum-width integer constant expressions */
-#define INT8_C(x) x
-#define UINT8_C(x) x##U
-
-#define INT16_C(x) x
-#define UINT16_C(x) x##U
-
-#if __have_long32
-#define INT32_C(x) x##L
-#define UINT32_C(x) x##UL
-#else
-#define INT32_C(x) x
-#define UINT32_C(x) x##U
-#endif
-
-#if __int64_t_defined
-#if __have_longlong64
-#define INT64_C(x) x##LL
-#define UINT64_C(x) x##ULL
-#else
-#define INT64_C(x) x##L
-#define UINT64_C(x) x##UL
-#endif
-#endif
-
-/** Macros for greatest-width integer constant expression */
-#if __have_longlong64
-#define INTMAX_C(x) x##LL
-#define UINTMAX_C(x) x##ULL
-#else
-#define INTMAX_C(x) x##L
-#define UINTMAX_C(x) x##UL
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _STDINT_H */
diff --git a/newlib/libc/sys/linux/include/time.h b/newlib/libc/sys/linux/include/time.h
deleted file mode 100644
index 64ade9463..000000000
--- a/newlib/libc/sys/linux/include/time.h
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * time.h
- *
- * Struct and function declarations for dealing with time.
- */
-
-#ifndef _TIME_H_
-
-#include "_ansi.h"
-#include <sys/reent.h>
-#include <sys/linux_time.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-/* Get _CLOCKS_PER_SEC_ */
-#include <machine/time.h>
-#include <sys/types.h>
-
-/* Time Value Specification Structures, P1003.1b-1993, p. 261 */
-#ifndef _STRUCT_TIMESPEC
-#define _STRUCT_TIMESPEC
-struct timespec {
- time_t tv_sec; /* Seconds */
- long tv_nsec; /* Nanoseconds */
-};
-#endif /* !_STRUCT_TIMESPEC */
-
-#ifndef __need_timespec
-
-#define _TIME_H_ 1
-
-#ifndef _CLOCKS_PER_SEC_
-#define _CLOCKS_PER_SEC_ 1000
-#endif
-
-#define CLOCKS_PER_SEC _CLOCKS_PER_SEC_
-#define CLK_TCK CLOCKS_PER_SEC
-#define __need_size_t
-#include <stddef.h>
-
-struct tm
-{
- int tm_sec;
- int tm_min;
- int tm_hour;
- int tm_mday;
- int tm_mon;
- int tm_year;
- int tm_wday;
- int tm_yday;
- int tm_isdst;
-};
-
-#ifndef __timer_t_defined
-# define __timer_t_defined 1
-typedef __timer_t timer_t;
-#endif
-
-clock_t _EXFUN(clock, (void));
-double _EXFUN(difftime, (time_t _time2, time_t _time1));
-time_t _EXFUN(mktime, (struct tm *_timeptr));
-time_t _EXFUN(time, (time_t *_timer));
-#ifndef _REENT_ONLY
-char *_EXFUN(asctime, (const struct tm *_tblock));
-char *_EXFUN(ctime, (const time_t *_time));
-struct tm *_EXFUN(gmtime, (const time_t *_timer));
-struct tm *_EXFUN(localtime,(const time_t *_timer));
-#endif
-size_t _EXFUN(strftime, (char *_s, size_t _maxsize, const char *_fmt, const struct tm *_t));
-
-char *_EXFUN(asctime_r, (const struct tm *, char *));
-char *_EXFUN(ctime_r, (const time_t *, char *));
-struct tm *_EXFUN(gmtime_r, (const time_t *, struct tm *));
-struct tm *_EXFUN(localtime_r, (const time_t *, struct tm *));
-
-#ifndef __STRICT_ANSI__
-char *_EXFUN(strptime, (const char *, const char *, struct tm *));
-_VOID _EXFUN(tzset, (_VOID));
-_VOID _EXFUN(_tzset_r, (struct _reent *));
-
-typedef struct __tzrule_struct
-{
- char ch;
- int m;
- int n;
- int d;
- int s;
- time_t change;
- long offset; /* Match type of _timezone. */
-} __tzrule_type;
-
-typedef struct __tzinfo_struct
-{
- int __tznorth;
- int __tzyear;
- __tzrule_type __tzrule[2];
-} __tzinfo_type;
-
-__tzinfo_type *_EXFUN (__gettzinfo, (_VOID));
-
-/* getdate functions */
-
-#ifndef _REENT_ONLY
-#define getdate_err (*__getdate_err())
-int *_EXFUN(__getdate_err,(_VOID));
-
-struct tm * _EXFUN(getdate, (const char *));
-/* getdate_err is set to one of the following values to indicate the error.
- 1 the DATEMSK environment variable is null or undefined,
- 2 the template file cannot be opened for reading,
- 3 failed to get file status information,
- 4 the template file is not a regular file,
- 5 an error is encountered while reading the template file,
- 6 memory allication failed (not enough memory available),
- 7 there is no line in the template that matches the input,
- 8 invalid input specification */
-#endif /* !_REENT_ONLY */
-
-/* getdate_r returns the error code as above */
-int _EXFUN(getdate_r, (const char *, struct tm *));
-
-/* defines for the opengroup specifications Derived from Issue 1 of the SVID. */
-extern __IMPORT long _timezone;
-extern __IMPORT int _daylight;
-extern __IMPORT char *_tzname[2];
-
-/* POSIX defines the external tzname being defined in time.h */
-#ifndef tzname
-#define tzname _tzname
-#endif
-
-#endif /* !__STRICT_ANSI__ */
-
-#include <sys/features.h>
-
-#if defined(_POSIX_TIMERS)
-
-#include <signal.h>
-
-/* Clocks, P1003.1b-1993, p. 263 */
-
-int _EXFUN(clock_settime, (clockid_t clock_id, const struct timespec *tp));
-int _EXFUN(clock_gettime, (clockid_t clock_id, struct timespec *tp));
-int _EXFUN(clock_getres, (clockid_t clock_id, struct timespec *res));
-
-/* Create a Per-Process Timer, P1003.1b-1993, p. 264 */
-
-int _EXFUN(timer_create,
- (clockid_t clock_id, struct sigevent *evp, timer_t *timerid));
-
-/* Delete a Per_process Timer, P1003.1b-1993, p. 266 */
-
-int _EXFUN(timer_delete, (timer_t timerid));
-
-/* Per-Process Timers, P1003.1b-1993, p. 267 */
-
-int _EXFUN(timer_settime,
- (timer_t timerid, int flags, const struct itimerspec *value,
- struct itimerspec *ovalue));
-int _EXFUN(timer_gettime, (timer_t timerid, struct itimerspec *value));
-int _EXFUN(timer_getoverrun, (timer_t timerid));
-
-/* High Resolution Sleep, P1003.1b-1993, p. 269 */
-
-int _EXFUN(nanosleep, (const struct timespec *rqtp, struct timespec *rmtp));
-
-#endif /* _POSIX_TIMERS */
-
-/* CPU-time Clock Attributes, P1003.4b/D8, p. 54 */
-
-/* values for the clock enable attribute */
-
-#define CLOCK_ENABLED 1 /* clock is enabled, i.e. counting execution time */
-#define CLOCK_DISABLED 0 /* clock is disabled */
-
-/* values for the pthread cputime_clock_allowed attribute */
-
-#define CLOCK_ALLOWED 1 /* If a thread is created with this value a */
- /* CPU-time clock attached to that thread */
- /* shall be accessible. */
-#define CLOCK_DISALLOWED 0 /* If a thread is created with this value, the */
- /* thread shall not have a CPU-time clock */
- /* accessible. */
-
-/* Manifest Constants, P1003.1b-1993, p. 262 */
-
-#define CLOCK_REALTIME (clockid_t)1
-
-/* Flag indicating time is "absolute" with respect to the clock
- associated with a time. */
-
-#define TIMER_ABSTIME 4
-
-/* Manifest Constants, P1003.4b/D8, p. 55 */
-
-#if defined(_POSIX_CPUTIME)
-
-/* When used in a clock or timer function call, this is interpreted as
- the identifier of the CPU_time clock associated with the PROCESS
- making the function call. */
-
-#define CLOCK_PROCESS_CPUTIME_ID (clockid_t)2
-
-#endif
-
-#if defined(_POSIX_THREAD_CPUTIME)
-
-/* When used in a clock or timer function call, this is interpreted as
- the identifier of the CPU_time clock associated with the THREAD
- making the function call. */
-
-#define CLOCK_THREAD_CPUTIME_ID (clockid_t)3
-
-#endif
-
-#if defined(_POSIX_CPUTIME)
-
-/* Accessing a Process CPU-time CLock, P1003.4b/D8, p. 55 */
-
-int _EXFUN(clock_getcpuclockid, (pid_t pid, clockid_t *clock_id));
-
-#endif /* _POSIX_CPUTIME */
-
-#if defined(_POSIX_CPUTIME) || defined(_POSIX_THREAD_CPUTIME)
-
-/* CPU-time Clock Attribute Access, P1003.4b/D8, p. 56 */
-
-int _EXFUN(clock_setenable_attr, (clockid_t clock_id, int attr));
-int _EXFUN(clock_getenable_attr, (clockid_t clock_id, int *attr));
-
-#endif /* _POSIX_CPUTIME or _POSIX_THREAD_CPUTIME */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! __need_timespec */
-
-#undef __need_timespec
-
-#endif /* _TIME_H_ */
-
diff --git a/newlib/libc/sys/linux/include/un-namespace.h b/newlib/libc/sys/linux/include/un-namespace.h
deleted file mode 100644
index 01d9b8fa0..000000000
--- a/newlib/libc/sys/linux/include/un-namespace.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2001 Daniel Eischen <deischen@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 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.
- *
- * $FreeBSD: src/lib/libc/include/un-namespace.h,v 1.7 2002/03/29 22:43:42 markm Exp $
- */
-
-#ifndef _UN_NAMESPACE_H_
-#define _UN_NAMESPACE_H_
-
-#undef accept
-#undef __acl_aclcheck_fd
-#undef __acl_delete_fd
-#undef __acl_get_fd
-#undef __acl_set_fd
-#undef bind
-#undef __cap_get_fd
-#undef __cap_set_fd
-#undef close
-#undef connect
-#undef dup
-#undef dup2
-#undef execve
-#undef fcntl
-#undef flock
-#undef fstat
-#undef fstatfs
-#undef fsync
-#undef getdirentries
-#undef getlogin
-#undef getpeername
-#undef getprogname
-#undef getsockname
-#undef getsockopt
-#undef ioctl
-#undef kevent
-#undef listen
-#undef nanosleep
-#undef open
-#undef pthread_getspecific
-#undef pthread_key_create
-#undef pthread_key_delete
-#undef pthread_mutex_destroy
-#undef pthread_mutex_init
-#undef pthread_mutex_lock
-#undef pthread_mutex_trylock
-#undef pthread_mutex_unlock
-#undef pthread_mutexattr_init
-#undef pthread_mutexattr_destroy
-#undef pthread_mutexattr_settype
-#undef pthread_once
-#undef pthread_self
-#undef pthread_setspecific
-#undef read
-#undef readv
-#undef recvfrom
-#undef recvmsg
-#undef select
-#undef sendmsg
-#undef sendto
-#undef setsockopt
-#undef sigaction
-#undef sigprocmask
-#undef sigsuspend
-#undef socket
-#undef socketpair
-#undef wait4
-#undef write
-#undef writev
-
-#if 0
-#undef creat
-#undef fchflags
-#undef fchmod
-#undef fpathconf
-#undef msync
-#undef nfssvc
-#undef pause
-#undef poll
-#undef pthread_rwlock_destroy
-#undef pthread_rwlock_init
-#undef pthread_rwlock_rdlock
-#undef pthread_rwlock_tryrdlock
-#undef pthread_rwlock_trywrlock
-#undef pthread_rwlock_unlock
-#undef pthread_rwlock_wrlock
-#undef pthread_rwlockattr_init
-#undef pthread_rwlockattr_destroy
-#undef sched_yield
-#undef sendfile
-#undef shutdown
-#undef sigaltstack
-#undef sigpending
-#undef sigreturn
-#undef sigsetmask
-#undef sleep
-#undef system
-#undef tcdrain
-#undef wait
-#undef waitpid
-#endif /* 0 */
-
-#ifdef _SIGNAL_H_
-int _sigaction(int, const struct sigaction *, struct sigaction *);
-#endif
-
-#ifdef _SYS_EVENT_H_
-int _kevent(int, const struct kevent *, int, struct kevent *,
- int, const struct timespec *);
-#endif
-
-#ifdef _SYS_FCNTL_H_
-int _flock(int, int);
-#endif
-
-#undef err
-#undef warn
-
-#endif /* _UN_NAMESPACE_H_ */
diff --git a/newlib/libc/sys/linux/include/unistd.h b/newlib/libc/sys/linux/include/unistd.h
deleted file mode 100644
index e2f562a3a..000000000
--- a/newlib/libc/sys/linux/include/unistd.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* libc/sys/linux/include/unistd.h - Various standard functions */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#ifndef _NEWLIB_UNISTD_H
-#define _NEWLIB_UNISTD_H
-
-#include <sys/types.h>
-#include <sys/unistd.h>
-
-/* Declare some missing goodies */
-
-extern char *optarg;
-extern int optind, opterr, optopt;
-
-
-int readlink(const char *path, char *buf, size_t bufsiz);
-
-#endif
diff --git a/newlib/libc/sys/linux/include/wordexp.h b/newlib/libc/sys/linux/include/wordexp.h
deleted file mode 100644
index 5bc3d00f8..000000000
--- a/newlib/libc/sys/linux/include/wordexp.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software
- * is freely granted, provided that this notice is preserved.
- */
-
-#include <sys/types.h>
-
-struct _wordexp_t
-{
- size_t we_wordc; /* Count of words matched by words. */
- char **we_wordv; /* Pointer to list of expanded words. */
- size_t we_offs; /* Slots to reserve at the beginning of we_wordv. */
-};
-
-typedef struct _wordexp_t wordexp_t;
-
-#define WRDE_DOOFFS 0x0001 /* Use we_offs. */
-#define WRDE_APPEND 0x0002 /* Append to output from previous call. */
-#define WRDE_NOCMD 0x0004 /* Don't perform command substitution. */
-#define WRDE_REUSE 0x0008 /* pwordexp points to a wordexp_t struct returned from
- a previous successful call to wordexp. */
-#define WRDE_SHOWERR 0x0010 /* Print error messages to stderr. */
-#define WRDE_UNDEF 0x0020 /* Report attempt to expand undefined shell variable. */
-
-enum {
- WRDE_SUCCESS,
- WRDE_NOSPACE,
- WRDE_BADCHAR,
- WRDE_BADVAL,
- WRDE_CMDSUB,
- WRDE_SYNTAX,
- WRDE_NOSYS
-};
-
-/* Note: This implementation of wordexp requires a version of bash
- that supports the --wordexp and --protected arguments to be present
- on the system. It does not support the WRDE_UNDEF flag. */
-int wordexp(const char *, wordexp_t *, int);
-void wordfree(wordexp_t *);
diff --git a/newlib/libc/sys/linux/inode.c b/newlib/libc/sys/linux/inode.c
deleted file mode 100644
index 837dae396..000000000
--- a/newlib/libc/sys/linux/inode.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/* libc/sys/linux/inode.c - Inode-related system calls */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/utime.h>
-#include <linux/dirent.h>
-#include <machine/syscall.h>
-
-#define _LIBC 1
-#include <sys/lock.h>
-
-
-#define __NR___umask __NR_umask
-
-_syscall2(int,link,const char *,oldpath,const char *,newpath)
-_syscall1(int,unlink,const char *,pathname)
-_syscall1(int,chdir,const char *,path)
-_syscall1(int,fchdir,int,fd)
-_syscall2(int,access,const char *,filename,int,mode)
-_syscall2(int,mkdir,const char *,pathname,mode_t,mode)
-_syscall1(int,rmdir,const char *,pathname)
-_syscall1(int,chroot,const char *,path)
-_syscall2(int,stat,const char *,file_name,struct stat *,buf)
-_syscall2(int,statfs,const char *,file_name,struct statfs *,buf)
-_syscall2(int,fstat,int,filedes,struct stat *,buf)
-_syscall2(int,fstatfs,int,filedes,struct statfs *,buf)
-_syscall3(int,getdents,int,fd,struct dirent *,dirp,unsigned int,count)
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 2
-_syscall2(int,chmod,const char *,path,mode_t,mode)
-_syscall3(int,chown,const char *,path,uid_t,owner,gid_t,group)
-_syscall2(int,fchmod,int,filedes,mode_t,mode)
-_syscall3(int,lchown,const char *,path,uid_t,owner,gid_t,group)
-_syscall2(int,lstat,const char *,file_name,struct stat *,buf)
-_syscall3(int,readlink,const char *,path,char *,buf,size_t,bufsiz)
-_syscall2(int,symlink,const char *,oldpath,const char *,newpath)
-_syscall2(int,utime,const char *,filename,const struct utimbuf *,buf)
-#endif
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 3
-_syscall1(int,pipe,int *,filedes)
-#endif
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 4
-_syscall3(int,mknod,const char *,pathname,mode_t,mode,dev_t,dev)
-#endif
-
-weak_alias(__libc_statfs,__statfs)
-weak_alias(__libc_fstatfs,__fstatfs)
-
-static _syscall3(int,fchown32,int,fd,uid_t,owner,gid_t,group)
-
-int
-fchown (int fd, uid_t owner, gid_t group)
-{
- return __libc_fchown32 (fd, owner, group);
-}
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 2
-
-__LOCK_INIT(static, umask_lock);
-
-_syscall1(mode_t,__umask,mode_t,mask)
-
-mode_t
-umask (mode_t mask)
-{
- mode_t old_mask;
-
- /* we need to lock so as to not interfere with getumask */
- __lock_acquire(umask_lock);
- old_mask = __umask (mask);
- __lock_release(umask_lock);
-
- return old_mask;
-}
-
-mode_t
-getumask (void)
-{
- mode_t mask;
-
- __lock_acquire(umask_lock);
-
- mask = __umask (0);
- mask = __umask (mask);
-
- __lock_release(umask_lock);
-
- return mask;
-}
-
-#endif /* !_ELIX_LEVEL || _ELIX_LEVEL >= 2 */
diff --git a/newlib/libc/sys/linux/internal_statvfs.c b/newlib/libc/sys/linux/internal_statvfs.c
deleted file mode 100644
index 9efb7c227..000000000
--- a/newlib/libc/sys/linux/internal_statvfs.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
- /* Now fill in the fields we have information for. */
- buf->f_bsize = fsbuf.f_bsize;
- /* Linux does not support f_frsize, so set it to the full block size. */
- buf->f_frsize = fsbuf.f_bsize;
- buf->f_blocks = fsbuf.f_blocks;
- buf->f_bfree = fsbuf.f_bfree;
- buf->f_bavail = fsbuf.f_bavail;
- buf->f_files = fsbuf.f_files;
- buf->f_ffree = fsbuf.f_ffree;
- if (sizeof (buf->f_fsid) == sizeof (fsbuf.f_fsid))
- buf->f_fsid = (fsbuf.f_fsid.__val[0]
- | ((unsigned long int) fsbuf.f_fsid.__val[1]
- << (8 * (sizeof (buf->f_fsid)
- - sizeof (fsbuf.f_fsid.__val[0])))));
- else
- /* We cannot help here. The statvfs element is not large enough to
- contain both words of the statfs f_fsid field. */
- buf->f_fsid = fsbuf.f_fsid.__val[0];
-#ifdef _STATVFSBUF_F_UNUSED
- buf->__f_unused = 0;
-#endif
- buf->f_namemax = fsbuf.f_namelen;
- memset (buf->__f_spare, '\0', 6 * sizeof (int));
-
- /* What remains to do is to fill the fields f_favail and f_flag. */
-
- /* XXX I have no idea how to compute f_favail. Any idea??? */
- buf->f_favail = buf->f_ffree;
-
- /* Determining the flags is tricky. We have to read /proc/mounts or
- the /etc/mtab file and search for the entry which matches the given
- file. The way we can test for matching filesystem is using the
- device number. */
- buf->f_flag = 0;
- if (STAT (&st) >= 0)
- {
- int save_errno = errno;
- struct mntent mntbuf;
- FILE *mtab;
-
- mtab = __setmntent ("/proc/mounts", "r");
- if (mtab == NULL)
- mtab = __setmntent (_PATH_MOUNTED, "r");
-
- if (mtab != NULL)
- {
- char tmpbuf[1024];
-
- while (__getmntent_r (mtab, &mntbuf, tmpbuf, sizeof (tmpbuf)))
- {
- struct stat64 fsst;
-
- /* Find out about the device the current entry is for. */
- if (stat64 (mntbuf.mnt_dir, &fsst) >= 0
- && st.st_dev == fsst.st_dev)
- {
- /* Bingo, we found the entry for the device FD is on.
- Now interpret the option string. */
- char *cp = mntbuf.mnt_opts;
- char *opt;
-
- while ((opt = strsep (&cp, ",")) != NULL)
- if (strcmp (opt, "ro") == 0)
- buf->f_flag |= ST_RDONLY;
- else if (strcmp (opt, "nosuid") == 0)
- buf->f_flag |= ST_NOSUID;
- else if (strcmp (opt, "noexec") == 0)
- buf->f_flag |= ST_NOEXEC;
- else if (strcmp (opt, "nodev") == 0)
- buf->f_flag |= ST_NODEV;
- else if (strcmp (opt, "sync") == 0)
- buf->f_flag |= ST_SYNCHRONOUS;
- else if (strcmp (opt, "mand") == 0)
- buf->f_flag |= ST_MANDLOCK;
- else if (strcmp (opt, "noatime") == 0)
- buf->f_flag |= ST_NOATIME;
- else if (strcmp (opt, "nodiratime") == 0)
- buf->f_flag |= ST_NODIRATIME;
-
- /* We can stop looking for more entries. */
- break;
- }
- }
-
- /* Close the file. */
- __endmntent (mtab);
- }
-
- errno = (save_errno);
- }
diff --git a/newlib/libc/sys/linux/intl/Makefile.am b/newlib/libc/sys/linux/intl/Makefile.am
deleted file mode 100644
index e484b2b53..000000000
--- a/newlib/libc/sys/linux/intl/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/.. $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = \
- bindtextdom.c catgets.c dcgettext.c dgettext.c gettext.c \
- dcigettext.c dcngettext.c dngettext.c ngettext.c open_catalog.c \
- finddomain.c loadmsgcat.c localealias.c textdomain.c \
- l10nflist.c explodename.c plural.c stpcpy.c
-
-
-libintl_la_LDFLAGS = -Xcompiler -nostdlib
-
-msgcatdir = /usr/share/locale
-
-if USE_LIBTOOL
-noinst_LTLIBRARIES = libintl.la
-libintl_la_SOURCES = $(LIB_SOURCES)
-noinst_DATA = objectlist.awk.in
-else
-noinst_LIBRARIES = lib.a
-lib_a_SOURCES = $(LIB_SOURCES)
-noinst_DATA =
-endif # USE_LIBTOOL
-
-include $(srcdir)/../../../../Makefile.shared
-
-AM_CFLAGS = -DNOT_IN_libc -DHAVE_CONFIG_H -D_GNU_SOURCE -D__libc_enable_secure=1 -D'LOCALEDIR="$(msgcatdir)"' -D'LOCALE_ALIAS_PATH="$(msgcatdir)"' -DNLSPATH='"$(msgcatdir)/%L/%N:$(msgcatdir)/%L/LC_MESSAGES/%N:$(msgcatdir)/%l/%N:$(msgcatdir)/%l/LC_MESSAGES/%N:"'
-
-# shouldn't have to do the following, but if needed
-BISONFLAGS = --yacc --name-prefix=__gettext --output
-plural.c: plural.y
- $(BISON) $(BISONFLAGS) $@ $^
-
diff --git a/newlib/libc/sys/linux/intl/Makefile.in b/newlib/libc/sys/linux/intl/Makefile.in
deleted file mode 100644
index 6f222d8e2..000000000
--- a/newlib/libc/sys/linux/intl/Makefile.in
+++ /dev/null
@@ -1,384 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-AWK = @AWK@
-CC = @CC@
-CPP = @CPP@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-EXEEXT = @EXEEXT@
-EXTRA_SUBDIRS = @EXTRA_SUBDIRS@
-EXTRA_SUBLIBS = @EXTRA_SUBLIBS@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBTOOL = @LIBTOOL@
-LINUX_MACH_LIB = @LINUX_MACH_LIB@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/.. $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = bindtextdom.c catgets.c dcgettext.c dgettext.c gettext.c dcigettext.c dcngettext.c dngettext.c ngettext.c open_catalog.c finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c explodename.c plural.c stpcpy.c
-
-
-libintl_la_LDFLAGS = -Xcompiler -nostdlib
-
-msgcatdir = /usr/share/locale
-
-@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libintl.la
-@USE_LIBTOOL_TRUE@libintl_la_SOURCES = $(LIB_SOURCES)
-@USE_LIBTOOL_TRUE@noinst_DATA = objectlist.awk.in
-@USE_LIBTOOL_FALSE@noinst_DATA =
-@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
-@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
-
-AM_CFLAGS = -DNOT_IN_libc -DHAVE_CONFIG_H -D_GNU_SOURCE -D__libc_enable_secure=1 -D'LOCALEDIR="$(msgcatdir)"' -D'LOCALE_ALIAS_PATH="$(msgcatdir)"' -DNLSPATH='"$(msgcatdir)/%L/%N:$(msgcatdir)/%L/LC_MESSAGES/%N:$(msgcatdir)/%l/%N:$(msgcatdir)/%l/LC_MESSAGES/%N:"'
-
-# shouldn't have to do the following, but if needed
-BISONFLAGS = --yacc --name-prefix=__gettext --output
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-@USE_LIBTOOL_FALSE@lib_a_OBJECTS = bindtextdom.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@catgets.$(OBJEXT) dcgettext.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@dgettext.$(OBJEXT) gettext.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@dcigettext.$(OBJEXT) dcngettext.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@dngettext.$(OBJEXT) ngettext.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@open_catalog.$(OBJEXT) finddomain.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@loadmsgcat.$(OBJEXT) localealias.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@textdomain.$(OBJEXT) l10nflist.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@explodename.$(OBJEXT) plural.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@stpcpy.$(OBJEXT)
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-
-libintl_la_LIBADD =
-@USE_LIBTOOL_TRUE@libintl_la_OBJECTS = bindtextdom.lo catgets.lo \
-@USE_LIBTOOL_TRUE@dcgettext.lo dgettext.lo gettext.lo dcigettext.lo \
-@USE_LIBTOOL_TRUE@dcngettext.lo dngettext.lo ngettext.lo \
-@USE_LIBTOOL_TRUE@open_catalog.lo finddomain.lo loadmsgcat.lo \
-@USE_LIBTOOL_TRUE@localealias.lo textdomain.lo l10nflist.lo \
-@USE_LIBTOOL_TRUE@explodename.lo plural.lo stpcpy.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DATA = $(noinst_DATA)
-
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES) $(libintl_la_SOURCES)
-OBJECTS = $(lib_a_OBJECTS) $(libintl_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/../../../../Makefile.shared
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus intl/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-mostlyclean-noinstLTLIBRARIES:
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-libintl.la: $(libintl_la_OBJECTS) $(libintl_la_DEPENDENCIES)
- $(LINK) $(libintl_la_LDFLAGS) $(libintl_la_OBJECTS) $(libintl_la_LIBADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = intl
-
-distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-noinstLTLIBRARIES \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-libtool \
- clean-noinstLTLIBRARIES clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-libtool distclean-noinstLTLIBRARIES \
- distclean-tags distclean-generic clean-am
- -rm -f libtool
-
-distclean: distclean-am
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool mostlyclean-noinstLTLIBRARIES \
-distclean-noinstLTLIBRARIES clean-noinstLTLIBRARIES \
-maintainer-clean-noinstLTLIBRARIES tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-objectlist.awk.in: $(noinst_LTLIBRARIES)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
- do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
- done
-plural.c: plural.y
- $(BISON) $(BISONFLAGS) $@ $^
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/linux/intl/bindtextdom.c b/newlib/libc/sys/linux/intl/bindtextdom.c
deleted file mode 100644
index afd503050..000000000
--- a/newlib/libc/sys/linux/intl/bindtextdom.c
+++ /dev/null
@@ -1,387 +0,0 @@
-/* Implementation of the bindtextdomain(3) function
- Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#else
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# else
-void free ();
-# endif
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
-# endif
-#endif
-
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-#include "gettextP.h"
-
-#ifdef _LIBC
-/* We have to handle multi-threaded applications. */
-# include <bits/libc-lock.h>
-#else
-/* Provide dummy implementation if this is outside glibc. */
-# define __libc_rwlock_define(CLASS, NAME)
-# define __libc_rwlock_wrlock(NAME)
-# define __libc_rwlock_unlock(NAME)
-#endif
-
-/* The internal variables in the standalone libintl.a must have different
- names than the internal variables in GNU libc, otherwise programs
- using libintl.a cannot be linked statically. */
-#if !defined _LIBC
-# define _nl_default_dirname _nl_default_dirname__
-# define _nl_domain_bindings _nl_domain_bindings__
-#endif
-
-/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
-#ifndef offsetof
-# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Contains the default location of the message catalogs. */
-extern const char _nl_default_dirname[];
-
-/* List with bindings of specific domains. */
-extern struct binding *_nl_domain_bindings;
-
-/* Lock variable to protect the global data in the gettext implementation. */
-__libc_rwlock_define (extern, _nl_state_lock)
-
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define BINDTEXTDOMAIN __bindtextdomain
-# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
-# ifdef _GLIBC
-# ifndef strdup
-# define strdup(str) __strdup (str)
-# endif
-# endif
-#else
-# define BINDTEXTDOMAIN bindtextdomain__
-# define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__
-#endif
-
-/* Prototypes for local functions. */
-static void set_binding_values PARAMS ((const char *domainname,
- const char **dirnamep,
- const char **codesetp));
-
-/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
- to be used for the DOMAINNAME message catalog.
- If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
- modified, only the current value is returned.
- If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
- modified nor returned. */
-static void
-set_binding_values (domainname, dirnamep, codesetp)
- const char *domainname;
- const char **dirnamep;
- const char **codesetp;
-{
- struct binding *binding;
- int modified;
-
- /* Some sanity checks. */
- if (domainname == NULL || domainname[0] == '\0')
- {
- if (dirnamep)
- *dirnamep = NULL;
- if (codesetp)
- *codesetp = NULL;
- return;
- }
-
- __libc_rwlock_wrlock (_nl_state_lock);
-
- modified = 0;
-
- for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
- {
- int compare = strcmp (domainname, binding->domainname);
- if (compare == 0)
- /* We found it! */
- break;
- if (compare < 0)
- {
- /* It is not in the list. */
- binding = NULL;
- break;
- }
- }
-
- if (binding != NULL)
- {
- if (dirnamep)
- {
- const char *dirname = *dirnamep;
-
- if (dirname == NULL)
- /* The current binding has be to returned. */
- *dirnamep = binding->dirname;
- else
- {
- /* The domain is already bound. If the new value and the old
- one are equal we simply do nothing. Otherwise replace the
- old binding. */
- char *result = binding->dirname;
- if (strcmp (dirname, result) != 0)
- {
- if (strcmp (dirname, _nl_default_dirname) == 0)
- result = (char *) _nl_default_dirname;
- else
- {
-#if defined _LIBC || defined HAVE_STRDUP
- result = strdup (dirname);
-#else
- size_t len = strlen (dirname) + 1;
- result = (char *) malloc (len);
- if (__builtin_expect (result != NULL, 1))
- memcpy (result, dirname, len);
-#endif
- }
-
- if (__builtin_expect (result != NULL, 1))
- {
- if (binding->dirname != _nl_default_dirname)
- free (binding->dirname);
-
- binding->dirname = result;
- modified = 1;
- }
- }
- *dirnamep = result;
- }
- }
-
- if (codesetp)
- {
- const char *codeset = *codesetp;
-
- if (codeset == NULL)
- /* The current binding has be to returned. */
- *codesetp = binding->codeset;
- else
- {
- /* The domain is already bound. If the new value and the old
- one are equal we simply do nothing. Otherwise replace the
- old binding. */
- char *result = binding->codeset;
- if (result == NULL || strcmp (codeset, result) != 0)
- {
-#if defined _LIBC || defined HAVE_STRDUP
- result = strdup (codeset);
-#else
- size_t len = strlen (codeset) + 1;
- result = (char *) malloc (len);
- if (__builtin_expect (result != NULL, 1))
- memcpy (result, codeset, len);
-#endif
-
- if (__builtin_expect (result != NULL, 1))
- {
- if (binding->codeset != NULL)
- free (binding->codeset);
-
- binding->codeset = result;
- ++binding->codeset_cntr;
- modified = 1;
- }
- }
- *codesetp = result;
- }
- }
- }
- else if ((dirnamep == NULL || *dirnamep == NULL)
- && (codesetp == NULL || *codesetp == NULL))
- {
- /* Simply return the default values. */
- if (dirnamep)
- *dirnamep = _nl_default_dirname;
- if (codesetp)
- *codesetp = NULL;
- }
- else
- {
- /* We have to create a new binding. */
- size_t len = strlen (domainname) + 1;
- struct binding *new_binding =
- (struct binding *) malloc (offsetof (struct binding, domainname) + len);
-
- if (__builtin_expect (new_binding == NULL, 0))
- goto failed;
-
- memcpy (new_binding->domainname, domainname, len);
-
- if (dirnamep)
- {
- const char *dirname = *dirnamep;
-
- if (dirname == NULL)
- /* The default value. */
- dirname = _nl_default_dirname;
- else
- {
- if (strcmp (dirname, _nl_default_dirname) == 0)
- dirname = _nl_default_dirname;
- else
- {
- char *result;
-#if defined _LIBC || defined HAVE_STRDUP
- result = strdup (dirname);
- if (__builtin_expect (result == NULL, 0))
- goto failed_dirname;
-#else
- size_t len = strlen (dirname) + 1;
- result = (char *) malloc (len);
- if (__builtin_expect (result == NULL, 0))
- goto failed_dirname;
- memcpy (result, dirname, len);
-#endif
- dirname = result;
- }
- }
- *dirnamep = dirname;
- new_binding->dirname = (char *) dirname;
- }
- else
- /* The default value. */
- new_binding->dirname = (char *) _nl_default_dirname;
-
- new_binding->codeset_cntr = 0;
-
- if (codesetp)
- {
- const char *codeset = *codesetp;
-
- if (codeset != NULL)
- {
- char *result;
-
-#if defined _LIBC || defined HAVE_STRDUP
- result = strdup (codeset);
- if (__builtin_expect (result == NULL, 0))
- goto failed_codeset;
-#else
- size_t len = strlen (codeset) + 1;
- result = (char *) malloc (len);
- if (__builtin_expect (result == NULL, 0))
- goto failed_codeset;
- memcpy (result, codeset, len);
-#endif
- codeset = result;
- ++new_binding->codeset_cntr;
- }
- *codesetp = codeset;
- new_binding->codeset = (char *) codeset;
- }
- else
- new_binding->codeset = NULL;
-
- /* Now enqueue it. */
- if (_nl_domain_bindings == NULL
- || strcmp (domainname, _nl_domain_bindings->domainname) < 0)
- {
- new_binding->next = _nl_domain_bindings;
- _nl_domain_bindings = new_binding;
- }
- else
- {
- binding = _nl_domain_bindings;
- while (binding->next != NULL
- && strcmp (domainname, binding->next->domainname) > 0)
- binding = binding->next;
-
- new_binding->next = binding->next;
- binding->next = new_binding;
- }
-
- modified = 1;
-
- /* Here we deal with memory allocation failures. */
- if (0)
- {
- failed_codeset:
- if (new_binding->dirname != _nl_default_dirname)
- free (new_binding->dirname);
- failed_dirname:
- free (new_binding);
- failed:
- if (dirnamep)
- *dirnamep = NULL;
- if (codesetp)
- *codesetp = NULL;
- }
- }
-
- /* If we modified any binding, we flush the caches. */
- if (modified)
- ++_nl_msg_cat_cntr;
-
- __libc_rwlock_unlock (_nl_state_lock);
-}
-
-/* Specify that the DOMAINNAME message catalog will be found
- in DIRNAME rather than in the system locale data base. */
-char *
-BINDTEXTDOMAIN (domainname, dirname)
- const char *domainname;
- const char *dirname;
-{
- set_binding_values (domainname, &dirname, NULL);
- return (char *) dirname;
-}
-
-/* Specify the character encoding in which the messages from the
- DOMAINNAME message catalog will be returned. */
-char *
-BIND_TEXTDOMAIN_CODESET (domainname, codeset)
- const char *domainname;
- const char *codeset;
-{
- set_binding_values (domainname, NULL, &codeset);
- return (char *) codeset;
-}
-
-#ifdef _LIBC
-/* Aliases for function names in GNU C Library. */
-weak_alias (__bindtextdomain, bindtextdomain);
-weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
-#endif
diff --git a/newlib/libc/sys/linux/intl/catgets.c b/newlib/libc/sys/linux/intl/catgets.c
deleted file mode 100644
index b11cc597b..000000000
--- a/newlib/libc/sys/linux/intl/catgets.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper, <drepper@gnu.org>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <alloca.h>
-#include <errno.h>
-#include <locale.h>
-#include <nl_types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/mman.h>
-
-#include "catgetsinfo.h"
-
-
-/* Open the catalog and return a descriptor for the catalog. */
-nl_catd
-catopen (const char *cat_name, int flag)
-{
- __nl_catd result;
- const char *env_var = NULL;
- const char *nlspath = NULL;
-
- if (strchr (cat_name, '/') == NULL)
- {
- if (flag == NL_CAT_LOCALE)
- /* Use the current locale setting for LC_MESSAGES. */
- env_var = setlocale (LC_MESSAGES, NULL);
- else
- /* Use the LANG environment variable. */
- env_var = getenv ("LANG");
-
- if (env_var == NULL || *env_var == '\0'
- || (__libc_enable_secure && strchr (env_var, '/') != NULL))
- env_var = "C";
-
- nlspath = getenv ("NLSPATH");
- if (nlspath != NULL && *nlspath != '\0')
- {
- /* Append the system dependent directory. */
- size_t len = strlen (nlspath) + 1 + sizeof NLSPATH;
- char *tmp = alloca (len);
-
- __stpcpy (__stpcpy (__stpcpy (tmp, nlspath), ":"), NLSPATH);
- nlspath = tmp;
- }
- else
- nlspath = NLSPATH;
- }
-
- result = (__nl_catd) malloc (sizeof (*result));
- if (result == NULL)
- /* We cannot get enough memory. */
- return (nl_catd) -1;
-
- if (__open_catalog (cat_name, nlspath, env_var, result) != 0)
- /* Couldn't open the file. */
- return (nl_catd) -1;
-
- return (nl_catd) result;
-}
-
-
-/* Return message from message catalog. */
-char *
-catgets (nl_catd catalog_desc, int set, int message, const char *string)
-{
- __nl_catd catalog;
- size_t idx;
- size_t cnt;
-
- /* Be generous if catalog which failed to be open is used. */
- if (catalog_desc == (nl_catd) -1 || ++set <= 0 || message < 0)
- return (char *) string;
-
- catalog = (__nl_catd) catalog_desc;
-
- idx = ((set * message) % catalog->plane_size) * 3;
- cnt = 0;
- do
- {
- if (catalog->name_ptr[idx + 0] == (u_int32_t) set
- && catalog->name_ptr[idx + 1] == (u_int32_t) message)
- return (char *) &catalog->strings[catalog->name_ptr[idx + 2]];
-
- idx += catalog->plane_size * 3;
- }
- while (++cnt < catalog->plane_depth);
-
- __set_errno (ENOMSG);
- return (char *) string;
-}
-
-
-/* Return resources used for loaded message catalog. */
-int
-catclose (nl_catd catalog_desc)
-{
- __nl_catd catalog;
-
- /* Be generous if catalog which failed to be open is used. */
- if (catalog_desc == (nl_catd) -1)
- {
- __set_errno (EBADF);
- return -1;
- }
-
- catalog = (__nl_catd) catalog_desc;
-
-#ifdef _POSIX_MAPPED_FILES
- if (catalog->status == mmapped)
- __munmap ((void *) catalog->file_ptr, catalog->file_size);
- else
-#endif /* _POSIX_MAPPED_FILES */
- if (catalog->status == malloced)
- free ((void *) catalog->file_ptr);
- else
- {
- __set_errno (EBADF);
- return -1;
- }
-
- free ((void *) catalog);
-
- return 0;
-}
diff --git a/newlib/libc/sys/linux/intl/catgetsinfo.h b/newlib/libc/sys/linux/intl/catgetsinfo.h
deleted file mode 100644
index d4aa003b3..000000000
--- a/newlib/libc/sys/linux/intl/catgetsinfo.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sys/types.h>
-
-
-struct catalog_obj
-{
- u_int32_t magic;
- u_int32_t plane_size;
- u_int32_t plane_depth;
- /* This is in fact two arrays in one: always a pair of name and
- pointer into the data area. */
- u_int32_t name_ptr[0];
-};
-
-
-/* This structure will be filled after loading the catalog. */
-typedef struct catalog_info
-{
- enum { mmapped, malloced } status;
-
- size_t plane_size;
- size_t plane_depth;
- u_int32_t *name_ptr;
- const char *strings;
-
- struct catalog_obj *file_ptr;
- size_t file_size;
-} *__nl_catd;
-
-
-
-/* The magic number to signal we really have a catalog file. */
-#define CATGETS_MAGIC 0x960408de
-
-
-/* Prototypes for helper functions. */
-extern int __open_catalog (const char *cat_name, const char *nlspath,
- const char *env_var, __nl_catd __catalog);
diff --git a/newlib/libc/sys/linux/intl/config.h b/newlib/libc/sys/linux/intl/config.h
deleted file mode 100644
index 69de0abcb..000000000
--- a/newlib/libc/sys/linux/intl/config.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#define HAVE_ICONV 1
-#define HAVE_STRING_H 1
-#define HAVE_MEMPCPY 1
-#define HAVE_STRCHR 1
-#define HAVE_STRDUP 1
-#define HAVE_MMAP 1
-#define HAVE_STRTOUL 1
-#define HAVE_ALLOCA_H 1
-#define HAVE_MALLOC_H 1
-#define HAVE_STRCASECMP 1
-#define HAVE_WEAK_SYMBOLS 1
-#define HAVE_GNU_LD 1
-#define HAVE_ELF 1
-#define __ASSUME_REALTIME_SIGNALS 1
-#define ASM_GLOBAL_DIRECTIVE .global
-
-#define TEMP_FAILURE_RETRY(expression) \
- (__extension__ \
- ({ long int __result; \
- do __result = (long int) (expression); \
- while (__result == -1L && errno == EINTR); \
- __result; }))
-
-#define UINT32_C(c) c ## U
-
-#include <machine/sysdep.h>
-#include <features.h>
-
-#define _LIBC 1
diff --git a/newlib/libc/sys/linux/intl/dcgettext.c b/newlib/libc/sys/linux/intl/dcgettext.c
deleted file mode 100644
index c250da42b..000000000
--- a/newlib/libc/sys/linux/intl/dcgettext.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Implementation of the dcgettext(3) function.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define DCGETTEXT __dcgettext
-# define DCIGETTEXT __dcigettext
-#else
-# define DCGETTEXT dcgettext__
-# define DCIGETTEXT dcigettext__
-#endif
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
- locale. */
-char *
-DCGETTEXT (domainname, msgid, category)
- const char *domainname;
- const char *msgid;
- int category;
-{
- return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__dcgettext, dcgettext);
-#endif
diff --git a/newlib/libc/sys/linux/intl/dcigettext.c b/newlib/libc/sys/linux/intl/dcigettext.c
deleted file mode 100644
index de47064aa..000000000
--- a/newlib/libc/sys/linux/intl/dcigettext.c
+++ /dev/null
@@ -1,1286 +0,0 @@
-/* Implementation of the internal dcigettext function.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <newlib.h>
-
-#ifdef _MB_CAPABLE
-
-/* Tell glibc's <string.h> to provide a prototype for mempcpy().
- This must come before <config.h> because <config.h> may include
- <features.h>, and once <features.h> has been included, it's too late. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <sys/types.h>
-
-#if defined __GNUC__ && !defined C_ALLOCA
-# define alloca __builtin_alloca
-# define HAVE_ALLOCA 1
-#else
-# if (defined HAVE_ALLOCA_H || defined _LIBC) && !defined C_ALLOCA
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca
-char *alloca ();
-# endif
-# endif
-# endif
-#endif
-
-#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-#ifndef __set_errno
-# define __set_errno(val) errno = (val)
-#endif
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stddef.h>
-# include <stdlib.h>
-#else
-char *getenv ();
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# else
-void free ();
-# endif
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-#if !HAVE_STRCHR && !defined _LIBC
-# ifndef strchr
-# define strchr index
-# endif
-#endif
-
-#if defined HAVE_UNISTD_H || defined _LIBC
-# include <unistd.h>
-#endif
-
-#if defined HAVE_LOCALE_H || defined _LIBC
-# include <locale.h>
-#endif
-
-#if defined HAVE_SYS_PARAM_H || defined _LIBC
-# include <sys/param.h>
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-#include "hash-string.h"
-
-/* Thread safetyness. */
-#ifdef _LIBC
-# include <bits/libc-lock.h>
-#else
-/* Provide dummy implementation if this is outside glibc. */
-# define __libc_lock_define_initialized(CLASS, NAME)
-# define __libc_lock_lock(NAME)
-# define __libc_lock_unlock(NAME)
-# define __libc_rwlock_define_initialized(CLASS, NAME)
-# define __libc_rwlock_rdlock(NAME)
-# define __libc_rwlock_unlock(NAME)
-#endif
-
-/* Alignment of types. */
-#if defined __GNUC__ && __GNUC__ >= 2
-# define alignof(TYPE) __alignof__ (TYPE)
-#else
-# define alignof(TYPE) \
- ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
-#endif
-
-/* The internal variables in the standalone libintl.a must have different
- names than the internal variables in GNU libc, otherwise programs
- using libintl.a cannot be linked statically. */
-#if !defined _LIBC
-# define _nl_default_default_domain _nl_default_default_domain__
-# define _nl_current_default_domain _nl_current_default_domain__
-# define _nl_default_dirname _nl_default_dirname__
-# define _nl_domain_bindings _nl_domain_bindings__
-#endif
-
-/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
-#ifndef offsetof
-# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
-#endif
-
-/* @@ end of prolog @@ */
-
-#ifdef _GLIBC
-/* Rename the non ANSI C functions. This is required by the standard
- because some ANSI C functions will require linking with this object
- file and the name space must not be polluted. */
-# define getcwd __getcwd
-# ifndef stpcpy
-# define stpcpy __stpcpy
-# endif
-# define tfind __tfind
-#else
-# if !defined HAVE_GETCWD
-char *getwd ();
-# define getcwd(buf, max) getwd (buf)
-# else
-char *getcwd ();
-# endif
-# ifndef HAVE_STPCPY
-static char *stpcpy PARAMS ((char *dest, const char *src));
-# endif
-# ifndef HAVE_MEMPCPY
-static void *mempcpy PARAMS ((void *dest, const void *src, size_t n));
-# endif
-#endif
-
-/* Amount to increase buffer size by in each try. */
-#define PATH_INCR 32
-
-/* The following is from pathmax.h. */
-/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
- PATH_MAX but might cause redefinition warnings when sys/param.h is
- later included (as on MORE/BSD 4.3). */
-#if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__)
-# include <limits.h>
-#endif
-
-#ifndef _POSIX_PATH_MAX
-# define _POSIX_PATH_MAX 255
-#endif
-
-#if !defined PATH_MAX && defined _PC_PATH_MAX
-# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
-#endif
-
-/* Don't include sys/param.h if it already has been. */
-#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
-# include <sys/param.h>
-#endif
-
-#if !defined PATH_MAX && defined MAXPATHLEN
-# define PATH_MAX MAXPATHLEN
-#endif
-
-#ifndef PATH_MAX
-# define PATH_MAX _POSIX_PATH_MAX
-#endif
-
-/* XPG3 defines the result of `setlocale (category, NULL)' as:
- ``Directs `setlocale()' to query `category' and return the current
- setting of `local'.''
- However it does not specify the exact format. Neither do SUSV2 and
- ISO C 99. So we can use this feature only on selected systems (e.g.
- those using GNU C Library). */
-#ifdef _LIBC
-# define HAVE_LOCALE_NULL
-#endif
-
-/* This is the type used for the search tree where known translations
- are stored. */
-struct known_translation_t
-{
- /* Domain in which to search. */
- char *domainname;
-
- /* The category. */
- int category;
-
- /* State of the catalog counter at the point the string was found. */
- int counter;
-
- /* Catalog where the string was found. */
- struct loaded_l10nfile *domain;
-
- /* And finally the translation. */
- const char *translation;
- size_t translation_length;
-
- /* Pointer to the string in question. */
- char msgid[ZERO];
-};
-
-/* Root of the search tree with known translations. We can use this
- only if the system provides the `tsearch' function family. */
-#if defined HAVE_TSEARCH || defined _LIBC
-# include <search.h>
-
-static void *root;
-
-# ifdef _GLIBC
-# define tsearch __tsearch
-# endif
-
-/* Function to compare two entries in the table of known translations. */
-static int transcmp PARAMS ((const void *p1, const void *p2));
-static int
-transcmp (p1, p2)
- const void *p1;
- const void *p2;
-{
- const struct known_translation_t *s1;
- const struct known_translation_t *s2;
- int result;
-
- s1 = (const struct known_translation_t *) p1;
- s2 = (const struct known_translation_t *) p2;
-
- result = strcmp (s1->msgid, s2->msgid);
- if (result == 0)
- {
- result = strcmp (s1->domainname, s2->domainname);
- if (result == 0)
- /* We compare the category last (though this is the cheapest
- operation) since it is hopefully always the same (namely
- LC_MESSAGES). */
- result = s1->category - s2->category;
- }
-
- return result;
-}
-#endif
-
-/* Name of the default domain used for gettext(3) prior any call to
- textdomain(3). The default value for this is "messages". */
-const char _nl_default_default_domain[] = "messages";
-
-/* Value used as the default domain for gettext(3). */
-const char *_nl_current_default_domain = _nl_default_default_domain;
-
-/* Contains the default location of the message catalogs. */
-const char _nl_default_dirname[] = LOCALEDIR;
-
-/* List with bindings of specific domains created by bindtextdomain()
- calls. */
-struct binding *_nl_domain_bindings;
-
-/* Prototypes for local functions. */
-static char *plural_lookup PARAMS ((struct loaded_l10nfile *domain,
- unsigned long int n,
- const char *translation,
- size_t translation_len))
- internal_function;
-static unsigned long int plural_eval PARAMS ((struct expression *pexp,
- unsigned long int n))
- internal_function;
-static const char *category_to_name PARAMS ((int category)) internal_function;
-static const char *guess_category_value PARAMS ((int category,
- const char *categoryname))
- internal_function;
-
-
-/* For those loosing systems which don't have `alloca' we have to add
- some additional code emulating it. */
-#ifdef HAVE_ALLOCA
-/* Nothing has to be done. */
-# define ADD_BLOCK(list, address) /* nothing */
-# define FREE_BLOCKS(list) /* nothing */
-#else
-struct block_list
-{
- void *address;
- struct block_list *next;
-};
-# define ADD_BLOCK(list, addr) \
- do { \
- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
- /* If we cannot get a free block we cannot add the new element to \
- the list. */ \
- if (newp != NULL) { \
- newp->address = (addr); \
- newp->next = (list); \
- (list) = newp; \
- } \
- } while (0)
-# define FREE_BLOCKS(list) \
- do { \
- while (list != NULL) { \
- struct block_list *old = list; \
- list = list->next; \
- free (old); \
- } \
- } while (0)
-# undef alloca
-# define alloca(size) (malloc (size))
-#endif /* have alloca */
-
-
-#ifdef _LIBC
-/* List of blocks allocated for translations. */
-typedef struct transmem_list
-{
- struct transmem_list *next;
- char data[ZERO];
-} transmem_block_t;
-static struct transmem_list *transmem_list;
-#else
-typedef unsigned char transmem_block_t;
-#endif
-
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define DCIGETTEXT __dcigettext
-#else
-# define DCIGETTEXT dcigettext__
-#endif
-
-/* Lock variable to protect the global data in the gettext implementation. */
-__libc_rwlock_define_initialized (, _nl_state_lock)
-
-/* Checking whether the binaries runs SUID must be done and glibc provides
- easier methods therefore we make a difference here. */
-#ifdef _LIBC
-# define ENABLE_SECURE __libc_enable_secure
-# define DETERMINE_SECURE
-#else
-static int enable_secure;
-# define ENABLE_SECURE (enable_secure == 1)
-# define DETERMINE_SECURE \
- if (enable_secure == 0) \
- { \
- if (getuid () != geteuid () || getgid () != getegid ()) \
- enable_secure = 1; \
- else \
- enable_secure = -1; \
- }
-#endif
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current
- CATEGORY locale and, if PLURAL is nonzero, search over string
- depending on the plural form determined by N. */
-char *
-DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
- const char *domainname;
- const char *msgid1;
- const char *msgid2;
- int plural;
- unsigned long int n;
- int category;
-{
-#ifndef HAVE_ALLOCA
- struct block_list *block_list = NULL;
-#endif
- struct loaded_l10nfile *domain;
- struct binding *binding;
- const char *categoryname;
- const char *categoryvalue;
- char *dirname, *xdomainname;
- char *single_locale;
- char *retval;
- size_t retlen;
- int saved_errno;
-#if defined HAVE_TSEARCH || defined _LIBC
- struct known_translation_t *search;
- struct known_translation_t **foundp = NULL;
- size_t msgid_len;
-#endif
- size_t domainname_len;
-
- /* If no real MSGID is given return NULL. */
- if (msgid1 == NULL)
- return NULL;
-
- __libc_rwlock_rdlock (_nl_state_lock);
-
- /* If DOMAINNAME is NULL, we are interested in the default domain. If
- CATEGORY is not LC_MESSAGES this might not make much sense but the
- definition left this undefined. */
- if (domainname == NULL)
- domainname = _nl_current_default_domain;
-
-#if defined HAVE_TSEARCH || defined _LIBC
- msgid_len = strlen (msgid1) + 1;
-
- /* Try to find the translation among those which we found at
- some time. */
- search = (struct known_translation_t *)
- alloca (offsetof (struct known_translation_t, msgid) + msgid_len);
- memcpy (search->msgid, msgid1, msgid_len);
- search->domainname = (char *) domainname;
- search->category = category;
-
- foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
- if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
- {
- /* Now deal with plural. */
- if (plural)
- retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation,
- (*foundp)->translation_length);
- else
- retval = (char *) (*foundp)->translation;
-
- __libc_rwlock_unlock (_nl_state_lock);
- return retval;
- }
-#endif
-
- /* Preserve the `errno' value. */
- saved_errno = errno;
-
- /* See whether this is a SUID binary or not. */
- DETERMINE_SECURE;
-
- /* First find matching binding. */
- for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
- {
- int compare = strcmp (domainname, binding->domainname);
- if (compare == 0)
- /* We found it! */
- break;
- if (compare < 0)
- {
- /* It is not in the list. */
- binding = NULL;
- break;
- }
- }
-
- if (binding == NULL)
- dirname = (char *) _nl_default_dirname;
- else if (binding->dirname[0] == '/')
- dirname = binding->dirname;
- else
- {
- /* We have a relative path. Make it absolute now. */
- size_t dirname_len = strlen (binding->dirname) + 1;
- size_t path_max;
- char *ret;
-
- path_max = (unsigned int) PATH_MAX;
- path_max += 2; /* The getcwd docs say to do this. */
-
- dirname = (char *) alloca (path_max + dirname_len);
- ADD_BLOCK (block_list, dirname);
-
- __set_errno (0);
- while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE)
- {
- path_max += PATH_INCR;
- dirname = (char *) alloca (path_max + dirname_len);
- ADD_BLOCK (block_list, dirname);
- __set_errno (0);
- }
-
- if (ret == NULL)
- {
- /* We cannot get the current working directory. Don't signal an
- error but simply return the default string. */
- FREE_BLOCKS (block_list);
- __libc_rwlock_unlock (_nl_state_lock);
- __set_errno (saved_errno);
- return (plural == 0
- ? (char *) msgid1
- /* Use the Germanic plural rule. */
- : n == 1 ? (char *) msgid1 : (char *) msgid2);
- }
-
- stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
- }
-
- /* Now determine the symbolic name of CATEGORY and its value. */
- categoryname = category_to_name (category);
- categoryvalue = guess_category_value (category, categoryname);
-
- domainname_len = strlen (domainname);
- xdomainname = (char *) alloca (strlen (categoryname)
- + domainname_len + 5);
- ADD_BLOCK (block_list, xdomainname);
-
- stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
- domainname, domainname_len),
- ".mo");
-
- /* Creating working area. */
- single_locale = (char *) alloca (strlen (categoryvalue) + 1);
- ADD_BLOCK (block_list, single_locale);
-
-
- /* Search for the given string. This is a loop because we perhaps
- got an ordered list of languages to consider for the translation. */
- while (1)
- {
- /* Make CATEGORYVALUE point to the next element of the list. */
- while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
- ++categoryvalue;
- if (categoryvalue[0] == '\0')
- {
- /* The whole contents of CATEGORYVALUE has been searched but
- no valid entry has been found. We solve this situation
- by implicitly appending a "C" entry, i.e. no translation
- will take place. */
- single_locale[0] = 'C';
- single_locale[1] = '\0';
- }
- else
- {
- char *cp = single_locale;
- while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
- *cp++ = *categoryvalue++;
- *cp = '\0';
-
- /* When this is a SUID binary we must not allow accessing files
- outside the dedicated directories. */
- if (ENABLE_SECURE && strchr (single_locale, '/') != NULL)
- /* Ingore this entry. */
- continue;
- }
-
- /* If the current locale value is C (or POSIX) we don't load a
- domain. Return the MSGID. */
- if (strcmp (single_locale, "C") == 0
- || strcmp (single_locale, "POSIX") == 0)
- {
- FREE_BLOCKS (block_list);
- __libc_rwlock_unlock (_nl_state_lock);
- __set_errno (saved_errno);
- return (plural == 0
- ? (char *) msgid1
- /* Use the Germanic plural rule. */
- : n == 1 ? (char *) msgid1 : (char *) msgid2);
- }
-
-
- /* Find structure describing the message catalog matching the
- DOMAINNAME and CATEGORY. */
- domain = _nl_find_domain (dirname, single_locale, xdomainname, binding);
-
- if (domain != NULL)
- {
- retval = _nl_find_msg (domain, binding, msgid1, &retlen);
-
- if (retval == NULL)
- {
- int cnt;
-
- for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
- {
- retval = _nl_find_msg (domain->successor[cnt], binding,
- msgid1, &retlen);
-
- if (retval != NULL)
- {
- domain = domain->successor[cnt];
- break;
- }
- }
- }
-
- if (retval != NULL)
- {
- /* Found the translation of MSGID1 in domain DOMAIN:
- starting at RETVAL, RETLEN bytes. */
- FREE_BLOCKS (block_list);
- __set_errno (saved_errno);
-#if defined HAVE_TSEARCH || defined _LIBC
- if (foundp == NULL)
- {
- /* Create a new entry and add it to the search tree. */
- struct known_translation_t *newp;
-
- newp = (struct known_translation_t *)
- malloc (offsetof (struct known_translation_t, msgid)
- + msgid_len + domainname_len + 1);
- if (newp != NULL)
- {
- newp->domainname =
- mempcpy (newp->msgid, msgid1, msgid_len);
- memcpy (newp->domainname, domainname, domainname_len + 1);
- newp->category = category;
- newp->counter = _nl_msg_cat_cntr;
- newp->domain = domain;
- newp->translation = retval;
- newp->translation_length = retlen;
-
- /* Insert the entry in the search tree. */
- foundp = (struct known_translation_t **)
- tsearch (newp, &root, transcmp);
- if (foundp == NULL
- || __builtin_expect (*foundp != newp, 0))
- /* The insert failed. */
- free (newp);
- }
- }
- else
- {
- /* We can update the existing entry. */
- (*foundp)->counter = _nl_msg_cat_cntr;
- (*foundp)->domain = domain;
- (*foundp)->translation = retval;
- (*foundp)->translation_length = retlen;
- }
-#endif
- /* Now deal with plural. */
- if (plural)
- retval = plural_lookup (domain, n, retval, retlen);
-
- __libc_rwlock_unlock (_nl_state_lock);
- return retval;
- }
- }
- }
- /* NOTREACHED */
-}
-
-
-char *
-internal_function
-_nl_find_msg (domain_file, domainbinding, msgid, lengthp)
- struct loaded_l10nfile *domain_file;
- struct binding *domainbinding;
- const char *msgid;
- size_t *lengthp;
-{
- struct loaded_domain *domain;
- size_t act;
- char *result;
- size_t resultlen;
-
- if (domain_file->decided == 0)
- _nl_load_domain (domain_file, domainbinding);
-
- if (domain_file->data == NULL)
- return NULL;
-
- domain = (struct loaded_domain *) domain_file->data;
-
- /* Locate the MSGID and its translation. */
- if (domain->hash_size > 2 && domain->hash_tab != NULL)
- {
- /* Use the hashing table. */
- nls_uint32 len = strlen (msgid);
- nls_uint32 hash_val = hash_string (msgid);
- nls_uint32 idx = hash_val % domain->hash_size;
- nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
-
- while (1)
- {
- nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
-
- if (nstr == 0)
- /* Hash table entry is empty. */
- return NULL;
-
- /* Compare msgid with the original string at index nstr-1.
- We compare the lengths with >=, not ==, because plural entries
- are represented by strings with an embedded NUL. */
- if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) >= len
- && (strcmp (msgid,
- domain->data + W (domain->must_swap,
- domain->orig_tab[nstr - 1].offset))
- == 0))
- {
- act = nstr - 1;
- goto found;
- }
-
- if (idx >= domain->hash_size - incr)
- idx -= domain->hash_size - incr;
- else
- idx += incr;
- }
- /* NOTREACHED */
- }
- else
- {
- /* Try the default method: binary search in the sorted array of
- messages. */
- size_t top, bottom;
-
- bottom = 0;
- top = domain->nstrings;
- while (bottom < top)
- {
- int cmp_val;
-
- act = (bottom + top) / 2;
- cmp_val = strcmp (msgid, (domain->data
- + W (domain->must_swap,
- domain->orig_tab[act].offset)));
- if (cmp_val < 0)
- top = act;
- else if (cmp_val > 0)
- bottom = act + 1;
- else
- goto found;
- }
- /* No translation was found. */
- return NULL;
- }
-
- found:
- /* The translation was found at index ACT. If we have to convert the
- string to use a different character set, this is the time. */
- result = ((char *) domain->data
- + W (domain->must_swap, domain->trans_tab[act].offset));
- resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
-
-#if defined _LIBC || HAVE_ICONV
- if (domain->codeset_cntr
- != (domainbinding != NULL ? domainbinding->codeset_cntr : 0))
- {
- /* The domain's codeset has changed through bind_textdomain_codeset()
- since the message catalog was initialized or last accessed. We
- have to reinitialize the converter. */
- _nl_free_domain_conv (domain);
- _nl_init_domain_conv (domain_file, domain, domainbinding);
- }
-
- if (
-# ifdef _GLIBC
- domain->conv != (__gconv_t) -1
-# else
-# if HAVE_ICONV
- domain->conv != (iconv_t) -1
-# endif
-# endif
- )
- {
- /* We are supposed to do a conversion. First allocate an
- appropriate table with the same structure as the table
- of translations in the file, where we can put the pointers
- to the converted strings in.
- There is a slight complication with plural entries. They
- are represented by consecutive NUL terminated strings. We
- handle this case by converting RESULTLEN bytes, including
- NULs. */
-
- if (domain->conv_tab == NULL
- && ((domain->conv_tab = (char **) calloc (domain->nstrings,
- sizeof (char *)))
- == NULL))
- /* Mark that we didn't succeed allocating a table. */
- domain->conv_tab = (char **) -1;
-
- if (__builtin_expect (domain->conv_tab == (char **) -1, 0))
- /* Nothing we can do, no more memory. */
- goto converted;
-
- if (domain->conv_tab[act] == NULL)
- {
- /* We haven't used this string so far, so it is not
- translated yet. Do this now. */
- /* We use a bit more efficient memory handling.
- We allocate always larger blocks which get used over
- time. This is faster than many small allocations. */
- __libc_lock_define_initialized (static, lock)
-# define INITIAL_BLOCK_SIZE 4080
- static unsigned char *freemem;
- static size_t freemem_size;
-
- const unsigned char *inbuf;
- unsigned char *outbuf;
- int malloc_count;
-# ifndef _LIBC
- transmem_block_t *transmem_list = NULL;
-# endif
-
- __libc_lock_lock (lock);
-
- inbuf = (const unsigned char *) result;
- outbuf = freemem + sizeof (size_t);
-
- malloc_count = 0;
- while (1)
- {
- transmem_block_t *newmem;
-# ifdef _GLIBC
- size_t non_reversible;
- int res;
-
- if (freemem_size < sizeof (size_t))
- goto resize_freemem;
-
- res = __gconv (domain->conv,
- &inbuf, inbuf + resultlen,
- &outbuf,
- outbuf + freemem_size - sizeof (size_t),
- &non_reversible);
-
- if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT)
- break;
-
- if (res != __GCONV_FULL_OUTPUT)
- {
- __libc_lock_unlock (lock);
- goto converted;
- }
-
- inbuf = result;
-# else
-# if HAVE_ICONV
- const char *inptr = (const char *) inbuf;
- size_t inleft = resultlen;
- char *outptr = (char *) outbuf;
- size_t outleft;
-
- if (freemem_size < sizeof (size_t))
- goto resize_freemem;
-
- outleft = freemem_size - sizeof (size_t);
- if (iconv (domain->conv,
- (char **) &inptr, &inleft,
- &outptr, &outleft)
- != (size_t) (-1))
- {
- outbuf = (unsigned char *) outptr;
- break;
- }
- if (errno != E2BIG)
- {
- __libc_lock_unlock (lock);
- goto converted;
- }
-# endif
-# endif
-
- resize_freemem:
- /* We must allocate a new buffer or resize the old one. */
- if (malloc_count > 0)
- {
- ++malloc_count;
- freemem_size = malloc_count * INITIAL_BLOCK_SIZE;
- newmem = (transmem_block_t *) realloc (transmem_list,
- freemem_size);
-# ifdef _LIBC
- if (newmem != NULL)
- transmem_list = transmem_list->next;
- else
- {
- struct transmem_list *old = transmem_list;
-
- transmem_list = transmem_list->next;
- free (old);
- }
-# endif
- }
- else
- {
- malloc_count = 1;
- freemem_size = INITIAL_BLOCK_SIZE;
- newmem = (transmem_block_t *) malloc (freemem_size);
- }
- if (__builtin_expect (newmem == NULL, 0))
- {
- freemem = NULL;
- freemem_size = 0;
- __libc_lock_unlock (lock);
- goto converted;
- }
-
-# ifdef _LIBC
- /* Add the block to the list of blocks we have to free
- at some point. */
- newmem->next = transmem_list;
- transmem_list = newmem;
-
- freemem = newmem->data;
- freemem_size -= offsetof (struct transmem_list, data);
-# else
- transmem_list = newmem;
- freemem = newmem;
-# endif
-
- outbuf = freemem + sizeof (size_t);
- }
-
- /* We have now in our buffer a converted string. Put this
- into the table of conversions. */
- *(size_t *) freemem = outbuf - freemem - sizeof (size_t);
- domain->conv_tab[act] = (char *) freemem;
- /* Shrink freemem, but keep it aligned. */
- freemem_size -= outbuf - freemem;
- freemem = outbuf;
- freemem += freemem_size & (alignof (size_t) - 1);
- freemem_size = freemem_size & ~ (alignof (size_t) - 1);
-
- __libc_lock_unlock (lock);
- }
-
- /* Now domain->conv_tab[act] contains the translation of all
- the plural variants. */
- result = domain->conv_tab[act] + sizeof (size_t);
- resultlen = *(size_t *) domain->conv_tab[act];
- }
-
- converted:
- /* The result string is converted. */
-
-#endif /* _LIBC || HAVE_ICONV */
-
- *lengthp = resultlen;
- return result;
-}
-
-
-/* Look up a plural variant. */
-static char *
-internal_function
-plural_lookup (domain, n, translation, translation_len)
- struct loaded_l10nfile *domain;
- unsigned long int n;
- const char *translation;
- size_t translation_len;
-{
- struct loaded_domain *domaindata = (struct loaded_domain *) domain->data;
- unsigned long int index;
- const char *p;
-
- index = plural_eval (domaindata->plural, n);
- if (index >= domaindata->nplurals)
- /* This should never happen. It means the plural expression and the
- given maximum value do not match. */
- index = 0;
-
- /* Skip INDEX strings at TRANSLATION. */
- p = translation;
- while (index-- > 0)
- {
-#ifdef _GLIBC
- p = __rawmemchr (p, '\0');
-#else
- p = strchr (p, '\0');
-#endif
- /* And skip over the NUL byte. */
- p++;
-
- if (p >= translation + translation_len)
- /* This should never happen. It means the plural expression
- evaluated to a value larger than the number of variants
- available for MSGID1. */
- return (char *) translation;
- }
- return (char *) p;
-}
-
-
-/* Function to evaluate the plural expression and return an index value. */
-static unsigned long int
-internal_function
-plural_eval (pexp, n)
- struct expression *pexp;
- unsigned long int n;
-{
- switch (pexp->nargs)
- {
- case 0:
- switch (pexp->operation)
- {
- case var:
- return n;
- case num:
- return pexp->val.num;
- default:
- break;
- }
- /* NOTREACHED */
- break;
- case 1:
- {
- /* pexp->operation must be lnot. */
- unsigned long int arg = plural_eval (pexp->val.args[0], n);
- return ! arg;
- }
- case 2:
- {
- unsigned long int leftarg = plural_eval (pexp->val.args[0], n);
- if (pexp->operation == lor)
- return leftarg || plural_eval (pexp->val.args[1], n);
- else if (pexp->operation == land)
- return leftarg && plural_eval (pexp->val.args[1], n);
- else
- {
- unsigned long int rightarg = plural_eval (pexp->val.args[1], n);
-
- switch (pexp->operation)
- {
- case mult:
- return leftarg * rightarg;
- case divide:
- return leftarg / rightarg;
- case module:
- return leftarg % rightarg;
- case plus:
- return leftarg + rightarg;
- case minus:
- return leftarg - rightarg;
- case less_than:
- return leftarg < rightarg;
- case greater_than:
- return leftarg > rightarg;
- case less_or_equal:
- return leftarg <= rightarg;
- case greater_or_equal:
- return leftarg >= rightarg;
- case equal:
- return leftarg == rightarg;
- case not_equal:
- return leftarg != rightarg;
- default:
- break;
- }
- }
- /* NOTREACHED */
- break;
- }
- case 3:
- {
- /* pexp->operation must be qmop. */
- unsigned long int boolarg = plural_eval (pexp->val.args[0], n);
- return plural_eval (pexp->val.args[boolarg ? 1 : 2], n);
- }
- }
- /* NOTREACHED */
- return 0;
-}
-
-
-/* Return string representation of locale CATEGORY. */
-static const char *
-internal_function
-category_to_name (category)
- int category;
-{
- const char *retval;
-
- switch (category)
- {
-#ifdef LC_COLLATE
- case LC_COLLATE:
- retval = "LC_COLLATE";
- break;
-#endif
-#ifdef LC_CTYPE
- case LC_CTYPE:
- retval = "LC_CTYPE";
- break;
-#endif
-#ifdef LC_MONETARY
- case LC_MONETARY:
- retval = "LC_MONETARY";
- break;
-#endif
-#ifdef LC_NUMERIC
- case LC_NUMERIC:
- retval = "LC_NUMERIC";
- break;
-#endif
-#ifdef LC_TIME
- case LC_TIME:
- retval = "LC_TIME";
- break;
-#endif
-#ifdef LC_MESSAGES
- case LC_MESSAGES:
- retval = "LC_MESSAGES";
- break;
-#endif
-#ifdef LC_RESPONSE
- case LC_RESPONSE:
- retval = "LC_RESPONSE";
- break;
-#endif
-#ifdef LC_ALL
- case LC_ALL:
- /* This might not make sense but is perhaps better than any other
- value. */
- retval = "LC_ALL";
- break;
-#endif
- default:
- /* If you have a better idea for a default value let me know. */
- retval = "LC_XXX";
- }
-
- return retval;
-}
-
-/* Guess value of current locale from value of the environment variables. */
-static const char *
-internal_function
-guess_category_value (category, categoryname)
- int category;
- const char *categoryname;
-{
- const char *language;
- const char *retval;
-
- /* The highest priority value is the `LANGUAGE' environment
- variable. But we don't use the value if the currently selected
- locale is the C locale. This is a GNU extension. */
- language = getenv ("LANGUAGE");
- if (language != NULL && language[0] == '\0')
- language = NULL;
-
- /* We have to proceed with the POSIX methods of looking to `LC_ALL',
- `LC_xxx', and `LANG'. On some systems this can be done by the
- `setlocale' function itself. */
-#if defined _LIBC || (defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL)
- retval = setlocale (category, NULL);
-#else
- /* Setting of LC_ALL overwrites all other. */
- retval = getenv ("LC_ALL");
- if (retval == NULL || retval[0] == '\0')
- {
- /* Next comes the name of the desired category. */
- retval = getenv (categoryname);
- if (retval == NULL || retval[0] == '\0')
- {
- /* Last possibility is the LANG environment variable. */
- retval = getenv ("LANG");
- if (retval == NULL || retval[0] == '\0')
- /* We use C as the default domain. POSIX says this is
- implementation defined. */
- return "C";
- }
- }
-#endif
-
- return language != NULL && strcmp (retval, "C") != 0 ? language : retval;
-}
-
-/* @@ begin of epilog @@ */
-
-/* We don't want libintl.a to depend on any other library. So we
- avoid the non-standard function stpcpy. In GNU C Library this
- function is available, though. Also allow the symbol HAVE_STPCPY
- to be defined. */
-#if !_GLIBC && !HAVE_STPCPY
-static char *
-stpcpy (dest, src)
- char *dest;
- const char *src;
-{
- while ((*dest++ = *src++) != '\0')
- /* Do nothing. */ ;
- return dest - 1;
-}
-#endif
-
-#if !_LIBC && !HAVE_MEMPCPY
-static void *
-mempcpy (dest, src, n)
- void *dest;
- const void *src;
- size_t n;
-{
- return (void *) ((char *) memcpy (dest, src, n) + n);
-}
-#endif
-
-
-#ifdef _LIBC
-/* If we want to free all resources we have to do some work at
- program's end. */
-static void __attribute__ ((unused))
-free_mem (void)
-{
- void *old;
-
- while (_nl_domain_bindings != NULL)
- {
- struct binding *oldp = _nl_domain_bindings;
- _nl_domain_bindings = _nl_domain_bindings->next;
- if (oldp->dirname != _nl_default_dirname)
- /* Yes, this is a pointer comparison. */
- free (oldp->dirname);
- free (oldp->codeset);
- free (oldp);
- }
-
- if (_nl_current_default_domain != _nl_default_default_domain)
- /* Yes, again a pointer comparison. */
- free ((char *) _nl_current_default_domain);
-
- /* Remove the search tree with the known translations. */
- tdestroy (root, free);
- root = NULL;
-
- while (transmem_list != NULL)
- {
- old = transmem_list;
- transmem_list = transmem_list->next;
- free (old);
- }
-}
-
-text_set_element (__libc_subfreeres, free_mem);
-#endif
-#else /* !_MB_CAPABLE */
-
-#include <machine/weakalias.h>
-#include <sys/lock.h>
-
-/* Name of the default domain used for gettext(3) prior any call to
- textdomain(3). The default value for this is "messages". */
-const char _nl_default_default_domain[] = "messages";
-
-/* Value used as the default domain for gettext(3). */
-const char *_nl_current_default_domain = _nl_default_default_domain;
-
-/* Contains the default location of the message catalogs. */
-const char _nl_default_dirname[] = LOCALEDIR;
-
-/* List with bindings of specific domains created by bindtextdomain()
- calls. */
-struct binding *_nl_domain_bindings;
-
-/* this is actually usually defined in loadmsgcat.c, but we do it
- here so we don't need the other file at all. */
-int _nl_msg_cat_cntr;
-
-/* Lock variable to protect the global data in the gettext implementation. */
-__libc_rwlock_define_initialized (, _nl_state_lock)
-
-
-/* For non-MB-capable programs, the locale must be "C", so we can
- avoid excess program size by short-circuiting this function. */
-char *
-__dcigettext (domainname, msgid1, msgid2, plural, n, category)
- const char *domainname;
- const char *msgid1;
- const char *msgid2;
- int plural;
- unsigned long int n;
- int category;
-{
- if (plural && n > 1)
- return msgid2;
- return msgid1;
-}
-weak_alias(__dcigettext, dcigettext)
-
-#endif /* !_MB_CAPABLE */
diff --git a/newlib/libc/sys/linux/intl/dcngettext.c b/newlib/libc/sys/linux/intl/dcngettext.c
deleted file mode 100644
index 068d5fa3f..000000000
--- a/newlib/libc/sys/linux/intl/dcngettext.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Implementation of the dcngettext(3) function.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define DCNGETTEXT __dcngettext
-# define DCIGETTEXT __dcigettext
-#else
-# define DCNGETTEXT dcngettext__
-# define DCIGETTEXT dcigettext__
-#endif
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
- locale. */
-char *
-DCNGETTEXT (domainname, msgid1, msgid2, n, category)
- const char *domainname;
- const char *msgid1;
- const char *msgid2;
- unsigned long int n;
- int category;
-{
- return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__dcngettext, dcngettext);
-#endif
diff --git a/newlib/libc/sys/linux/intl/dgettext.c b/newlib/libc/sys/linux/intl/dgettext.c
deleted file mode 100644
index d0e5ed2b2..000000000
--- a/newlib/libc/sys/linux/intl/dgettext.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Implementation of the dgettext(3) function.
- Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined HAVE_LOCALE_H || defined _LIBC
-# include <locale.h>
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define DGETTEXT __dgettext
-# define DCGETTEXT __dcgettext
-#else
-# define DGETTEXT dgettext__
-# define DCGETTEXT dcgettext__
-#endif
-
-/* Look up MSGID in the DOMAINNAME message catalog of the current
- LC_MESSAGES locale. */
-char *
-DGETTEXT (domainname, msgid)
- const char *domainname;
- const char *msgid;
-{
- return DCGETTEXT (domainname, msgid, LC_MESSAGES);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__dgettext, dgettext);
-#endif
diff --git a/newlib/libc/sys/linux/intl/dngettext.c b/newlib/libc/sys/linux/intl/dngettext.c
deleted file mode 100644
index a620024b6..000000000
--- a/newlib/libc/sys/linux/intl/dngettext.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Implementation of the dngettext(3) function.
- Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined HAVE_LOCALE_H || defined _LIBC
-# include <locale.h>
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define DNGETTEXT __dngettext
-# define DCNGETTEXT __dcngettext
-#else
-# define DNGETTEXT dngettext__
-# define DCNGETTEXT dcngettext__
-#endif
-
-/* Look up MSGID in the DOMAINNAME message catalog of the current
- LC_MESSAGES locale and skip message according to the plural form. */
-char *
-DNGETTEXT (domainname, msgid1, msgid2, n)
- const char *domainname;
- const char *msgid1;
- const char *msgid2;
- unsigned long int n;
-{
- return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__dngettext, dngettext);
-#endif
diff --git a/newlib/libc/sys/linux/intl/explodename.c b/newlib/libc/sys/linux/intl/explodename.c
deleted file mode 100644
index 6effd3347..000000000
--- a/newlib/libc/sys/linux/intl/explodename.c
+++ /dev/null
@@ -1,206 +0,0 @@
-#include <newlib.h>
-
-#ifdef _MB_CAPABLE
-
-/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-#include <sys/types.h>
-
-#include "loadinfo.h"
-
-/* On some strange systems still no definition of NULL is found. Sigh! */
-#ifndef NULL
-# if defined __STDC__ && __STDC__
-# define NULL ((void *) 0)
-# else
-# define NULL 0
-# endif
-#endif
-
-/* @@ end of prolog @@ */
-
-char *
-_nl_find_language (name)
- const char *name;
-{
- while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
- && name[0] != '+' && name[0] != ',')
- ++name;
-
- return (char *) name;
-}
-
-
-int
-_nl_explode_name (name, language, modifier, territory, codeset,
- normalized_codeset, special, sponsor, revision)
- char *name;
- const char **language;
- const char **modifier;
- const char **territory;
- const char **codeset;
- const char **normalized_codeset;
- const char **special;
- const char **sponsor;
- const char **revision;
-{
- enum { undecided, xpg, cen } syntax;
- char *cp;
- int mask;
-
- *modifier = NULL;
- *territory = NULL;
- *codeset = NULL;
- *normalized_codeset = NULL;
- *special = NULL;
- *sponsor = NULL;
- *revision = NULL;
-
- /* Now we determine the single parts of the locale name. First
- look for the language. Termination symbols are `_' and `@' if
- we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
- mask = 0;
- syntax = undecided;
- *language = cp = name;
- cp = _nl_find_language (*language);
-
- if (*language == cp)
- /* This does not make sense: language has to be specified. Use
- this entry as it is without exploding. Perhaps it is an alias. */
- cp = strchr (*language, '\0');
- else if (cp[0] == '_')
- {
- /* Next is the territory. */
- cp[0] = '\0';
- *territory = ++cp;
-
- while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
- && cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
- ++cp;
-
- mask |= TERRITORY;
-
- if (cp[0] == '.')
- {
- /* Next is the codeset. */
- syntax = xpg;
- cp[0] = '\0';
- *codeset = ++cp;
-
- while (cp[0] != '\0' && cp[0] != '@')
- ++cp;
-
- mask |= XPG_CODESET;
-
- if (*codeset != cp && (*codeset)[0] != '\0')
- {
- *normalized_codeset = _nl_normalize_codeset (*codeset,
- cp - *codeset);
- if (strcmp (*codeset, *normalized_codeset) == 0)
- free ((char *) *normalized_codeset);
- else
- mask |= XPG_NORM_CODESET;
- }
- }
- }
-
- if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
- {
- /* Next is the modifier. */
- syntax = cp[0] == '@' ? xpg : cen;
- cp[0] = '\0';
- *modifier = ++cp;
-
- while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
- && cp[0] != ',' && cp[0] != '_')
- ++cp;
-
- mask |= XPG_MODIFIER | CEN_AUDIENCE;
- }
-
- if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
- {
- syntax = cen;
-
- if (cp[0] == '+')
- {
- /* Next is special application (CEN syntax). */
- cp[0] = '\0';
- *special = ++cp;
-
- while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
- ++cp;
-
- mask |= CEN_SPECIAL;
- }
-
- if (cp[0] == ',')
- {
- /* Next is sponsor (CEN syntax). */
- cp[0] = '\0';
- *sponsor = ++cp;
-
- while (cp[0] != '\0' && cp[0] != '_')
- ++cp;
-
- mask |= CEN_SPONSOR;
- }
-
- if (cp[0] == '_')
- {
- /* Next is revision (CEN syntax). */
- cp[0] = '\0';
- *revision = ++cp;
-
- mask |= CEN_REVISION;
- }
- }
-
- /* For CEN syntax values it might be important to have the
- separator character in the file name, not for XPG syntax. */
- if (syntax == xpg)
- {
- if (*territory != NULL && (*territory)[0] == '\0')
- mask &= ~TERRITORY;
-
- if (*codeset != NULL && (*codeset)[0] == '\0')
- mask &= ~XPG_CODESET;
-
- if (*modifier != NULL && (*modifier)[0] == '\0')
- mask &= ~XPG_MODIFIER;
- }
-
- return mask;
-}
-
-#endif /* _MB_CAPABLE */
diff --git a/newlib/libc/sys/linux/intl/finddomain.c b/newlib/libc/sys/linux/intl/finddomain.c
deleted file mode 100644
index 4f27790be..000000000
--- a/newlib/libc/sys/linux/intl/finddomain.c
+++ /dev/null
@@ -1,222 +0,0 @@
-#include <newlib.h>
-
-#ifdef _MB_CAPABLE
-
-/* Handle list of needed message catalogs
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Ulrich Drepper <drepper@gnu.org>, 1995.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <sys/types.h>
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#else
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# else
-void free ();
-# endif
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
-# endif
-#endif
-
-#if defined HAVE_UNISTD_H || defined _LIBC
-# include <unistd.h>
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-/* @@ end of prolog @@ */
-/* List of already loaded domains. */
-static struct loaded_l10nfile *_nl_loaded_domains;
-
-
-/* Return a data structure describing the message catalog described by
- the DOMAINNAME and CATEGORY parameters with respect to the currently
- established bindings. */
-struct loaded_l10nfile *
-internal_function
-_nl_find_domain (dirname, locale, domainname, domainbinding)
- const char *dirname;
- char *locale;
- const char *domainname;
- struct binding *domainbinding;
-{
- struct loaded_l10nfile *retval;
- const char *language;
- const char *modifier;
- const char *territory;
- const char *codeset;
- const char *normalized_codeset;
- const char *special;
- const char *sponsor;
- const char *revision;
- const char *alias_value;
- int mask;
-
- /* LOCALE can consist of up to four recognized parts for the XPG syntax:
-
- language[_territory[.codeset]][@modifier]
-
- and six parts for the CEN syntax:
-
- language[_territory][+audience][+special][,[sponsor][_revision]]
-
- Beside the first part all of them are allowed to be missing. If
- the full specified locale is not found, the less specific one are
- looked for. The various parts will be stripped off according to
- the following order:
- (1) revision
- (2) sponsor
- (3) special
- (4) codeset
- (5) normalized codeset
- (6) territory
- (7) audience/modifier
- */
-
- /* If we have already tested for this locale entry there has to
- be one data set in the list of loaded domains. */
- retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
- strlen (dirname) + 1, 0, locale, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, domainname, 0);
- if (retval != NULL)
- {
- /* We know something about this locale. */
- int cnt;
-
- if (retval->decided == 0)
- _nl_load_domain (retval, domainbinding);
-
- if (retval->data != NULL)
- return retval;
-
- for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
- {
- if (retval->successor[cnt]->decided == 0)
- _nl_load_domain (retval->successor[cnt], domainbinding);
-
- if (retval->successor[cnt]->data != NULL)
- break;
- }
- return cnt >= 0 ? retval : NULL;
- /* NOTREACHED */
- }
-
- /* See whether the locale value is an alias. If yes its value
- *overwrites* the alias name. No test for the original value is
- done. */
- alias_value = _nl_expand_alias (locale);
- if (alias_value != NULL)
- {
-#if defined _LIBC || defined HAVE_STRDUP
- locale = strdup (alias_value);
- if (locale == NULL)
- return NULL;
-#else
- size_t len = strlen (alias_value) + 1;
- locale = (char *) malloc (len);
- if (locale == NULL)
- return NULL;
-
- memcpy (locale, alias_value, len);
-#endif
- }
-
- /* Now we determine the single parts of the locale name. First
- look for the language. Termination symbols are `_' and `@' if
- we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
- mask = _nl_explode_name (locale, &language, &modifier, &territory,
- &codeset, &normalized_codeset, &special,
- &sponsor, &revision);
-
- /* Create all possible locale entries which might be interested in
- generalization. */
- retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
- strlen (dirname) + 1, mask, language, territory,
- codeset, normalized_codeset, modifier, special,
- sponsor, revision, domainname, 1);
- if (retval == NULL)
- /* This means we are out of core. */
- return NULL;
-
- if (retval->decided == 0)
- _nl_load_domain (retval, domainbinding);
- if (retval->data == NULL)
- {
- int cnt;
- for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
- {
- if (retval->successor[cnt]->decided == 0)
- _nl_load_domain (retval->successor[cnt], domainbinding);
- if (retval->successor[cnt]->data != NULL)
- break;
- }
- }
-
- /* The room for an alias was dynamically allocated. Free it now. */
- if (alias_value != NULL)
- free (locale);
-
- /* The space for normalized_codeset is dynamically allocated. Free it. */
- if (mask & XPG_NORM_CODESET)
- free ((void *) normalized_codeset);
-
- return retval;
-}
-
-
-#ifdef _LIBC
-static void __attribute__ ((unused))
-free_mem (void)
-{
- struct loaded_l10nfile *runp = _nl_loaded_domains;
-
- while (runp != NULL)
- {
- struct loaded_l10nfile *here = runp;
- if (runp->data != NULL)
- _nl_unload_domain ((struct loaded_domain *) runp->data);
- runp = runp->next;
- free ((char *) here->filename);
- free (here);
- }
-}
-
-text_set_element (__libc_subfreeres, free_mem);
-#endif
-
-#endif /* _MB_CAPABLE */
diff --git a/newlib/libc/sys/linux/intl/gettext.c b/newlib/libc/sys/linux/intl/gettext.c
deleted file mode 100644
index 2b107d558..000000000
--- a/newlib/libc/sys/linux/intl/gettext.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Implementation of gettext(3) function.
- Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef _LIBC
-# define __need_NULL
-# include <stddef.h>
-#else
-# ifdef STDC_HEADERS
-# include <stdlib.h> /* Just for NULL. */
-# else
-# ifdef HAVE_STRING_H
-# include <string.h>
-# else
-# define NULL ((void *) 0)
-# endif
-# endif
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-#include <locale.h>
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define GETTEXT __gettext
-# define DCGETTEXT __dcgettext
-#else
-# define GETTEXT gettext__
-# define DCGETTEXT dcgettext__
-#endif
-
-/* Look up MSGID in the current default message catalog for the current
- LC_MESSAGES locale. If not found, returns MSGID itself (the default
- text). */
-char *
-GETTEXT (msgid)
- const char *msgid;
-{
- return DCGETTEXT (NULL, msgid, LC_MESSAGES);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__gettext, gettext);
-#endif
diff --git a/newlib/libc/sys/linux/intl/gettext.h b/newlib/libc/sys/linux/intl/gettext.h
deleted file mode 100644
index c427d89d1..000000000
--- a/newlib/libc/sys/linux/intl/gettext.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Internal header for GNU gettext internationalization functions.
- Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _GETTEXT_H
-#define _GETTEXT_H 1
-
-#if HAVE_LIMITS_H || _LIBC
-# include <limits.h>
-#endif
-
-/* @@ end of prolog @@ */
-
-/* The magic number of the GNU message catalog format. */
-#define _MAGIC 0x950412de
-#define _MAGIC_SWAPPED 0xde120495
-
-/* Revision number of the currently used .mo (binary) file format. */
-#define MO_REVISION_NUMBER 0
-
-/* The following contortions are an attempt to use the C preprocessor
- to determine an unsigned integral type that is 32 bits wide. An
- alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
- as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
- when cross-compiling. */
-
-#if __STDC__
-# define UINT_MAX_32_BITS 4294967295U
-#else
-# define UINT_MAX_32_BITS 0xFFFFFFFF
-#endif
-
-/* If UINT_MAX isn't defined, assume it's a 32-bit type.
- This should be valid for all systems GNU cares about because
- that doesn't include 16-bit systems, and only modern systems
- (that certainly have <limits.h>) have 64+-bit integral types. */
-
-#ifndef UINT_MAX
-# define UINT_MAX UINT_MAX_32_BITS
-#endif
-
-#if UINT_MAX == UINT_MAX_32_BITS
-typedef unsigned nls_uint32;
-#else
-# if USHRT_MAX == UINT_MAX_32_BITS
-typedef unsigned short nls_uint32;
-# else
-# if ULONG_MAX == UINT_MAX_32_BITS
-typedef unsigned long nls_uint32;
-# else
- /* The following line is intended to throw an error. Using #error is
- not portable enough. */
- "Cannot determine unsigned 32-bit data type."
-# endif
-# endif
-#endif
-
-
-/* Header for binary .mo file format. */
-struct mo_file_header
-{
- /* The magic number. */
- nls_uint32 magic;
- /* The revision number of the file format. */
- nls_uint32 revision;
- /* The number of strings pairs. */
- nls_uint32 nstrings;
- /* Offset of table with start offsets of original strings. */
- nls_uint32 orig_tab_offset;
- /* Offset of table with start offsets of translation strings. */
- nls_uint32 trans_tab_offset;
- /* Size of hashing table. */
- nls_uint32 hash_tab_size;
- /* Offset of first hashing entry. */
- nls_uint32 hash_tab_offset;
-};
-
-struct string_desc
-{
- /* Length of addressed string. */
- nls_uint32 length;
- /* Offset of string in file. */
- nls_uint32 offset;
-};
-
-/* @@ begin of epilog @@ */
-
-#endif /* gettext.h */
diff --git a/newlib/libc/sys/linux/intl/gettextP.h b/newlib/libc/sys/linux/intl/gettextP.h
deleted file mode 100644
index 6c9035bc1..000000000
--- a/newlib/libc/sys/linux/intl/gettextP.h
+++ /dev/null
@@ -1,256 +0,0 @@
-/* Header describing internals of libintl library.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _GETTEXTP_H
-#define _GETTEXTP_H
-
-#include <stddef.h> /* Get size_t. */
-#include <libc-symbols.h>
-
-#ifdef _GLIBC
-# include "gconv_int.h"
-#else
-# if HAVE_ICONV
-# include <iconv.h>
-# endif
-#endif
-
-#include "loadinfo.h"
-
-#include "gettext.h" /* Get nls_uint32. */
-
-/* @@ end of prolog @@ */
-
-#ifndef PARAMS
-# if __STDC__
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif
-#endif
-
-#ifndef internal_function
-# define internal_function
-#endif
-
-/* Tell the compiler when a conditional or integer expression is
- almost always true or almost always false. */
-#ifndef HAVE_BUILTIN_EXPECT
-# define __builtin_expect(expr, val) (expr)
-#endif
-
-#ifndef W
-# define W(flag, data) ((flag) ? SWAP (data) : (data))
-#endif
-
-
-#ifdef _LIBC
-# include <byteswap.h>
-# define SWAP(i) bswap_32 (i)
-#else
-static nls_uint32 SWAP PARAMS ((nls_uint32 i));
-
-static inline nls_uint32
-SWAP (i)
- nls_uint32 i;
-{
- return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
-}
-#endif
-
-
-/* This is the representation of the expressions to determine the
- plural form. */
-struct expression
-{
- int nargs; /* Number of arguments. */
- enum operator
- {
- /* Without arguments: */
- var, /* The variable "n". */
- num, /* Decimal number. */
- /* Unary operators: */
- lnot, /* Logical NOT. */
- /* Binary operators: */
- mult, /* Multiplication. */
- divide, /* Division. */
- module, /* Module operation. */
- plus, /* Addition. */
- minus, /* Subtraction. */
- less_than, /* Comparison. */
- greater_than, /* Comparison. */
- less_or_equal, /* Comparison. */
- greater_or_equal, /* Comparison. */
- equal, /* Comparision for equality. */
- not_equal, /* Comparision for inequality. */
- land, /* Logical AND. */
- lor, /* Logical OR. */
- /* Ternary operators: */
- qmop /* Question mark operator. */
- } operation;
- union
- {
- unsigned long int num; /* Number value for `num'. */
- struct expression *args[3]; /* Up to three arguments. */
- } val;
-};
-
-/* This is the data structure to pass information to the parser and get
- the result in a thread-safe way. */
-struct parse_args
-{
- const char *cp;
- struct expression *res;
-};
-
-
-/* The representation of an opened message catalog. */
-struct loaded_domain
-{
- const char *data;
- int use_mmap;
- size_t mmap_size;
- int must_swap;
- nls_uint32 nstrings;
- struct string_desc *orig_tab;
- struct string_desc *trans_tab;
- nls_uint32 hash_size;
- nls_uint32 *hash_tab;
- int codeset_cntr;
-#ifdef _GLIBC
- __gconv_t conv;
-#else
-# if HAVE_ICONV
- iconv_t conv;
-# endif
-#endif
- char **conv_tab;
-
- struct expression *plural;
- unsigned long int nplurals;
-};
-
-/* We want to allocate a string at the end of the struct. But ISO C
- doesn't allow zero sized arrays. */
-#ifdef __GNUC__
-# define ZERO 0
-#else
-# define ZERO 1
-#endif
-
-/* A set of settings bound to a message domain. Used to store settings
- from bindtextdomain() and bind_textdomain_codeset(). */
-struct binding
-{
- struct binding *next;
- char *dirname;
- int codeset_cntr; /* Incremented each time codeset changes. */
- char *codeset;
- char domainname[ZERO];
-};
-
-/* A counter which is incremented each time some previous translations
- become invalid.
- This variable is part of the external ABI of the GNU libintl. */
-extern int _nl_msg_cat_cntr;
-
-struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
- char *__locale,
- const char *__domainname,
- struct binding *__domainbinding))
- internal_function;
-void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain,
- struct binding *__domainbinding))
- internal_function;
-void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
- internal_function;
-const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file,
- struct loaded_domain *__domain,
- struct binding *__domainbinding))
- internal_function;
-void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain))
- internal_function;
-
-char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file,
- struct binding *domainbinding,
- const char *msgid, size_t *lengthp))
- internal_function;
-
-#ifdef _LIBC
-extern char *__gettext PARAMS ((const char *__msgid));
-extern char *__dgettext PARAMS ((const char *__domainname,
- const char *__msgid));
-extern char *__dcgettext PARAMS ((const char *__domainname,
- const char *__msgid, int __category));
-extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
- unsigned long int __n));
-extern char *__dngettext PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- unsigned long int n));
-extern char *__dcngettext PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- unsigned long int __n, int __category));
-extern char *__dcigettext PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- int __plural, unsigned long int __n,
- int __category));
-extern char *__textdomain PARAMS ((const char *__domainname));
-extern char *__bindtextdomain PARAMS ((const char *__domainname,
- const char *__dirname));
-extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname,
- const char *__codeset));
-#else
-extern char *gettext__ PARAMS ((const char *__msgid));
-extern char *dgettext__ PARAMS ((const char *__domainname,
- const char *__msgid));
-extern char *dcgettext__ PARAMS ((const char *__domainname,
- const char *__msgid, int __category));
-extern char *ngettext__ PARAMS ((const char *__msgid1, const char *__msgid2,
- unsigned long int __n));
-extern char *dngettext__ PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- unsigned long int __n));
-extern char *dcngettext__ PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- unsigned long int __n, int __category));
-extern char *dcigettext__ PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- int __plural, unsigned long int __n,
- int __category));
-extern char *textdomain__ PARAMS ((const char *__domainname));
-extern char *bindtextdomain__ PARAMS ((const char *__domainname,
- const char *__dirname));
-extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname,
- const char *__codeset));
-#endif
-
-#ifdef _LIBC
-extern void __gettext_free_exp PARAMS ((struct expression *exp))
- internal_function;
-extern int __gettextparse PARAMS ((void *arg));
-#else
-extern void gettext_free_exp__ PARAMS ((struct expression *exp))
- internal_function;
-extern int gettextparse__ PARAMS ((void *arg));
-#endif
-
-/* @@ begin of epilog @@ */
-
-#endif /* gettextP.h */
diff --git a/newlib/libc/sys/linux/intl/hash-string.h b/newlib/libc/sys/linux/intl/hash-string.h
deleted file mode 100644
index ae4bcfb3e..000000000
--- a/newlib/libc/sys/linux/intl/hash-string.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Implements a string hashing function.
- Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* @@ end of prolog @@ */
-
-#ifndef PARAMS
-# if __STDC__
-# define PARAMS(Args) Args
-# else
-# define PARAMS(Args) ()
-# endif
-#endif
-
-/* We assume to have `unsigned long int' value with at least 32 bits. */
-#define HASHWORDBITS 32
-
-
-/* Defines the so called `hashpjw' function by P.J. Weinberger
- [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
- 1986, 1987 Bell Telephone Laboratories, Inc.] */
-static unsigned long int hash_string PARAMS ((const char *__str_param));
-
-static inline unsigned long int
-hash_string (str_param)
- const char *str_param;
-{
- unsigned long int hval, g;
- const char *str = str_param;
-
- /* Compute the hash value for the given string. */
- hval = 0;
- while (*str != '\0')
- {
- hval <<= 4;
- hval += (unsigned long int) *str++;
- g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
- if (g != 0)
- {
- hval ^= g >> (HASHWORDBITS - 8);
- hval ^= g;
- }
- }
- return hval;
-}
diff --git a/newlib/libc/sys/linux/intl/l10nflist.c b/newlib/libc/sys/linux/intl/l10nflist.c
deleted file mode 100644
index 564df73fb..000000000
--- a/newlib/libc/sys/linux/intl/l10nflist.c
+++ /dev/null
@@ -1,423 +0,0 @@
-#include <newlib.h>
-
-#ifdef _MB_CAPABLE
-
-/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Tell glibc's <string.h> to provide a prototype for stpcpy().
- This must come before <config.h> because <config.h> may include
- <features.h>, and once <features.h> has been included, it's too late. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
-# endif
-#endif
-#if !HAVE_STRCHR && !defined _LIBC
-# ifndef strchr
-# define strchr index
-# endif
-#endif
-
-#if defined _LIBC || defined HAVE_ARGZ_H
-# include <argz.h>
-#endif
-#include <ctype.h>
-#include <sys/types.h>
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#endif
-
-#include "loadinfo.h"
-
-/* On some strange systems still no definition of NULL is found. Sigh! */
-#ifndef NULL
-# if defined __STDC__ && __STDC__
-# define NULL ((void *) 0)
-# else
-# define NULL 0
-# endif
-#endif
-
-/* @@ end of prolog @@ */
-
-#ifdef _GLIBC
-/* Rename the non ANSI C functions. This is required by the standard
- because some ANSI C functions will require linking with this object
- file and the name space must not be polluted. */
-# ifndef stpcpy
-# define stpcpy(dest, src) __stpcpy(dest, src)
-# endif
-#else
-# ifndef HAVE_STPCPY
-static char *stpcpy PARAMS ((char *dest, const char *src));
-# endif
-#endif
-
-/* Define function which are usually not available. */
-
-#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
-/* Returns the number of strings in ARGZ. */
-static size_t argz_count__ PARAMS ((const char *argz, size_t len));
-
-static size_t
-argz_count__ (argz, len)
- const char *argz;
- size_t len;
-{
- size_t count = 0;
- while (len > 0)
- {
- size_t part_len = strlen (argz);
- argz += part_len + 1;
- len -= part_len + 1;
- count++;
- }
- return count;
-}
-# undef __argz_count
-# define __argz_count(argz, len) argz_count__ (argz, len)
-#endif /* !_LIBC && !HAVE___ARGZ_COUNT */
-
-#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
-/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
- except the last into the character SEP. */
-static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
-
-static void
-argz_stringify__ (argz, len, sep)
- char *argz;
- size_t len;
- int sep;
-{
- while (len > 0)
- {
- size_t part_len = strlen (argz);
- argz += part_len;
- len -= part_len + 1;
- if (len > 0)
- *argz++ = sep;
- }
-}
-# undef __argz_stringify
-# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
-#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
-
-#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
-static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
- const char *entry));
-
-static char *
-argz_next__ (argz, argz_len, entry)
- char *argz;
- size_t argz_len;
- const char *entry;
-{
- if (entry)
- {
- if (entry < argz + argz_len)
- entry = strchr (entry, '\0') + 1;
-
- return entry >= argz + argz_len ? NULL : (char *) entry;
- }
- else
- if (argz_len > 0)
- return argz;
- else
- return 0;
-}
-# undef __argz_next
-# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
-#endif /* !_LIBC && !HAVE___ARGZ_NEXT */
-
-
-/* Return number of bits set in X. */
-static int pop PARAMS ((int x));
-
-static inline int
-pop (x)
- int x;
-{
- /* We assume that no more than 16 bits are used. */
- x = ((x & ~0x5555) >> 1) + (x & 0x5555);
- x = ((x & ~0x3333) >> 2) + (x & 0x3333);
- x = ((x >> 4) + x) & 0x0f0f;
- x = ((x >> 8) + x) & 0xff;
-
- return x;
-}
-
-
-struct loaded_l10nfile *
-_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
- territory, codeset, normalized_codeset, modifier, special,
- sponsor, revision, filename, do_allocate)
- struct loaded_l10nfile **l10nfile_list;
- const char *dirlist;
- size_t dirlist_len;
- int mask;
- const char *language;
- const char *territory;
- const char *codeset;
- const char *normalized_codeset;
- const char *modifier;
- const char *special;
- const char *sponsor;
- const char *revision;
- const char *filename;
- int do_allocate;
-{
- char *abs_filename;
- struct loaded_l10nfile *last = NULL;
- struct loaded_l10nfile *retval;
- char *cp;
- size_t entries;
- int cnt;
-
- /* Allocate room for the full file name. */
- abs_filename = (char *) malloc (dirlist_len
- + strlen (language)
- + ((mask & TERRITORY) != 0
- ? strlen (territory) + 1 : 0)
- + ((mask & XPG_CODESET) != 0
- ? strlen (codeset) + 1 : 0)
- + ((mask & XPG_NORM_CODESET) != 0
- ? strlen (normalized_codeset) + 1 : 0)
- + (((mask & XPG_MODIFIER) != 0
- || (mask & CEN_AUDIENCE) != 0)
- ? strlen (modifier) + 1 : 0)
- + ((mask & CEN_SPECIAL) != 0
- ? strlen (special) + 1 : 0)
- + (((mask & CEN_SPONSOR) != 0
- || (mask & CEN_REVISION) != 0)
- ? (1 + ((mask & CEN_SPONSOR) != 0
- ? strlen (sponsor) + 1 : 0)
- + ((mask & CEN_REVISION) != 0
- ? strlen (revision) + 1 : 0)) : 0)
- + 1 + strlen (filename) + 1);
-
- if (abs_filename == NULL)
- return NULL;
-
- retval = NULL;
- last = NULL;
-
- /* Construct file name. */
- memcpy (abs_filename, dirlist, dirlist_len);
- argz_stringify (abs_filename, dirlist_len, ':');
- cp = abs_filename + (dirlist_len - 1);
- *cp++ = '/';
- cp = stpcpy (cp, language);
-
- if ((mask & TERRITORY) != 0)
- {
- *cp++ = '_';
- cp = stpcpy (cp, territory);
- }
- if ((mask & XPG_CODESET) != 0)
- {
- *cp++ = '.';
- cp = stpcpy (cp, codeset);
- }
- if ((mask & XPG_NORM_CODESET) != 0)
- {
- *cp++ = '.';
- cp = stpcpy (cp, normalized_codeset);
- }
- if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
- {
- /* This component can be part of both syntaces but has different
- leading characters. For CEN we use `+', else `@'. */
- *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
- cp = stpcpy (cp, modifier);
- }
- if ((mask & CEN_SPECIAL) != 0)
- {
- *cp++ = '+';
- cp = stpcpy (cp, special);
- }
- if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
- {
- *cp++ = ',';
- if ((mask & CEN_SPONSOR) != 0)
- cp = stpcpy (cp, sponsor);
- if ((mask & CEN_REVISION) != 0)
- {
- *cp++ = '_';
- cp = stpcpy (cp, revision);
- }
- }
-
- *cp++ = '/';
- stpcpy (cp, filename);
-
- /* Look in list of already loaded domains whether it is already
- available. */
- last = NULL;
- for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
- if (retval->filename != NULL)
- {
- int compare = strcmp (retval->filename, abs_filename);
- if (compare == 0)
- /* We found it! */
- break;
- if (compare < 0)
- {
- /* It's not in the list. */
- retval = NULL;
- break;
- }
-
- last = retval;
- }
-
- if (retval != NULL || do_allocate == 0)
- {
- free (abs_filename);
- return retval;
- }
-
- retval = (struct loaded_l10nfile *)
- malloc (sizeof (*retval) + (argz_count (dirlist, dirlist_len)
- * (1 << pop (mask))
- * sizeof (struct loaded_l10nfile *)));
- if (retval == NULL)
- return NULL;
-
- retval->filename = abs_filename;
- retval->decided = (argz_count (dirlist, dirlist_len) != 1
- || ((mask & XPG_CODESET) != 0
- && (mask & XPG_NORM_CODESET) != 0));
- retval->data = NULL;
-
- if (last == NULL)
- {
- retval->next = *l10nfile_list;
- *l10nfile_list = retval;
- }
- else
- {
- retval->next = last->next;
- last->next = retval;
- }
-
- entries = 0;
- /* If the DIRLIST is a real list the RETVAL entry corresponds not to
- a real file. So we have to use the DIRLIST separation mechanism
- of the inner loop. */
- cnt = argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
- for (; cnt >= 0; --cnt)
- if ((cnt & ~mask) == 0
- && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
- && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
- {
- /* Iterate over all elements of the DIRLIST. */
- char *dir = NULL;
-
- while ((dir = argz_next ((char *) dirlist, dirlist_len, dir))
- != NULL)
- retval->successor[entries++]
- = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
- language, territory, codeset,
- normalized_codeset, modifier, special,
- sponsor, revision, filename, 1);
- }
- retval->successor[entries] = NULL;
-
- return retval;
-}
-
-/* Normalize codeset name. There is no standard for the codeset
- names. Normalization allows the user to use any of the common
- names. The return value is dynamically allocated and has to be
- freed by the caller. */
-const char *
-_nl_normalize_codeset (codeset, name_len)
- const char *codeset;
- size_t name_len;
-{
- int len = 0;
- int only_digit = 1;
- char *retval;
- char *wp;
- size_t cnt;
-
- for (cnt = 0; cnt < name_len; ++cnt)
- if (isalnum (codeset[cnt]))
- {
- ++len;
-
- if (isalpha (codeset[cnt]))
- only_digit = 0;
- }
-
- retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
-
- if (retval != NULL)
- {
- if (only_digit)
- wp = stpcpy (retval, "iso");
- else
- wp = retval;
-
- for (cnt = 0; cnt < name_len; ++cnt)
- if (isalpha (codeset[cnt]))
- *wp++ = tolower (codeset[cnt]);
- else if (isdigit (codeset[cnt]))
- *wp++ = codeset[cnt];
-
- *wp = '\0';
- }
-
- return (const char *) retval;
-}
-
-
-/* @@ begin of epilog @@ */
-
-/* We don't want libintl.a to depend on any other library. So we
- avoid the non-standard function stpcpy. In GNU C Library this
- function is available, though. Also allow the symbol HAVE_STPCPY
- to be defined. */
-#if !_GLIBC && !HAVE_STPCPY
-static char *
-stpcpy (dest, src)
- char *dest;
- const char *src;
-{
- while ((*dest++ = *src++) != '\0')
- /* Do nothing. */ ;
- return dest - 1;
-}
-#endif
-
-#endif /* _MB_CAPABLE */
diff --git a/newlib/libc/sys/linux/intl/loadinfo.h b/newlib/libc/sys/linux/intl/loadinfo.h
deleted file mode 100644
index 1de6cfd24..000000000
--- a/newlib/libc/sys/linux/intl/loadinfo.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _LOADINFO_H
-#define _LOADINFO_H 1
-
-#ifndef PARAMS
-# if __STDC__
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif
-#endif
-
-#ifndef internal_function
-# define internal_function
-#endif
-
-/* Tell the compiler when a conditional or integer expression is
- almost always true or almost always false. */
-#ifndef HAVE_BUILTIN_EXPECT
-# define __builtin_expect(expr, val) (expr)
-#endif
-
-/* Encoding of locale name parts. */
-#define CEN_REVISION 1
-#define CEN_SPONSOR 2
-#define CEN_SPECIAL 4
-#define XPG_NORM_CODESET 8
-#define XPG_CODESET 16
-#define TERRITORY 32
-#define CEN_AUDIENCE 64
-#define XPG_MODIFIER 128
-
-#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
-#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
-
-
-struct loaded_l10nfile
-{
- const char *filename;
- int decided;
-
- const void *data;
-
- struct loaded_l10nfile *next;
- struct loaded_l10nfile *successor[1];
-};
-
-
-/* Normalize codeset name. There is no standard for the codeset
- names. Normalization allows the user to use any of the common
- names. The return value is dynamically allocated and has to be
- freed by the caller. */
-extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
- size_t name_len));
-
-extern struct loaded_l10nfile *
-_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
- const char *dirlist, size_t dirlist_len, int mask,
- const char *language, const char *territory,
- const char *codeset,
- const char *normalized_codeset,
- const char *modifier, const char *special,
- const char *sponsor, const char *revision,
- const char *filename, int do_allocate));
-
-
-extern const char *_nl_expand_alias PARAMS ((const char *name));
-
-/* normalized_codeset is dynamically allocated and has to be freed by
- the caller. */
-extern int _nl_explode_name PARAMS ((char *name, const char **language,
- const char **modifier,
- const char **territory,
- const char **codeset,
- const char **normalized_codeset,
- const char **special,
- const char **sponsor,
- const char **revision));
-
-extern char *_nl_find_language PARAMS ((const char *name));
-
-#endif /* loadinfo.h */
diff --git a/newlib/libc/sys/linux/intl/loadmsgcat.c b/newlib/libc/sys/linux/intl/loadmsgcat.c
deleted file mode 100644
index b5f722e3b..000000000
--- a/newlib/libc/sys/linux/intl/loadmsgcat.c
+++ /dev/null
@@ -1,564 +0,0 @@
-#include <newlib.h>
-
-#ifdef _MB_CAPABLE
-
-/* Load needed message catalogs.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Tell glibc's <string.h> to provide a prototype for mempcpy().
- This must come before <config.h> because <config.h> may include
- <features.h>, and once <features.h> has been included, it's too late. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-# define HAVE_ALLOCA 1
-#else
-# if defined HAVE_ALLOCA_H || defined _LIBC
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca
-char *alloca ();
-# endif
-# endif
-# endif
-#endif
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-
-#if defined HAVE_UNISTD_H || defined _LIBC
-# include <unistd.h>
-#endif
-
-#ifdef _LIBC
-# include <langinfo.h>
-# include <locale.h>
-#endif
-
-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
- || (defined _LIBC && defined _POSIX_MAPPED_FILES)
-# include <sys/mman.h>
-# undef HAVE_MMAP
-# define HAVE_MMAP 1
-#else
-# undef HAVE_MMAP
-#endif
-
-#include "gettext.h"
-#include "gettextP.h"
-
-#ifdef _GLIBC
-# include "localeinfo.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-#ifdef _LIBC
-/* Rename the non ISO C functions. This is required by the standard
- because some ISO C functions will require linking with this object
- file and the name space must not be polluted. */
-# define open __open
-# define close __close
-# define read __read
-# define mmap __mmap
-# define munmap __munmap
-#endif
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define PLURAL_PARSE __gettextparse
-#else
-# define PLURAL_PARSE gettextparse__
-#endif
-
-/* For those losing systems which don't have `alloca' we have to add
- some additional code emulating it. */
-#ifdef HAVE_ALLOCA
-# define freea(p) /* nothing */
-#else
-# define alloca(n) malloc (n)
-# define freea(p) free (p)
-#endif
-
-/* We need a sign, whether a new catalog was loaded, which can be associated
- with all translations. This is important if the translations are
- cached by one of GCC's features. */
-int _nl_msg_cat_cntr;
-
-#if defined __GNUC__ \
- || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
-
-/* These structs are the constant expression for the germanic plural
- form determination. It represents the expression "n != 1". */
-static const struct expression plvar =
-{
- .nargs = 0,
- .operation = var,
-};
-static const struct expression plone =
-{
- .nargs = 0,
- .operation = num,
- .val =
- {
- .num = 1
- }
-};
-static struct expression germanic_plural =
-{
- .nargs = 2,
- .operation = not_equal,
- .val =
- {
- .args =
- {
- [0] = (struct expression *) &plvar,
- [1] = (struct expression *) &plone
- }
- }
-};
-
-# define INIT_GERMANIC_PLURAL()
-
-#else
-
-/* For compilers without support for ISO C 99 struct/union initializers:
- Initialization at run-time. */
-
-static struct expression plvar;
-static struct expression plone;
-static struct expression germanic_plural;
-
-static void
-init_germanic_plural ()
-{
- if (plone.val.num == 0)
- {
- plvar.nargs = 0;
- plvar.operation = var;
-
- plone.nargs = 0;
- plone.operation = num;
- plone.val.num = 1;
-
- germanic_plural.nargs = 2;
- germanic_plural.operation = not_equal;
- germanic_plural.val.args[0] = &plvar;
- germanic_plural.val.args[1] = &plone;
- }
-}
-
-# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
-
-#endif
-
-
-/* Initialize the codeset dependent parts of an opened message catalog.
- Return the header entry. */
-const char *
-internal_function
-_nl_init_domain_conv (domain_file, domain, domainbinding)
- struct loaded_l10nfile *domain_file;
- struct loaded_domain *domain;
- struct binding *domainbinding;
-{
- /* Find out about the character set the file is encoded with.
- This can be found (in textual form) in the entry "". If this
- entry does not exist or if this does not contain the `charset='
- information, we will assume the charset matches the one the
- current locale and we don't have to perform any conversion. */
- char *nullentry;
- size_t nullentrylen;
-
- /* Preinitialize fields, to avoid recursion during _nl_find_msg. */
- domain->codeset_cntr =
- (domainbinding != NULL ? domainbinding->codeset_cntr : 0);
-#ifdef _GLIBC
- domain->conv = (__gconv_t) -1;
-#else
-# if HAVE_ICONV
- domain->conv = (iconv_t) -1;
-# endif
-#endif
- domain->conv_tab = NULL;
-
- /* Get the header entry. */
- nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
-
- if (nullentry != NULL)
- {
-#if defined _LIBC || HAVE_ICONV
- const char *charsetstr;
-
- charsetstr = strstr (nullentry, "charset=");
- if (charsetstr != NULL)
- {
- size_t len;
- char *charset;
- const char *outcharset;
-
- charsetstr += strlen ("charset=");
- len = strcspn (charsetstr, " \t\n");
-
- charset = (char *) alloca (len + 1);
-# if defined _LIBC || HAVE_MEMPCPY
- *((char *) mempcpy (charset, charsetstr, len)) = '\0';
-# else
- memcpy (charset, charsetstr, len);
- charset[len] = '\0';
-# endif
-
- /* The output charset should normally be determined by the
- locale. But sometimes the locale is not used or not correctly
- set up, so we provide a possibility for the user to override
- this. Moreover, the value specified through
- bind_textdomain_codeset overrides both. */
- if (domainbinding != NULL && domainbinding->codeset != NULL)
- outcharset = domainbinding->codeset;
- else
- {
- outcharset = getenv ("OUTPUT_CHARSET");
- if (outcharset == NULL || outcharset[0] == '\0')
- {
-# ifdef _GLIBC
- outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
-# else
-# if HAVE_ICONV
- extern const char *__locale_charset (void);
- outcharset = __locale_charset ();
-# endif
-# endif
- }
- }
-
-# ifdef _GLIBC
- /* We always want to use transliteration. */
- outcharset = norm_add_slashes (outcharset, "TRANSLIT");
- charset = norm_add_slashes (charset, NULL);
- if (__gconv_open (outcharset, charset, &domain->conv,
- GCONV_AVOID_NOCONV)
- != __GCONV_OK)
- domain->conv = (__gconv_t) -1;
-# else
-# if HAVE_ICONV
- /* When using GNU libiconv, we want to use transliteration. */
-# if _LIBICONV_VERSION
- len = strlen (outcharset);
- {
- char *tmp = (char *) alloca (len + 10 + 1);
- memcpy (tmp, outcharset, len);
- memcpy (tmp + len, "//TRANSLIT", 10 + 1);
- outcharset = tmp;
- }
-# endif
- domain->conv = iconv_open (outcharset, charset);
-# if _LIBICONV_VERSION
- freea (outcharset);
-# endif
-# endif
-# endif
-
- freea (charset);
- }
-#endif /* _LIBC || HAVE_ICONV */
- }
-
- return nullentry;
-}
-
-/* Frees the codeset dependent parts of an opened message catalog. */
-void
-internal_function
-_nl_free_domain_conv (domain)
- struct loaded_domain *domain;
-{
- if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
- free (domain->conv_tab);
-
-#ifdef _GLIBC
- if (domain->conv != (__gconv_t) -1)
- __gconv_close (domain->conv);
-#else
-# if HAVE_ICONV
- if (domain->conv != (iconv_t) -1)
- iconv_close (domain->conv);
-# endif
-#endif
-}
-
-/* Load the message catalogs specified by FILENAME. If it is no valid
- message catalog do nothing. */
-void
-internal_function
-_nl_load_domain (domain_file, domainbinding)
- struct loaded_l10nfile *domain_file;
- struct binding *domainbinding;
-{
- int fd;
- size_t size;
-#ifdef _LIBC
- struct stat64 st;
-#else
- struct stat st;
-#endif
- struct mo_file_header *data = (struct mo_file_header *) -1;
- int use_mmap = 0;
- struct loaded_domain *domain;
- const char *nullentry;
-
- domain_file->decided = 1;
- domain_file->data = NULL;
-
- /* Note that it would be useless to store domainbinding in domain_file
- because domainbinding might be == NULL now but != NULL later (after
- a call to bind_textdomain_codeset). */
-
- /* If the record does not represent a valid locale the FILENAME
- might be NULL. This can happen when according to the given
- specification the locale file name is different for XPG and CEN
- syntax. */
- if (domain_file->filename == NULL)
- return;
-
- /* Try to open the addressed file. */
- fd = open (domain_file->filename, O_RDONLY);
- if (fd == -1)
- return;
-
- /* We must know about the size of the file. */
- if (
-#ifdef _LIBC
- __builtin_expect (fstat64 (fd, &st) != 0, 0)
-#else
- __builtin_expect (fstat (fd, &st) != 0, 0)
-#endif
- || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
- || __builtin_expect (size < sizeof (struct mo_file_header), 0))
- {
- /* Something went wrong. */
- close (fd);
- return;
- }
-
-#ifdef HAVE_MMAP
- /* Now we are ready to load the file. If mmap() is available we try
- this first. If not available or it failed we try to load it. */
- data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
- MAP_PRIVATE, fd, 0);
-
- if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
- {
- /* mmap() call was successful. */
- close (fd);
- use_mmap = 1;
- }
-#endif
-
- /* If the data is not yet available (i.e. mmap'ed) we try to load
- it manually. */
- if (data == (struct mo_file_header *) -1)
- {
- size_t to_read;
- char *read_ptr;
-
- data = (struct mo_file_header *) malloc (size);
- if (data == NULL)
- return;
-
- to_read = size;
- read_ptr = (char *) data;
- do
- {
- long int nb = (long int) read (fd, read_ptr, to_read);
- if (nb <= 0)
- {
-#ifdef EINTR
- if (nb == -1 && errno == EINTR)
- continue;
-#endif
- close (fd);
- return;
- }
- read_ptr += nb;
- to_read -= nb;
- }
- while (to_read > 0);
-
- close (fd);
- }
-
- /* Using the magic number we can test whether it really is a message
- catalog file. */
- if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
- 0))
- {
- /* The magic number is wrong: not a message catalog file. */
-#ifdef HAVE_MMAP
- if (use_mmap)
- munmap ((caddr_t) data, size);
- else
-#endif
- free (data);
- return;
- }
-
- domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
- if (domain == NULL)
- return;
- domain_file->data = domain;
-
- domain->data = (char *) data;
- domain->use_mmap = use_mmap;
- domain->mmap_size = size;
- domain->must_swap = data->magic != _MAGIC;
-
- /* Fill in the information about the available tables. */
- switch (W (domain->must_swap, data->revision))
- {
- case 0:
- domain->nstrings = W (domain->must_swap, data->nstrings);
- domain->orig_tab = (struct string_desc *)
- ((char *) data + W (domain->must_swap, data->orig_tab_offset));
- domain->trans_tab = (struct string_desc *)
- ((char *) data + W (domain->must_swap, data->trans_tab_offset));
- domain->hash_size = W (domain->must_swap, data->hash_tab_size);
- domain->hash_tab = (nls_uint32 *)
- ((char *) data + W (domain->must_swap, data->hash_tab_offset));
- break;
- default:
- /* This is an invalid revision. */
-#ifdef HAVE_MMAP
- if (use_mmap)
- munmap ((caddr_t) data, size);
- else
-#endif
- free (data);
- free (domain);
- domain_file->data = NULL;
- return;
- }
-
- /* Now initialize the character set converter from the character set
- the file is encoded with (found in the header entry) to the domain's
- specified character set or the locale's character set. */
- nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
-
- /* Also look for a plural specification. */
- if (nullentry != NULL)
- {
- const char *plural;
- const char *nplurals;
-
- plural = strstr (nullentry, "plural=");
- nplurals = strstr (nullentry, "nplurals=");
- if (plural == NULL || nplurals == NULL)
- goto no_plural;
- else
- {
- /* First get the number. */
- char *endp;
- unsigned long int n;
- struct parse_args args;
-
- nplurals += 9;
- while (*nplurals != '\0' && isspace (*nplurals))
- ++nplurals;
-#if defined HAVE_STRTOUL || defined _LIBC
- n = strtoul (nplurals, &endp, 10);
-#else
- for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
- n = n * 10 + (*endp - '0');
-#endif
- domain->nplurals = n;
- if (nplurals == endp)
- goto no_plural;
-
- /* Due to the restrictions bison imposes onto the interface of the
- scanner function we have to put the input string and the result
- passed up from the parser into the same structure which address
- is passed down to the parser. */
- plural += 7;
- args.cp = plural;
- if (PLURAL_PARSE (&args) != 0)
- goto no_plural;
- domain->plural = args.res;
- }
- }
- else
- {
- /* By default we are using the Germanic form: singular form only
- for `one', the plural form otherwise. Yes, this is also what
- English is using since English is a Germanic language. */
- no_plural:
- INIT_GERMANIC_PLURAL ();
- domain->plural = &germanic_plural;
- domain->nplurals = 2;
- }
-}
-
-
-#ifdef _LIBC
-void
-internal_function
-_nl_unload_domain (domain)
- struct loaded_domain *domain;
-{
- if (domain->plural != &germanic_plural)
- __gettext_free_exp (domain->plural);
-
- _nl_free_domain_conv (domain);
-
-# ifdef _POSIX_MAPPED_FILES
- if (domain->use_mmap)
- munmap ((caddr_t) domain->data, domain->mmap_size);
- else
-# endif /* _POSIX_MAPPED_FILES */
- free ((void *) domain->data);
-
- free (domain);
-}
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/intl/locale.alias b/newlib/libc/sys/linux/intl/locale.alias
deleted file mode 100644
index 08c250d35..000000000
--- a/newlib/libc/sys/linux/intl/locale.alias
+++ /dev/null
@@ -1,75 +0,0 @@
-# Locale name alias data base.
-# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# The format of this file is the same as for the corresponding file of
-# the X Window System, which normally can be found in
-# /usr/lib/X11/locale/locale.alias
-# A single line contains two fields: an alias and a substitution value.
-# All entries are case independent.
-
-# Note: This file is far from being complete. If you have a value for
-# your own site which you think might be useful for others too, share
-# it with the rest of us. Send it using the `glibcbug' script to
-# bugs@gnu.org.
-
-bokmal no_NO.ISO-8859-1
-bokmål no_NO.ISO-8859-1
-catalan ca_ES.ISO-8859-1
-croatian hr_HR.ISO-8859-2
-czech cs_CZ.ISO-8859-2
-danish da_DK.ISO-8859-1
-dansk da_DK.ISO-8859-1
-deutsch de_DE.ISO-8859-1
-dutch nl_NL.ISO-8859-1
-eesti et_EE.ISO-8859-1
-estonian et_EE.ISO-8859-1
-finnish fi_FI.ISO-8859-1
-français fr_FR.ISO-8859-1
-french fr_FR.ISO-8859-1
-galego gl_ES.ISO-8859-1
-galician gl_ES.ISO-8859-1
-german de_DE.ISO-8859-1
-greek el_GR.ISO-8859-7
-hebrew he_IL.ISO-8859-8
-hrvatski hr_HR.ISO-8859-2
-hungarian hu_HU.ISO-8859-2
-icelandic is_IS.ISO-8859-1
-italian it_IT.ISO-8859-1
-japanese ja_JP.eucJP
-japanese.euc ja_JP.eucJP
-ja_JP ja_JP.eucJP
-ja_JP.ujis ja_JP.eucJP
-japanese.sjis ja_JP.SJIS
-korean ko_KR.eucKR
-korean.euc ko_KR.eucKR
-ko_KR ko_KR.eucKR
-lithuanian lt_LT.ISO-8859-13
-nb_NO no_NO.ISO-8859-1
-nb_NO.ISO-8859-1 no_NO.ISO-8859-1
-norwegian no_NO.ISO-8859-1
-nynorsk nn_NO.ISO-8859-1
-polish pl_PL.ISO-8859-2
-portuguese pt_PT.ISO-8859-1
-romanian ro_RO.ISO-8859-2
-russian ru_RU.ISO-8859-5
-slovak sk_SK.ISO-8859-2
-slovene sl_SI.ISO-8859-2
-slovenian sl_SI.ISO-8859-2
-spanish es_ES.ISO-8859-1
-swedish sv_SE.ISO-8859-1
-thai th_TH.TIS-620
-turkish tr_TR.ISO-8859-9
diff --git a/newlib/libc/sys/linux/intl/localealias.c b/newlib/libc/sys/linux/intl/localealias.c
deleted file mode 100644
index f3a892342..000000000
--- a/newlib/libc/sys/linux/intl/localealias.c
+++ /dev/null
@@ -1,445 +0,0 @@
-#include <newlib.h>
-
-#ifdef _MB_CAPABLE
-
-/* Handle aliases for locale names.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Tell glibc's <string.h> to provide a prototype for mempcpy().
- This must come before <config.h> because <config.h> may include
- <features.h>, and once <features.h> has been included, it's too late. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <ctype.h>
-#include <stdio.h>
-#if defined _GLIBC || defined HAVE___FSETLOCKING
-# include <stdio_ext.h>
-#endif
-#include <sys/types.h>
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-# define HAVE_ALLOCA 1
-#else
-# if defined HAVE_ALLOCA_H || defined _LIBC
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca
-char *alloca ();
-# endif
-# endif
-# endif
-#endif
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#else
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# else
-void free ();
-# endif
-#endif
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
-# endif
-#endif
-#if !HAVE_STRCHR && !defined _LIBC
-# ifndef strchr
-# define strchr index
-# endif
-#endif
-
-#include "gettextP.h"
-
-/* @@ end of prolog @@ */
-
-#ifdef _LIBC
-/* Rename the non ANSI C functions. This is required by the standard
- because some ANSI C functions will require linking with this object
- file and the name space must not be polluted. */
-
-#ifdef _GLIBC
-# define strcasecmp __strcasecmp
-# ifndef mempcpy
-# define mempcpy __mempcpy
-# endif
-# define HAVE_MEMPCPY 1
-# define HAVE___FSETLOCKING 1
-#endif
-
-/* We need locking here since we can be called from different places. */
-# include <bits/libc-lock.h>
-
-__libc_lock_define_initialized (static, lock);
-#endif
-
-#ifndef internal_function
-# define internal_function
-#endif
-
-/* Some optimizations for glibc. */
-#ifdef _GLIBC
-# define FEOF(fp) feof_unlocked (fp)
-# define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp)
-#else
-# define FEOF(fp) feof (fp)
-# define FGETS(buf, n, fp) fgets (buf, n, fp)
-#endif
-
-/* For those losing systems which don't have `alloca' we have to add
- some additional code emulating it. */
-#ifdef HAVE_ALLOCA
-# define freea(p) /* nothing */
-#else
-# define alloca(n) malloc (n)
-# define freea(p) free (p)
-#endif
-
-#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED
-# undef fgets
-# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
-#endif
-#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED
-# undef feof
-# define feof(s) feof_unlocked (s)
-#endif
-
-
-struct alias_map
-{
- const char *alias;
- const char *value;
-};
-
-
-static char *string_space;
-static size_t string_space_act;
-static size_t string_space_max;
-static struct alias_map *map;
-static size_t nmap;
-static size_t maxmap;
-
-
-/* Prototypes for local functions. */
-static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
- internal_function;
-static int extend_alias_table PARAMS ((void));
-static int alias_compare PARAMS ((const struct alias_map *map1,
- const struct alias_map *map2));
-
-
-const char *
-_nl_expand_alias (name)
- const char *name;
-{
- static const char *locale_alias_path = LOCALE_ALIAS_PATH;
- struct alias_map *retval;
- const char *result = NULL;
- size_t added;
-
-#ifdef _LIBC
- __libc_lock_lock (lock);
-#endif
-
- do
- {
- struct alias_map item;
-
- item.alias = name;
-
- if (nmap > 0)
- retval = (struct alias_map *) bsearch (&item, map, nmap,
- sizeof (struct alias_map),
- (int (*) PARAMS ((const void *,
- const void *))
- ) alias_compare);
- else
- retval = NULL;
-
- /* We really found an alias. Return the value. */
- if (retval != NULL)
- {
- result = retval->value;
- break;
- }
-
- /* Perhaps we can find another alias file. */
- added = 0;
- while (added == 0 && locale_alias_path[0] != '\0')
- {
- const char *start;
-
- while (locale_alias_path[0] == ':')
- ++locale_alias_path;
- start = locale_alias_path;
-
- while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':')
- ++locale_alias_path;
-
- if (start < locale_alias_path)
- added = read_alias_file (start, locale_alias_path - start);
- }
- }
- while (added != 0);
-
-#ifdef _LIBC
- __libc_lock_unlock (lock);
-#endif
-
- return result;
-}
-
-
-static size_t
-internal_function
-read_alias_file (fname, fname_len)
- const char *fname;
- int fname_len;
-{
- FILE *fp;
- char *full_fname;
- size_t added;
- static const char aliasfile[] = "/locale.alias";
-
- full_fname = (char *) alloca (fname_len + sizeof aliasfile);
-#ifdef HAVE_MEMPCPY
- mempcpy (mempcpy (full_fname, fname, fname_len),
- aliasfile, sizeof aliasfile);
-#else
- memcpy (full_fname, fname, fname_len);
- memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
-#endif
-
- fp = fopen (full_fname, "r");
- freea (full_fname);
- if (fp == NULL)
- return 0;
-
-#ifdef HAVE___FSETLOCKING
- /* No threads present. */
- __fsetlocking (fp, FSETLOCKING_BYCALLER);
-#endif
-
- added = 0;
- while (!FEOF (fp))
- {
- /* It is a reasonable approach to use a fix buffer here because
- a) we are only interested in the first two fields
- b) these fields must be usable as file names and so must not
- be that long
- */
- char buf[BUFSIZ];
- char *alias;
- char *value;
- char *cp;
-
- if (FGETS (buf, sizeof buf, fp) == NULL)
- /* EOF reached. */
- break;
-
- /* Possibly not the whole line fits into the buffer. Ignore
- the rest of the line. */
- if (strchr (buf, '\n') == NULL)
- {
- char altbuf[BUFSIZ];
- do
- if (FGETS (altbuf, sizeof altbuf, fp) == NULL)
- /* Make sure the inner loop will be left. The outer loop
- will exit at the `feof' test. */
- break;
- while (strchr (altbuf, '\n') == NULL);
- }
-
- cp = buf;
- /* Ignore leading white space. */
- while (isspace (cp[0]))
- ++cp;
-
- /* A leading '#' signals a comment line. */
- if (cp[0] != '\0' && cp[0] != '#')
- {
- alias = cp++;
- while (cp[0] != '\0' && !isspace (cp[0]))
- ++cp;
- /* Terminate alias name. */
- if (cp[0] != '\0')
- *cp++ = '\0';
-
- /* Now look for the beginning of the value. */
- while (isspace (cp[0]))
- ++cp;
-
- if (cp[0] != '\0')
- {
- size_t alias_len;
- size_t value_len;
-
- value = cp++;
- while (cp[0] != '\0' && !isspace (cp[0]))
- ++cp;
- /* Terminate value. */
- if (cp[0] == '\n')
- {
- /* This has to be done to make the following test
- for the end of line possible. We are looking for
- the terminating '\n' which do not overwrite here. */
- *cp++ = '\0';
- *cp = '\n';
- }
- else if (cp[0] != '\0')
- *cp++ = '\0';
-
- if (nmap >= maxmap)
- if (__builtin_expect (extend_alias_table (), 0))
- return added;
-
- alias_len = strlen (alias) + 1;
- value_len = strlen (value) + 1;
-
- if (string_space_act + alias_len + value_len > string_space_max)
- {
- /* Increase size of memory pool. */
- size_t new_size = (string_space_max
- + (alias_len + value_len > 1024
- ? alias_len + value_len : 1024));
- char *new_pool = (char *) realloc (string_space, new_size);
- if (new_pool == NULL)
- return added;
-
- if (__builtin_expect (string_space != new_pool, 0))
- {
- size_t i;
-
- for (i = 0; i < nmap; i++)
- {
- map[i].alias += new_pool - string_space;
- map[i].value += new_pool - string_space;
- }
- }
-
- string_space = new_pool;
- string_space_max = new_size;
- }
-
- map[nmap].alias = memcpy (&string_space[string_space_act],
- alias, alias_len);
- string_space_act += alias_len;
-
- map[nmap].value = memcpy (&string_space[string_space_act],
- value, value_len);
- string_space_act += value_len;
-
- ++nmap;
- ++added;
- }
- }
- }
-
- /* Should we test for ferror()? I think we have to silently ignore
- errors. --drepper */
- fclose (fp);
-
- if (added > 0)
- qsort (map, nmap, sizeof (struct alias_map),
- (int (*) PARAMS ((const void *, const void *))) alias_compare);
-
- return added;
-}
-
-
-static int
-extend_alias_table ()
-{
- size_t new_size;
- struct alias_map *new_map;
-
- new_size = maxmap == 0 ? 100 : 2 * maxmap;
- new_map = (struct alias_map *) realloc (map, (new_size
- * sizeof (struct alias_map)));
- if (new_map == NULL)
- /* Simply don't extend: we don't have any more core. */
- return -1;
-
- map = new_map;
- maxmap = new_size;
- return 0;
-}
-
-
-#ifdef _LIBC
-static void __attribute__ ((unused))
-free_mem (void)
-{
- if (string_space != NULL)
- free (string_space);
- if (map != NULL)
- free (map);
-}
-text_set_element (__libc_subfreeres, free_mem);
-#endif
-
-
-static int
-alias_compare (map1, map2)
- const struct alias_map *map1;
- const struct alias_map *map2;
-{
-#if defined _LIBC || defined HAVE_STRCASECMP
- return strcasecmp (map1->alias, map2->alias);
-#else
- const unsigned char *p1 = (const unsigned char *) map1->alias;
- const unsigned char *p2 = (const unsigned char *) map2->alias;
- unsigned char c1, c2;
-
- if (p1 == p2)
- return 0;
-
- do
- {
- /* I know this seems to be odd but the tolower() function in
- some systems libc cannot handle nonalpha characters. */
- c1 = isupper (*p1) ? tolower (*p1) : *p1;
- c2 = isupper (*p2) ? tolower (*p2) : *p2;
- if (c1 == '\0')
- break;
- ++p1;
- ++p2;
- }
- while (c1 == c2);
-
- return c1 - c2;
-#endif
-}
-
-#endif /* _MB_CAPABLE */
diff --git a/newlib/libc/sys/linux/intl/ngettext.c b/newlib/libc/sys/linux/intl/ngettext.c
deleted file mode 100644
index 70d43838b..000000000
--- a/newlib/libc/sys/linux/intl/ngettext.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Implementation of ngettext(3) function.
- Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef _LIBC
-# define __need_NULL
-# include <stddef.h>
-#else
-# ifdef STDC_HEADERS
-# include <stdlib.h> /* Just for NULL. */
-# else
-# ifdef HAVE_STRING_H
-# include <string.h>
-# else
-# define NULL ((void *) 0)
-# endif
-# endif
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-#include <locale.h>
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define NGETTEXT __ngettext
-# define DCNGETTEXT __dcngettext
-#else
-# define NGETTEXT ngettext__
-# define DCNGETTEXT dcngettext__
-#endif
-
-/* Look up MSGID in the current default message catalog for the current
- LC_MESSAGES locale. If not found, returns MSGID itself (the default
- text). */
-char *
-NGETTEXT (msgid1, msgid2, n)
- const char *msgid1;
- const char *msgid2;
- unsigned long int n;
-{
- return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__ngettext, ngettext);
-#endif
diff --git a/newlib/libc/sys/linux/intl/open_catalog.c b/newlib/libc/sys/linux/intl/open_catalog.c
deleted file mode 100644
index a0c4a807c..000000000
--- a/newlib/libc/sys/linux/intl/open_catalog.c
+++ /dev/null
@@ -1,334 +0,0 @@
-/* Copyright (C) 1996-2000, 2001, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper, <drepper@gnu.org>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <byteswap.h>
-#include <endian.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#ifdef _POSIX_MAPPED_FILES
-# include <sys/mman.h>
-#endif
-#include <sys/stat.h>
-
-#include "catgetsinfo.h"
-
-
-#define SWAPU32(w) bswap_32 (w)
-
-
-int
-__open_catalog (const char *cat_name, const char *nlspath, const char *env_var,
- __nl_catd catalog)
-{
- int fd = -1;
- struct stat64 st;
- int swapping;
- size_t cnt;
- size_t max_offset;
- size_t tab_size;
- const char *lastp;
- int result = -1;
-
- if (strchr (cat_name, '/') != NULL || nlspath == NULL)
- fd = __open (cat_name, O_RDONLY);
- else
- {
- const char *run_nlspath = nlspath;
-#define ENOUGH(n) \
- if (__builtin_expect (bufact + (n) >= bufmax, 0)) \
- { \
- char *old_buf = buf; \
- bufmax += 256 + (n); \
- buf = (char *) alloca (bufmax); \
- memcpy (buf, old_buf, bufact); \
- }
-
- /* The RUN_NLSPATH variable contains a colon separated list of
- descriptions where we expect to find catalogs. We have to
- recognize certain % substitutions and stop when we found the
- first existing file. */
- char *buf;
- size_t bufact;
- size_t bufmax;
- size_t len;
-
- buf = NULL;
- bufmax = 0;
-
- fd = -1;
- while (*run_nlspath != '\0')
- {
- bufact = 0;
-
- if (*run_nlspath == ':')
- {
- /* Leading colon or adjacent colons - treat same as %N. */
- len = strlen (cat_name);
- ENOUGH (len);
- memcpy (&buf[bufact], cat_name, len);
- bufact += len;
- }
- else
- while (*run_nlspath != ':' && *run_nlspath != '\0')
- if (*run_nlspath == '%')
- {
- const char *tmp;
-
- ++run_nlspath; /* We have seen the `%'. */
- switch (*run_nlspath++)
- {
- case 'N':
- /* Use the catalog name. */
- len = strlen (cat_name);
- ENOUGH (len);
- memcpy (&buf[bufact], cat_name, len);
- bufact += len;
- break;
- case 'L':
- /* Use the current locale category value. */
- len = strlen (env_var);
- ENOUGH (len);
- memcpy (&buf[bufact], env_var, len);
- bufact += len;
- break;
- case 'l':
- /* Use language element of locale category value. */
- tmp = env_var;
- do
- {
- ENOUGH (1);
- buf[bufact++] = *tmp++;
- }
- while (*tmp != '\0' && *tmp != '_' && *tmp != '.');
- break;
- case 't':
- /* Use territory element of locale category value. */
- tmp = env_var;
- do
- ++tmp;
- while (*tmp != '\0' && *tmp != '_' && *tmp != '.');
- if (*tmp == '_')
- {
- ++tmp;
- do
- {
- ENOUGH (1);
- buf[bufact++] = *tmp++;
- }
- while (*tmp != '\0' && *tmp != '.');
- }
- break;
- case 'c':
- /* Use code set element of locale category value. */
- tmp = env_var;
- do
- ++tmp;
- while (*tmp != '\0' && *tmp != '.');
- if (*tmp == '.')
- {
- ++tmp;
- do
- {
- ENOUGH (1);
- buf[bufact++] = *tmp++;
- }
- while (*tmp != '\0');
- }
- break;
- case '%':
- ENOUGH (1);
- buf[bufact++] = '%';
- break;
- default:
- /* Unknown variable: ignore this path element. */
- bufact = 0;
- while (*run_nlspath != '\0' && *run_nlspath != ':')
- ++run_nlspath;
- break;
- }
- }
- else
- {
- ENOUGH (1);
- buf[bufact++] = *run_nlspath++;
- }
-
- ENOUGH (1);
- buf[bufact] = '\0';
-
- if (bufact != 0)
- {
- fd = __open (buf, O_RDONLY);
- if (fd >= 0)
- break;
- }
-
- ++run_nlspath;
- }
- }
-
- /* Avoid dealing with directories and block devices */
- if (__builtin_expect (fd, 0) < 0)
- return -1;
-
- if (__builtin_expect (fstat64 (fd, &st), 0) < 0)
- goto close_unlock_return;
-
- if (__builtin_expect (!S_ISREG (st.st_mode), 0)
- || st.st_size < sizeof (struct catalog_obj))
- {
- /* `errno' is not set correctly but the file is not usable.
- Use an reasonable error value. */
- __set_errno (EINVAL);
- goto close_unlock_return;
- }
-
- catalog->file_size = st.st_size;
-#ifdef _POSIX_MAPPED_FILES
-# ifndef MAP_COPY
- /* Linux seems to lack read-only copy-on-write. */
-# define MAP_COPY MAP_PRIVATE
-# endif
-# ifndef MAP_FILE
- /* Some systems do not have this flag; it is superfluous. */
-# define MAP_FILE 0
-# endif
-# ifndef MAP_INHERIT
- /* Some systems might lack this; they lose. */
-# define MAP_INHERIT 0
-# endif
- catalog->file_ptr =
- (struct catalog_obj *) __mmap (NULL, st.st_size, PROT_READ,
- MAP_FILE|MAP_COPY|MAP_INHERIT, fd, 0);
- if (__builtin_expect (catalog->file_ptr != (struct catalog_obj *) MAP_FAILED,
- 1))
- /* Tell the world we managed to mmap the file. */
- catalog->status = mmapped;
- else
-#endif /* _POSIX_MAPPED_FILES */
- {
- /* mmap failed perhaps because the system call is not
- implemented. Try to load the file. */
- size_t todo;
- catalog->file_ptr = malloc (st.st_size);
- if (catalog->file_ptr == NULL)
- goto close_unlock_return;
-
- todo = st.st_size;
- /* Save read, handle partial reads. */
- do
- {
- size_t now = __read (fd, (((char *) catalog->file_ptr)
- + (st.st_size - todo)), todo);
- if (now == 0 || now == (size_t) -1)
- {
-#ifdef EINTR
- if (now == (size_t) -1 && errno == EINTR)
- continue;
-#endif
- free ((void *) catalog->file_ptr);
- goto close_unlock_return;
- }
- todo -= now;
- }
- while (todo > 0);
- catalog->status = malloced;
- }
-
- /* Determine whether the file is a catalog file and if yes whether
- it is written using the correct byte order. Else we have to swap
- the values. */
- if (__builtin_expect (catalog->file_ptr->magic, CATGETS_MAGIC)
- == CATGETS_MAGIC)
- swapping = 0;
- else if (catalog->file_ptr->magic == SWAPU32 (CATGETS_MAGIC))
- swapping = 1;
- else
- {
- invalid_file:
- /* Invalid file. Free the resources and mark catalog as not
- usable. */
-#ifdef _POSIX_MAPPED_FILES
- if (catalog->status == mmapped)
- __munmap ((void *) catalog->file_ptr, catalog->file_size);
- else
-#endif /* _POSIX_MAPPED_FILES */
- free (catalog->file_ptr);
- goto close_unlock_return;
- }
-
-#define SWAP(x) (swapping ? SWAPU32 (x) : (x))
-
- /* Get dimensions of the used hashing table. */
- catalog->plane_size = SWAP (catalog->file_ptr->plane_size);
- catalog->plane_depth = SWAP (catalog->file_ptr->plane_depth);
-
- /* The file contains two versions of the pointer tables. Pick the
- right one for the local byte order. */
-#if __BYTE_ORDER == __LITTLE_ENDIAN
- catalog->name_ptr = &catalog->file_ptr->name_ptr[0];
-#elif __BYTE_ORDER == __BIG_ENDIAN
- catalog->name_ptr = &catalog->file_ptr->name_ptr[catalog->plane_size
- * catalog->plane_depth
- * 3];
-#else
-# error Cannot handle __BYTE_ORDER byte order
-#endif
-
- /* The rest of the file contains all the strings. They are
- addressed relative to the position of the first string. */
- catalog->strings =
- (const char *) &catalog->file_ptr->name_ptr[catalog->plane_size
- * catalog->plane_depth * 3 * 2];
-
- /* Determine the largest string offset mentioned in the table. */
- max_offset = 0;
- tab_size = 3 * catalog->plane_size * catalog->plane_depth;
- for (cnt = 2; cnt < tab_size; cnt += 3)
- if (catalog->name_ptr[cnt] > max_offset)
- max_offset = catalog->name_ptr[cnt];
-
- /* Now we can check whether the file is large enough to contain the
- tables it says it contains. */
- if (st.st_size <= (sizeof (struct catalog_obj) + 2 * tab_size + max_offset))
- /* The last string is not contained in the file. */
- goto invalid_file;
-
- lastp = catalog->strings + max_offset;
- max_offset = (st.st_size
- - sizeof (struct catalog_obj) + 2 * tab_size + max_offset);
- while (*lastp != '\0')
- {
- if (--max_offset == 0)
- goto invalid_file;
- ++lastp;
- }
-
- /* We succeeded. */
- result = 0;
-
- /* Release the lock again. */
- close_unlock_return:
- __close (fd);
-
- return result;
-}
diff --git a/newlib/libc/sys/linux/intl/plural.c b/newlib/libc/sys/linux/intl/plural.c
deleted file mode 100644
index 7585c2743..000000000
--- a/newlib/libc/sys/linux/intl/plural.c
+++ /dev/null
@@ -1,1319 +0,0 @@
-
-/* A Bison parser, made from plural.y
- by GNU Bison version 1.28 */
-
-#define YYBISON 1 /* Identify Bison output. */
-
-#define yyparse __gettextparse
-#define yylex __gettextlex
-#define yyerror __gettexterror
-#define yylval __gettextlval
-#define yychar __gettextchar
-#define yydebug __gettextdebug
-#define yynerrs __gettextnerrs
-#define EQUOP2 257
-#define CMPOP2 258
-#define ADDOP2 259
-#define MULOP2 260
-#define NUMBER 261
-
-#line 1 "plural.y"
-
-/* Expression parsing for plural form selection.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdlib.h>
-#include "gettextP.h"
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define FREE_EXPRESSION __gettext_free_exp
-#else
-# define FREE_EXPRESSION gettext_free_exp__
-# define __gettextparse gettextparse__
-#endif
-
-#define YYLEX_PARAM &((struct parse_args *) arg)->cp
-#define YYPARSE_PARAM arg
-
-#line 46 "plural.y"
-typedef union {
- unsigned long int num;
- enum operator op;
- struct expression *exp;
-} YYSTYPE;
-#line 52 "plural.y"
-
-/* Prototypes for local functions. */
-static struct expression *new_exp PARAMS ((int nargs, enum operator op,
- struct expression * const *args));
-static inline struct expression *new_exp_0 PARAMS ((enum operator op));
-static inline struct expression *new_exp_1 PARAMS ((enum operator op,
- struct expression *right));
-static struct expression *new_exp_2 PARAMS ((enum operator op,
- struct expression *left,
- struct expression *right));
-static inline struct expression *new_exp_3 PARAMS ((enum operator op,
- struct expression *bexp,
- struct expression *tbranch,
- struct expression *fbranch));
-static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
-static void yyerror PARAMS ((const char *str));
-
-/* Allocation of expressions. */
-
-static struct expression *
-new_exp (nargs, op, args)
- int nargs;
- enum operator op;
- struct expression * const *args;
-{
- int i;
- struct expression *newp;
-
- /* If any of the argument could not be malloc'ed, just return NULL. */
- for (i = nargs - 1; i >= 0; i--)
- if (args[i] == NULL)
- goto fail;
-
- /* Allocate a new expression. */
- newp = (struct expression *) malloc (sizeof (*newp));
- if (newp != NULL)
- {
- newp->nargs = nargs;
- newp->operation = op;
- for (i = nargs - 1; i >= 0; i--)
- newp->val.args[i] = args[i];
- return newp;
- }
-
- fail:
- for (i = nargs - 1; i >= 0; i--)
- FREE_EXPRESSION (args[i]);
-
- return NULL;
-}
-
-static inline struct expression *
-new_exp_0 (op)
- enum operator op;
-{
- return new_exp (0, op, NULL);
-}
-
-static inline struct expression *
-new_exp_1 (op, right)
- enum operator op;
- struct expression *right;
-{
- struct expression *args[1];
-
- args[0] = right;
- return new_exp (1, op, args);
-}
-
-static struct expression *
-new_exp_2 (op, left, right)
- enum operator op;
- struct expression *left;
- struct expression *right;
-{
- struct expression *args[2];
-
- args[0] = left;
- args[1] = right;
- return new_exp (2, op, args);
-}
-
-static inline struct expression *
-new_exp_3 (op, bexp, tbranch, fbranch)
- enum operator op;
- struct expression *bexp;
- struct expression *tbranch;
- struct expression *fbranch;
-{
- struct expression *args[3];
-
- args[0] = bexp;
- args[1] = tbranch;
- args[2] = fbranch;
- return new_exp (3, op, args);
-}
-
-#include <stdio.h>
-
-#ifndef __cplusplus
-#ifndef __STDC__
-#define const
-#endif
-#endif
-
-
-
-#define YYFINAL 27
-#define YYFLAG -32768
-#define YYNTBASE 16
-
-#define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18)
-
-static const char yytranslate[] = { 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 10, 2, 2, 2, 2, 5, 2, 14,
- 15, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 12, 2, 2,
- 2, 2, 3, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 13,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 4, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 6, 7, 8, 9,
- 11
-};
-
-#if YYDEBUG != 0
-static const short yyprhs[] = { 0,
- 0, 2, 8, 12, 16, 20, 24, 28, 32, 35,
- 37, 39
-};
-
-static const short yyrhs[] = { 17,
- 0, 17, 3, 17, 12, 17, 0, 17, 4, 17,
- 0, 17, 5, 17, 0, 17, 6, 17, 0, 17,
- 7, 17, 0, 17, 8, 17, 0, 17, 9, 17,
- 0, 10, 17, 0, 13, 0, 11, 0, 14, 17,
- 15, 0
-};
-
-#endif
-
-#if YYDEBUG != 0
-static const short yyrline[] = { 0,
- 171, 179, 183, 187, 191, 195, 199, 203, 207, 211,
- 215, 220
-};
-#endif
-
-
-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
-
-static const char * const yytname[] = { "$","error","$undefined.","'?'","'|'",
-"'&'","EQUOP2","CMPOP2","ADDOP2","MULOP2","'!'","NUMBER","':'","'n'","'('","')'",
-"start","exp", NULL
-};
-#endif
-
-static const short yyr1[] = { 0,
- 16, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17
-};
-
-static const short yyr2[] = { 0,
- 1, 5, 3, 3, 3, 3, 3, 3, 2, 1,
- 1, 3
-};
-
-static const short yydefact[] = { 0,
- 0, 11, 10, 0, 1, 9, 0, 0, 0, 0,
- 0, 0, 0, 0, 12, 0, 3, 4, 5, 6,
- 7, 8, 0, 2, 0, 0, 0
-};
-
-static const short yydefgoto[] = { 25,
- 5
-};
-
-static const short yypact[] = { -9,
- -9,-32768,-32768, -9, 34,-32768, 11, -9, -9, -9,
- -9, -9, -9, -9,-32768, 24, 39, 43, 16, 26,
- -3,-32768, -9, 34, 21, 53,-32768
-};
-
-static const short yypgoto[] = {-32768,
- -1
-};
-
-
-#define YYLAST 53
-
-
-static const short yytable[] = { 6,
- 1, 2, 7, 3, 4, 14, 16, 17, 18, 19,
- 20, 21, 22, 8, 9, 10, 11, 12, 13, 14,
- 26, 24, 12, 13, 14, 15, 8, 9, 10, 11,
- 12, 13, 14, 13, 14, 23, 8, 9, 10, 11,
- 12, 13, 14, 10, 11, 12, 13, 14, 11, 12,
- 13, 14, 27
-};
-
-static const short yycheck[] = { 1,
- 10, 11, 4, 13, 14, 9, 8, 9, 10, 11,
- 12, 13, 14, 3, 4, 5, 6, 7, 8, 9,
- 0, 23, 7, 8, 9, 15, 3, 4, 5, 6,
- 7, 8, 9, 8, 9, 12, 3, 4, 5, 6,
- 7, 8, 9, 5, 6, 7, 8, 9, 6, 7,
- 8, 9, 0
-};
-#define YYPURE 1
-
-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/lib/bison.simple"
-/* This file comes from bison-1.28. */
-
-/* Skeleton output parser for bison,
- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
-/* This is the parser code that is written into each bison parser
- when the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
-
-#ifndef YYSTACK_USE_ALLOCA
-#ifdef alloca
-#define YYSTACK_USE_ALLOCA
-#else /* alloca not defined */
-#ifdef __GNUC__
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#else /* not GNU C. */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
-#define YYSTACK_USE_ALLOCA
-#include <alloca.h>
-#else /* not sparc */
-/* We think this test detects Watcom and Microsoft C. */
-/* This used to test MSDOS, but that is a bad idea
- since that symbol is in the user namespace. */
-#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
-#if 0 /* No need for malloc.h, which pollutes the namespace;
- instead, just don't use alloca. */
-#include <malloc.h>
-#endif
-#else /* not MSDOS, or __TURBOC__ */
-#if defined(_AIX)
-/* I don't know what this was needed for, but it pollutes the namespace.
- So I turned it off. rms, 2 May 1997. */
-/* #include <malloc.h> */
- #pragma alloca
-#define YYSTACK_USE_ALLOCA
-#else /* not MSDOS, or __TURBOC__, or _AIX */
-#if 0
-#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
- and on HPUX 10. Eventually we can turn this on. */
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#endif /* __hpux */
-#endif
-#endif /* not _AIX */
-#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc */
-#endif /* not GNU C */
-#endif /* alloca not defined */
-#endif /* YYSTACK_USE_ALLOCA not defined */
-
-#ifdef YYSTACK_USE_ALLOCA
-#define YYSTACK_ALLOC alloca
-#else
-#define YYSTACK_ALLOC malloc
-#endif
-
-/* Note: there must be only one dollar sign in this file.
- It is replaced by the list of actions, each action
- as one case of the switch. */
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY -2
-#define YYEOF 0
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
-/* Like YYERROR except do call yyerror.
- This remains here temporarily to ease the
- transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
-#define YYFAIL goto yyerrlab
-#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(token, value) \
-do \
- if (yychar == YYEMPTY && yylen == 1) \
- { yychar = (token), yylval = (value); \
- yychar1 = YYTRANSLATE (yychar); \
- YYPOPSTACK; \
- goto yybackup; \
- } \
- else \
- { yyerror ("syntax error: cannot back up"); YYERROR; } \
-while (0)
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-#ifndef YYPURE
-#define YYLEX yylex()
-#endif
-
-#ifdef YYPURE
-#ifdef YYLSP_NEEDED
-#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
-#else
-#define YYLEX yylex(&yylval, &yylloc)
-#endif
-#else /* not YYLSP_NEEDED */
-#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, YYLEX_PARAM)
-#else
-#define YYLEX yylex(&yylval)
-#endif
-#endif /* not YYLSP_NEEDED */
-#endif
-
-/* If nonreentrant, generate the variables here */
-
-#ifndef YYPURE
-
-int yychar; /* the lookahead symbol */
-YYSTYPE yylval; /* the semantic value of the */
- /* lookahead symbol */
-
-#ifdef YYLSP_NEEDED
-YYLTYPE yylloc; /* location data for the lookahead */
- /* symbol */
-#endif
-
-int yynerrs; /* number of parse errors so far */
-#endif /* not YYPURE */
-
-#if YYDEBUG != 0
-int yydebug; /* nonzero means print parse trace */
-/* Since this is uninitialized, it does not stop multiple parsers
- from coexisting. */
-#endif
-
-/* YYINITDEPTH indicates the initial size of the parser's stacks */
-
-#ifndef YYINITDEPTH
-#define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH is the maximum size the stacks can grow to
- (effective only if the built-in stack extension method is used). */
-
-#if YYMAXDEPTH == 0
-#undef YYMAXDEPTH
-#endif
-
-#ifndef YYMAXDEPTH
-#define YYMAXDEPTH 10000
-#endif
-
-/* Define __yy_memcpy. Note that the size argument
- should be passed with type unsigned int, because that is what the non-GCC
- definitions require. With GCC, __builtin_memcpy takes an arg
- of type size_t, but it can handle unsigned int. */
-
-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
-#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
-#else /* not GNU C or C++ */
-#ifndef __cplusplus
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (to, from, count)
- char *to;
- char *from;
- unsigned int count;
-{
- register char *f = from;
- register char *t = to;
- register int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
-}
-
-#else /* __cplusplus */
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (char *to, char *from, unsigned int count)
-{
- register char *t = to;
- register char *f = from;
- register int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
-}
-
-#endif
-#endif
-
-#line 217 "/usr/lib/bison.simple"
-
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
- into yyparse. The argument should have type void *.
- It should actually point to an object.
- Grammar actions can access the variable by casting it
- to the proper pointer type. */
-
-#ifdef YYPARSE_PARAM
-#ifdef __cplusplus
-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL
-#else /* not __cplusplus */
-#define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-#endif /* not __cplusplus */
-#else /* not YYPARSE_PARAM */
-#define YYPARSE_PARAM_ARG
-#define YYPARSE_PARAM_DECL
-#endif /* not YYPARSE_PARAM */
-
-/* Prevent warning if -Wstrict-prototypes. */
-#ifdef __GNUC__
-#ifdef YYPARSE_PARAM
-int yyparse (void *);
-#else
-int yyparse (void);
-#endif
-#endif
-
-int
-yyparse(YYPARSE_PARAM_ARG)
- YYPARSE_PARAM_DECL
-{
- register int yystate;
- register int yyn;
- register short *yyssp;
- register YYSTYPE *yyvsp;
- int yyerrstatus; /* number of tokens to shift before error messages enabled */
- int yychar1 = 0; /* lookahead token as an internal (translated) token number */
-
- short yyssa[YYINITDEPTH]; /* the state stack */
- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
-
- short *yyss = yyssa; /* refer to the stacks thru separate pointers */
- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
-
-#ifdef YYLSP_NEEDED
- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
-
-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
-#else
-#define YYPOPSTACK (yyvsp--, yyssp--)
-#endif
-
- int yystacksize = YYINITDEPTH;
- int yyfree_stacks = 0;
-
-#ifdef YYPURE
- int yychar;
- YYSTYPE yylval;
- int yynerrs;
-#ifdef YYLSP_NEEDED
- YYLTYPE yylloc;
-#endif
-#endif
-
- YYSTYPE yyval; /* the variable used to return */
- /* semantic values from the action */
- /* routines */
-
- int yylen;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Starting parse\n");
-#endif
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
-
- yyssp = yyss - 1;
- yyvsp = yyvs;
-#ifdef YYLSP_NEEDED
- yylsp = yyls;
-#endif
-
-/* Push a new state, which is found in yystate . */
-/* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks. */
-yynewstate:
-
- *++yyssp = yystate;
-
- if (yyssp >= yyss + yystacksize - 1)
- {
- /* Give user a chance to reallocate the stack */
- /* Use copies of these so that the &'s don't force the real ones into memory. */
- YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
-#ifdef YYLSP_NEEDED
- YYLTYPE *yyls1 = yyls;
-#endif
-
- /* Get the current used size of the three stacks, in elements. */
- int size = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- /* Each stack pointer address is followed by the size of
- the data in use in that stack, in bytes. */
-#ifdef YYLSP_NEEDED
- /* This used to be a conditional around just the two extra args,
- but that might be undefined if yyoverflow is a macro. */
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yyls1, size * sizeof (*yylsp),
- &yystacksize);
-#else
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yystacksize);
-#endif
-
- yyss = yyss1; yyvs = yyvs1;
-#ifdef YYLSP_NEEDED
- yyls = yyls1;
-#endif
-#else /* no yyoverflow */
- /* Extend the stack our own way. */
- if (yystacksize >= YYMAXDEPTH)
- {
- yyerror("parser stack overflow");
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 2;
- }
- yystacksize *= 2;
- if (yystacksize > YYMAXDEPTH)
- yystacksize = YYMAXDEPTH;
-#ifndef YYSTACK_USE_ALLOCA
- yyfree_stacks = 1;
-#endif
- yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
- __yy_memcpy ((char *)yyss, (char *)yyss1,
- size * (unsigned int) sizeof (*yyssp));
- yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
- __yy_memcpy ((char *)yyvs, (char *)yyvs1,
- size * (unsigned int) sizeof (*yyvsp));
-#ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
- __yy_memcpy ((char *)yyls, (char *)yyls1,
- size * (unsigned int) sizeof (*yylsp));
-#endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + size - 1;
- yyvsp = yyvs + size - 1;
-#ifdef YYLSP_NEEDED
- yylsp = yyls + size - 1;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Stack size increased to %d\n", yystacksize);
-#endif
-
- if (yyssp >= yyss + yystacksize - 1)
- YYABORT;
- }
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Entering state %d\n", yystate);
-#endif
-
- goto yybackup;
- yybackup:
-
-/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
-/* yyresume: */
-
- /* First try to decide what to do without reference to lookahead token. */
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* yychar is either YYEMPTY or YYEOF
- or a valid token in external form. */
-
- if (yychar == YYEMPTY)
- {
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Reading a token: ");
-#endif
- yychar = YYLEX;
- }
-
- /* Convert token to internal form (in yychar1) for indexing tables with */
-
- if (yychar <= 0) /* This means end of input. */
- {
- yychar1 = 0;
- yychar = YYEOF; /* Don't call YYLEX any more */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Now at end of input.\n");
-#endif
- }
- else
- {
- yychar1 = YYTRANSLATE(yychar);
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
- /* Give the individual parser a way to print the precise meaning
- of a token, for further debugging info. */
-#ifdef YYPRINT
- YYPRINT (stderr, yychar, yylval);
-#endif
- fprintf (stderr, ")\n");
- }
-#endif
- }
-
- yyn += yychar1;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
- goto yydefault;
-
- yyn = yytable[yyn];
-
- /* yyn is what to do for this token type in this state.
- Negative => reduce, -yyn is rule number.
- Positive => shift, yyn is new state.
- New state is final state => don't bother to shift,
- just return success.
- 0, or most negative number => error. */
-
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrlab;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- /* Shift the lookahead token. */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
-#endif
-
- /* Discard the token being shifted unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
-
- /* count tokens shifted since error; after three, turn off error status. */
- if (yyerrstatus) yyerrstatus--;
-
- yystate = yyn;
- goto yynewstate;
-
-/* Do the default action for the current state. */
-yydefault:
-
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
-
-/* Do a reduction. yyn is the number of a rule to reduce with. */
-yyreduce:
- yylen = yyr2[yyn];
- if (yylen > 0)
- yyval = yyvsp[1-yylen]; /* implement default value of the action */
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- int i;
-
- fprintf (stderr, "Reducing via rule %d (line %d), ",
- yyn, yyrline[yyn]);
-
- /* Print the symbols being reduced, and their result. */
- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
- fprintf (stderr, "%s ", yytname[yyrhs[i]]);
- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
- }
-#endif
-
-
- switch (yyn) {
-
-case 1:
-#line 172 "plural.y"
-{
- if (yyvsp[0].exp == NULL)
- YYABORT;
- ((struct parse_args *) arg)->res = yyvsp[0].exp;
- ;
- break;}
-case 2:
-#line 180 "plural.y"
-{
- yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
- ;
- break;}
-case 3:
-#line 184 "plural.y"
-{
- yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
- ;
- break;}
-case 4:
-#line 188 "plural.y"
-{
- yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
- ;
- break;}
-case 5:
-#line 192 "plural.y"
-{
- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
- ;
- break;}
-case 6:
-#line 196 "plural.y"
-{
- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
- ;
- break;}
-case 7:
-#line 200 "plural.y"
-{
- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
- ;
- break;}
-case 8:
-#line 204 "plural.y"
-{
- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
- ;
- break;}
-case 9:
-#line 208 "plural.y"
-{
- yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
- ;
- break;}
-case 10:
-#line 212 "plural.y"
-{
- yyval.exp = new_exp_0 (var);
- ;
- break;}
-case 11:
-#line 216 "plural.y"
-{
- if ((yyval.exp = new_exp_0 (num)) != NULL)
- yyval.exp->val.num = yyvsp[0].num;
- ;
- break;}
-case 12:
-#line 221 "plural.y"
-{
- yyval.exp = yyvsp[-1].exp;
- ;
- break;}
-}
- /* the action file gets copied in in place of this dollarsign */
-#line 543 "/usr/lib/bison.simple"
-
- yyvsp -= yylen;
- yyssp -= yylen;
-#ifdef YYLSP_NEEDED
- yylsp -= yylen;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-
- *++yyvsp = yyval;
-
-#ifdef YYLSP_NEEDED
- yylsp++;
- if (yylen == 0)
- {
- yylsp->first_line = yylloc.first_line;
- yylsp->first_column = yylloc.first_column;
- yylsp->last_line = (yylsp-1)->last_line;
- yylsp->last_column = (yylsp-1)->last_column;
- yylsp->text = 0;
- }
- else
- {
- yylsp->last_line = (yylsp+yylen-1)->last_line;
- yylsp->last_column = (yylsp+yylen-1)->last_column;
- }
-#endif
-
- /* Now "shift" the result of the reduction.
- Determine what state that goes to,
- based on the state we popped back to
- and the rule number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTBASE];
-
- goto yynewstate;
-
-yyerrlab: /* here on detecting error */
-
- if (! yyerrstatus)
- /* If not already recovering from an error, report this error. */
- {
- ++yynerrs;
-
-#ifdef YYERROR_VERBOSE
- yyn = yypact[yystate];
-
- if (yyn > YYFLAG && yyn < YYLAST)
- {
- int size = 0;
- char *msg;
- int x, count;
-
- count = 0;
- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- size += strlen(yytname[x]) + 15, count++;
- msg = (char *) malloc(size + 15);
- if (msg != 0)
- {
- strcpy(msg, "parse error");
-
- if (count < 5)
- {
- count = 0;
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- {
- strcat(msg, count == 0 ? ", expecting `" : " or `");
- strcat(msg, yytname[x]);
- strcat(msg, "'");
- count++;
- }
- }
- yyerror(msg);
- free(msg);
- }
- else
- yyerror ("parse error; also virtual memory exceeded");
- }
- else
-#endif /* YYERROR_VERBOSE */
- yyerror("parse error");
- }
-
- goto yyerrlab1;
-yyerrlab1: /* here on error raised explicitly by an action */
-
- if (yyerrstatus == 3)
- {
- /* if just tried and failed to reuse lookahead token after an error, discard it. */
-
- /* return failure if at end of input */
- if (yychar == YYEOF)
- YYABORT;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
-#endif
-
- yychar = YYEMPTY;
- }
-
- /* Else will try to reuse lookahead token
- after shifting the error token. */
-
- yyerrstatus = 3; /* Each real token shifted decrements this */
-
- goto yyerrhandle;
-
-yyerrdefault: /* current state does not do anything special for the error token. */
-
-#if 0
- /* This is wrong; only states that explicitly want error tokens
- should shift them. */
- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
- if (yyn) goto yydefault;
-#endif
-
-yyerrpop: /* pop the current state because it cannot handle the error token */
-
- if (yyssp == yyss) YYABORT;
- yyvsp--;
- yystate = *--yyssp;
-#ifdef YYLSP_NEEDED
- yylsp--;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "Error: state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-
-yyerrhandle:
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yyerrdefault;
-
- yyn += YYTERROR;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
- goto yyerrdefault;
-
- yyn = yytable[yyn];
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrpop;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrpop;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting error token, ");
-#endif
-
- *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
-
- yystate = yyn;
- goto yynewstate;
-
- yyacceptlab:
- /* YYACCEPT comes here. */
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 0;
-
- yyabortlab:
- /* YYABORT comes here. */
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 1;
-}
-#line 226 "plural.y"
-
-
-void
-internal_function
-FREE_EXPRESSION (exp)
- struct expression *exp;
-{
- if (exp == NULL)
- return;
-
- /* Handle the recursive case. */
- switch (exp->nargs)
- {
- case 3:
- FREE_EXPRESSION (exp->val.args[2]);
- /* FALLTHROUGH */
- case 2:
- FREE_EXPRESSION (exp->val.args[1]);
- /* FALLTHROUGH */
- case 1:
- FREE_EXPRESSION (exp->val.args[0]);
- /* FALLTHROUGH */
- default:
- break;
- }
-
- free (exp);
-}
-
-
-static int
-yylex (lval, pexp)
- YYSTYPE *lval;
- const char **pexp;
-{
- const char *exp = *pexp;
- int result;
-
- while (1)
- {
- if (exp[0] == '\0')
- {
- *pexp = exp;
- return YYEOF;
- }
-
- if (exp[0] != ' ' && exp[0] != '\t')
- break;
-
- ++exp;
- }
-
- result = *exp++;
- switch (result)
- {
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- {
- unsigned long int n = result - '0';
- while (exp[0] >= '0' && exp[0] <= '9')
- {
- n *= 10;
- n += exp[0] - '0';
- ++exp;
- }
- lval->num = n;
- result = NUMBER;
- }
- break;
-
- case '=':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = equal;
- result = EQUOP2;
- }
- else
- result = YYERRCODE;
- break;
-
- case '!':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = not_equal;
- result = EQUOP2;
- }
- break;
-
- case '&':
- case '|':
- if (exp[0] == result)
- ++exp;
- else
- result = YYERRCODE;
- break;
-
- case '<':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = less_or_equal;
- }
- else
- lval->op = less_than;
- result = CMPOP2;
- break;
-
- case '>':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = greater_or_equal;
- }
- else
- lval->op = greater_than;
- result = CMPOP2;
- break;
-
- case '*':
- lval->op = mult;
- result = MULOP2;
- break;
-
- case '/':
- lval->op = divide;
- result = MULOP2;
- break;
-
- case '%':
- lval->op = module;
- result = MULOP2;
- break;
-
- case '+':
- lval->op = plus;
- result = ADDOP2;
- break;
-
- case '-':
- lval->op = minus;
- result = ADDOP2;
- break;
-
- case 'n':
- case '?':
- case ':':
- case '(':
- case ')':
- /* Nothing, just return the character. */
- break;
-
- case ';':
- case '\n':
- case '\0':
- /* Be safe and let the user call this function again. */
- --exp;
- result = YYEOF;
- break;
-
- default:
- result = YYERRCODE;
-#if YYDEBUG != 0
- --exp;
-#endif
- break;
- }
-
- *pexp = exp;
-
- return result;
-}
-
-
-static void
-yyerror (str)
- const char *str;
-{
- /* Do nothing. We don't print error messages here. */
-}
diff --git a/newlib/libc/sys/linux/intl/plural.y b/newlib/libc/sys/linux/intl/plural.y
deleted file mode 100644
index 90b0004f5..000000000
--- a/newlib/libc/sys/linux/intl/plural.y
+++ /dev/null
@@ -1,406 +0,0 @@
-%{
-/* Expression parsing for plural form selection.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdlib.h>
-#include "gettextP.h"
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define FREE_EXPRESSION __gettext_free_exp
-#else
-# define FREE_EXPRESSION gettext_free_exp__
-# define __gettextparse gettextparse__
-#endif
-
-#define YYLEX_PARAM &((struct parse_args *) arg)->cp
-#define YYPARSE_PARAM arg
-%}
-%pure_parser
-%expect 7
-
-%union {
- unsigned long int num;
- enum operator op;
- struct expression *exp;
-}
-
-%{
-/* Prototypes for local functions. */
-static struct expression *new_exp PARAMS ((int nargs, enum operator op,
- struct expression * const *args));
-static inline struct expression *new_exp_0 PARAMS ((enum operator op));
-static inline struct expression *new_exp_1 PARAMS ((enum operator op,
- struct expression *right));
-static struct expression *new_exp_2 PARAMS ((enum operator op,
- struct expression *left,
- struct expression *right));
-static inline struct expression *new_exp_3 PARAMS ((enum operator op,
- struct expression *bexp,
- struct expression *tbranch,
- struct expression *fbranch));
-static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
-static void yyerror PARAMS ((const char *str));
-
-/* Allocation of expressions. */
-
-static struct expression *
-new_exp (nargs, op, args)
- int nargs;
- enum operator op;
- struct expression * const *args;
-{
- int i;
- struct expression *newp;
-
- /* If any of the argument could not be malloc'ed, just return NULL. */
- for (i = nargs - 1; i >= 0; i--)
- if (args[i] == NULL)
- goto fail;
-
- /* Allocate a new expression. */
- newp = (struct expression *) malloc (sizeof (*newp));
- if (newp != NULL)
- {
- newp->nargs = nargs;
- newp->operation = op;
- for (i = nargs - 1; i >= 0; i--)
- newp->val.args[i] = args[i];
- return newp;
- }
-
- fail:
- for (i = nargs - 1; i >= 0; i--)
- FREE_EXPRESSION (args[i]);
-
- return NULL;
-}
-
-static inline struct expression *
-new_exp_0 (op)
- enum operator op;
-{
- return new_exp (0, op, NULL);
-}
-
-static inline struct expression *
-new_exp_1 (op, right)
- enum operator op;
- struct expression *right;
-{
- struct expression *args[1];
-
- args[0] = right;
- return new_exp (1, op, args);
-}
-
-static struct expression *
-new_exp_2 (op, left, right)
- enum operator op;
- struct expression *left;
- struct expression *right;
-{
- struct expression *args[2];
-
- args[0] = left;
- args[1] = right;
- return new_exp (2, op, args);
-}
-
-static inline struct expression *
-new_exp_3 (op, bexp, tbranch, fbranch)
- enum operator op;
- struct expression *bexp;
- struct expression *tbranch;
- struct expression *fbranch;
-{
- struct expression *args[3];
-
- args[0] = bexp;
- args[1] = tbranch;
- args[2] = fbranch;
- return new_exp (3, op, args);
-}
-
-%}
-
-/* This declares that all operators have the same associativity and the
- precedence order as in C. See [Harbison, Steele: C, A Reference Manual].
- There is no unary minus and no bitwise operators.
- Operators with the same syntactic behaviour have been merged into a single
- token, to save space in the array generated by bison. */
-%right '?' /* ? */
-%left '|' /* || */
-%left '&' /* && */
-%left EQUOP2 /* == != */
-%left CMPOP2 /* < > <= >= */
-%left ADDOP2 /* + - */
-%left MULOP2 /* * / % */
-%right '!' /* ! */
-
-%token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
-%token <num> NUMBER
-%type <exp> exp
-
-%%
-
-start: exp
- {
- if ($1 == NULL)
- YYABORT;
- ((struct parse_args *) arg)->res = $1;
- }
- ;
-
-exp: exp '?' exp ':' exp
- {
- $$ = new_exp_3 (qmop, $1, $3, $5);
- }
- | exp '|' exp
- {
- $$ = new_exp_2 (lor, $1, $3);
- }
- | exp '&' exp
- {
- $$ = new_exp_2 (land, $1, $3);
- }
- | exp EQUOP2 exp
- {
- $$ = new_exp_2 ($2, $1, $3);
- }
- | exp CMPOP2 exp
- {
- $$ = new_exp_2 ($2, $1, $3);
- }
- | exp ADDOP2 exp
- {
- $$ = new_exp_2 ($2, $1, $3);
- }
- | exp MULOP2 exp
- {
- $$ = new_exp_2 ($2, $1, $3);
- }
- | '!' exp
- {
- $$ = new_exp_1 (lnot, $2);
- }
- | 'n'
- {
- $$ = new_exp_0 (var);
- }
- | NUMBER
- {
- if (($$ = new_exp_0 (num)) != NULL)
- $$->val.num = $1;
- }
- | '(' exp ')'
- {
- $$ = $2;
- }
- ;
-
-%%
-
-void
-internal_function
-FREE_EXPRESSION (exp)
- struct expression *exp;
-{
- if (exp == NULL)
- return;
-
- /* Handle the recursive case. */
- switch (exp->nargs)
- {
- case 3:
- FREE_EXPRESSION (exp->val.args[2]);
- /* FALLTHROUGH */
- case 2:
- FREE_EXPRESSION (exp->val.args[1]);
- /* FALLTHROUGH */
- case 1:
- FREE_EXPRESSION (exp->val.args[0]);
- /* FALLTHROUGH */
- default:
- break;
- }
-
- free (exp);
-}
-
-
-static int
-yylex (lval, pexp)
- YYSTYPE *lval;
- const char **pexp;
-{
- const char *exp = *pexp;
- int result;
-
- while (1)
- {
- if (exp[0] == '\0')
- {
- *pexp = exp;
- return YYEOF;
- }
-
- if (exp[0] != ' ' && exp[0] != '\t')
- break;
-
- ++exp;
- }
-
- result = *exp++;
- switch (result)
- {
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- {
- unsigned long int n = result - '0';
- while (exp[0] >= '0' && exp[0] <= '9')
- {
- n *= 10;
- n += exp[0] - '0';
- ++exp;
- }
- lval->num = n;
- result = NUMBER;
- }
- break;
-
- case '=':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = equal;
- result = EQUOP2;
- }
- else
- result = YYERRCODE;
- break;
-
- case '!':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = not_equal;
- result = EQUOP2;
- }
- break;
-
- case '&':
- case '|':
- if (exp[0] == result)
- ++exp;
- else
- result = YYERRCODE;
- break;
-
- case '<':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = less_or_equal;
- }
- else
- lval->op = less_than;
- result = CMPOP2;
- break;
-
- case '>':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = greater_or_equal;
- }
- else
- lval->op = greater_than;
- result = CMPOP2;
- break;
-
- case '*':
- lval->op = mult;
- result = MULOP2;
- break;
-
- case '/':
- lval->op = divide;
- result = MULOP2;
- break;
-
- case '%':
- lval->op = module;
- result = MULOP2;
- break;
-
- case '+':
- lval->op = plus;
- result = ADDOP2;
- break;
-
- case '-':
- lval->op = minus;
- result = ADDOP2;
- break;
-
- case 'n':
- case '?':
- case ':':
- case '(':
- case ')':
- /* Nothing, just return the character. */
- break;
-
- case ';':
- case '\n':
- case '\0':
- /* Be safe and let the user call this function again. */
- --exp;
- result = YYEOF;
- break;
-
- default:
- result = YYERRCODE;
-#if YYDEBUG != 0
- --exp;
-#endif
- break;
- }
-
- *pexp = exp;
-
- return result;
-}
-
-
-static void
-yyerror (str)
- const char *str;
-{
- /* Do nothing. We don't print error messages here. */
-}
diff --git a/newlib/libc/sys/linux/intl/stpcpy.c b/newlib/libc/sys/linux/intl/stpcpy.c
deleted file mode 100644
index 0af6c67c8..000000000
--- a/newlib/libc/sys/linux/intl/stpcpy.c
+++ /dev/null
@@ -1,10 +0,0 @@
-char *
-__stpcpy (dest, src)
- char *dest;
- const char *src;
-{
- while ((*dest++ = *src++) != '\0')
- /* Do nothing. */ ;
- return dest - 1;
-}
-
diff --git a/newlib/libc/sys/linux/intl/textdomain.c b/newlib/libc/sys/linux/intl/textdomain.c
deleted file mode 100644
index b03ad8079..000000000
--- a/newlib/libc/sys/linux/intl/textdomain.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* Implementation of the textdomain(3) function.
- Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if defined STDC_HEADERS || defined _LIBC
-# include <stdlib.h>
-#endif
-
-#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef memcpy
-# define memcpy(Dst, Src, Num) (bcopy (Src, Dst, Num), (Dst))
-# endif
-#endif
-
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-#include "gettextP.h"
-
-#ifdef _LIBC
-/* We have to handle multi-threaded applications. */
-# include <bits/libc-lock.h>
-#else
-/* Provide dummy implementation if this is outside glibc. */
-# define __libc_rwlock_define(CLASS, NAME)
-# define __libc_rwlock_wrlock(NAME)
-# define __libc_rwlock_unlock(NAME)
-#endif
-
-/* The internal variables in the standalone libintl.a must have different
- names than the internal variables in GNU libc, otherwise programs
- using libintl.a cannot be linked statically. */
-#if !defined _LIBC
-# define _nl_default_default_domain _nl_default_default_domain__
-# define _nl_current_default_domain _nl_current_default_domain__
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Name of the default text domain. */
-extern const char _nl_default_default_domain[];
-
-/* Default text domain in which entries for gettext(3) are to be found. */
-extern const char *_nl_current_default_domain;
-
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define TEXTDOMAIN __textdomain
-# ifdef _GLIBC
-# ifndef strdup
-# define strdup(str) __strdup (str)
-# endif
-# endif
-#else
-# define TEXTDOMAIN textdomain__
-#endif
-
-/* Lock variable to protect the global data in the gettext implementation. */
-__libc_rwlock_define (extern, _nl_state_lock)
-
-/* Set the current default message catalog to DOMAINNAME.
- If DOMAINNAME is null, return the current default.
- If DOMAINNAME is "", reset to the default of "messages". */
-char *
-TEXTDOMAIN (domainname)
- const char *domainname;
-{
- char *new_domain;
- char *old_domain;
-
- /* A NULL pointer requests the current setting. */
- if (domainname == NULL)
- return (char *) _nl_current_default_domain;
-
- __libc_rwlock_wrlock (_nl_state_lock);
-
- old_domain = (char *) _nl_current_default_domain;
-
- /* If domain name is the null string set to default domain "messages". */
- if (domainname[0] == '\0'
- || strcmp (domainname, _nl_default_default_domain) == 0)
- {
- _nl_current_default_domain = _nl_default_default_domain;
- new_domain = (char *) _nl_current_default_domain;
- }
- else if (strcmp (domainname, old_domain) == 0)
- /* This can happen and people will use it to signal that some
- environment variable changed. */
- new_domain = old_domain;
- else
- {
- /* If the following malloc fails `_nl_current_default_domain'
- will be NULL. This value will be returned and so signals we
- are out of core. */
-#if defined _LIBC || defined HAVE_STRDUP
- new_domain = strdup (domainname);
-#else
- size_t len = strlen (domainname) + 1;
- new_domain = (char *) malloc (len);
- if (new_domain != NULL)
- memcpy (new_domain, domainname, len);
-#endif
-
- if (new_domain != NULL)
- _nl_current_default_domain = new_domain;
- }
-
- /* We use this possibility to signal a change of the loaded catalogs
- since this is most likely the case and there is no other easy we
- to do it. Do it only when the call was successful. */
- if (new_domain != NULL)
- {
- ++_nl_msg_cat_cntr;
-
- if (old_domain != new_domain && old_domain != _nl_default_default_domain)
- free (old_domain);
- }
-
- __libc_rwlock_unlock (_nl_state_lock);
-
- return new_domain;
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__textdomain, textdomain);
-#endif
diff --git a/newlib/libc/sys/linux/io.c b/newlib/libc/sys/linux/io.c
deleted file mode 100644
index d6731144a..000000000
--- a/newlib/libc/sys/linux/io.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* libc/sys/linux/io.c - Basic input/output system calls */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#define __KERNEL_PROTOTYPES
-
-#include <stdarg.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <poll.h>
-#include <machine/syscall.h>
-
-
-#define __NR___ioctl __NR_ioctl
-#define __NR___flock __NR_flock
-#define __NR___mknod __NR_mknod
-
-_syscall3(ssize_t,read,int,fd,void *,buf,size_t,count)
-_syscall3(ssize_t,write,int,fd,const void *,buf,size_t,count)
-_syscall3(int,open,const char *,file,int,flag,mode_t,mode)
-_syscall1(int,close,int,fd)
-_syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
-_syscall0(int,sync)
-_syscall1(int,dup,int,fd)
-_syscall2(int,dup2,int,oldfd,int,newfd)
-_syscall3(int,fcntl,int,fd,int,cmd,long,arg)
-_syscall1(int,fdatasync,int,fd)
-_syscall1(int,fsync,int,fd)
-_syscall3(int,poll,struct pollfd *,fds,nfds_t,nfds,int,timeout)
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 2
-_syscall3(ssize_t,readv,int,fd,const struct iovec *,vec,int,count)
-_syscall3(ssize_t,writev,int,fd,const struct iovec *,buf,int,count)
-#endif
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 4
-_syscall2(int,ftruncate,int,fd,off_t,len)
-_syscall2(int,truncate,const char *,path,off_t,len)
-#endif
-
-static _syscall3(int,__ioctl,int,fd,int,request,void *,arg)
-
-int ioctl(int fd,int request,...)
-{
- va_list ap;
- int res;
-
- va_start(ap,request);
- res = __ioctl(fd,request,va_arg(ap,void *));
- va_end(ap);
- return res;
-}
-
-static _syscall2(long,__flock,unsigned int,fd,unsigned int,cmd)
-
-int flock(int fd,int operation)
-{
- return __flock(fd,operation);
-}
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 3
-
-static _syscall3(int,__mknod,const char *,path,mode_t,mode,dev_t *,dev)
-
-int mkfifo(const char *path, mode_t mode)
-{
- dev_t dev = 0;
- return __mknod(path, mode | S_IFIFO, &dev);
-}
-#endif
-
-weak_alias(__libc_close,__close);
-weak_alias(__libc_fcntl,__fcntl);
-weak_alias(__libc_lseek,__lseek);
-weak_alias(__libc_open,__open);
-weak_alias(__libc_read,__read);
-weak_alias(__libc_write,__write);
-weak_alias(__libc_poll,__poll);
-
diff --git a/newlib/libc/sys/linux/io64.c b/newlib/libc/sys/linux/io64.c
deleted file mode 100644
index 7f87c1e9b..000000000
--- a/newlib/libc/sys/linux/io64.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* libc/sys/linux/io64.c - large file input/output system calls */
-
-/* Copyright 2002, Red Hat Inc. */
-
-
-#define __KERNEL_PROTOTYPES
-
-#include <stdarg.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <machine/syscall.h>
-
-#define __NR___truncate64 __NR_truncate64
-#define __NR___ftruncate64 __NR_ftruncate64
-
-_syscall2(int,fstat64,int,fd,struct stat64 *,st)
-_syscall2(int,lstat64,const char *,name,struct stat64 *,st)
-_syscall2(int,stat64,const char *,name,struct stat64 *,st)
-
-static _syscall3(int,__truncate64,const char *,name,int,high,int,low)
-
-int __libc_truncate64(const char *name, off64_t length)
-{
- return __truncate64(name,(length >> 32), (length & 0xffffffff));
-}
-weak_alias(__libc_truncate64,truncate64)
-
-static _syscall3(int,__ftruncate64,int,fd,int,high,int,low);
-
-int __libc_ftruncate64(int fd, off64_t length)
-{
- return __ftruncate64(fd,(length >> 32),(length & 0xffffffff));
-}
-weak_alias(__libc_ftruncate64,ftruncate64)
-
-static _syscall5(void,_llseek,int,fd,off_t,hi,off_t,lo,loff_t *,pos,int,whence)
-
-loff_t __libc_lseek64(int fd, loff_t offset, int whence)
-{
- loff_t pos;
- __libc__llseek(fd, offset >> 32, offset & 0xffffffff, &pos, whence);
- return pos;
-}
-weak_alias(__libc_lseek64,lseek64);
-weak_alias(__libc_lseek64,_lseek64);
-
-int __libc_open64(const char *path, int oflag, ...)
-{
- mode_t mode = 0;
- if (oflag & O_CREAT)
- {
- va_list list;
- va_start(list, oflag);
- mode = va_arg(list, int);
- va_end(list);
- }
- return __libc_open(path, oflag | O_LARGEFILE, mode);
-}
-weak_alias(__libc_open64,open64);
-weak_alias(__libc_open64,_open64);
-weak_alias(__libc_open64,__open64);
-weak_alias(__libc_fstat64,_fstat64);
-
-
diff --git a/newlib/libc/sys/linux/ipc.c b/newlib/libc/sys/linux/ipc.c
deleted file mode 100644
index 31e225255..000000000
--- a/newlib/libc/sys/linux/ipc.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/* libc/sys/linux/ipc.c - IPC semaphore and message queue functions */
-
-/* Copyright 2002, Red Hat Inc. */
-
-#include <sys/types.h>
-#include <sys/sem.h>
-#include <sys/msg.h>
-#include <stdarg.h>
-
-#include <machine/syscall.h>
-
-#define IPC_64 0x100
-
-#define IPCOP_semop 1
-#define IPCOP_semget 2
-#define IPCOP_semctl 3
-#define IPCOP_msgsnd 11
-#define IPCOP_msgrcv 12
-#define IPCOP_msgget 13
-#define IPCOP_msgctl 14
-
-static _syscall5(int,ipc,int,op,int,arg1,int,arg2,int,arg3,void *,arg4);
-
-int
-semget (key_t key, int nsems, int semflgs)
-{
- return __libc_ipc(IPCOP_semget, (int)key, nsems, semflgs, NULL);
-}
-
-int
-semctl (int semid, int semnum, int cmd, ...)
-{
- va_list va;
- union semun {
- int val;
- struct semid_ds *buf;
- unsigned short *array;
- } arg;
-
- va_start (va, cmd);
-
- arg = va_arg (va, union semun);
-
- va_end (va);
-
- return __libc_ipc(IPCOP_semctl, semid, semnum, cmd | IPC_64, &arg);
-}
-
-int
-semop (int semid, struct sembuf *sops, size_t nsems)
-{
- return __libc_ipc(IPCOP_semop, semid, (int)nsems, 0, sops);
-}
-
-int
-msgget (key_t key, int msgflg)
-{
- return __libc_ipc(IPCOP_msgget, (int)key, msgflg, 0, NULL);
-}
-
-int
-msgctl (int msqid, int cmd, struct msqid_ds *buf)
-{
- return __libc_ipc(IPCOP_msgctl, msqid, cmd | IPC_64, 0, buf);
-}
-
-int
-msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg)
-{
- return __libc_ipc(IPCOP_msgsnd, msqid, (int)msgsz, msgflg, (void *)msgp);
-}
-
-int
-msgrcv (int msqid, void *msgp, size_t msgsz, long int msgtyp, int msgflg)
-{
- /* last argument must contain multiple args */
- struct {
- void *msgp;
- long int msgtyp;
- } args;
-
- args.msgp = msgp;
- args.msgtyp = msgtyp;
-
- return (ssize_t)__libc_ipc(IPCOP_msgrcv, msqid, (int)msgsz, msgflg, &args);
-}
-
diff --git a/newlib/libc/sys/linux/kernel_sigaction.h b/newlib/libc/sys/linux/kernel_sigaction.h
deleted file mode 100644
index d005cbce9..000000000
--- a/newlib/libc/sys/linux/kernel_sigaction.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* This is the sigaction structure from the Linux 2.1.20 kernel. */
-
-#define HAVE_SA_RESTORER
-
-struct old_kernel_sigaction {
- __sighandler_t k_sa_handler;
- unsigned long sa_mask;
- unsigned long sa_flags;
- void (*sa_restorer) (void);
-};
-
-/* This is the sigaction structure from the Linux 2.1.68 kernel. */
-
-struct kernel_sigaction {
- __sighandler_t k_sa_handler;
- unsigned long sa_flags;
- void (*sa_restorer) (void);
- sigset_t sa_mask;
-};
diff --git a/newlib/libc/sys/linux/libc-internal.h b/newlib/libc/sys/linux/libc-internal.h
deleted file mode 100644
index 8369ffec2..000000000
--- a/newlib/libc/sys/linux/libc-internal.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* This file contains a number of internal prototype declarations that
- don't fit anywhere else. */
-
-#ifndef _LIBC_INTERNAL
-# define _LIBC_INTERNAL 1
-
-#include <hp-timing.h>
-
-/* Initialize the `__libc_enable_secure' flag. */
-extern void __libc_init_secure (void);
-
-/* This function will be called from _init in init-first.c. */
-extern void __libc_global_ctors (void);
-
-/* Discover the tick frequency of the machine if something goes wrong,
- we return 0, an impossible hertz. */
-extern int __profile_frequency (void);
-
-/* Hooks for the instrumenting functions. */
-extern void __cyg_profile_func_enter (void *this_fn, void *call_site);
-extern void __cyg_profile_func_exit (void *this_fn, void *call_site);
-
-/* Get frequency of the system processor. */
-extern hp_timing_t __get_clockfreq (void);
-
-/* Free all allocated resources. */
-extern void __libc_freeres (void);
-
-#endif /* _LIBC_INTERNAL */
diff --git a/newlib/libc/sys/linux/libc-symbols.h b/newlib/libc/sys/linux/libc-symbols.h
deleted file mode 100644
index 97b672643..000000000
--- a/newlib/libc/sys/linux/libc-symbols.h
+++ /dev/null
@@ -1,352 +0,0 @@
-/* Support macros for making weak and strong aliases for symbols,
- and for using symbol sets and linker warnings with GNU ld.
- Copyright (C) 1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _LIBC_SYMBOLS_H
-#define _LIBC_SYMBOLS_H 1
-
-/* This file's macros are included implicitly in the compilation of every
- file in the C library by -imacros.
-
- We include config.h which is generated by configure.
- It should define for us the following symbols:
-
- * HAVE_ASM_SET_DIRECTIVE if we have `.set B, A' instead of `A = B'.
- * ASM_GLOBAL_DIRECTIVE with `.globl' or `.global'.
- * HAVE_GNU_LD if using GNU ld, with support for weak symbols in a.out,
- and for symbol set and warning messages extensions in a.out and ELF.
- * HAVE_ELF if using ELF, which supports weak symbols using `.weak'.
- * HAVE_ASM_WEAK_DIRECTIVE if we have weak symbols using `.weak'.
- * HAVE_ASM_WEAKEXT_DIRECTIVE if we have weak symbols using `.weakext'.
-
- */
-
-/* This is defined for the compilation of all C library code. features.h
- tests this to avoid inclusion of stubs.h while compiling the library,
- before stubs.h has been generated. Some library code that is shared
- with other packages also tests this symbol to see if it is being
- compiled as part of the C library. We must define this before including
- config.h, because it makes some definitions conditional on whether libc
- itself is being compiled, or just some generator program. */
-#define _LIBC 1
-
-/* Enable declarations of GNU extensions, since we are compiling them. */
-#define _GNU_SOURCE 1
-/* And we also need the data for the reentrant functions. */
-#define _REENTRANT 1
-
-#include <config.h>
-
-/* The symbols in all the user (non-_) macros are C symbols.
- HAVE_GNU_LD without HAVE_ELF implies a.out. */
-
-#if defined HAVE_ASM_WEAK_DIRECTIVE || defined HAVE_ASM_WEAKEXT_DIRECTIVE
-# define HAVE_WEAK_SYMBOLS
-#endif
-
-#ifndef __SYMBOL_PREFIX
-# ifdef NO_UNDERSCORES
-# define __SYMBOL_PREFIX
-# else
-# define __SYMBOL_PREFIX "_"
-# endif
-#endif
-
-#ifndef C_SYMBOL_NAME
-# ifdef NO_UNDERSCORES
-# define C_SYMBOL_NAME(name) name
-# else
-# define C_SYMBOL_NAME(name) _##name
-# endif
-#endif
-
-#ifndef ASM_LINE_SEP
-# define ASM_LINE_SEP ;
-#endif
-
-#ifndef C_SYMBOL_DOT_NAME
-# define C_SYMBOL_DOT_NAME(name) .##name
-#endif
-
-#ifndef __ASSEMBLER__
-/* GCC understands weak symbols and aliases; use its interface where
- possible, instead of embedded assembly language. */
-
-/* Define ALIASNAME as a strong alias for NAME. */
-# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
-# define _strong_alias(name, aliasname) \
- extern __typeof (name) aliasname __attribute__ ((alias (#name)));
-
-/* This comes between the return type and function name in
- a function definition to make that definition weak. */
-# define weak_function __attribute__ ((weak))
-# define weak_const_function __attribute__ ((weak, __const__))
-
-# ifdef HAVE_WEAK_SYMBOLS
-
-/* Define ALIASNAME as a weak alias for NAME.
- If weak aliases are not available, this defines a strong alias. */
-# define weak_alias(name, aliasname) _weak_alias (name, aliasname)
-# define _weak_alias(name, aliasname) \
- extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
-
-/* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
-# define weak_extern(symbol) _weak_extern (symbol)
-# ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
-# define _weak_extern(symbol) asm (".weakext " __SYMBOL_PREFIX #symbol);
-# else
-# define _weak_extern(symbol) asm (".weak " __SYMBOL_PREFIX #symbol);
-# endif
-
-# else
-
-# define weak_alias(name, aliasname) strong_alias(name, aliasname)
-# define weak_extern(symbol) /* Nothing. */
-
-# endif
-
-#else /* __ASSEMBLER__ */
-
-# ifdef HAVE_ASM_SET_DIRECTIVE
-# define strong_alias(original, alias) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
- .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original)
-# else
-# ifdef HAVE_ASM_GLOBAL_DOT_NAME
-# define strong_alias(original, alias) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
- C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
- C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
-# else
-# define strong_alias(original, alias) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
- C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
-# endif
-# endif
-
-# ifdef HAVE_WEAK_SYMBOLS
-# ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
-# define weak_alias(original, alias) \
- .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
-# define weak_extern(symbol) \
- .weakext C_SYMBOL_NAME (symbol)
-
-# else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
-
-# ifdef HAVE_ASM_GLOBAL_DOT_NAME
-# define weak_alias(original, alias) \
- .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
- C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
- C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
-# else
-# define weak_alias(original, alias) \
- .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
- C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
-# endif
-
-# define weak_extern(symbol) \
- .weak C_SYMBOL_NAME (symbol)
-
-# endif /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
-
-# else /* ! HAVE_WEAK_SYMBOLS */
-
-# define weak_alias(original, alias) strong_alias(original, alias)
-# define weak_extern(symbol) /* Nothing */
-# endif /* ! HAVE_WEAK_SYMBOLS */
-
-#endif /* __ASSEMBLER__ */
-
-/* On some platforms we can make internal function calls (i.e., calls of
- functions not exported) a bit faster by using a different calling
- convention. */
-#ifndef internal_function
-# define internal_function /* empty */
-#endif
-
-/* Prepare for the case that `__builtin_expect' is not available. */
-#ifndef HAVE_BUILTIN_EXPECT
-# define __builtin_expect(expr, val) (expr)
-#endif
-
-/* Determine the return address. */
-#define RETURN_ADDRESS(nr) \
- __builtin_extract_return_addr (__builtin_return_address (nr))
-
-/* When a reference to SYMBOL is encountered, the linker will emit a
- warning message MSG. */
-#ifdef HAVE_GNU_LD
-# ifdef HAVE_ELF
-
-/* We want the .gnu.warning.SYMBOL section to be unallocated. */
-# ifdef HAVE_ASM_PREVIOUS_DIRECTIVE
-# define __make_section_unallocated(section_string) \
- asm (".section " section_string "\n\t.previous");
-# elif defined HAVE_ASM_POPSECTION_DIRECTIVE
-# define __make_section_unallocated(section_string) \
- asm (".pushsection " section_string "\n\t.popsection");
-# else
-# define __make_section_unallocated(section_string)
-# endif
-
-/* Tacking on "\n\t#" to the section name makes gcc put it's bogus
- section attributes on what looks like a comment to the assembler. */
-# ifdef HAVE_SECTION_QUOTES
-# define link_warning(symbol, msg) \
- __make_section_unallocated (".gnu.warning." #symbol) \
- static const char __evoke_link_warning_##symbol[] \
- __attribute__ ((section (".gnu.warning." #symbol "\"\n\t#\""))) = msg;
-# else
-# define link_warning(symbol, msg) \
- __make_section_unallocated (".gnu.warning." #symbol) \
- static const char __evoke_link_warning_##symbol[] \
- __attribute__ ((section (".gnu.warning." #symbol "\n\t#"))) = msg;
-# endif
-# else /* Not ELF: a.out */
-# ifdef HAVE_XCOFF
-/* XCOFF does not support .stabs.
- The native aix linker will remove the .stab and .stabstr sections
- The gnu linker will have a fatal error if there is a relocation for
- symbol in the .stab section. Silently disable this macro. */
-# define link_warning(symbol, msg)
-# else
-# define link_warning(symbol, msg) \
- asm (".stabs \"" msg "\",30,0,0,0\n\t" \
- ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
-# endif /* XCOFF */
-# endif
-#else
-/* We will never be heard; they will all die horribly. */
-# define link_warning(symbol, msg)
-#endif
-
-/* A canned warning for sysdeps/stub functions. */
-#define stub_warning(name) \
- link_warning (name, \
- "warning: " #name " is not implemented and will always fail")
-
-/*
-
-*/
-
-#ifdef HAVE_GNU_LD
-
-/* Symbol set support macros. */
-
-# ifdef HAVE_ELF
-
-/* Make SYMBOL, which is in the text segment, an element of SET. */
-# define text_set_element(set, symbol) _elf_set_element(set, symbol)
-/* Make SYMBOL, which is in the data segment, an element of SET. */
-# define data_set_element(set, symbol) _elf_set_element(set, symbol)
-/* Make SYMBOL, which is in the bss segment, an element of SET. */
-# define bss_set_element(set, symbol) _elf_set_element(set, symbol)
-
-/* These are all done the same way in ELF.
- There is a new section created for each set. */
-# ifdef SHARED
-/* When building a shared library, make the set section writable,
- because it will need to be relocated at run time anyway. */
-# define _elf_set_element(set, symbol) \
- static const void *__elf_set_##set##_element_##symbol##__ \
- __attribute__ ((unused, section (#set))) = &(symbol)
-# else
-# define _elf_set_element(set, symbol) \
- static const void *const __elf_set_##set##_element_##symbol##__ \
- __attribute__ ((unused, section (#set))) = &(symbol)
-# endif
-
-/* Define SET as a symbol set. This may be required (it is in a.out) to
- be able to use the set's contents. */
-# define symbol_set_define(set) symbol_set_declare(set)
-
-/* Declare SET for use in this module, if defined in another module. */
-# define symbol_set_declare(set) \
- extern void *const __start_##set __attribute__ ((__weak__)); \
- extern void *const __stop_##set __attribute__ ((__weak__)); \
- weak_extern (__start_##set) weak_extern (__stop_##set)
-
-/* Return a pointer (void *const *) to the first element of SET. */
-# define symbol_set_first_element(set) (&__start_##set)
-
-/* Return true iff PTR (a void *const *) has been incremented
- past the last element in SET. */
-# define symbol_set_end_p(set, ptr) ((ptr) >= &__stop_##set)
-
-# else /* Not ELF: a.out. */
-
-# ifdef HAVE_XCOFF
-/* XCOFF does not support .stabs.
- The native aix linker will remove the .stab and .stabstr sections
- The gnu linker will have a fatal error if there is a relocation for
- symbol in the .stab section. Silently disable these macros. */
-# define text_set_element(set, symbol)
-# define data_set_element(set, symbol)
-# define bss_set_element(set, symbol)
-# else
-# define text_set_element(set, symbol) \
- asm (".stabs \"" __SYMBOL_PREFIX #set "\",23,0,0," __SYMBOL_PREFIX #symbol)
-# define data_set_element(set, symbol) \
- asm (".stabs \"" __SYMBOL_PREFIX #set "\",25,0,0," __SYMBOL_PREFIX #symbol)
-# define bss_set_element(set, symbol) ?error Must use initialized data.
-# endif /* XCOFF */
-# define symbol_set_define(set) void *const (set)[1];
-# define symbol_set_declare(set) extern void *const (set)[1];
-
-# define symbol_set_first_element(set) &(set)[1]
-# define symbol_set_end_p(set, ptr) (*(ptr) == 0)
-
-# endif /* ELF. */
-#else
-/* We cannot do anything in generial. */
-# define text_set_element(set, symbol) asm ("")
-# define data_set_element(set, symbol) asm ("")
-# define bss_set_element(set, symbol) asm ("")
-# define symbol_set_define(set) void *const (set)[1];
-# define symbol_set_declare(set) extern void *const (set)[1];
-
-# define symbol_set_first_element(set) &(set)[1]
-# define symbol_set_end_p(set, ptr) (*(ptr) == 0)
-#endif /* Have GNU ld. */
-
-#if DO_VERSIONING
-# define symbol_version(real, name, version) \
- _symbol_version(real, name, version)
-# define default_symbol_version(real, name, version) \
- _default_symbol_version(real, name, version)
-# ifdef __ASSEMBLER__
-# define _symbol_version(real, name, version) \
- .symver real, name##@##version
-# define _default_symbol_version(real, name, version) \
- .symver real, name##@##@##version
-# else
-# define _symbol_version(real, name, version) \
- __asm__ (".symver " #real "," #name "@" #version)
-# define _default_symbol_version(real, name, version) \
- __asm__ (".symver " #real "," #name "@@" #version)
-# endif
-#else
-# define symbol_version(real, name, version)
-# define default_symbol_version(real, name, version) \
- strong_alias(real, name)
-#endif
-
-#endif /* libc-symbols.h */
diff --git a/newlib/libc/sys/linux/libc-tsd.h b/newlib/libc/sys/linux/libc-tsd.h
deleted file mode 100644
index 7a532ea74..000000000
--- a/newlib/libc/sys/linux/libc-tsd.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* libc-internal interface for thread-specific data. LinuxThreads version.
- Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _BITS_LIBC_TSD_H
-#define _BITS_LIBC_TSD_H 1
-
-
-/* Fast thread-specific data internal to libc. */
-enum __libc_tsd_key_t { _LIBC_TSD_KEY_MALLOC = 0,
- _LIBC_TSD_KEY_DL_ERROR,
- _LIBC_TSD_KEY_RPC_VARS,
- _LIBC_TSD_KEY_N };
-
-extern void *(*__libc_internal_tsd_get) (enum __libc_tsd_key_t) __THROW;
-extern int (*__libc_internal_tsd_set) (enum __libc_tsd_key_t,
- __const void *) __THROW;
-
-#define __libc_tsd_define(CLASS, KEY) CLASS void *__libc_tsd_##KEY##_data;
-#define __libc_tsd_get(KEY) \
- (__libc_internal_tsd_get != NULL \
- ? __libc_internal_tsd_get (_LIBC_TSD_KEY_##KEY) \
- : __libc_tsd_##KEY##_data)
-#define __libc_tsd_set(KEY, VALUE) \
- (__libc_internal_tsd_set != NULL \
- ? __libc_internal_tsd_set (_LIBC_TSD_KEY_##KEY, (VALUE)) \
- : ((__libc_tsd_##KEY##_data = (VALUE)), 0))
-
-#endif /* bits/libc-tsd.h */
diff --git a/newlib/libc/sys/linux/libintl.h b/newlib/libc/sys/linux/libintl.h
deleted file mode 100644
index 203a2c852..000000000
--- a/newlib/libc/sys/linux/libintl.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* temporary internal libintl.h to ignore message translation for now */
-
-#ifndef _LIBINTL_H
-#define _LIBINTL_H 1
-
-#undef _
-#define _(x) (x)
-
-#endif
diff --git a/newlib/libc/sys/linux/linux.c b/newlib/libc/sys/linux/linux.c
deleted file mode 100644
index ae11c3ffb..000000000
--- a/newlib/libc/sys/linux/linux.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* libc/sys/linux/linux.c - System-specific system calls */
-
-/* Written 2000 by Werner Almesberger */
-
-
-/*
- * Most system call wrappers have moved to utilities; future fate of this file
- * is guided by glibc/autoconf compatibility and FFS
- */
-
-#include <machine/syscall.h>
-
-
-/* _syscall1(int,delete_module,const char *,name) */
diff --git a/newlib/libc/sys/linux/linux_fsinfo.h b/newlib/libc/sys/linux/linux_fsinfo.h
deleted file mode 100644
index 692abe5de..000000000
--- a/newlib/libc/sys/linux/linux_fsinfo.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/* Constants from kernel header for various FSes.
- Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _LINUX_FSINFO_H
-#define _LINUX_FSINFO_H 1
-
-/* These definitions come from the kernel headers. But we cannot
- include the headers here because of type clashes. If new
- filesystem types will become available we have to add the
- appropriate definitions here.*/
-
-/* Constants that identify the `adfs' filesystem. */
-#define ADFS_SUPER_MAGIC 0xadf5
-
-/* Constants that identify the `affs' filesystem. */
-#define AFFS_SUPER_MAGIC 0xadff
-
-/* Constants that identify the `bfs' filesystem. */
-#define BFS_MAGIC 0x1BADFACE
-
-/* Constants that identify the `coda' filesystem. */
-#define CODA_SUPER_MAGIC 0x73757245
-
-/* Constants that identify the `coherent' filesystem. */
-#define COH_SUPER_MAGIC 0x012ff7b7
-
-/* Constant that identifies the `devfs' filesystem. */
-#define DEVFS_SUPER_MAGIC 0x1373
-
-/* Constant that identifies the `devpts' filesystem. */
-#define DEVPTS_SUPER_MAGIC 0x1cd1
-
-/* Constant that identifies the `efs' filesystem. */
-#define EFS_SUPER_MAGIC 0x414A53
-
-/* Constant that identifies the `ext2' and `ext3' filesystems. */
-#define EXT2_SUPER_MAGIC 0xef53
-
-/* Constant that identifies the `hpfs' filesystem. */
-#define HPFS_SUPER_MAGIC 0xf995e849
-
-/* Constant that identifies the `iso9660' filesystem. */
-#define ISOFS_SUPER_MAGIC 0x9660
-
-/* Constants that identify the `minix2' filesystem. */
-#define MINIX2_SUPER_MAGIC 0x2468
-#define MINIX2_SUPER_MAGIC2 0x2478
-
-/* Constants that identify the `minix' filesystem. */
-#define MINIX_SUPER_MAGIC 0x137f
-#define MINIX_SUPER_MAGIC2 0x138F
-
-/* Constants that identify the `msdos' filesystem. */
-#define MSDOS_SUPER_MAGIC 0x4d44
-
-/* Constants that identify the `ncp' filesystem. */
-#define NCP_SUPER_MAGIC 0x564c
-
-/* Constants that identify the `nfs' filesystem. */
-#define NFS_SUPER_MAGIC 0x6969
-
-/* Constants that identify the `proc' filesystem. */
-#define PROC_SUPER_MAGIC 0x9fa0
-
-/* Constants that identify the `qnx4' filesystem. */
-#define QNX4_SUPER_MAGIC 0x002f
-
-/* Constants that identify the `reiser' filesystem. */
-#define REISERFS_SUPER_MAGIC 0x52654973
-
-/* Constants that identify the `smb' filesystem. */
-#define SMB_SUPER_MAGIC 0x517b
-
-/* Constants that identify the `sysV' filesystem. */
-#define SYSV2_SUPER_MAGIC 0x012ff7b6
-#define SYSV4_SUPER_MAGIC 0x012ff7b5
-
-/* Constants that identify the `ufs' filesystem. */
-#define UFS_MAGIC 0x00011954
-#define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */
-
-/* Constants that identify the `xenix' filesystem. */
-#define XENIX_SUPER_MAGIC 0x012ff7b4
-
-/* Constant that identifies the `shm' filesystem. */
-#define SHMFS_SUPER_MAGIC 0x01021994
-
-/* Maximum link counts. */
-#define COH_LINK_MAX 10000
-#define EXT2_LINK_MAX 32000
-#define MINIX2_LINK_MAX 65530
-#define MINIX_LINK_MAX 250
-#define REISERFS_LINK_MAX 64535
-#define SYSV_LINK_MAX 126 /* 127? 251? */
-#define UFS_LINK_MAX EXT2_LINK_MAX
-#define XENIX_LINK_MAX 126 /* ?? */
-
-#endif /* linux_fsinfo.h */
diff --git a/newlib/libc/sys/linux/linuxthreads/LICENSE b/newlib/libc/sys/linux/linuxthreads/LICENSE
deleted file mode 100644
index 7bcca6050..000000000
--- a/newlib/libc/sys/linux/linuxthreads/LICENSE
+++ /dev/null
@@ -1,501 +0,0 @@
-GNU LIBRARY GENERAL PUBLIC LICENSE
-**********************************
-
- Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 59 Temple Place -- Suite 330, Boston, MA 02111-1307, USA
-
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- [This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
-Preamble
-========
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it. You can use it for
-your libraries, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it in
-new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the library, or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
- Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library. If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software. To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License, which was designed for utility
-programs. This license, the GNU Library General Public License,
-applies to certain designated libraries. This license is quite
-different from the ordinary one; be sure to read it in full, and don't
-assume that anything in it is the same as in the ordinary license.
-
- The reason we have a separate public license for some libraries is
-that they blur the distinction we usually make between modifying or
-adding to a program and simply using it. Linking a program with a
-library, without changing the library, is in some sense simply using
-the library, and is analogous to running a utility program or
-application program. However, in a textual and legal sense, the linked
-executable is a combined work, a derivative of the original library,
-and the ordinary General Public License treats it as such.
-
- Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries. We
-concluded that weaker conditions might promote sharing better.
-
- However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves. This Library General Public License is intended
-to permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them. (We have not seen how to
-achieve this as regards changes in header files, but we have achieved
-it as regards changes in the actual functions of the Library.) The
-hope is that this will lead to faster development of free libraries.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, while the latter only
-works together with the library.
-
- Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
-
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library which
- contains a notice placed by the copyright holder or other
- authorized party saying it may be distributed under the terms of
- this Library General Public License (also called "this License").
- Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
- prepared so as to be conveniently linked with application programs
- (which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
- which has been distributed under these terms. A "work based on the
- Library" means either the Library or any derivative work under
- copyright law: that is to say, a work containing the Library or a
- portion of it, either verbatim or with modifications and/or
- translated straightforwardly into another language. (Hereinafter,
- translation is included without limitation in the term
- "modification".)
-
- "Source code" for a work means the preferred form of the work for
- making modifications to it. For a library, complete source code
- means all the source code for all modules it contains, plus any
- associated interface definition files, plus the scripts used to
- control compilation and installation of the library.
-
- Activities other than copying, distribution and modification are
- not covered by this License; they are outside its scope. The act
- of running a program using the Library is not restricted, and
- output from such a program is covered only if its contents
- constitute a work based on the Library (independent of the use of
- the Library in a tool for writing it). Whether that is true
- depends on what the Library does and what the program that uses
- the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
- complete source code as you receive it, in any medium, provided
- that you conspicuously and appropriately publish on each copy an
- appropriate copyright notice and disclaimer of warranty; keep
- intact all the notices that refer to this License and to the
- absence of any warranty; and distribute a copy of this License
- along with the Library.
-
- You may charge a fee for the physical act of transferring a copy,
- and you may at your option offer warranty protection in exchange
- for a fee.
-
- 2. You may modify your copy or copies of the Library or any portion
- of it, thus forming a work based on the Library, and copy and
- distribute such modifications or work under the terms of Section 1
- above, provided that you also meet all of these conditions:
-
- a. The modified work must itself be a software library.
-
- b. You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c. You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d. If a facility in the modified Library refers to a function or
- a table of data to be supplied by an application program that
- uses the facility, other than as an argument passed when the
- facility is invoked, then you must make a good faith effort
- to ensure that, in the event an application does not supply
- such function or table, the facility still operates, and
- performs whatever part of its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots
- has a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function
- must be optional: if the application does not supply it, the
- square root function must still compute square roots.)
-
- These requirements apply to the modified work as a whole. If
- identifiable sections of that work are not derived from the
- Library, and can be reasonably considered independent and separate
- works in themselves, then this License, and its terms, do not
- apply to those sections when you distribute them as separate
- works. But when you distribute the same sections as part of a
- whole which is a work based on the Library, the distribution of
- the whole must be on the terms of this License, whose permissions
- for other licensees extend to the entire whole, and thus to each
- and every part regardless of who wrote it.
-
- Thus, it is not the intent of this section to claim rights or
- contest your rights to work written entirely by you; rather, the
- intent is to exercise the right to control the distribution of
- derivative or collective works based on the Library.
-
- In addition, mere aggregation of another work not based on the
- Library with the Library (or with a work based on the Library) on
- a volume of a storage or distribution medium does not bring the
- other work under the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
- License instead of this License to a given copy of the Library.
- To do this, you must alter all the notices that refer to this
- License, so that they refer to the ordinary GNU General Public
- License, version 2, instead of to this License. (If a newer
- version than version 2 of the ordinary GNU General Public License
- has appeared, then you can specify that version instead if you
- wish.) Do not make any other change in these notices.
-
- Once this change is made in a given copy, it is irreversible for
- that copy, so the ordinary GNU General Public License applies to
- all subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
- the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
- derivative of it, under Section 2) in object code or executable
- form under the terms of Sections 1 and 2 above provided that you
- accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software
- interchange.
-
- If distribution of object code is made by offering access to copy
- from a designated place, then offering equivalent access to copy
- the source code from the same place satisfies the requirement to
- distribute the source code, even though third parties are not
- compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
- Library, but is designed to work with the Library by being
- compiled or linked with it, is called a "work that uses the
- Library". Such a work, in isolation, is not a derivative work of
- the Library, and therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
- creates an executable that is a derivative of the Library (because
- it contains portions of the Library), rather than a "work that
- uses the library". The executable is therefore covered by this
- License. Section 6 states terms for distribution of such
- executables.
-
- When a "work that uses the Library" uses material from a header
- file that is part of the Library, the object code for the work may
- be a derivative work of the Library even though the source code is
- not. Whether this is true is especially significant if the work
- can be linked without the Library, or if the work is itself a
- library. The threshold for this to be true is not precisely
- defined by law.
-
- If such an object file uses only numerical parameters, data
- structure layouts and accessors, and small macros and small inline
- functions (ten lines or less in length), then the use of the object
- file is unrestricted, regardless of whether it is legally a
- derivative work. (Executables containing this object code plus
- portions of the Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
- distribute the object code for the work under the terms of Section
- 6. Any executables containing that work also fall under Section 6,
- whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also compile or
- link a "work that uses the Library" with the Library to produce a
- work containing portions of the Library, and distribute that work
- under terms of your choice, provided that the terms permit
- modification of the work for the customer's own use and reverse
- engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
- Library is used in it and that the Library and its use are covered
- by this License. You must supply a copy of this License. If the
- work during execution displays copyright notices, you must include
- the copyright notice for the Library among them, as well as a
- reference directing the user to the copy of this License. Also,
- you must do one of these things:
-
- a. Accompany the work with the complete corresponding
- machine-readable source code for the Library including
- whatever changes were used in the work (which must be
- distributed under Sections 1 and 2 above); and, if the work
- is an executable linked with the Library, with the complete
- machine-readable "work that uses the Library", as object code
- and/or source code, so that the user can modify the Library
- and then relink to produce a modified executable containing
- the modified Library. (It is understood that the user who
- changes the contents of definitions files in the Library will
- not necessarily be able to recompile the application to use
- the modified definitions.)
-
- b. Accompany the work with a written offer, valid for at least
- three years, to give the same user the materials specified in
- Subsection 6a, above, for a charge no more than the cost of
- performing this distribution.
-
- c. If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the
- above specified materials from the same place.
-
- d. Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
- Library" must include any data and utility programs needed for
- reproducing the executable from it. However, as a special
- exception, the source code distributed need not include anything
- that is normally distributed (in either source or binary form)
- with the major components (compiler, kernel, and so on) of the
- operating system on which the executable runs, unless that
- component itself accompanies the executable.
-
- It may happen that this requirement contradicts the license
- restrictions of other proprietary libraries that do not normally
- accompany the operating system. Such a contradiction means you
- cannot use both them and the Library together in an executable
- that you distribute.
-
- 7. You may place library facilities that are a work based on the
- Library side-by-side in a single library together with other
- library facilities not covered by this License, and distribute
- such a combined library, provided that the separate distribution
- of the work based on the Library and of the other library
- facilities is otherwise permitted, and provided that you do these
- two things:
-
- a. Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b. Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same
- work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute the
- Library except as expressly provided under this License. Any
- attempt otherwise to copy, modify, sublicense, link with, or
- distribute the Library is void, and will automatically terminate
- your rights under this License. However, parties who have
- received copies, or rights, from you under this License will not
- have their licenses terminated so long as such parties remain in
- full compliance.
-
- 9. You are not required to accept this License, since you have not
- signed it. However, nothing else grants you permission to modify
- or distribute the Library or its derivative works. These actions
- are prohibited by law if you do not accept this License.
- Therefore, by modifying or distributing the Library (or any work
- based on the Library), you indicate your acceptance of this
- License to do so, and all its terms and conditions for copying,
- distributing or modifying the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
- Library), the recipient automatically receives a license from the
- original licensor to copy, distribute, link with or modify the
- Library subject to these terms and conditions. You may not impose
- any further restrictions on the recipients' exercise of the rights
- granted herein. You are not responsible for enforcing compliance
- by third parties to this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
- infringement or for any other reason (not limited to patent
- issues), conditions are imposed on you (whether by court order,
- agreement or otherwise) that contradict the conditions of this
- License, they do not excuse you from the conditions of this
- License. If you cannot distribute so as to satisfy simultaneously
- your obligations under this License and any other pertinent
- obligations, then as a consequence you may not distribute the
- Library at all. For example, if a patent license would not permit
- royalty-free redistribution of the Library by all those who
- receive copies directly or indirectly through you, then the only
- way you could satisfy both it and this License would be to refrain
- entirely from distribution of the Library.
-
- If any portion of this section is held invalid or unenforceable
- under any particular circumstance, the balance of the section is
- intended to apply, and the section as a whole is intended to apply
- in other circumstances.
-
- It is not the purpose of this section to induce you to infringe any
- patents or other property right claims or to contest validity of
- any such claims; this section has the sole purpose of protecting
- the integrity of the free software distribution system which is
- implemented by public license practices. Many people have made
- generous contributions to the wide range of software distributed
- through that system in reliance on consistent application of that
- system; it is up to the author/donor to decide if he or she is
- willing to distribute software through any other system and a
- licensee cannot impose that choice.
-
- This section is intended to make thoroughly clear what is believed
- to be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
- certain countries either by patents or by copyrighted interfaces,
- the original copyright holder who places the Library under this
- License may add an explicit geographical distribution limitation
- excluding those countries, so that distribution is permitted only
- in or among countries not thus excluded. In such case, this
- License incorporates the limitation as if written in the body of
- this License.
-
- 13. The Free Software Foundation may publish revised and/or new
- versions of the Library General Public License from time to time.
- Such new versions will be similar in spirit to the present version,
- but may differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
- Library specifies a version number of this License which applies
- to it and "any later version", you have the option of following
- the terms and conditions either of that version or of any later
- version published by the Free Software Foundation. If the Library
- does not specify a license version number, you may choose any
- version ever published by the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
- programs whose distribution conditions are incompatible with these,
- write to the author to ask for permission. For software which is
- copyrighted by the Free Software Foundation, write to the Free
- Software Foundation; we sometimes make exceptions for this. Our
- decision will be guided by the two goals of preserving the free
- status of all derivatives of our free software and of promoting
- the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
- WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE
- LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
- HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT
- WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
- NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE
- QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE
- LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
- SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
- WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
- MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE
- LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
- INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
- INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF
- DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
- OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY
- OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
-How to Apply These Terms to Your New Libraries
-==============================================
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of
-the ordinary General Public License).
-
- To apply these terms, attach the following notices to the library.
-It is safest to attach them to the start of each source file to most
-effectively convey the exclusion of warranty; and each file should have
-at least the "copyright" line and a pointer to where the full notice is
-found.
-
- ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES.
- Copyright (C) YEAR NAME OF AUTHOR
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2 of the License, or (at
- your option) any later version.
-
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-
- Also add information on how to contact you by electronic and paper
-mail.
-
- You should also get your employer (if you work as a programmer) or
-your school, if any, to sign a "copyright disclaimer" for the library,
-if necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the library
- `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- SIGNATURE OF TY COON, 1 April 1990
- Ty Coon, President of Vice
-
- That's all there is to it!
-
diff --git a/newlib/libc/sys/linux/linuxthreads/Makefile.am b/newlib/libc/sys/linux/linuxthreads/Makefile.am
deleted file mode 100644
index 0122d668b..000000000
--- a/newlib/libc/sys/linux/linuxthreads/Makefile.am
+++ /dev/null
@@ -1,142 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/../include -I$(srcdir)/machine/$(machine_dir) -I$(srcdir)/machine/generic $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -I$(srcdir)/..
-
-LIBTOOL_VERSION_INFO = 0:0:0
-
-LIB_SOURCES= \
- attr.c barrier.c condvar.c \
- events.c getcpuclockid.c getreent.c join.c lockfile.c manager.c \
- mq_notify.c oldsemaphore.c prio.c ptclock_gettime.c ptclock_settime.c \
- ptlongjmp.c pt-machine.c reent.c rwlock.c semaphore.c \
- signals.c spinlock.c sysctl.c \
- timer_create.c timer_getoverr.c timer_routines.c \
- timer_delete.c timer_gettime.c timer_settime.c \
- wrapsyscall.c
-
-LIB_DB_SOURCES = td_init.c td_log.c td_ta_delete.c td_ta_get_nthreads.c \
- td_ta_get_ph.c td_ta_map_id2thr.c td_ta_map_lwp2thr.c \
- td_ta_new.c td_ta_thr_iter.c td_ta_tsd_iter.c \
- td_thr_get_info.c td_thr_getfpregs.c td_thr_getgregs.c \
- td_thr_getxregs.c td_thr_getxregsize.c td_thr_setfpregs.c \
- td_thr_setgregs.c td_thr_setprio.c td_thr_setsigpending.c \
- td_thr_setxregs.c td_thr_sigsetmask.c td_thr_tsd.c \
- td_thr_validate.c td_thr_dbsuspend.c td_thr_dbresume.c \
- td_ta_setconcurrency.c td_ta_enable_stats.c \
- td_ta_reset_stats.c td_ta_get_stats.c td_ta_event_addr.c \
- td_thr_event_enable.c td_thr_set_event.c \
- td_thr_clear_event.c td_thr_event_getmsg.c \
- td_ta_set_event.c td_ta_event_getmsg.c \
- td_ta_clear_event.c td_symbol_list.c
-
-# Because of how libtool moves objects around, these files must be built last.
-LIBADD_OBJS = mutex.$(oext) specific.$(oext) pthread.$(oext) \
- cancel.$(oext)
-
-ELIX_3_OBJS = \
- ptfork.$(oext)
-
-if ELIX_LEVEL_1
-EXTRA_OBJS = reqsyscalls.$(oext)
-else
-if ELIX_LEVEL_2
-EXTRA_OBJS = reqsyscalls.$(oext)
-else
-EXTRA_OBJS = $(ELIX_3_OBJS)
-endif
-endif
-
-SUBDIRS = machine .
-
-tooldir = $(tooldir)
-toollibdir = $(top_toollibdir)
-
-libpthread_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) -release newlib -no-undefined -lgcc -Xcompiler -nostdlib -Xlinker --version-script=$(srcdir)/../shared.ld `cat extra-libtool-objlist`
-libthread_db_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) -release newlib -no-undefined -lgcc -Xcompiler -nostdlib -Xlinker --version-script=$(srcdir)/../shared.ld
-
-if USE_LIBTOOL
-
-# objects listed later in LIBPTHREAD_OBJLISTS will override those listed earlier
-extra-libtool-objlist: $(MACHINE_OBJLIST)
- cat $(MACHINE_OBJLIST) | $(AWK) '{ libpthread[$$1] = $$2 }; END { for (x in libpthread) printf ("%s\n", libpthread[x]) }' > $@
-
-toollib_LTLIBRARIES = libpthread.la libthread_db.la
-libpthread_la_SOURCES = $(LIB_SOURCES)
-libpthread_la_LIBADD = $(LIBADD_OBJS) $(EXTRA_OBJS)
-## libpthread_la_DEPENDENCIES = defs.h crti.S
-libpthread_la_DEPENDENCIES = $(LIBADD_OBJS) $(EXTRA_OBJS) extra-libtool-objlist
-noinst_DATA=objectlist.awk.in
-LIB_COMPILE = $(LTCOMPILE)
-
-libthread_db_la_SOURCES = $(LIB_DB_SOURCES)
-
-else
-
-toollib_LIBRARIES = libpthread.a libthread_db.a
-libpthread_a_SOURCES = $(LIB_SOURCES)
-libpthread_a_LIBADD = $(LIBADD_OBJS) $(EXTRA_OBJS) $(MACHINE_LIB)
-## libpthread_a_DEPENDENCIES = defs.h crti.S
-libpthread_a_DEPENDENCIES = $(LIBADD_OBJS) $(EXTRA_OBJS) $(MACHINE_LIB)
-LIB_COMPILE = $(COMPILE)
-
-libthread_db_a_SOURCES = $(LIB_DB_SOURCES)
-
-endif # USE_LIBTOOL
-
-include $(srcdir)/../../../../Makefile.shared
-
-doc:
-
-install-data-local: install-toollibLIBRARIES
- -rm -f $(DESTDIR)$(toollibdir)/libthread_db.so.1
- ln -s `readlink $(DESTDIR)$(toollibdir)/libthread_db.so` \
- $(DESTDIR)$(toollibdir)/libthread_db.so.1 \
- || cp $(DESTDIR)$(toollibdir)/libthread_db.so \
- $(DESTDIR)$(toollibdir)/libthread_db.so.1
-
-AM_CFLAGS = -D_XOPEN_SOURCE=600 -D_GNU_SOURCE=1
-ACLOCAL_AMFLAGS = -I ../../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-
-## PTHREAD_HEADERS=pthread.h semaphore.h
-
-CFLAGS_pt_initfini = -g0 -fPIC -fno-inline-functions
-CFLAGS_noweak=-D__NO_WEAK_PTHREAD_ALIASES
-CFLAGS_cancel=-D__NO_WEAK_PTHREAD_ALIASES -D_RPC_THREAD_SAFE_
-CFLAGS_pthread=-D__NO_WEAK_PTHREAD_ALIASES -DHAVE_Z_NODELETE
-
-pt-initfini.s: $(srcdir)/pt-initfini.c
- $(CC) -S $(CFLAGS_pt_initfini) -finhibit-size-directive \
- $(patsubst -f%,-fno-%,$(exceptions)) -o $@
-
-# We only have one kind of startup code files. Static binaries and
-# shared libraries are build using the PIC version.
-crti.S: pt-initfini.s
- sed -n -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@
-
-defs.h: pt-initfini.s
- sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
- $(AWK) -f defs.awk > $@
-
-crti.o: crti.S defs.h
- $(CC) -g0 $(ASFLAGS) -o $@
-
-mutex.$(oext): $(srcdir)/mutex.c
- $(LIB_COMPILE) $(CFLAGS_noweak) -c $< -o $@
-
-specific.$(oext): $(srcdir)/specific.c
- $(LIB_COMPILE) $(CFLAGS_noweak) -c $< -o $@
-
-pthread.$(oext): $(srcdir)/pthread.c
- $(LIB_COMPILE) $(CFLAGS_pthread) -c $< -o $@
-
-ptfork.$(oext): $(srcdir)/ptfork.c
- $(LIB_COMPILE) $(CFLAGS_noweak) -c $< -o $@
-
-cancel.$(oext): $(srcdir)/cancel.c
- $(LIB_COMPILE) $(CFLAGS_cancel) -c $< -o $@
-
diff --git a/newlib/libc/sys/linux/linuxthreads/Makefile.in b/newlib/libc/sys/linux/linuxthreads/Makefile.in
deleted file mode 100644
index d957b0545..000000000
--- a/newlib/libc/sys/linux/linuxthreads/Makefile.in
+++ /dev/null
@@ -1,685 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-AWK = @AWK@
-CC = @CC@
-CPP = @CPP@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-EXEEXT = @EXEEXT@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-MACHINE_LIB = @MACHINE_LIB@
-MACHINE_OBJLIST = @MACHINE_OBJLIST@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/../include -I$(srcdir)/machine/$(machine_dir) -I$(srcdir)/machine/generic $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -I$(srcdir)/..
-
-LIBTOOL_VERSION_INFO = 0:0:0
-
-LIB_SOURCES = attr.c barrier.c condvar.c events.c getcpuclockid.c getreent.c join.c lockfile.c manager.c mq_notify.c oldsemaphore.c prio.c ptclock_gettime.c ptclock_settime.c ptlongjmp.c pt-machine.c reent.c rwlock.c semaphore.c signals.c spinlock.c sysctl.c timer_create.c timer_getoverr.c timer_routines.c timer_delete.c timer_gettime.c timer_settime.c wrapsyscall.c
-
-
-LIB_DB_SOURCES = td_init.c td_log.c td_ta_delete.c td_ta_get_nthreads.c td_ta_get_ph.c td_ta_map_id2thr.c td_ta_map_lwp2thr.c td_ta_new.c td_ta_thr_iter.c td_ta_tsd_iter.c td_thr_get_info.c td_thr_getfpregs.c td_thr_getgregs.c td_thr_getxregs.c td_thr_getxregsize.c td_thr_setfpregs.c td_thr_setgregs.c td_thr_setprio.c td_thr_setsigpending.c td_thr_setxregs.c td_thr_sigsetmask.c td_thr_tsd.c td_thr_validate.c td_thr_dbsuspend.c td_thr_dbresume.c td_ta_setconcurrency.c td_ta_enable_stats.c td_ta_reset_stats.c td_ta_get_stats.c td_ta_event_addr.c td_thr_event_enable.c td_thr_set_event.c td_thr_clear_event.c td_thr_event_getmsg.c td_ta_set_event.c td_ta_event_getmsg.c td_ta_clear_event.c td_symbol_list.c
-
-
-# Because of how libtool moves objects around, these files must be built last.
-LIBADD_OBJS = mutex.$(oext) specific.$(oext) pthread.$(oext) cancel.$(oext)
-
-
-ELIX_3_OBJS = ptfork.$(oext)
-
-@ELIX_LEVEL_1_TRUE@EXTRA_OBJS = reqsyscalls.$(oext)
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@EXTRA_OBJS = reqsyscalls.$(oext)
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@EXTRA_OBJS = $(ELIX_3_OBJS)
-
-SUBDIRS = machine .
-
-tooldir = $(tooldir)
-toollibdir = $(top_toollibdir)
-
-libpthread_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) -release newlib -no-undefined -lgcc -Xcompiler -nostdlib -Xlinker --version-script=$(srcdir)/../shared.ld `cat extra-libtool-objlist`
-libthread_db_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) -release newlib -no-undefined -lgcc -Xcompiler -nostdlib -Xlinker --version-script=$(srcdir)/../shared.ld
-
-@USE_LIBTOOL_TRUE@toollib_LTLIBRARIES = libpthread.la libthread_db.la
-@USE_LIBTOOL_TRUE@libpthread_la_SOURCES = $(LIB_SOURCES)
-@USE_LIBTOOL_TRUE@libpthread_la_LIBADD = $(LIBADD_OBJS) $(EXTRA_OBJS)
-@USE_LIBTOOL_TRUE@libpthread_la_DEPENDENCIES = $(LIBADD_OBJS) $(EXTRA_OBJS) extra-libtool-objlist
-@USE_LIBTOOL_TRUE@noinst_DATA = objectlist.awk.in
-@USE_LIBTOOL_TRUE@LIB_COMPILE = $(LTCOMPILE)
-@USE_LIBTOOL_FALSE@LIB_COMPILE = $(COMPILE)
-
-@USE_LIBTOOL_TRUE@libthread_db_la_SOURCES = $(LIB_DB_SOURCES)
-
-@USE_LIBTOOL_FALSE@toollib_LIBRARIES = libpthread.a libthread_db.a
-@USE_LIBTOOL_FALSE@libpthread_a_SOURCES = $(LIB_SOURCES)
-@USE_LIBTOOL_FALSE@libpthread_a_LIBADD = $(LIBADD_OBJS) $(EXTRA_OBJS) $(MACHINE_LIB)
-@USE_LIBTOOL_FALSE@libpthread_a_DEPENDENCIES = $(LIBADD_OBJS) $(EXTRA_OBJS) $(MACHINE_LIB)
-
-@USE_LIBTOOL_FALSE@libthread_db_a_SOURCES = $(LIB_DB_SOURCES)
-
-AM_CFLAGS = -D_XOPEN_SOURCE=600 -D_GNU_SOURCE=1
-ACLOCAL_AMFLAGS = -I ../../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-
-CFLAGS_pt_initfini = -g0 -fPIC -fno-inline-functions
-CFLAGS_noweak = -D__NO_WEAK_PTHREAD_ALIASES
-CFLAGS_cancel = -D__NO_WEAK_PTHREAD_ALIASES -D_RPC_THREAD_SAFE_
-CFLAGS_pthread = -D__NO_WEAK_PTHREAD_ALIASES -DHAVE_Z_NODELETE
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(toollib_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-@USE_LIBTOOL_FALSE@libpthread_a_OBJECTS = attr.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@barrier.$(OBJEXT) condvar.$(OBJEXT) events.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@getcpuclockid.$(OBJEXT) getreent.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@join.$(OBJEXT) lockfile.$(OBJEXT) manager.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@mq_notify.$(OBJEXT) oldsemaphore.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@prio.$(OBJEXT) ptclock_gettime.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@ptclock_settime.$(OBJEXT) ptlongjmp.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@pt-machine.$(OBJEXT) reent.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@rwlock.$(OBJEXT) semaphore.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@signals.$(OBJEXT) spinlock.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@sysctl.$(OBJEXT) timer_create.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@timer_getoverr.$(OBJEXT) timer_routines.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@timer_delete.$(OBJEXT) timer_gettime.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@timer_settime.$(OBJEXT) wrapsyscall.$(OBJEXT)
-libthread_db_a_LIBADD =
-@USE_LIBTOOL_FALSE@libthread_db_a_OBJECTS = td_init.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_log.$(OBJEXT) td_ta_delete.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_ta_get_nthreads.$(OBJEXT) td_ta_get_ph.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_ta_map_id2thr.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_ta_map_lwp2thr.$(OBJEXT) td_ta_new.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_ta_thr_iter.$(OBJEXT) td_ta_tsd_iter.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_thr_get_info.$(OBJEXT) td_thr_getfpregs.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_thr_getgregs.$(OBJEXT) td_thr_getxregs.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_thr_getxregsize.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_thr_setfpregs.$(OBJEXT) td_thr_setgregs.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_thr_setprio.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_thr_setsigpending.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_thr_setxregs.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_thr_sigsetmask.$(OBJEXT) td_thr_tsd.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_thr_validate.$(OBJEXT) td_thr_dbsuspend.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_thr_dbresume.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_ta_setconcurrency.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_ta_enable_stats.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_ta_reset_stats.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_ta_get_stats.$(OBJEXT) td_ta_event_addr.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_thr_event_enable.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_thr_set_event.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_thr_clear_event.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_thr_event_getmsg.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_ta_set_event.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_ta_event_getmsg.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@td_ta_clear_event.$(OBJEXT) td_symbol_list.$(OBJEXT)
-LTLIBRARIES = $(toollib_LTLIBRARIES)
-
-@USE_LIBTOOL_TRUE@libpthread_la_OBJECTS = attr.lo barrier.lo condvar.lo \
-@USE_LIBTOOL_TRUE@events.lo getcpuclockid.lo getreent.lo join.lo \
-@USE_LIBTOOL_TRUE@lockfile.lo manager.lo mq_notify.lo oldsemaphore.lo \
-@USE_LIBTOOL_TRUE@prio.lo ptclock_gettime.lo ptclock_settime.lo \
-@USE_LIBTOOL_TRUE@ptlongjmp.lo pt-machine.lo reent.lo rwlock.lo \
-@USE_LIBTOOL_TRUE@semaphore.lo signals.lo spinlock.lo sysctl.lo \
-@USE_LIBTOOL_TRUE@timer_create.lo timer_getoverr.lo timer_routines.lo \
-@USE_LIBTOOL_TRUE@timer_delete.lo timer_gettime.lo timer_settime.lo \
-@USE_LIBTOOL_TRUE@wrapsyscall.lo
-libthread_db_la_LIBADD =
-@USE_LIBTOOL_TRUE@libthread_db_la_OBJECTS = td_init.lo td_log.lo \
-@USE_LIBTOOL_TRUE@td_ta_delete.lo td_ta_get_nthreads.lo td_ta_get_ph.lo \
-@USE_LIBTOOL_TRUE@td_ta_map_id2thr.lo td_ta_map_lwp2thr.lo td_ta_new.lo \
-@USE_LIBTOOL_TRUE@td_ta_thr_iter.lo td_ta_tsd_iter.lo \
-@USE_LIBTOOL_TRUE@td_thr_get_info.lo td_thr_getfpregs.lo \
-@USE_LIBTOOL_TRUE@td_thr_getgregs.lo td_thr_getxregs.lo \
-@USE_LIBTOOL_TRUE@td_thr_getxregsize.lo td_thr_setfpregs.lo \
-@USE_LIBTOOL_TRUE@td_thr_setgregs.lo td_thr_setprio.lo \
-@USE_LIBTOOL_TRUE@td_thr_setsigpending.lo td_thr_setxregs.lo \
-@USE_LIBTOOL_TRUE@td_thr_sigsetmask.lo td_thr_tsd.lo td_thr_validate.lo \
-@USE_LIBTOOL_TRUE@td_thr_dbsuspend.lo td_thr_dbresume.lo \
-@USE_LIBTOOL_TRUE@td_ta_setconcurrency.lo td_ta_enable_stats.lo \
-@USE_LIBTOOL_TRUE@td_ta_reset_stats.lo td_ta_get_stats.lo \
-@USE_LIBTOOL_TRUE@td_ta_event_addr.lo td_thr_event_enable.lo \
-@USE_LIBTOOL_TRUE@td_thr_set_event.lo td_thr_clear_event.lo \
-@USE_LIBTOOL_TRUE@td_thr_event_getmsg.lo td_ta_set_event.lo \
-@USE_LIBTOOL_TRUE@td_ta_event_getmsg.lo td_ta_clear_event.lo \
-@USE_LIBTOOL_TRUE@td_symbol_list.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DATA = $(noinst_DATA)
-
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(libpthread_a_SOURCES) $(libthread_db_a_SOURCES) $(libpthread_la_SOURCES) $(libthread_db_la_SOURCES)
-OBJECTS = $(libpthread_a_OBJECTS) $(libthread_db_a_OBJECTS) $(libpthread_la_OBJECTS) $(libthread_db_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/../../../../Makefile.shared
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../../acinclude.m4 ../../../../aclocal.m4 \
- ../../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-toollibLIBRARIES:
-
-clean-toollibLIBRARIES:
- -test -z "$(toollib_LIBRARIES)" || rm -f $(toollib_LIBRARIES)
-
-distclean-toollibLIBRARIES:
-
-maintainer-clean-toollibLIBRARIES:
-
-install-toollibLIBRARIES: $(toollib_LIBRARIES)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(toollibdir)
- @list='$(toollib_LIBRARIES)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(INSTALL_DATA) $$p $(DESTDIR)$(toollibdir)/$$p"; \
- $(INSTALL_DATA) $$p $(DESTDIR)$(toollibdir)/$$p; \
- else :; fi; \
- done
- @$(POST_INSTALL)
- @list='$(toollib_LIBRARIES)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(RANLIB) $(DESTDIR)$(toollibdir)/$$p"; \
- $(RANLIB) $(DESTDIR)$(toollibdir)/$$p; \
- else :; fi; \
- done
-
-uninstall-toollibLIBRARIES:
- @$(NORMAL_UNINSTALL)
- list='$(toollib_LIBRARIES)'; for p in $$list; do \
- rm -f $(DESTDIR)$(toollibdir)/$$p; \
- done
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-libpthread.a: $(libpthread_a_OBJECTS) $(libpthread_a_DEPENDENCIES)
- -rm -f libpthread.a
- $(AR) cru libpthread.a $(libpthread_a_OBJECTS) $(libpthread_a_LIBADD)
- $(RANLIB) libpthread.a
-
-libthread_db.a: $(libthread_db_a_OBJECTS) $(libthread_db_a_DEPENDENCIES)
- -rm -f libthread_db.a
- $(AR) cru libthread_db.a $(libthread_db_a_OBJECTS) $(libthread_db_a_LIBADD)
- $(RANLIB) libthread_db.a
-
-mostlyclean-toollibLTLIBRARIES:
-
-clean-toollibLTLIBRARIES:
- -test -z "$(toollib_LTLIBRARIES)" || rm -f $(toollib_LTLIBRARIES)
-
-distclean-toollibLTLIBRARIES:
-
-maintainer-clean-toollibLTLIBRARIES:
-
-install-toollibLTLIBRARIES: $(toollib_LTLIBRARIES)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(toollibdir)
- @list='$(toollib_LTLIBRARIES)'; for p in $$list; do \
- if test -f $$p; then \
- echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(toollibdir)/$$p"; \
- $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(toollibdir)/$$p; \
- else :; fi; \
- done
-
-uninstall-toollibLTLIBRARIES:
- @$(NORMAL_UNINSTALL)
- list='$(toollib_LTLIBRARIES)'; for p in $$list; do \
- $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(toollibdir)/$$p; \
- done
-
-libpthread.la: $(libpthread_la_OBJECTS) $(libpthread_la_DEPENDENCIES)
- $(LINK) -rpath $(toollibdir) $(libpthread_la_LDFLAGS) $(libpthread_la_OBJECTS) $(libpthread_la_LIBADD) $(LIBS)
-
-libthread_db.la: $(libthread_db_la_OBJECTS) $(libthread_db_la_DEPENDENCIES)
- $(LINK) -rpath $(toollibdir) $(libthread_db_la_LDFLAGS) $(libthread_db_la_OBJECTS) $(libthread_db_la_LIBADD) $(LIBS)
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" != "." || dot_seen=yes; \
- done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- for subdir in $(SUBDIRS); do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- || exit 1; \
- fi; \
- done
-info-am:
-info: info-recursive
-dvi-am:
-dvi: dvi-recursive
-check-am:
-check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-info-am:
-install-info: install-info-recursive
-install-exec-am:
-install-exec: install-exec-recursive
-
-install-data-am: install-toollibLIBRARIES install-toollibLTLIBRARIES \
- install-data-local
-install-data: install-data-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am: uninstall-toollibLIBRARIES uninstall-toollibLTLIBRARIES
-uninstall: uninstall-recursive
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA)
-all-redirect: all-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
- $(mkinstalldirs) $(DESTDIR)$(toollibdir) $(DESTDIR)$(toollibdir)
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-toollibLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-toollibLTLIBRARIES \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-recursive
-
-clean-am: clean-toollibLIBRARIES clean-compile clean-libtool \
- clean-toollibLTLIBRARIES clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-recursive
-
-distclean-am: distclean-toollibLIBRARIES distclean-compile \
- distclean-libtool distclean-toollibLTLIBRARIES \
- distclean-tags distclean-generic clean-am
- -rm -f libtool
-
-distclean: distclean-recursive
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-toollibLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-toollibLTLIBRARIES \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: mostlyclean-toollibLIBRARIES distclean-toollibLIBRARIES \
-clean-toollibLIBRARIES maintainer-clean-toollibLIBRARIES \
-uninstall-toollibLIBRARIES install-toollibLIBRARIES mostlyclean-compile \
-distclean-compile clean-compile maintainer-clean-compile \
-mostlyclean-libtool distclean-libtool clean-libtool \
-maintainer-clean-libtool mostlyclean-toollibLTLIBRARIES \
-distclean-toollibLTLIBRARIES clean-toollibLTLIBRARIES \
-maintainer-clean-toollibLTLIBRARIES uninstall-toollibLTLIBRARIES \
-install-toollibLTLIBRARIES install-data-recursive \
-uninstall-data-recursive install-exec-recursive \
-uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
-all-recursive check-recursive installcheck-recursive info-recursive \
-dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-info-am \
-install-info install-exec-am install-exec install-data-local \
-install-data-am install-data install-am install uninstall-am uninstall \
-all-redirect all-am all installdirs-am installdirs mostlyclean-generic \
-distclean-generic clean-generic maintainer-clean-generic clean \
-mostlyclean distclean maintainer-clean
-
-
-# objects listed later in LIBPTHREAD_OBJLISTS will override those listed earlier
-@USE_LIBTOOL_TRUE@extra-libtool-objlist: $(MACHINE_OBJLIST)
-@USE_LIBTOOL_TRUE@ cat $(MACHINE_OBJLIST) | $(AWK) '{ libpthread[$$1] = $$2 }; END { for (x in libpthread) printf ("%s\n", libpthread[x]) }' > $@
-
-objectlist.awk.in: $(noinst_LTLIBRARIES)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
- do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
- done
-
-doc:
-
-install-data-local: install-toollibLIBRARIES
- -rm -f $(DESTDIR)$(toollibdir)/libthread_db.so.1
- ln -s `readlink $(DESTDIR)$(toollibdir)/libthread_db.so` \
- $(DESTDIR)$(toollibdir)/libthread_db.so.1 \
- || cp $(DESTDIR)$(toollibdir)/libthread_db.so \
- $(DESTDIR)$(toollibdir)/libthread_db.so.1
-
-pt-initfini.s: $(srcdir)/pt-initfini.c
- $(CC) -S $(CFLAGS_pt_initfini) -finhibit-size-directive \
- $(patsubst -f%,-fno-%,$(exceptions)) -o $@
-
-# We only have one kind of startup code files. Static binaries and
-# shared libraries are build using the PIC version.
-crti.S: pt-initfini.s
- sed -n -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@
-
-defs.h: pt-initfini.s
- sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
- $(AWK) -f defs.awk > $@
-
-crti.o: crti.S defs.h
- $(CC) -g0 $(ASFLAGS) -o $@
-
-mutex.$(oext): $(srcdir)/mutex.c
- $(LIB_COMPILE) $(CFLAGS_noweak) -c $< -o $@
-
-specific.$(oext): $(srcdir)/specific.c
- $(LIB_COMPILE) $(CFLAGS_noweak) -c $< -o $@
-
-pthread.$(oext): $(srcdir)/pthread.c
- $(LIB_COMPILE) $(CFLAGS_pthread) -c $< -o $@
-
-ptfork.$(oext): $(srcdir)/ptfork.c
- $(LIB_COMPILE) $(CFLAGS_noweak) -c $< -o $@
-
-cancel.$(oext): $(srcdir)/cancel.c
- $(LIB_COMPILE) $(CFLAGS_cancel) -c $< -o $@
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/linux/linuxthreads/aclocal.m4 b/newlib/libc/sys/linux/linuxthreads/aclocal.m4
deleted file mode 100644
index c0a206827..000000000
--- a/newlib/libc/sys/linux/linuxthreads/aclocal.m4
+++ /dev/null
@@ -1,1223 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
-
-# serial 46 AC_PROG_LIBTOOL
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
- AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [AC_LIBTOOL_CXX],
- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
- AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [ifdef([AC_PROG_GCJ],
- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([A][M_PROG_GCJ],
- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([LT_AC_PROG_GCJ],
- [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])])])])])
-
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- AC_PATH_MAGIC
- fi
- ;;
-esac
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-AC_ARG_WITH(pic,
- [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
- pic_mode="$withval", pic_mode=default)
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_SAVE
- AC_LANG_C
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_RESTORE])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
- [AC_TRY_LINK([],
- [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);],
- [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
- [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
- ])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_LIBTOOL_PICMODE - implement the --with-pic flag
-# Usage: AC_LIBTOOL_PICMODE[(MODE)]
-# Where MODE is either `yes' or `no'. If omitted, it defaults to
-# `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)])
-
-
-# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="ifelse([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-])
-
-
-# AC_PATH_MAGIC - find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
-AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])
-
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- re_direlt=['/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])
-
-# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
-[lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-])
-
-# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependant libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.[012])
- lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd* )
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- ia64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
- else
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
- fi
- ;;
-
-newsos6)
- [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-[sysv5uw[78]* | sysv4*uw2*)]
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-])
-
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-convenience to the
-# configure arguments. Note that LIBLTDL and INCLTDL are not
-# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
-# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
-# with '${top_builddir}/' and INCLTDL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!). If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case $enable_ltdl_convenience in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-install to the configure
-# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
-# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
-# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
-# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
-# with '${top_srcdir}/' (note the single quotes!). If your package is
-# not flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-# If this macro is not defined by Autoconf, define it here.
-ifdef([AC_PROVIDE_IFELSE],
- [],
- [define([AC_PROVIDE_IFELSE],
- [ifdef([AC_PROVIDE_$1],
- [$2], [$3])])])
-
-# AC_LIBTOOL_CXX - enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
-
-AC_DEFUN([_AC_LIBTOOL_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
-LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
-lt_save_CC="$CC"
-lt_save_CFLAGS="$CFLAGS"
-dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
-dnl is set to the C++ compiler.
-AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
-CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-# AC_LIBTOOL_GCJ - enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
-
-AC_DEFUN([_AC_LIBTOOL_GCJ],
-[AC_REQUIRE([AC_PROG_LIBTOOL])
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
- [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
- [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
- [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
-lt_save_CC="$CC"
-lt_save_CFLAGS="$CFLAGS"
-dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
-dnl is set to the C++ compiler.
-AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
-CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-dnl old names
-AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)
-])
-
diff --git a/newlib/libc/sys/linux/linuxthreads/attr.c b/newlib/libc/sys/linux/linuxthreads/attr.c
deleted file mode 100644
index 4b3a8f434..000000000
--- a/newlib/libc/sys/linux/linuxthreads/attr.c
+++ /dev/null
@@ -1,308 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-/* Handling of thread attributes */
-
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <sys/resource.h>
-#include "pthread.h"
-#include "internals.h"
-#include <shlib-compat.h>
-
-int __pthread_attr_init_2_1(pthread_attr_t *attr)
-{
- size_t ps = __getpagesize ();
-
- attr->__detachstate = PTHREAD_CREATE_JOINABLE;
- attr->__schedpolicy = SCHED_OTHER;
- attr->__schedparam.sched_priority = 0;
- attr->__inheritsched = PTHREAD_EXPLICIT_SCHED;
- attr->__scope = PTHREAD_SCOPE_SYSTEM;
- attr->__guardsize = ps;
- attr->__stackaddr = NULL;
- attr->__stackaddr_set = 0;
- attr->__stacksize = STACK_SIZE - ps;
- return 0;
-}
-
-versioned_symbol (libpthread, __pthread_attr_init_2_1, pthread_attr_init,
- GLIBC_2_1);
-
-#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
-int __pthread_attr_init_2_0(pthread_attr_t *attr)
-{
- attr->__detachstate = PTHREAD_CREATE_JOINABLE;
- attr->__schedpolicy = SCHED_OTHER;
- attr->__schedparam.sched_priority = 0;
- attr->__inheritsched = PTHREAD_EXPLICIT_SCHED;
- attr->__scope = PTHREAD_SCOPE_SYSTEM;
- return 0;
-}
-compat_symbol (libpthread, __pthread_attr_init_2_0, pthread_attr_init,
- GLIBC_2_0);
-#endif
-
-int pthread_attr_destroy(pthread_attr_t *attr)
-{
- return 0;
-}
-
-int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
-{
- if (detachstate < PTHREAD_CREATE_JOINABLE ||
- detachstate > PTHREAD_CREATE_DETACHED)
- return EINVAL;
- attr->__detachstate = detachstate;
- return 0;
-}
-
-int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate)
-{
- *detachstate = attr->__detachstate;
- return 0;
-}
-
-int pthread_attr_setschedparam(pthread_attr_t *attr,
- const struct sched_param *param)
-{
- int max_prio = __sched_get_priority_max(attr->__schedpolicy);
- int min_prio = __sched_get_priority_min(attr->__schedpolicy);
-
- if (param->sched_priority < min_prio || param->sched_priority > max_prio)
- return EINVAL;
- memcpy (&attr->__schedparam, param, sizeof (struct sched_param));
- return 0;
-}
-
-int pthread_attr_getschedparam(const pthread_attr_t *attr,
- struct sched_param *param)
-{
- memcpy (param, &attr->__schedparam, sizeof (struct sched_param));
- return 0;
-}
-
-int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy)
-{
- if (policy != SCHED_OTHER && policy != SCHED_FIFO && policy != SCHED_RR)
- return EINVAL;
- attr->__schedpolicy = policy;
- return 0;
-}
-
-int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy)
-{
- *policy = attr->__schedpolicy;
- return 0;
-}
-
-int pthread_attr_setinheritsched(pthread_attr_t *attr, int inherit)
-{
- if (inherit != PTHREAD_INHERIT_SCHED && inherit != PTHREAD_EXPLICIT_SCHED)
- return EINVAL;
- attr->__inheritsched = inherit;
- return 0;
-}
-
-int pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inherit)
-{
- *inherit = attr->__inheritsched;
- return 0;
-}
-
-int pthread_attr_setscope(pthread_attr_t *attr, int scope)
-{
- switch (scope) {
- case PTHREAD_SCOPE_SYSTEM:
- attr->__scope = scope;
- return 0;
- case PTHREAD_SCOPE_PROCESS:
- return ENOTSUP;
- default:
- return EINVAL;
- }
-}
-
-int pthread_attr_getscope(const pthread_attr_t *attr, int *scope)
-{
- *scope = attr->__scope;
- return 0;
-}
-
-int __pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize)
-{
- /* The guard size must not be larger than the stack itself */
- if (guardsize >= attr->__stacksize) return EINVAL;
-
- attr->__guardsize = guardsize;
-
- return 0;
-}
-weak_alias (__pthread_attr_setguardsize, pthread_attr_setguardsize)
-
-int __pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize)
-{
- *guardsize = attr->__guardsize;
- return 0;
-}
-weak_alias (__pthread_attr_getguardsize, pthread_attr_getguardsize)
-
-int __pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr)
-{
- attr->__stackaddr = stackaddr;
- attr->__stackaddr_set = 1;
- return 0;
-}
-weak_alias (__pthread_attr_setstackaddr, pthread_attr_setstackaddr)
-
-link_warning (pthread_attr_setstackaddr,
- "the use of `pthread_attr_setstackaddr' is deprecated, use `pthread_attr_setstack'")
-
-int __pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr)
-{
- /* XXX This function has a stupid definition. The standard specifies
- no error value but what is if no stack address was set? We simply
- return the value we have in the member. */
- *stackaddr = attr->__stackaddr;
- return 0;
-}
-weak_alias (__pthread_attr_getstackaddr, pthread_attr_getstackaddr)
-
-link_warning (pthread_attr_getstackaddr,
- "the use of `pthread_attr_getstackaddr' is deprecated, use `pthread_attr_getstack'")
-
-
-int __pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)
-{
-#ifdef FLOATING_STACKS
- /* We have to check against the maximum allowed stack size. This is no
- problem if the manager is already started and we determined it. If
- this hasn't happened, we have to find the limit outself. */
- if (__pthread_max_stacksize == 0)
- __pthread_init_max_stacksize ();
-
- if (stacksize > __pthread_max_stacksize)
- return EINVAL;
-#else
- /* We have a fixed size limit. */
- if (stacksize > STACK_SIZE)
- return EINVAL;
-#endif
-
- /* We don't accept value smaller than PTHREAD_STACK_MIN. */
- if (stacksize < PTHREAD_STACK_MIN)
- return EINVAL;
-
- attr->__stacksize = stacksize;
- return 0;
-}
-weak_alias (__pthread_attr_setstacksize, pthread_attr_setstacksize)
-
-int __pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize)
-{
- *stacksize = attr->__stacksize;
- return 0;
-}
-weak_alias (__pthread_attr_getstacksize, pthread_attr_getstacksize)
-
-int __pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr,
- size_t stacksize)
-{
- int err;
-
- if ((((uintptr_t) stackaddr)
- & (__alignof__ (struct _pthread_descr_struct) - 1)) != 0)
- err = EINVAL;
- else
- err = __pthread_attr_setstacksize (attr, stacksize);
- if (err == 0)
- {
-#ifndef _STACK_GROWS_UP
- attr->__stackaddr = (char *) stackaddr + stacksize;
-#else
- attr->__stackaddr = stackaddr;
-#endif
- attr->__stackaddr_set = 1;
- }
-
- return err;
-}
-weak_alias (__pthread_attr_setstack, pthread_attr_setstack)
-
-int __pthread_attr_getstack (const pthread_attr_t *attr, void **stackaddr,
- size_t *stacksize)
-{
- /* XXX This function has a stupid definition. The standard specifies
- no error value but what is if no stack address was set? We simply
- return the value we have in the member. */
-#ifndef _STACK_GROWS_UP
- *stackaddr = (char *) attr->__stackaddr - attr->__stacksize;
-#else
- *stackaddr = attr->__stackaddr;
-#endif
- *stacksize = attr->__stacksize;
- return 0;
-}
-weak_alias (__pthread_attr_getstack, pthread_attr_getstack)
-
-int pthread_getattr_np (pthread_t thread, pthread_attr_t *attr)
-{
- pthread_handle handle = thread_handle (thread);
- pthread_descr descr;
-
- if (handle == NULL)
- return ENOENT;
-
- descr = handle->h_descr;
-
- attr->__detachstate = (descr->p_detached
- ? PTHREAD_CREATE_DETACHED
- : PTHREAD_CREATE_JOINABLE);
-
- attr->__schedpolicy = __sched_getscheduler (descr->p_pid);
- if (attr->__schedpolicy == -1)
- return errno;
-
- if (__sched_getparam (descr->p_pid,
- (struct sched_param *) &attr->__schedparam) != 0)
- return errno;
-
- attr->__inheritsched = descr->p_inheritsched;
- attr->__scope = PTHREAD_SCOPE_SYSTEM;
-#ifdef _STACK_GROWS_DOWN
- attr->__stacksize = (char *)(descr + 1) - (char *)descr->p_guardaddr
- - descr->p_guardsize;
-#else
- attr->__stacksize = (char *)descr->p_guardaddr - (char *)descr;
-#endif
- attr->__guardsize = descr->p_guardsize;
- attr->__stackaddr_set = descr->p_userstack;
-#ifdef NEED_SEPARATE_REGISTER_STACK
- if (descr->p_userstack == 0)
- attr->__stacksize *= 2;
- /* XXX This is awkward. The guard pages are in the middle of the
- two stacks. We must count the guard size in the stack size since
- otherwise the range of the stack area cannot be computed. */
- attr->__stacksize += attr->__guardsize;
-#endif
-#ifndef _STACK_GROWS_UP
- attr->__stackaddr = (char *)(descr + 1);
-#else
- attr->__stackaddr = (char *)descr;
-#endif
-
- return 0;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/barrier.c b/newlib/libc/sys/linux/linuxthreads/barrier.c
deleted file mode 100644
index 1293bad85..000000000
--- a/newlib/libc/sys/linux/linuxthreads/barrier.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/* POSIX barrier implementation for LinuxThreads.
- Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Kaz Kylheku <kaz@ashi.footprints.net>, 2000.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include "pthread.h"
-#include "internals.h"
-#include "spinlock.h"
-#include "queue.h"
-#include "restart.h"
-
-int
-pthread_barrier_wait(pthread_barrier_t *barrier)
-{
- pthread_descr self = thread_self();
- pthread_descr temp_wake_queue, th;
- int result = 0;
-
- __pthread_lock(&barrier->__ba_lock, self);
-
- /* If the required number of threads have achieved rendezvous... */
- if (barrier->__ba_present >= barrier->__ba_required - 1)
- {
- /* ... then this last caller shall be the serial thread */
- result = PTHREAD_BARRIER_SERIAL_THREAD;
- /* Copy and clear wait queue and reset barrier. */
- temp_wake_queue = barrier->__ba_waiting;
- barrier->__ba_waiting = NULL;
- barrier->__ba_present = 0;
- }
- else
- {
- result = 0;
- barrier->__ba_present++;
- enqueue(&barrier->__ba_waiting, self);
- }
-
- __pthread_unlock(&barrier->__ba_lock);
-
- if (result == 0)
- {
- /* Non-serial threads have to suspend */
- suspend(self);
- /* We don't bother dealing with cancellation because the POSIX
- spec for barriers doesn't mention that pthread_barrier_wait
- is a cancellation point. */
- }
- else
- {
- /* Serial thread wakes up all others. */
- while ((th = dequeue(&temp_wake_queue)) != NULL)
- restart(th);
- }
-
- return result;
-}
-
-int
-pthread_barrier_init(pthread_barrier_t *barrier,
- const pthread_barrierattr_t *attr,
- unsigned int count)
-{
- if (count == 0)
- return EINVAL;
-
- __pthread_init_lock(&barrier->__ba_lock);
- barrier->__ba_required = count;
- barrier->__ba_present = 0;
- barrier->__ba_waiting = NULL;
- return 0;
-}
-
-int
-pthread_barrier_destroy(pthread_barrier_t *barrier)
-{
- if (barrier->__ba_waiting != NULL) return EBUSY;
- return 0;
-}
-
-int
-pthread_barrierattr_init(pthread_barrierattr_t *attr)
-{
- attr->__pshared = PTHREAD_PROCESS_PRIVATE;
- return 0;
-}
-
-int
-pthread_barrierattr_destroy(pthread_barrierattr_t *attr)
-{
- return 0;
-}
-
-int
-__pthread_barrierattr_getpshared(const pthread_barrierattr_t *attr,
- int *pshared)
-{
- *pshared = attr->__pshared;
- return 0;
-}
-
-int
-pthread_barrierattr_setpshared(pthread_barrierattr_t *attr, int pshared)
-{
- if (pshared != PTHREAD_PROCESS_PRIVATE && pshared != PTHREAD_PROCESS_SHARED)
- return EINVAL;
-
- attr->__pshared = pshared;
- return 0;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/bits/initspin.h b/newlib/libc/sys/linux/linuxthreads/bits/initspin.h
deleted file mode 100644
index af19d44e6..000000000
--- a/newlib/libc/sys/linux/linuxthreads/bits/initspin.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Generic definitions for spinlock initializers.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* Initial value of a spinlock. Most platforms should use zero,
- unless they only implement a "test and clear" operation instead of
- the usual "test and set". */
-#define __LT_SPINLOCK_INIT 0
-
-/* Macros for lock initializers, using the above definition. */
-#define __LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT }
-#define __ALT_LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT }
-#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_INIT }
diff --git a/newlib/libc/sys/linux/linuxthreads/bits/libc-lock.h b/newlib/libc/sys/linux/linuxthreads/bits/libc-lock.h
deleted file mode 100644
index 125002255..000000000
--- a/newlib/libc/sys/linux/linuxthreads/bits/libc-lock.h
+++ /dev/null
@@ -1,297 +0,0 @@
-/* libc-internal interface for mutex locks. LinuxThreads version.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _BITS_LIBC_LOCK_H
-#define _BITS_LIBC_LOCK_H 1
-
-#include <pthread.h>
-
-/* Mutex type. */
-#if defined(_LIBC) || defined(_IO_MTSAFE_IO)
-typedef pthread_mutex_t __libc_lock_t;
-typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t;
-# ifdef __USE_UNIX98
-typedef pthread_rwlock_t __libc_rwlock_t;
-# else
-typedef struct __libc_rwlock_opaque__ __libc_rwlock_t;
-# endif
-#else
-typedef struct __libc_lock_opaque__ __libc_lock_t;
-typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
-typedef struct __libc_rwlock_opaque__ __libc_rwlock_t;
-#endif
-
-/* Type for key to thread-specific data. */
-typedef pthread_key_t __libc_key_t;
-
-/* Define a lock variable NAME with storage class CLASS. The lock must be
- initialized with __libc_lock_init before it can be used (or define it
- with __libc_lock_define_initialized, below). Use `extern' for CLASS to
- declare a lock defined in another module. In public structure
- definitions you must use a pointer to the lock structure (i.e., NAME
- begins with a `*'), because its storage size will not be known outside
- of libc. */
-#define __libc_lock_define(CLASS,NAME) \
- CLASS __libc_lock_t NAME;
-#define __libc_rwlock_define(CLASS,NAME) \
- CLASS __libc_rwlock_t NAME;
-#define __libc_lock_define_recursive(CLASS,NAME) \
- CLASS __libc_lock_recursive_t NAME;
-
-/* Define an initialized lock variable NAME with storage class CLASS.
-
- For the C library we take a deeper look at the initializer. For
- this implementation all fields are initialized to zero. Therefore
- we don't initialize the variable which allows putting it into the
- BSS section. (Except on PA-RISC and other odd architectures, where
- initialized locks must be set to one due to the lack of normal
- atomic operations.) */
-
-#if __LT_SPINLOCK_INIT == 0
-# define __libc_lock_define_initialized(CLASS,NAME) \
- CLASS __libc_lock_t NAME;
-#else
-# define __libc_lock_define_initialized(CLASS,NAME) \
- CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER;
-#endif
-
-#define __libc_rwlock_define_initialized(CLASS,NAME) \
- CLASS __libc_rwlock_t NAME = PTHREAD_RWLOCK_INITIALIZER;
-
-/* Define an initialized recursive lock variable NAME with storage
- class CLASS. */
-#define __libc_lock_define_initialized_recursive(CLASS,NAME) \
- CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER;
-#define _LIBC_LOCK_RECURSIVE_INITIALIZER \
- {PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP}
-
-/* Initialize the named lock variable, leaving it in a consistent, unlocked
- state. */
-#define __libc_lock_init(NAME) \
- (__pthread_mutex_init != NULL ? __pthread_mutex_init (&(NAME), NULL) : 0);
-#define __libc_rwlock_init(NAME) \
- (__pthread_rwlock_init != NULL ? __pthread_rwlock_init (&(NAME), NULL) : 0);
-
-/* Same as last but this time we initialize a recursive mutex. */
-#define __libc_lock_init_recursive(NAME) \
- do { \
- if (__pthread_mutex_init != NULL) \
- { \
- pthread_mutexattr_t __attr; \
- __pthread_mutexattr_init (&__attr); \
- __pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \
- __pthread_mutex_init (&(NAME).mutex, &__attr); \
- __pthread_mutexattr_destroy (&__attr); \
- } \
- } while (0);
-
-/* Finalize the named lock variable, which must be locked. It cannot be
- used again until __libc_lock_init is called again on it. This must be
- called on a lock variable before the containing storage is reused. */
-#define __libc_lock_fini(NAME) \
- (__pthread_mutex_destroy != NULL ? __pthread_mutex_destroy (&(NAME)) : 0);
-#define __libc_rwlock_fini(NAME) \
- (__pthread_rwlock_destroy != NULL ? __pthread_rwlock_destroy (&(NAME)) : 0);
-
-/* Finalize recursive named lock. */
-#define __libc_lock_fini_recursive(NAME) __libc_lock_fini ((NAME).mutex)
-
-/* Lock the named lock variable. */
-#define __libc_lock_lock(NAME) \
- (__pthread_mutex_lock != NULL ? __pthread_mutex_lock (&(NAME)) : 0);
-#define __libc_rwlock_rdlock(NAME) \
- (__pthread_rwlock_rdlock != NULL ? __pthread_rwlock_rdlock (&(NAME)) : 0);
-#define __libc_rwlock_wrlock(NAME) \
- (__pthread_rwlock_wrlock != NULL ? __pthread_rwlock_wrlock (&(NAME)) : 0);
-
-/* Lock the recursive named lock variable. */
-#define __libc_lock_lock_recursive(NAME) __libc_lock_lock ((NAME).mutex)
-
-/* Try to lock the named lock variable. */
-#define __libc_lock_trylock(NAME) \
- (__pthread_mutex_trylock != NULL ? __pthread_mutex_trylock (&(NAME)) : 0)
-#define __libc_rwlock_tryrdlock(NAME) \
- (__pthread_rwlock_tryrdlock != NULL \
- ? __pthread_rwlock_tryrdlock (&(NAME)) : 0)
-#define __libc_rwlock_trywrlock(NAME) \
- (__pthread_rwlock_trywrlock != NULL \
- ? __pthread_rwlock_trywrlock (&(NAME)) : 0)
-
-/* Try to lock the recursive named lock variable. */
-#define __libc_lock_trylock_recursive(NAME) __libc_lock_trylock ((NAME).mutex)
-
-/* Unlock the named lock variable. */
-#define __libc_lock_unlock(NAME) \
- (__pthread_mutex_unlock != NULL ? __pthread_mutex_unlock (&(NAME)) : 0);
-#define __libc_rwlock_unlock(NAME) \
- (__pthread_rwlock_unlock != NULL ? __pthread_rwlock_unlock (&(NAME)) : 0);
-
-/* Unlock the recursive named lock variable. */
-#define __libc_lock_unlock_recursive(NAME) __libc_lock_unlock ((NAME).mutex)
-
-
-/* Define once control variable. */
-#if PTHREAD_ONCE_INIT == 0
-/* Special case for static variables where we can avoid the initialization
- if it is zero. */
-# define __libc_once_define(CLASS, NAME) \
- CLASS pthread_once_t NAME
-#else
-# define __libc_once_define(CLASS, NAME) \
- CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT
-#endif
-
-/* Call handler iff the first call. */
-#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \
- do { \
- if (__pthread_once != NULL) \
- __pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \
- else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) { \
- INIT_FUNCTION (); \
- (ONCE_CONTROL) = !PTHREAD_ONCE_INIT; \
- } \
- } while (0)
-
-
-/* Start critical region with cleanup. */
-#define __libc_cleanup_region_start(DOIT, FCT, ARG) \
- { struct _pthread_cleanup_buffer _buffer; \
- int _avail = (DOIT) && _pthread_cleanup_push_defer != NULL; \
- if (_avail) { \
- _pthread_cleanup_push_defer (&_buffer, (FCT), (ARG)); \
- }
-
-/* End critical region with cleanup. */
-#define __libc_cleanup_region_end(DOIT) \
- if (_avail) { \
- _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \
- } \
- }
-
-/* Sometimes we have to exit the block in the middle. */
-#define __libc_cleanup_end(DOIT) \
- if (_avail) { \
- _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \
- }
-
-/* Create thread-specific key. */
-#define __libc_key_create(KEY, DESTRUCTOR) \
- (__pthread_key_create != NULL ? __pthread_key_create (KEY, DESTRUCTOR) : 1)
-
-/* Get thread-specific data. */
-#define __libc_getspecific(KEY) \
- (__pthread_getspecific != NULL ? __pthread_getspecific (KEY) : NULL)
-
-/* Set thread-specific data. */
-#define __libc_setspecific(KEY, VALUE) \
- (__pthread_setspecific != NULL ? __pthread_setspecific (KEY, VALUE) : 0)
-
-
-/* Register handlers to execute before and after `fork'. */
-#define __libc_atfork(PREPARE, PARENT, CHILD) \
- (__pthread_atfork != NULL ? __pthread_atfork (PREPARE, PARENT, CHILD) : 0)
-
-/* Functions that are used by this file and are internal to the GNU C
- library. */
-
-extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
- __const pthread_mutexattr_t *__mutex_attr);
-
-extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
-
-extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex);
-
-extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
-
-extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
-
-extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr);
-
-extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr);
-
-extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr,
- int __kind);
-
-#ifdef __USE_UNIX98
-extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
- __const pthread_rwlockattr_t *__attr);
-
-extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
-
-extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock);
-
-extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock);
-
-extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock);
-
-extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock);
-
-extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock);
-#endif
-
-extern int __pthread_key_create (pthread_key_t *__key,
- void (*__destr_function) (void *));
-
-extern int __pthread_setspecific (pthread_key_t __key,
- __const void *__pointer);
-
-extern void *__pthread_getspecific (pthread_key_t __key);
-
-extern int __pthread_once (pthread_once_t *__once_control,
- void (*__init_routine) (void));
-
-extern int __pthread_atfork (void (*__prepare) (void),
- void (*__parent) (void),
- void (*__child) (void));
-
-
-
-/* Make the pthread functions weak so that we can elide them from
- single-threaded processes. */
-#ifndef __NO_WEAK_PTHREAD_ALIASES
-# pragma weak __pthread_mutex_init
-# pragma weak __pthread_mutex_destroy
-# pragma weak __pthread_mutex_lock
-# pragma weak __pthread_mutex_trylock
-# pragma weak __pthread_mutex_unlock
-# pragma weak __pthread_mutexattr_init
-# pragma weak __pthread_mutexattr_destroy
-# pragma weak __pthread_mutexattr_settype
-# pragma weak __pthread_rwlock_destroy
-# pragma weak __pthread_rwlock_rdlock
-# pragma weak __pthread_rwlock_tryrdlock
-# pragma weak __pthread_rwlock_wrlock
-# pragma weak __pthread_rwlock_trywrlock
-# pragma weak __pthread_rwlock_unlock
-# pragma weak __pthread_key_create
-# pragma weak __pthread_setspecific
-# pragma weak __pthread_getspecific
-# pragma weak __pthread_once
-# pragma weak __pthread_initialize
-# pragma weak __pthread_atfork
-# pragma weak _pthread_cleanup_push_defer
-# pragma weak _pthread_cleanup_pop_restore
-# endif
-#endif
-
-/* We need portable names for some functions. E.g., when they are
- used as argument to __libc_cleanup_region_start. */
-#define __libc_mutex_unlock __pthread_mutex_unlock
-
-#endif /* bits/libc-lock.h */
diff --git a/newlib/libc/sys/linux/linuxthreads/bits/libc-tsd.h b/newlib/libc/sys/linux/linuxthreads/bits/libc-tsd.h
deleted file mode 100644
index 7a532ea74..000000000
--- a/newlib/libc/sys/linux/linuxthreads/bits/libc-tsd.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* libc-internal interface for thread-specific data. LinuxThreads version.
- Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _BITS_LIBC_TSD_H
-#define _BITS_LIBC_TSD_H 1
-
-
-/* Fast thread-specific data internal to libc. */
-enum __libc_tsd_key_t { _LIBC_TSD_KEY_MALLOC = 0,
- _LIBC_TSD_KEY_DL_ERROR,
- _LIBC_TSD_KEY_RPC_VARS,
- _LIBC_TSD_KEY_N };
-
-extern void *(*__libc_internal_tsd_get) (enum __libc_tsd_key_t) __THROW;
-extern int (*__libc_internal_tsd_set) (enum __libc_tsd_key_t,
- __const void *) __THROW;
-
-#define __libc_tsd_define(CLASS, KEY) CLASS void *__libc_tsd_##KEY##_data;
-#define __libc_tsd_get(KEY) \
- (__libc_internal_tsd_get != NULL \
- ? __libc_internal_tsd_get (_LIBC_TSD_KEY_##KEY) \
- : __libc_tsd_##KEY##_data)
-#define __libc_tsd_set(KEY, VALUE) \
- (__libc_internal_tsd_set != NULL \
- ? __libc_internal_tsd_set (_LIBC_TSD_KEY_##KEY, (VALUE)) \
- : ((__libc_tsd_##KEY##_data = (VALUE)), 0))
-
-#endif /* bits/libc-tsd.h */
diff --git a/newlib/libc/sys/linux/linuxthreads/bits/local_lim.h b/newlib/libc/sys/linux/linuxthreads/bits/local_lim.h
deleted file mode 100644
index 0a7c83706..000000000
--- a/newlib/libc/sys/linux/linuxthreads/bits/local_lim.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux version.
- Copyright (C) 1993, 94, 95, 96, 97, 98, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* This is the value this implementation supports. */
-#define PTHREAD_THREADS_MAX 1024
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. We are free to choose a reasonable value. */
-#define PTHREAD_STACK_MIN 16384
-
-/* Maximum number of POSIX timers available. */
-#define TIMER_MAX 256
diff --git a/newlib/libc/sys/linux/linuxthreads/bits/posix_opt.h b/newlib/libc/sys/linux/linuxthreads/bits/posix_opt.h
deleted file mode 100644
index 54640bb56..000000000
--- a/newlib/libc/sys/linux/linuxthreads/bits/posix_opt.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/* Define POSIX options for Linux.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _POSIX_OPT_H
-#define _POSIX_OPT_H 1
-
-/* Job control is supported. */
-#define _POSIX_JOB_CONTROL 1
-
-/* Processes have a saved set-user-ID and a saved set-group-ID. */
-#define _POSIX_SAVED_IDS 1
-
-/* Priority scheduling is supported. */
-#define _POSIX_PRIORITY_SCHEDULING 1
-
-/* Synchronizing file data is supported. */
-#define _POSIX_SYNCHRONIZED_IO 1
-
-/* The fsync function is present. */
-#define _POSIX_FSYNC 1
-
-/* Mapping of files to memory is supported. */
-#define _POSIX_MAPPED_FILES 1
-
-/* Locking of all memory is supported. */
-#define _POSIX_MEMLOCK 1
-
-/* Locking of ranges of memory is supported. */
-#define _POSIX_MEMLOCK_RANGE 1
-
-/* Setting of memory protections is supported. */
-#define _POSIX_MEMORY_PROTECTION 1
-
-/* Implementation supports `poll' function. */
-#define _POSIX_POLL 1
-
-/* Implementation supports `select' and `pselect' functions. */
-#define _POSIX_SELECT 1
-
-/* Only root can change owner of file. */
-#define _POSIX_CHOWN_RESTRICTED 1
-
-/* `c_cc' member of 'struct termios' structure can be disabled by
- using the value _POSIX_VDISABLE. */
-#define _POSIX_VDISABLE '\0'
-
-/* Filenames are not silently truncated. */
-#define _POSIX_NO_TRUNC 1
-
-/* X/Open realtime support is available. */
-#define _XOPEN_REALTIME 1
-
-/* X/Open realtime thread support is available. */
-#define _XOPEN_REALTIME_THREADS 1
-
-/* XPG4.2 shared memory is supported. */
-#define _XOPEN_SHM 1
-
-/* Tell we have POSIX threads. */
-#define _POSIX_THREADS 1
-
-/* We have the reentrant functions described in POSIX. */
-#define _POSIX_REENTRANT_FUNCTIONS 1
-#define _POSIX_THREAD_SAFE_FUNCTIONS 1
-
-/* We provide priority scheduling for threads. */
-#define _POSIX_THREAD_PRIORITY_SCHEDULING 1
-
-/* We support user-defined stack sizes. */
-#define _POSIX_THREAD_ATTR_STACKSIZE 1
-
-/* We support user-defined stacks. */
-#define _POSIX_THREAD_ATTR_STACKADDR 1
-
-/* We support POSIX.1b semaphores, but only the non-shared form for now. */
-#define _POSIX_SEMAPHORES 1
-
-/* Real-time signals are supported. */
-#define _POSIX_REALTIME_SIGNALS 1
-
-/* We support asynchronous I/O. */
-#define _POSIX_ASYNCHRONOUS_IO 1
-#define _POSIX_ASYNC_IO 1
-/* Alternative name for Unix98. */
-#define _LFS_ASYNCHRONOUS_IO 1
-
-/* The LFS support in asynchronous I/O is also available. */
-#define _LFS64_ASYNCHRONOUS_IO 1
-
-/* The rest of the LFS is also available. */
-#define _LFS_LARGEFILE 1
-#define _LFS64_LARGEFILE 1
-#define _LFS64_STDIO 1
-
-/* POSIX shared memory objects are implemented. */
-#define _POSIX_SHARED_MEMORY_OBJECTS 1
-
-/* GNU libc provides regular expression handling. */
-#define _POSIX_REGEXP 1
-
-/* Reader/Writer locks are available. */
-#define _POSIX_READER_WRITER_LOCKS 200912L
-
-/* We have a POSIX shell. */
-#define _POSIX_SHELL 1
-
-/* We support the Timeouts option. */
-#define _POSIX_TIMEOUTS 200912L
-
-/* We support spinlocks. */
-#define _POSIX_SPIN_LOCKS 200912L
-
-/* The `spawn' function family is supported. */
-#define _POSIX_SPAWN 200912L
-
-/* We have POSIX timers. */
-#define _POSIX_TIMERS 1
-
-/* The barrier functions are available. */
-#define _POSIX_BARRIERS 200912L
-
-/* POSIX message queues are not yet supported. */
-#undef _POSIX_MESSAGE_PASSING
-
-#endif /* posix_opt.h */
diff --git a/newlib/libc/sys/linux/linuxthreads/bits/pthreadtypes.h b/newlib/libc/sys/linux/linuxthreads/bits/pthreadtypes.h
deleted file mode 100644
index 3ee5c4813..000000000
--- a/newlib/libc/sys/linux/linuxthreads/bits/pthreadtypes.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-#if !defined _BITS_TYPES_H && !defined _PTHREAD_H
-# error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead."
-#endif
-
-#ifndef _BITS_PTHREADTYPES_H
-#define _BITS_PTHREADTYPES_H 1
-
-#define __need_schedparam
-#include <bits/sched.h>
-
-/* Fast locks (not abstract because mutexes and conditions aren't abstract). */
-struct _pthread_fastlock
-{
- long int __status; /* "Free" or "taken" or head of waiting list */
- int __spinlock; /* Used by compare_and_swap emulation. Also,
- adaptive SMP lock stores spin count here. */
-};
-
-#ifndef _PTHREAD_DESCR_DEFINED
-/* Thread descriptors */
-typedef struct _pthread_descr_struct *_pthread_descr;
-# define _PTHREAD_DESCR_DEFINED
-#endif
-
-
-/* Attributes for threads. */
-typedef struct __pthread_attr_s
-{
- int __detachstate;
- int __schedpolicy;
- struct __sched_param __schedparam;
- int __inheritsched;
- int __scope;
- size_t __guardsize;
- int __stackaddr_set;
- void *__stackaddr;
- size_t __stacksize;
-} pthread_attr_t;
-
-
-/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */
-typedef struct
-{
- struct _pthread_fastlock __c_lock; /* Protect against concurrent access */
- _pthread_descr __c_waiting; /* Threads waiting on this condition */
-} pthread_cond_t;
-
-
-/* Attribute for conditionally variables. */
-typedef struct
-{
- int __dummy;
-} pthread_condattr_t;
-
-/* Keys for thread-specific data */
-typedef unsigned int pthread_key_t;
-
-
-/* Mutexes (not abstract because of PTHREAD_MUTEX_INITIALIZER). */
-/* (The layout is unnatural to maintain binary compatibility
- with earlier releases of LinuxThreads.) */
-typedef struct
-{
- int __m_reserved; /* Reserved for future use */
- int __m_count; /* Depth of recursive locking */
- _pthread_descr __m_owner; /* Owner thread (if recursive or errcheck) */
- int __m_kind; /* Mutex kind: fast, recursive or errcheck */
- struct _pthread_fastlock __m_lock; /* Underlying fast lock */
-} pthread_mutex_t;
-
-
-/* Attribute for mutex. */
-typedef struct
-{
- int __mutexkind;
-} pthread_mutexattr_t;
-
-
-/* Once-only execution */
-typedef int pthread_once_t;
-
-
-#ifdef __USE_UNIX98
-/* Read-write locks. */
-typedef struct _pthread_rwlock_t
-{
- struct _pthread_fastlock __rw_lock; /* Lock to guarantee mutual exclusion */
- int __rw_readers; /* Number of readers */
- _pthread_descr __rw_writer; /* Identity of writer, or NULL if none */
- _pthread_descr __rw_read_waiting; /* Threads waiting for reading */
- _pthread_descr __rw_write_waiting; /* Threads waiting for writing */
- int __rw_kind; /* Reader/Writer preference selection */
- int __rw_pshared; /* Shared between processes or not */
-} pthread_rwlock_t;
-
-
-/* Attribute for read-write locks. */
-typedef struct
-{
- int __lockkind;
- int __pshared;
-} pthread_rwlockattr_t;
-#endif
-
-#ifdef __USE_XOPEN2K
-/* POSIX spinlock data type. */
-typedef volatile int pthread_spinlock_t;
-
-/* POSIX barrier. */
-typedef struct {
- struct _pthread_fastlock __ba_lock; /* Lock to guarantee mutual exclusion */
- int __ba_required; /* Threads needed for completion */
- int __ba_present; /* Threads waiting */
- _pthread_descr __ba_waiting; /* Queue of waiting threads */
-} pthread_barrier_t;
-
-/* barrier attribute */
-typedef struct {
- int __pshared;
-} pthread_barrierattr_t;
-
-#endif
-
-
-/* Thread identifiers */
-typedef unsigned long int pthread_t;
-
-#endif /* bits/pthreadtypes.h */
diff --git a/newlib/libc/sys/linux/linuxthreads/bits/sigthread.h b/newlib/libc/sys/linux/linuxthreads/bits/sigthread.h
deleted file mode 100644
index 1c62d8196..000000000
--- a/newlib/libc/sys/linux/linuxthreads/bits/sigthread.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Signal handling function for threaded programs.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef _BITS_SIGTHREAD_H
-#define _BITS_SIGTHREAD_H 1
-
-#if !defined _SIGNAL_H && !defined _PTHREAD_H
-# error "Never include this file directly. Use <pthread.h> instead"
-#endif
-
-/* Functions for handling signals. */
-
-/* Modify the signal mask for the calling thread. The arguments have
- the same meaning as for sigprocmask(2). */
-extern int pthread_sigmask (int __how,
- __const sigset_t *__restrict __newmask,
- sigset_t *__restrict __oldmask)__THROW;
-
-/* Send signal SIGNO to the given thread. */
-extern int pthread_kill (pthread_t __thread1, int __signo) __THROW;
-
-#endif /* bits/sigthread.h */
diff --git a/newlib/libc/sys/linux/linuxthreads/bp-sym.h b/newlib/libc/sys/linux/linuxthreads/bp-sym.h
deleted file mode 100644
index 1aeb2364e..000000000
--- a/newlib/libc/sys/linux/linuxthreads/bp-sym.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Bounded-pointer symbol modifier.
- Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Greg McGary <greg@mcgary.org>
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#define BP_SYM(name) _BP_SYM (name)
-#if __BOUNDED_POINTERS__
-# define _BP_SYM(name) __BP_##name
-#else
-# define _BP_SYM(name) name
-#endif
diff --git a/newlib/libc/sys/linux/linuxthreads/cancel.c b/newlib/libc/sys/linux/linuxthreads/cancel.c
deleted file mode 100644
index 0fd6cd094..000000000
--- a/newlib/libc/sys/linux/linuxthreads/cancel.c
+++ /dev/null
@@ -1,220 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-/* Thread cancellation */
-
-#include <errno.h>
-#include <rpc/rpc.h>
-#include "pthread.h"
-#include "internals.h"
-#include "spinlock.h"
-#include "restart.h"
-
-#ifdef _STACK_GROWS_DOWN
-# define FRAME_LEFT(frame, other) ((char *) frame >= (char *) other)
-#elif _STACK_GROWS_UP
-# define FRAME_LEFT(frame, other) ((char *) frame <= (char *) other)
-#else
-# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
-#endif
-
-
-int pthread_setcancelstate(int state, int * oldstate)
-{
- pthread_descr self = thread_self();
- if (state < PTHREAD_CANCEL_ENABLE || state > PTHREAD_CANCEL_DISABLE)
- return EINVAL;
- if (oldstate != NULL) *oldstate = THREAD_GETMEM(self, p_cancelstate);
- THREAD_SETMEM(self, p_cancelstate, state);
- if (THREAD_GETMEM(self, p_canceled) &&
- THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE &&
- THREAD_GETMEM(self, p_canceltype) == PTHREAD_CANCEL_ASYNCHRONOUS)
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
- return 0;
-}
-
-int pthread_setcanceltype(int type, int * oldtype)
-{
- pthread_descr self = thread_self();
- if (type < PTHREAD_CANCEL_DEFERRED || type > PTHREAD_CANCEL_ASYNCHRONOUS)
- return EINVAL;
- if (oldtype != NULL) *oldtype = THREAD_GETMEM(self, p_canceltype);
- THREAD_SETMEM(self, p_canceltype, type);
- if (THREAD_GETMEM(self, p_canceled) &&
- THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE &&
- THREAD_GETMEM(self, p_canceltype) == PTHREAD_CANCEL_ASYNCHRONOUS)
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
- return 0;
-}
-
-int pthread_cancel(pthread_t thread)
-{
- pthread_handle handle = thread_handle(thread);
- int pid;
- int dorestart = 0;
- pthread_descr th;
- pthread_extricate_if *pextricate;
- int already_canceled;
-
- __pthread_lock(&handle->h_lock, NULL);
- if (invalid_handle(handle, thread)) {
- __pthread_unlock(&handle->h_lock);
- return ESRCH;
- }
-
- th = handle->h_descr;
-
- already_canceled = th->p_canceled;
- th->p_canceled = 1;
-
- if (th->p_cancelstate == PTHREAD_CANCEL_DISABLE || already_canceled) {
- __pthread_unlock(&handle->h_lock);
- return 0;
- }
-
- pextricate = th->p_extricate;
- pid = th->p_pid;
-
- /* If the thread has registered an extrication interface, then
- invoke the interface. If it returns 1, then we succeeded in
- dequeuing the thread from whatever waiting object it was enqueued
- with. In that case, it is our responsibility to wake it up.
- And also to set the p_woken_by_cancel flag so the woken thread
- can tell that it was woken by cancellation. */
-
- if (pextricate != NULL) {
- dorestart = pextricate->pu_extricate_func(pextricate->pu_object, th);
- th->p_woken_by_cancel = dorestart;
- }
-
- __pthread_unlock(&handle->h_lock);
-
- /* If the thread has suspended or is about to, then we unblock it by
- issuing a restart, instead of a cancel signal. Otherwise we send
- the cancel signal to unblock the thread from a cancellation point,
- or to initiate asynchronous cancellation. The restart is needed so
- we have proper accounting of restarts; suspend decrements the thread's
- resume count, and restart() increments it. This also means that suspend's
- handling of the cancel signal is obsolete. */
-
- if (dorestart)
- restart(th);
- else
- kill(pid, __pthread_sig_cancel);
-
- return 0;
-}
-
-void pthread_testcancel(void)
-{
- pthread_descr self = thread_self();
- if (THREAD_GETMEM(self, p_canceled)
- && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE)
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
-}
-
-void _pthread_cleanup_push(struct _pthread_cleanup_buffer * buffer,
- void (*routine)(void *), void * arg)
-{
- pthread_descr self = thread_self();
- buffer->__routine = routine;
- buffer->__arg = arg;
- buffer->__prev = THREAD_GETMEM(self, p_cleanup);
- if (buffer->__prev != NULL && FRAME_LEFT (buffer, buffer->__prev))
- buffer->__prev = NULL;
- THREAD_SETMEM(self, p_cleanup, buffer);
-}
-
-void _pthread_cleanup_pop(struct _pthread_cleanup_buffer * buffer,
- int execute)
-{
- pthread_descr self = thread_self();
- if (execute) buffer->__routine(buffer->__arg);
- THREAD_SETMEM(self, p_cleanup, buffer->__prev);
-}
-
-void _pthread_cleanup_push_defer(struct _pthread_cleanup_buffer * buffer,
- void (*routine)(void *), void * arg)
-{
- pthread_descr self = thread_self();
- buffer->__routine = routine;
- buffer->__arg = arg;
- buffer->__canceltype = THREAD_GETMEM(self, p_canceltype);
- buffer->__prev = THREAD_GETMEM(self, p_cleanup);
- if (buffer->__prev != NULL && FRAME_LEFT (buffer, buffer->__prev))
- buffer->__prev = NULL;
- THREAD_SETMEM(self, p_canceltype, PTHREAD_CANCEL_DEFERRED);
- THREAD_SETMEM(self, p_cleanup, buffer);
-}
-
-void _pthread_cleanup_pop_restore(struct _pthread_cleanup_buffer * buffer,
- int execute)
-{
- pthread_descr self = thread_self();
- if (execute) buffer->__routine(buffer->__arg);
- THREAD_SETMEM(self, p_cleanup, buffer->__prev);
- THREAD_SETMEM(self, p_canceltype, buffer->__canceltype);
- if (THREAD_GETMEM(self, p_canceled) &&
- THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE &&
- THREAD_GETMEM(self, p_canceltype) == PTHREAD_CANCEL_ASYNCHRONOUS)
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
-}
-
-void __pthread_perform_cleanup(char *currentframe)
-{
- pthread_descr self = thread_self();
- struct _pthread_cleanup_buffer *c = THREAD_GETMEM(self, p_cleanup);
- struct _pthread_cleanup_buffer *last;
-
- if (c != NULL)
- while (FRAME_LEFT (currentframe, c))
- {
- last = c;
- c = c->__prev;
-
- if (c == NULL || FRAME_LEFT (last, c))
- {
- c = NULL;
- break;
- }
- }
-
- while (c != NULL)
- {
- c->__routine(c->__arg);
-
- last = c;
- c = c->__prev;
-
- if (FRAME_LEFT (last, c))
- break;
- }
-
-#if 0
- /* And the TSD which needs special help. */
- if (THREAD_GETMEM(self, p_libc_specific[_LIBC_TSD_KEY_RPC_VARS]) != NULL)
- __rpc_thread_destroy ();
-#endif
-}
-
-#ifndef SHARED
-/* We need a hook to force the cancelation wrappers and file locking
- to be linked in when static libpthread is used. */
-extern const int __pthread_provide_wrappers;
-static const int *const __pthread_require_wrappers =
- &__pthread_provide_wrappers;
-extern const int __pthread_provide_lockfile;
-static const int *const __pthread_require_lockfile =
- &__pthread_provide_lockfile;
-#endif
diff --git a/newlib/libc/sys/linux/linuxthreads/condvar.c b/newlib/libc/sys/linux/linuxthreads/condvar.c
deleted file mode 100644
index a06211f58..000000000
--- a/newlib/libc/sys/linux/linuxthreads/condvar.c
+++ /dev/null
@@ -1,301 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* and Pavel Krauz (krauz@fsid.cvut.cz). */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-/* Condition variables */
-
-#include <errno.h>
-#include <sched.h>
-#include <stddef.h>
-#include <sys/time.h>
-#include "pthread.h"
-#include "internals.h"
-#include "spinlock.h"
-#include "queue.h"
-#include "restart.h"
-
-int pthread_cond_init(pthread_cond_t *cond,
- const pthread_condattr_t *cond_attr)
-{
- __pthread_init_lock(&cond->__c_lock);
- cond->__c_waiting = NULL;
- return 0;
-}
-
-int pthread_cond_destroy(pthread_cond_t *cond)
-{
- if (cond->__c_waiting != NULL) return EBUSY;
- return 0;
-}
-
-/* Function called by pthread_cancel to remove the thread from
- waiting on a condition variable queue. */
-
-static int cond_extricate_func(void *obj, pthread_descr th)
-{
- volatile pthread_descr self = thread_self();
- pthread_cond_t *cond = obj;
- int did_remove = 0;
-
- __pthread_lock(&cond->__c_lock, self);
- did_remove = remove_from_queue(&cond->__c_waiting, th);
- __pthread_unlock(&cond->__c_lock);
-
- return did_remove;
-}
-
-int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
-{
- volatile pthread_descr self = thread_self();
- pthread_extricate_if extr;
- int already_canceled = 0;
- int spurious_wakeup_count;
-
- /* Check whether the mutex is locked and owned by this thread. */
- if (mutex->__m_kind != PTHREAD_MUTEX_TIMED_NP
- && mutex->__m_kind != PTHREAD_MUTEX_ADAPTIVE_NP
- && mutex->__m_owner != self)
- return EINVAL;
-
- /* Set up extrication interface */
- extr.pu_object = cond;
- extr.pu_extricate_func = cond_extricate_func;
-
- /* Register extrication interface */
- THREAD_SETMEM(self, p_condvar_avail, 0);
- __pthread_set_own_extricate_if(self, &extr);
-
- /* Atomically enqueue thread for waiting, but only if it is not
- canceled. If the thread is canceled, then it will fall through the
- suspend call below, and then call pthread_exit without
- having to worry about whether it is still on the condition variable queue.
- This depends on pthread_cancel setting p_canceled before calling the
- extricate function. */
-
- __pthread_lock(&cond->__c_lock, self);
- if (!(THREAD_GETMEM(self, p_canceled)
- && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE))
- enqueue(&cond->__c_waiting, self);
- else
- already_canceled = 1;
- __pthread_unlock(&cond->__c_lock);
-
- if (already_canceled) {
- __pthread_set_own_extricate_if(self, 0);
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
- }
-
- pthread_mutex_unlock(mutex);
-
- spurious_wakeup_count = 0;
- while (1)
- {
- suspend(self);
- if (THREAD_GETMEM(self, p_condvar_avail) == 0
- && (THREAD_GETMEM(self, p_woken_by_cancel) == 0
- || THREAD_GETMEM(self, p_cancelstate) != PTHREAD_CANCEL_ENABLE))
- {
- /* Count resumes that don't belong to us. */
- spurious_wakeup_count++;
- continue;
- }
- break;
- }
-
- __pthread_set_own_extricate_if(self, 0);
-
- /* Check for cancellation again, to provide correct cancellation
- point behavior */
-
- if (THREAD_GETMEM(self, p_woken_by_cancel)
- && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE) {
- THREAD_SETMEM(self, p_woken_by_cancel, 0);
- pthread_mutex_lock(mutex);
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
- }
-
- /* Put back any resumes we caught that don't belong to us. */
- while (spurious_wakeup_count--)
- restart(self);
-
- pthread_mutex_lock(mutex);
- return 0;
-}
-
-static int
-pthread_cond_timedwait_relative(pthread_cond_t *cond,
- pthread_mutex_t *mutex,
- const struct timespec * abstime)
-{
- volatile pthread_descr self = thread_self();
- int already_canceled = 0;
- pthread_extricate_if extr;
- int spurious_wakeup_count;
-
- /* Check whether the mutex is locked and owned by this thread. */
- if (mutex->__m_kind != PTHREAD_MUTEX_TIMED_NP
- && mutex->__m_kind != PTHREAD_MUTEX_ADAPTIVE_NP
- && mutex->__m_owner != self)
- return EINVAL;
-
- /* Set up extrication interface */
- extr.pu_object = cond;
- extr.pu_extricate_func = cond_extricate_func;
-
- /* Register extrication interface */
- THREAD_SETMEM(self, p_condvar_avail, 0);
- __pthread_set_own_extricate_if(self, &extr);
-
- /* Enqueue to wait on the condition and check for cancellation. */
- __pthread_lock(&cond->__c_lock, self);
- if (!(THREAD_GETMEM(self, p_canceled)
- && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE))
- enqueue(&cond->__c_waiting, self);
- else
- already_canceled = 1;
- __pthread_unlock(&cond->__c_lock);
-
- if (already_canceled) {
- __pthread_set_own_extricate_if(self, 0);
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
- }
-
- pthread_mutex_unlock(mutex);
-
- spurious_wakeup_count = 0;
- while (1)
- {
- if (!timedsuspend(self, abstime)) {
- int was_on_queue;
-
- /* __pthread_lock will queue back any spurious restarts that
- may happen to it. */
-
- __pthread_lock(&cond->__c_lock, self);
- was_on_queue = remove_from_queue(&cond->__c_waiting, self);
- __pthread_unlock(&cond->__c_lock);
-
- if (was_on_queue) {
- __pthread_set_own_extricate_if(self, 0);
- pthread_mutex_lock(mutex);
- return ETIMEDOUT;
- }
-
- /* Eat the outstanding restart() from the signaller */
- suspend(self);
- }
-
- if (THREAD_GETMEM(self, p_condvar_avail) == 0
- && (THREAD_GETMEM(self, p_woken_by_cancel) == 0
- || THREAD_GETMEM(self, p_cancelstate) != PTHREAD_CANCEL_ENABLE))
- {
- /* Count resumes that don't belong to us. */
- spurious_wakeup_count++;
- continue;
- }
- break;
- }
-
- __pthread_set_own_extricate_if(self, 0);
-
- /* The remaining logic is the same as in other cancellable waits,
- such as pthread_join sem_wait or pthread_cond wait. */
-
- if (THREAD_GETMEM(self, p_woken_by_cancel)
- && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE) {
- THREAD_SETMEM(self, p_woken_by_cancel, 0);
- pthread_mutex_lock(mutex);
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
- }
-
- /* Put back any resumes we caught that don't belong to us. */
- while (spurious_wakeup_count--)
- restart(self);
-
- pthread_mutex_lock(mutex);
- return 0;
-}
-
-int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
- const struct timespec * abstime)
-{
- /* Indirect call through pointer! */
- return pthread_cond_timedwait_relative(cond, mutex, abstime);
-}
-
-int pthread_cond_signal(pthread_cond_t *cond)
-{
- pthread_descr th;
-
- __pthread_lock(&cond->__c_lock, NULL);
- th = dequeue(&cond->__c_waiting);
- __pthread_unlock(&cond->__c_lock);
- if (th != NULL) {
- th->p_condvar_avail = 1;
- WRITE_MEMORY_BARRIER();
- restart(th);
- }
- return 0;
-}
-
-int pthread_cond_broadcast(pthread_cond_t *cond)
-{
- pthread_descr tosignal, th;
-
- __pthread_lock(&cond->__c_lock, NULL);
- /* Copy the current state of the waiting queue and empty it */
- tosignal = cond->__c_waiting;
- cond->__c_waiting = NULL;
- __pthread_unlock(&cond->__c_lock);
- /* Now signal each process in the queue */
- while ((th = dequeue(&tosignal)) != NULL) {
- th->p_condvar_avail = 1;
- WRITE_MEMORY_BARRIER();
- restart(th);
- }
- return 0;
-}
-
-int pthread_condattr_init(pthread_condattr_t *attr)
-{
- return 0;
-}
-
-int pthread_condattr_destroy(pthread_condattr_t *attr)
-{
- return 0;
-}
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 3
-
-int pthread_condattr_getpshared (const pthread_condattr_t *attr, int *pshared)
-{
- *pshared = PTHREAD_PROCESS_PRIVATE;
- return 0;
-}
-
-int pthread_condattr_setpshared (pthread_condattr_t *attr, int pshared)
-{
- if (pshared != PTHREAD_PROCESS_PRIVATE && pshared != PTHREAD_PROCESS_SHARED)
- return EINVAL;
-
- /* For now it is not possible to shared a conditional variable. */
- if (pshared != PTHREAD_PROCESS_PRIVATE)
- return ENOSYS;
-
- return 0;
-}
-
-#endif /* !_ELIX_LEVEL || _ELIX_LEVEL >= 3 */
-
diff --git a/newlib/libc/sys/linux/linuxthreads/config.h b/newlib/libc/sys/linux/linuxthreads/config.h
deleted file mode 100644
index 99b0528a6..000000000
--- a/newlib/libc/sys/linux/linuxthreads/config.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#define HAVE_WEAK_SYMBOLS 1
-#define HAVE_GNU_LD 1
-#define HAVE_ELF 1
-#define __ASSUME_REALTIME_SIGNALS 1
-#define ASM_GLOBAL_DIRECTIVE .global
-
-#define TEMP_FAILURE_RETRY(expression) \
- (__extension__ \
- ({ long int __result; \
- do __result = (long int) (expression); \
- while (__result == -1L && errno == EINTR); \
- __result; }))
-
-#define UINT32_C(c) c ## U
diff --git a/newlib/libc/sys/linux/linuxthreads/configure b/newlib/libc/sys/linux/linuxthreads/configure
deleted file mode 100755
index ded146b65..000000000
--- a/newlib/libc/sys/linux/linuxthreads/configure
+++ /dev/null
@@ -1,3453 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-shared[=PKGS] build shared libraries [default=yes]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=attr.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../../.. $srcdir/../../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../../.. $srcdir/../../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:590: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:643: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:700: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:733: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 738 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:766: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 771 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:948: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:969: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:987: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1030: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1043: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1056: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1069: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1082: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1107: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1137: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1186: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1210: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1241: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1273: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1305: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1337: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1382: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1436: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1470: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-
-if test "${use_libtool}" = "yes"; then
-
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_shared=yes
-fi
-
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
- enableval="$enable_static"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_static=yes
-fi
-
-# Check whether --enable-fast-install or --disable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
- enableval="$enable_fast_install"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_fast_install=yes
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1656: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1686: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1737: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1769: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1780 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1811: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1816: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1844: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1887: checking for ld used by GCC" >&5
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1917: checking for GNU ld" >&5
-else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1920: checking for non-GNU ld" >&5
-fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
-echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1955: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi
-fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1972: checking for $LD option to reload object files" >&5
-if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-
-echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-
-echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1984: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi
-fi
-
-NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
-
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:2022: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
-else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:2043: checking how to recognise dependant libraries" >&5
-if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.012)
- lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd* )
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
- fi
- ;;
-
-newsos6)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-sysv5uw[78]* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-
-fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2216: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:2246: checking for ${ac_tool_prefix}file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:2308: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2379: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2411: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2446: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_STRIP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2478: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- STRIP=":"
-fi
-fi
-
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-
-libtool_flags="$libtool_flags --enable-win32-dll"
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
- :
-fi
-
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
-else
- pic_mode=default
-fi
-
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 2545 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2583: checking whether the C compiler needs -belf" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 2596 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_needs_belf=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
-fi
-rm -f conftest*
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-fi
-
-echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2633: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_DLLTOOL"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2665: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- DLLTOOL="false"
-fi
-fi
-
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2700: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AS"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2732: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AS="false"
-fi
-fi
-
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2767: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_OBJDUMP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2799: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- OBJDUMP="false"
-fi
-fi
-
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
-echo "configure:2835: checking if libtool should supply DllMain function" >&5
-if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2840 "configure"
-#include "confdefs.h"
-
-int main() {
-extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:2848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_need_dllmain=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_need_dllmain=yes
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_need_dllmain" 1>&6
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
-echo "configure:2869: checking how to link DLLs" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2874 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_dll_switch=-mdll
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_dll_switch=-dll
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
-
-esac
-
-
-# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
-
-# Reload cache, that may have been modified by ltconfig
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-
-
-
-
-
-
-for ac_prog in mawk gawk nawk awk
-do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2995: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AWK="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AWK="$ac_cv_prog_AWK"
-if test -n "$AWK"; then
- echo "$ac_t""$AWK" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-test -n "$AWK" && break
-done
-
-fi
-
-if test -n "${machine_dir}"; then
- MACHINE_OBJLIST=machine/${machine_dir}/objectlist.awk.in
- MACHINE_LIB=machine/${machine_dir}/lib.a
-fi
-
-
-
-subdirs="machine"
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-s%@LN_S@%$LN_S%g
-s%@STRIP@%$STRIP%g
-s%@DLLTOOL@%$DLLTOOL%g
-s%@OBJDUMP@%$OBJDUMP%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@AWK@%$AWK%g
-s%@MACHINE_OBJLIST@%$MACHINE_OBJLIST%g
-s%@MACHINE_LIB@%$MACHINE_LIB%g
-s%@subdirs@%$subdirs%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-if test "$no_recursion" != yes; then
-
- # Remove --cache-file and --srcdir arguments so they do not pile up.
- ac_sub_configure_args=
- ac_prev=
- for ac_arg in $ac_configure_args; do
- if test -n "$ac_prev"; then
- ac_prev=
- continue
- fi
- case "$ac_arg" in
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- ;;
- *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
- esac
- done
-
- for ac_config_dir in machine; do
-
- # Do not complain, so a configure script can configure whichever
- # parts of a large source tree are present.
- if test ! -d $srcdir/$ac_config_dir; then
- continue
- fi
-
- echo configuring in $ac_config_dir
-
- case "$srcdir" in
- .) ;;
- *)
- if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
- else
- { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
- fi
- ;;
- esac
-
- ac_popdir=`pwd`
- cd $ac_config_dir
-
- # A "../" for each directory in /$ac_config_dir.
- ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
- case "$srcdir" in
- .) # No --srcdir option. We are building in place.
- ac_sub_srcdir=$srcdir ;;
- /*) # Absolute path.
- ac_sub_srcdir=$srcdir/$ac_config_dir ;;
- *) # Relative path.
- ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
- esac
-
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_sub_srcdir/configure; then
- ac_sub_configure=$ac_sub_srcdir/configure
- elif test -f $ac_sub_srcdir/configure.in; then
- ac_sub_configure=$ac_configure
- else
- echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
- ac_sub_configure=
- fi
-
- # The recursion is here.
- if test -n "$ac_sub_configure"; then
-
- # Make the cache file name correct relative to the subdirectory.
- case "$cache_file" in
- /*) ac_sub_cache_file=$cache_file ;;
- *) # Relative path.
- ac_sub_cache_file="$ac_dots$cache_file" ;;
- esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
- # The eval makes quoting arguments work.
- if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
- then :
- else
- { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
- fi
- fi
-
- cd $ac_popdir
- done
-fi
-
diff --git a/newlib/libc/sys/linux/linuxthreads/configure.in b/newlib/libc/sys/linux/linuxthreads/configure.in
deleted file mode 100644
index 113743a87..000000000
--- a/newlib/libc/sys/linux/linuxthreads/configure.in
+++ /dev/null
@@ -1,31 +0,0 @@
-dnl This is the newlib/libc/sys/linux/linuxthreads configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(attr.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../../..)
-
-NEWLIB_CONFIGURE(../../../..)
-
-dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
-dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
-dnl line of the macro which fail because appropriate LDFLAGS are not set.
-
-if test "${use_libtool}" = "yes"; then
-AC_LIBTOOL_WIN32_DLL
-AM_PROG_LIBTOOL
-AC_PROG_AWK
-fi
-
-if test -n "${machine_dir}"; then
- MACHINE_OBJLIST=machine/${machine_dir}/objectlist.awk.in
- MACHINE_LIB=machine/${machine_dir}/lib.a
-fi
-AC_SUBST(MACHINE_OBJLIST)
-AC_SUBST(MACHINE_LIB)
-
-AC_CONFIG_SUBDIRS(machine)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/linux/linuxthreads/defs.awk b/newlib/libc/sys/linux/linuxthreads/defs.awk
deleted file mode 100644
index 7ca5a3364..000000000
--- a/newlib/libc/sys/linux/linuxthreads/defs.awk
+++ /dev/null
@@ -1,27 +0,0 @@
-/^[ ]*\.endp/ { need_endp = 1 }
-/^[ ]*\.end/ { need_end = 1 }
-/^[ ]*\.align/ { if($2 > max) max = $2; }
-
-END {
- if(need_endp)
- {
- print "#define END_INIT .endp _init";
- print "#define END_FINI .endp _fini";
- } else if(need_end)
- {
- print "#define END_INIT .end _init";
- print "#define END_FINI .end _fini";
- }
- else
- {
- print "#define END_INIT";
- print "#define END_FINI";
- }
- if(max)
- print "#define ALIGN .align", max;
- else
- print "#define ALIGN";
-
- print "#include <libc-symbols.h>";
- print "weak_extern (__gmon_start__)";
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/ecmutex.c b/newlib/libc/sys/linux/linuxthreads/ecmutex.c
deleted file mode 100644
index ce54ddf33..000000000
--- a/newlib/libc/sys/linux/linuxthreads/ecmutex.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/* Test of the error checking mutex and incidently also barriers. */
-
-#include <errno.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-
-static pthread_mutex_t locks[] =
-{
- PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
- PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
- PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
- PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
- PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
-};
-#define nlocks ((int) (sizeof (locks) / sizeof (locks[0])))
-
-static pthread_barrier_t barrier;
-#define SYNC pthread_barrier_wait (&barrier)
-
-#define NTHREADS nlocks
-
-#define ROUNDS 20
-
-
-static void *
-worker (void *arg)
-{
- /* We are locking the and unlocked the locks and check the errors.
- Since we are using the error-checking variant the implementation
- should report them. */
- int nr = (long int) arg;
- int i;
- void *result = NULL;
- int retval;
-
- for (i = 0; i < ROUNDS; ++i)
- {
- /* Skip the rounds which would make other == own. */
- if (i % nlocks == 0)
- continue;
-
- /* Get the "own" mutex. */
- if (pthread_mutex_trylock (&locks[nr]) != 0)
- {
- printf ("thread %d failed getting own mutex\n", nr);
- result = (void *) 1;
- }
-
- /* Try locking "own" mutex again. */
- retval = pthread_mutex_lock (&locks[nr]);
- if (retval != EDEADLK)
- {
- printf ("thread %d failed getting own mutex\n", nr);
- result = (void *) 1;
- }
-
- /* Try to get a different semaphore. */
- SYNC;
- retval = pthread_mutex_trylock (&locks[(nr + i) % nlocks]);
- if (retval != EBUSY)
- {
- printf ("thread %d didn't deadlock on getting %d's lock\n",
- nr, (nr + i) % nlocks);
- result = (void *) 1;
- }
-
- /* Try unlocking other's lock. */
- retval = pthread_mutex_unlock (&locks[(nr + i) % nlocks]);
- if (retval != EPERM)
- {
- printf ("thread %d managed releasing mutex %d\n",
- nr, (nr + i) % nlocks);
- result = (void *) 1;
- }
-
- /* All lock one mutex now. */
- SYNC;
- retval = pthread_mutex_lock (&locks[i % nlocks]);
- if (nr == (i % nlocks))
- {
- if (retval != EDEADLK)
- {
- printf ("thread %d didn't deadlock on getting %d's lock\n",
- nr, (nr + i) % nlocks);
- result = (void *) 1;
- }
- if (pthread_mutex_unlock (&locks[i % nlocks]) != 0)
- {
- printf ("thread %d failed releasing own mutex\n", nr);
- result = (void *) 1;
- }
- }
- else
- {
- if (retval != 0)
- {
- printf ("thread %d failed acquiring mutex %d\n",
- nr, i % nlocks);
- result = (void *) 1;
- }
- else if (pthread_mutex_unlock (&locks[i % nlocks]) != 0)
- {
- printf ("thread %d failed releasing mutex %d\n",
- nr, i % nlocks);
- result = (void *) 1;
- }
- }
-
- /* Unlock the own lock. */
- SYNC;
- if (nr != (i % nlocks) && pthread_mutex_unlock (&locks[nr]) != 0)
- {
- printf ("thread %d failed releasing own mutex\n", nr);
- result = (void *) 1;
- }
-
- /* Try unlocking again. */
- retval = pthread_mutex_unlock (&locks[nr]);
- if (retval == 0)
- {
- printf ("thread %d managed releasing own mutex twice\n", nr);
- result = (void *) 1;
- }
- }
-
- return result;
-}
-
-
-#define TEST_FUNCTION do_test ()
-static int
-do_test (void)
-{
- pthread_t threads[NTHREADS];
- int i;
- void *res;
- int result = 0;
-
- pthread_barrier_init (&barrier, NULL, NTHREADS);
-
- for (i = 0; i < NTHREADS; ++i)
- if (pthread_create (&threads[i], NULL, worker, (void *) (long int) i) != 0)
- {
- printf ("failed to create thread %d: %m\n", i);
- exit (1);
- }
-
- for (i = 0; i < NTHREADS; ++i)
- if (pthread_join (threads[i], &res) != 0 || res != NULL)
- result = 1;
-
- return result;
-}
-
-#include "../test-skeleton.c"
diff --git a/newlib/libc/sys/linux/linuxthreads/events.c b/newlib/libc/sys/linux/linuxthreads/events.c
deleted file mode 100644
index c65bafc76..000000000
--- a/newlib/libc/sys/linux/linuxthreads/events.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Event functions used while debugging.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* The functions contained here do nothing, they just return. */
-
-#include "internals.h"
-
-void
-__linuxthreads_create_event (void)
-{
-}
-
-void
-__linuxthreads_death_event (void)
-{
-}
-
-void
-__linuxthreads_reap_event (void)
-{
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/getcpuclockid.c b/newlib/libc/sys/linux/linuxthreads/getcpuclockid.c
deleted file mode 100644
index 76d39a5de..000000000
--- a/newlib/libc/sys/linux/linuxthreads/getcpuclockid.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <pthread.h>
-#include <sys/time.h>
-#include <internals.h>
-
-int
-pthread_getcpuclockid (pthread_t thread_id, clockid_t *clock_id)
-{
- /* We don't allow any process ID but our own. */
- if (thread_handle (thread_id)->h_descr != thread_self ())
- return EPERM;
-
-#ifdef CLOCK_THREAD_CPUTIME_ID
- /* Store the number. */
- *clock_id = CLOCK_THREAD_CPUTIME_ID;
-
- return 0;
-#else
- /* We don't have a timer for that. */
- return ENOENT;
-#endif
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/getreent.c b/newlib/libc/sys/linux/linuxthreads/getreent.c
deleted file mode 100644
index e73c4a531..000000000
--- a/newlib/libc/sys/linux/linuxthreads/getreent.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* get thread-specific reentrant pointer */
-
-#include <internals.h>
-
-struct _reent *
-__getreent (void)
-{
- pthread_descr self = thread_self();
- return THREAD_GETMEM(self, p_reentp);
-}
-
diff --git a/newlib/libc/sys/linux/linuxthreads/internals.h b/newlib/libc/sys/linux/linuxthreads/internals.h
deleted file mode 100644
index 6da0deb43..000000000
--- a/newlib/libc/sys/linux/linuxthreads/internals.h
+++ /dev/null
@@ -1,576 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-#ifndef _INTERNALS_H
-#define _INTERNALS_H 1
-
-/* Internal data structures */
-
-/* Includes */
-
-#include <limits.h>
-#include <resolv.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <unistd.h>
-#include <stackinfo.h>
-#include <sys/types.h>
-#include <reent.h>
-#include <bits/libc-tsd.h> /* for _LIBC_TSD_KEY_N */
-
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
-#include "libc-symbols.h"
-#include "pt-machine.h"
-#include "semaphore.h"
-#include "thread_dbP.h"
-#include <hp-timing.h>
-
-#ifndef THREAD_GETMEM
-# define THREAD_GETMEM(descr, member) descr->member
-#endif
-#ifndef THREAD_GETMEM_NC
-# define THREAD_GETMEM_NC(descr, member) descr->member
-#endif
-#ifndef THREAD_SETMEM
-# define THREAD_SETMEM(descr, member, value) descr->member = (value)
-#endif
-#ifndef THREAD_SETMEM_NC
-# define THREAD_SETMEM_NC(descr, member, value) descr->member = (value)
-#endif
-
-/* Arguments passed to thread creation routine */
-
-struct pthread_start_args {
- void * (*start_routine)(void *); /* function to run */
- void * arg; /* its argument */
- sigset_t mask; /* initial signal mask for thread */
- int schedpolicy; /* initial scheduling policy (if any) */
- struct __sched_param schedparam; /* initial scheduling parameters (if any) */
-};
-
-
-/* We keep thread specific data in a special data structure, a two-level
- array. The top-level array contains pointers to dynamically allocated
- arrays of a certain number of data pointers. So we can implement a
- sparse array. Each dynamic second-level array has
- PTHREAD_KEY_2NDLEVEL_SIZE
- entries. This value shouldn't be too large. */
-#define PTHREAD_KEY_2NDLEVEL_SIZE 32
-
-/* We need to address PTHREAD_KEYS_MAX key with PTHREAD_KEY_2NDLEVEL_SIZE
- keys in each subarray. */
-#define PTHREAD_KEY_1STLEVEL_SIZE \
- ((PTHREAD_KEYS_MAX + PTHREAD_KEY_2NDLEVEL_SIZE - 1) \
- / PTHREAD_KEY_2NDLEVEL_SIZE)
-
-typedef void (*destr_function)(void *);
-
-struct pthread_key_struct {
- int in_use; /* already allocated? */
- destr_function destr; /* destruction routine */
-};
-
-
-#define PTHREAD_START_ARGS_INITIALIZER(fct) \
- { (void *(*) (void *)) fct, NULL, {{0, }}, 0, { 0 } }
-
-/* The type of thread descriptors */
-
-typedef struct _pthread_descr_struct * pthread_descr;
-
-/* Callback interface for removing the thread from waiting on an
- object if it is cancelled while waiting or about to wait.
- This hold a pointer to the object, and a pointer to a function
- which ``extricates'' the thread from its enqueued state.
- The function takes two arguments: pointer to the wait object,
- and a pointer to the thread. It returns 1 if an extrication
- actually occured, and hence the thread must also be signalled.
- It returns 0 if the thread had already been extricated. */
-
-typedef struct _pthread_extricate_struct {
- void *pu_object;
- int (*pu_extricate_func)(void *, pthread_descr);
-} pthread_extricate_if;
-
-/* Atomic counter made possible by compare_and_swap */
-
-struct pthread_atomic {
- long p_count;
- int p_spinlock;
-};
-
-/* Context info for read write locks. The pthread_rwlock_info structure
- is information about a lock that has been read-locked by the thread
- in whose list this structure appears. The pthread_rwlock_context
- is embedded in the thread context and contains a pointer to the
- head of the list of lock info structures, as well as a count of
- read locks that are untracked, because no info structure could be
- allocated for them. */
-
-struct _pthread_rwlock_t;
-
-typedef struct _pthread_rwlock_info {
- struct _pthread_rwlock_info *pr_next;
- struct _pthread_rwlock_t *pr_lock;
- int pr_lock_count;
-} pthread_readlock_info;
-
-struct _pthread_descr_struct {
- union {
- struct {
- pthread_descr self; /* Pointer to this structure */
- } data;
- void *__padding[16];
- } p_header;
- pthread_descr p_nextlive, p_prevlive;
- /* Double chaining of active threads */
- pthread_descr p_nextwaiting; /* Next element in the queue holding the thr */
- pthread_descr p_nextlock; /* can be on a queue and waiting on a lock */
- pthread_t p_tid; /* Thread identifier */
- int p_pid; /* PID of Unix process */
- int p_priority; /* Thread priority (== 0 if not realtime) */
- struct _pthread_fastlock * p_lock; /* Spinlock for synchronized accesses */
- int p_signal; /* last signal received */
- sigjmp_buf * p_signal_jmp; /* where to siglongjmp on a signal or NULL */
- sigjmp_buf * p_cancel_jmp; /* where to siglongjmp on a cancel or NULL */
- char p_terminated; /* true if terminated e.g. by pthread_exit */
- char p_detached; /* true if detached */
- char p_exited; /* true if the assoc. process terminated */
- void * p_retval; /* placeholder for return value */
- int p_retcode; /* placeholder for return code */
- pthread_descr p_joining; /* thread joining on that thread or NULL */
- struct _pthread_cleanup_buffer * p_cleanup; /* cleanup functions */
- char p_cancelstate; /* cancellation state */
- char p_canceltype; /* cancellation type (deferred/async) */
- char p_canceled; /* cancellation request pending */
- struct _reent * p_reentp; /* pointer to reent struct */
- struct _reent p_reent; /* reentrant structure for newlib */
- int * p_h_errnop; /* pointer to used h_errno variable */
- int p_h_errno; /* error returned by last netdb function */
- char * p_in_sighandler; /* stack address of sighandler, or NULL */
- char p_sigwaiting; /* true if a sigwait() is in progress */
- struct pthread_start_args p_start_args; /* arguments for thread creation */
- void ** p_specific[PTHREAD_KEY_1STLEVEL_SIZE]; /* thread-specific data */
- void * p_libc_specific[_LIBC_TSD_KEY_N]; /* thread-specific data for libc */
- int p_userstack; /* nonzero if the user provided the stack */
- void *p_guardaddr; /* address of guard area or NULL */
- size_t p_guardsize; /* size of guard area */
- int p_nr; /* Index of descriptor in __pthread_handles */
- int p_report_events; /* Nonzero if events must be reported. */
- td_eventbuf_t p_eventbuf; /* Data for event. */
- struct pthread_atomic p_resume_count; /* number of times restart() was
- called on thread */
- char p_woken_by_cancel; /* cancellation performed wakeup */
- char p_condvar_avail; /* flag if conditional variable became avail */
- char p_sem_avail; /* flag if semaphore became available */
- pthread_extricate_if *p_extricate; /* See above */
- pthread_readlock_info *p_readlock_list; /* List of readlock info structs */
- pthread_readlock_info *p_readlock_free; /* Free list of structs */
- int p_untracked_readlock_count; /* Readlocks not tracked by list */
- struct __res_state *p_resp; /* Pointer to resolver state */
- struct __res_state p_res; /* per-thread resolver state */
- int p_inheritsched; /* copied from the thread attribute */
-#if HP_TIMING_AVAIL
- hp_timing_t p_cpuclock_offset; /* Initial CPU clock for thread. */
-#endif
- /* New elements must be added at the end. */
-} __attribute__ ((aligned(32))); /* We need to align the structure so that
- doubles are aligned properly. This is 8
- bytes on MIPS and 16 bytes on MIPS64.
- 32 bytes might give better cache
- utilization. */
-
-
-/* The type of thread handles. */
-
-typedef struct pthread_handle_struct * pthread_handle;
-
-struct pthread_handle_struct {
- struct _pthread_fastlock h_lock; /* Fast lock for sychronized access */
- pthread_descr h_descr; /* Thread descriptor or NULL if invalid */
- char * h_bottom; /* Lowest address in the stack thread */
-};
-
-/* The type of messages sent to the thread manager thread */
-
-struct pthread_request {
- pthread_descr req_thread; /* Thread doing the request */
- enum { /* Request kind */
- REQ_CREATE, REQ_FREE, REQ_PROCESS_EXIT, REQ_MAIN_THREAD_EXIT,
- REQ_POST, REQ_DEBUG, REQ_KICK, REQ_FOR_EACH_THREAD
- } req_kind;
- union { /* Arguments for request */
- struct { /* For REQ_CREATE: */
- const pthread_attr_t * attr; /* thread attributes */
- void * (*fn)(void *); /* start function */
- void * arg; /* argument to start function */
- sigset_t mask; /* signal mask */
- } create;
- struct { /* For REQ_FREE: */
- pthread_t thread_id; /* identifier of thread to free */
- } free;
- struct { /* For REQ_PROCESS_EXIT: */
- int code; /* exit status */
- } exit;
- void * post; /* For REQ_POST: the semaphore */
- struct { /* For REQ_FOR_EACH_THREAD: callback */
- void (*fn)(void *, pthread_descr);
- void *arg;
- } for_each;
- } req_args;
-};
-
-
-/* Signals used for suspend/restart and for cancellation notification. */
-
-extern int __pthread_sig_restart;
-extern int __pthread_sig_cancel;
-
-/* Signal used for interfacing with gdb */
-
-extern int __pthread_sig_debug;
-
-/* Global array of thread handles, used for validating a thread id
- and retrieving the corresponding thread descriptor. Also used for
- mapping the available stack segments. */
-
-extern struct pthread_handle_struct __pthread_handles[PTHREAD_THREADS_MAX];
-
-/* Descriptor of the initial thread */
-
-extern struct _pthread_descr_struct __pthread_initial_thread;
-
-/* Descriptor of the manager thread */
-
-extern struct _pthread_descr_struct __pthread_manager_thread;
-
-/* Descriptor of the main thread */
-
-extern pthread_descr __pthread_main_thread;
-
-/* Limit between the stack of the initial thread (above) and the
- stacks of other threads (below). Aligned on a STACK_SIZE boundary.
- Initially 0, meaning that the current thread is (by definition)
- the initial thread. */
-
-extern char *__pthread_initial_thread_bos;
-
-/* Indicate whether at least one thread has a user-defined stack (if 1),
- or all threads have stacks supplied by LinuxThreads (if 0). */
-
-extern int __pthread_nonstandard_stacks;
-
-/* File descriptor for sending requests to the thread manager.
- Initially -1, meaning that __pthread_initialize_manager must be called. */
-
-extern int __pthread_manager_request;
-
-/* Other end of the pipe for sending requests to the thread manager. */
-
-extern int __pthread_manager_reader;
-
-/* Limits of the thread manager stack. */
-
-extern char *__pthread_manager_thread_bos;
-extern char *__pthread_manager_thread_tos;
-
-#ifdef FLOATING_STACKS
-/* Maximum stack size. */
-extern size_t __pthread_max_stacksize;
-#endif
-
-/* Pending request for a process-wide exit */
-
-extern int __pthread_exit_requested, __pthread_exit_code;
-
-/* Set to 1 by gdb if we're debugging */
-
-extern volatile int __pthread_threads_debug;
-
-/* Globally enabled events. */
-extern volatile td_thr_events_t __pthread_threads_events;
-
-/* Pointer to descriptor of thread with last event. */
-extern volatile pthread_descr __pthread_last_event;
-
-/* Flag which tells whether we are executing on SMP kernel. */
-extern int __pthread_smp_kernel;
-
-/* Return the handle corresponding to a thread id */
-
-static inline pthread_handle thread_handle(pthread_t id)
-{
- return &__pthread_handles[id % PTHREAD_THREADS_MAX];
-}
-
-/* Validate a thread handle. Must have acquired h->h_spinlock before. */
-
-static inline int invalid_handle(pthread_handle h, pthread_t id)
-{
- return h->h_descr == NULL || h->h_descr->p_tid != id || h->h_descr->p_terminated;
-}
-
-static inline int nonexisting_handle(pthread_handle h, pthread_t id)
-{
- return h->h_descr == NULL || h->h_descr->p_tid != id;
-}
-
-/* Fill in defaults left unspecified by pt-machine.h. */
-
-/* We round up a value with page size. */
-#ifndef page_roundup
-#define page_roundup(v,p) ((((size_t) (v)) + (p) - 1) & ~((p) - 1))
-#endif
-
-/* The page size we can get from the system. This should likely not be
- changed by the machine file but, you never know. */
-#ifndef PAGE_SIZE
-#define PAGE_SIZE (sysconf (_SC_PAGE_SIZE))
-#endif
-
-/* The max size of the thread stack segments. If the default
- THREAD_SELF implementation is used, this must be a power of two and
- a multiple of PAGE_SIZE. */
-#ifndef STACK_SIZE
-#define STACK_SIZE (2 * 1024 * 1024)
-#endif
-
-/* The initial size of the thread stack. Must be a multiple of PAGE_SIZE. */
-#ifndef INITIAL_STACK_SIZE
-#define INITIAL_STACK_SIZE (4 * PAGE_SIZE)
-#endif
-
-/* Size of the thread manager stack. The "- 32" avoids wasting space
- with some malloc() implementations. */
-#ifndef THREAD_MANAGER_STACK_SIZE
-#define THREAD_MANAGER_STACK_SIZE (2 * PAGE_SIZE - 32)
-#endif
-
-/* The base of the "array" of thread stacks. The array will grow down from
- here. Defaults to the calculated bottom of the initial application
- stack. */
-#ifndef THREAD_STACK_START_ADDRESS
-#define THREAD_STACK_START_ADDRESS __pthread_initial_thread_bos
-#endif
-
-/* Get some notion of the current stack. Need not be exactly the top
- of the stack, just something somewhere in the current frame. */
-#ifndef CURRENT_STACK_FRAME
-#define CURRENT_STACK_FRAME ({ char __csf; &__csf; })
-#endif
-
-/* Recover thread descriptor for the current thread */
-
-extern pthread_descr __pthread_find_self (void) __attribute__ ((const));
-
-static inline pthread_descr thread_self (void) __attribute__ ((const));
-static inline pthread_descr thread_self (void)
-{
-#ifdef THREAD_SELF
- return THREAD_SELF;
-#else
- char *sp = CURRENT_STACK_FRAME;
- if (sp >= __pthread_initial_thread_bos)
- return &__pthread_initial_thread;
- else if (sp >= __pthread_manager_thread_bos
- && sp < __pthread_manager_thread_tos)
- return &__pthread_manager_thread;
- else if (__pthread_nonstandard_stacks)
- return __pthread_find_self();
- else
-#ifdef _STACK_GROWS_DOWN
- return (pthread_descr)(((unsigned long)sp | (STACK_SIZE-1))+1) - 1;
-#else
- return (pthread_descr)((unsigned long)sp &~ (STACK_SIZE-1));
-#endif
-#endif
-}
-
-/* If MEMORY_BARRIER isn't defined in pt-machine.h, assume the architecture
- doesn't need a memory barrier instruction (e.g. Intel x86). Still we
- need the compiler to respect the barrier and emit all outstanding
- operations which modify memory. Some architectures distinguish between
- full, read and write barriers. */
-
-#ifndef MEMORY_BARRIER
-#define MEMORY_BARRIER() asm ("" : : : "memory")
-#endif
-#ifndef READ_MEMORY_BARRIER
-#define READ_MEMORY_BARRIER() MEMORY_BARRIER()
-#endif
-#ifndef WRITE_MEMORY_BARRIER
-#define WRITE_MEMORY_BARRIER() MEMORY_BARRIER()
-#endif
-
-/* Max number of times we must spin on a spinlock calling sched_yield().
- After MAX_SPIN_COUNT iterations, we put the calling thread to sleep. */
-
-#ifndef MAX_SPIN_COUNT
-#define MAX_SPIN_COUNT 50
-#endif
-
-/* Max number of times the spinlock in the adaptive mutex implementation
- spins actively on SMP systems. */
-
-#ifndef MAX_ADAPTIVE_SPIN_COUNT
-#define MAX_ADAPTIVE_SPIN_COUNT 100
-#endif
-
-/* Duration of sleep (in nanoseconds) when we can't acquire a spinlock
- after MAX_SPIN_COUNT iterations of sched_yield().
- With the 2.0 and 2.1 kernels, this MUST BE > 2ms.
- (Otherwise the kernel does busy-waiting for realtime threads,
- giving other threads no chance to run.) */
-
-#ifndef SPIN_SLEEP_DURATION
-#define SPIN_SLEEP_DURATION 2000001
-#endif
-
-/* Debugging */
-
-#ifdef DEBUG
-#include <assert.h>
-#define ASSERT assert
-#define MSG __pthread_message
-#else
-#define ASSERT(x)
-#define MSG(msg,arg...)
-#endif
-
-/* Internal global functions */
-
-extern void __pthread_do_exit (void *retval, char *currentframe)
- __attribute__ ((__noreturn__));
-extern void __pthread_destroy_specifics (void);
-extern void __pthread_perform_cleanup (char *currentframe);
-extern void __pthread_init_max_stacksize (void);
-extern int __pthread_initialize_manager (void);
-extern void __pthread_message (char * fmt, ...);
-extern int __pthread_manager (void *reqfd);
-extern int __pthread_manager_event (void *reqfd);
-extern void __pthread_manager_sighandler (int sig);
-extern void __pthread_reset_main_thread (void);
-extern void __pthread_once_fork_prepare (void);
-extern void __pthread_once_fork_parent (void);
-extern void __pthread_once_fork_child (void);
-extern void __flockfilelist (void);
-extern void __funlockfilelist (void);
-extern void __fresetlockfiles (void);
-extern void __pthread_manager_adjust_prio (int thread_prio);
-extern void __pthread_initialize_minimal (void);
-
-extern int __pthread_attr_setguardsize (pthread_attr_t *__attr,
- size_t __guardsize);
-extern int __pthread_attr_getguardsize (const pthread_attr_t *__attr,
- size_t *__guardsize);
-extern int __pthread_attr_setstackaddr (pthread_attr_t *__attr,
- void *__stackaddr);
-extern int __pthread_attr_getstackaddr (const pthread_attr_t *__attr,
- void **__stackaddr);
-extern int __pthread_attr_setstacksize (pthread_attr_t *__attr,
- size_t __stacksize);
-extern int __pthread_attr_getstacksize (const pthread_attr_t *__attr,
- size_t *__stacksize);
-extern int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
- size_t __stacksize);
-extern int __pthread_attr_getstack (const pthread_attr_t *__attr, void **__stackaddr,
- size_t *__stacksize);
-extern int __pthread_getconcurrency (void);
-extern int __pthread_setconcurrency (int __level);
-extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex,
- const struct timespec *__abstime);
-extern int __pthread_mutexattr_getpshared (const pthread_mutexattr_t *__attr,
- int *__pshared);
-extern int __pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
- int __pshared);
-extern int __pthread_mutexattr_gettype (const pthread_mutexattr_t *__attr,
- int *__kind);
-extern void __pthread_kill_other_threads_np (void);
-
-extern void __pthread_restart_old(pthread_descr th);
-extern void __pthread_suspend_old(pthread_descr self);
-extern int __pthread_timedsuspend_old(pthread_descr self, const struct timespec *abs);
-
-extern void __pthread_restart_new(pthread_descr th);
-extern void __pthread_suspend_new(pthread_descr self);
-extern int __pthread_timedsuspend_new(pthread_descr self, const struct timespec *abs);
-
-extern void __pthread_wait_for_restart_signal(pthread_descr self);
-
-extern int __pthread_yield (void);
-
-extern int __pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
- __const struct timespec *__restrict
- __abstime);
-extern int __pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
- __const struct timespec *__restrict
- __abstime);
-extern int __pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr);
-
-extern int __pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
- __restrict __attr,
- int *__restrict __pshared);
-
-extern int __pthread_spin_lock (pthread_spinlock_t *__lock);
-extern int __pthread_spin_trylock (pthread_spinlock_t *__lock);
-extern int __pthread_spin_unlock (pthread_spinlock_t *__lock);
-extern int __pthread_spin_init (pthread_spinlock_t *__lock, int __pshared);
-extern int __pthread_spin_destroy (pthread_spinlock_t *__lock);
-
-extern int __pthread_clock_gettime (hp_timing_t freq, struct timespec *tp);
-extern void __pthread_clock_settime (hp_timing_t offset);
-
-
-/* Global pointers to old or new suspend functions */
-
-extern void (*__pthread_restart)(pthread_descr);
-extern void (*__pthread_suspend)(pthread_descr);
-extern int (*__pthread_timedsuspend)(pthread_descr, const struct timespec *);
-
-/* Prototypes for the function without cancelation support when the
- normal version has it. */
-extern int __libc_close (int fd);
-extern int __libc_nanosleep (const struct timespec *requested_time,
- struct timespec *remaining);
-/* Prototypes for some of the new semaphore functions. */
-extern int __new_sem_post (sem_t * sem);
-extern int __new_sem_init (sem_t *__sem, int __pshared, unsigned int __value);
-extern int __new_sem_wait (sem_t *__sem);
-extern int __new_sem_trywait (sem_t *__sem);
-extern int __new_sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval);
-extern int __new_sem_destroy (sem_t *__sem);
-
-/* Prototypes for compatibility functions. */
-extern int __pthread_attr_init_2_1 (pthread_attr_t *__attr);
-extern int __pthread_attr_init_2_0 (pthread_attr_t *__attr);
-extern int __pthread_create_2_1 (pthread_t *__restrict __thread1,
- const pthread_attr_t *__attr,
- void *(*__start_routine) (void *),
- void *__restrict __arg);
-extern int __pthread_create_2_0 (pthread_t *__restrict __thread1,
- const pthread_attr_t *__attr,
- void *(*__start_routine) (void *),
- void *__restrict arg);
-
-/* The functions called the signal events. */
-extern void __linuxthreads_create_event (void);
-extern void __linuxthreads_death_event (void);
-extern void __linuxthreads_reap_event (void);
-
-/* This function is called to initialize the pthread library. */
-extern void __pthread_initialize (void);
-
-#endif /* internals.h */
diff --git a/newlib/libc/sys/linux/linuxthreads/join.c b/newlib/libc/sys/linux/linuxthreads/join.c
deleted file mode 100644
index a6ed08c97..000000000
--- a/newlib/libc/sys/linux/linuxthreads/join.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-/* Thread termination and joining */
-
-#include <errno.h>
-#include <sched.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include "pthread.h"
-#include "internals.h"
-#include "spinlock.h"
-#include "restart.h"
-
-void pthread_exit(void * retval)
-{
- __pthread_do_exit (retval, CURRENT_STACK_FRAME);
-}
-
-void __pthread_do_exit(void *retval, char *currentframe)
-{
- pthread_descr self = thread_self();
- pthread_descr joining;
- struct pthread_request request;
-
- /* Reset the cancellation flag to avoid looping if the cleanup handlers
- contain cancellation points */
- THREAD_SETMEM(self, p_canceled, 0);
- /* Call cleanup functions and destroy the thread-specific data */
- __pthread_perform_cleanup(currentframe);
- __pthread_destroy_specifics();
- /* Store return value */
- __pthread_lock(THREAD_GETMEM(self, p_lock), self);
- THREAD_SETMEM(self, p_retval, retval);
- /* See whether we have to signal the death. */
- if (THREAD_GETMEM(self, p_report_events))
- {
- /* See whether TD_DEATH is in any of the mask. */
- int idx = __td_eventword (TD_DEATH);
- uint32_t mask = __td_eventmask (TD_DEATH);
-
- if ((mask & (__pthread_threads_events.event_bits[idx]
- | THREAD_GETMEM_NC(self,
- p_eventbuf.eventmask.event_bits[idx])))
- != 0)
- {
- /* Yep, we have to signal the death. */
- THREAD_SETMEM(self, p_eventbuf.eventnum, TD_DEATH);
- THREAD_SETMEM(self, p_eventbuf.eventdata, self);
- __pthread_last_event = self;
-
- /* Now call the function to signal the event. */
- __linuxthreads_death_event();
- }
- }
- /* Say that we've terminated */
- THREAD_SETMEM(self, p_terminated, 1);
- /* See if someone is joining on us */
- joining = THREAD_GETMEM(self, p_joining);
- __pthread_unlock(THREAD_GETMEM(self, p_lock));
- /* Restart joining thread if any */
- if (joining != NULL) restart(joining);
- /* If this is the initial thread, block until all threads have terminated.
- If another thread calls exit, we'll be terminated from our signal
- handler. */
- if (self == __pthread_main_thread && __pthread_manager_request >= 0) {
- request.req_thread = self;
- request.req_kind = REQ_MAIN_THREAD_EXIT;
- TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
- (char *)&request, sizeof(request)));
- suspend(self);
- /* Main thread flushes stdio streams and runs atexit functions.
- It also calls a handler within LinuxThreads which sends a process exit
- request to the thread manager. */
- exit(0);
- }
- /* Threads other than the main one terminate without flushing stdio streams
- or running atexit functions. */
- _exit(0);
-}
-
-/* Function called by pthread_cancel to remove the thread from
- waiting on a condition variable queue. */
-
-static int join_extricate_func(void *obj, pthread_descr th)
-{
- volatile pthread_descr self = thread_self();
- pthread_handle handle = obj;
- pthread_descr jo;
- int did_remove = 0;
-
- __pthread_lock(&handle->h_lock, self);
- jo = handle->h_descr;
- did_remove = jo->p_joining != NULL;
- jo->p_joining = NULL;
- __pthread_unlock(&handle->h_lock);
-
- return did_remove;
-}
-
-int pthread_join(pthread_t thread_id, void ** thread_return)
-{
- volatile pthread_descr self = thread_self();
- struct pthread_request request;
- pthread_handle handle = thread_handle(thread_id);
- pthread_descr th;
- pthread_extricate_if extr;
- int already_canceled = 0;
-
- /* Set up extrication interface */
- extr.pu_object = handle;
- extr.pu_extricate_func = join_extricate_func;
-
- __pthread_lock(&handle->h_lock, self);
- if (nonexisting_handle(handle, thread_id)) {
- __pthread_unlock(&handle->h_lock);
- return ESRCH;
- }
- th = handle->h_descr;
- if (th == self) {
- __pthread_unlock(&handle->h_lock);
- return EDEADLK;
- }
- /* If detached or already joined, error */
- if (th->p_detached || th->p_joining != NULL) {
- __pthread_unlock(&handle->h_lock);
- return EINVAL;
- }
- /* If not terminated yet, suspend ourselves. */
- if (! th->p_terminated) {
- /* Register extrication interface */
- __pthread_set_own_extricate_if(self, &extr);
- if (!(THREAD_GETMEM(self, p_canceled)
- && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE))
- th->p_joining = self;
- else
- already_canceled = 1;
- __pthread_unlock(&handle->h_lock);
-
- if (already_canceled) {
- __pthread_set_own_extricate_if(self, 0);
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
- }
-
- suspend(self);
- /* Deregister extrication interface */
- __pthread_set_own_extricate_if(self, 0);
-
- /* This is a cancellation point */
- if (THREAD_GETMEM(self, p_woken_by_cancel)
- && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE) {
- THREAD_SETMEM(self, p_woken_by_cancel, 0);
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
- }
- __pthread_lock(&handle->h_lock, self);
- }
- /* Get return value */
- if (thread_return != NULL) *thread_return = th->p_retval;
- __pthread_unlock(&handle->h_lock);
- /* Send notification to thread manager */
- if (__pthread_manager_request >= 0) {
- request.req_thread = self;
- request.req_kind = REQ_FREE;
- request.req_args.free.thread_id = thread_id;
- TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
- (char *) &request, sizeof(request)));
- }
- return 0;
-}
-
-int pthread_detach(pthread_t thread_id)
-{
- int terminated;
- struct pthread_request request;
- pthread_handle handle = thread_handle(thread_id);
- pthread_descr th;
-
- __pthread_lock(&handle->h_lock, NULL);
- if (nonexisting_handle(handle, thread_id)) {
- __pthread_unlock(&handle->h_lock);
- return ESRCH;
- }
- th = handle->h_descr;
- /* If already detached, error */
- if (th->p_detached) {
- __pthread_unlock(&handle->h_lock);
- return EINVAL;
- }
- /* If already joining, don't do anything. */
- if (th->p_joining != NULL) {
- __pthread_unlock(&handle->h_lock);
- return 0;
- }
- /* Mark as detached */
- th->p_detached = 1;
- terminated = th->p_terminated;
- __pthread_unlock(&handle->h_lock);
- /* If already terminated, notify thread manager to reclaim resources */
- if (terminated && __pthread_manager_request >= 0) {
- request.req_thread = thread_self();
- request.req_kind = REQ_FREE;
- request.req_args.free.thread_id = thread_id;
- TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
- (char *) &request, sizeof(request)));
- }
- return 0;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/joinrace.c b/newlib/libc/sys/linux/linuxthreads/joinrace.c
deleted file mode 100644
index 8e1064c98..000000000
--- a/newlib/libc/sys/linux/linuxthreads/joinrace.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Test case by Permaine Cheung <pcheung@cygnus.com>. */
-
-#include <errno.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-static void *
-sub1 (void *arg)
-{
- /* Nothing. */
- return NULL;
-}
-
-int
-main (void)
-{
- int istatus;
- int policy;
- int cnt;
- pthread_t thread1;
- struct sched_param spresult1, sp1;
-
- for (cnt = 0; cnt < 100; ++cnt)
- {
- printf ("Round %d\n", cnt);
-
- pthread_create (&thread1, NULL, &sub1, NULL);
- pthread_join (thread1, NULL);
-
- istatus = pthread_getschedparam (thread1, &policy, &spresult1);
- if (istatus != ESRCH)
- {
- printf ("pthread_getschedparam returns: %d\n", istatus);
- return 1;
- }
-
- sp1.sched_priority = 0;
- istatus = pthread_setschedparam (thread1, SCHED_OTHER, &sp1);
- if (istatus != ESRCH)
- {
- printf ("pthread_setschedparam returns: %d\n", istatus);
- return 2;
- }
- }
-
- return 0;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/kernel-features.h b/newlib/libc/sys/linux/linuxthreads/kernel-features.h
deleted file mode 100644
index 562a6c765..000000000
--- a/newlib/libc/sys/linux/linuxthreads/kernel-features.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/* Set flags signalling availability of kernel features based on given
- kernel version number.
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* This file must not contain any C code. At least it must be protected
- to allow using the file also in assembler files. */
-
-#ifndef __LINUX_KERNEL_VERSION
-/* We assume the worst; all kernels should be supported. */
-# define __LINUX_KERNEL_VERSION 0
-#endif
-
-/* We assume for __LINUX_KERNEL_VERSION the same encoding used in
- linux/version.h. I.e., the major, minor, and subminor all get a
- byte with the major number being in the highest byte. This means
- we can do numeric comparisons.
-
- In the following we will define certain symbols depending on
- whether the describes kernel feature is available in the kernel
- version given by __LINUX_KERNEL_VERSION. We are not always exactly
- recording the correct versions in which the features were
- introduced. If somebody cares these values can afterwards be
- corrected. Most of the numbers here are set corresponding to
- 2.2.0. */
-
-/* `getcwd' system call. */
-#if __LINUX_KERNEL_VERSION >= 131584
-# define __ASSUME_GETCWD_SYSCALL 1
-#endif
-
-/* Real-time signal became usable in 2.1.70. */
-#if __LINUX_KERNEL_VERSION >= 131398
-# define __ASSUME_REALTIME_SIGNALS 1
-#endif
-
-/* When were the `pread'/`pwrite' syscalls introduced? */
-#if __LINUX_KERNEL_VERSION >= 131584
-# define __ASSUME_PREAD_SYSCALL 1
-# define __ASSUME_PWRITE_SYSCALL 1
-#endif
-
-/* When was `poll' introduced? */
-#if __LINUX_KERNEL_VERSION >= 131584
-# define __ASSUME_POLL_SYSCALL 1
-#endif
-
-/* The `lchown' syscall was introduced in 2.1.80. */
-#if __LINUX_KERNEL_VERSION >= 131408
-# define __ASSUME_LCHOWN_SYSCALL 1
-#endif
-
-/* When did the `setresuid' sysall became available? */
-#if __LINUX_KERNEL_VERSION >= 131584 && !defined __sparc__
-# define __ASSUME_SETRESUID_SYSCALL 1
-#endif
-
-/* The SIOCGIFNAME ioctl is available starting with 2.1.50. */
-#if __LINUX_KERNEL_VERSION >= 131408
-# define __ASSUME_SIOCGIFNAME 1
-#endif
-
-/* On x86 another `getrlimit' syscall was added in 2.3.25. */
-#if __LINUX_KERNEL_VERSION >= 131865 && defined __i386__
-# define __ASSUME_NEW_GETRLIMIT_SYSCALL 1
-#endif
-
-/* On x86 the truncate64/ftruncate64 syscalls were introduced in 2.3.31. */
-#if __LINUX_KERNEL_VERSION >= 131871 && defined __i386__
-# define __ASSUME_TRUNCATE64_SYSCALL 1
-#endif
-
-/* On x86 the mmap2 syscall was introduced in 2.3.31. */
-#if __LINUX_KERNEL_VERSION >= 131871 && defined __i386__
-# define __ASSUME_MMAP2_SYSCALL 1
-#endif
-
-/* On x86 the stat64/lstat64/fstat64 syscalls were introduced in 2.3.34. */
-#if __LINUX_KERNEL_VERSION >= 131874 && defined __i386__
-# define __ASSUME_STAT64_SYSCALL 1
-#endif
-
-/* On sparc and ARM the truncate64/ftruncate64/mmap2/stat64/lstat64/fstat64
- syscalls were introduced in 2.3.35. */
-#if __LINUX_KERNEL_VERSION >= 131875 && (defined __sparc__ || defined __arm__)
-# define __ASSUME_TRUNCATE64_SYSCALL 1
-# define __ASSUME_MMAP2_SYSCALL 1
-# define __ASSUME_STAT64_SYSCALL 1
-#endif
-
-/* I know for sure that these are in 2.3.35 on powerpc. */
-#if __LINUX_KERNEL_VERSION >= 131875 && defined __powerpc__
-# define __ASSUME_TRUNCATE64_SYSCALL 1
-# define __ASSUME_STAT64_SYSCALL 1
-# define __ASSUME_NEW_GETRLIMIT_SYSCALL 1
-#endif
-
-/* Linux 2.3.39 introduced 32bit UID/GIDs and IPC64. Some platforms had 32
- bit type all along. */
-#if __LINUX_KERNEL_VERSION >= 131879 || defined __powerpc__ || defined __mips__
-# define __ASSUME_32BITUIDS 1
-# ifndef __powerpc__
-# define __ASSUME_IPC64 1
-# endif
-# ifdef __sparc__
-# define __ASSUME_SETRESUID_SYSCALL 1
-# endif
-#endif
-
-/* Linux 2.4.0 on PPC introduced a correct IPC64. */
-#if __LINUX_KERNEL_VERSION >= 132096 && defined __powerpc__
-# define __ASSUME_IPC64 1
-#endif
-
-/* We can use the LDTs for threading with Linux 2.3.99 and newer. */
-#if __LINUX_KERNEL_VERSION >= 131939
-# define __ASSUME_LDT_WORKS 1
-#endif
-
-/* The changed st_ino field appeared in 2.4.0-test6. But we cannot
- distinguish this version from other 2.4.0 releases. Therefore play
- save and assume it available is for 2.4.1 and up. */
-#if __LINUX_KERNEL_VERSION >= 132097
-# define __ASSUME_ST_INO_64_BIT 1
-#endif
-
-/* To support locking of large files a new fcntl() syscall was introduced
- in 2.4.0-test7. We test for 2.4.1 for the earliest version we know
- the syscall is available. */
-#if __LINUX_KERNEL_VERSION >= 132097 && (defined __i386__ || defined __sparc__)
-# define __ASSUME_FCNTL64 1
-#endif
-
-/* Arm got fcntl64 in 2.4.4, PowerPC and SH have it also in 2.4.4 (I
- don't know when it got introduced). */
-#if __LINUX_KERNEL_VERSION >= 132100 \
- && (defined __arm__ || defined __powerpc__ || defined __sh__)
-# define __ASSUME_FCNTL64 1
-#endif
-
-/* The getdents64 syscall was introduced in 2.4.0-test7. We test for
- 2.4.1 for the earliest version we know the syscall is available. */
-#if __LINUX_KERNEL_VERSION >= 132097
-# define __ASSUME_GETDENTS64_SYSCALL 1
-#endif
-
-/* When did O_DIRECTORY became available? Early in 2.3 but when?
- Be safe, use 2.3.99. */
-#if __LINUX_KERNEL_VERSION >= 131939
-# define __ASSUME_O_DIRECTORY 1
-#endif
-
-/* Starting with one of the 2.4.0 pre-releases the Linux kernel passes
- up the page size information. */
-#if __LINUX_KERNEL_VERSION >= 132097
-# define __ASSUME_AT_PAGESIZE 1
-#endif
-
-/* Starting with 2.4.5 kernels PPC passes the AUXV in the standard way
- and the mmap2 syscall made it into the official kernel. */
-#if __LINUX_KERNEL_VERSION >= (132096+5) && defined __powerpc__
-# define __ASSUME_STD_AUXV 1
-# define __ASSUME_MMAP2_SYSCALL 1
-#endif
-
-/* There are an infinite number of PA-RISC kernel versions numbered
- 2.4.0. But they've not really been released as such. We require
- and expect the final version here. */
-#ifdef __hppa__
-# define __ASSUME_32BITUIDS 1
-# define __ASSUME_TRUNCATE64_SYSCALL 1
-# define __ASSUME_MMAP2_SYSCALL 1
-# define __ASSUME_STAT64_SYSCALL 1
-# define __ASSUME_IPC64 1
-# define __ASSUME_ST_INO_64_BIT 1
-# define __ASSUME_FCNTL64 1
-# define __ASSUME_GETDENTS64_SYSCALL 1
-#endif
diff --git a/newlib/libc/sys/linux/linuxthreads/libc-internal.h b/newlib/libc/sys/linux/linuxthreads/libc-internal.h
deleted file mode 100644
index 8369ffec2..000000000
--- a/newlib/libc/sys/linux/linuxthreads/libc-internal.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* This file contains a number of internal prototype declarations that
- don't fit anywhere else. */
-
-#ifndef _LIBC_INTERNAL
-# define _LIBC_INTERNAL 1
-
-#include <hp-timing.h>
-
-/* Initialize the `__libc_enable_secure' flag. */
-extern void __libc_init_secure (void);
-
-/* This function will be called from _init in init-first.c. */
-extern void __libc_global_ctors (void);
-
-/* Discover the tick frequency of the machine if something goes wrong,
- we return 0, an impossible hertz. */
-extern int __profile_frequency (void);
-
-/* Hooks for the instrumenting functions. */
-extern void __cyg_profile_func_enter (void *this_fn, void *call_site);
-extern void __cyg_profile_func_exit (void *this_fn, void *call_site);
-
-/* Get frequency of the system processor. */
-extern hp_timing_t __get_clockfreq (void);
-
-/* Free all allocated resources. */
-extern void __libc_freeres (void);
-
-#endif /* _LIBC_INTERNAL */
diff --git a/newlib/libc/sys/linux/linuxthreads/libc-symbols.h b/newlib/libc/sys/linux/linuxthreads/libc-symbols.h
deleted file mode 100644
index 97b672643..000000000
--- a/newlib/libc/sys/linux/linuxthreads/libc-symbols.h
+++ /dev/null
@@ -1,352 +0,0 @@
-/* Support macros for making weak and strong aliases for symbols,
- and for using symbol sets and linker warnings with GNU ld.
- Copyright (C) 1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _LIBC_SYMBOLS_H
-#define _LIBC_SYMBOLS_H 1
-
-/* This file's macros are included implicitly in the compilation of every
- file in the C library by -imacros.
-
- We include config.h which is generated by configure.
- It should define for us the following symbols:
-
- * HAVE_ASM_SET_DIRECTIVE if we have `.set B, A' instead of `A = B'.
- * ASM_GLOBAL_DIRECTIVE with `.globl' or `.global'.
- * HAVE_GNU_LD if using GNU ld, with support for weak symbols in a.out,
- and for symbol set and warning messages extensions in a.out and ELF.
- * HAVE_ELF if using ELF, which supports weak symbols using `.weak'.
- * HAVE_ASM_WEAK_DIRECTIVE if we have weak symbols using `.weak'.
- * HAVE_ASM_WEAKEXT_DIRECTIVE if we have weak symbols using `.weakext'.
-
- */
-
-/* This is defined for the compilation of all C library code. features.h
- tests this to avoid inclusion of stubs.h while compiling the library,
- before stubs.h has been generated. Some library code that is shared
- with other packages also tests this symbol to see if it is being
- compiled as part of the C library. We must define this before including
- config.h, because it makes some definitions conditional on whether libc
- itself is being compiled, or just some generator program. */
-#define _LIBC 1
-
-/* Enable declarations of GNU extensions, since we are compiling them. */
-#define _GNU_SOURCE 1
-/* And we also need the data for the reentrant functions. */
-#define _REENTRANT 1
-
-#include <config.h>
-
-/* The symbols in all the user (non-_) macros are C symbols.
- HAVE_GNU_LD without HAVE_ELF implies a.out. */
-
-#if defined HAVE_ASM_WEAK_DIRECTIVE || defined HAVE_ASM_WEAKEXT_DIRECTIVE
-# define HAVE_WEAK_SYMBOLS
-#endif
-
-#ifndef __SYMBOL_PREFIX
-# ifdef NO_UNDERSCORES
-# define __SYMBOL_PREFIX
-# else
-# define __SYMBOL_PREFIX "_"
-# endif
-#endif
-
-#ifndef C_SYMBOL_NAME
-# ifdef NO_UNDERSCORES
-# define C_SYMBOL_NAME(name) name
-# else
-# define C_SYMBOL_NAME(name) _##name
-# endif
-#endif
-
-#ifndef ASM_LINE_SEP
-# define ASM_LINE_SEP ;
-#endif
-
-#ifndef C_SYMBOL_DOT_NAME
-# define C_SYMBOL_DOT_NAME(name) .##name
-#endif
-
-#ifndef __ASSEMBLER__
-/* GCC understands weak symbols and aliases; use its interface where
- possible, instead of embedded assembly language. */
-
-/* Define ALIASNAME as a strong alias for NAME. */
-# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
-# define _strong_alias(name, aliasname) \
- extern __typeof (name) aliasname __attribute__ ((alias (#name)));
-
-/* This comes between the return type and function name in
- a function definition to make that definition weak. */
-# define weak_function __attribute__ ((weak))
-# define weak_const_function __attribute__ ((weak, __const__))
-
-# ifdef HAVE_WEAK_SYMBOLS
-
-/* Define ALIASNAME as a weak alias for NAME.
- If weak aliases are not available, this defines a strong alias. */
-# define weak_alias(name, aliasname) _weak_alias (name, aliasname)
-# define _weak_alias(name, aliasname) \
- extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
-
-/* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
-# define weak_extern(symbol) _weak_extern (symbol)
-# ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
-# define _weak_extern(symbol) asm (".weakext " __SYMBOL_PREFIX #symbol);
-# else
-# define _weak_extern(symbol) asm (".weak " __SYMBOL_PREFIX #symbol);
-# endif
-
-# else
-
-# define weak_alias(name, aliasname) strong_alias(name, aliasname)
-# define weak_extern(symbol) /* Nothing. */
-
-# endif
-
-#else /* __ASSEMBLER__ */
-
-# ifdef HAVE_ASM_SET_DIRECTIVE
-# define strong_alias(original, alias) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
- .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original)
-# else
-# ifdef HAVE_ASM_GLOBAL_DOT_NAME
-# define strong_alias(original, alias) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
- C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
- C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
-# else
-# define strong_alias(original, alias) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
- C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
-# endif
-# endif
-
-# ifdef HAVE_WEAK_SYMBOLS
-# ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
-# define weak_alias(original, alias) \
- .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
-# define weak_extern(symbol) \
- .weakext C_SYMBOL_NAME (symbol)
-
-# else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
-
-# ifdef HAVE_ASM_GLOBAL_DOT_NAME
-# define weak_alias(original, alias) \
- .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
- C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
- C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
-# else
-# define weak_alias(original, alias) \
- .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
- C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
-# endif
-
-# define weak_extern(symbol) \
- .weak C_SYMBOL_NAME (symbol)
-
-# endif /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
-
-# else /* ! HAVE_WEAK_SYMBOLS */
-
-# define weak_alias(original, alias) strong_alias(original, alias)
-# define weak_extern(symbol) /* Nothing */
-# endif /* ! HAVE_WEAK_SYMBOLS */
-
-#endif /* __ASSEMBLER__ */
-
-/* On some platforms we can make internal function calls (i.e., calls of
- functions not exported) a bit faster by using a different calling
- convention. */
-#ifndef internal_function
-# define internal_function /* empty */
-#endif
-
-/* Prepare for the case that `__builtin_expect' is not available. */
-#ifndef HAVE_BUILTIN_EXPECT
-# define __builtin_expect(expr, val) (expr)
-#endif
-
-/* Determine the return address. */
-#define RETURN_ADDRESS(nr) \
- __builtin_extract_return_addr (__builtin_return_address (nr))
-
-/* When a reference to SYMBOL is encountered, the linker will emit a
- warning message MSG. */
-#ifdef HAVE_GNU_LD
-# ifdef HAVE_ELF
-
-/* We want the .gnu.warning.SYMBOL section to be unallocated. */
-# ifdef HAVE_ASM_PREVIOUS_DIRECTIVE
-# define __make_section_unallocated(section_string) \
- asm (".section " section_string "\n\t.previous");
-# elif defined HAVE_ASM_POPSECTION_DIRECTIVE
-# define __make_section_unallocated(section_string) \
- asm (".pushsection " section_string "\n\t.popsection");
-# else
-# define __make_section_unallocated(section_string)
-# endif
-
-/* Tacking on "\n\t#" to the section name makes gcc put it's bogus
- section attributes on what looks like a comment to the assembler. */
-# ifdef HAVE_SECTION_QUOTES
-# define link_warning(symbol, msg) \
- __make_section_unallocated (".gnu.warning." #symbol) \
- static const char __evoke_link_warning_##symbol[] \
- __attribute__ ((section (".gnu.warning." #symbol "\"\n\t#\""))) = msg;
-# else
-# define link_warning(symbol, msg) \
- __make_section_unallocated (".gnu.warning." #symbol) \
- static const char __evoke_link_warning_##symbol[] \
- __attribute__ ((section (".gnu.warning." #symbol "\n\t#"))) = msg;
-# endif
-# else /* Not ELF: a.out */
-# ifdef HAVE_XCOFF
-/* XCOFF does not support .stabs.
- The native aix linker will remove the .stab and .stabstr sections
- The gnu linker will have a fatal error if there is a relocation for
- symbol in the .stab section. Silently disable this macro. */
-# define link_warning(symbol, msg)
-# else
-# define link_warning(symbol, msg) \
- asm (".stabs \"" msg "\",30,0,0,0\n\t" \
- ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
-# endif /* XCOFF */
-# endif
-#else
-/* We will never be heard; they will all die horribly. */
-# define link_warning(symbol, msg)
-#endif
-
-/* A canned warning for sysdeps/stub functions. */
-#define stub_warning(name) \
- link_warning (name, \
- "warning: " #name " is not implemented and will always fail")
-
-/*
-
-*/
-
-#ifdef HAVE_GNU_LD
-
-/* Symbol set support macros. */
-
-# ifdef HAVE_ELF
-
-/* Make SYMBOL, which is in the text segment, an element of SET. */
-# define text_set_element(set, symbol) _elf_set_element(set, symbol)
-/* Make SYMBOL, which is in the data segment, an element of SET. */
-# define data_set_element(set, symbol) _elf_set_element(set, symbol)
-/* Make SYMBOL, which is in the bss segment, an element of SET. */
-# define bss_set_element(set, symbol) _elf_set_element(set, symbol)
-
-/* These are all done the same way in ELF.
- There is a new section created for each set. */
-# ifdef SHARED
-/* When building a shared library, make the set section writable,
- because it will need to be relocated at run time anyway. */
-# define _elf_set_element(set, symbol) \
- static const void *__elf_set_##set##_element_##symbol##__ \
- __attribute__ ((unused, section (#set))) = &(symbol)
-# else
-# define _elf_set_element(set, symbol) \
- static const void *const __elf_set_##set##_element_##symbol##__ \
- __attribute__ ((unused, section (#set))) = &(symbol)
-# endif
-
-/* Define SET as a symbol set. This may be required (it is in a.out) to
- be able to use the set's contents. */
-# define symbol_set_define(set) symbol_set_declare(set)
-
-/* Declare SET for use in this module, if defined in another module. */
-# define symbol_set_declare(set) \
- extern void *const __start_##set __attribute__ ((__weak__)); \
- extern void *const __stop_##set __attribute__ ((__weak__)); \
- weak_extern (__start_##set) weak_extern (__stop_##set)
-
-/* Return a pointer (void *const *) to the first element of SET. */
-# define symbol_set_first_element(set) (&__start_##set)
-
-/* Return true iff PTR (a void *const *) has been incremented
- past the last element in SET. */
-# define symbol_set_end_p(set, ptr) ((ptr) >= &__stop_##set)
-
-# else /* Not ELF: a.out. */
-
-# ifdef HAVE_XCOFF
-/* XCOFF does not support .stabs.
- The native aix linker will remove the .stab and .stabstr sections
- The gnu linker will have a fatal error if there is a relocation for
- symbol in the .stab section. Silently disable these macros. */
-# define text_set_element(set, symbol)
-# define data_set_element(set, symbol)
-# define bss_set_element(set, symbol)
-# else
-# define text_set_element(set, symbol) \
- asm (".stabs \"" __SYMBOL_PREFIX #set "\",23,0,0," __SYMBOL_PREFIX #symbol)
-# define data_set_element(set, symbol) \
- asm (".stabs \"" __SYMBOL_PREFIX #set "\",25,0,0," __SYMBOL_PREFIX #symbol)
-# define bss_set_element(set, symbol) ?error Must use initialized data.
-# endif /* XCOFF */
-# define symbol_set_define(set) void *const (set)[1];
-# define symbol_set_declare(set) extern void *const (set)[1];
-
-# define symbol_set_first_element(set) &(set)[1]
-# define symbol_set_end_p(set, ptr) (*(ptr) == 0)
-
-# endif /* ELF. */
-#else
-/* We cannot do anything in generial. */
-# define text_set_element(set, symbol) asm ("")
-# define data_set_element(set, symbol) asm ("")
-# define bss_set_element(set, symbol) asm ("")
-# define symbol_set_define(set) void *const (set)[1];
-# define symbol_set_declare(set) extern void *const (set)[1];
-
-# define symbol_set_first_element(set) &(set)[1]
-# define symbol_set_end_p(set, ptr) (*(ptr) == 0)
-#endif /* Have GNU ld. */
-
-#if DO_VERSIONING
-# define symbol_version(real, name, version) \
- _symbol_version(real, name, version)
-# define default_symbol_version(real, name, version) \
- _default_symbol_version(real, name, version)
-# ifdef __ASSEMBLER__
-# define _symbol_version(real, name, version) \
- .symver real, name##@##version
-# define _default_symbol_version(real, name, version) \
- .symver real, name##@##@##version
-# else
-# define _symbol_version(real, name, version) \
- __asm__ (".symver " #real "," #name "@" #version)
-# define _default_symbol_version(real, name, version) \
- __asm__ (".symver " #real "," #name "@@" #version)
-# endif
-#else
-# define symbol_version(real, name, version)
-# define default_symbol_version(real, name, version) \
- strong_alias(real, name)
-#endif
-
-#endif /* libc-symbols.h */
diff --git a/newlib/libc/sys/linux/linuxthreads/linuxthreads.texi b/newlib/libc/sys/linux/linuxthreads/linuxthreads.texi
deleted file mode 100644
index 9513a67a6..000000000
--- a/newlib/libc/sys/linux/linuxthreads/linuxthreads.texi
+++ /dev/null
@@ -1,1630 +0,0 @@
-@node POSIX Threads
-@c @node POSIX Threads, , Top, Top
-@chapter POSIX Threads
-@c %MENU% The standard threads library
-
-@c This chapter needs more work bigtime. -zw
-
-This chapter describes the pthreads (POSIX threads) library. This
-library provides support functions for multithreaded programs: thread
-primitives, synchronization objects, and so forth. It also implements
-POSIX 1003.1b semaphores (not to be confused with System V semaphores).
-
-The threads operations (@samp{pthread_*}) do not use @var{errno}.
-Instead they return an error code directly. The semaphore operations do
-use @var{errno}.
-
-@menu
-* Basic Thread Operations:: Creating, terminating, and waiting for threads.
-* Thread Attributes:: Tuning thread scheduling.
-* Cancellation:: Stopping a thread before it's done.
-* Cleanup Handlers:: Deallocating resources when a thread is
- canceled.
-* Mutexes:: One way to synchronize threads.
-* Condition Variables:: Another way.
-* POSIX Semaphores:: And a third way.
-* Thread-Specific Data:: Variables with different values in
- different threads.
-* Threads and Signal Handling:: Why you should avoid mixing the two, and
- how to do it if you must.
-* Threads and Fork:: Interactions between threads and the
- @code{fork} function.
-* Streams and Fork:: Interactions between stdio streams and
- @code{fork}.
-* Miscellaneous Thread Functions:: A grab bag of utility routines.
-@end menu
-
-@node Basic Thread Operations
-@section Basic Thread Operations
-
-These functions are the thread equivalents of @code{fork}, @code{exit},
-and @code{wait}.
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_create (pthread_t * @var{thread}, pthread_attr_t * @var{attr}, void * (*@var{start_routine})(void *), void * @var{arg})
-@code{pthread_create} creates a new thread of control that executes
-concurrently with the calling thread. The new thread calls the
-function @var{start_routine}, passing it @var{arg} as first argument. The
-new thread terminates either explicitly, by calling @code{pthread_exit},
-or implicitly, by returning from the @var{start_routine} function. The
-latter case is equivalent to calling @code{pthread_exit} with the result
-returned by @var{start_routine} as exit code.
-
-The @var{attr} argument specifies thread attributes to be applied to the
-new thread. @xref{Thread Attributes}, for details. The @var{attr}
-argument can also be @code{NULL}, in which case default attributes are
-used: the created thread is joinable (not detached) and has an ordinary
-(not realtime) scheduling policy.
-
-On success, the identifier of the newly created thread is stored in the
-location pointed by the @var{thread} argument, and a 0 is returned. On
-error, a non-zero error code is returned.
-
-This function may return the following errors:
-@table @code
-@item EAGAIN
-Not enough system resources to create a process for the new thread,
-or more than @code{PTHREAD_THREADS_MAX} threads are already active.
-@end table
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun void pthread_exit (void *@var{retval})
-@code{pthread_exit} terminates the execution of the calling thread. All
-cleanup handlers (@pxref{Cleanup Handlers}) that have been set for the
-calling thread with @code{pthread_cleanup_push} are executed in reverse
-order (the most recently pushed handler is executed first). Finalization
-functions for thread-specific data are then called for all keys that
-have non-@code{NULL} values associated with them in the calling thread
-(@pxref{Thread-Specific Data}). Finally, execution of the calling
-thread is stopped.
-
-The @var{retval} argument is the return value of the thread. It can be
-retrieved from another thread using @code{pthread_join}.
-
-The @code{pthread_exit} function never returns.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_cancel (pthread_t @var{thread})
-
-@code{pthread_cancel} sends a cancellation request to the thread denoted
-by the @var{thread} argument. If there is no such thread,
-@code{pthread_cancel} fails and returns @code{ESRCH}. Otherwise it
-returns 0. @xref{Cancellation}, for details.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_join (pthread_t @var{th}, void **thread_@var{return})
-@code{pthread_join} suspends the execution of the calling thread until
-the thread identified by @var{th} terminates, either by calling
-@code{pthread_exit} or by being canceled.
-
-If @var{thread_return} is not @code{NULL}, the return value of @var{th}
-is stored in the location pointed to by @var{thread_return}. The return
-value of @var{th} is either the argument it gave to @code{pthread_exit},
-or @code{PTHREAD_CANCELED} if @var{th} was canceled.
-
-The joined thread @code{th} must be in the joinable state: it must not
-have been detached using @code{pthread_detach} or the
-@code{PTHREAD_CREATE_DETACHED} attribute to @code{pthread_create}.
-
-When a joinable thread terminates, its memory resources (thread
-descriptor and stack) are not deallocated until another thread performs
-@code{pthread_join} on it. Therefore, @code{pthread_join} must be called
-once for each joinable thread created to avoid memory leaks.
-
-At most one thread can wait for the termination of a given
-thread. Calling @code{pthread_join} on a thread @var{th} on which
-another thread is already waiting for termination returns an error.
-
-@code{pthread_join} is a cancellation point. If a thread is canceled
-while suspended in @code{pthread_join}, the thread execution resumes
-immediately and the cancellation is executed without waiting for the
-@var{th} thread to terminate. If cancellation occurs during
-@code{pthread_join}, the @var{th} thread remains not joined.
-
-On success, the return value of @var{th} is stored in the location
-pointed to by @var{thread_return}, and 0 is returned. On error, one of
-the following values is returned:
-@table @code
-@item ESRCH
-No thread could be found corresponding to that specified by @var{th}.
-@item EINVAL
-The @var{th} thread has been detached, or another thread is already
-waiting on termination of @var{th}.
-@item EDEADLK
-The @var{th} argument refers to the calling thread.
-@end table
-@end deftypefun
-
-@node Thread Attributes
-@section Thread Attributes
-
-@comment pthread.h
-@comment POSIX
-
-Threads have a number of attributes that may be set at creation time.
-This is done by filling a thread attribute object @var{attr} of type
-@code{pthread_attr_t}, then passing it as second argument to
-@code{pthread_create}. Passing @code{NULL} is equivalent to passing a
-thread attribute object with all attributes set to their default values.
-
-Attribute objects are consulted only when creating a new thread. The
-same attribute object can be used for creating several threads.
-Modifying an attribute object after a call to @code{pthread_create} does
-not change the attributes of the thread previously created.
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_attr_init (pthread_attr_t *@var{attr})
-@code{pthread_attr_init} initializes the thread attribute object
-@var{attr} and fills it with default values for the attributes. (The
-default values are listed below for each attribute.)
-
-Each attribute @var{attrname} (see below for a list of all attributes)
-can be individually set using the function
-@code{pthread_attr_set@var{attrname}} and retrieved using the function
-@code{pthread_attr_get@var{attrname}}.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_attr_destroy (pthread_attr_t *@var{attr})
-@code{pthread_attr_destroy} destroys the attribute object pointed to by
-@var{attr} releasing any resources associated with it. @var{attr} is
-left in an undefined state, and you must not use it again in a call to
-any pthreads function until it has been reinitialized.
-@end deftypefun
-
-@findex pthread_attr_setdetachstate
-@findex pthread_attr_setguardsize
-@findex pthread_attr_setinheritsched
-@findex pthread_attr_setschedparam
-@findex pthread_attr_setschedpolicy
-@findex pthread_attr_setscope
-@findex pthread_attr_setstack
-@findex pthread_attr_setstackaddr
-@findex pthread_attr_setstacksize
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_attr_setattr (pthread_attr_t *@var{obj}, int @var{value})
-Set attribute @var{attr} to @var{value} in the attribute object pointed
-to by @var{obj}. See below for a list of possible attributes and the
-values they can take.
-
-On success, these functions return 0. If @var{value} is not meaningful
-for the @var{attr} being modified, they will return the error code
-@code{EINVAL}. Some of the functions have other failure modes; see
-below.
-@end deftypefun
-
-@findex pthread_attr_getdetachstate
-@findex pthread_attr_getguardsize
-@findex pthread_attr_getinheritsched
-@findex pthread_attr_getschedparam
-@findex pthread_attr_getschedpolicy
-@findex pthread_attr_getscope
-@findex pthread_attr_getstack
-@findex pthread_attr_getstackaddr
-@findex pthread_attr_getstacksize
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_attr_getattr (const pthread_attr_t *@var{obj}, int *@var{value})
-Store the current setting of @var{attr} in @var{obj} into the variable
-pointed to by @var{value}.
-
-These functions always return 0.
-@end deftypefun
-
-The following thread attributes are supported:
-@table @samp
-@item detachstate
-Choose whether the thread is created in the joinable state (value
-@code{PTHREAD_CREATE_JOINABLE}) or in the detached state
-(@code{PTHREAD_CREATE_DETACHED}). The default is
-@code{PTHREAD_CREATE_JOINABLE}.
-
-In the joinable state, another thread can synchronize on the thread
-termination and recover its termination code using @code{pthread_join},
-but some of the thread resources are kept allocated after the thread
-terminates, and reclaimed only when another thread performs
-@code{pthread_join} on that thread.
-
-In the detached state, the thread resources are immediately freed when
-it terminates, but @code{pthread_join} cannot be used to synchronize on
-the thread termination.
-
-A thread created in the joinable state can later be put in the detached
-thread using @code{pthread_detach}.
-
-@item schedpolicy
-Select the scheduling policy for the thread: one of @code{SCHED_OTHER}
-(regular, non-realtime scheduling), @code{SCHED_RR} (realtime,
-round-robin) or @code{SCHED_FIFO} (realtime, first-in first-out).
-The default is @code{SCHED_OTHER}.
-@c Not doc'd in our manual: FIXME.
-@c See @code{sched_setpolicy} for more information on scheduling policies.
-
-The realtime scheduling policies @code{SCHED_RR} and @code{SCHED_FIFO}
-are available only to processes with superuser privileges.
-@code{pthread_attr_setschedparam} will fail and return @code{ENOTSUP} if
-you try to set a realtime policy when you are unprivileged.
-
-The scheduling policy of a thread can be changed after creation with
-@code{pthread_setschedparam}.
-
-@item schedparam
-Change the scheduling parameter (the scheduling priority)
-for the thread. The default is 0.
-
-This attribute is not significant if the scheduling policy is
-@code{SCHED_OTHER}; it only matters for the realtime policies
-@code{SCHED_RR} and @code{SCHED_FIFO}.
-
-The scheduling priority of a thread can be changed after creation with
-@code{pthread_setschedparam}.
-
-@item inheritsched
-Choose whether the scheduling policy and scheduling parameter for the
-newly created thread are determined by the values of the
-@var{schedpolicy} and @var{schedparam} attributes (value
-@code{PTHREAD_EXPLICIT_SCHED}) or are inherited from the parent thread
-(value @code{PTHREAD_INHERIT_SCHED}). The default is
-@code{PTHREAD_EXPLICIT_SCHED}.
-
-@item scope
-Choose the scheduling contention scope for the created thread. The
-default is @code{PTHREAD_SCOPE_SYSTEM}, meaning that the threads contend
-for CPU time with all processes running on the machine. In particular,
-thread priorities are interpreted relative to the priorities of all
-other processes on the machine. The other possibility,
-@code{PTHREAD_SCOPE_PROCESS}, means that scheduling contention occurs
-only between the threads of the running process: thread priorities are
-interpreted relative to the priorities of the other threads of the
-process, regardless of the priorities of other processes.
-
-@code{PTHREAD_SCOPE_PROCESS} is not supported in LinuxThreads. If you
-try to set the scope to this value, @code{pthread_attr_setscope} will
-fail and return @code{ENOTSUP}.
-
-@item stackaddr
-Provide an address for an application managed stack. The size of the
-stack must be at least @code{PTHREAD_STACK_MIN}.
-
-@item stacksize
-Change the size of the stack created for the thread. The value defines
-the minimum stack size, in bytes.
-
-If the value exceeds the system's maximum stack size, or is smaller
-than @code{PTHREAD_STACK_MIN}, @code{pthread_attr_setstacksize} will
-fail and return @code{EINVAL}.
-
-@item stack
-Provide both the address and size of an application managed stack to
-use for the new thread. The base of the memory area is @var{stackaddr}
-with the size of the memory area, @var{stacksize}, measured in bytes.
-
-If the value of @var{stacksize} is less than @code{PTHREAD_STACK_MIN},
-or greater than the system's maximum stack size, or if the value of
-@var{stackaddr} lacks the proper alignment, @code{pthread_attr_setstack}
-will fail and return @code{EINVAL}.
-
-@item guardsize
-Change the minimum size in bytes of the guard area for the thread's
-stack. The default size is a single page. If this value is set, it
-will be rounded up to the nearest page size. If the value is set to 0,
-a guard area will not be created for this thread. The space allocated
-for the guard area is used to catch stack overflow. Therefore, when
-allocating large structures on the stack, a larger guard area may be
-required to catch a stack overflow.
-
-If the caller is managing their own stacks (if the @code{stackaddr}
-attribute has been set), then the @code{guardsize} attribute is ignored.
-
-If the value exceeds the @code{stacksize}, @code{pthread_atrr_setguardsize}
-will fail and return @code{EINVAL}.
-@end table
-
-@node Cancellation
-@section Cancellation
-
-Cancellation is the mechanism by which a thread can terminate the
-execution of another thread. More precisely, a thread can send a
-cancellation request to another thread. Depending on its settings, the
-target thread can then either ignore the request, honor it immediately,
-or defer it till it reaches a cancellation point. When threads are
-first created by @code{pthread_create}, they always defer cancellation
-requests.
-
-When a thread eventually honors a cancellation request, it behaves as if
-@code{pthread_exit(PTHREAD_CANCELED)} was called. All cleanup handlers
-are executed in reverse order, finalization functions for
-thread-specific data are called, and finally the thread stops executing.
-If the canceled thread was joinable, the return value
-@code{PTHREAD_CANCELED} is provided to whichever thread calls
-@var{pthread_join} on it. See @code{pthread_exit} for more information.
-
-Cancellation points are the points where the thread checks for pending
-cancellation requests and performs them. The POSIX threads functions
-@code{pthread_join}, @code{pthread_cond_wait},
-@code{pthread_cond_timedwait}, @code{pthread_testcancel},
-@code{sem_wait}, and @code{sigwait} are cancellation points. In
-addition, these system calls are cancellation points:
-
-@multitable @columnfractions .33 .33 .33
-@item @t{accept} @tab @t{open} @tab @t{sendmsg}
-@item @t{close} @tab @t{pause} @tab @t{sendto}
-@item @t{connect} @tab @t{read} @tab @t{system}
-@item @t{fcntl} @tab @t{recv} @tab @t{tcdrain}
-@item @t{fsync} @tab @t{recvfrom} @tab @t{wait}
-@item @t{lseek} @tab @t{recvmsg} @tab @t{waitpid}
-@item @t{msync} @tab @t{send} @tab @t{write}
-@item @t{nanosleep}
-@end multitable
-
-@noindent
-All library functions that call these functions (such as
-@code{printf}) are also cancellation points.
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_setcancelstate (int @var{state}, int *@var{oldstate})
-@code{pthread_setcancelstate} changes the cancellation state for the
-calling thread -- that is, whether cancellation requests are ignored or
-not. The @var{state} argument is the new cancellation state: either
-@code{PTHREAD_CANCEL_ENABLE} to enable cancellation, or
-@code{PTHREAD_CANCEL_DISABLE} to disable cancellation (cancellation
-requests are ignored).
-
-If @var{oldstate} is not @code{NULL}, the previous cancellation state is
-stored in the location pointed to by @var{oldstate}, and can thus be
-restored later by another call to @code{pthread_setcancelstate}.
-
-If the @var{state} argument is not @code{PTHREAD_CANCEL_ENABLE} or
-@code{PTHREAD_CANCEL_DISABLE}, @code{pthread_setcancelstate} fails and
-returns @code{EINVAL}. Otherwise it returns 0.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_setcanceltype (int @var{type}, int *@var{oldtype})
-@code{pthread_setcanceltype} changes the type of responses to
-cancellation requests for the calling thread: asynchronous (immediate)
-or deferred. The @var{type} argument is the new cancellation type:
-either @code{PTHREAD_CANCEL_ASYNCHRONOUS} to cancel the calling thread
-as soon as the cancellation request is received, or
-@code{PTHREAD_CANCEL_DEFERRED} to keep the cancellation request pending
-until the next cancellation point. If @var{oldtype} is not @code{NULL},
-the previous cancellation state is stored in the location pointed to by
-@var{oldtype}, and can thus be restored later by another call to
-@code{pthread_setcanceltype}.
-
-If the @var{type} argument is not @code{PTHREAD_CANCEL_DEFERRED} or
-@code{PTHREAD_CANCEL_ASYNCHRONOUS}, @code{pthread_setcanceltype} fails
-and returns @code{EINVAL}. Otherwise it returns 0.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun void pthread_testcancel (@var{void})
-@code{pthread_testcancel} does nothing except testing for pending
-cancellation and executing it. Its purpose is to introduce explicit
-checks for cancellation in long sequences of code that do not call
-cancellation point functions otherwise.
-@end deftypefun
-
-@node Cleanup Handlers
-@section Cleanup Handlers
-
-Cleanup handlers are functions that get called when a thread terminates,
-either by calling @code{pthread_exit} or because of
-cancellation. Cleanup handlers are installed and removed following a
-stack-like discipline.
-
-The purpose of cleanup handlers is to free the resources that a thread
-may hold at the time it terminates. In particular, if a thread exits or
-is canceled while it owns a locked mutex, the mutex will remain locked
-forever and prevent other threads from executing normally. The best way
-to avoid this is, just before locking the mutex, to install a cleanup
-handler whose effect is to unlock the mutex. Cleanup handlers can be
-used similarly to free blocks allocated with @code{malloc} or close file
-descriptors on thread termination.
-
-Here is how to lock a mutex @var{mut} in such a way that it will be
-unlocked if the thread is canceled while @var{mut} is locked:
-
-@smallexample
-pthread_cleanup_push(pthread_mutex_unlock, (void *) &mut);
-pthread_mutex_lock(&mut);
-/* do some work */
-pthread_mutex_unlock(&mut);
-pthread_cleanup_pop(0);
-@end smallexample
-
-Equivalently, the last two lines can be replaced by
-
-@smallexample
-pthread_cleanup_pop(1);
-@end smallexample
-
-Notice that the code above is safe only in deferred cancellation mode
-(see @code{pthread_setcanceltype}). In asynchronous cancellation mode, a
-cancellation can occur between @code{pthread_cleanup_push} and
-@code{pthread_mutex_lock}, or between @code{pthread_mutex_unlock} and
-@code{pthread_cleanup_pop}, resulting in both cases in the thread trying
-to unlock a mutex not locked by the current thread. This is the main
-reason why asynchronous cancellation is difficult to use.
-
-If the code above must also work in asynchronous cancellation mode,
-then it must switch to deferred mode for locking and unlocking the
-mutex:
-
-@smallexample
-pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);
-pthread_cleanup_push(pthread_mutex_unlock, (void *) &mut);
-pthread_mutex_lock(&mut);
-/* do some work */
-pthread_cleanup_pop(1);
-pthread_setcanceltype(oldtype, NULL);
-@end smallexample
-
-The code above can be rewritten in a more compact and efficient way,
-using the non-portable functions @code{pthread_cleanup_push_defer_np}
-and @code{pthread_cleanup_pop_restore_np}:
-
-@smallexample
-pthread_cleanup_push_defer_np(pthread_mutex_unlock, (void *) &mut);
-pthread_mutex_lock(&mut);
-/* do some work */
-pthread_cleanup_pop_restore_np(1);
-@end smallexample
-
-@comment pthread.h
-@comment POSIX
-@deftypefun void pthread_cleanup_push (void (*@var{routine}) (void *), void *@var{arg})
-
-@code{pthread_cleanup_push} installs the @var{routine} function with
-argument @var{arg} as a cleanup handler. From this point on to the
-matching @code{pthread_cleanup_pop}, the function @var{routine} will be
-called with arguments @var{arg} when the thread terminates, either
-through @code{pthread_exit} or by cancellation. If several cleanup
-handlers are active at that point, they are called in LIFO order: the
-most recently installed handler is called first.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun void pthread_cleanup_pop (int @var{execute})
-@code{pthread_cleanup_pop} removes the most recently installed cleanup
-handler. If the @var{execute} argument is not 0, it also executes the
-handler, by calling the @var{routine} function with arguments
-@var{arg}. If the @var{execute} argument is 0, the handler is only
-removed but not executed.
-@end deftypefun
-
-Matching pairs of @code{pthread_cleanup_push} and
-@code{pthread_cleanup_pop} must occur in the same function, at the same
-level of block nesting. Actually, @code{pthread_cleanup_push} and
-@code{pthread_cleanup_pop} are macros, and the expansion of
-@code{pthread_cleanup_push} introduces an open brace @code{@{} with the
-matching closing brace @code{@}} being introduced by the expansion of the
-matching @code{pthread_cleanup_pop}.
-
-@comment pthread.h
-@comment GNU
-@deftypefun void pthread_cleanup_push_defer_np (void (*@var{routine}) (void *), void *@var{arg})
-@code{pthread_cleanup_push_defer_np} is a non-portable extension that
-combines @code{pthread_cleanup_push} and @code{pthread_setcanceltype}.
-It pushes a cleanup handler just as @code{pthread_cleanup_push} does,
-but also saves the current cancellation type and sets it to deferred
-cancellation. This ensures that the cleanup mechanism is effective even
-if the thread was initially in asynchronous cancellation mode.
-@end deftypefun
-
-@comment pthread.h
-@comment GNU
-@deftypefun void pthread_cleanup_pop_restore_np (int @var{execute})
-@code{pthread_cleanup_pop_restore_np} pops a cleanup handler introduced
-by @code{pthread_cleanup_push_defer_np}, and restores the cancellation
-type to its value at the time @code{pthread_cleanup_push_defer_np} was
-called.
-@end deftypefun
-
-@code{pthread_cleanup_push_defer_np} and
-@code{pthread_cleanup_pop_restore_np} must occur in matching pairs, at
-the same level of block nesting.
-
-The sequence
-
-@smallexample
-pthread_cleanup_push_defer_np(routine, arg);
-...
-pthread_cleanup_pop_defer_np(execute);
-@end smallexample
-
-@noindent
-is functionally equivalent to (but more compact and efficient than)
-
-@smallexample
-@{
- int oldtype;
- pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);
- pthread_cleanup_push(routine, arg);
- ...
- pthread_cleanup_pop(execute);
- pthread_setcanceltype(oldtype, NULL);
-@}
-@end smallexample
-
-
-@node Mutexes
-@section Mutexes
-
-A mutex is a MUTual EXclusion device, and is useful for protecting
-shared data structures from concurrent modifications, and implementing
-critical sections and monitors.
-
-A mutex has two possible states: unlocked (not owned by any thread),
-and locked (owned by one thread). A mutex can never be owned by two
-different threads simultaneously. A thread attempting to lock a mutex
-that is already locked by another thread is suspended until the owning
-thread unlocks the mutex first.
-
-None of the mutex functions is a cancellation point, not even
-@code{pthread_mutex_lock}, in spite of the fact that it can suspend a
-thread for arbitrary durations. This way, the status of mutexes at
-cancellation points is predictable, allowing cancellation handlers to
-unlock precisely those mutexes that need to be unlocked before the
-thread stops executing. Consequently, threads using deferred
-cancellation should never hold a mutex for extended periods of time.
-
-It is not safe to call mutex functions from a signal handler. In
-particular, calling @code{pthread_mutex_lock} or
-@code{pthread_mutex_unlock} from a signal handler may deadlock the
-calling thread.
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_mutex_init (pthread_mutex_t *@var{mutex}, const pthread_mutexattr_t *@var{mutexattr})
-
-@code{pthread_mutex_init} initializes the mutex object pointed to by
-@var{mutex} according to the mutex attributes specified in @var{mutexattr}.
-If @var{mutexattr} is @code{NULL}, default attributes are used instead.
-
-The LinuxThreads implementation supports only one mutex attribute,
-the @var{mutex type}, which is either ``fast'', ``recursive'', or
-``error checking''. The type of a mutex determines whether
-it can be locked again by a thread that already owns it.
-The default type is ``fast''.
-
-Variables of type @code{pthread_mutex_t} can also be initialized
-statically, using the constants @code{PTHREAD_MUTEX_INITIALIZER} (for
-timed mutexes), @code{PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP} (for
-recursive mutexes), @code{PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP}
-(for fast mutexes(, and @code{PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP}
-(for error checking mutexes).
-
-@code{pthread_mutex_init} always returns 0.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_mutex_lock (pthread_mutex_t *mutex))
-@code{pthread_mutex_lock} locks the given mutex. If the mutex is
-currently unlocked, it becomes locked and owned by the calling thread,
-and @code{pthread_mutex_lock} returns immediately. If the mutex is
-already locked by another thread, @code{pthread_mutex_lock} suspends the
-calling thread until the mutex is unlocked.
-
-If the mutex is already locked by the calling thread, the behavior of
-@code{pthread_mutex_lock} depends on the type of the mutex. If the mutex
-is of the ``fast'' type, the calling thread is suspended. It will
-remain suspended forever, because no other thread can unlock the mutex.
-If the mutex is of the ``error checking'' type, @code{pthread_mutex_lock}
-returns immediately with the error code @code{EDEADLK}. If the mutex is
-of the ``recursive'' type, @code{pthread_mutex_lock} succeeds and
-returns immediately, recording the number of times the calling thread
-has locked the mutex. An equal number of @code{pthread_mutex_unlock}
-operations must be performed before the mutex returns to the unlocked
-state.
-@c This doesn't discuss PTHREAD_MUTEX_TIMED_NP mutex attributes. FIXME
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_mutex_trylock (pthread_mutex_t *@var{mutex})
-@code{pthread_mutex_trylock} behaves identically to
-@code{pthread_mutex_lock}, except that it does not block the calling
-thread if the mutex is already locked by another thread (or by the
-calling thread in the case of a ``fast'' mutex). Instead,
-@code{pthread_mutex_trylock} returns immediately with the error code
-@code{EBUSY}.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_mutex_timedlock (pthread_mutex_t *@var{mutex}, const struct timespec *@var{abstime})
-The @code{pthread_mutex_timedlock} is similar to the
-@code{pthread_mutex_lock} function but instead of blocking for in
-indefinite time if the mutex is locked by another thread, it returns
-when the time specified in @var{abstime} is reached.
-
-This function can only be used on standard (``timed'') and ``error
-checking'' mutexes. It behaves just like @code{pthread_mutex_lock} for
-all other types.
-
-If the mutex is successfully locked, the function returns zero. If the
-time specified in @var{abstime} is reached without the mutex being locked,
-@code{ETIMEDOUT} is returned.
-
-This function was introduced in the POSIX.1d revision of the POSIX standard.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_mutex_unlock (pthread_mutex_t *@var{mutex})
-@code{pthread_mutex_unlock} unlocks the given mutex. The mutex is
-assumed to be locked and owned by the calling thread on entrance to
-@code{pthread_mutex_unlock}. If the mutex is of the ``fast'' type,
-@code{pthread_mutex_unlock} always returns it to the unlocked state. If
-it is of the ``recursive'' type, it decrements the locking count of the
-mutex (number of @code{pthread_mutex_lock} operations performed on it by
-the calling thread), and only when this count reaches zero is the mutex
-actually unlocked.
-
-On ``error checking'' mutexes, @code{pthread_mutex_unlock} actually
-checks at run-time that the mutex is locked on entrance, and that it was
-locked by the same thread that is now calling
-@code{pthread_mutex_unlock}. If these conditions are not met,
-@code{pthread_mutex_unlock} returns @code{EPERM}, and the mutex remains
-unchanged. ``Fast'' and ``recursive'' mutexes perform no such checks,
-thus allowing a locked mutex to be unlocked by a thread other than its
-owner. This is non-portable behavior and must not be relied upon.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_mutex_destroy (pthread_mutex_t *@var{mutex})
-@code{pthread_mutex_destroy} destroys a mutex object, freeing the
-resources it might hold. The mutex must be unlocked on entrance. In the
-LinuxThreads implementation, no resources are associated with mutex
-objects, thus @code{pthread_mutex_destroy} actually does nothing except
-checking that the mutex is unlocked.
-
-If the mutex is locked by some thread, @code{pthread_mutex_destroy}
-returns @code{EBUSY}. Otherwise it returns 0.
-@end deftypefun
-
-If any of the above functions (except @code{pthread_mutex_init})
-is applied to an uninitialized mutex, they will simply return
-@code{EINVAL} and do nothing.
-
-A shared global variable @var{x} can be protected by a mutex as follows:
-
-@smallexample
-int x;
-pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;
-@end smallexample
-
-All accesses and modifications to @var{x} should be bracketed by calls to
-@code{pthread_mutex_lock} and @code{pthread_mutex_unlock} as follows:
-
-@smallexample
-pthread_mutex_lock(&mut);
-/* operate on x */
-pthread_mutex_unlock(&mut);
-@end smallexample
-
-Mutex attributes can be specified at mutex creation time, by passing a
-mutex attribute object as second argument to @code{pthread_mutex_init}.
-Passing @code{NULL} is equivalent to passing a mutex attribute object
-with all attributes set to their default values.
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_mutexattr_init (pthread_mutexattr_t *@var{attr})
-@code{pthread_mutexattr_init} initializes the mutex attribute object
-@var{attr} and fills it with default values for the attributes.
-
-This function always returns 0.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_mutexattr_destroy (pthread_mutexattr_t *@var{attr})
-@code{pthread_mutexattr_destroy} destroys a mutex attribute object,
-which must not be reused until it is
-reinitialized. @code{pthread_mutexattr_destroy} does nothing in the
-LinuxThreads implementation.
-
-This function always returns 0.
-@end deftypefun
-
-LinuxThreads supports only one mutex attribute: the mutex type, which is
-either @code{PTHREAD_MUTEX_ADAPTIVE_NP} for ``fast'' mutexes,
-@code{PTHREAD_MUTEX_RECURSIVE_NP} for ``recursive'' mutexes,
-@code{PTHREAD_MUTEX_TIMED_NP} for ``timed'' mutexes, or
-@code{PTHREAD_MUTEX_ERRORCHECK_NP} for ``error checking'' mutexes. As
-the @code{NP} suffix indicates, this is a non-portable extension to the
-POSIX standard and should not be employed in portable programs.
-
-The mutex type determines what happens if a thread attempts to lock a
-mutex it already owns with @code{pthread_mutex_lock}. If the mutex is of
-the ``fast'' type, @code{pthread_mutex_lock} simply suspends the calling
-thread forever. If the mutex is of the ``error checking'' type,
-@code{pthread_mutex_lock} returns immediately with the error code
-@code{EDEADLK}. If the mutex is of the ``recursive'' type, the call to
-@code{pthread_mutex_lock} returns immediately with a success return
-code. The number of times the thread owning the mutex has locked it is
-recorded in the mutex. The owning thread must call
-@code{pthread_mutex_unlock} the same number of times before the mutex
-returns to the unlocked state.
-
-The default mutex type is ``timed'', that is, @code{PTHREAD_MUTEX_TIMED_NP}.
-@c This doesn't describe how a ``timed'' mutex behaves. FIXME
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_mutexattr_settype (pthread_mutexattr_t *@var{attr}, int @var{type})
-@code{pthread_mutexattr_settype} sets the mutex type attribute in
-@var{attr} to the value specified by @var{type}.
-
-If @var{type} is not @code{PTHREAD_MUTEX_ADAPTIVE_NP},
-@code{PTHREAD_MUTEX_RECURSIVE_NP}, @code{PTHREAD_MUTEX_TIMED_NP}, or
-@code{PTHREAD_MUTEX_ERRORCHECK_NP}, this function will return
-@code{EINVAL} and leave @var{attr} unchanged.
-
-The standard Unix98 identifiers @code{PTHREAD_MUTEX_DEFAULT},
-@code{PTHREAD_MUTEX_NORMAL}, @code{PTHREAD_MUTEX_RECURSIVE},
-and @code{PTHREAD_MUTEX_ERRORCHECK} are also permitted.
-
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_mutexattr_gettype (const pthread_mutexattr_t *@var{attr}, int *@var{type})
-@code{pthread_mutexattr_gettype} retrieves the current value of the
-mutex type attribute in @var{attr} and stores it in the location pointed
-to by @var{type}.
-
-This function always returns 0.
-@end deftypefun
-
-@node Condition Variables
-@section Condition Variables
-
-A condition (short for ``condition variable'') is a synchronization
-device that allows threads to suspend execution until some predicate on
-shared data is satisfied. The basic operations on conditions are: signal
-the condition (when the predicate becomes true), and wait for the
-condition, suspending the thread execution until another thread signals
-the condition.
-
-A condition variable must always be associated with a mutex, to avoid
-the race condition where a thread prepares to wait on a condition
-variable and another thread signals the condition just before the first
-thread actually waits on it.
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_cond_init (pthread_cond_t *@var{cond}, pthread_condattr_t *cond_@var{attr})
-
-@code{pthread_cond_init} initializes the condition variable @var{cond},
-using the condition attributes specified in @var{cond_attr}, or default
-attributes if @var{cond_attr} is @code{NULL}. The LinuxThreads
-implementation supports no attributes for conditions, hence the
-@var{cond_attr} parameter is actually ignored.
-
-Variables of type @code{pthread_cond_t} can also be initialized
-statically, using the constant @code{PTHREAD_COND_INITIALIZER}.
-
-This function always returns 0.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_cond_signal (pthread_cond_t *@var{cond})
-@code{pthread_cond_signal} restarts one of the threads that are waiting
-on the condition variable @var{cond}. If no threads are waiting on
-@var{cond}, nothing happens. If several threads are waiting on
-@var{cond}, exactly one is restarted, but it is not specified which.
-
-This function always returns 0.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_cond_broadcast (pthread_cond_t *@var{cond})
-@code{pthread_cond_broadcast} restarts all the threads that are waiting
-on the condition variable @var{cond}. Nothing happens if no threads are
-waiting on @var{cond}.
-
-This function always returns 0.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_cond_wait (pthread_cond_t *@var{cond}, pthread_mutex_t *@var{mutex})
-@code{pthread_cond_wait} atomically unlocks the @var{mutex} (as per
-@code{pthread_unlock_mutex}) and waits for the condition variable
-@var{cond} to be signaled. The thread execution is suspended and does
-not consume any CPU time until the condition variable is signaled. The
-@var{mutex} must be locked by the calling thread on entrance to
-@code{pthread_cond_wait}. Before returning to the calling thread,
-@code{pthread_cond_wait} re-acquires @var{mutex} (as per
-@code{pthread_lock_mutex}).
-
-Unlocking the mutex and suspending on the condition variable is done
-atomically. Thus, if all threads always acquire the mutex before
-signaling the condition, this guarantees that the condition cannot be
-signaled (and thus ignored) between the time a thread locks the mutex
-and the time it waits on the condition variable.
-
-This function always returns 0.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_cond_timedwait (pthread_cond_t *@var{cond}, pthread_mutex_t *@var{mutex}, const struct timespec *@var{abstime})
-@code{pthread_cond_timedwait} atomically unlocks @var{mutex} and waits
-on @var{cond}, as @code{pthread_cond_wait} does, but it also bounds the
-duration of the wait. If @var{cond} has not been signaled before time
-@var{abstime}, the mutex @var{mutex} is re-acquired and
-@code{pthread_cond_timedwait} returns the error code @code{ETIMEDOUT}.
-The wait can also be interrupted by a signal; in that case
-@code{pthread_cond_timedwait} returns @code{EINTR}.
-
-The @var{abstime} parameter specifies an absolute time, with the same
-origin as @code{time} and @code{gettimeofday}: an @var{abstime} of 0
-corresponds to 00:00:00 GMT, January 1, 1970.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_cond_destroy (pthread_cond_t *@var{cond})
-@code{pthread_cond_destroy} destroys the condition variable @var{cond},
-freeing the resources it might hold. If any threads are waiting on the
-condition variable, @code{pthread_cond_destroy} leaves @var{cond}
-untouched and returns @code{EBUSY}. Otherwise it returns 0, and
-@var{cond} must not be used again until it is reinitialized.
-
-In the LinuxThreads implementation, no resources are associated with
-condition variables, so @code{pthread_cond_destroy} actually does
-nothing.
-@end deftypefun
-
-@code{pthread_cond_wait} and @code{pthread_cond_timedwait} are
-cancellation points. If a thread is canceled while suspended in one of
-these functions, the thread immediately resumes execution, relocks the
-mutex specified by @var{mutex}, and finally executes the cancellation.
-Consequently, cleanup handlers are assured that @var{mutex} is locked
-when they are called.
-
-It is not safe to call the condition variable functions from a signal
-handler. In particular, calling @code{pthread_cond_signal} or
-@code{pthread_cond_broadcast} from a signal handler may deadlock the
-calling thread.
-
-Consider two shared variables @var{x} and @var{y}, protected by the
-mutex @var{mut}, and a condition variable @var{cond} that is to be
-signaled whenever @var{x} becomes greater than @var{y}.
-
-@smallexample
-int x,y;
-pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER;
-pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
-@end smallexample
-
-Waiting until @var{x} is greater than @var{y} is performed as follows:
-
-@smallexample
-pthread_mutex_lock(&mut);
-while (x <= y) @{
- pthread_cond_wait(&cond, &mut);
-@}
-/* operate on x and y */
-pthread_mutex_unlock(&mut);
-@end smallexample
-
-Modifications on @var{x} and @var{y} that may cause @var{x} to become greater than
-@var{y} should signal the condition if needed:
-
-@smallexample
-pthread_mutex_lock(&mut);
-/* modify x and y */
-if (x > y) pthread_cond_broadcast(&cond);
-pthread_mutex_unlock(&mut);
-@end smallexample
-
-If it can be proved that at most one waiting thread needs to be waken
-up (for instance, if there are only two threads communicating through
-@var{x} and @var{y}), @code{pthread_cond_signal} can be used as a slightly more
-efficient alternative to @code{pthread_cond_broadcast}. In doubt, use
-@code{pthread_cond_broadcast}.
-
-To wait for @var{x} to becomes greater than @var{y} with a timeout of 5
-seconds, do:
-
-@smallexample
-struct timeval now;
-struct timespec timeout;
-int retcode;
-
-pthread_mutex_lock(&mut);
-gettimeofday(&now);
-timeout.tv_sec = now.tv_sec + 5;
-timeout.tv_nsec = now.tv_usec * 1000;
-retcode = 0;
-while (x <= y && retcode != ETIMEDOUT) @{
- retcode = pthread_cond_timedwait(&cond, &mut, &timeout);
-@}
-if (retcode == ETIMEDOUT) @{
- /* timeout occurred */
-@} else @{
- /* operate on x and y */
-@}
-pthread_mutex_unlock(&mut);
-@end smallexample
-
-Condition attributes can be specified at condition creation time, by
-passing a condition attribute object as second argument to
-@code{pthread_cond_init}. Passing @code{NULL} is equivalent to passing
-a condition attribute object with all attributes set to their default
-values.
-
-The LinuxThreads implementation supports no attributes for
-conditions. The functions on condition attributes are included only for
-compliance with the POSIX standard.
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_condattr_init (pthread_condattr_t *@var{attr})
-@deftypefunx int pthread_condattr_destroy (pthread_condattr_t *@var{attr})
-@code{pthread_condattr_init} initializes the condition attribute object
-@var{attr} and fills it with default values for the attributes.
-@code{pthread_condattr_destroy} destroys the condition attribute object
-@var{attr}.
-
-Both functions do nothing in the LinuxThreads implementation.
-
-@code{pthread_condattr_init} and @code{pthread_condattr_destroy} always
-return 0.
-@end deftypefun
-
-@node POSIX Semaphores
-@section POSIX Semaphores
-
-@vindex SEM_VALUE_MAX
-Semaphores are counters for resources shared between threads. The
-basic operations on semaphores are: increment the counter atomically,
-and wait until the counter is non-null and decrement it atomically.
-
-Semaphores have a maximum value past which they cannot be incremented.
-The macro @code{SEM_VALUE_MAX} is defined to be this maximum value. In
-the GNU C library, @code{SEM_VALUE_MAX} is equal to @code{INT_MAX}
-(@pxref{Range of Type}), but it may be much smaller on other systems.
-
-The pthreads library implements POSIX 1003.1b semaphores. These should
-not be confused with System V semaphores (@code{ipc}, @code{semctl} and
-@code{semop}).
-@c !!! SysV IPC is not doc'd at all in our manual
-
-All the semaphore functions and macros are defined in @file{semaphore.h}.
-
-@comment semaphore.h
-@comment POSIX
-@deftypefun int sem_init (sem_t *@var{sem}, int @var{pshared}, unsigned int @var{value})
-@code{sem_init} initializes the semaphore object pointed to by
-@var{sem}. The count associated with the semaphore is set initially to
-@var{value}. The @var{pshared} argument indicates whether the semaphore
-is local to the current process (@var{pshared} is zero) or is to be
-shared between several processes (@var{pshared} is not zero).
-
-On success @code{sem_init} returns 0. On failure it returns -1 and sets
-@var{errno} to one of the following values:
-
-@table @code
-@item EINVAL
-@var{value} exceeds the maximal counter value @code{SEM_VALUE_MAX}
-
-@item ENOSYS
-@var{pshared} is not zero. LinuxThreads currently does not support
-process-shared semaphores. (This will eventually change.)
-@end table
-@end deftypefun
-
-@comment semaphore.h
-@comment POSIX
-@deftypefun int sem_destroy (sem_t * @var{sem})
-@code{sem_destroy} destroys a semaphore object, freeing the resources it
-might hold. If any threads are waiting on the semaphore when
-@code{sem_destroy} is called, it fails and sets @var{errno} to
-@code{EBUSY}.
-
-In the LinuxThreads implementation, no resources are associated with
-semaphore objects, thus @code{sem_destroy} actually does nothing except
-checking that no thread is waiting on the semaphore. This will change
-when process-shared semaphores are implemented.
-@end deftypefun
-
-@comment semaphore.h
-@comment POSIX
-@deftypefun int sem_wait (sem_t * @var{sem})
-@code{sem_wait} suspends the calling thread until the semaphore pointed
-to by @var{sem} has non-zero count. It then atomically decreases the
-semaphore count.
-
-@code{sem_wait} is a cancellation point. It always returns 0.
-@end deftypefun
-
-@comment semaphore.h
-@comment POSIX
-@deftypefun int sem_trywait (sem_t * @var{sem})
-@code{sem_trywait} is a non-blocking variant of @code{sem_wait}. If the
-semaphore pointed to by @var{sem} has non-zero count, the count is
-atomically decreased and @code{sem_trywait} immediately returns 0. If
-the semaphore count is zero, @code{sem_trywait} immediately returns -1
-and sets errno to @code{EAGAIN}.
-@end deftypefun
-
-@comment semaphore.h
-@comment POSIX
-@deftypefun int sem_post (sem_t * @var{sem})
-@code{sem_post} atomically increases the count of the semaphore pointed to
-by @var{sem}. This function never blocks.
-
-@c !!! This para appears not to agree with the code.
-On processors supporting atomic compare-and-swap (Intel 486, Pentium and
-later, Alpha, PowerPC, MIPS II, Motorola 68k, Ultrasparc), the
-@code{sem_post} function is can safely be called from signal handlers.
-This is the only thread synchronization function provided by POSIX
-threads that is async-signal safe. On the Intel 386 and earlier Sparc
-chips, the current LinuxThreads implementation of @code{sem_post} is not
-async-signal safe, because the hardware does not support the required
-atomic operations.
-
-@code{sem_post} always succeeds and returns 0, unless the semaphore
-count would exceed @code{SEM_VALUE_MAX} after being incremented. In
-that case @code{sem_post} returns -1 and sets @var{errno} to
-@code{EINVAL}. The semaphore count is left unchanged.
-@end deftypefun
-
-@comment semaphore.h
-@comment POSIX
-@deftypefun int sem_getvalue (sem_t * @var{sem}, int * @var{sval})
-@code{sem_getvalue} stores in the location pointed to by @var{sval} the
-current count of the semaphore @var{sem}. It always returns 0.
-@end deftypefun
-
-@node Thread-Specific Data
-@section Thread-Specific Data
-
-Programs often need global or static variables that have different
-values in different threads. Since threads share one memory space, this
-cannot be achieved with regular variables. Thread-specific data is the
-POSIX threads answer to this need.
-
-Each thread possesses a private memory block, the thread-specific data
-area, or TSD area for short. This area is indexed by TSD keys. The TSD
-area associates values of type @code{void *} to TSD keys. TSD keys are
-common to all threads, but the value associated with a given TSD key can
-be different in each thread.
-
-For concreteness, the TSD areas can be viewed as arrays of @code{void *}
-pointers, TSD keys as integer indices into these arrays, and the value
-of a TSD key as the value of the corresponding array element in the
-calling thread.
-
-When a thread is created, its TSD area initially associates @code{NULL}
-with all keys.
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_key_create (pthread_key_t *@var{key}, void (*destr_function) (void *))
-@code{pthread_key_create} allocates a new TSD key. The key is stored in
-the location pointed to by @var{key}. There is a limit of
-@code{PTHREAD_KEYS_MAX} on the number of keys allocated at a given
-time. The value initially associated with the returned key is
-@code{NULL} in all currently executing threads.
-
-The @var{destr_function} argument, if not @code{NULL}, specifies a
-destructor function associated with the key. When a thread terminates
-via @code{pthread_exit} or by cancellation, @var{destr_function} is
-called on the value associated with the key in that thread. The
-@var{destr_function} is not called if a key is deleted with
-@code{pthread_key_delete} or a value is changed with
-@code{pthread_setspecific}. The order in which destructor functions are
-called at thread termination time is unspecified.
-
-Before the destructor function is called, the @code{NULL} value is
-associated with the key in the current thread. A destructor function
-might, however, re-associate non-@code{NULL} values to that key or some
-other key. To deal with this, if after all the destructors have been
-called for all non-@code{NULL} values, there are still some
-non-@code{NULL} values with associated destructors, then the process is
-repeated. The LinuxThreads implementation stops the process after
-@code{PTHREAD_DESTRUCTOR_ITERATIONS} iterations, even if some
-non-@code{NULL} values with associated descriptors remain. Other
-implementations may loop indefinitely.
-
-@code{pthread_key_create} returns 0 unless @code{PTHREAD_KEYS_MAX} keys
-have already been allocated, in which case it fails and returns
-@code{EAGAIN}.
-@end deftypefun
-
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_key_delete (pthread_key_t @var{key})
-@code{pthread_key_delete} deallocates a TSD key. It does not check
-whether non-@code{NULL} values are associated with that key in the
-currently executing threads, nor call the destructor function associated
-with the key.
-
-If there is no such key @var{key}, it returns @code{EINVAL}. Otherwise
-it returns 0.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_setspecific (pthread_key_t @var{key}, const void *@var{pointer})
-@code{pthread_setspecific} changes the value associated with @var{key}
-in the calling thread, storing the given @var{pointer} instead.
-
-If there is no such key @var{key}, it returns @code{EINVAL}. Otherwise
-it returns 0.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun {void *} pthread_getspecific (pthread_key_t @var{key})
-@code{pthread_getspecific} returns the value currently associated with
-@var{key} in the calling thread.
-
-If there is no such key @var{key}, it returns @code{NULL}.
-@end deftypefun
-
-The following code fragment allocates a thread-specific array of 100
-characters, with automatic reclaimation at thread exit:
-
-@smallexample
-/* Key for the thread-specific buffer */
-static pthread_key_t buffer_key;
-
-/* Once-only initialisation of the key */
-static pthread_once_t buffer_key_once = PTHREAD_ONCE_INIT;
-
-/* Allocate the thread-specific buffer */
-void buffer_alloc(void)
-@{
- pthread_once(&buffer_key_once, buffer_key_alloc);
- pthread_setspecific(buffer_key, malloc(100));
-@}
-
-/* Return the thread-specific buffer */
-char * get_buffer(void)
-@{
- return (char *) pthread_getspecific(buffer_key);
-@}
-
-/* Allocate the key */
-static void buffer_key_alloc()
-@{
- pthread_key_create(&buffer_key, buffer_destroy);
-@}
-
-/* Free the thread-specific buffer */
-static void buffer_destroy(void * buf)
-@{
- free(buf);
-@}
-@end smallexample
-
-@node Threads and Signal Handling
-@section Threads and Signal Handling
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_sigmask (int @var{how}, const sigset_t *@var{newmask}, sigset_t *@var{oldmask})
-@code{pthread_sigmask} changes the signal mask for the calling thread as
-described by the @var{how} and @var{newmask} arguments. If @var{oldmask}
-is not @code{NULL}, the previous signal mask is stored in the location
-pointed to by @var{oldmask}.
-
-The meaning of the @var{how} and @var{newmask} arguments is the same as
-for @code{sigprocmask}. If @var{how} is @code{SIG_SETMASK}, the signal
-mask is set to @var{newmask}. If @var{how} is @code{SIG_BLOCK}, the
-signals specified to @var{newmask} are added to the current signal mask.
-If @var{how} is @code{SIG_UNBLOCK}, the signals specified to
-@var{newmask} are removed from the current signal mask.
-
-Recall that signal masks are set on a per-thread basis, but signal
-actions and signal handlers, as set with @code{sigaction}, are shared
-between all threads.
-
-The @code{pthread_sigmask} function returns 0 on success, and one of the
-following error codes on error:
-@table @code
-@item EINVAL
-@var{how} is not one of @code{SIG_SETMASK}, @code{SIG_BLOCK}, or @code{SIG_UNBLOCK}
-
-@item EFAULT
-@var{newmask} or @var{oldmask} point to invalid addresses
-@end table
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_kill (pthread_t @var{thread}, int @var{signo})
-@code{pthread_kill} sends signal number @var{signo} to the thread
-@var{thread}. The signal is delivered and handled as described in
-@ref{Signal Handling}.
-
-@code{pthread_kill} returns 0 on success, one of the following error codes
-on error:
-@table @code
-@item EINVAL
-@var{signo} is not a valid signal number
-
-@item ESRCH
-The thread @var{thread} does not exist (e.g. it has already terminated)
-@end table
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int sigwait (const sigset_t *@var{set}, int *@var{sig})
-@code{sigwait} suspends the calling thread until one of the signals in
-@var{set} is delivered to the calling thread. It then stores the number
-of the signal received in the location pointed to by @var{sig} and
-returns. The signals in @var{set} must be blocked and not ignored on
-entrance to @code{sigwait}. If the delivered signal has a signal handler
-function attached, that function is @emph{not} called.
-
-@code{sigwait} is a cancellation point. It always returns 0.
-@end deftypefun
-
-For @code{sigwait} to work reliably, the signals being waited for must be
-blocked in all threads, not only in the calling thread, since
-otherwise the POSIX semantics for signal delivery do not guarantee
-that it's the thread doing the @code{sigwait} that will receive the signal.
-The best way to achieve this is block those signals before any threads
-are created, and never unblock them in the program other than by
-calling @code{sigwait}.
-
-Signal handling in LinuxThreads departs significantly from the POSIX
-standard. According to the standard, ``asynchronous'' (external) signals
-are addressed to the whole process (the collection of all threads),
-which then delivers them to one particular thread. The thread that
-actually receives the signal is any thread that does not currently block
-the signal.
-
-In LinuxThreads, each thread is actually a kernel process with its own
-PID, so external signals are always directed to one particular thread.
-If, for instance, another thread is blocked in @code{sigwait} on that
-signal, it will not be restarted.
-
-The LinuxThreads implementation of @code{sigwait} installs dummy signal
-handlers for the signals in @var{set} for the duration of the
-wait. Since signal handlers are shared between all threads, other
-threads must not attach their own signal handlers to these signals, or
-alternatively they should all block these signals (which is recommended
-anyway).
-
-@node Threads and Fork
-@section Threads and Fork
-
-It's not intuitively obvious what should happen when a multi-threaded POSIX
-process calls @code{fork}. Not only are the semantics tricky, but you may
-need to write code that does the right thing at fork time even if that code
-doesn't use the @code{fork} function. Moreover, you need to be aware of
-interaction between @code{fork} and some library features like
-@code{pthread_once} and stdio streams.
-
-When @code{fork} is called by one of the threads of a process, it creates a new
-process which is copy of the calling process. Effectively, in addition to
-copying certain system objects, the function takes a snapshot of the memory
-areas of the parent process, and creates identical areas in the child.
-To make matters more complicated, with threads it's possible for two or more
-threads to concurrently call fork to create two or more child processes.
-
-The child process has a copy of the address space of the parent, but it does
-not inherit any of its threads. Execution of the child process is carried out
-by a new thread which returns from @code{fork} function with a return value of
-zero; it is the only thread in the child process. Because threads are not
-inherited across fork, issues arise. At the time of the call to @code{fork},
-threads in the parent process other than the one calling @code{fork} may have
-been executing critical regions of code. As a result, the child process may
-get a copy of objects that are not in a well-defined state. This potential
-problem affects all components of the program.
-
-Any program component which will continue being used in a child process must
-correctly handle its state during @code{fork}. For this purpose, the POSIX
-interface provides the special function @code{pthread_atfork} for installing
-pointers to handler functions which are called from within @code{fork}.
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_atfork (void (*@var{prepare})(void), void (*@var{parent})(void), void (*@var{child})(void))
-
-@code{pthread_atfork} registers handler functions to be called just
-before and just after a new process is created with @code{fork}. The
-@var{prepare} handler will be called from the parent process, just
-before the new process is created. The @var{parent} handler will be
-called from the parent process, just before @code{fork} returns. The
-@var{child} handler will be called from the child process, just before
-@code{fork} returns.
-
-@code{pthread_atfork} returns 0 on success and a non-zero error code on
-error.
-
-One or more of the three handlers @var{prepare}, @var{parent} and
-@var{child} can be given as @code{NULL}, meaning that no handler needs
-to be called at the corresponding point.
-
-@code{pthread_atfork} can be called several times to install several
-sets of handlers. At @code{fork} time, the @var{prepare} handlers are
-called in LIFO order (last added with @code{pthread_atfork}, first
-called before @code{fork}), while the @var{parent} and @var{child}
-handlers are called in FIFO order (first added, first called).
-
-If there is insufficient memory available to register the handlers,
-@code{pthread_atfork} fails and returns @code{ENOMEM}. Otherwise it
-returns 0.
-
-The functions @code{fork} and @code{pthread_atfork} must not be regarded as
-reentrant from the context of the handlers. That is to say, if a
-@code{pthread_atfork} handler invoked from within @code{fork} calls
-@code{pthread_atfork} or @code{fork}, the behavior is undefined.
-
-Registering a triplet of handlers is an atomic operation with respect to fork.
-If new handlers are registered at about the same time as a fork occurs, either
-all three handlers will be called, or none of them will be called.
-
-The handlers are inherited by the child process, and there is no
-way to remove them, short of using @code{exec} to load a new
-pocess image.
-
-@end deftypefun
-
-To understand the purpose of @code{pthread_atfork}, recall that
-@code{fork} duplicates the whole memory space, including mutexes in
-their current locking state, but only the calling thread: other threads
-are not running in the child process. Thus, if a mutex is locked by a
-thread other than the thread calling @code{fork}, that mutex will remain
-locked forever in the child process, possibly blocking the execution of
-the child process. Or if some shared data, such as a linked list, was in the
-middle of being updated by a thread in the parent process, the child
-will get a copy of the incompletely updated data which it cannot use.
-
-To avoid this, install handlers with @code{pthread_atfork} as follows: have the
-@var{prepare} handler lock the mutexes (in locking order), and the
-@var{parent} handler unlock the mutexes. The @var{child} handler should reset
-the mutexes using @code{pthread_mutex_init}, as well as any other
-synchronization objects such as condition variables.
-
-Locking the global mutexes before the fork ensures that all other threads are
-locked out of the critical regions of code protected by those mutexes. Thus
-when @code{fork} takes a snapshot of the parent's address space, that snapshot
-will copy valid, stable data. Resetting the synchronization objects in the
-child process will ensure they are properly cleansed of any artifacts from the
-threading subsystem of the parent process. For example, a mutex may inherit
-a wait queue of threads waiting for the lock; this wait queue makes no sense
-in the child process. Initializing the mutex takes care of this.
-
-@node Streams and Fork
-@section Streams and Fork
-
-The GNU standard I/O library has an internal mutex which guards the internal
-linked list of all standard C FILE objects. This mutex is properly taken care
-of during @code{fork} so that the child receives an intact copy of the list.
-This allows the @code{fopen} function, and related stream-creating functions,
-to work correctly in the child process, since these functions need to insert
-into the list.
-
-However, the individual stream locks are not completely taken care of. Thus
-unless the multithreaded application takes special precautions in its use of
-@code{fork}, the child process might not be able to safely use the streams that
-it inherited from the parent. In general, for any given open stream in the
-parent that is to be used by the child process, the application must ensure
-that that stream is not in use by another thread when @code{fork} is called.
-Otherwise an inconsistent copy of the stream object be produced. An easy way to
-ensure this is to use @code{flockfile} to lock the stream prior to calling
-@code{fork} and then unlock it with @code{funlockfile} inside the parent
-process, provided that the parent's threads properly honor these locks.
-Nothing special needs to be done in the child process, since the library
-internally resets all stream locks.
-
-Note that the stream locks are not shared between the parent and child.
-For example, even if you ensure that, say, the stream @code{stdout} is properly
-treated and can be safely used in the child, the stream locks do not provide
-an exclusion mechanism between the parent and child. If both processes write
-to @code{stdout}, strangely interleaved output may result regardless of
-the explicit use of @code{flockfile} or implicit locks.
-
-Also note that these provisions are a GNU extension; other systems might not
-provide any way for streams to be used in the child of a multithreaded process.
-POSIX requires that such a child process confines itself to calling only
-asynchronous safe functions, which excludes much of the library, including
-standard I/O.
-
-@node Miscellaneous Thread Functions
-@section Miscellaneous Thread Functions
-
-@comment pthread.h
-@comment POSIX
-@deftypefun {pthread_t} pthread_self (@var{void})
-@code{pthread_self} returns the thread identifier for the calling thread.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_equal (pthread_t thread1, pthread_t thread2)
-@code{pthread_equal} determines if two thread identifiers refer to the same
-thread.
-
-A non-zero value is returned if @var{thread1} and @var{thread2} refer to
-the same thread. Otherwise, 0 is returned.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_detach (pthread_t @var{th})
-@code{pthread_detach} puts the thread @var{th} in the detached
-state. This guarantees that the memory resources consumed by @var{th}
-will be freed immediately when @var{th} terminates. However, this
-prevents other threads from synchronizing on the termination of @var{th}
-using @code{pthread_join}.
-
-A thread can be created initially in the detached state, using the
-@code{detachstate} attribute to @code{pthread_create}. In contrast,
-@code{pthread_detach} applies to threads created in the joinable state,
-and which need to be put in the detached state later.
-
-After @code{pthread_detach} completes, subsequent attempts to perform
-@code{pthread_join} on @var{th} will fail. If another thread is already
-joining the thread @var{th} at the time @code{pthread_detach} is called,
-@code{pthread_detach} does nothing and leaves @var{th} in the joinable
-state.
-
-On success, 0 is returned. On error, one of the following codes is
-returned:
-@table @code
-@item ESRCH
-No thread could be found corresponding to that specified by @var{th}
-@item EINVAL
-The thread @var{th} is already in the detached state
-@end table
-@end deftypefun
-
-@comment pthread.h
-@comment GNU
-@deftypefun void pthread_kill_other_threads_np (@var{void})
-@code{pthread_kill_other_threads_np} is a non-portable LinuxThreads extension.
-It causes all threads in the program to terminate immediately, except
-the calling thread which proceeds normally. It is intended to be
-called just before a thread calls one of the @code{exec} functions,
-e.g. @code{execve}.
-
-Termination of the other threads is not performed through
-@code{pthread_cancel} and completely bypasses the cancellation
-mechanism. Hence, the current settings for cancellation state and
-cancellation type are ignored, and the cleanup handlers are not
-executed in the terminated threads.
-
-According to POSIX 1003.1c, a successful @code{exec*} in one of the
-threads should automatically terminate all other threads in the program.
-This behavior is not yet implemented in LinuxThreads. Calling
-@code{pthread_kill_other_threads_np} before @code{exec*} achieves much
-of the same behavior, except that if @code{exec*} ultimately fails, then
-all other threads are already killed.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_once (pthread_once_t *once_@var{control}, void (*@var{init_routine}) (void))
-
-The purpose of @code{pthread_once} is to ensure that a piece of
-initialization code is executed at most once. The @var{once_control}
-argument points to a static or extern variable statically initialized
-to @code{PTHREAD_ONCE_INIT}.
-
-The first time @code{pthread_once} is called with a given
-@var{once_control} argument, it calls @var{init_routine} with no
-argument and changes the value of the @var{once_control} variable to
-record that initialization has been performed. Subsequent calls to
-@code{pthread_once} with the same @code{once_control} argument do
-nothing.
-
-If a thread is cancelled while executing @var{init_routine}
-the state of the @var{once_control} variable is reset so that
-a future call to @code{pthread_once} will call the routine again.
-
-If the process forks while one or more threads are executing
-@code{pthread_once} initialization routines, the states of their respective
-@var{once_control} variables will appear to be reset in the child process so
-that if the child calls @code{pthread_once}, the routines will be executed.
-
-@code{pthread_once} always returns 0.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_setschedparam (pthread_t target_@var{thread}, int @var{policy}, const struct sched_param *@var{param})
-
-@code{pthread_setschedparam} sets the scheduling parameters for the
-thread @var{target_thread} as indicated by @var{policy} and
-@var{param}. @var{policy} can be either @code{SCHED_OTHER} (regular,
-non-realtime scheduling), @code{SCHED_RR} (realtime, round-robin) or
-@code{SCHED_FIFO} (realtime, first-in first-out). @var{param} specifies
-the scheduling priority for the two realtime policies. See
-@code{sched_setpolicy} for more information on scheduling policies.
-
-The realtime scheduling policies @code{SCHED_RR} and @code{SCHED_FIFO}
-are available only to processes with superuser privileges.
-
-On success, @code{pthread_setschedparam} returns 0. On error it returns
-one of the following codes:
-@table @code
-@item EINVAL
-@var{policy} is not one of @code{SCHED_OTHER}, @code{SCHED_RR},
-@code{SCHED_FIFO}, or the priority value specified by @var{param} is not
-valid for the specified policy
-
-@item EPERM
-Realtime scheduling was requested but the calling process does not have
-sufficient privileges.
-
-@item ESRCH
-The @var{target_thread} is invalid or has already terminated
-
-@item EFAULT
-@var{param} points outside the process memory space
-@end table
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_getschedparam (pthread_t target_@var{thread}, int *@var{policy}, struct sched_param *@var{param})
-
-@code{pthread_getschedparam} retrieves the scheduling policy and
-scheduling parameters for the thread @var{target_thread} and stores them
-in the locations pointed to by @var{policy} and @var{param},
-respectively.
-
-@code{pthread_getschedparam} returns 0 on success, or one of the
-following error codes on failure:
-@table @code
-@item ESRCH
-The @var{target_thread} is invalid or has already terminated.
-
-@item EFAULT
-@var{policy} or @var{param} point outside the process memory space.
-
-@end table
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_setconcurrency (int @var{level})
-@code{pthread_setconcurrency} is unused in LinuxThreads due to the lack
-of a mapping of user threads to kernel threads. It exists for source
-compatibility. It does store the value @var{level} so that it can be
-returned by a subsequent call to @code{pthread_getconcurrency}. It takes
-no other action however.
-@end deftypefun
-
-@comment pthread.h
-@comment POSIX
-@deftypefun int pthread_getconcurrency ()
-@code{pthread_getconcurrency} is unused in LinuxThreads due to the lack
-of a mapping of user threads to kernel threads. It exists for source
-compatibility. However, it will return the value that was set by the
-last call to @code{pthread_setconcurrency}.
-@end deftypefun
-
diff --git a/newlib/libc/sys/linux/linuxthreads/lockfile.c b/newlib/libc/sys/linux/linuxthreads/lockfile.c
deleted file mode 100644
index 0aeb15086..000000000
--- a/newlib/libc/sys/linux/linuxthreads/lockfile.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/* lockfile - Handle locking and unlocking of stream.
- Copyright (C) 1996, 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <sys/lock.h>
-#include <stdio.h>
-#include <pthread.h>
-#include "internals.h"
-
-#ifdef USE_IN_LIBIO
-#include "../libio/libioP.h"
-#endif
-
-#ifndef SHARED
-/* We need a hook to force this file to be linked in when static
- libpthread is used. */
-const int __pthread_provide_lockfile = 0;
-#endif
-
-void
-__flockfile (FILE *stream)
-{
- __lock_acquire_recursive (*(_LOCK_RECURSIVE_T *)&stream->_lock);
-}
-#undef _IO_flockfile
-strong_alias (__flockfile, _IO_flockfile)
-weak_alias (__flockfile, flockfile);
-
-
-void
-__funlockfile (FILE *stream)
-{
- __lock_release_recursive (*(_LOCK_RECURSIVE_T *)&stream->_lock);
-}
-#undef _IO_funlockfile
-strong_alias (__funlockfile, _IO_funlockfile)
-weak_alias (__funlockfile, funlockfile);
-
-
-int
-__ftrylockfile (FILE *stream)
-{
- return __lock_try_acquire_recursive (*(_LOCK_RECURSIVE_T *)&stream->_lock);
-}
-strong_alias (__ftrylockfile, _IO_ftrylockfile)
-weak_alias (__ftrylockfile, ftrylockfile);
-
-void
-__flockfilelist(void)
-{
-#ifdef USE_IN_LIBIO
- _IO_list_lock();
-#endif
-}
-
-void
-__funlockfilelist(void)
-{
-#ifdef USE_IN_LIBIO
- _IO_list_unlock();
-#endif
-}
-
-void
-__fresetlockfiles (void)
-{
-#ifdef USE_IN_LIBIO
- _IO_ITER i;
-
- pthread_mutexattr_t attr;
-
- __pthread_mutexattr_init (&attr);
- __pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE_NP);
-
- for (i = _IO_iter_begin(); i != _IO_iter_end(); i = _IO_iter_next(i))
- __pthread_mutex_init (_IO_iter_file(i)->_lock, &attr);
-
- __pthread_mutexattr_destroy (&attr);
-
- _IO_list_resetlock();
-#endif
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/Makefile.am b/newlib/libc/sys/linux/linuxthreads/machine/Makefile.am
deleted file mode 100644
index 27c348c3b..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-SUBDIRS = $(machine_dir) .
-
-doc:
-
-ACLOCAL_AMFLAGS = -I ../../../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/Makefile.in b/newlib/libc/sys/linux/linuxthreads/machine/Makefile.in
deleted file mode 100644
index c0b669d41..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/Makefile.in
+++ /dev/null
@@ -1,356 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-EXEEXT = @EXEEXT@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-SUBDIRS = $(machine_dir) .
-
-ACLOCAL_AMFLAGS = -I ../../../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-all: all-redirect
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../../../acinclude.m4 ../../../../../aclocal.m4 \
- ../../../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" != "." || dot_seen=yes; \
- done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- for subdir in $(SUBDIRS); do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- || exit 1; \
- fi; \
- done
-info-am:
-info: info-recursive
-dvi-am:
-dvi: dvi-recursive
-check-am:
-check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-info-am:
-install-info: install-info-recursive
-install-exec-am:
-install-exec: install-exec-recursive
-
-install-data-am:
-install-data: install-data-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am:
-uninstall: uninstall-recursive
-all-am: Makefile
-all-redirect: all-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-recursive
-
-clean-am: clean-tags clean-generic mostlyclean-am
-
-clean: clean-recursive
-
-distclean-am: distclean-tags distclean-generic clean-am
- -rm -f libtool
-
-distclean: distclean-recursive
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: install-data-recursive uninstall-data-recursive \
-install-exec-recursive uninstall-exec-recursive installdirs-recursive \
-uninstalldirs-recursive all-recursive check-recursive \
-installcheck-recursive info-recursive dvi-recursive \
-mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-info-am \
-install-info install-exec-am install-exec install-data-am install-data \
-install-am install uninstall-am uninstall all-redirect all-am all \
-installdirs-am installdirs mostlyclean-generic distclean-generic \
-clean-generic maintainer-clean-generic clean mostlyclean distclean \
-maintainer-clean
-
-
-doc:
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/aclocal.m4 b/newlib/libc/sys/linux/linuxthreads/machine/aclocal.m4
deleted file mode 100644
index c0a206827..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/aclocal.m4
+++ /dev/null
@@ -1,1223 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
-
-# serial 46 AC_PROG_LIBTOOL
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
- AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [AC_LIBTOOL_CXX],
- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
- AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [ifdef([AC_PROG_GCJ],
- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([A][M_PROG_GCJ],
- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([LT_AC_PROG_GCJ],
- [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])])])])])
-
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- AC_PATH_MAGIC
- fi
- ;;
-esac
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-AC_ARG_WITH(pic,
- [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
- pic_mode="$withval", pic_mode=default)
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_SAVE
- AC_LANG_C
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_RESTORE])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
- [AC_TRY_LINK([],
- [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);],
- [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
- [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
- ])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_LIBTOOL_PICMODE - implement the --with-pic flag
-# Usage: AC_LIBTOOL_PICMODE[(MODE)]
-# Where MODE is either `yes' or `no'. If omitted, it defaults to
-# `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)])
-
-
-# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="ifelse([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-])
-
-
-# AC_PATH_MAGIC - find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
-AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])
-
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- re_direlt=['/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])
-
-# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
-[lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-])
-
-# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependant libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.[012])
- lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd* )
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- ia64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
- else
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
- fi
- ;;
-
-newsos6)
- [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-[sysv5uw[78]* | sysv4*uw2*)]
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-])
-
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-convenience to the
-# configure arguments. Note that LIBLTDL and INCLTDL are not
-# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
-# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
-# with '${top_builddir}/' and INCLTDL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!). If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case $enable_ltdl_convenience in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-install to the configure
-# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
-# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
-# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
-# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
-# with '${top_srcdir}/' (note the single quotes!). If your package is
-# not flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-# If this macro is not defined by Autoconf, define it here.
-ifdef([AC_PROVIDE_IFELSE],
- [],
- [define([AC_PROVIDE_IFELSE],
- [ifdef([AC_PROVIDE_$1],
- [$2], [$3])])])
-
-# AC_LIBTOOL_CXX - enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
-
-AC_DEFUN([_AC_LIBTOOL_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
-LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
-lt_save_CC="$CC"
-lt_save_CFLAGS="$CFLAGS"
-dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
-dnl is set to the C++ compiler.
-AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
-CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-# AC_LIBTOOL_GCJ - enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
-
-AC_DEFUN([_AC_LIBTOOL_GCJ],
-[AC_REQUIRE([AC_PROG_LIBTOOL])
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
- [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
- [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
- [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
-lt_save_CC="$CC"
-lt_save_CFLAGS="$CFLAGS"
-dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
-dnl is set to the C++ compiler.
-AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
-CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-dnl old names
-AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)
-])
-
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/configure b/newlib/libc/sys/linux/linuxthreads/machine/configure
deleted file mode 100755
index 0076e3cf3..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/configure
+++ /dev/null
@@ -1,3422 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-shared[=PKGS] build shared libraries [default=yes]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=i386
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../../../.. $srcdir/../../../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../../../.. $srcdir/../../../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:590: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:643: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:700: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:733: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 738 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:766: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 771 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:948: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:969: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:987: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1030: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1043: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1056: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1069: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1082: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1107: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1137: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1186: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1210: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1241: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1273: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1305: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1337: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1382: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1436: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1470: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-if test "${use_libtool}" = "yes"; then
-
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_shared=yes
-fi
-
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
- enableval="$enable_static"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_static=yes
-fi
-
-# Check whether --enable-fast-install or --disable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
- enableval="$enable_fast_install"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_fast_install=yes
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1655: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1685: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1736: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1779 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1810: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1815: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1843: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1886: checking for ld used by GCC" >&5
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1916: checking for GNU ld" >&5
-else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1919: checking for non-GNU ld" >&5
-fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
-echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1954: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi
-fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1971: checking for $LD option to reload object files" >&5
-if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-
-echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-
-echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1983: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi
-fi
-
-NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
-
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:2021: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
-else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:2042: checking how to recognise dependant libraries" >&5
-if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.012)
- lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd* )
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
- fi
- ;;
-
-newsos6)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-sysv5uw[78]* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-
-fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2215: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:2245: checking for ${ac_tool_prefix}file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:2307: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2378: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2410: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2445: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_STRIP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2477: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- STRIP=":"
-fi
-fi
-
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-
-libtool_flags="$libtool_flags --enable-win32-dll"
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
- :
-fi
-
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
-else
- pic_mode=default
-fi
-
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 2544 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2582: checking whether the C compiler needs -belf" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 2595 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_needs_belf=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
-fi
-rm -f conftest*
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-fi
-
-echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2632: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_DLLTOOL"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2664: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- DLLTOOL="false"
-fi
-fi
-
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2699: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AS"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2731: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AS="false"
-fi
-fi
-
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2766: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_OBJDUMP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2798: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- OBJDUMP="false"
-fi
-fi
-
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
-echo "configure:2834: checking if libtool should supply DllMain function" >&5
-if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2839 "configure"
-#include "confdefs.h"
-
-int main() {
-extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:2847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_need_dllmain=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_need_dllmain=yes
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_need_dllmain" 1>&6
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
-echo "configure:2868: checking how to link DLLs" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2873 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_dll_switch=-mdll
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_dll_switch=-dll
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
-
-esac
-
-
-# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
-
-# Reload cache, that may have been modified by ltconfig
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-
-
-
-
-
-
-fi
-
-if test -n "${machine_dir}"; then
- subdirs="${machine_dir}"
-
-fi
-
-
-
-if test x${machine_dir} != x; then
- HAVE_MACHINE_DIR_TRUE=
- HAVE_MACHINE_DIR_FALSE='#'
-else
- HAVE_MACHINE_DIR_TRUE='#'
- HAVE_MACHINE_DIR_FALSE=
-fi
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-s%@LN_S@%$LN_S%g
-s%@STRIP@%$STRIP%g
-s%@DLLTOOL@%$DLLTOOL%g
-s%@OBJDUMP@%$OBJDUMP%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@subdirs@%$subdirs%g
-s%@HAVE_MACHINE_DIR_TRUE@%$HAVE_MACHINE_DIR_TRUE%g
-s%@HAVE_MACHINE_DIR_FALSE@%$HAVE_MACHINE_DIR_FALSE%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-if test "$no_recursion" != yes; then
-
- # Remove --cache-file and --srcdir arguments so they do not pile up.
- ac_sub_configure_args=
- ac_prev=
- for ac_arg in $ac_configure_args; do
- if test -n "$ac_prev"; then
- ac_prev=
- continue
- fi
- case "$ac_arg" in
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- ;;
- *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
- esac
- done
-
- for ac_config_dir in ${machine_dir}; do
-
- # Do not complain, so a configure script can configure whichever
- # parts of a large source tree are present.
- if test ! -d $srcdir/$ac_config_dir; then
- continue
- fi
-
- echo configuring in $ac_config_dir
-
- case "$srcdir" in
- .) ;;
- *)
- if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
- else
- { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
- fi
- ;;
- esac
-
- ac_popdir=`pwd`
- cd $ac_config_dir
-
- # A "../" for each directory in /$ac_config_dir.
- ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
- case "$srcdir" in
- .) # No --srcdir option. We are building in place.
- ac_sub_srcdir=$srcdir ;;
- /*) # Absolute path.
- ac_sub_srcdir=$srcdir/$ac_config_dir ;;
- *) # Relative path.
- ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
- esac
-
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_sub_srcdir/configure; then
- ac_sub_configure=$ac_sub_srcdir/configure
- elif test -f $ac_sub_srcdir/configure.in; then
- ac_sub_configure=$ac_configure
- else
- echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
- ac_sub_configure=
- fi
-
- # The recursion is here.
- if test -n "$ac_sub_configure"; then
-
- # Make the cache file name correct relative to the subdirectory.
- case "$cache_file" in
- /*) ac_sub_cache_file=$cache_file ;;
- *) # Relative path.
- ac_sub_cache_file="$ac_dots$cache_file" ;;
- esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
- # The eval makes quoting arguments work.
- if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
- then :
- else
- { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
- fi
- fi
-
- cd $ac_popdir
- done
-fi
-
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/configure.in b/newlib/libc/sys/linux/linuxthreads/machine/configure.in
deleted file mode 100644
index b2a205ed7..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/configure.in
+++ /dev/null
@@ -1,26 +0,0 @@
-dnl This is the newlib/libc/sys configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(i386)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../../../..)
-
-NEWLIB_CONFIGURE(../../../../..)
-
-dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
-dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
-dnl line of the macro which fail because appropriate LDFLAGS are not set.
-if test "${use_libtool}" = "yes"; then
-AC_LIBTOOL_WIN32_DLL
-AM_PROG_LIBTOOL
-fi
-
-if test -n "${machine_dir}"; then
- AC_CONFIG_SUBDIRS(${machine_dir})
-fi
-
-AM_CONDITIONAL(HAVE_MACHINE_DIR, test x${machine_dir} != x)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/generic/generic-sysdep.h b/newlib/libc/sys/linux/linuxthreads/machine/generic/generic-sysdep.h
deleted file mode 100644
index 27f5b6988..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/generic/generic-sysdep.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Generic asm macros used on many machines.
- Copyright (C) 1991, 92, 93, 96, 98 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <config.h>
-#include <libc-symbols.h>
-
-#ifndef C_LABEL
-
-/* Define a macro we can use to construct the asm name for a C symbol. */
-#ifdef NO_UNDERSCORES
-#ifdef __STDC__
-#define C_LABEL(name) name##:
-#else
-#define C_LABEL(name) name/**/:
-#endif
-#else
-#ifdef __STDC__
-#define C_LABEL(name) _##name##:
-#else
-#define C_LABEL(name) _/**/name/**/:
-#endif
-#endif
-
-#endif
-
-/* Mark the end of function named SYM. This is used on some platforms
- to generate correct debugging information. */
-#ifndef END
-#define END(sym)
-#endif
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.am b/newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.am
deleted file mode 100644
index d7271e5a6..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/../../../include -I$(srcdir)/../.. -I$(srcdir)/../generic -I$(srcdir)/../../.. $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = clone.S i386-sysdep.S pspinlock.c sysdep.S
-
-liblinuxthreadsi386_la_LDFLAGS = -Xcompiler -nostdlib
-
-if USE_LIBTOOL
-noinst_LTLIBRARIES = liblinuxthreadsi386.la
-liblinuxthreadsi386_la_SOURCES = $(LIB_SOURCES)
-noinst_DATA = objectlist.awk.in
-else
-noinst_LIBRARIES = lib.a
-lib_a_SOURCES = $(LIB_SOURCES)
-noinst_DATA =
-endif # USE_LIBTOOL
-
-include $(srcdir)/../../../../../../Makefile.shared
-
-AM_CFLAGS = -D_XOPEN_SOURCE=600 -D_GNU_SOURCE=1
-
-ACLOCAL_AMFLAGS = -I ../../../../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.in b/newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.in
deleted file mode 100644
index 7c7099abd..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.in
+++ /dev/null
@@ -1,411 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-AWK = @AWK@
-CC = @CC@
-CPP = @CPP@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-EXEEXT = @EXEEXT@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/../../../include -I$(srcdir)/../.. -I$(srcdir)/../generic -I$(srcdir)/../../.. $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = clone.S i386-sysdep.S pspinlock.c sysdep.S
-
-liblinuxthreadsi386_la_LDFLAGS = -Xcompiler -nostdlib
-
-@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = liblinuxthreadsi386.la
-@USE_LIBTOOL_TRUE@liblinuxthreadsi386_la_SOURCES = $(LIB_SOURCES)
-@USE_LIBTOOL_TRUE@noinst_DATA = objectlist.awk.in
-@USE_LIBTOOL_FALSE@noinst_DATA =
-@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
-@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
-
-AM_CFLAGS = -D_XOPEN_SOURCE=600 -D_GNU_SOURCE=1
-
-ACLOCAL_AMFLAGS = -I ../../../../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-@USE_LIBTOOL_FALSE@lib_a_OBJECTS = clone.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@i386-sysdep.$(OBJEXT) pspinlock.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@sysdep.$(OBJEXT)
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-
-liblinuxthreadsi386_la_LIBADD =
-@USE_LIBTOOL_TRUE@liblinuxthreadsi386_la_OBJECTS = clone.lo \
-@USE_LIBTOOL_TRUE@i386-sysdep.lo pspinlock.lo sysdep.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DATA = $(noinst_DATA)
-
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES) $(liblinuxthreadsi386_la_SOURCES)
-OBJECTS = $(lib_a_OBJECTS) $(liblinuxthreadsi386_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/../../../../../../Makefile.shared
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../../../../acinclude.m4 \
- ../../../../../../aclocal.m4 \
- ../../../../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-mostlyclean-noinstLTLIBRARIES:
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-liblinuxthreadsi386.la: $(liblinuxthreadsi386_la_OBJECTS) $(liblinuxthreadsi386_la_DEPENDENCIES)
- $(LINK) $(liblinuxthreadsi386_la_LDFLAGS) $(liblinuxthreadsi386_la_OBJECTS) $(liblinuxthreadsi386_la_LIBADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-noinstLTLIBRARIES \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-libtool \
- clean-noinstLTLIBRARIES clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-libtool distclean-noinstLTLIBRARIES \
- distclean-tags distclean-generic clean-am
- -rm -f libtool
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool mostlyclean-noinstLTLIBRARIES \
-distclean-noinstLTLIBRARIES clean-noinstLTLIBRARIES \
-maintainer-clean-noinstLTLIBRARIES tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-objectlist.awk.in: $(noinst_LTLIBRARIES)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
- do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
- done
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/aclocal.m4 b/newlib/libc/sys/linux/linuxthreads/machine/i386/aclocal.m4
deleted file mode 100644
index c0a206827..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/aclocal.m4
+++ /dev/null
@@ -1,1223 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
-
-# serial 46 AC_PROG_LIBTOOL
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
- AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [AC_LIBTOOL_CXX],
- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
- AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [ifdef([AC_PROG_GCJ],
- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([A][M_PROG_GCJ],
- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([LT_AC_PROG_GCJ],
- [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])])])])])
-
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- AC_PATH_MAGIC
- fi
- ;;
-esac
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-AC_ARG_WITH(pic,
- [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
- pic_mode="$withval", pic_mode=default)
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_SAVE
- AC_LANG_C
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_RESTORE])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
- [AC_TRY_LINK([],
- [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);],
- [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
- [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
- ])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_LIBTOOL_PICMODE - implement the --with-pic flag
-# Usage: AC_LIBTOOL_PICMODE[(MODE)]
-# Where MODE is either `yes' or `no'. If omitted, it defaults to
-# `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)])
-
-
-# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="ifelse([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-])
-
-
-# AC_PATH_MAGIC - find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
-AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])
-
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- re_direlt=['/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])
-
-# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
-[lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-])
-
-# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependant libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.[012])
- lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd* )
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- ia64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
- else
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
- fi
- ;;
-
-newsos6)
- [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-[sysv5uw[78]* | sysv4*uw2*)]
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-])
-
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-convenience to the
-# configure arguments. Note that LIBLTDL and INCLTDL are not
-# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
-# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
-# with '${top_builddir}/' and INCLTDL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!). If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case $enable_ltdl_convenience in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-install to the configure
-# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
-# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
-# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
-# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
-# with '${top_srcdir}/' (note the single quotes!). If your package is
-# not flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-# If this macro is not defined by Autoconf, define it here.
-ifdef([AC_PROVIDE_IFELSE],
- [],
- [define([AC_PROVIDE_IFELSE],
- [ifdef([AC_PROVIDE_$1],
- [$2], [$3])])])
-
-# AC_LIBTOOL_CXX - enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
-
-AC_DEFUN([_AC_LIBTOOL_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
-LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
-lt_save_CC="$CC"
-lt_save_CFLAGS="$CFLAGS"
-dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
-dnl is set to the C++ compiler.
-AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
-CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-# AC_LIBTOOL_GCJ - enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
-
-AC_DEFUN([_AC_LIBTOOL_GCJ],
-[AC_REQUIRE([AC_PROG_LIBTOOL])
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
- [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
- [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
- [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
-lt_save_CC="$CC"
-lt_save_CFLAGS="$CFLAGS"
-dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
-dnl is set to the C++ compiler.
-AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
-CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-dnl old names
-AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)
-])
-
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/bp-asm.h b/newlib/libc/sys/linux/linuxthreads/machine/i386/bp-asm.h
deleted file mode 100644
index 34d5227a6..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/bp-asm.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/* Bounded-pointer definitions for x86 assembler.
- Copyright (C) 2000 Free Software Foundation, Inc.
- Contributed by Greg McGary <greg@mcgary.org>
- This file is part of the GNU C Library. Its master source is NOT part of
- the C library, however. The master source lives in the GNU MP Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _bp_asm_h_
-# define _bp_asm_h_ 1
-
-# if __ASSEMBLER__
-
-# if __BOUNDED_POINTERS__
-
-/* Bounded pointers occupy three words. */
-# define PTR_SIZE 12
-/* Bounded pointer return values are passed back through a hidden
- argument that points to caller-allocate space. The hidden arg
- occupies one word on the stack. */
-# define RTN_SIZE 4
-/* Although the caller pushes the hidden arg, the callee is
- responsible for popping it. */
-# define RET_PTR ret $RTN_SIZE
-/* Maintain frame pointer chain in leaf assembler functions for the benefit
- of debugging stack traces when bounds violations occur. */
-# define ENTER pushl %ebp; movl %esp, %ebp
-# define LEAVE movl %ebp, %esp; popl %ebp
-/* Stack space overhead of procedure-call linkage: return address and
- frame pointer. */
-# define LINKAGE 8
-/* Stack offset of return address after calling ENTER. */
-# define PCOFF 4
-
-/* Int 5 is the "bound range" exception also raised by the "bound"
- instruction. */
-# define BOUNDS_VIOLATED int $5
-
-# define CHECK_BOUNDS_LOW(VAL_REG, BP_MEM) \
- cmpl 4+BP_MEM, VAL_REG; \
- jae 0f; /* continue if value >= low */ \
- BOUNDS_VIOLATED; \
- 0:
-
-# define CHECK_BOUNDS_HIGH(VAL_REG, BP_MEM, Jcc) \
- cmpl 8+BP_MEM, VAL_REG; \
- Jcc 0f; /* continue if value < high */ \
- BOUNDS_VIOLATED; \
- 0:
-
-# define CHECK_BOUNDS_BOTH(VAL_REG, BP_MEM) \
- cmpl 4+BP_MEM, VAL_REG; \
- jb 1f; /* die if value < low */ \
- cmpl 8+BP_MEM, VAL_REG; \
- jb 0f; /* continue if value < high */ \
- 1: BOUNDS_VIOLATED; \
- 0:
-
-# define CHECK_BOUNDS_BOTH_WIDE(VAL_REG, BP_MEM, LENGTH) \
- CHECK_BOUNDS_LOW(VAL_REG, BP_MEM); \
- addl LENGTH, VAL_REG; \
- cmpl 8+BP_MEM, VAL_REG; \
- jbe 0f; /* continue if value <= high */ \
- BOUNDS_VIOLATED; \
- 0: subl LENGTH, VAL_REG /* restore value */
-
-/* Take bounds from BP_MEM and affix them to the pointer
- value in %eax, stuffing all into memory at RTN(%esp).
- Use %edx as a scratch register. */
-
-# define RETURN_BOUNDED_POINTER(BP_MEM) \
- movl RTN(%esp), %edx; \
- movl %eax, 0(%edx); \
- movl 4+BP_MEM, %eax; \
- movl %eax, 4(%edx); \
- movl 8+BP_MEM, %eax; \
- movl %eax, 8(%edx)
-
-# define RETURN_NULL_BOUNDED_POINTER \
- movl RTN(%esp), %edx; \
- movl %eax, 0(%edx); \
- movl %eax, 4(%edx); \
- movl %eax, 8(%edx)
-
-/* The caller of __errno_location is responsible for allocating space
- for the three-word BP return-value and passing pushing its address
- as an implicit first argument. */
-# define PUSH_ERRNO_LOCATION_RETURN \
- subl $8, %esp; \
- subl $4, %esp; \
- pushl %esp
-
-/* __errno_location is responsible for popping the implicit first
- argument, but we must pop the space for the BP itself. We also
- dereference the return value in order to dig out the pointer value. */
-# define POP_ERRNO_LOCATION_RETURN \
- popl %eax; \
- addl $8, %esp
-
-# else /* !__BOUNDED_POINTERS__ */
-
-/* Unbounded pointers occupy one word. */
-# define PTR_SIZE 4
-/* Unbounded pointer return values are passed back in the register %eax. */
-# define RTN_SIZE 0
-/* Use simple return instruction for unbounded pointer values. */
-# define RET_PTR ret
-/* Don't maintain frame pointer chain for leaf assembler functions. */
-# define ENTER
-# define LEAVE
-/* Stack space overhead of procedure-call linkage: return address only. */
-# define LINKAGE 4
-/* Stack offset of return address after calling ENTER. */
-# define PCOFF 0
-
-# define CHECK_BOUNDS_LOW(VAL_REG, BP_MEM)
-# define CHECK_BOUNDS_HIGH(VAL_REG, BP_MEM, Jcc)
-# define CHECK_BOUNDS_BOTH(VAL_REG, BP_MEM)
-# define CHECK_BOUNDS_BOTH_WIDE(VAL_REG, BP_MEM, LENGTH)
-# define RETURN_BOUNDED_POINTER(BP_MEM)
-
-# define RETURN_NULL_BOUNDED_POINTER
-
-# define PUSH_ERRNO_LOCATION_RETURN
-# define POP_ERRNO_LOCATION_RETURN
-
-# endif /* !__BOUNDED_POINTERS__ */
-
-# endif /* __ASSEMBLER__ */
-
-#endif /* _bp_asm_h_ */
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/clone.S b/newlib/libc/sys/linux/linuxthreads/machine/i386/clone.S
deleted file mode 100644
index dd00c2fb5..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/clone.S
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson (rth@tamu.edu)
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* clone() is even more special than fork() as it mucks with stacks
- and invokes a function in the right context after its all over. */
-
-#include <sysdep.h>
-#define _ERRNO_H 1
-#include <bits/errno.h>
-#include <asm/unistd.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
-
-/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
-
-#define PARMS LINKAGE /* no space for saved regs */
-#define FUNC PARMS
-#define STACK FUNC+4
-#define FLAGS STACK+PTR_SIZE
-#define ARG FLAGS+4
-
- .text
-ENTRY (BP_SYM (__clone))
- /* Sanity check arguments. */
- movl $-EINVAL,%eax
- movl FUNC(%esp),%ecx /* no NULL function pointers */
-#ifdef PIC
- jecxz SYSCALL_ERROR_LABEL
-#else
- testl %ecx,%ecx
- jz SYSCALL_ERROR_LABEL
-#endif
- movl STACK(%esp),%ecx /* no NULL stack pointers */
-#ifdef PIC
- jecxz SYSCALL_ERROR_LABEL
-#else
- testl %ecx,%ecx
- jz SYSCALL_ERROR_LABEL
-#endif
-
- /* Insert the argument onto the new stack. */
- subl $8,%ecx
- movl ARG(%esp),%eax /* no negative argument counts */
- movl %eax,4(%ecx)
-
- /* Save the function pointer as the zeroth argument.
- It will be popped off in the child in the ebx frobbing below. */
- movl FUNC(%esp),%eax
- movl %eax,0(%ecx)
-
- /* Do the system call */
- pushl %ebx
- movl FLAGS+4(%esp),%ebx
- movl $SYS_ify(clone),%eax
- int $0x80
- popl %ebx
-
- test %eax,%eax
- jl SYSCALL_ERROR_LABEL
- jz thread_start
-
-L(pseudo_end):
- ret
-
-thread_start:
- subl %ebp,%ebp /* terminate the stack frame */
- call *%ebx
-#ifdef PIC
- call L(here)
-L(here):
- popl %ebx
- addl $_GLOBAL_OFFSET_TABLE_+[.-L(here)], %ebx
-#endif
- pushl %eax
- call JUMPTARGET (_exit)
-
-PSEUDO_END (BP_SYM (__clone))
-
-weak_alias (BP_SYM (__clone), BP_SYM (clone))
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/configure b/newlib/libc/sys/linux/linuxthreads/machine/i386/configure
deleted file mode 100755
index 4a9c4be10..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/configure
+++ /dev/null
@@ -1,3343 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-shared[=PKGS] build shared libraries [default=yes]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=pspinlock.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../../../../.. $srcdir/../../../../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../../../../.. $srcdir/../../../../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:590: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:643: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:700: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:733: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 738 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:766: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 771 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../../../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../../../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:948: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:969: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:987: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1030: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1043: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1056: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1069: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1082: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1107: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1137: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1186: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1210: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1241: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1273: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1305: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1337: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1382: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1436: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1470: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-
-if test "${use_libtool}" = "yes"; then
-
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_shared=yes
-fi
-
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
- enableval="$enable_static"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_static=yes
-fi
-
-# Check whether --enable-fast-install or --disable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
- enableval="$enable_fast_install"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_fast_install=yes
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1656: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1686: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1737: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1769: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1780 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1811: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1816: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1844: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1887: checking for ld used by GCC" >&5
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1917: checking for GNU ld" >&5
-else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1920: checking for non-GNU ld" >&5
-fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
-echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1955: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi
-fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1972: checking for $LD option to reload object files" >&5
-if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-
-echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-
-echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1984: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi
-fi
-
-NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
-
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:2022: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
-else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:2043: checking how to recognise dependant libraries" >&5
-if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.012)
- lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd* )
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
- fi
- ;;
-
-newsos6)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-sysv5uw[78]* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-
-fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2216: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:2246: checking for ${ac_tool_prefix}file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:2308: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2379: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2411: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2446: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_STRIP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2478: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- STRIP=":"
-fi
-fi
-
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-
-libtool_flags="$libtool_flags --enable-win32-dll"
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
- :
-fi
-
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
-else
- pic_mode=default
-fi
-
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 2545 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2583: checking whether the C compiler needs -belf" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 2596 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_needs_belf=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
-fi
-rm -f conftest*
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-fi
-
-echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2633: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_DLLTOOL"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2665: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- DLLTOOL="false"
-fi
-fi
-
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2700: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AS"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2732: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AS="false"
-fi
-fi
-
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2767: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_OBJDUMP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2799: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- OBJDUMP="false"
-fi
-fi
-
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
-echo "configure:2835: checking if libtool should supply DllMain function" >&5
-if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2840 "configure"
-#include "confdefs.h"
-
-int main() {
-extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:2848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_need_dllmain=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_need_dllmain=yes
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_need_dllmain" 1>&6
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
-echo "configure:2869: checking how to link DLLs" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2874 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_dll_switch=-mdll
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_dll_switch=-dll
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
-
-esac
-
-
-# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
-
-# Reload cache, that may have been modified by ltconfig
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-
-
-
-
-
-
-for ac_prog in mawk gawk nawk awk
-do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2995: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AWK="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AWK="$ac_cv_prog_AWK"
-if test -n "$AWK"; then
- echo "$ac_t""$AWK" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-test -n "$AWK" && break
-done
-
-fi
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-s%@LN_S@%$LN_S%g
-s%@STRIP@%$STRIP%g
-s%@DLLTOOL@%$DLLTOOL%g
-s%@OBJDUMP@%$OBJDUMP%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@AWK@%$AWK%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/configure.in b/newlib/libc/sys/linux/linuxthreads/machine/i386/configure.in
deleted file mode 100644
index bdf1a587f..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/configure.in
+++ /dev/null
@@ -1,22 +0,0 @@
-dnl This is the newlib/libc/sys/linux/linuxthreads/machine/i386 configure file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(pspinlock.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../../../../..)
-
-NEWLIB_CONFIGURE(../../../../../..)
-
-dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
-dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
-dnl line of the macro which fail because appropriate LDFLAGS are not set.
-
-if test "${use_libtool}" = "yes"; then
-AC_LIBTOOL_WIN32_DLL
-AM_PROG_LIBTOOL
-AC_PROG_AWK
-fi
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.S b/newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.S
deleted file mode 100644
index aec21c0f5..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.S
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 2000 Free Software Foundation, Inc.
- This file has been modified from the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sysdep.h>
-#define _ERRNO_H
-#include <bits/errno.h>
-#include <bp-asm.h>
-#include <bp-sym.h>
-
-.globl __syscall_error
-
-__syscall_error:
-#if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
- /* We translate the system's EWOULDBLOCK error into EAGAIN.
- The GNU C library always defines EWOULDBLOCK==EAGAIN.
- EWOULDBLOCK_sys is the original number. */
- cmpl $EWOULDBLOCK_sys, %eax /* Is it the old EWOULDBLOCK? */
- jne notb /* Branch if not. */
- movl $EAGAIN, %eax /* Yes; translate it to EAGAIN. */
-notb:
-#endif
-#ifndef PIC
- pushl %eax
- PUSH_ERRNO_LOCATION_RETURN
- call BP_SYM (__errno)
- POP_ERRNO_LOCATION_RETURN
- popl %ecx
- movl %ecx, (%eax)
-#else
- /* The caller has pushed %ebx and then set it up to
- point to the GOT before calling us through the PLT. */
- pushl %eax
- PUSH_ERRNO_LOCATION_RETURN
- call C_SYMBOL_NAME (BP_SYM (__errno)@PLT)
- POP_ERRNO_LOCATION_RETURN
- popl %ecx
- /* Pop %ebx value saved before jumping here. */
- popl %ebx
- movl %ecx, (%eax)
-#endif
- movl $-1, %eax
- ret
-
-#undef __syscall_error
-END (__syscall_error)
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.h b/newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.h
deleted file mode 100644
index 02b4c19af..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* Assembler macros for i386.
- Copyright (C) 1991, 92, 93, 95, 96, 98 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#define NO_UNDERSCORES
-
-#include <generic-sysdep.h>
-
-#ifdef __ASSEMBLER__
-
-/* Syntactic details of assembler. */
-
-#ifdef HAVE_ELF
-
-/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
-#define ALIGNARG(log2) 1<<log2
-/* For ELF we need the `.type' directive to make shared libs work right. */
-#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
-#define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
-
-/* In ELF C symbols are asm symbols. */
-#undef NO_UNDERSCORES
-#define NO_UNDERSCORES
-
-#else
-
-#define ALIGNARG(log2) log2
-#define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
-#define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */
-
-#endif
-
-
-/* Define an entry point visible from C.
-
- There is currently a bug in gdb which prevents us from specifying
- incomplete stabs information. Fake some entries here which specify
- the current source file. */
-#define ENTRY(name) \
- STABS_CURRENT_FILE1("") \
- STABS_CURRENT_FILE(name) \
- ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
- .align ALIGNARG(4); \
- STABS_FUN(name) \
- C_LABEL(name) \
- CALL_MCOUNT
-
-#undef END
-#define END(name) \
- ASM_SIZE_DIRECTIVE(name) \
- STABS_FUN_END(name)
-
-/* Remove the following two lines once the gdb bug is fixed. */
-#define STABS_CURRENT_FILE(name) \
- STABS_CURRENT_FILE1 (#name)
-#define STABS_CURRENT_FILE1(name) \
- 1: .stabs name,100,0,0,1b;
-/* Emit stabs definition lines. We use F(0,1) and define t(0,1) as `int',
- the same way gcc does it. */
-#define STABS_FUN(name) STABS_FUN2(name, name##:F(0,1))
-#define STABS_FUN2(name, namestr) \
- .stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0; \
- .stabs #namestr,36,0,0,name;
-#define STABS_FUN_END(name) \
- 1: .stabs "",36,0,0,1b-name;
-
-/* If compiled for profiling, call `mcount' at the start of each function. */
-#ifdef PROF
-/* The mcount code relies on a normal frame pointer being on the stack
- to locate our caller, so push one just for its benefit. */
-#define CALL_MCOUNT \
- pushl %ebp; movl %esp, %ebp; call JUMPTARGET(mcount); popl %ebp;
-#else
-#define CALL_MCOUNT /* Do nothing. */
-#endif
-
-#ifdef NO_UNDERSCORES
-/* Since C identifiers are not normally prefixed with an underscore
- on this system, the asm identifier `syscall_error' intrudes on the
- C name space. Make sure we use an innocuous name. */
-#define syscall_error __syscall_error
-#define mcount _mcount
-#endif
-
-#define PSEUDO(name, syscall_name, args) \
-lose: SYSCALL_PIC_SETUP \
- jmp JUMPTARGET(syscall_error) \
- .globl syscall_error; \
- ENTRY (name) \
- DO_CALL (syscall_name, args); \
- jb lose
-
-#undef PSEUDO_END
-#define PSEUDO_END(name) \
- END (name)
-
-#ifdef PIC
-#define JUMPTARGET(name) name##@PLT
-#define SYSCALL_PIC_SETUP \
- pushl %ebx; \
- call 0f; \
-0: popl %ebx; \
- addl $_GLOBAL_OFFSET_TABLE+[.-0b], %ebx;
-#else
-#define JUMPTARGET(name) name
-#define SYSCALL_PIC_SETUP /* Nothing. */
-#endif
-
-/* Local label name for asm code. */
-#ifndef L
-#define L(name) name
-#endif
-
-#endif /* __ASSEMBLER__ */
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/pspinlock.c b/newlib/libc/sys/linux/linuxthreads/machine/i386/pspinlock.c
deleted file mode 100644
index 5d242388a..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/pspinlock.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/* POSIX spinlock implementation. x86 version.
- Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <pthread.h>
-#include "internals.h"
-
-/* This implementation is similar to the one used in the Linux kernel.
- But the kernel is byte instructions for the memory access. This is
- faster but unusable here. The problem is that only 128
- threads/processes could use the spinlock at the same time. If (by
- a design error in the program) a thread/process would hold the
- spinlock for a time long enough to accumulate 128 waiting
- processes, the next one will find a positive value in the spinlock
- and assume it is unlocked. We cannot accept that. */
-
-int
-__pthread_spin_lock (pthread_spinlock_t *lock)
-{
- asm volatile
- ("\n"
- "1:\n\t"
- "lock; decl %0\n\t"
- "js 2f\n\t"
- ".section .text.spinlock,\"ax\"\n"
- "2:\n\t"
- "cmpl $0,%0\n\t"
- "rep; nop\n\t"
- "jle 2b\n\t"
- "jmp 1b\n\t"
- ".previous"
- : "=m" (*lock));
- return 0;
-}
-weak_alias (__pthread_spin_lock, pthread_spin_lock)
-
-
-int
-__pthread_spin_trylock (pthread_spinlock_t *lock)
-{
- int oldval;
-
- asm volatile
- ("xchgl %0,%1"
- : "=r" (oldval), "=m" (*lock)
- : "0" (0));
- return oldval > 0 ? 0 : EBUSY;
-}
-weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
-
-
-int
-__pthread_spin_unlock (pthread_spinlock_t *lock)
-{
- asm volatile
- ("movl $1,%0"
- : "=m" (*lock));
- return 0;
-}
-weak_alias (__pthread_spin_unlock, pthread_spin_unlock)
-
-
-int
-__pthread_spin_init (pthread_spinlock_t *lock, int pshared)
-{
- /* We can ignore the `pshared' parameter. Since we are busy-waiting
- all processes which can access the memory location `lock' points
- to can use the spinlock. */
- *lock = 1;
- return 0;
-}
-weak_alias (__pthread_spin_init, pthread_spin_init)
-
-
-int
-__pthread_spin_destroy (pthread_spinlock_t *lock)
-{
- /* Nothing to do. */
- return 0;
-}
-weak_alias (__pthread_spin_destroy, pthread_spin_destroy)
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/pt-machine.h b/newlib/libc/sys/linux/linuxthreads/machine/i386/pt-machine.h
deleted file mode 100644
index 3346bcc34..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/pt-machine.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* Machine-dependent pthreads configuration and inline functions.
- i386 version.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson <rth@tamu.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#ifndef PT_EI
-# define PT_EI extern inline
-#endif
-
-/* Get some notion of the current stack. Need not be exactly the top
- of the stack, just something somewhere in the current frame. */
-#define CURRENT_STACK_FRAME __builtin_frame_address (0)
-
-
-/* Spinlock implementation; required. */
-PT_EI long int
-testandset (int *spinlock)
-{
- long int ret;
-
- __asm__ __volatile__(
- "xchgl %0, %1"
- : "=r"(ret), "=m"(*spinlock)
- : "0"(1), "m"(*spinlock)
- : "memory");
-
- return ret;
-}
-
-
-/* Compare-and-swap for semaphores.
- Available on the 486 and above, but not on the 386.
- We test dynamically whether it's available or not. */
-
-#define HAS_COMPARE_AND_SWAP
-#define TEST_FOR_COMPARE_AND_SWAP
-
-PT_EI int
-__compare_and_swap (long int *p, long int oldval, long int newval)
-{
- char ret;
- long int readval;
-
- __asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0"
- : "=q" (ret), "=m" (*p), "=a" (readval)
- : "r" (newval), "m" (*p), "a" (oldval)
- : "memory");
- return ret;
-}
-
-
-PT_EI int
-get_eflags (void)
-{
- int res;
- __asm__ __volatile__ ("pushfl; popl %0" : "=r" (res) : );
- return res;
-}
-
-
-PT_EI void
-set_eflags (int newflags)
-{
- __asm__ __volatile__ ("pushl %0; popfl" : : "r" (newflags) : "cc");
-}
-
-
-PT_EI int
-compare_and_swap_is_available (void)
-{
- int oldflags = get_eflags ();
- int changed;
- /* Flip AC bit in EFLAGS. */
- set_eflags (oldflags ^ 0x40000);
- /* See if bit changed. */
- changed = (get_eflags () ^ oldflags) & 0x40000;
- /* Restore EFLAGS. */
- set_eflags (oldflags);
- /* If the AC flag did not change, it's a 386 and it lacks cmpxchg.
- Otherwise, it's a 486 or above and it has cmpxchg. */
- return changed != 0;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/sigcontextinfo.h b/newlib/libc/sys/linux/linuxthreads/machine/i386/sigcontextinfo.h
deleted file mode 100644
index 6530ba6f3..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/sigcontextinfo.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#define SIGCONTEXT struct sigcontext
-#define SIGCONTEXT_EXTRA_ARGS
-#define GET_PC(ctx) ((void *) ctx.eip)
-#define GET_FRAME(ctx) ((void *) ctx.ebp)
-#define GET_STACK(ctx) ((void *) ctx.esp_at_signal)
-#define CALL_SIGHANDLER(handler, signo, ctx) \
-do { \
- int __tmp1, __tmp2, __tmp3, __tmp4; \
- __asm __volatile ("movl\t%%esp, %%edi\n\t" \
- "andl\t$-16, %%esp\n\t" \
- "subl\t%8, %%esp\n\t" \
- "movl\t%%edi, %c8-4(%%esp)\n\t" \
- "movl\t%1, 0(%%esp)\n\t" \
- "leal\t4(%%esp), %%edi\n\t" \
- "cld\n\t" \
- "rep\tmovsl\n\t" \
- "call\t*%0\n\t" \
- "cld\n\t" \
- "movl\t%9, %%ecx\n\t" \
- "subl\t%%edi, %%esi\n\t" \
- "leal\t4(%%esp,%%esi,1), %%edi\n\t" \
- "leal\t4(%%esp), %%esi\n\t" \
- "rep\tmovsl\n\t" \
- "movl\t%c8-4(%%esp), %%esp\n\t" \
- : "=a" (__tmp1), "=d" (__tmp2), "=S" (__tmp3), \
- "=c" (__tmp4) \
- : "0" (handler), "1" (signo), "2" (&ctx), \
- "3" (sizeof (struct sigcontext) / 4), \
- "n" ((sizeof (struct sigcontext) + 19) & ~15), \
- "i" (sizeof (struct sigcontext) / 4) \
- : "cc", "edi"); \
-} while (0)
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/stackinfo.h b/newlib/libc/sys/linux/linuxthreads/machine/i386/stackinfo.h
deleted file mode 100644
index a9a6745aa..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/stackinfo.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* This file contains a bit of information about the stack allocation
- of the processor. */
-
-#ifndef _STACKINFO_H
-#define _STACKINFO_H 1
-
-/* On x86 the stack grows down. */
-#define _STACK_GROWS_DOWN 1
-
-#endif /* stackinfo.h */
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.S b/newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.S
deleted file mode 100644
index f219805a8..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.S
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sysdep.h>
-
-/* The following code is only used in the shared library when we
- compile the reentrant version. Otherwise each system call defines
- each own version. */
-
-#ifndef PIC
-
-/* The syscall stubs jump here when they detect an error.
- The code for Linux is almost identical to the canonical Unix/i386
- code, except that the error number in %eax is negated. */
-
-#undef CALL_MCOUNT
-#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %eax. */
-
- .text
-ENTRY (__syscall_error)
- negl %eax
-
-#define __syscall_error __syscall_error_1
-#include <i386-sysdep.S>
-
-#endif /* !PIC */
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.h b/newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.h
deleted file mode 100644
index 48aeab195..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.h
+++ /dev/null
@@ -1,291 +0,0 @@
-/* Copyright (C) 1992, 93, 95, 96, 97, 98, 99, 00 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper, <drepper@gnu.org>, August 1995.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _LINUX_I386_SYSDEP_H
-#define _LINUX_I386_SYSDEP_H 1
-
-#include "i386-sysdep.h"
-
-/* For Linux we can use the system call table in the header file
- /usr/include/asm/unistd.h
- of the kernel. But these symbols do not follow the SYS_* syntax
- so we have to redefine the `SYS_ify' macro here. */
-#undef SYS_ify
-#define SYS_ify(syscall_name) __NR_##syscall_name
-
-/* ELF-like local names start with `.L'. */
-#undef L
-#define L(name) .L##name
-
-#ifdef __ASSEMBLER__
-
-/* Linux uses a negative return value to indicate syscall errors,
- unlike most Unices, which use the condition codes' carry flag.
-
- Since version 2.1 the return value of a system call might be
- negative even if the call succeeded. E.g., the `lseek' system call
- might return a large offset. Therefore we must not anymore test
- for < 0, but test for a real error by making sure the value in %eax
- is a real error number. Linus said he will make sure the no syscall
- returns a value in -1 .. -4095 as a valid result so we can savely
- test with -4095. */
-
-/* We don't want the label for the error handle to be global when we define
- it here. */
-#ifdef PIC
-# define SYSCALL_ERROR_LABEL 0f
-#else
-# define SYSCALL_ERROR_LABEL syscall_error
-#endif
-
-#undef PSEUDO
-#define PSEUDO(name, syscall_name, args) \
- .text; \
- ENTRY (name) \
- DO_CALL (args, syscall_name); \
- cmpl $-4095, %eax; \
- jae SYSCALL_ERROR_LABEL; \
- L(pseudo_end):
-
-#undef PSEUDO_END
-#define PSEUDO_END(name) \
- SYSCALL_ERROR_HANDLER \
- END (name)
-
-#ifndef PIC
-#define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
-#else
-/* Store (- %eax) into errno through the GOT. */
-#ifdef _LIBC_REENTRANT
-#define SYSCALL_ERROR_HANDLER \
-0:pushl %ebx; \
- call 1f; \
-1:popl %ebx; \
- xorl %edx, %edx; \
- addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx; \
- subl %eax, %edx; \
- pushl %edx; \
- PUSH_ERRNO_LOCATION_RETURN; \
- call BP_SYM (__errno_location)@PLT; \
- POP_ERRNO_LOCATION_RETURN; \
- popl %ecx; \
- popl %ebx; \
- movl %ecx, (%eax); \
- orl $-1, %eax; \
- jmp L(pseudo_end);
-/* A quick note: it is assumed that the call to `__errno_location' does
- not modify the stack! */
-#else
-#define SYSCALL_ERROR_HANDLER \
-0:call 1f; \
-1:popl %ecx; \
- xorl %edx, %edx; \
- addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx; \
- subl %eax, %edx; \
- movl errno@GOT(%ecx), %ecx; \
- movl %edx, (%ecx); \
- orl $-1, %eax; \
- jmp L(pseudo_end);
-#endif /* _LIBC_REENTRANT */
-#endif /* PIC */
-
-/* Linux takes system call arguments in registers:
-
- syscall number %eax call-clobbered
- arg 1 %ebx call-saved
- arg 2 %ecx call-clobbered
- arg 3 %edx call-clobbered
- arg 4 %esi call-saved
- arg 5 %edi call-saved
-
- The stack layout upon entering the function is:
-
- 20(%esp) Arg# 5
- 16(%esp) Arg# 4
- 12(%esp) Arg# 3
- 8(%esp) Arg# 2
- 4(%esp) Arg# 1
- (%esp) Return address
-
- (Of course a function with say 3 arguments does not have entries for
- arguments 4 and 5.)
-
- The following code tries hard to be optimal. A general assumption
- (which is true according to the data books I have) is that
-
- 2 * xchg is more expensive than pushl + movl + popl
-
- Beside this a neat trick is used. The calling conventions for Linux
- tell that among the registers used for parameters %ecx and %edx need
- not be saved. Beside this we may clobber this registers even when
- they are not used for parameter passing.
-
- As a result one can see below that we save the content of the %ebx
- register in the %edx register when we have less than 3 arguments
- (2 * movl is less expensive than pushl + popl).
-
- Second unlike for the other registers we don't save the content of
- %ecx and %edx when we have more than 1 and 2 registers resp.
-
- The code below might look a bit long but we have to take care for
- the pipelined processors (i586). Here the `pushl' and `popl'
- instructions are marked as NP (not pairable) but the exception is
- two consecutive of these instruction. This gives no penalty on
- other processors though. */
-
-#undef DO_CALL
-#define DO_CALL(args, syscall_name) \
- PUSHARGS_##args \
- DOARGS_##args \
- movl $SYS_ify (syscall_name), %eax; \
- int $0x80 \
- POPARGS_##args
-
-#define PUSHARGS_0 /* No arguments to push. */
-#define DOARGS_0 /* No arguments to frob. */
-#define POPARGS_0 /* No arguments to pop. */
-#define _PUSHARGS_0 /* No arguments to push. */
-#define _DOARGS_0(n) /* No arguments to frob. */
-#define _POPARGS_0 /* No arguments to pop. */
-
-#define PUSHARGS_1 movl %ebx, %edx; PUSHARGS_0
-#define DOARGS_1 _DOARGS_1 (4)
-#define POPARGS_1 POPARGS_0; movl %edx, %ebx
-#define _PUSHARGS_1 pushl %ebx; _PUSHARGS_0
-#define _DOARGS_1(n) movl n(%esp), %ebx; _DOARGS_0(n-4)
-#define _POPARGS_1 _POPARGS_0; popl %ebx
-
-#define PUSHARGS_2 PUSHARGS_1
-#define DOARGS_2 _DOARGS_2 (8)
-#define POPARGS_2 POPARGS_1
-#define _PUSHARGS_2 _PUSHARGS_1
-#define _DOARGS_2(n) movl n(%esp), %ecx; _DOARGS_1 (n-4)
-#define _POPARGS_2 _POPARGS_1
-
-#define PUSHARGS_3 _PUSHARGS_2
-#define DOARGS_3 _DOARGS_3 (16)
-#define POPARGS_3 _POPARGS_3
-#define _PUSHARGS_3 _PUSHARGS_2
-#define _DOARGS_3(n) movl n(%esp), %edx; _DOARGS_2 (n-4)
-#define _POPARGS_3 _POPARGS_2
-
-#define PUSHARGS_4 _PUSHARGS_4
-#define DOARGS_4 _DOARGS_4 (24)
-#define POPARGS_4 _POPARGS_4
-#define _PUSHARGS_4 pushl %esi; _PUSHARGS_3
-#define _DOARGS_4(n) movl n(%esp), %esi; _DOARGS_3 (n-4)
-#define _POPARGS_4 _POPARGS_3; popl %esi
-
-#define PUSHARGS_5 _PUSHARGS_5
-#define DOARGS_5 _DOARGS_5 (32)
-#define POPARGS_5 _POPARGS_5
-#define _PUSHARGS_5 pushl %edi; _PUSHARGS_4
-#define _DOARGS_5(n) movl n(%esp), %edi; _DOARGS_4 (n-4)
-#define _POPARGS_5 _POPARGS_4; popl %edi
-
-#else /* !__ASSEMBLER__ */
-
-/* We need some help from the assembler to generate optimal code. We
- define some macros here which later will be used. */
-asm (".L__X'%ebx = 1\n\t"
- ".L__X'%ecx = 2\n\t"
- ".L__X'%edx = 2\n\t"
- ".L__X'%eax = 3\n\t"
- ".L__X'%esi = 3\n\t"
- ".L__X'%edi = 3\n\t"
- ".L__X'%ebp = 3\n\t"
- ".L__X'%esp = 3\n\t"
- ".macro bpushl name reg\n\t"
- ".if 1 - \\name\n\t"
- ".if 2 - \\name\n\t"
- "pushl %ebx\n\t"
- ".else\n\t"
- "xchgl \\reg, %ebx\n\t"
- ".endif\n\t"
- ".endif\n\t"
- ".endm\n\t"
- ".macro bpopl name reg\n\t"
- ".if 1 - \\name\n\t"
- ".if 2 - \\name\n\t"
- "popl %ebx\n\t"
- ".else\n\t"
- "xchgl \\reg, %ebx\n\t"
- ".endif\n\t"
- ".endif\n\t"
- ".endm\n\t"
- ".macro bmovl name reg\n\t"
- ".if 1 - \\name\n\t"
- ".if 2 - \\name\n\t"
- "movl \\reg, %ebx\n\t"
- ".endif\n\t"
- ".endif\n\t"
- ".endm\n\t");
-
-/* Define a macro which expands inline into the wrapper code for a system
- call. */
-#undef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) \
- ({ \
- unsigned int resultvar; \
- asm volatile ( \
- LOADARGS_##nr \
- "movl %1, %%eax\n\t" \
- "int $0x80\n\t" \
- RESTOREARGS_##nr \
- : "=a" (resultvar) \
- : "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc"); \
- if (resultvar >= 0xfffff001) \
- { \
- __set_errno (-resultvar); \
- resultvar = 0xffffffff; \
- } \
- (int) resultvar; })
-
-#define LOADARGS_0
-#define LOADARGS_1 \
- "bpushl .L__X'%k2, %k2\n\t" \
- "bmovl .L__X'%k2, %k2\n\t"
-#define LOADARGS_2 LOADARGS_1
-#define LOADARGS_3 LOADARGS_1
-#define LOADARGS_4 LOADARGS_1
-#define LOADARGS_5 LOADARGS_1
-
-#define RESTOREARGS_0
-#define RESTOREARGS_1 \
- "bpopl .L__X'%k2, %k2\n\t"
-#define RESTOREARGS_2 RESTOREARGS_1
-#define RESTOREARGS_3 RESTOREARGS_1
-#define RESTOREARGS_4 RESTOREARGS_1
-#define RESTOREARGS_5 RESTOREARGS_1
-
-#define ASMFMT_0()
-#define ASMFMT_1(arg1) \
- , "acdSD" (arg1)
-#define ASMFMT_2(arg1, arg2) \
- , "adCD" (arg1), "c" (arg2)
-#define ASMFMT_3(arg1, arg2, arg3) \
- , "aCD" (arg1), "c" (arg2), "d" (arg3)
-#define ASMFMT_4(arg1, arg2, arg3, arg4) \
- , "aD" (arg1), "c" (arg2), "d" (arg3), "S" (arg4)
-#define ASMFMT_5(arg1, arg2, arg3, arg4, arg5) \
- , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5)
-
-#endif /* __ASSEMBLER__ */
-
-#endif /* linux/i386/sysdep.h */
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/useldt.h b/newlib/libc/sys/linux/linuxthreads/machine/i386/useldt.h
deleted file mode 100644
index 02d079c9e..000000000
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/useldt.h
+++ /dev/null
@@ -1,205 +0,0 @@
-/* Special definitions for ix86 machine using segment register based
- thread descriptor.
- Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <stddef.h> /* For offsetof. */
-#include <stdlib.h> /* For abort(). */
-
-
-/* We don't want to include the kernel header. So duplicate the
- information. */
-
-/* Structure passed on `modify_ldt' call. */
-struct modify_ldt_ldt_s
-{
- unsigned int entry_number;
- unsigned long int base_addr;
- unsigned int limit;
- unsigned int seg_32bit:1;
- unsigned int contents:2;
- unsigned int read_exec_only:1;
- unsigned int limit_in_pages:1;
- unsigned int seg_not_present:1;
- unsigned int useable:1;
- unsigned int empty:25;
-};
-
-/* System call to set LDT entry. */
-extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
-
-
-/* Return the thread descriptor for the current thread.
-
- The contained asm must *not* be marked volatile since otherwise
- assignments like
- pthread_descr self = thread_self();
- do not get optimized away. */
-#define THREAD_SELF \
-({ \
- register pthread_descr __self; \
- __asm__ ("movl %%gs:%c1,%0" : "=r" (__self) \
- : "i" (offsetof (struct _pthread_descr_struct, \
- p_header.data.self))); \
- __self; \
-})
-
-/* Initialize the thread-unique value. */
-#define INIT_THREAD_SELF(descr, nr) \
-{ \
- struct modify_ldt_ldt_s ldt_entry = \
- { nr, (unsigned long int) descr, sizeof (*descr), 1, 0, 0, 0, 0, 1, 0 }; \
- if (__modify_ldt (1, &ldt_entry, sizeof (ldt_entry)) != 0) \
- abort (); \
- __asm__ __volatile__ ("movw %w0, %%gs" : : "q" (nr * 8 + 7)); \
-}
-
-/* Free resources associated with thread descriptor. */
-#define FREE_THREAD(descr, nr) \
-{ \
- struct modify_ldt_ldt_s ldt_entry = \
- { nr, 0, 0, 0, 0, 1, 0, 1, 0, 0 }; \
- __modify_ldt (1, &ldt_entry, sizeof (ldt_entry)); \
-}
-
-/* Read member of the thread descriptor directly. */
-#define THREAD_GETMEM(descr, member) \
-({ \
- __typeof__ (descr->member) __value; \
- if (sizeof (__value) == 1) \
- __asm__ __volatile__ ("movb %%gs:%P2,%b0" \
- : "=q" (__value) \
- : "0" (0), \
- "i" (offsetof (struct _pthread_descr_struct, \
- member))); \
- else if (sizeof (__value) == 4) \
- __asm__ __volatile__ ("movl %%gs:%P1,%0" \
- : "=r" (__value) \
- : "i" (offsetof (struct _pthread_descr_struct, \
- member))); \
- else \
- { \
- if (sizeof (__value) != 8) \
- /* There should not be any value with a size other than 1, 4 or 8. */\
- abort (); \
- \
- __asm__ __volatile__ ("movl %%gs:%P1,%%eax\n\t" \
- "movl %%gs:%P2,%%edx" \
- : "=A" (__value) \
- : "i" (offsetof (struct _pthread_descr_struct, \
- member)), \
- "i" (offsetof (struct _pthread_descr_struct, \
- member) + 4)); \
- } \
- __value; \
-})
-
-/* Same as THREAD_GETMEM, but the member offset can be non-constant. */
-#define THREAD_GETMEM_NC(descr, member) \
-({ \
- __typeof__ (descr->member) __value; \
- if (sizeof (__value) == 1) \
- __asm__ __volatile__ ("movb %%gs:(%2),%b0" \
- : "=q" (__value) \
- : "0" (0), \
- "r" (offsetof (struct _pthread_descr_struct, \
- member))); \
- else if (sizeof (__value) == 4) \
- __asm__ __volatile__ ("movl %%gs:(%1),%0" \
- : "=r" (__value) \
- : "r" (offsetof (struct _pthread_descr_struct, \
- member))); \
- else \
- { \
- if (sizeof (__value) != 8) \
- /* There should not be any value with a size other than 1, 4 or 8. */\
- abort (); \
- \
- __asm__ __volatile__ ("movl %%gs:(%1),%%eax\n\t" \
- "movl %%gs:4(%1),%%edx" \
- : "=&A" (__value) \
- : "r" (offsetof (struct _pthread_descr_struct, \
- member))); \
- } \
- __value; \
-})
-
-/* Same as THREAD_SETMEM, but the member offset can be non-constant. */
-#define THREAD_SETMEM(descr, member, value) \
-({ \
- __typeof__ (descr->member) __value = (value); \
- if (sizeof (__value) == 1) \
- __asm__ __volatile__ ("movb %0,%%gs:%P1" : \
- : "q" (__value), \
- "i" (offsetof (struct _pthread_descr_struct, \
- member))); \
- else if (sizeof (__value) == 4) \
- __asm__ __volatile__ ("movl %0,%%gs:%P1" : \
- : "r" (__value), \
- "i" (offsetof (struct _pthread_descr_struct, \
- member))); \
- else \
- { \
- if (sizeof (__value) != 8) \
- /* There should not be any value with a size other than 1, 4 or 8. */\
- abort (); \
- \
- __asm__ __volatile__ ("movl %%eax,%%gs:%P1\n\n" \
- "movl %%edx,%%gs:%P2" : \
- : "A" (__value), \
- "i" (offsetof (struct _pthread_descr_struct, \
- member)), \
- "i" (offsetof (struct _pthread_descr_struct, \
- member) + 4)); \
- } \
-})
-
-/* Set member of the thread descriptor directly. */
-#define THREAD_SETMEM_NC(descr, member, value) \
-({ \
- __typeof__ (descr->member) __value = (value); \
- if (sizeof (__value) == 1) \
- __asm__ __volatile__ ("movb %0,%%gs:(%1)" : \
- : "q" (__value), \
- "r" (offsetof (struct _pthread_descr_struct, \
- member))); \
- else if (sizeof (__value) == 4) \
- __asm__ __volatile__ ("movl %0,%%gs:(%1)" : \
- : "r" (__value), \
- "r" (offsetof (struct _pthread_descr_struct, \
- member))); \
- else \
- { \
- if (sizeof (__value) != 8) \
- /* There should not be any value with a size other than 1, 4 or 8. */\
- abort (); \
- \
- __asm__ __volatile__ ("movl %%eax,%%gs:(%1)\n\t" \
- "movl %%edx,%%gs:4(%1)" : \
- : "A" (__value), \
- "r" (offsetof (struct _pthread_descr_struct, \
- member))); \
- } \
-})
-
-/* We want the OS to assign stack addresses. */
-#define FLOATING_STACKS 1
-
-/* Maximum size of the stack if the rlimit is unlimited. */
-#define ARCH_STACK_MAX_SIZE 8*1024*1024
diff --git a/newlib/libc/sys/linux/linuxthreads/manager.c b/newlib/libc/sys/linux/linuxthreads/manager.c
deleted file mode 100644
index 7729903cf..000000000
--- a/newlib/libc/sys/linux/linuxthreads/manager.c
+++ /dev/null
@@ -1,981 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-/* The "thread manager" thread: manages creation and termination of threads */
-
-#include <errno.h>
-#include <sched.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/poll.h> /* for poll */
-#include <sys/mman.h> /* for mmap */
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/wait.h> /* for waitpid macros */
-
-#include "pthread.h"
-#include "internals.h"
-#include "spinlock.h"
-#include "restart.h"
-#include "semaphore.h"
-
-/* Array of active threads. Entry 0 is reserved for the initial thread. */
-struct pthread_handle_struct __pthread_handles[PTHREAD_THREADS_MAX] =
-{ { __LOCK_INITIALIZER, &__pthread_initial_thread, 0},
- { __LOCK_INITIALIZER, &__pthread_manager_thread, 0}, /* All NULLs */ };
-
-/* For debugging purposes put the maximum number of threads in a variable. */
-const int __linuxthreads_pthread_threads_max = PTHREAD_THREADS_MAX;
-
-#ifndef THREAD_SELF
-/* Indicate whether at least one thread has a user-defined stack (if 1),
- or if all threads have stacks supplied by LinuxThreads (if 0). */
-int __pthread_nonstandard_stacks;
-#endif
-
-/* Number of active entries in __pthread_handles (used by gdb) */
-volatile int __pthread_handles_num = 2;
-
-/* Whether to use debugger additional actions for thread creation
- (set to 1 by gdb) */
-volatile int __pthread_threads_debug;
-
-/* Globally enabled events. */
-volatile td_thr_events_t __pthread_threads_events;
-
-/* Pointer to thread descriptor with last event. */
-volatile pthread_descr __pthread_last_event;
-
-/* Mapping from stack segment to thread descriptor. */
-/* Stack segment numbers are also indices into the __pthread_handles array. */
-/* Stack segment number 0 is reserved for the initial thread. */
-
-#if FLOATING_STACKS
-# define thread_segment(seq) NULL
-#else
-static inline pthread_descr thread_segment(int seg)
-{
- return (pthread_descr)(THREAD_STACK_START_ADDRESS - (seg - 1) * STACK_SIZE)
- - 1;
-}
-#endif
-
-/* Flag set in signal handler to record child termination */
-
-static volatile int terminated_children;
-
-/* Flag set when the initial thread is blocked on pthread_exit waiting
- for all other threads to terminate */
-
-static int main_thread_exiting;
-
-/* Counter used to generate unique thread identifier.
- Thread identifier is pthread_threads_counter + segment. */
-
-static pthread_t pthread_threads_counter;
-
-/* Forward declarations */
-
-static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
- void * (*start_routine)(void *), void *arg,
- sigset_t *mask, int father_pid,
- int report_events,
- td_thr_events_t *event_maskp);
-static void pthread_handle_free(pthread_t th_id);
-static void pthread_handle_exit(pthread_descr issuing_thread, int exitcode)
- __attribute__ ((noreturn));
-static void pthread_reap_children(void);
-static void pthread_kill_all_threads(int sig, int main_thread_also);
-static void pthread_for_each_thread(void *arg,
- void (*fn)(void *, pthread_descr));
-
-/* The server thread managing requests for thread creation and termination */
-
-int
-__attribute__ ((noreturn))
-__pthread_manager(void *arg)
-{
- int reqfd = (int) (long int) arg;
- struct pollfd ufd;
- sigset_t manager_mask;
- int n;
- struct pthread_request request;
-
- /* If we have special thread_self processing, initialize it. */
-#ifdef INIT_THREAD_SELF
- INIT_THREAD_SELF(&__pthread_manager_thread, 1);
-#endif
- /* Set the error variable. */
- __pthread_manager_thread.p_reentp = &__pthread_manager_thread.p_reent;
- __pthread_manager_thread.p_h_errnop = &__pthread_manager_thread.p_h_errno;
- /* Block all signals except __pthread_sig_cancel and SIGTRAP */
- sigfillset(&manager_mask);
- sigdelset(&manager_mask, __pthread_sig_cancel); /* for thread termination */
- sigdelset(&manager_mask, SIGTRAP); /* for debugging purposes */
- if (__pthread_threads_debug && __pthread_sig_debug > 0)
- sigdelset(&manager_mask, __pthread_sig_debug);
- sigprocmask(SIG_SETMASK, &manager_mask, NULL);
- /* Raise our priority to match that of main thread */
- __pthread_manager_adjust_prio(__pthread_main_thread->p_priority);
- /* Synchronize debugging of the thread manager */
- n = TEMP_FAILURE_RETRY(__libc_read(reqfd, (char *)&request,
- sizeof(request)));
- ASSERT(n == sizeof(request) && request.req_kind == REQ_DEBUG);
- ufd.fd = reqfd;
- ufd.events = POLLIN;
- /* Enter server loop */
- while(1) {
- n = __poll(&ufd, 1, 2000);
-
- /* Check for termination of the main thread */
- if (getppid() == 1) {
- pthread_kill_all_threads(SIGKILL, 0);
- _exit(0);
- }
- /* Check for dead children */
- if (terminated_children) {
- terminated_children = 0;
- pthread_reap_children();
- }
- /* Read and execute request */
- if (n == 1 && (ufd.revents & POLLIN)) {
- n = TEMP_FAILURE_RETRY(__libc_read(reqfd, (char *)&request,
- sizeof(request)));
-#ifdef DEBUG
- if (n < 0) {
- char d[64];
- write(STDERR_FILENO, d, snprintf(d, sizeof(d), "*** read err %m\n"));
- } else if (n != sizeof(request)) {
- write(STDERR_FILENO, "*** short read in manager\n", 26);
- }
-#endif
-
- switch(request.req_kind) {
- case REQ_CREATE:
- request.req_thread->p_retcode =
- pthread_handle_create((pthread_t *) &request.req_thread->p_retval,
- request.req_args.create.attr,
- request.req_args.create.fn,
- request.req_args.create.arg,
- &request.req_args.create.mask,
- request.req_thread->p_pid,
- request.req_thread->p_report_events,
- &request.req_thread->p_eventbuf.eventmask);
- restart(request.req_thread);
- break;
- case REQ_FREE:
- pthread_handle_free(request.req_args.free.thread_id);
- break;
- case REQ_PROCESS_EXIT:
- pthread_handle_exit(request.req_thread,
- request.req_args.exit.code);
- /* NOTREACHED */
- break;
- case REQ_MAIN_THREAD_EXIT:
- main_thread_exiting = 1;
- /* Reap children in case all other threads died and the signal handler
- went off before we set main_thread_exiting to 1, and therefore did
- not do REQ_KICK. */
- pthread_reap_children();
-
- if (__pthread_main_thread->p_nextlive == __pthread_main_thread) {
- restart(__pthread_main_thread);
- /* The main thread will now call exit() which will trigger an
- __on_exit handler, which in turn will send REQ_PROCESS_EXIT
- to the thread manager. In case you are wondering how the
- manager terminates from its loop here. */
- }
- break;
- case REQ_POST:
- __new_sem_post(request.req_args.post);
- break;
- case REQ_DEBUG:
- /* Make gdb aware of new thread and gdb will restart the
- new thread when it is ready to handle the new thread. */
- if (__pthread_threads_debug && __pthread_sig_debug > 0)
- raise(__pthread_sig_debug);
- break;
- case REQ_KICK:
- /* This is just a prod to get the manager to reap some
- threads right away, avoiding a potential delay at shutdown. */
- break;
- case REQ_FOR_EACH_THREAD:
- pthread_for_each_thread(request.req_args.for_each.arg,
- request.req_args.for_each.fn);
- restart(request.req_thread);
- break;
- }
- }
- }
-}
-
-int __pthread_manager_event(void *arg)
-{
- /* If we have special thread_self processing, initialize it. */
-#ifdef INIT_THREAD_SELF
- INIT_THREAD_SELF(&__pthread_manager_thread, 1);
-#endif
-
- /* Get the lock the manager will free once all is correctly set up. */
- __pthread_lock (THREAD_GETMEM((&__pthread_manager_thread), p_lock), NULL);
- /* Free it immediately. */
- __pthread_unlock (THREAD_GETMEM((&__pthread_manager_thread), p_lock));
-
- return __pthread_manager(arg);
-}
-
-/* Process creation */
-
-static int
-__attribute__ ((noreturn))
-pthread_start_thread(void *arg)
-{
- pthread_descr self = (pthread_descr) arg;
- struct pthread_request request;
- void * outcome;
-#if HP_TIMING_AVAIL
- hp_timing_t tmpclock;
-#endif
- /* Initialize special thread_self processing, if any. */
-#ifdef INIT_THREAD_SELF
- INIT_THREAD_SELF(self, self->p_nr);
-#endif
-#if HP_TIMING_AVAIL
- HP_TIMING_NOW (tmpclock);
- THREAD_SETMEM (self, p_cpuclock_offset, tmpclock);
-#endif
- /* Make sure our pid field is initialized, just in case we get there
- before our father has initialized it. */
- THREAD_SETMEM(self, p_pid, __getpid());
- /* Initial signal mask is that of the creating thread. (Otherwise,
- we'd just inherit the mask of the thread manager.) */
- sigprocmask(SIG_SETMASK, &self->p_start_args.mask, NULL);
- /* Set the scheduling policy and priority for the new thread, if needed */
- if (THREAD_GETMEM(self, p_start_args.schedpolicy) >= 0)
- /* Explicit scheduling attributes were provided: apply them */
- __sched_setscheduler(THREAD_GETMEM(self, p_pid),
- THREAD_GETMEM(self, p_start_args.schedpolicy),
- &self->p_start_args.schedparam);
- else if (__pthread_manager_thread.p_priority > 0)
- /* Default scheduling required, but thread manager runs in realtime
- scheduling: switch new thread to SCHED_OTHER policy */
- {
- struct sched_param default_params;
- default_params.sched_priority = 0;
- __sched_setscheduler(THREAD_GETMEM(self, p_pid),
- SCHED_OTHER, &default_params);
- }
- /* Make gdb aware of new thread */
- if (__pthread_threads_debug && __pthread_sig_debug > 0) {
- request.req_thread = self;
- request.req_kind = REQ_DEBUG;
- TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
- (char *) &request, sizeof(request)));
- suspend(self);
- }
- /* Run the thread code */
- outcome = self->p_start_args.start_routine(THREAD_GETMEM(self,
- p_start_args.arg));
- /* Exit with the given return value */
- __pthread_do_exit(outcome, CURRENT_STACK_FRAME);
-}
-
-static int
-__attribute__ ((noreturn))
-pthread_start_thread_event(void *arg)
-{
- pthread_descr self = (pthread_descr) arg;
-
-#ifdef INIT_THREAD_SELF
- INIT_THREAD_SELF(self, self->p_nr);
-#endif
- /* Make sure our pid field is initialized, just in case we get there
- before our father has initialized it. */
- THREAD_SETMEM(self, p_pid, __getpid());
- /* Get the lock the manager will free once all is correctly set up. */
- __pthread_lock (THREAD_GETMEM(self, p_lock), NULL);
- /* Free it immediately. */
- __pthread_unlock (THREAD_GETMEM(self, p_lock));
-
- /* Continue with the real function. */
- pthread_start_thread (arg);
-}
-
-static int pthread_allocate_stack(const pthread_attr_t *attr,
- pthread_descr default_new_thread,
- int pagesize,
- pthread_descr * out_new_thread,
- char ** out_new_thread_bottom,
- char ** out_guardaddr,
- size_t * out_guardsize)
-{
- pthread_descr new_thread;
- char * new_thread_bottom;
- char * guardaddr;
- size_t stacksize, guardsize;
-
- if (attr != NULL && attr->__stackaddr_set)
- {
-#ifdef _STACK_GROWS_UP
- /* The user provided a stack. */
- new_thread = (pthread_descr) attr->__stackaddr;
- new_thread_bottom = (char *) (new_thread + 1);
- guardaddr = attr->__stackaddr + attr->__stacksize;
- guardsize = 0;
-#else
- /* The user provided a stack. For now we interpret the supplied
- address as 1 + the highest addr. in the stack segment. If a
- separate register stack is needed, we place it at the low end
- of the segment, relying on the associated stacksize to
- determine the low end of the segment. This differs from many
- (but not all) other pthreads implementations. The intent is
- that on machines with a single stack growing toward higher
- addresses, stackaddr would be the lowest address in the stack
- segment, so that it is consistently close to the initial sp
- value. */
- new_thread =
- (pthread_descr) ((long)(attr->__stackaddr) & -sizeof(void *)) - 1;
- new_thread_bottom = (char *) attr->__stackaddr - attr->__stacksize;
- guardaddr = new_thread_bottom;
- guardsize = 0;
-#endif
-#ifndef THREAD_SELF
- __pthread_nonstandard_stacks = 1;
-#endif
- /* Clear the thread data structure. */
- memset (new_thread, '\0', sizeof (*new_thread));
- }
- else
- {
-#ifdef NEED_SEPARATE_REGISTER_STACK
- size_t granularity = 2 * pagesize;
- /* Try to make stacksize/2 a multiple of pagesize */
-#else
- size_t granularity = pagesize;
-#endif
- void *map_addr;
-
- /* Allocate space for stack and thread descriptor at default address */
-#if FLOATING_STACKS
- if (attr != NULL)
- {
- guardsize = page_roundup (attr->__guardsize, granularity);
- stacksize = __pthread_max_stacksize - guardsize;
- stacksize = MIN (stacksize,
- page_roundup (attr->__stacksize, granularity));
- }
- else
- {
- guardsize = granularity;
- stacksize = __pthread_max_stacksize - guardsize;
- }
-
- map_addr = mmap(NULL, stacksize + guardsize,
- PROT_READ | PROT_WRITE | PROT_EXEC,
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- if (map_addr == MAP_FAILED)
- /* No more memory available. */
- return -1;
-
-# ifdef NEED_SEPARATE_REGISTER_STACK
- guardaddr = map_addr + stacksize / 2;
- if (guardsize > 0)
- mprotect (guardaddr, guardsize, PROT_NONE);
-
- new_thread_bottom = (char *) map_addr;
- new_thread = ((pthread_descr) (new_thread_bottom + stacksize
- + guardsize)) - 1;
-# elif _STACK_GROWS_DOWN
- guardaddr = map_addr;
- if (guardsize > 0)
- mprotect (guardaddr, guardsize, PROT_NONE);
-
- new_thread_bottom = (char *) map_addr + guardsize;
- new_thread = ((pthread_descr) (new_thread_bottom + stacksize)) - 1;
-# elif _STACK_GROWS_UP
- guardaddr = map_addr + stacksize;
- if (guardsize > 0)
- mprotect (guardaddr, guardsize, PROT_NONE);
-
- new_thread = (pthread_descr) map_addr;
- new_thread_bottom = (char *) (new_thread + 1);
-# else
-# error You must define a stack direction
-# endif /* Stack direction */
-#else /* !FLOATING_STACKS */
- void *res_addr;
-
- if (attr != NULL)
- {
- guardsize = page_roundup (attr->__guardsize, granularity);
- stacksize = STACK_SIZE - guardsize;
- stacksize = MIN (stacksize,
- page_roundup (attr->__stacksize, granularity));
- }
- else
- {
- guardsize = granularity;
- stacksize = STACK_SIZE - granularity;
- }
-
-# ifdef NEED_SEPARATE_REGISTER_STACK
- new_thread = default_new_thread;
- new_thread_bottom = (char *) (new_thread + 1) - stacksize - guardsize;
- /* Includes guard area, unlike the normal case. Use the bottom
- end of the segment as backing store for the register stack.
- Needed on IA64. In this case, we also map the entire stack at
- once. According to David Mosberger, that's cheaper. It also
- avoids the risk of intermittent failures due to other mappings
- in the same region. The cost is that we might be able to map
- slightly fewer stacks. */
-
- /* First the main stack: */
- map_addr = (caddr_t)((char *)(new_thread + 1) - stacksize / 2);
- res_addr = mmap(map_addr, stacksize / 2,
- PROT_READ | PROT_WRITE | PROT_EXEC,
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- if (res_addr != map_addr)
- {
- /* Bad luck, this segment is already mapped. */
- if (res_addr != MAP_FAILED)
- munmap(res_addr, stacksize / 2);
- return -1;
- }
- /* Then the register stack: */
- map_addr = (caddr_t)new_thread_bottom;
- res_addr = mmap(map_addr, stacksize/2,
- PROT_READ | PROT_WRITE | PROT_EXEC,
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- if (res_addr != map_addr)
- {
- if (res_addr != MAP_FAILED)
- munmap(res_addr, stacksize / 2);
- munmap((caddr_t)((char *)(new_thread + 1) - stacksize/2),
- stacksize/2);
- return -1;
- }
-
- guardaddr = new_thread_bottom + stacksize/2;
- /* We leave the guard area in the middle unmapped. */
-# else /* !NEED_SEPARATE_REGISTER_STACK */
-# ifdef _STACK_GROWS_DOWN
- new_thread = default_new_thread;
- new_thread_bottom = (char *) (new_thread + 1) - stacksize;
- map_addr = new_thread_bottom - guardsize;
- res_addr = mmap(map_addr, stacksize + guardsize,
- PROT_READ | PROT_WRITE | PROT_EXEC,
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- if (res_addr != map_addr)
- {
- /* Bad luck, this segment is already mapped. */
- if (res_addr != MAP_FAILED)
- munmap (res_addr, stacksize + guardsize);
- return -1;
- }
-
- /* We manage to get a stack. Protect the guard area pages if
- necessary. */
- guardaddr = map_addr;
- if (guardsize > 0)
- mprotect (guardaddr, guardsize, PROT_NONE);
-# else
- /* The thread description goes at the bottom of this area, and
- * the stack starts directly above it.
- */
- new_thread = (pthread_descr)((unsigned long)default_new_thread &~ (STACK_SIZE - 1));
- map_addr = mmap(new_thread, stacksize + guardsize,
- PROT_READ | PROT_WRITE | PROT_EXEC,
- MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- if (map_addr == MAP_FAILED)
- return -1;
-
- new_thread_bottom = map_addr + sizeof(*new_thread);
- guardaddr = map_addr + stacksize;
- if (guardsize > 0)
- mprotect (guardaddr, guardsize, PROT_NONE);
-
-# endif /* stack direction */
-# endif /* !NEED_SEPARATE_REGISTER_STACK */
-#endif /* !FLOATING_STACKS */
- }
- *out_new_thread = new_thread;
- *out_new_thread_bottom = new_thread_bottom;
- *out_guardaddr = guardaddr;
- *out_guardsize = guardsize;
- return 0;
-}
-
-static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
- void * (*start_routine)(void *), void *arg,
- sigset_t * mask, int father_pid,
- int report_events,
- td_thr_events_t *event_maskp)
-{
- size_t sseg;
- int pid;
- pthread_descr new_thread;
- char * new_thread_bottom;
- pthread_t new_thread_id;
- char *guardaddr = NULL;
- size_t guardsize = 0;
- int pagesize = __getpagesize();
-
- /* First check whether we have to change the policy and if yes, whether
- we can do this. Normally this should be done by examining the
- return value of the __sched_setscheduler call in pthread_start_thread
- but this is hard to implement. FIXME */
- if (attr != NULL && attr->__schedpolicy != SCHED_OTHER && geteuid () != 0)
- return EPERM;
- /* Find a free segment for the thread, and allocate a stack if needed */
- for (sseg = 2; ; sseg++)
- {
- if (sseg >= PTHREAD_THREADS_MAX)
- return EAGAIN;
- if (__pthread_handles[sseg].h_descr != NULL)
- continue;
- if (pthread_allocate_stack(attr, thread_segment(sseg),
- pagesize,
- &new_thread, &new_thread_bottom,
- &guardaddr, &guardsize) == 0)
- break;
- }
- __pthread_handles_num++;
- /* Allocate new thread identifier */
- pthread_threads_counter += PTHREAD_THREADS_MAX;
- new_thread_id = sseg + pthread_threads_counter;
- /* Initialize the thread descriptor. Elements which have to be
- initialized to zero already have this value. */
- new_thread->p_tid = new_thread_id;
- new_thread->p_lock = &(__pthread_handles[sseg].h_lock);
- new_thread->p_cancelstate = PTHREAD_CANCEL_ENABLE;
- new_thread->p_canceltype = PTHREAD_CANCEL_DEFERRED;
- new_thread->p_reentp = &new_thread->p_reent;
- _REENT_INIT_PTR(new_thread->p_reentp);
- new_thread->p_h_errnop = &new_thread->p_h_errno;
- new_thread->p_resp = &new_thread->p_res;
- new_thread->p_guardaddr = guardaddr;
- new_thread->p_guardsize = guardsize;
- new_thread->p_header.data.self = new_thread;
- new_thread->p_nr = sseg;
- new_thread->p_inheritsched = attr ? attr->__inheritsched : 0;
- /* Initialize the thread handle */
- __pthread_init_lock(&__pthread_handles[sseg].h_lock);
- __pthread_handles[sseg].h_descr = new_thread;
- __pthread_handles[sseg].h_bottom = new_thread_bottom;
- /* Determine scheduling parameters for the thread */
- new_thread->p_start_args.schedpolicy = -1;
- if (attr != NULL) {
- new_thread->p_detached = attr->__detachstate;
- new_thread->p_userstack = attr->__stackaddr_set;
-
- switch(attr->__inheritsched) {
- case PTHREAD_EXPLICIT_SCHED:
- new_thread->p_start_args.schedpolicy = attr->__schedpolicy;
- memcpy (&new_thread->p_start_args.schedparam, &attr->__schedparam,
- sizeof (struct sched_param));
- break;
- case PTHREAD_INHERIT_SCHED:
- new_thread->p_start_args.schedpolicy = __sched_getscheduler(father_pid);
- __sched_getparam(father_pid, &new_thread->p_start_args.schedparam);
- break;
- }
- new_thread->p_priority =
- new_thread->p_start_args.schedparam.sched_priority;
- }
- /* Finish setting up arguments to pthread_start_thread */
- new_thread->p_start_args.start_routine = start_routine;
- new_thread->p_start_args.arg = arg;
- new_thread->p_start_args.mask = *mask;
- /* Make the new thread ID available already now. If any of the later
- functions fail we return an error value and the caller must not use
- the stored thread ID. */
- *thread = new_thread_id;
- /* Raise priority of thread manager if needed */
- __pthread_manager_adjust_prio(new_thread->p_priority);
- /* Do the cloning. We have to use two different functions depending
- on whether we are debugging or not. */
- pid = 0; /* Note that the thread never can have PID zero. */
- if (report_events)
- {
- /* See whether the TD_CREATE event bit is set in any of the
- masks. */
- int idx = __td_eventword (TD_CREATE);
- uint32_t mask = __td_eventmask (TD_CREATE);
-
- if ((mask & (__pthread_threads_events.event_bits[idx]
- | event_maskp->event_bits[idx])) != 0)
- {
- /* Lock the mutex the child will use now so that it will stop. */
- __pthread_lock(new_thread->p_lock, NULL);
-
- /* We have to report this event. */
-#ifdef NEED_SEPARATE_REGISTER_STACK
- /* Perhaps this version should be used on all platforms. But
- this requires that __clone2 be uniformly supported
- everywhere.
-
- And there is some argument for changing the __clone2
- interface to pass sp and bsp instead, making it more IA64
- specific, but allowing stacks to grow outward from each
- other, to get less paging and fewer mmaps. */
- pid = __clone2(pthread_start_thread_event,
- (void **)new_thread_bottom,
- (char *)new_thread - new_thread_bottom,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
- __pthread_sig_cancel, new_thread);
-#elif _STACK_GROWS_UP
- pid = __clone(pthread_start_thread_event, (void **) new_thread_bottom,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
- __pthread_sig_cancel, new_thread);
-#else
- pid = __clone(pthread_start_thread_event, (void **) new_thread,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
- __pthread_sig_cancel, new_thread);
-#endif
- if (pid != -1)
- {
- /* Now fill in the information about the new thread in
- the newly created thread's data structure. We cannot let
- the new thread do this since we don't know whether it was
- already scheduled when we send the event. */
- new_thread->p_eventbuf.eventdata = new_thread;
- new_thread->p_eventbuf.eventnum = TD_CREATE;
- __pthread_last_event = new_thread;
-
- /* We have to set the PID here since the callback function
- in the debug library will need it and we cannot guarantee
- the child got scheduled before the debugger. */
- new_thread->p_pid = pid;
-
- /* Now call the function which signals the event. */
- __linuxthreads_create_event ();
-
- /* Now restart the thread. */
- __pthread_unlock(new_thread->p_lock);
- }
- }
- }
- if (pid == 0)
- {
-#ifdef NEED_SEPARATE_REGISTER_STACK
- pid = __clone2(pthread_start_thread,
- (void **)new_thread_bottom,
- (char *)new_thread - new_thread_bottom,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
- __pthread_sig_cancel, new_thread);
-#elif _STACK_GROWS_UP
- pid = __clone(pthread_start_thread, (void **) new_thread_bottom,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
- __pthread_sig_cancel, new_thread);
-#else
- pid = __clone(pthread_start_thread, (void **) new_thread,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
- __pthread_sig_cancel, new_thread);
-#endif /* !NEED_SEPARATE_REGISTER_STACK */
- }
- /* Check if cloning succeeded */
- if (pid == -1) {
- /* Free the stack if we allocated it */
- if (attr == NULL || !attr->__stackaddr_set)
- {
-#ifdef NEED_SEPARATE_REGISTER_STACK
- size_t stacksize = ((char *)(new_thread->p_guardaddr)
- - new_thread_bottom);
- munmap((caddr_t)new_thread_bottom,
- 2 * stacksize + new_thread->p_guardsize);
-#elif _STACK_GROWS_UP
- size_t stacksize = guardaddr - (char *)new_thread;
- munmap(new_thread, stacksize + guardsize);
-#else
- size_t stacksize = (char *)(new_thread+1) - new_thread_bottom;
- munmap(new_thread_bottom - guardsize, guardsize + stacksize);
-#endif
- }
- __pthread_handles[sseg].h_descr = NULL;
- __pthread_handles[sseg].h_bottom = NULL;
- __pthread_handles_num--;
- return errno;
- }
- /* Insert new thread in doubly linked list of active threads */
- new_thread->p_prevlive = __pthread_main_thread;
- new_thread->p_nextlive = __pthread_main_thread->p_nextlive;
- __pthread_main_thread->p_nextlive->p_prevlive = new_thread;
- __pthread_main_thread->p_nextlive = new_thread;
- /* Set pid field of the new thread, in case we get there before the
- child starts. */
- new_thread->p_pid = pid;
- return 0;
-}
-
-
-/* Try to free the resources of a thread when requested by pthread_join
- or pthread_detach on a terminated thread. */
-
-static void pthread_free(pthread_descr th)
-{
- pthread_handle handle;
- pthread_readlock_info *iter, *next;
-
- ASSERT(th->p_exited);
- /* Make the handle invalid */
- handle = thread_handle(th->p_tid);
- __pthread_lock(&handle->h_lock, NULL);
- handle->h_descr = NULL;
- handle->h_bottom = (char *)(-1L);
- __pthread_unlock(&handle->h_lock);
-#ifdef FREE_THREAD
- FREE_THREAD(th, th->p_nr);
-#endif
- /* One fewer threads in __pthread_handles */
- __pthread_handles_num--;
-
- /* Destroy read lock list, and list of free read lock structures.
- If the former is not empty, it means the thread exited while
- holding read locks! */
-
- for (iter = th->p_readlock_list; iter != NULL; iter = next)
- {
- next = iter->pr_next;
- free(iter);
- }
-
- for (iter = th->p_readlock_free; iter != NULL; iter = next)
- {
- next = iter->pr_next;
- free(iter);
- }
-
- /* If initial thread, nothing to free */
- if (!th->p_userstack)
- {
- size_t guardsize = th->p_guardsize;
- /* Free the stack and thread descriptor area */
- char *guardaddr = th->p_guardaddr;
-#ifdef _STACK_GROWS_UP
- size_t stacksize = guardaddr - (char *)th;
- guardaddr = (char *)th;
-#else
- /* Guardaddr is always set, even if guardsize is 0. This allows
- us to compute everything else. */
- size_t stacksize = (char *)(th+1) - guardaddr - guardsize;
-#ifdef NEED_SEPARATE_REGISTER_STACK
- /* Take account of the register stack, which is below guardaddr. */
- guardaddr -= stacksize;
- stacksize *= 2;
-#endif
-#endif
- /* Unmap the stack. */
- munmap(guardaddr, stacksize + guardsize);
- }
-}
-
-/* Handle threads that have exited */
-
-static void pthread_exited(pid_t pid)
-{
- pthread_descr th;
- int detached;
- /* Find thread with that pid */
- for (th = __pthread_main_thread->p_nextlive;
- th != __pthread_main_thread;
- th = th->p_nextlive) {
- if (th->p_pid == pid) {
- /* Remove thread from list of active threads */
- th->p_nextlive->p_prevlive = th->p_prevlive;
- th->p_prevlive->p_nextlive = th->p_nextlive;
- /* Mark thread as exited, and if detached, free its resources */
- __pthread_lock(th->p_lock, NULL);
- th->p_exited = 1;
- /* If we have to signal this event do it now. */
- if (th->p_report_events)
- {
- /* See whether TD_REAP is in any of the mask. */
- int idx = __td_eventword (TD_REAP);
- uint32_t mask = __td_eventmask (TD_REAP);
-
- if ((mask & (__pthread_threads_events.event_bits[idx]
- | th->p_eventbuf.eventmask.event_bits[idx])) != 0)
- {
- /* Yep, we have to signal the reapage. */
- th->p_eventbuf.eventnum = TD_REAP;
- th->p_eventbuf.eventdata = th;
- __pthread_last_event = th;
-
- /* Now call the function to signal the event. */
- __linuxthreads_reap_event();
- }
- }
- detached = th->p_detached;
- __pthread_unlock(th->p_lock);
- if (detached)
- pthread_free(th);
- break;
- }
- }
- /* If all threads have exited and the main thread is pending on a
- pthread_exit, wake up the main thread and terminate ourselves. */
- if (main_thread_exiting &&
- __pthread_main_thread->p_nextlive == __pthread_main_thread) {
- restart(__pthread_main_thread);
- /* Same logic as REQ_MAIN_THREAD_EXIT. */
- }
-}
-
-static void pthread_reap_children(void)
-{
- pid_t pid;
- int status;
-
- while ((pid = __libc___waitpid(-1, &status, WNOHANG | __WCLONE)) > 0) {
- pthread_exited(pid);
- if (WIFSIGNALED(status)) {
- /* If a thread died due to a signal, send the same signal to
- all other threads, including the main thread. */
- pthread_kill_all_threads(WTERMSIG(status), 1);
- _exit(0);
- }
- }
-}
-
-/* Try to free the resources of a thread when requested by pthread_join
- or pthread_detach on a terminated thread. */
-
-static void pthread_handle_free(pthread_t th_id)
-{
- pthread_handle handle = thread_handle(th_id);
- pthread_descr th;
-
- __pthread_lock(&handle->h_lock, NULL);
- if (nonexisting_handle(handle, th_id)) {
- /* pthread_reap_children has deallocated the thread already,
- nothing needs to be done */
- __pthread_unlock(&handle->h_lock);
- return;
- }
- th = handle->h_descr;
- if (th->p_exited) {
- __pthread_unlock(&handle->h_lock);
- pthread_free(th);
- } else {
- /* The Unix process of the thread is still running.
- Mark the thread as detached so that the thread manager will
- deallocate its resources when the Unix process exits. */
- th->p_detached = 1;
- __pthread_unlock(&handle->h_lock);
- }
-}
-
-/* Send a signal to all running threads */
-
-static void pthread_kill_all_threads(int sig, int main_thread_also)
-{
- pthread_descr th;
- for (th = __pthread_main_thread->p_nextlive;
- th != __pthread_main_thread;
- th = th->p_nextlive) {
- kill(th->p_pid, sig);
- }
- if (main_thread_also) {
- kill(__pthread_main_thread->p_pid, sig);
- }
-}
-
-static void pthread_for_each_thread(void *arg,
- void (*fn)(void *, pthread_descr))
-{
- pthread_descr th;
-
- for (th = __pthread_main_thread->p_nextlive;
- th != __pthread_main_thread;
- th = th->p_nextlive) {
- fn(arg, th);
- }
-
- fn(arg, __pthread_main_thread);
-}
-
-/* Process-wide exit() */
-
-static void pthread_handle_exit(pthread_descr issuing_thread, int exitcode)
-{
- pthread_descr th;
- __pthread_exit_requested = 1;
- __pthread_exit_code = exitcode;
- /* A forced asynchronous cancellation follows. Make sure we won't
- get stuck later in the main thread with a system lock being held
- by one of the cancelled threads. Ideally one would use the same
- code as in pthread_atfork(), but we can't distinguish system and
- user handlers there. */
- __flockfilelist();
- /* Send the CANCEL signal to all running threads, including the main
- thread, but excluding the thread from which the exit request originated
- (that thread must complete the exit, e.g. calling atexit functions
- and flushing stdio buffers). */
- for (th = issuing_thread->p_nextlive;
- th != issuing_thread;
- th = th->p_nextlive) {
- kill(th->p_pid, __pthread_sig_cancel);
- }
- /* Now, wait for all these threads, so that they don't become zombies
- and their times are properly added to the thread manager's times. */
- for (th = issuing_thread->p_nextlive;
- th != issuing_thread;
- th = th->p_nextlive) {
- __waitpid(th->p_pid, NULL, __WCLONE);
- }
- __fresetlockfiles();
- restart(issuing_thread);
- _exit(0);
-}
-
-/* Handler for __pthread_sig_cancel in thread manager thread */
-
-void __pthread_manager_sighandler(int sig)
-{
- int kick_manager = terminated_children == 0 && main_thread_exiting;
- terminated_children = 1;
-
- /* If the main thread is terminating, kick the thread manager loop
- each time some threads terminate. This eliminates a two second
- shutdown delay caused by the thread manager sleeping in the
- call to __poll(). Instead, the thread manager is kicked into
- action, reaps the outstanding threads and resumes the main thread
- so that it can complete the shutdown. */
-
- if (kick_manager) {
- struct pthread_request request;
- request.req_thread = 0;
- request.req_kind = REQ_KICK;
- TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
- (char *) &request, sizeof(request)));
- }
-}
-
-/* Adjust priority of thread manager so that it always run at a priority
- higher than all threads */
-
-void __pthread_manager_adjust_prio(int thread_prio)
-{
- struct sched_param param;
-
- if (thread_prio <= __pthread_manager_thread.p_priority) return;
- param.sched_priority =
- thread_prio < __sched_get_priority_max(SCHED_FIFO)
- ? thread_prio + 1 : thread_prio;
- __sched_setscheduler(__pthread_manager_thread.p_pid, SCHED_FIFO, &param);
- __pthread_manager_thread.p_priority = thread_prio;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/mq_notify.c b/newlib/libc/sys/linux/linuxthreads/mq_notify.c
deleted file mode 100644
index 46492e470..000000000
--- a/newlib/libc/sys/linux/linuxthreads/mq_notify.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/* Copyright 2002, Red Hat Inc. */
-
-#include <mqueue.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-#include <string.h>
-
-#include "internals.h"
-#include <sys/lock.h>
-
-#include "mqlocal.h"
-
-static void *mq_notify_process (void *);
-
-void
-__cleanup_mq_notify (struct libc_mq *info)
-{
- struct sembuf sb4 = {4, 1, 0};
- /* kill notification thread and allow other processes to set a notification */
- pthread_cancel ((pthread_t)info->th);
- semop (info->semid, &sb4, 1);
-}
-
-static void *
-mq_notify_process (void *arg)
-{
- struct libc_mq *info = (struct libc_mq *)arg;
- struct sembuf sb3[2] = {{3, 0, 0}, {5, 0, 0}};
- struct sembuf sb4 = {4, 1, 0};
- int rc;
-
- /* wait until queue is empty */
- while (!(rc = semop (info->semid, sb3, 1)) && errno == EINTR)
- /* empty */ ;
-
- if (!rc)
- {
- /* now wait until there are 0 readers and the queue has something in it */
- sb3[0].sem_op = -1;
- while (!(rc = semop (info->semid, sb3, 2)) && errno == EINTR)
- /* empty */ ;
- /* restore value since we have not actually performed a read */
- sb3[0].sem_op = 1;
- semop (info->semid, sb3, 1);
- /* perform desired notification - either run function in this thread or pass signal */
- if (!rc)
- {
- if (info->sigevent->sigev_notify == SIGEV_SIGNAL)
- raise (info->sigevent->sigev_signo);
- else if (info->sigevent->sigev_notify == SIGEV_THREAD)
- info->sigevent->sigev_notify_function (info->sigevent->sigev_value);
- /* allow other processes to now mq_notify */
- semop (info->semid, &sb4, 1);
- }
- }
- pthread_exit (NULL);
-}
-
-int
-mq_notify (mqd_t msgid, const struct sigevent *notification)
-{
- struct libc_mq *info;
- struct sembuf sb4 = {4, -1, IPC_NOWAIT};
- int rc;
- pthread_attr_t *attr = NULL;
-
- info = __find_mq (msgid);
-
- if (info == NULL)
- {
- errno = EBADF;
- return -1;
- }
-
- /* get notification lock */
- rc = semop (info->semid, &sb4, 1);
-
- if (rc == -1)
- {
- errno = EBUSY;
- return -1;
- }
-
- /* to get the notification running we use a pthread - if the user has requested
- an action in a pthread, we use the user's attributes when setting up the thread */
- info->sigevent = (struct sigevent *)notification;
- if (info->sigevent->sigev_notify == SIGEV_THREAD)
- attr = (pthread_attr_t *)info->sigevent->sigev_notify_attributes;
- rc = pthread_create ((pthread_t *)&info->th, attr, mq_notify_process, (void *)info);
-
- if (rc != 0)
- rc = -1;
- else
- info->cleanup_notify = &__cleanup_mq_notify;
-
- return rc;
-}
-
-
-
-
-
-
-
diff --git a/newlib/libc/sys/linux/linuxthreads/mutex.c b/newlib/libc/sys/linux/linuxthreads/mutex.c
deleted file mode 100644
index fb2e60770..000000000
--- a/newlib/libc/sys/linux/linuxthreads/mutex.c
+++ /dev/null
@@ -1,366 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-/* Mutexes */
-
-#include <bits/libc-lock.h>
-#include <errno.h>
-#include <sched.h>
-#include <stddef.h>
-#include <limits.h>
-#include "pthread.h"
-#include "internals.h"
-#include "spinlock.h"
-#include "queue.h"
-#include "restart.h"
-
-int __pthread_mutex_init(pthread_mutex_t * mutex,
- const pthread_mutexattr_t * mutex_attr)
-{
- __pthread_init_lock(&mutex->__m_lock);
- mutex->__m_kind =
- mutex_attr == NULL ? PTHREAD_MUTEX_TIMED_NP : mutex_attr->__mutexkind;
- mutex->__m_count = 0;
- mutex->__m_owner = NULL;
- return 0;
-}
-strong_alias (__pthread_mutex_init, pthread_mutex_init)
-
-int __pthread_mutex_destroy(pthread_mutex_t * mutex)
-{
- switch (mutex->__m_kind) {
- case PTHREAD_MUTEX_ADAPTIVE_NP:
- case PTHREAD_MUTEX_RECURSIVE_NP:
- if ((mutex->__m_lock.__status & 1) != 0)
- return EBUSY;
- return 0;
- case PTHREAD_MUTEX_ERRORCHECK_NP:
- case PTHREAD_MUTEX_TIMED_NP:
- if (mutex->__m_lock.__status != 0)
- return EBUSY;
- return 0;
- default:
- return EINVAL;
- }
-}
-strong_alias (__pthread_mutex_destroy, pthread_mutex_destroy)
-
-int __pthread_mutex_trylock(pthread_mutex_t * mutex)
-{
- pthread_descr self;
- int retcode;
-
- switch(mutex->__m_kind) {
- case PTHREAD_MUTEX_ADAPTIVE_NP:
- retcode = __pthread_trylock(&mutex->__m_lock);
- return retcode;
- case PTHREAD_MUTEX_RECURSIVE_NP:
- self = thread_self();
- if (mutex->__m_owner == self) {
- mutex->__m_count++;
- return 0;
- }
- retcode = __pthread_trylock(&mutex->__m_lock);
- if (retcode == 0) {
- mutex->__m_owner = self;
- mutex->__m_count = 0;
- }
- return retcode;
- case PTHREAD_MUTEX_ERRORCHECK_NP:
- retcode = __pthread_alt_trylock(&mutex->__m_lock);
- if (retcode == 0) {
- mutex->__m_owner = thread_self();
- }
- return retcode;
- case PTHREAD_MUTEX_TIMED_NP:
- retcode = __pthread_alt_trylock(&mutex->__m_lock);
- return retcode;
- default:
- return EINVAL;
- }
-}
-strong_alias (__pthread_mutex_trylock, pthread_mutex_trylock)
-
-int __pthread_mutex_lock(pthread_mutex_t * mutex)
-{
- pthread_descr self;
-
- switch(mutex->__m_kind) {
- case PTHREAD_MUTEX_ADAPTIVE_NP:
- __pthread_lock(&mutex->__m_lock, NULL);
- return 0;
- case PTHREAD_MUTEX_RECURSIVE_NP:
- self = thread_self();
- if (mutex->__m_owner == self) {
- mutex->__m_count++;
- return 0;
- }
- __pthread_lock(&mutex->__m_lock, self);
- mutex->__m_owner = self;
- mutex->__m_count = 0;
- return 0;
- case PTHREAD_MUTEX_ERRORCHECK_NP:
- self = thread_self();
- if (mutex->__m_owner == self) return EDEADLK;
- __pthread_alt_lock(&mutex->__m_lock, self);
- mutex->__m_owner = self;
- return 0;
- case PTHREAD_MUTEX_TIMED_NP:
- __pthread_alt_lock(&mutex->__m_lock, NULL);
- return 0;
- default:
- return EINVAL;
- }
-}
-strong_alias (__pthread_mutex_lock, pthread_mutex_lock)
-
-int __pthread_mutex_timedlock (pthread_mutex_t *mutex,
- const struct timespec *abstime)
-{
- pthread_descr self;
- int res;
-
- if (__builtin_expect (abstime->tv_nsec, 0) < 0
- || __builtin_expect (abstime->tv_nsec, 0) >= 1000000000)
- return EINVAL;
-
- switch(mutex->__m_kind) {
- case PTHREAD_MUTEX_ADAPTIVE_NP:
- __pthread_lock(&mutex->__m_lock, NULL);
- return 0;
- case PTHREAD_MUTEX_RECURSIVE_NP:
- self = thread_self();
- if (mutex->__m_owner == self) {
- mutex->__m_count++;
- return 0;
- }
- __pthread_lock(&mutex->__m_lock, self);
- mutex->__m_owner = self;
- mutex->__m_count = 0;
- return 0;
- case PTHREAD_MUTEX_ERRORCHECK_NP:
- self = thread_self();
- if (mutex->__m_owner == self) return EDEADLK;
- res = __pthread_alt_timedlock(&mutex->__m_lock, self, abstime);
- if (res != 0)
- {
- mutex->__m_owner = self;
- return 0;
- }
- return ETIMEDOUT;
- case PTHREAD_MUTEX_TIMED_NP:
- /* Only this type supports timed out lock. */
- return (__pthread_alt_timedlock(&mutex->__m_lock, NULL, abstime)
- ? 0 : ETIMEDOUT);
- default:
- return EINVAL;
- }
-}
-strong_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock)
-
-int __pthread_mutex_unlock(pthread_mutex_t * mutex)
-{
- switch (mutex->__m_kind) {
- case PTHREAD_MUTEX_ADAPTIVE_NP:
- __pthread_unlock(&mutex->__m_lock);
- return 0;
- case PTHREAD_MUTEX_RECURSIVE_NP:
- if (mutex->__m_owner != thread_self())
- return EPERM;
- if (mutex->__m_count > 0) {
- mutex->__m_count--;
- return 0;
- }
- mutex->__m_owner = NULL;
- __pthread_unlock(&mutex->__m_lock);
- return 0;
- case PTHREAD_MUTEX_ERRORCHECK_NP:
- if (mutex->__m_owner != thread_self() || mutex->__m_lock.__status == 0)
- return EPERM;
- mutex->__m_owner = NULL;
- __pthread_alt_unlock(&mutex->__m_lock);
- return 0;
- case PTHREAD_MUTEX_TIMED_NP:
- __pthread_alt_unlock(&mutex->__m_lock);
- return 0;
- default:
- return EINVAL;
- }
-}
-strong_alias (__pthread_mutex_unlock, pthread_mutex_unlock)
-
-int __pthread_mutexattr_init(pthread_mutexattr_t *attr)
-{
- attr->__mutexkind = PTHREAD_MUTEX_TIMED_NP;
- return 0;
-}
-strong_alias (__pthread_mutexattr_init, pthread_mutexattr_init)
-
-int __pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
-{
- return 0;
-}
-strong_alias (__pthread_mutexattr_destroy, pthread_mutexattr_destroy)
-
-int __pthread_mutexattr_settype(pthread_mutexattr_t *attr, int kind)
-{
- if (kind != PTHREAD_MUTEX_ADAPTIVE_NP
- && kind != PTHREAD_MUTEX_RECURSIVE_NP
- && kind != PTHREAD_MUTEX_ERRORCHECK_NP
- && kind != PTHREAD_MUTEX_TIMED_NP)
- return EINVAL;
- attr->__mutexkind = kind;
- return 0;
-}
-weak_alias (__pthread_mutexattr_settype, pthread_mutexattr_settype)
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 2
-strong_alias ( __pthread_mutexattr_settype, __pthread_mutexattr_setkind_np)
-weak_alias (__pthread_mutexattr_setkind_np, pthread_mutexattr_setkind_np)
-#endif /* !_ELIX_LEVEL || _ELIX_LEVEL >= 2 */
-
-int __pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *kind)
-{
- *kind = attr->__mutexkind;
- return 0;
-}
-weak_alias (__pthread_mutexattr_gettype, pthread_mutexattr_gettype)
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 2
-strong_alias (__pthread_mutexattr_gettype, __pthread_mutexattr_getkind_np)
-weak_alias (__pthread_mutexattr_getkind_np, pthread_mutexattr_getkind_np)
-#endif /* !_ELIX_LEVEL || _ELIX_LEVEL >= 2 */
-
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 3
-
-int __pthread_mutexattr_getpshared (const pthread_mutexattr_t *attr,
- int *pshared)
-{
- *pshared = PTHREAD_PROCESS_PRIVATE;
- return 0;
-}
-weak_alias (__pthread_mutexattr_getpshared, pthread_mutexattr_getpshared)
-
-int __pthread_mutexattr_setpshared (pthread_mutexattr_t *attr, int pshared)
-{
- if (pshared != PTHREAD_PROCESS_PRIVATE && pshared != PTHREAD_PROCESS_SHARED)
- return EINVAL;
-
- /* For now it is not possible to shared a conditional variable. */
- if (pshared != PTHREAD_PROCESS_PRIVATE)
- return ENOSYS;
-
- return 0;
-}
-weak_alias (__pthread_mutexattr_setpshared, pthread_mutexattr_setpshared)
-
-#endif /* !_ELIX_LEVEL || _ELIX_LEVEL >= 3 */
-
-/* Once-only execution */
-
-static pthread_mutex_t once_masterlock = PTHREAD_MUTEX_INITIALIZER;
-static pthread_cond_t once_finished = PTHREAD_COND_INITIALIZER;
-static int fork_generation = 0; /* Child process increments this after fork. */
-
-enum { NEVER = 0, IN_PROGRESS = 1, DONE = 2 };
-
-/* If a thread is canceled while calling the init_routine out of
- pthread once, this handler will reset the once_control variable
- to the NEVER state. */
-
-static void pthread_once_cancelhandler(void *arg)
-{
- pthread_once_t *once_control = arg;
-
- pthread_mutex_lock(&once_masterlock);
- *once_control = NEVER;
- pthread_mutex_unlock(&once_masterlock);
- pthread_cond_broadcast(&once_finished);
-}
-
-int __pthread_once(pthread_once_t * once_control, void (*init_routine)(void))
-{
- /* flag for doing the condition broadcast outside of mutex */
- int state_changed;
-
- /* Test without locking first for speed */
- if (*once_control == DONE) {
- READ_MEMORY_BARRIER();
- return 0;
- }
- /* Lock and test again */
-
- state_changed = 0;
-
- pthread_mutex_lock(&once_masterlock);
-
- /* If this object was left in an IN_PROGRESS state in a parent
- process (indicated by stale generation field), reset it to NEVER. */
- if ((*once_control & 3) == IN_PROGRESS && (*once_control & ~3) != fork_generation)
- *once_control = NEVER;
-
- /* If init_routine is being called from another routine, wait until
- it completes. */
- while ((*once_control & 3) == IN_PROGRESS) {
- pthread_cond_wait(&once_finished, &once_masterlock);
- }
- /* Here *once_control is stable and either NEVER or DONE. */
- if (*once_control == NEVER) {
- *once_control = IN_PROGRESS | fork_generation;
- pthread_mutex_unlock(&once_masterlock);
- pthread_cleanup_push(pthread_once_cancelhandler, once_control);
- init_routine();
- pthread_cleanup_pop(0);
- pthread_mutex_lock(&once_masterlock);
- WRITE_MEMORY_BARRIER();
- *once_control = DONE;
- state_changed = 1;
- }
- pthread_mutex_unlock(&once_masterlock);
-
- if (state_changed)
- pthread_cond_broadcast(&once_finished);
-
- return 0;
-}
-strong_alias (__pthread_once, pthread_once)
-
-/*
- * Handle the state of the pthread_once mechanism across forks. The
- * once_masterlock is acquired in the parent process prior to a fork to ensure
- * that no thread is in the critical region protected by the lock. After the
- * fork, the lock is released. In the child, the lock and the condition
- * variable are simply reset. The child also increments its generation
- * counter which lets pthread_once calls detect stale IN_PROGRESS states
- * and reset them back to NEVER.
- */
-
-void __pthread_once_fork_prepare(void)
-{
- pthread_mutex_lock(&once_masterlock);
-}
-
-void __pthread_once_fork_parent(void)
-{
- pthread_mutex_unlock(&once_masterlock);
-}
-
-void __pthread_once_fork_child(void)
-{
- pthread_mutex_init(&once_masterlock, NULL);
- pthread_cond_init(&once_finished, NULL);
- if (fork_generation <= INT_MAX - 4)
- fork_generation += 4; /* leave least significant two bits zero */
- else
- fork_generation = 0;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/no-tsd.c b/newlib/libc/sys/linux/linuxthreads/no-tsd.c
deleted file mode 100644
index 84abb6f40..000000000
--- a/newlib/libc/sys/linux/linuxthreads/no-tsd.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* libc-internal interface for thread-specific data.
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <sys/cdefs.h> /* for __const */
-#include <bits/libc-tsd.h>
-
-/* This file provides uinitialized (common) definitions for the
- hooks used internally by libc to access thread-specific data.
-
- When -lpthread is used, it provides initialized definitions for these
- variables (in specific.c), which override these uninitialized definitions.
-
- If -lpthread is not used, these uninitialized variables default to zero,
- which the __libc_tsd_* macros check for. */
-
-void *(*__libc_internal_tsd_get) (enum __libc_tsd_key_t);
-int (*__libc_internal_tsd_set) (enum __libc_tsd_key_t,
- __const void *);
diff --git a/newlib/libc/sys/linux/linuxthreads/oldsemaphore.c b/newlib/libc/sys/linux/linuxthreads/oldsemaphore.c
deleted file mode 100644
index 80a82dfcf..000000000
--- a/newlib/libc/sys/linux/linuxthreads/oldsemaphore.c
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * This file contains the old semaphore code that we need to
- * preserve for glibc-2.0 backwards compatibility. Port to glibc 2.1
- * done by Cristian Gafton.
- */
-
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-/* Semaphores a la POSIX 1003.1b */
-#include <shlib-compat.h>
-#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
-
-#include <errno.h>
-#include "pthread.h"
-#include "internals.h"
-#include "spinlock.h"
-#include "restart.h"
-#include "queue.h"
-
-typedef struct {
- long int sem_status;
- int sem_spinlock;
-} old_sem_t;
-
-extern int __old_sem_init (old_sem_t *__sem, int __pshared, unsigned int __value);
-extern int __old_sem_wait (old_sem_t *__sem);
-extern int __old_sem_trywait (old_sem_t *__sem);
-extern int __old_sem_post (old_sem_t *__sem);
-extern int __old_sem_getvalue (old_sem_t *__sem, int *__sval);
-extern int __old_sem_destroy (old_sem_t *__sem);
-
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX ((int) ((~0u) >> 1))
-
-static inline int sem_compare_and_swap(old_sem_t *sem, long oldval, long newval)
-{
- return compare_and_swap(&sem->sem_status, oldval, newval, &sem->sem_spinlock);
-}
-
-/* The state of a semaphore is represented by a long int encoding
- either the semaphore count if >= 0 and no thread is waiting on it,
- or the head of the list of threads waiting for the semaphore.
- To distinguish the two cases, we encode the semaphore count N
- as 2N+1, so that it has the lowest bit set.
-
- A sequence of sem_wait operations on a semaphore initialized to N
- result in the following successive states:
- 2N+1, 2N-1, ..., 3, 1, &first_waiting_thread, &second_waiting_thread, ...
-*/
-
-static void sem_restart_list(pthread_descr waiting);
-
-int __old_sem_init(old_sem_t *sem, int pshared, unsigned int value)
-{
- if (value > SEM_VALUE_MAX) {
- errno = EINVAL;
- return -1;
- }
- if (pshared) {
- errno = ENOSYS;
- return -1;
- }
- sem->sem_spinlock = __LT_SPINLOCK_INIT;
- sem->sem_status = ((long)value << 1) + 1;
- return 0;
-}
-
-/* Function called by pthread_cancel to remove the thread from
- waiting inside __old_sem_wait. Here we simply unconditionally
- indicate that the thread is to be woken, by returning 1. */
-
-static int old_sem_extricate_func(void *obj, pthread_descr th)
-{
- return 1;
-}
-
-int __old_sem_wait(old_sem_t * sem)
-{
- long oldstatus, newstatus;
- volatile pthread_descr self = thread_self();
- pthread_descr * th;
- pthread_extricate_if extr;
-
- /* Set up extrication interface */
- extr.pu_object = 0;
- extr.pu_extricate_func = old_sem_extricate_func;
-
- while (1) {
- /* Register extrication interface */
- __pthread_set_own_extricate_if(self, &extr);
- do {
- oldstatus = sem->sem_status;
- if ((oldstatus & 1) && (oldstatus != 1))
- newstatus = oldstatus - 2;
- else {
- newstatus = (long) self;
- self->p_nextwaiting = (pthread_descr) oldstatus;
- }
- }
- while (! sem_compare_and_swap(sem, oldstatus, newstatus));
- if (newstatus & 1) {
- /* We got the semaphore. */
- __pthread_set_own_extricate_if(self, 0);
- self->p_nextwaiting = NULL;
- return 0;
- }
- /* Wait for sem_post or cancellation */
- suspend(self);
- __pthread_set_own_extricate_if(self, 0);
-
- /* This is a cancellation point */
- if (self->p_canceled && self->p_cancelstate == PTHREAD_CANCEL_ENABLE) {
- /* Remove ourselves from the waiting list if we're still on it */
- /* First check if we're at the head of the list. */
- do {
- oldstatus = sem->sem_status;
- if (oldstatus != (long) self) break;
- newstatus = (long) self->p_nextwaiting;
- }
- while (! sem_compare_and_swap(sem, oldstatus, newstatus));
- /* Now, check if we're somewhere in the list.
- There's a race condition with sem_post here, but it does not matter:
- the net result is that at the time pthread_exit is called,
- self is no longer reachable from sem->sem_status. */
- if (oldstatus != (long) self && (oldstatus & 1) == 0) {
- for (th = &(((pthread_descr) oldstatus)->p_nextwaiting);
- *th != NULL && *th != (pthread_descr) 1;
- th = &((*th)->p_nextwaiting)) {
- if (*th == self) {
- *th = self->p_nextwaiting;
- break;
- }
- }
- }
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
- }
- }
-}
-
-int __old_sem_trywait(old_sem_t * sem)
-{
- long oldstatus, newstatus;
-
- do {
- oldstatus = sem->sem_status;
- if ((oldstatus & 1) == 0 || (oldstatus == 1)) {
- errno = EAGAIN;
- return -1;
- }
- newstatus = oldstatus - 2;
- }
- while (! sem_compare_and_swap(sem, oldstatus, newstatus));
- return 0;
-}
-
-int __old_sem_post(old_sem_t * sem)
-{
- long oldstatus, newstatus;
-
- do {
- oldstatus = sem->sem_status;
- if ((oldstatus & 1) == 0)
- newstatus = 3;
- else {
- if (oldstatus >= SEM_VALUE_MAX) {
- /* Overflow */
- errno = ERANGE;
- return -1;
- }
- newstatus = oldstatus + 2;
- }
- }
- while (! sem_compare_and_swap(sem, oldstatus, newstatus));
- if ((oldstatus & 1) == 0)
- sem_restart_list((pthread_descr) oldstatus);
- return 0;
-}
-
-int __old_sem_getvalue(old_sem_t * sem, int * sval)
-{
- long status = sem->sem_status;
- if (status & 1)
- *sval = (int)((unsigned long) status >> 1);
- else
- *sval = 0;
- return 0;
-}
-
-int __old_sem_destroy(old_sem_t * sem)
-{
- if ((sem->sem_status & 1) == 0) {
- errno = EBUSY;
- return -1;
- }
- return 0;
-}
-
-/* Auxiliary function for restarting all threads on a waiting list,
- in priority order. */
-
-static void sem_restart_list(pthread_descr waiting)
-{
- pthread_descr th, towake, *p;
-
- /* Sort list of waiting threads by decreasing priority (insertion sort) */
- towake = NULL;
- while (waiting != (pthread_descr) 1) {
- th = waiting;
- waiting = waiting->p_nextwaiting;
- p = &towake;
- while (*p != NULL && th->p_priority < (*p)->p_priority)
- p = &((*p)->p_nextwaiting);
- th->p_nextwaiting = *p;
- *p = th;
- }
- /* Wake up threads in priority order */
- while (towake != NULL) {
- th = towake;
- towake = towake->p_nextwaiting;
- th->p_nextwaiting = NULL;
- restart(th);
- }
-}
-
-compat_symbol (libpthread, __old_sem_init, sem_init, GLIBC_2_0);
-compat_symbol (libpthread, __old_sem_wait, sem_wait, GLIBC_2_0);
-compat_symbol (libpthread, __old_sem_trywait, sem_trywait, GLIBC_2_0);
-compat_symbol (libpthread, __old_sem_post, sem_post, GLIBC_2_0);
-compat_symbol (libpthread, __old_sem_getvalue, sem_getvalue, GLIBC_2_0);
-compat_symbol (libpthread, __old_sem_destroy, sem_destroy, GLIBC_2_0);
-
-#endif
diff --git a/newlib/libc/sys/linux/linuxthreads/posix-timer.h b/newlib/libc/sys/linux/linuxthreads/posix-timer.h
deleted file mode 100644
index 0596c18f4..000000000
--- a/newlib/libc/sys/linux/linuxthreads/posix-timer.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/* Definitions for POSIX timer implementation on top of LinuxThreads.
- Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Kaz Kylheku <kaz@ashi.footprints.net>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <limits.h>
-#include <signal.h>
-#include <linux/time.h>
-
-/* Double linked list. */
-struct list_links
-{
- struct list_links *next;
- struct list_links *prev;
-};
-
-
-/* Forward declaration. */
-struct timer_node;
-
-
-/* Definitions for an internal thread of the POSIX timer implementation. */
-struct thread_node
-{
- struct list_links links;
- pthread_attr_t attr;
- pthread_t id;
- unsigned int exists;
- struct list_links timer_queue;
- pthread_cond_t cond;
- struct timer_node *current_timer;
- pthread_t captured;
- clockid_t clock_id;
-};
-
-
-/* Internal representation of a timer. */
-struct timer_node
-{
- struct list_links links;
- struct sigevent event;
- clockid_t clock;
- struct itimerspec value;
- struct timespec expirytime;
- pthread_attr_t attr;
- unsigned int abstime;
- unsigned int armed;
- enum {
- TIMER_FREE, TIMER_INUSE, TIMER_DELETED
- } inuse;
- struct thread_node *thread;
- pid_t creator_pid;
- int refcount;
-};
-
-
-/* Static array with the structures for all the timers. */
-extern struct timer_node __timer_array[TIMER_MAX];
-
-/* Global lock to protect operation on the lists. */
-extern pthread_mutex_t __timer_mutex;
-
-/* Variable to protext initialization. */
-extern pthread_once_t __timer_init_once_control;
-
-/* Nonzero if initialization of timer implementation failed. */
-extern int __timer_init_failed;
-
-/* Nodes for the threads used to deliver signals. */
-/* A distinct thread is used for each clock type. */
-
-extern struct thread_node __timer_signal_thread_rclk;
-#ifdef _POSIX_CPUTIME
-extern struct thread_node __timer_signal_thread_pclk;
-#endif
-#ifdef _POSIX_THREAD_CPUTIME
-extern struct thread_node __timer_signal_thread_tclk;
-#endif
-
-
-/* Return pointer to timer structure corresponding to ID. */
-static inline struct timer_node *
-timer_id2ptr (timer_t timerid)
-{
- if (timerid >= 0 && timerid < TIMER_MAX)
- return &__timer_array[timerid];
-
- return NULL;
-}
-
-/* Return ID of TIMER. */
-static inline int
-timer_ptr2id (struct timer_node *timer)
-{
- return timer - __timer_array;
-}
-
-/* Check whether timer is valid; global mutex must be held. */
-static inline int
-timer_valid (struct timer_node *timer)
-{
- return timer && timer->inuse == TIMER_INUSE;
-}
-
-/* Timer refcount functions; need global mutex. */
-extern void __timer_dealloc (struct timer_node *timer);
-
-static inline void
-timer_addref (struct timer_node *timer)
-{
- timer->refcount++;
-}
-
-static inline void
-timer_delref (struct timer_node *timer)
-{
- if (--timer->refcount == 0)
- __timer_dealloc (timer);
-}
-
-/* Timespec helper routines. */
-static inline int
-timespec_compare (const struct timespec *left, const struct timespec *right)
-{
- if (left->tv_sec < right->tv_sec)
- return -1;
- if (left->tv_sec > right->tv_sec)
- return 1;
-
- if (left->tv_nsec < right->tv_nsec)
- return -1;
- if (left->tv_nsec > right->tv_nsec)
- return 1;
-
- return 0;
-}
-
-static inline void
-timespec_add (struct timespec *sum, const struct timespec *left,
- const struct timespec *right)
-{
- sum->tv_sec = left->tv_sec + right->tv_sec;
- sum->tv_nsec = left->tv_nsec + right->tv_nsec;
-
- if (sum->tv_nsec >= 1000000000)
- {
- ++sum->tv_sec;
- sum->tv_nsec -= 1000000000;
- }
-}
-
-static inline void
-timespec_sub (struct timespec *diff, const struct timespec *left,
- const struct timespec *right)
-{
- diff->tv_sec = left->tv_sec - right->tv_sec;
- diff->tv_nsec = left->tv_nsec - right->tv_nsec;
-
- if (diff->tv_nsec < 0)
- {
- --diff->tv_sec;
- diff->tv_nsec += 1000000000;
- }
-}
-
-
-/* We need one of the list functions in the other modules. */
-static inline void
-list_unlink_ip (struct list_links *list)
-{
- struct list_links *lnext = list->next, *lprev = list->prev;
-
- lnext->prev = lprev;
- lprev->next = lnext;
-
- /* The suffix ip means idempotent; list_unlink_ip can be called
- * two or more times on the same node.
- */
-
- list->next = list;
- list->prev = list;
-}
-
-
-/* Functions in the helper file. */
-extern void __timer_mutex_cancel_handler (void *arg);
-extern void __timer_init_once (void);
-extern struct timer_node *__timer_alloc (void);
-extern int __timer_thread_start (struct thread_node *thread);
-extern struct thread_node *__timer_thread_find_matching (const pthread_attr_t *desired_attr, clockid_t);
-extern struct thread_node *__timer_thread_alloc (const pthread_attr_t *desired_attr, clockid_t);
-extern void __timer_thread_dealloc (struct thread_node *thread);
-extern int __timer_thread_queue_timer (struct thread_node *thread,
- struct timer_node *insert);
-extern void __timer_thread_wakeup (struct thread_node *thread);
diff --git a/newlib/libc/sys/linux/linuxthreads/prio.c b/newlib/libc/sys/linux/linuxthreads/prio.c
deleted file mode 100644
index 475371176..000000000
--- a/newlib/libc/sys/linux/linuxthreads/prio.c
+++ /dev/null
@@ -1,65 +0,0 @@
-#include <stddef.h>
-#include <unistd.h>
-#include <errno.h>
-#include "pthread.h"
-#include "internals.h"
-#include <bits/posix_opt.h>
-
-#ifndef _POSIX_THREAD_PRIO_PROTECT
-int
-__pthread_mutexattr_getprotocol (const pthread_mutexattr_t *attr,
- int *priority)
-{
- errno = ENOSYS;
- return ENOSYS;
-}
-weak_alias(__pthread_mutexattr_getprotocol,pthread_mutexattr_getprotocol)
-
-int
-__pthread_mutexattr_setprotocol (pthread_mutexattr_t *attr,
- int priority)
-{
- errno = ENOSYS;
- return ENOSYS;
-}
-weak_alias(__pthread_mutexattr_setprotocol,pthread_mutexattr_setprotocol)
-
-int
-__pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *attr,
- int *prioceiling)
-{
- errno = ENOSYS;
- return ENOSYS;
-}
-weak_alias(__pthread_mutexattr_getprioceiling,pthread_mutexattr_getprioceiling)
-
-int
-__pthread_mutexattr_setprioceiling (pthread_mutexattr_t *attr,
- int prioceiling)
-{
- errno = ENOSYS;
- return ENOSYS;
-}
-weak_alias(__pthread_mutexattr_setprioceiling,pthread_mutexattr_setprioceiling)
-#endif /* !_POSIX_THREAD_PRIO_PROTECT */
-
-#if !defined(_POSIX_THREAD_PRIO_PROTECT) && !defined(_POSIX_THREAD_PRIO_INHERIT)
-int
-__pthread_mutex_getprioceiling (const pthread_mutex_t *mutex,
- int *prioceiling)
-{
- errno = ENOSYS;
- return ENOSYS;
-}
-weak_alias(__pthread_mutex_getprioceiling,pthread_mutex_getprioceiling)
-
-int
-__pthread_mutex_setprioceiling (pthread_mutex_t *mutex,
- int prioceiling, int *oldceiling)
-{
- errno = ENOSYS;
- return ENOSYS;
-}
-weak_alias(__pthread_mutex_setprioceiling,pthread_mutex_setprioceiling)
-#endif /* !_POSIX_THREAD_PRIO_PROTECT && !_POSIX_THREAD_PRIO_INHERIT) */
-
diff --git a/newlib/libc/sys/linux/linuxthreads/proc_service.h b/newlib/libc/sys/linux/linuxthreads/proc_service.h
deleted file mode 100644
index 74136c03e..000000000
--- a/newlib/libc/sys/linux/linuxthreads/proc_service.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* The definitions in this file must correspond to those in the debugger. */
-#include <sys/procfs.h>
-
-typedef enum
-{
- PS_OK, /* generic "call succeeded" */
- PS_ERR, /* generic. */
- PS_BADPID, /* bad process handle */
- PS_BADLID, /* bad lwp identifier */
- PS_BADADDR, /* bad address */
- PS_NOSYM, /* p_lookup() could not find given symbol */
- PS_NOFREGS
- /*
- * FPU register set not available for given
- * lwp
- */
-} ps_err_e;
-
-
-struct ps_prochandle; /* user defined. */
-
-
-extern ps_err_e ps_pdread(struct ps_prochandle *,
- psaddr_t, void *, size_t);
-extern ps_err_e ps_pdwrite(struct ps_prochandle *,
- psaddr_t, const void *, size_t);
-extern ps_err_e ps_ptread(struct ps_prochandle *,
- psaddr_t, void *, size_t);
-extern ps_err_e ps_ptwrite(struct ps_prochandle *,
- psaddr_t, const void *, size_t);
-
-extern ps_err_e ps_pglobal_lookup(struct ps_prochandle *,
- const char *object_name, const char *sym_name, psaddr_t *sym_addr);
-
-
-extern ps_err_e ps_lgetregs(struct ps_prochandle *,
- lwpid_t, prgregset_t);
-extern ps_err_e ps_lsetregs(struct ps_prochandle *,
- lwpid_t, const prgregset_t);
-extern ps_err_e ps_lgetfpregs(struct ps_prochandle *,
- lwpid_t, prfpregset_t *);
-extern ps_err_e ps_lsetfpregs(struct ps_prochandle *,
- lwpid_t, const prfpregset_t *);
-
-extern pid_t ps_getpid (struct ps_prochandle *);
-
-
-extern ps_err_e ps_pstop (const struct ps_prochandle *);
-extern ps_err_e ps_pcontinue (const struct ps_prochandle *);
-
-extern ps_err_e ps_lstop (const struct ps_prochandle *, lwpid_t);
-extern ps_err_e ps_lcontinue (const struct ps_prochandle *, lwpid_t);
diff --git a/newlib/libc/sys/linux/linuxthreads/pt-machine.c b/newlib/libc/sys/linux/linuxthreads/pt-machine.c
deleted file mode 100644
index f6298c47a..000000000
--- a/newlib/libc/sys/linux/linuxthreads/pt-machine.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* "Instantiation of machine-dependent pthreads inline functions.
- Copyright (C) 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#define PT_EI
-
-extern long int testandset (int *spinlock);
-extern int __compare_and_swap (long int *p, long int oldval, long int newval);
-
-#include <pt-machine.h>
diff --git a/newlib/libc/sys/linux/linuxthreads/ptclock_gettime.c b/newlib/libc/sys/linux/linuxthreads/ptclock_gettime.c
deleted file mode 100644
index 3323edbcd..000000000
--- a/newlib/libc/sys/linux/linuxthreads/ptclock_gettime.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <time.h>
-#include <libc-internal.h>
-#include "internals.h"
-
-
-#if HP_TIMING_AVAIL
-int
-__pthread_clock_gettime (hp_timing_t freq, struct timespec *tp)
-{
- hp_timing_t tsc;
- pthread_descr self = thread_self ();
-
- /* Get the current counter. */
- HP_TIMING_NOW (tsc);
-
- /* Compute the offset since the start time of the process. */
- tsc -= THREAD_GETMEM (self, p_cpuclock_offset);
-
- /* Compute the seconds. */
- tp->tv_sec = tsc / freq;
-
- /* And the nanoseconds. This computation should be stable until
- we get machines with about 16GHz frequency. */
- tp->tv_nsec = ((tsc % freq) * 1000000000ull) / freq;
-
- return 0;
-}
-#endif
diff --git a/newlib/libc/sys/linux/linuxthreads/ptclock_settime.c b/newlib/libc/sys/linux/linuxthreads/ptclock_settime.c
deleted file mode 100644
index e293e0dfb..000000000
--- a/newlib/libc/sys/linux/linuxthreads/ptclock_settime.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <time.h>
-#include <libc-internal.h>
-#include "internals.h"
-
-
-#if HP_TIMING_AVAIL
-void
-__pthread_clock_settime (hp_timing_t offset)
-{
- pthread_descr self = thread_self ();
-
- /* Compute the offset since the start time of the process. */
- THREAD_SETMEM (self, p_cpuclock_offset, offset);
-}
-#endif
diff --git a/newlib/libc/sys/linux/linuxthreads/ptfork.c b/newlib/libc/sys/linux/linuxthreads/ptfork.c
deleted file mode 100644
index 6e31b772c..000000000
--- a/newlib/libc/sys/linux/linuxthreads/ptfork.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-/* The "atfork" stuff */
-
-#include <errno.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include "pthread.h"
-#include "internals.h"
-#include <bits/libc-lock.h>
-
-struct handler_list {
- void (*handler)(void);
- struct handler_list * next;
-};
-
-static pthread_mutex_t pthread_atfork_lock = PTHREAD_MUTEX_INITIALIZER;
-static struct handler_list * pthread_atfork_prepare = NULL;
-static struct handler_list * pthread_atfork_parent = NULL;
-static struct handler_list * pthread_atfork_child = NULL;
-
-static void pthread_insert_list(struct handler_list ** list,
- void (*handler)(void),
- struct handler_list * newlist,
- int at_end)
-{
- if (handler == NULL) return;
- if (at_end) {
- while(*list != NULL) list = &((*list)->next);
- }
- newlist->handler = handler;
- newlist->next = *list;
- *list = newlist;
-}
-
-struct handler_list_block {
- struct handler_list prepare, parent, child;
-};
-
-int __pthread_atfork(void (*prepare)(void),
- void (*parent)(void),
- void (*child)(void))
-{
- struct handler_list_block * block =
- (struct handler_list_block *) malloc(sizeof(struct handler_list_block));
- if (block == NULL) return ENOMEM;
- pthread_mutex_lock(&pthread_atfork_lock);
- /* "prepare" handlers are called in LIFO */
- pthread_insert_list(&pthread_atfork_prepare, prepare, &block->prepare, 0);
- /* "parent" handlers are called in FIFO */
- pthread_insert_list(&pthread_atfork_parent, parent, &block->parent, 1);
- /* "child" handlers are called in FIFO */
- pthread_insert_list(&pthread_atfork_child, child, &block->child, 1);
- pthread_mutex_unlock(&pthread_atfork_lock);
- return 0;
-}
-strong_alias (__pthread_atfork, pthread_atfork)
-
-static inline void pthread_call_handlers(struct handler_list * list)
-{
- for (/*nothing*/; list != NULL; list = list->next) (list->handler)();
-}
-
-extern int __libc_fork(void);
-
-pid_t __fork(void)
-{
- pid_t pid;
-
- pthread_mutex_lock(&pthread_atfork_lock);
-
- pthread_call_handlers(pthread_atfork_prepare);
- __pthread_once_fork_prepare();
- __flockfilelist();
-
- pid = __libc_fork();
-
- if (pid == 0) {
- __pthread_reset_main_thread();
-
- __fresetlockfiles();
- __pthread_once_fork_child();
- pthread_call_handlers(pthread_atfork_child);
-
- pthread_mutex_init(&pthread_atfork_lock, NULL);
- } else {
- __funlockfilelist();
- __pthread_once_fork_parent();
- pthread_call_handlers(pthread_atfork_parent);
-
- pthread_mutex_unlock(&pthread_atfork_lock);
- }
-
- return pid;
-}
-
-weak_alias (__fork, fork);
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 4
-
-pid_t __vfork(void)
-{
- return __fork();
-}
-weak_alias (__vfork, vfork);
-
-#endif /* !_ELIX_LEVEL || _ELIX_LEVEL >= 4 */
diff --git a/newlib/libc/sys/linux/linuxthreads/pthread.c b/newlib/libc/sys/linux/linuxthreads/pthread.c
deleted file mode 100644
index b42d9d60a..000000000
--- a/newlib/libc/sys/linux/linuxthreads/pthread.c
+++ /dev/null
@@ -1,1248 +0,0 @@
-
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-/* Thread creation, initialization, and basic low-level routines */
-
-#include <errno.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/wait.h>
-#include <sys/resource.h>
-#include <sys/sysctl.h>
-#include <shlib-compat.h>
-#include "pthread.h"
-#include "internals.h"
-#include "spinlock.h"
-#include "restart.h"
-#include <machine/syscall.h>
-
-/* for threading we use processes so we require a few EL/IX level 2 and
- level 3 syscalls. We only allow this file to see them to preserve
- the interface. */
-#if defined(_ELIX_LEVEL) && _ELIX_LEVEL < 3
-static _syscall1_base(int,pipe,int *,filedes)
-#endif /* _ELIX_LEVEL < 3 */
-
-#if defined(_ELIX_LEVEL) && _ELIX_LEVEL < 2
-static _syscall2_base(int,setrlimit,int,resource,const struct rlimit *,rlp)
-int on_exit (void (*fn)(int, void *), void *arg)
-{
- register struct _atexit *p;
- void (*x)(void) = (void (*)(void))fn;
-
-/* _REENT_SMALL on_exit() doesn't allow more than the required 32 entries. */
-#ifndef _REENT_SMALL
- if ((p = _REENT->_atexit) == NULL)
- _REENT->_atexit = p = &_REENT->_atexit0;
- if (p->_ind >= _ATEXIT_SIZE)
- {
- if ((p = (struct _atexit *) malloc (sizeof *p)) == NULL)
- return -1;
- p->_ind = 0;
- p->_fntypes = 0;
- p->_next = _REENT->_atexit;
- _REENT->_atexit = p;
- }
-#else
- p = &_REENT->_atexit;
- if (p->_ind >= _ATEXIT_SIZE)
- return -1;
-#endif
- p->_fntypes |= (1 << p->_ind);
- p->_fnargs[p->_ind] = arg;
- p->_fns[p->_ind++] = x;
- return 0;
-}
-
-#endif /* _ELIX_LEVEL < 2 */
-
-/* We need the global/static resolver state here. */
-#include <resolv.h>
-#undef _res
-
-/* FIXME: for now, set up _res here */
-struct __res_state _res;
-
-/* Sanity check. */
-#if __ASSUME_REALTIME_SIGNALS && !defined __SIGRTMIN
-# error "This must not happen; new kernel assumed but old headers"
-#endif
-
-/* These variables are used by the setup code. */
-
-/* Descriptor of the initial thread */
-
-struct _pthread_descr_struct __pthread_initial_thread = {
- {
- {
- &__pthread_initial_thread /* pthread_descr self */
- }
- },
- &__pthread_initial_thread, /* pthread_descr p_nextlive */
- &__pthread_initial_thread, /* pthread_descr p_prevlive */
- NULL, /* pthread_descr p_nextwaiting */
- NULL, /* pthread_descr p_nextlock */
- PTHREAD_THREADS_MAX, /* pthread_t p_tid */
- 0, /* int p_pid */
- 0, /* int p_priority */
- &__pthread_handles[0].h_lock, /* struct _pthread_fastlock * p_lock */
- 0, /* int p_signal */
- NULL, /* sigjmp_buf * p_signal_buf */
- NULL, /* sigjmp_buf * p_cancel_buf */
- 0, /* char p_terminated */
- 0, /* char p_detached */
- 0, /* char p_exited */
- NULL, /* void * p_retval */
- 0, /* int p_retval */
- NULL, /* pthread_descr p_joining */
- NULL, /* struct _pthread_cleanup_buffer * p_cleanup */
- 0, /* char p_cancelstate */
- 0, /* char p_canceltype */
- 0, /* char p_canceled */
- &__pthread_initial_thread.p_reent, /* struct _reent *p_reentp */
- _REENT_INIT(__pthread_initial_thread.p_reent), /* struct _reent p_reent */
- NULL, /* int *p_h_errnop */
- 0, /* int p_h_errno */
- NULL, /* char * p_in_sighandler */
- 0, /* char p_sigwaiting */
- PTHREAD_START_ARGS_INITIALIZER(NULL),
- /* struct pthread_start_args p_start_args */
- {NULL}, /* void ** p_specific[PTHREAD_KEY_1STLEVEL_SIZE] */
- {NULL}, /* void * p_libc_specific[_LIBC_TSD_KEY_N] */
- 1, /* int p_userstack */
- NULL, /* void * p_guardaddr */
- 0, /* size_t p_guardsize */
- 0, /* Always index 0 */
- 0, /* int p_report_events */
- {{{0, }}, 0, NULL}, /* td_eventbuf_t p_eventbuf */
- __ATOMIC_INITIALIZER, /* struct pthread_atomic p_resume_count */
- 0, /* char p_woken_by_cancel */
- 0, /* char p_condvar_avail */
- 0, /* char p_sem_avail */
- NULL, /* struct pthread_extricate_if *p_extricate */
- NULL, /* pthread_readlock_info *p_readlock_list; */
- NULL, /* pthread_readlock_info *p_readlock_free; */
- 0 /* int p_untracked_readlock_count; */
-};
-
-/* Descriptor of the manager thread; none of this is used but the error
- variables, the p_pid and p_priority fields,
- and the address for identification. */
-
-struct _pthread_descr_struct __pthread_manager_thread = {
- {
- {
- &__pthread_manager_thread /* pthread_descr self */
- }
- },
- NULL, /* pthread_descr p_nextlive */
- NULL, /* pthread_descr p_prevlive */
- NULL, /* pthread_descr p_nextwaiting */
- NULL, /* pthread_descr p_nextlock */
- 0, /* int p_tid */
- 0, /* int p_pid */
- 0, /* int p_priority */
- &__pthread_handles[1].h_lock, /* struct _pthread_fastlock * p_lock */
- 0, /* int p_signal */
- NULL, /* sigjmp_buf * p_signal_buf */
- NULL, /* sigjmp_buf * p_cancel_buf */
- 0, /* char p_terminated */
- 0, /* char p_detached */
- 0, /* char p_exited */
- NULL, /* void * p_retval */
- 0, /* int p_retval */
- NULL, /* pthread_descr p_joining */
- NULL, /* struct _pthread_cleanup_buffer * p_cleanup */
- 0, /* char p_cancelstate */
- 0, /* char p_canceltype */
- 0, /* char p_canceled */
- &__pthread_manager_thread.p_reent, /* struct _reent *p_reentp */
- _REENT_INIT(__pthread_manager_thread.p_reent), /* struct _reent p_reent */
- NULL, /* int *p_h_errnop */
- 0, /* int p_h_errno */
- NULL, /* char * p_in_sighandler */
- 0, /* char p_sigwaiting */
- PTHREAD_START_ARGS_INITIALIZER(__pthread_manager),
- /* struct pthread_start_args p_start_args */
- {NULL}, /* void ** p_specific[PTHREAD_KEY_1STLEVEL_SIZE] */
- {NULL}, /* void * p_libc_specific[_LIBC_TSD_KEY_N] */
- 0, /* int p_userstack */
- NULL, /* void * p_guardaddr */
- 0, /* size_t p_guardsize */
- 1, /* Always index 1 */
- 0, /* int p_report_events */
- {{{0, }}, 0, NULL}, /* td_eventbuf_t p_eventbuf */
- __ATOMIC_INITIALIZER, /* struct pthread_atomic p_resume_count */
- 0, /* char p_woken_by_cancel */
- 0, /* char p_condvar_avail */
- 0, /* char p_sem_avail */
- NULL, /* struct pthread_extricate_if *p_extricate */
- NULL, /* pthread_readlock_info *p_readlock_list; */
- NULL, /* pthread_readlock_info *p_readlock_free; */
- 0 /* int p_untracked_readlock_count; */
-};
-
-/* Pointer to the main thread (the father of the thread manager thread) */
-/* Originally, this is the initial thread, but this changes after fork() */
-
-pthread_descr __pthread_main_thread = &__pthread_initial_thread;
-
-/* Limit between the stack of the initial thread (above) and the
- stacks of other threads (below). Aligned on a STACK_SIZE boundary. */
-
-char *__pthread_initial_thread_bos;
-
-/* File descriptor for sending requests to the thread manager. */
-/* Initially -1, meaning that the thread manager is not running. */
-
-int __pthread_manager_request = -1;
-
-/* Other end of the pipe for sending requests to the thread manager. */
-
-int __pthread_manager_reader;
-
-/* Limits of the thread manager stack */
-
-char *__pthread_manager_thread_bos;
-char *__pthread_manager_thread_tos;
-
-/* For process-wide exit() */
-
-int __pthread_exit_requested;
-int __pthread_exit_code;
-
-/* Maximum stack size. */
-size_t __pthread_max_stacksize;
-
-/* Nozero if the machine has more than one processor. */
-int __pthread_smp_kernel;
-
-
-#if !__ASSUME_REALTIME_SIGNALS
-/* Pointers that select new or old suspend/resume functions
- based on availability of rt signals. */
-
-void (*__pthread_restart)(pthread_descr) = __pthread_restart_old;
-void (*__pthread_suspend)(pthread_descr) = __pthread_suspend_old;
-int (*__pthread_timedsuspend)(pthread_descr, const struct timespec *) = __pthread_timedsuspend_old;
-#endif /* __ASSUME_REALTIME_SIGNALS */
-
-/* Communicate relevant LinuxThreads constants to gdb */
-
-const int __pthread_threads_max = PTHREAD_THREADS_MAX;
-const int __pthread_sizeof_handle = sizeof(struct pthread_handle_struct);
-const int __pthread_offsetof_descr = offsetof(struct pthread_handle_struct,
- h_descr);
-const int __pthread_offsetof_pid = offsetof(struct _pthread_descr_struct,
- p_pid);
-const int __linuxthreads_pthread_sizeof_descr
- = sizeof(struct _pthread_descr_struct);
-
-/* Forward declarations */
-
-static void pthread_onexit_process(int retcode, void *arg);
-#ifndef HAVE_Z_NODELETE
-static void pthread_atexit_process(void *arg, int retcode);
-static void pthread_atexit_retcode(void *arg, int retcode);
-#endif
-static void pthread_handle_sigcancel(int sig);
-static void pthread_handle_sigrestart(int sig);
-static void pthread_handle_sigdebug(int sig);
-
-/* CPU clock handling. */
-#if HP_TIMING_AVAIL
-extern hp_timing_t _dl_cpuclock_offset;
-#endif
-
-/* Signal numbers used for the communication.
- In these variables we keep track of the used variables. If the
- platform does not support any real-time signals we will define the
- values to some unreasonable value which will signal failing of all
- the functions below. */
-#ifndef __SIGRTMIN
-static int current_rtmin = -1;
-static int current_rtmax = -1;
-int __pthread_sig_restart = SIGUSR1;
-int __pthread_sig_cancel = SIGUSR2;
-int __pthread_sig_debug;
-#else
-static int current_rtmin;
-static int current_rtmax;
-
-#if __SIGRTMAX - __SIGRTMIN >= 3
-int __pthread_sig_restart = __SIGRTMIN;
-int __pthread_sig_cancel = __SIGRTMIN + 1;
-int __pthread_sig_debug = __SIGRTMIN + 2;
-#else
-int __pthread_sig_restart = SIGUSR1;
-int __pthread_sig_cancel = SIGUSR2;
-int __pthread_sig_debug;
-#endif
-
-static int rtsigs_initialized;
-
-#if !__ASSUME_REALTIME_SIGNALS
-# include "testrtsig.h"
-#endif
-
-static void
-init_rtsigs (void)
-{
-#if !__ASSUME_REALTIME_SIGNALS
- if (__builtin_expect (!kernel_has_rtsig (), 0))
- {
- current_rtmin = -1;
- current_rtmax = -1;
-# if __SIGRTMAX - __SIGRTMIN >= 3
- __pthread_sig_restart = SIGUSR1;
- __pthread_sig_cancel = SIGUSR2;
- __pthread_sig_debug = 0;
-# endif
- }
- else
-#endif /* __ASSUME_REALTIME_SIGNALS */
- {
-#if __SIGRTMAX - __SIGRTMIN >= 3
- current_rtmin = __SIGRTMIN + 3;
-# if !__ASSUME_REALTIME_SIGNALS
- __pthread_restart = __pthread_restart_new;
- __pthread_suspend = __pthread_wait_for_restart_signal;
- __pthread_timedsuspend = __pthread_timedsuspend_new;
-# endif /* __ASSUME_REALTIME_SIGNALS */
-#else
- current_rtmin = __SIGRTMIN;
-#endif
-
- current_rtmax = __SIGRTMAX;
- }
-
- rtsigs_initialized = 1;
-}
-#endif
-
-/* Return number of available real-time signal with highest priority. */
-int
-__libc_current_sigrtmin (void)
-{
-#ifdef __SIGRTMIN
- if (__builtin_expect (!rtsigs_initialized, 0))
- init_rtsigs ();
-#endif
- return current_rtmin;
-}
-
-/* Return number of available real-time signal with lowest priority. */
-int
-__libc_current_sigrtmax (void)
-{
-#ifdef __SIGRTMIN
- if (__builtin_expect (!rtsigs_initialized, 0))
- init_rtsigs ();
-#endif
- return current_rtmax;
-}
-
-/* Allocate real-time signal with highest/lowest available
- priority. Please note that we don't use a lock since we assume
- this function to be called at program start. */
-int
-__libc_allocate_rtsig (int high)
-{
-#ifndef __SIGRTMIN
- return -1;
-#else
- if (__builtin_expect (!rtsigs_initialized, 0))
- init_rtsigs ();
- if (__builtin_expect (current_rtmin == -1, 0)
- || __builtin_expect (current_rtmin > current_rtmax, 0))
- /* We don't have anymore signal available. */
- return -1;
-
- return high ? current_rtmin++ : current_rtmax--;
-#endif
-}
-
-/* The function we use to get the kernel revision. */
-extern int __sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
- void *newval, size_t newlen);
-
-/* Test whether the machine has more than one processor. This is not the
- best test but good enough. More complicated tests would require `malloc'
- which is not available at that time. */
-static int
-is_smp_system (void)
-{
- static const int sysctl_args[] = { CTL_KERN, KERN_VERSION };
- char buf[512];
- size_t reslen = sizeof (buf);
-
- /* Try reading the number using `sysctl' first. */
- if (__sysctl ((int *) sysctl_args,
- sizeof (sysctl_args) / sizeof (sysctl_args[0]),
- buf, &reslen, NULL, 0) < 0)
- {
- /* This was not successful. Now try reading the /proc filesystem. */
- int fd = __open ("/proc/sys/kernel/version", O_RDONLY);
- if (__builtin_expect (fd, 0) == -1
- || (reslen = __read (fd, buf, sizeof (buf))) <= 0)
- /* This also didn't work. We give up and say it's a UP machine. */
- buf[0] = '\0';
-
- __close (fd);
- }
-
- return strstr (buf, "SMP") != NULL;
-}
-
-
-/* Initialize the pthread library.
- Initialization is split in two functions:
- - a constructor function that blocks the __pthread_sig_restart signal
- (must do this very early, since the program could capture the signal
- mask with e.g. sigsetjmp before creating the first thread);
- - a regular function called from pthread_create when needed. */
-
-static void pthread_initialize(void) __attribute__((constructor));
-
-#ifndef HAVE_Z_NODELETE
-extern void *__dso_handle __attribute__ ((weak));
-#endif
-
-
-/* Do some minimal initialization which has to be done during the
- startup of the C library. */
-void
-__pthread_initialize_minimal(void)
-{
- /* If we have special thread_self processing, initialize that for the
- main thread now. */
-#ifdef INIT_THREAD_SELF
- INIT_THREAD_SELF(&__pthread_initial_thread, 0);
-#endif
-#if HP_TIMING_AVAIL
- __pthread_initial_thread.p_cpuclock_offset = _dl_cpuclock_offset;
-#endif
-}
-
-
-void
-__pthread_init_max_stacksize(void)
-{
- struct rlimit limit;
- size_t max_stack;
-
- getrlimit(RLIMIT_STACK, &limit);
-#ifdef FLOATING_STACKS
- if (limit.rlim_cur == RLIM_INFINITY)
- limit.rlim_cur = ARCH_STACK_MAX_SIZE;
-# ifdef NEED_SEPARATE_REGISTER_STACK
- max_stack = limit.rlim_cur / 2;
-# else
- max_stack = limit.rlim_cur;
-# endif
-#else
- /* Play with the stack size limit to make sure that no stack ever grows
- beyond STACK_SIZE minus one page (to act as a guard page). */
-# ifdef NEED_SEPARATE_REGISTER_STACK
- /* STACK_SIZE bytes hold both the main stack and register backing
- store. The rlimit value applies to each individually. */
- max_stack = STACK_SIZE/2 - __getpagesize ();
-# else
- max_stack = STACK_SIZE - __getpagesize();
-# endif
- if (limit.rlim_cur > max_stack) {
- limit.rlim_cur = max_stack;
- __libc_setrlimit(RLIMIT_STACK, &limit);
- }
-#endif
- __pthread_max_stacksize = max_stack;
-}
-
-
-static void pthread_initialize(void)
-{
- struct sigaction sa;
- sigset_t mask;
-
- /* If already done (e.g. by a constructor called earlier!), bail out */
- if (__pthread_initial_thread_bos != NULL) return;
-#ifdef TEST_FOR_COMPARE_AND_SWAP
- /* Test if compare-and-swap is available */
- __pthread_has_cas = compare_and_swap_is_available();
-#endif
-#ifdef FLOATING_STACKS
- /* We don't need to know the bottom of the stack. Give the pointer some
- value to signal that initialization happened. */
- __pthread_initial_thread_bos = (void *) -1l;
-#else
- /* Determine stack size limits . */
- __pthread_init_max_stacksize ();
-# ifdef _STACK_GROWS_UP
- /* The initial thread already has all the stack it needs */
- __pthread_initial_thread_bos = (char *)
- ((long)CURRENT_STACK_FRAME &~ (STACK_SIZE - 1));
-# else
- /* For the initial stack, reserve at least STACK_SIZE bytes of stack
- below the current stack address, and align that on a
- STACK_SIZE boundary. */
- __pthread_initial_thread_bos =
- (char *)(((long)CURRENT_STACK_FRAME - 2 * STACK_SIZE) & ~(STACK_SIZE - 1));
-# endif
-#endif
- /* Update the descriptor for the initial thread. */
- __pthread_initial_thread.p_pid = __getpid();
- /* Likewise for the resolver state _res. */
- __pthread_initial_thread.p_resp = &_res;
-#ifdef __SIGRTMIN
- /* Initialize real-time signals. */
- init_rtsigs ();
-#endif
- /* Setup signal handlers for the initial thread.
- Since signal handlers are shared between threads, these settings
- will be inherited by all other threads. */
- sa.sa_handler = pthread_handle_sigrestart;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
- __libc_sigaction(__pthread_sig_restart, &sa, NULL);
- sa.sa_handler = pthread_handle_sigcancel;
- // sa.sa_flags = 0;
- __libc_sigaction(__pthread_sig_cancel, &sa, NULL);
- if (__pthread_sig_debug > 0) {
- sa.sa_handler = pthread_handle_sigdebug;
- sigemptyset(&sa.sa_mask);
- // sa.sa_flags = 0;
- __libc_sigaction(__pthread_sig_debug, &sa, NULL);
- }
- /* Initially, block __pthread_sig_restart. Will be unblocked on demand. */
- sigemptyset(&mask);
- sigaddset(&mask, __pthread_sig_restart);
- sigprocmask(SIG_BLOCK, &mask, NULL);
- /* Register an exit function to kill all other threads. */
- /* Do it early so that user-registered atexit functions are called
- before pthread_*exit_process. */
-#ifndef HAVE_Z_NODELETE
- if (__builtin_expect (&__dso_handle != NULL, 1))
- __cxa_atexit ((void (*) (void *)) pthread_atexit_process, NULL,
- __dso_handle);
- else
-#endif
- on_exit (pthread_onexit_process, NULL);
- /* How many processors. */
- __pthread_smp_kernel = is_smp_system ();
-}
-
-void __pthread_initialize(void)
-{
- pthread_initialize();
-}
-
-int __pthread_initialize_manager(void)
-{
- int manager_pipe[2];
- int pid;
- struct pthread_request request;
-
-#ifndef HAVE_Z_NODELETE
- if (__builtin_expect (&__dso_handle != NULL, 1))
- __cxa_atexit ((void (*) (void *)) pthread_atexit_retcode, NULL,
- __dso_handle);
-#endif
-
- if (__pthread_max_stacksize == 0)
- __pthread_init_max_stacksize ();
- /* If basic initialization not done yet (e.g. we're called from a
- constructor run before our constructor), do it now */
- if (__pthread_initial_thread_bos == NULL) pthread_initialize();
- /* Setup stack for thread manager */
- __pthread_manager_thread_bos = malloc(THREAD_MANAGER_STACK_SIZE);
- if (__pthread_manager_thread_bos == NULL) return -1;
- __pthread_manager_thread_tos =
- __pthread_manager_thread_bos + THREAD_MANAGER_STACK_SIZE;
- /* Setup pipe to communicate with thread manager */
- if (__libc_pipe(manager_pipe) == -1) {
- free(__pthread_manager_thread_bos);
- return -1;
- }
- /* Start the thread manager */
- pid = 0;
- if (__builtin_expect (__pthread_initial_thread.p_report_events, 0))
- {
- /* It's a bit more complicated. We have to report the creation of
- the manager thread. */
- int idx = __td_eventword (TD_CREATE);
- uint32_t mask = __td_eventmask (TD_CREATE);
-
- if ((mask & (__pthread_threads_events.event_bits[idx]
- | __pthread_initial_thread.p_eventbuf.eventmask.event_bits[idx]))
- != 0)
- {
- __pthread_lock(__pthread_manager_thread.p_lock, NULL);
-
-#ifdef NEED_SEPARATE_REGISTER_STACK
- pid = __clone2(__pthread_manager_event,
- (void **) __pthread_manager_thread_bos,
- THREAD_MANAGER_STACK_SIZE,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND,
- (void *)(long)manager_pipe[0]);
-#elif _STACK_GROWS_UP
- pid = __clone(__pthread_manager_event,
- (void **) __pthread_manager_thread_bos,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND,
- (void *)(long)manager_pipe[0]);
-#else
- pid = __clone(__pthread_manager_event,
- (void **) __pthread_manager_thread_tos,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND,
- (void *)(long)manager_pipe[0]);
-#endif
-
- if (pid != -1)
- {
- /* Now fill in the information about the new thread in
- the newly created thread's data structure. We cannot let
- the new thread do this since we don't know whether it was
- already scheduled when we send the event. */
- __pthread_manager_thread.p_eventbuf.eventdata =
- &__pthread_manager_thread;
- __pthread_manager_thread.p_eventbuf.eventnum = TD_CREATE;
- __pthread_last_event = &__pthread_manager_thread;
- __pthread_manager_thread.p_tid = 2* PTHREAD_THREADS_MAX + 1;
- __pthread_manager_thread.p_pid = pid;
-
- /* Now call the function which signals the event. */
- __linuxthreads_create_event ();
- }
-
- /* Now restart the thread. */
- __pthread_unlock(__pthread_manager_thread.p_lock);
- }
- }
-
- if (__builtin_expect (pid, 0) == 0)
- {
-#ifdef NEED_SEPARATE_REGISTER_STACK
- pid = __clone2(__pthread_manager, (void **) __pthread_manager_thread_bos,
- THREAD_MANAGER_STACK_SIZE,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND,
- (void *)(long)manager_pipe[0]);
-#elif _STACK_GROWS_UP
- pid = __clone(__pthread_manager, (void **) __pthread_manager_thread_bos,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND,
- (void *)(long)manager_pipe[0]);
-#else
- pid = __clone(__pthread_manager, (void **) __pthread_manager_thread_tos,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND,
- (void *)(long)manager_pipe[0]);
-#endif
- }
- if (__builtin_expect (pid, 0) == -1) {
- free(__pthread_manager_thread_bos);
- __libc_close(manager_pipe[0]);
- __libc_close(manager_pipe[1]);
- return -1;
- }
- __pthread_manager_request = manager_pipe[1]; /* writing end */
- __pthread_manager_reader = manager_pipe[0]; /* reading end */
- __pthread_manager_thread.p_tid = 2* PTHREAD_THREADS_MAX + 1;
- __pthread_manager_thread.p_pid = pid;
- /* Make gdb aware of new thread manager */
- if (__builtin_expect (__pthread_threads_debug, 0) && __pthread_sig_debug > 0)
- {
- raise(__pthread_sig_debug);
- /* We suspend ourself and gdb will wake us up when it is
- ready to handle us. */
- __pthread_wait_for_restart_signal(thread_self());
- }
- /* Synchronize debugging of the thread manager */
- request.req_kind = REQ_DEBUG;
- TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
- (char *) &request, sizeof(request)));
- return 0;
-}
-
-/* Thread creation */
-
-int __pthread_create_2_1(pthread_t *thread, const pthread_attr_t *attr,
- void * (*start_routine)(void *), void *arg)
-{
- pthread_descr self = thread_self();
- struct pthread_request request;
- int retval;
- if (__builtin_expect (__pthread_manager_request, 0) < 0) {
- if (__pthread_initialize_manager() < 0) return EAGAIN;
- }
- request.req_thread = self;
- request.req_kind = REQ_CREATE;
- request.req_args.create.attr = attr;
- request.req_args.create.fn = start_routine;
- request.req_args.create.arg = arg;
- sigprocmask(SIG_SETMASK, (const sigset_t *) NULL,
- &request.req_args.create.mask);
- TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
- (char *) &request, sizeof(request)));
- suspend(self);
- retval = THREAD_GETMEM(self, p_retcode);
- if (__builtin_expect (retval, 0) == 0)
- *thread = (pthread_t) THREAD_GETMEM(self, p_retval);
- return retval;
-}
-
-versioned_symbol (libpthread, __pthread_create_2_1, pthread_create, GLIBC_2_1);
-
-#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1)
-
-int __pthread_create_2_0(pthread_t *thread, const pthread_attr_t *attr,
- void * (*start_routine)(void *), void *arg)
-{
- /* The ATTR attribute is not really of type `pthread_attr_t *'. It has
- the old size and access to the new members might crash the program.
- We convert the struct now. */
- pthread_attr_t new_attr;
-
- if (attr != NULL)
- {
- size_t ps = __getpagesize ();
-
- memcpy (&new_attr, attr,
- (size_t) &(((pthread_attr_t*)NULL)->__guardsize));
- new_attr.__guardsize = ps;
- new_attr.__stackaddr_set = 0;
- new_attr.__stackaddr = NULL;
- new_attr.__stacksize = STACK_SIZE - ps;
- attr = &new_attr;
- }
- return __pthread_create_2_1 (thread, attr, start_routine, arg);
-}
-compat_symbol (libpthread, __pthread_create_2_0, pthread_create, GLIBC_2_0);
-#endif
-
-/* Simple operations on thread identifiers */
-
-pthread_t pthread_self(void)
-{
- pthread_descr self = thread_self();
- return THREAD_GETMEM(self, p_tid);
-}
-
-int pthread_equal(pthread_t thread1, pthread_t thread2)
-{
- return thread1 == thread2;
-}
-
-/* Helper function for thread_self in the case of user-provided stacks */
-
-#ifndef THREAD_SELF
-
-pthread_descr __pthread_find_self(void)
-{
- char * sp = CURRENT_STACK_FRAME;
- pthread_handle h;
-
- /* __pthread_handles[0] is the initial thread, __pthread_handles[1] is
- the manager threads handled specially in thread_self(), so start at 2 */
- h = __pthread_handles + 2;
- while (! (sp <= (char *) h->h_descr && sp >= h->h_bottom)) h++;
- return h->h_descr;
-}
-
-#else
-
-static pthread_descr thread_self_stack(void)
-{
- char *sp = CURRENT_STACK_FRAME;
- pthread_handle h;
-
- if (sp >= __pthread_manager_thread_bos && sp < __pthread_manager_thread_tos)
- return &__pthread_manager_thread;
- h = __pthread_handles + 2;
- while (! (sp <= (char *) h->h_descr && sp >= h->h_bottom))
- h++;
- return h->h_descr;
-}
-
-#endif
-
-/* Thread scheduling */
-
-int pthread_setschedparam(pthread_t thread, int policy,
- const struct sched_param *param)
-{
- pthread_handle handle = thread_handle(thread);
- pthread_descr th;
-
- __pthread_lock(&handle->h_lock, NULL);
- if (__builtin_expect (invalid_handle(handle, thread), 0)) {
- __pthread_unlock(&handle->h_lock);
- return ESRCH;
- }
- th = handle->h_descr;
- if (__builtin_expect (__sched_setscheduler(th->p_pid, policy, param) == -1,
- 0)) {
- __pthread_unlock(&handle->h_lock);
- return errno;
- }
- th->p_priority = policy == SCHED_OTHER ? 0 : param->sched_priority;
- __pthread_unlock(&handle->h_lock);
- if (__pthread_manager_request >= 0)
- __pthread_manager_adjust_prio(th->p_priority);
- return 0;
-}
-
-int pthread_getschedparam(pthread_t thread, int *policy,
- struct sched_param *param)
-{
- pthread_handle handle = thread_handle(thread);
- int pid, pol;
-
- __pthread_lock(&handle->h_lock, NULL);
- if (__builtin_expect (invalid_handle(handle, thread), 0)) {
- __pthread_unlock(&handle->h_lock);
- return ESRCH;
- }
- pid = handle->h_descr->p_pid;
- __pthread_unlock(&handle->h_lock);
- pol = __sched_getscheduler(pid);
- if (__builtin_expect (pol, 0) == -1) return errno;
- if (__sched_getparam(pid, param) == -1) return errno;
- *policy = pol;
- return 0;
-}
-
-int __pthread_yield (void)
-{
- /* For now this is equivalent with the POSIX call. */
- return sched_yield ();
-}
-weak_alias (__pthread_yield, pthread_yield)
-
-/* Process-wide exit() request */
-
-static void pthread_onexit_process(int retcode, void *arg)
-{
- if (__builtin_expect (__pthread_manager_request, 0) >= 0) {
- struct pthread_request request;
- pthread_descr self = thread_self();
-
- request.req_thread = self;
- request.req_kind = REQ_PROCESS_EXIT;
- request.req_args.exit.code = retcode;
- TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
- (char *) &request, sizeof(request)));
- suspend(self);
- /* Main thread should accumulate times for thread manager and its
- children, so that timings for main thread account for all threads. */
- if (self == __pthread_main_thread)
- {
- __waitpid(__pthread_manager_thread.p_pid, NULL, __WCLONE);
- /* Since all threads have been asynchronously terminated
- (possibly holding locks), free cannot be used any more. */
- /*free (__pthread_manager_thread_bos);*/
- __pthread_manager_thread_bos = __pthread_manager_thread_tos = NULL;
- }
- }
-}
-
-#ifndef HAVE_Z_NODELETE
-static int __pthread_atexit_retcode;
-
-static void pthread_atexit_process(void *arg, int retcode)
-{
- pthread_onexit_process (retcode ?: __pthread_atexit_retcode, arg);
-}
-
-static void pthread_atexit_retcode(void *arg, int retcode)
-{
- __pthread_atexit_retcode = retcode;
-}
-#endif
-
-/* The handler for the RESTART signal just records the signal received
- in the thread descriptor, and optionally performs a siglongjmp
- (for pthread_cond_timedwait). */
-
-static void pthread_handle_sigrestart(int sig)
-{
- pthread_descr self = thread_self();
- THREAD_SETMEM(self, p_signal, sig);
- if (THREAD_GETMEM(self, p_signal_jmp) != NULL)
- siglongjmp(*THREAD_GETMEM(self, p_signal_jmp), 1);
-}
-
-/* The handler for the CANCEL signal checks for cancellation
- (in asynchronous mode), for process-wide exit and exec requests.
- For the thread manager thread, redirect the signal to
- __pthread_manager_sighandler. */
-
-static void pthread_handle_sigcancel(int sig)
-{
- pthread_descr self = thread_self();
- sigjmp_buf * jmpbuf;
-
- if (self == &__pthread_manager_thread)
- {
-#ifdef THREAD_SELF
- /* A new thread might get a cancel signal before it is fully
- initialized, so that the thread register might still point to the
- manager thread. Double check that this is really the manager
- thread. */
- pthread_descr real_self = thread_self_stack();
- if (real_self == &__pthread_manager_thread)
- {
- __pthread_manager_sighandler(sig);
- return;
- }
- /* Oops, thread_self() isn't working yet.. */
- self = real_self;
-# ifdef INIT_THREAD_SELF
- INIT_THREAD_SELF(self, self->p_nr);
-# endif
-#else
- __pthread_manager_sighandler(sig);
- return;
-#endif
- }
- if (__builtin_expect (__pthread_exit_requested, 0)) {
- /* Main thread should accumulate times for thread manager and its
- children, so that timings for main thread account for all threads. */
- if (self == __pthread_main_thread)
- __waitpid(__pthread_manager_thread.p_pid, NULL, __WCLONE);
- _exit(__pthread_exit_code);
- }
- if (__builtin_expect (THREAD_GETMEM(self, p_canceled), 0)
- && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE) {
- if (THREAD_GETMEM(self, p_canceltype) == PTHREAD_CANCEL_ASYNCHRONOUS)
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
- jmpbuf = THREAD_GETMEM(self, p_cancel_jmp);
- if (jmpbuf != NULL) {
- THREAD_SETMEM(self, p_cancel_jmp, NULL);
- siglongjmp(*jmpbuf, 1);
- }
- }
-}
-
-/* Handler for the DEBUG signal.
- The debugging strategy is as follows:
- On reception of a REQ_DEBUG request (sent by new threads created to
- the thread manager under debugging mode), the thread manager throws
- __pthread_sig_debug to itself. The debugger (if active) intercepts
- this signal, takes into account new threads and continue execution
- of the thread manager by propagating the signal because it doesn't
- know what it is specifically done for. In the current implementation,
- the thread manager simply discards it. */
-
-static void pthread_handle_sigdebug(int sig)
-{
- /* Nothing */
-}
-
-/* Reset the state of the thread machinery after a fork().
- Close the pipe used for requests and set the main thread to the forked
- thread.
- Notice that we can't free the stack segments, as the forked thread
- may hold pointers into them. */
-
-void __pthread_reset_main_thread(void)
-{
- pthread_descr self = thread_self();
- struct rlimit limit;
-
- if (__pthread_manager_request != -1) {
- /* Free the thread manager stack */
- free(__pthread_manager_thread_bos);
- __pthread_manager_thread_bos = __pthread_manager_thread_tos = NULL;
- /* Close the two ends of the pipe */
- __libc_close(__pthread_manager_request);
- __libc_close(__pthread_manager_reader);
- __pthread_manager_request = __pthread_manager_reader = -1;
- }
-
- /* Update the pid of the main thread */
- THREAD_SETMEM(self, p_pid, __getpid());
- /* Make the forked thread the main thread */
- __pthread_main_thread = self;
- THREAD_SETMEM(self, p_nextlive, self);
- THREAD_SETMEM(self, p_prevlive, self);
- /* Now this thread modifies the global variables. */
- THREAD_SETMEM(self, p_resp, &_res);
-
- if (getrlimit (RLIMIT_STACK, &limit) == 0
- && limit.rlim_cur != limit.rlim_max) {
- limit.rlim_cur = limit.rlim_max;
- __libc_setrlimit(RLIMIT_STACK, &limit);
- }
-}
-
-/* Process-wide exec() request */
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 2
-
-void __pthread_kill_other_threads_np(void)
-{
- struct sigaction sa;
- /* Terminate all other threads and thread manager */
- pthread_onexit_process(0, NULL);
- /* Make current thread the main thread in case the calling thread
- changes its mind, does not exec(), and creates new threads instead. */
- __pthread_reset_main_thread();
-
- /* Reset the signal handlers behaviour for the signals the
- implementation uses since this would be passed to the new
- process. */
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
- sa.sa_handler = SIG_DFL;
- __libc_sigaction(__pthread_sig_restart, &sa, NULL);
- __libc_sigaction(__pthread_sig_cancel, &sa, NULL);
- if (__pthread_sig_debug > 0)
- __libc_sigaction(__pthread_sig_debug, &sa, NULL);
-}
-weak_alias (__pthread_kill_other_threads_np, pthread_kill_other_threads_np)
-
-#endif /* !_ELIX_LEVEL || _ELIX_LEVEL >= 2 */
-
-/* Concurrency symbol level. */
-static int current_level;
-
-int __pthread_setconcurrency(int level)
-{
- /* We don't do anything unless we have found a useful interpretation. */
- current_level = level;
- return 0;
-}
-weak_alias (__pthread_setconcurrency, pthread_setconcurrency)
-
-int __pthread_getconcurrency(void)
-{
- return current_level;
-}
-weak_alias (__pthread_getconcurrency, pthread_getconcurrency)
-
-/* Primitives for controlling thread execution */
-
-void __pthread_wait_for_restart_signal(pthread_descr self)
-{
- sigset_t mask;
-
- sigprocmask(SIG_SETMASK, NULL, &mask); /* Get current signal mask */
- sigdelset(&mask, __pthread_sig_restart); /* Unblock the restart signal */
- THREAD_SETMEM(self, p_signal, 0);
- do {
- sigsuspend(&mask); /* Wait for signal */
- } while (THREAD_GETMEM(self, p_signal) !=__pthread_sig_restart);
-
- READ_MEMORY_BARRIER(); /* See comment in __pthread_restart_new */
-}
-
-#if !__ASSUME_REALTIME_SIGNALS
-/* The _old variants are for 2.0 and early 2.1 kernels which don't have RT
- signals.
- On these kernels, we use SIGUSR1 and SIGUSR2 for restart and cancellation.
- Since the restart signal does not queue, we use an atomic counter to create
- queuing semantics. This is needed to resolve a rare race condition in
- pthread_cond_timedwait_relative. */
-
-void __pthread_restart_old(pthread_descr th)
-{
- if (atomic_increment(&th->p_resume_count) == -1)
- kill(th->p_pid, __pthread_sig_restart);
-}
-
-void __pthread_suspend_old(pthread_descr self)
-{
- if (atomic_decrement(&self->p_resume_count) <= 0)
- __pthread_wait_for_restart_signal(self);
-}
-
-int
-__pthread_timedsuspend_old(pthread_descr self, const struct timespec *abstime)
-{
- sigset_t unblock, initial_mask;
- int was_signalled = 0;
- sigjmp_buf jmpbuf;
-
- if (atomic_decrement(&self->p_resume_count) == 0) {
- /* Set up a longjmp handler for the restart signal, unblock
- the signal and sleep. */
-
- if (sigsetjmp(jmpbuf, 1) == 0) {
- THREAD_SETMEM(self, p_signal_jmp, &jmpbuf);
- THREAD_SETMEM(self, p_signal, 0);
- /* Unblock the restart signal */
- sigemptyset(&unblock);
- sigaddset(&unblock, __pthread_sig_restart);
- sigprocmask(SIG_UNBLOCK, &unblock, &initial_mask);
-
- while (1) {
- struct timeval now;
- struct timespec reltime;
-
- /* Compute a time offset relative to now. */
- __gettimeofday (&now, NULL);
- reltime.tv_nsec = abstime->tv_nsec - now.tv_usec * 1000;
- reltime.tv_sec = abstime->tv_sec - now.tv_sec;
- if (reltime.tv_nsec < 0) {
- reltime.tv_nsec += 1000000000;
- reltime.tv_sec -= 1;
- }
-
- /* Sleep for the required duration. If woken by a signal,
- resume waiting as required by Single Unix Specification. */
- if (reltime.tv_sec < 0 || __libc_nanosleep(&reltime, NULL) == 0)
- break;
- }
-
- /* Block the restart signal again */
- sigprocmask(SIG_SETMASK, &initial_mask, NULL);
- was_signalled = 0;
- } else {
- was_signalled = 1;
- }
- THREAD_SETMEM(self, p_signal_jmp, NULL);
- }
-
- /* Now was_signalled is true if we exited the above code
- due to the delivery of a restart signal. In that case,
- we know we have been dequeued and resumed and that the
- resume count is balanced. Otherwise, there are some
- cases to consider. First, try to bump up the resume count
- back to zero. If it goes to 1, it means restart() was
- invoked on this thread. The signal must be consumed
- and the count bumped down and everything is cool. We
- can return a 1 to the caller.
- Otherwise, no restart was delivered yet, so a potential
- race exists; we return a 0 to the caller which must deal
- with this race in an appropriate way; for example by
- atomically removing the thread from consideration for a
- wakeup---if such a thing fails, it means a restart is
- being delivered. */
-
- if (!was_signalled) {
- if (atomic_increment(&self->p_resume_count) != -1) {
- __pthread_wait_for_restart_signal(self);
- atomic_decrement(&self->p_resume_count); /* should be zero now! */
- /* woke spontaneously and consumed restart signal */
- return 1;
- }
- /* woke spontaneously but did not consume restart---caller must resolve */
- return 0;
- }
- /* woken due to restart signal */
- return 1;
-}
-#endif /* __ASSUME_REALTIME_SIGNALS */
-
-void __pthread_restart_new(pthread_descr th)
-{
- /* The barrier is proabably not needed, in which case it still documents
- our assumptions. The intent is to commit previous writes to shared
- memory so the woken thread will have a consistent view. Complementary
- read barriers are present to the suspend functions. */
- WRITE_MEMORY_BARRIER();
- kill(th->p_pid, __pthread_sig_restart);
-}
-
-/* There is no __pthread_suspend_new because it would just
- be a wasteful wrapper for __pthread_wait_for_restart_signal */
-
-int
-__pthread_timedsuspend_new(pthread_descr self, const struct timespec *abstime)
-{
- sigset_t unblock, initial_mask;
- int was_signalled = 0;
- sigjmp_buf jmpbuf;
-
- if (sigsetjmp(jmpbuf, 1) == 0) {
- THREAD_SETMEM(self, p_signal_jmp, &jmpbuf);
- THREAD_SETMEM(self, p_signal, 0);
- /* Unblock the restart signal */
- sigemptyset(&unblock);
- sigaddset(&unblock, __pthread_sig_restart);
- sigprocmask(SIG_UNBLOCK, &unblock, &initial_mask);
-
- while (1) {
- struct timeval now;
- struct timespec reltime;
-
- /* Compute a time offset relative to now. */
- __gettimeofday (&now, NULL);
- reltime.tv_nsec = abstime->tv_nsec - now.tv_usec * 1000;
- reltime.tv_sec = abstime->tv_sec - now.tv_sec;
- if (reltime.tv_nsec < 0) {
- reltime.tv_nsec += 1000000000;
- reltime.tv_sec -= 1;
- }
-
- /* Sleep for the required duration. If woken by a signal,
- resume waiting as required by Single Unix Specification. */
- if (reltime.tv_sec < 0 || __libc_nanosleep(&reltime, NULL) == 0)
- break;
- }
-
- /* Block the restart signal again */
- sigprocmask(SIG_SETMASK, &initial_mask, NULL);
- was_signalled = 0;
- } else {
- was_signalled = 1;
- }
- THREAD_SETMEM(self, p_signal_jmp, NULL);
-
- /* Now was_signalled is true if we exited the above code
- due to the delivery of a restart signal. In that case,
- everything is cool. We have been removed from whatever
- we were waiting on by the other thread, and consumed its signal.
-
- Otherwise we this thread woke up spontaneously, or due to a signal other
- than restart. This is an ambiguous case that must be resolved by
- the caller; the thread is still eligible for a restart wakeup
- so there is a race. */
-
- READ_MEMORY_BARRIER(); /* See comment in __pthread_restart_new */
- return was_signalled;
-}
-
-
-/* Debugging aid */
-
-#ifdef DEBUG
-#include <stdarg.h>
-
-void __pthread_message(char * fmt, ...)
-{
- char buffer[1024];
- va_list args;
- sprintf(buffer, "%05d : ", __getpid());
- va_start(args, fmt);
- vsnprintf(buffer + 8, sizeof(buffer) - 8, fmt, args);
- va_end(args);
- TEMP_FAILURE_RETRY(__libc_write(2, buffer, strlen(buffer)));
-}
-
-#endif
-
-
-#ifndef SHARED
-/* We need a hook to force the cancelation wrappers and file locking
- to be linked in when static libpthread is used. */
-extern const int __pthread_provide_wrappers;
-static const int *const __pthread_require_wrappers =
- &__pthread_provide_wrappers;
-extern const int __pthread_provide_lockfile;
-static const int *const __pthread_require_lockfile =
- &__pthread_provide_lockfile;
-#endif
diff --git a/newlib/libc/sys/linux/linuxthreads/ptlongjmp.c b/newlib/libc/sys/linux/linuxthreads/ptlongjmp.c
deleted file mode 100644
index c2ac55f63..000000000
--- a/newlib/libc/sys/linux/linuxthreads/ptlongjmp.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1998 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-/* Redefine siglongjmp and longjmp so that they interact correctly
- with cleanup handlers */
-
-#include <setjmp.h>
-#include "pthread.h"
-#include "internals.h"
-
-/* These functions are not declared anywhere since they shouldn't be
- used at another place but here. */
-extern void __libc_siglongjmp (sigjmp_buf env, int val)
- __attribute__ ((noreturn));
-extern void __libc_longjmp (jmp_buf env, int val)
- __attribute__ ((noreturn));
-
-
-static void pthread_cleanup_upto(jmp_buf target)
-{
- pthread_descr self = thread_self();
- struct _pthread_cleanup_buffer * c;
- char *currentframe = CURRENT_STACK_FRAME;
-
- for (c = THREAD_GETMEM(self, p_cleanup);
- c != NULL && _JMPBUF_UNWINDS(target, c);
- c = c->__prev)
- {
-#if _STACK_GROWS_DOWN
- if ((char *) c <= currentframe)
- {
- c = NULL;
- break;
- }
-#elif _STACK_GROWS_UP
- if ((char *) c >= currentframe)
- {
- c = NULL;
- break;
- }
-#else
-# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
-#endif
- c->__routine(c->__arg);
- }
- THREAD_SETMEM(self, p_cleanup, c);
- if (THREAD_GETMEM(self, p_in_sighandler)
- && _JMPBUF_UNWINDS(target, THREAD_GETMEM(self, p_in_sighandler)))
- THREAD_SETMEM(self, p_in_sighandler, NULL);
-}
-
-void siglongjmp(sigjmp_buf env, int val)
-{
- pthread_cleanup_upto(env.__buf);
- __libc_siglongjmp(env, val);
-}
-
-void longjmp(jmp_buf env, int val)
-{
- pthread_cleanup_upto(env);
- __libc_longjmp(env, val);
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/queue.h b/newlib/libc/sys/linux/linuxthreads/queue.h
deleted file mode 100644
index 28bd75531..000000000
--- a/newlib/libc/sys/linux/linuxthreads/queue.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-/* Waiting queues */
-
-/* Waiting queues are represented by lists of thread descriptors
- linked through their p_nextwaiting field. The lists are kept
- sorted by decreasing priority, and then decreasing waiting time. */
-
-static inline void enqueue(pthread_descr * q, pthread_descr th)
-{
- int prio = th->p_priority;
- ASSERT(th->p_nextwaiting == NULL);
- for (; *q != NULL; q = &((*q)->p_nextwaiting)) {
- if (prio > (*q)->p_priority) {
- th->p_nextwaiting = *q;
- *q = th;
- return;
- }
- }
- *q = th;
-}
-
-static inline pthread_descr dequeue(pthread_descr * q)
-{
- pthread_descr th;
- th = *q;
- if (th != NULL) {
- *q = th->p_nextwaiting;
- th->p_nextwaiting = NULL;
- }
- return th;
-}
-
-static inline int remove_from_queue(pthread_descr * q, pthread_descr th)
-{
- for (; *q != NULL; q = &((*q)->p_nextwaiting)) {
- if (*q == th) {
- *q = th->p_nextwaiting;
- th->p_nextwaiting = NULL;
- return 1;
- }
- }
- return 0;
-}
-
-static inline int queue_is_empty(pthread_descr * q)
-{
- return *q == NULL;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/reent.c b/newlib/libc/sys/linux/linuxthreads/reent.c
deleted file mode 100644
index 44d6f7858..000000000
--- a/newlib/libc/sys/linux/linuxthreads/reent.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Define the location of _REENT for the newlib C library */
-
-#include <reent.h>
-#include "pthread.h"
-#include "internals.h"
-
-struct _reent * __thread_reent()
-{
- pthread_descr self = thread_self();
- return THREAD_GETMEM (self, p_reentp);
-}
-
-/* Return thread specific resolver state. */
-struct __res_state * __res_state()
-{
- pthread_descr self = thread_self();
- return THREAD_GETMEM (self, p_resp);
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/reqsyscalls.c b/newlib/libc/sys/linux/linuxthreads/reqsyscalls.c
deleted file mode 100644
index 714a8ba36..000000000
--- a/newlib/libc/sys/linux/linuxthreads/reqsyscalls.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* EL/IX level 1 and 2 libraries don't have the following syscalls,
- but we need them due to our threading model based on processes */
-
-#include <time.h>
-#include <sched.h>
-#include <sys/wait.h>
-#include <machine/syscall.h>
-
-#define __NR___waitpid __NR_waitpid
-#define __NR___sched_getparam __NR_sched_getparam
-#define __NR___sched_getscheduler __NR_sched_getscheduler
-#define __NR___sched_setscheduler __NR_sched_setscheduler
-
-_syscall2(int,__sched_getparam,pid_t,pid,struct sched_param *,sched);
-_syscall1(int,__sched_getscheduler,pid_t,pid);
-_syscall3(int,__sched_setscheduler,pid_t,pid,int,policy,const struct sched_param *,sched);
-
-/* we want __libc____waitpid defined to support __waitpid which is
- defined in wrapsyscall.c */
-_syscall3_base(pid_t,__waitpid,pid_t,pid,int *,wait_stat,int,options)
diff --git a/newlib/libc/sys/linux/linuxthreads/restart.h b/newlib/libc/sys/linux/linuxthreads/restart.h
deleted file mode 100644
index 24d9fab74..000000000
--- a/newlib/libc/sys/linux/linuxthreads/restart.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-#include <signal.h>
-#include <kernel-features.h>
-
-/* Primitives for controlling thread execution */
-
-static inline void restart(pthread_descr th)
-{
- /* See pthread.c */
-#if __ASSUME_REALTIME_SIGNALS
- __pthread_restart_new(th);
-#else
- __pthread_restart(th);
-#endif
-}
-
-static inline void suspend(pthread_descr self)
-{
- /* See pthread.c */
-#if __ASSUME_REALTIME_SIGNALS
- __pthread_wait_for_restart_signal(self);
-#else
- __pthread_suspend(self);
-#endif
-}
-
-static inline int timedsuspend(pthread_descr self,
- const struct timespec *abstime)
-{
- /* See pthread.c */
-#if __ASSUME_REALTIME_SIGNALS
- return __pthread_timedsuspend_new(self, abstime);
-#else
- return __pthread_timedsuspend(self, abstime);
-#endif
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/rwlock.c b/newlib/libc/sys/linux/linuxthreads/rwlock.c
deleted file mode 100644
index e39597014..000000000
--- a/newlib/libc/sys/linux/linuxthreads/rwlock.c
+++ /dev/null
@@ -1,658 +0,0 @@
-/* Read-write lock implementation.
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Xavier Leroy <Xavier.Leroy@inria.fr>
- and Ulrich Drepper <drepper@cygnus.com>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <bits/libc-lock.h>
-#include <errno.h>
-#include <pthread.h>
-#include <stdlib.h>
-#include "internals.h"
-#include "queue.h"
-#include "spinlock.h"
-#include "restart.h"
-
-/* Function called by pthread_cancel to remove the thread from
- waiting inside pthread_rwlock_timedrdlock or pthread_rwlock_timedwrlock. */
-
-static int rwlock_rd_extricate_func(void *obj, pthread_descr th)
-{
- pthread_rwlock_t *rwlock = obj;
- int did_remove = 0;
-
- __pthread_lock(&rwlock->__rw_lock, NULL);
- did_remove = remove_from_queue(&rwlock->__rw_read_waiting, th);
- __pthread_unlock(&rwlock->__rw_lock);
-
- return did_remove;
-}
-
-static int rwlock_wr_extricate_func(void *obj, pthread_descr th)
-{
- pthread_rwlock_t *rwlock = obj;
- int did_remove = 0;
-
- __pthread_lock(&rwlock->__rw_lock, NULL);
- did_remove = remove_from_queue(&rwlock->__rw_write_waiting, th);
- __pthread_unlock(&rwlock->__rw_lock);
-
- return did_remove;
-}
-
-/*
- * Check whether the calling thread already owns one or more read locks on the
- * specified lock. If so, return a pointer to the read lock info structure
- * corresponding to that lock.
- */
-
-static pthread_readlock_info *
-rwlock_is_in_list(pthread_descr self, pthread_rwlock_t *rwlock)
-{
- pthread_readlock_info *info;
-
- for (info = THREAD_GETMEM (self, p_readlock_list); info != NULL;
- info = info->pr_next)
- {
- if (info->pr_lock == rwlock)
- return info;
- }
-
- return NULL;
-}
-
-/*
- * Add a new lock to the thread's list of locks for which it has a read lock.
- * A new info node must be allocated for this, which is taken from the thread's
- * free list, or by calling malloc. If malloc fails, a null pointer is
- * returned. Otherwise the lock info structure is initialized and pushed
- * onto the thread's list.
- */
-
-static pthread_readlock_info *
-rwlock_add_to_list(pthread_descr self, pthread_rwlock_t *rwlock)
-{
- pthread_readlock_info *info = THREAD_GETMEM (self, p_readlock_free);
-
- if (info != NULL)
- THREAD_SETMEM (self, p_readlock_free, info->pr_next);
- else
- info = malloc(sizeof *info);
-
- if (info == NULL)
- return NULL;
-
- info->pr_lock_count = 1;
- info->pr_lock = rwlock;
- info->pr_next = THREAD_GETMEM (self, p_readlock_list);
- THREAD_SETMEM (self, p_readlock_list, info);
-
- return info;
-}
-
-/*
- * If the thread owns a read lock over the given pthread_rwlock_t,
- * and this read lock is tracked in the thread's lock list,
- * this function returns a pointer to the info node in that list.
- * It also decrements the lock count within that node, and if
- * it reaches zero, it removes the node from the list.
- * If nothing is found, it returns a null pointer.
- */
-
-static pthread_readlock_info *
-rwlock_remove_from_list(pthread_descr self, pthread_rwlock_t *rwlock)
-{
- pthread_readlock_info **pinfo;
-
- for (pinfo = &self->p_readlock_list; *pinfo != NULL; pinfo = &(*pinfo)->pr_next)
- {
- if ((*pinfo)->pr_lock == rwlock)
- {
- pthread_readlock_info *info = *pinfo;
- if (--info->pr_lock_count == 0)
- *pinfo = info->pr_next;
- return info;
- }
- }
-
- return NULL;
-}
-
-/*
- * This function checks whether the conditions are right to place a read lock.
- * It returns 1 if so, otherwise zero. The rwlock's internal lock must be
- * locked upon entry.
- */
-
-static int
-rwlock_can_rdlock(pthread_rwlock_t *rwlock, int have_lock_already)
-{
- /* Can't readlock; it is write locked. */
- if (rwlock->__rw_writer != NULL)
- return 0;
-
- /* Lock prefers readers; get it. */
- if (rwlock->__rw_kind == PTHREAD_RWLOCK_PREFER_READER_NP)
- return 1;
-
- /* Lock prefers writers, but none are waiting. */
- if (queue_is_empty(&rwlock->__rw_write_waiting))
- return 1;
-
- /* Writers are waiting, but this thread already has a read lock */
- if (have_lock_already)
- return 1;
-
- /* Writers are waiting, and this is a new lock */
- return 0;
-}
-
-/*
- * This function helps support brain-damaged recursive read locking
- * semantics required by Unix 98, while maintaining write priority.
- * This basically determines whether this thread already holds a read lock
- * already. It returns 1 if so, otherwise it returns 0.
- *
- * If the thread has any ``untracked read locks'' then it just assumes
- * that this lock is among them, just to be safe, and returns 1.
- *
- * Also, if it finds the thread's lock in the list, it sets the pointer
- * referenced by pexisting to refer to the list entry.
- *
- * If the thread has no untracked locks, and the lock is not found
- * in its list, then it is added to the list. If this fails,
- * then *pout_of_mem is set to 1.
- */
-
-static int
-rwlock_have_already(pthread_descr *pself, pthread_rwlock_t *rwlock,
- pthread_readlock_info **pexisting, int *pout_of_mem)
-{
- pthread_readlock_info *existing = NULL;
- int out_of_mem = 0, have_lock_already = 0;
- pthread_descr self = *pself;
-
- if (rwlock->__rw_kind == PTHREAD_RWLOCK_PREFER_WRITER_NP)
- {
- if (!self)
- *pself = self = thread_self();
-
- existing = rwlock_is_in_list(self, rwlock);
-
- if (existing != NULL
- || THREAD_GETMEM (self, p_untracked_readlock_count) > 0)
- have_lock_already = 1;
- else
- {
- existing = rwlock_add_to_list(self, rwlock);
- if (existing == NULL)
- out_of_mem = 1;
- }
- }
-
- *pout_of_mem = out_of_mem;
- *pexisting = existing;
-
- return have_lock_already;
-}
-
-int
-__pthread_rwlock_init (pthread_rwlock_t *rwlock,
- const pthread_rwlockattr_t *attr)
-{
- __pthread_init_lock(&rwlock->__rw_lock);
- rwlock->__rw_readers = 0;
- rwlock->__rw_writer = NULL;
- rwlock->__rw_read_waiting = NULL;
- rwlock->__rw_write_waiting = NULL;
-
- if (attr == NULL)
- {
- rwlock->__rw_kind = PTHREAD_RWLOCK_DEFAULT_NP;
- rwlock->__rw_pshared = PTHREAD_PROCESS_PRIVATE;
- }
- else
- {
- rwlock->__rw_kind = attr->__lockkind;
- rwlock->__rw_pshared = attr->__pshared;
- }
-
- return 0;
-}
-strong_alias (__pthread_rwlock_init, pthread_rwlock_init)
-
-
-int
-__pthread_rwlock_destroy (pthread_rwlock_t *rwlock)
-{
- int readers;
- _pthread_descr writer;
-
- __pthread_lock (&rwlock->__rw_lock, NULL);
- readers = rwlock->__rw_readers;
- writer = rwlock->__rw_writer;
- __pthread_unlock (&rwlock->__rw_lock);
-
- if (readers > 0 || writer != NULL)
- return EBUSY;
-
- return 0;
-}
-strong_alias (__pthread_rwlock_destroy, pthread_rwlock_destroy)
-
-int
-__pthread_rwlock_rdlock (pthread_rwlock_t *rwlock)
-{
- pthread_descr self = NULL;
- pthread_readlock_info *existing;
- int out_of_mem, have_lock_already;
-
- have_lock_already = rwlock_have_already(&self, rwlock,
- &existing, &out_of_mem);
-
- if (self == NULL)
- self = thread_self ();
-
- for (;;)
- {
- __pthread_lock (&rwlock->__rw_lock, self);
-
- if (rwlock_can_rdlock(rwlock, have_lock_already))
- break;
-
- enqueue (&rwlock->__rw_read_waiting, self);
- __pthread_unlock (&rwlock->__rw_lock);
- suspend (self); /* This is not a cancellation point */
- }
-
- ++rwlock->__rw_readers;
- __pthread_unlock (&rwlock->__rw_lock);
-
- if (have_lock_already || out_of_mem)
- {
- if (existing != NULL)
- ++existing->pr_lock_count;
- else
- ++self->p_untracked_readlock_count;
- }
-
- return 0;
-}
-strong_alias (__pthread_rwlock_rdlock, pthread_rwlock_rdlock)
-
-int
-__pthread_rwlock_timedrdlock (pthread_rwlock_t *rwlock,
- const struct timespec *abstime)
-{
- pthread_descr self = NULL;
- pthread_readlock_info *existing;
- int out_of_mem, have_lock_already;
- pthread_extricate_if extr;
-
- if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
- return EINVAL;
-
- have_lock_already = rwlock_have_already(&self, rwlock,
- &existing, &out_of_mem);
-
- if (self == NULL)
- self = thread_self ();
-
- /* Set up extrication interface */
- extr.pu_object = rwlock;
- extr.pu_extricate_func = rwlock_rd_extricate_func;
-
- /* Register extrication interface */
- __pthread_set_own_extricate_if (self, &extr);
-
- for (;;)
- {
- __pthread_lock (&rwlock->__rw_lock, self);
-
- if (rwlock_can_rdlock(rwlock, have_lock_already))
- break;
-
- enqueue (&rwlock->__rw_read_waiting, self);
- __pthread_unlock (&rwlock->__rw_lock);
- /* This is not a cancellation point */
- if (timedsuspend (self, abstime) == 0)
- {
- int was_on_queue;
-
- __pthread_lock (&rwlock->__rw_lock, self);
- was_on_queue = remove_from_queue (&rwlock->__rw_read_waiting, self);
- __pthread_unlock (&rwlock->__rw_lock);
-
- if (was_on_queue)
- {
- __pthread_set_own_extricate_if (self, 0);
- return ETIMEDOUT;
- }
-
- /* Eat the outstanding restart() from the signaller */
- suspend (self);
- }
- }
-
- __pthread_set_own_extricate_if (self, 0);
-
- ++rwlock->__rw_readers;
- __pthread_unlock (&rwlock->__rw_lock);
-
- if (have_lock_already || out_of_mem)
- {
- if (existing != NULL)
- ++existing->pr_lock_count;
- else
- ++self->p_untracked_readlock_count;
- }
-
- return 0;
-}
-strong_alias (__pthread_rwlock_timedrdlock, pthread_rwlock_timedrdlock)
-
-int
-__pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock)
-{
- pthread_descr self = thread_self();
- pthread_readlock_info *existing;
- int out_of_mem, have_lock_already;
- int retval = EBUSY;
-
- have_lock_already = rwlock_have_already(&self, rwlock,
- &existing, &out_of_mem);
-
- __pthread_lock (&rwlock->__rw_lock, self);
-
- /* 0 is passed to here instead of have_lock_already.
- This is to meet Single Unix Spec requirements:
- if writers are waiting, pthread_rwlock_tryrdlock
- does not acquire a read lock, even if the caller has
- one or more read locks already. */
-
- if (rwlock_can_rdlock(rwlock, 0))
- {
- ++rwlock->__rw_readers;
- retval = 0;
- }
-
- __pthread_unlock (&rwlock->__rw_lock);
-
- if (retval == 0)
- {
- if (have_lock_already || out_of_mem)
- {
- if (existing != NULL)
- ++existing->pr_lock_count;
- else
- ++self->p_untracked_readlock_count;
- }
- }
-
- return retval;
-}
-strong_alias (__pthread_rwlock_tryrdlock, pthread_rwlock_tryrdlock)
-
-
-int
-__pthread_rwlock_wrlock (pthread_rwlock_t *rwlock)
-{
- pthread_descr self = thread_self ();
-
- while(1)
- {
- __pthread_lock (&rwlock->__rw_lock, self);
- if (rwlock->__rw_readers == 0 && rwlock->__rw_writer == NULL)
- {
- rwlock->__rw_writer = self;
- __pthread_unlock (&rwlock->__rw_lock);
- return 0;
- }
-
- /* Suspend ourselves, then try again */
- enqueue (&rwlock->__rw_write_waiting, self);
- __pthread_unlock (&rwlock->__rw_lock);
- suspend (self); /* This is not a cancellation point */
- }
-}
-strong_alias (__pthread_rwlock_wrlock, pthread_rwlock_wrlock)
-
-
-int
-__pthread_rwlock_timedwrlock (pthread_rwlock_t *rwlock,
- const struct timespec *abstime)
-{
- pthread_descr self;
- pthread_extricate_if extr;
-
- if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
- return EINVAL;
-
- self = thread_self ();
-
- /* Set up extrication interface */
- extr.pu_object = rwlock;
- extr.pu_extricate_func = rwlock_wr_extricate_func;
-
- /* Register extrication interface */
- __pthread_set_own_extricate_if (self, &extr);
-
- while(1)
- {
- __pthread_lock (&rwlock->__rw_lock, self);
-
- if (rwlock->__rw_readers == 0 && rwlock->__rw_writer == NULL)
- {
- rwlock->__rw_writer = self;
- __pthread_set_own_extricate_if (self, 0);
- __pthread_unlock (&rwlock->__rw_lock);
- return 0;
- }
-
- /* Suspend ourselves, then try again */
- enqueue (&rwlock->__rw_write_waiting, self);
- __pthread_unlock (&rwlock->__rw_lock);
- /* This is not a cancellation point */
- if (timedsuspend (self, abstime) == 0)
- {
- int was_on_queue;
-
- __pthread_lock (&rwlock->__rw_lock, self);
- was_on_queue = remove_from_queue (&rwlock->__rw_write_waiting, self);
- __pthread_unlock (&rwlock->__rw_lock);
-
- if (was_on_queue)
- {
- __pthread_set_own_extricate_if (self, 0);
- return ETIMEDOUT;
- }
-
- /* Eat the outstanding restart() from the signaller */
- suspend (self);
- }
- }
-}
-strong_alias (__pthread_rwlock_timedwrlock, pthread_rwlock_timedwrlock)
-
-
-int
-__pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock)
-{
- int result = EBUSY;
-
- __pthread_lock (&rwlock->__rw_lock, NULL);
- if (rwlock->__rw_readers == 0 && rwlock->__rw_writer == NULL)
- {
- rwlock->__rw_writer = thread_self ();
- result = 0;
- }
- __pthread_unlock (&rwlock->__rw_lock);
-
- return result;
-}
-strong_alias (__pthread_rwlock_trywrlock, pthread_rwlock_trywrlock)
-
-
-int
-__pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
-{
- pthread_descr torestart;
- pthread_descr th;
-
- __pthread_lock (&rwlock->__rw_lock, NULL);
- if (rwlock->__rw_writer != NULL)
- {
- /* Unlocking a write lock. */
- if (rwlock->__rw_writer != thread_self ())
- {
- __pthread_unlock (&rwlock->__rw_lock);
- return EPERM;
- }
- rwlock->__rw_writer = NULL;
-
- if ((rwlock->__rw_kind == PTHREAD_RWLOCK_PREFER_READER_NP
- && !queue_is_empty(&rwlock->__rw_read_waiting))
- || (th = dequeue(&rwlock->__rw_write_waiting)) == NULL)
- {
- /* Restart all waiting readers. */
- torestart = rwlock->__rw_read_waiting;
- rwlock->__rw_read_waiting = NULL;
- __pthread_unlock (&rwlock->__rw_lock);
- while ((th = dequeue (&torestart)) != NULL)
- restart (th);
- }
- else
- {
- /* Restart one waiting writer. */
- __pthread_unlock (&rwlock->__rw_lock);
- restart (th);
- }
- }
- else
- {
- /* Unlocking a read lock. */
- if (rwlock->__rw_readers == 0)
- {
- __pthread_unlock (&rwlock->__rw_lock);
- return EPERM;
- }
-
- --rwlock->__rw_readers;
- if (rwlock->__rw_readers == 0)
- /* Restart one waiting writer, if any. */
- th = dequeue (&rwlock->__rw_write_waiting);
- else
- th = NULL;
-
- __pthread_unlock (&rwlock->__rw_lock);
- if (th != NULL)
- restart (th);
-
- /* Recursive lock fixup */
-
- if (rwlock->__rw_kind == PTHREAD_RWLOCK_PREFER_WRITER_NP)
- {
- pthread_descr self = thread_self();
- pthread_readlock_info *victim = rwlock_remove_from_list(self, rwlock);
-
- if (victim != NULL)
- {
- if (victim->pr_lock_count == 0)
- {
- victim->pr_next = THREAD_GETMEM (self, p_readlock_free);
- THREAD_SETMEM (self, p_readlock_free, victim);
- }
- }
- else
- {
- int val = THREAD_GETMEM (self, p_untracked_readlock_count);
- if (val > 0)
- THREAD_SETMEM (self, p_untracked_readlock_count, val - 1);
- }
- }
- }
-
- return 0;
-}
-strong_alias (__pthread_rwlock_unlock, pthread_rwlock_unlock)
-
-
-
-int
-pthread_rwlockattr_init (pthread_rwlockattr_t *attr)
-{
- attr->__lockkind = 0;
- attr->__pshared = PTHREAD_PROCESS_PRIVATE;
-
- return 0;
-}
-
-
-int
-__pthread_rwlockattr_destroy (pthread_rwlockattr_t *attr)
-{
- return 0;
-}
-strong_alias (__pthread_rwlockattr_destroy, pthread_rwlockattr_destroy)
-
-
-int
-pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *attr, int *pshared)
-{
- *pshared = attr->__pshared;
- return 0;
-}
-
-
-int
-pthread_rwlockattr_setpshared (pthread_rwlockattr_t *attr, int pshared)
-{
- if (pshared != PTHREAD_PROCESS_PRIVATE && pshared != PTHREAD_PROCESS_SHARED)
- return EINVAL;
-
- /* For now it is not possible to shared a conditional variable. */
- if (pshared != PTHREAD_PROCESS_PRIVATE)
- return ENOSYS;
-
- attr->__pshared = pshared;
-
- return 0;
-}
-
-
-int
-pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *attr, int *pref)
-{
- *pref = attr->__lockkind;
- return 0;
-}
-
-
-int
-pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *attr, int pref)
-{
- if (pref != PTHREAD_RWLOCK_PREFER_READER_NP
- && pref != PTHREAD_RWLOCK_PREFER_WRITER_NP
- && pref != PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP
- && pref != PTHREAD_RWLOCK_DEFAULT_NP)
- return EINVAL;
-
- attr->__lockkind = pref;
-
- return 0;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/semaphore.c b/newlib/libc/sys/linux/linuxthreads/semaphore.c
deleted file mode 100644
index e0dac4120..000000000
--- a/newlib/libc/sys/linux/linuxthreads/semaphore.c
+++ /dev/null
@@ -1,304 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-/* Semaphores a la POSIX 1003.1b */
-
-#include <errno.h>
-#include "pthread.h"
-#include "semaphore.h"
-#include "internals.h"
-#include "spinlock.h"
-#include "restart.h"
-#include "queue.h"
-#include <shlib-compat.h>
-
-int __new_sem_init(sem_t *sem, int pshared, unsigned int value)
-{
- if (value > SEM_VALUE_MAX) {
- errno = EINVAL;
- return -1;
- }
- if (pshared) {
- errno = ENOSYS;
- return -1;
- }
- __pthread_init_lock(&sem->__sem_lock);
- sem->__sem_value = value;
- sem->__sem_waiting = NULL;
- return 0;
-}
-
-/* Function called by pthread_cancel to remove the thread from
- waiting inside __new_sem_wait. */
-
-static int new_sem_extricate_func(void *obj, pthread_descr th)
-{
- volatile pthread_descr self = thread_self();
- sem_t *sem = obj;
- int did_remove = 0;
-
- __pthread_lock(&sem->__sem_lock, self);
- did_remove = remove_from_queue(&sem->__sem_waiting, th);
- __pthread_unlock(&sem->__sem_lock);
-
- return did_remove;
-}
-
-int __new_sem_wait(sem_t * sem)
-{
- volatile pthread_descr self = thread_self();
- pthread_extricate_if extr;
- int already_canceled = 0;
- int spurious_wakeup_count;
-
- /* Set up extrication interface */
- extr.pu_object = sem;
- extr.pu_extricate_func = new_sem_extricate_func;
-
- __pthread_lock(&sem->__sem_lock, self);
- if (sem->__sem_value > 0) {
- sem->__sem_value--;
- __pthread_unlock(&sem->__sem_lock);
- return 0;
- }
- /* Register extrication interface */
- THREAD_SETMEM(self, p_sem_avail, 0);
- __pthread_set_own_extricate_if(self, &extr);
- /* Enqueue only if not already cancelled. */
- if (!(THREAD_GETMEM(self, p_canceled)
- && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE))
- enqueue(&sem->__sem_waiting, self);
- else
- already_canceled = 1;
- __pthread_unlock(&sem->__sem_lock);
-
- if (already_canceled) {
- __pthread_set_own_extricate_if(self, 0);
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
- }
-
- /* Wait for sem_post or cancellation, or fall through if already canceled */
- spurious_wakeup_count = 0;
- while (1)
- {
- suspend(self);
- if (THREAD_GETMEM(self, p_sem_avail) == 0
- && (THREAD_GETMEM(self, p_woken_by_cancel) == 0
- || THREAD_GETMEM(self, p_cancelstate) != PTHREAD_CANCEL_ENABLE))
- {
- /* Count resumes that don't belong to us. */
- spurious_wakeup_count++;
- continue;
- }
- break;
- }
- __pthread_set_own_extricate_if(self, 0);
-
- /* Terminate only if the wakeup came from cancellation. */
- /* Otherwise ignore cancellation because we got the semaphore. */
-
- if (THREAD_GETMEM(self, p_woken_by_cancel)
- && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE) {
- THREAD_SETMEM(self, p_woken_by_cancel, 0);
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
- }
- /* We got the semaphore */
- return 0;
-}
-
-int __new_sem_trywait(sem_t * sem)
-{
- int retval;
-
- __pthread_lock(&sem->__sem_lock, NULL);
- if (sem->__sem_value == 0) {
- errno = EAGAIN;
- retval = -1;
- } else {
- sem->__sem_value--;
- retval = 0;
- }
- __pthread_unlock(&sem->__sem_lock);
- return retval;
-}
-
-int __new_sem_post(sem_t * sem)
-{
- pthread_descr self = thread_self();
- pthread_descr th;
- struct pthread_request request;
-
- if (THREAD_GETMEM(self, p_in_sighandler) == NULL) {
- __pthread_lock(&sem->__sem_lock, self);
- if (sem->__sem_waiting == NULL) {
- if (sem->__sem_value >= SEM_VALUE_MAX) {
- /* Overflow */
- errno = ERANGE;
- __pthread_unlock(&sem->__sem_lock);
- return -1;
- }
- sem->__sem_value++;
- __pthread_unlock(&sem->__sem_lock);
- } else {
- th = dequeue(&sem->__sem_waiting);
- __pthread_unlock(&sem->__sem_lock);
- th->p_sem_avail = 1;
- WRITE_MEMORY_BARRIER();
- restart(th);
- }
- } else {
- /* If we're in signal handler, delegate post operation to
- the thread manager. */
- if (__pthread_manager_request < 0) {
- if (__pthread_initialize_manager() < 0) {
- errno = EAGAIN;
- return -1;
- }
- }
- request.req_kind = REQ_POST;
- request.req_args.post = sem;
- TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
- (char *) &request, sizeof(request)));
- }
- return 0;
-}
-
-int __new_sem_getvalue(sem_t * sem, int * sval)
-{
- *sval = sem->__sem_value;
- return 0;
-}
-
-int __new_sem_destroy(sem_t * sem)
-{
- if (sem->__sem_waiting != NULL) {
- __set_errno (EBUSY);
- return -1;
- }
- return 0;
-}
-
-sem_t *sem_open(const char *name, int oflag, ...)
-{
- __set_errno (ENOSYS);
- return SEM_FAILED;
-}
-
-int sem_close(sem_t *sem)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-
-int sem_unlink(const char *name)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-
-int sem_timedwait(sem_t *sem, const struct timespec *abstime)
-{
- pthread_descr self = thread_self();
- pthread_extricate_if extr;
- int already_canceled = 0;
- int spurious_wakeup_count;
-
- __pthread_lock(&sem->__sem_lock, self);
- if (sem->__sem_value > 0) {
- --sem->__sem_value;
- __pthread_unlock(&sem->__sem_lock);
- return 0;
- }
-
- if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000) {
- /* The standard requires that if the function would block and the
- time value is illegal, the function returns with an error. */
- __pthread_unlock(&sem->__sem_lock);
- return EINVAL;
- }
-
- /* Set up extrication interface */
- extr.pu_object = sem;
- extr.pu_extricate_func = new_sem_extricate_func;
-
- /* Register extrication interface */
- THREAD_SETMEM(self, p_sem_avail, 0);
- __pthread_set_own_extricate_if(self, &extr);
- /* Enqueue only if not already cancelled. */
- if (!(THREAD_GETMEM(self, p_canceled)
- && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE))
- enqueue(&sem->__sem_waiting, self);
- else
- already_canceled = 1;
- __pthread_unlock(&sem->__sem_lock);
-
- if (already_canceled) {
- __pthread_set_own_extricate_if(self, 0);
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
- }
-
- spurious_wakeup_count = 0;
- while (1)
- {
- if (timedsuspend(self, abstime) == 0) {
- int was_on_queue;
-
- /* __pthread_lock will queue back any spurious restarts that
- may happen to it. */
-
- __pthread_lock(&sem->__sem_lock, self);
- was_on_queue = remove_from_queue(&sem->__sem_waiting, self);
- __pthread_unlock(&sem->__sem_lock);
-
- if (was_on_queue) {
- __pthread_set_own_extricate_if(self, 0);
- return ETIMEDOUT;
- }
-
- /* Eat the outstanding restart() from the signaller */
- suspend(self);
- }
-
- if (THREAD_GETMEM(self, p_sem_avail) == 0
- && (THREAD_GETMEM(self, p_woken_by_cancel) == 0
- || THREAD_GETMEM(self, p_cancelstate) != PTHREAD_CANCEL_ENABLE))
- {
- /* Count resumes that don't belong to us. */
- spurious_wakeup_count++;
- continue;
- }
- break;
- }
-
- __pthread_set_own_extricate_if(self, 0);
-
- /* Terminate only if the wakeup came from cancellation. */
- /* Otherwise ignore cancellation because we got the semaphore. */
-
- if (THREAD_GETMEM(self, p_woken_by_cancel)
- && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE) {
- THREAD_SETMEM(self, p_woken_by_cancel, 0);
- __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
- }
- /* We got the semaphore */
- return 0;
-}
-
-
-versioned_symbol (libpthread, __new_sem_init, sem_init, GLIBC_2_1);
-versioned_symbol (libpthread, __new_sem_wait, sem_wait, GLIBC_2_1);
-versioned_symbol (libpthread, __new_sem_trywait, sem_trywait, GLIBC_2_1);
-versioned_symbol (libpthread, __new_sem_post, sem_post, GLIBC_2_1);
-versioned_symbol (libpthread, __new_sem_getvalue, sem_getvalue, GLIBC_2_1);
-versioned_symbol (libpthread, __new_sem_destroy, sem_destroy, GLIBC_2_1);
diff --git a/newlib/libc/sys/linux/linuxthreads/semaphore.h b/newlib/libc/sys/linux/linuxthreads/semaphore.h
deleted file mode 100644
index 5971f0d51..000000000
--- a/newlib/libc/sys/linux/linuxthreads/semaphore.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-#ifndef _SEMAPHORE_H
-#define _SEMAPHORE_H 1
-
-#include <features.h>
-#include <sys/types.h>
-#include <bits/pthreadtypes.h>
-#ifdef __USE_XOPEN2K
-# define __need_timespec
-# include <time.h>
-#endif
-
-#ifndef _PTHREAD_DESCR_DEFINED
-/* Thread descriptors. Needed for `sem_t' definition. */
-typedef struct _pthread_descr_struct *_pthread_descr;
-# define _PTHREAD_DESCR_DEFINED
-#endif
-
-/* System specific semaphore definition. */
-typedef struct
-{
- struct _pthread_fastlock __sem_lock;
- int __sem_value;
- _pthread_descr __sem_waiting;
-} sem_t;
-
-
-
-/* Value returned if `sem_open' failed. */
-#define SEM_FAILED ((sem_t *) 0)
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX ((int) ((~0u) >> 1))
-
-
-__BEGIN_DECLS
-
-/* Initialize semaphore object SEM to VALUE. If PSHARED then share it
- with other processes. */
-extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value) __THROW;
-
-/* Free resources associated with semaphore object SEM. */
-extern int sem_destroy (sem_t *__sem) __THROW;
-
-/* Open a named semaphore NAME with open flaot OFLAG. */
-extern sem_t *sem_open (__const char *__name, int __oflag, ...) __THROW;
-
-/* Close descriptor for named semaphore SEM. */
-extern int sem_close (sem_t *__sem) __THROW;
-
-/* Remove named semaphore NAME. */
-extern int sem_unlink (__const char *__name) __THROW;
-
-/* Wait for SEM being posted. */
-extern int sem_wait (sem_t *__sem) __THROW;
-
-#ifdef __USE_XOPEN2K
-/* Similar to `sem_wait' but wait only until ABSTIME. */
-extern int sem_timedwait (sem_t *__restrict __sem,
- __const struct timespec *__restrict __abstime)
- __THROW;
-#endif
-
-/* Test whether SEM is posted. */
-extern int sem_trywait (sem_t *__sem) __THROW;
-
-/* Post SEM. */
-extern int sem_post (sem_t *__sem) __THROW;
-
-/* Get current value of SEM and store it in *SVAL. */
-extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval)
- __THROW;
-
-__END_DECLS
-
-#endif /* semaphore.h */
diff --git a/newlib/libc/sys/linux/linuxthreads/shlib-compat.h b/newlib/libc/sys/linux/linuxthreads/shlib-compat.h
deleted file mode 100644
index 245b8aa89..000000000
--- a/newlib/libc/sys/linux/linuxthreads/shlib-compat.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Macros for managing ABI-compatibility definitions using ELF symbol versions.
- Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SHLIB_COMPAT_H
-#define _SHLIB_COMPAT_H 1
-
-#if defined HAVE_ELF && defined DO_VERSIONING
-/* Since there is just one set of .d files generated, we need to
- include this unconditionally to have the dependency noticed properly. */
-#include <abi-versions.h> /* header generated by abi-versions.awk */
-#endif
-
-#if defined HAVE_ELF && defined SHARED && defined DO_VERSIONING
-
-/* The file abi-versions.h (generated by scripts/abi-versions.awk) defines
- symbols like `ABI_libm_GLIBC_2_0' for each version set in the source
- code for each library. For a version set that is subsumed by a later
- version set, the definition gives the subsuming set, i.e. if GLIBC_2_0
- is subsumed by GLIBC_2_1, then ABI_libm_GLIBC_2_0 == ABI_libm_GLIBC_2_1.
- Each version set that is to be distinctly defined in the output has an
- unique positive integer value, increasing with newer versions. Thus,
- evaluating two ABI_* symbols reduces to integer values that differ only
- when the two version sets named are in fact two different ABIs we are
- supporting. If these do not differ, then there is no need to compile in
- extra code to support this version set where it has been superseded by a
- newer version. The compatibility code should be conditionalized with
- e.g. `#if SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_2)' for code introduced
- in the GLIBC_2.0 version and obsoleted in the GLIBC_2.2 version. */
-
-# define SHLIB_COMPAT(lib, introduced, obsoleted) \
- (!(ABI_##lib##_##obsoleted - 0) \
- || ((ABI_##lib##_##introduced - 0) < (ABI_##lib##_##obsoleted - 0)))
-
-/* That header also defines symbols like `VERSION_libm_GLIBC_2_1' to
- the version set name to use for e.g. symbols first introduced into
- libm in the GLIBC_2.1 version. Definitions of symbols with explicit
- versions should look like:
- versioned_symbol (libm, new_foo, foo, GLIBC_2_1);
- This will define the symbol `foo' with the appropriate default version,
- i.e. either GLIBC_2.1 or the "earliest version" specified in
- shlib-versions if that is newer. */
-
-# define versioned_symbol(lib, local, symbol, version) \
- versioned_symbol_1 (local, symbol, VERSION_##lib##_##version)
-# define versioned_symbol_1(local, symbol, name) \
- default_symbol_version (local, symbol, name)
-
-# define compat_symbol(lib, local, symbol, version) \
- compat_symbol_1 (local, symbol, VERSION_##lib##_##version)
-# define compat_symbol_1(local, symbol, name) \
- symbol_version (local, symbol, name)
-
-#else
-
-/* Not compiling ELF shared libraries at all, so never any old versions. */
-# define SHLIB_COMPAT(lib, introduced, obsoleted) 0
-
-/* No versions to worry about, just make this the global definition. */
-# define versioned_symbol(lib, local, symbol, version) \
- weak_alias (local, symbol)
-
-/* This should not appear outside `#if SHLIB_COMPAT (...)'. */
-# define compat_symbol(lib, local, symbol, version) ...
-
-#endif
-
-
-#endif /* shlib-compat.h */
diff --git a/newlib/libc/sys/linux/linuxthreads/signals.c b/newlib/libc/sys/linux/linuxthreads/signals.c
deleted file mode 100644
index da3ce69a4..000000000
--- a/newlib/libc/sys/linux/linuxthreads/signals.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-/* Handling of signals */
-
-#include <errno.h>
-#include <signal.h>
-#include "pthread.h"
-#include "internals.h"
-#include "spinlock.h"
-#include <ucontext.h>
-#include <sigcontextinfo.h>
-
-int pthread_sigmask(int how, const sigset_t * newmask, sigset_t * oldmask)
-{
- sigset_t mask;
-
- if (newmask != NULL) {
- mask = *newmask;
- /* Don't allow __pthread_sig_restart to be unmasked.
- Don't allow __pthread_sig_cancel to be masked. */
- switch(how) {
- case SIG_SETMASK:
- sigaddset(&mask, __pthread_sig_restart);
- sigdelset(&mask, __pthread_sig_cancel);
- break;
- case SIG_BLOCK:
- sigdelset(&mask, __pthread_sig_cancel);
- break;
- case SIG_UNBLOCK:
- sigdelset(&mask, __pthread_sig_restart);
- break;
- }
- newmask = &mask;
- }
- if (sigprocmask(how, newmask, oldmask) == -1)
- return errno;
- else
- return 0;
-}
-
-int pthread_kill(pthread_t thread, int signo)
-{
- pthread_handle handle = thread_handle(thread);
- int pid;
-
- __pthread_lock(&handle->h_lock, NULL);
- if (invalid_handle(handle, thread)) {
- __pthread_unlock(&handle->h_lock);
- return ESRCH;
- }
- pid = handle->h_descr->p_pid;
- __pthread_unlock(&handle->h_lock);
- if (kill(pid, signo) == -1)
- return errno;
- else
- return 0;
-}
-
-/* User-provided signal handlers */
-typedef void (*arch_sighandler_t) (int, SIGCONTEXT);
-static union
-{
- arch_sighandler_t old;
- void (*rt) (int, struct siginfo *, struct ucontext *);
-} sighandler[NSIG] = { [1 ... NSIG - 1] = { (arch_sighandler_t) SIG_ERR } };
-
-/* The wrapper around user-provided signal handlers */
-static void pthread_sighandler(int signo, SIGCONTEXT ctx)
-{
- pthread_descr self;
- char * in_sighandler;
- self = thread_self();
- /* If we're in a sigwait operation, just record the signal received
- and return without calling the user's handler */
- if (THREAD_GETMEM(self, p_sigwaiting)) {
- THREAD_SETMEM(self, p_sigwaiting, 0);
- THREAD_SETMEM(self, p_signal, signo);
- return;
- }
- /* Record that we're in a signal handler and call the user's
- handler function */
- in_sighandler = THREAD_GETMEM(self, p_in_sighandler);
- if (in_sighandler == NULL)
- THREAD_SETMEM(self, p_in_sighandler, CURRENT_STACK_FRAME);
- CALL_SIGHANDLER(sighandler[signo].old, signo, ctx);
- if (in_sighandler == NULL)
- THREAD_SETMEM(self, p_in_sighandler, NULL);
-}
-
-/* The same, this time for real-time signals. */
-static void pthread_sighandler_rt(int signo, struct siginfo *si,
- struct ucontext *uc)
-{
- pthread_descr self;
- char * in_sighandler;
- self = thread_self();
- /* If we're in a sigwait operation, just record the signal received
- and return without calling the user's handler */
- if (THREAD_GETMEM(self, p_sigwaiting)) {
- THREAD_SETMEM(self, p_sigwaiting, 0);
- THREAD_SETMEM(self, p_signal, signo);
- return;
- }
- /* Record that we're in a signal handler and call the user's
- handler function */
- in_sighandler = THREAD_GETMEM(self, p_in_sighandler);
- if (in_sighandler == NULL)
- THREAD_SETMEM(self, p_in_sighandler, CURRENT_STACK_FRAME);
- sighandler[signo].rt(signo, si, uc);
- if (in_sighandler == NULL)
- THREAD_SETMEM(self, p_in_sighandler, NULL);
-}
-
-/* The wrapper around sigaction. Install our own signal handler
- around the signal. */
-int __sigaction(int sig, const struct sigaction * act,
- struct sigaction * oact)
-{
- struct sigaction newact;
- struct sigaction *newactp;
-
- if (sig == __pthread_sig_restart ||
- sig == __pthread_sig_cancel ||
- (sig == __pthread_sig_debug && __pthread_sig_debug > 0))
- {
- __set_errno (EINVAL);
- return -1;
- }
- if (act)
- {
- newact = *act;
- if (act->sa_handler != SIG_IGN && act->sa_handler != SIG_DFL
- && sig > 0 && sig < NSIG)
- {
- if (act->sa_flags & SA_SIGINFO)
- newact.sa_handler = (__sighandler_t) pthread_sighandler_rt;
- else
- newact.sa_handler = (__sighandler_t) pthread_sighandler;
- }
- newactp = &newact;
- }
- else
- newactp = NULL;
- if (__libc_sigaction(sig, newactp, oact) == -1)
- return -1;
- if (sig > 0 && sig < NSIG)
- {
- if (oact != NULL
- /* We may have inherited SIG_IGN from the parent, so return the
- kernel's idea of the signal handler the first time
- through. */
- && (__sighandler_t) sighandler[sig].old != SIG_ERR)
- oact->sa_handler = (__sighandler_t) sighandler[sig].old;
- if (act)
- /* For the assignment it does not matter whether it's a normal
- or real-time signal. */
- sighandler[sig].old = (arch_sighandler_t) act->sa_handler;
- }
- return 0;
-}
-strong_alias(__sigaction, sigaction)
-
-/* A signal handler that does nothing */
-static void pthread_null_sighandler(int sig) { }
-
-/* sigwait -- synchronously wait for a signal */
-int sigwait(const sigset_t * set, int * sig)
-{
- volatile pthread_descr self = thread_self();
- sigset_t mask;
- int s;
- sigjmp_buf jmpbuf;
- struct sigaction sa;
-
- /* Get ready to block all signals except those in set
- and the cancellation signal.
- Also check that handlers are installed on all signals in set,
- and if not, install our dummy handler. This is conformant to
- POSIX: "The effect of sigwait() on the signal actions for the
- signals in set is unspecified." */
- sigfillset(&mask);
- sigdelset(&mask, __pthread_sig_cancel);
- for (s = 1; s < NSIG; s++) {
- if (sigismember(set, s) &&
- s != __pthread_sig_restart &&
- s != __pthread_sig_cancel &&
- s != __pthread_sig_debug) {
- sigdelset(&mask, s);
- if (sighandler[s].old == (arch_sighandler_t) SIG_ERR ||
- sighandler[s].old == (arch_sighandler_t) SIG_DFL ||
- sighandler[s].old == (arch_sighandler_t) SIG_IGN) {
- sa.sa_handler = pthread_null_sighandler;
- sigfillset(&sa.sa_mask);
- sa.sa_flags = 0;
- sigaction(s, &sa, NULL);
- }
- }
- }
- /* Test for cancellation */
- if (sigsetjmp(jmpbuf, 1) == 0) {
- THREAD_SETMEM(self, p_cancel_jmp, &jmpbuf);
- if (! (THREAD_GETMEM(self, p_canceled)
- && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE)) {
- /* Reset the signal count */
- THREAD_SETMEM(self, p_signal, 0);
- /* Say we're in sigwait */
- THREAD_SETMEM(self, p_sigwaiting, 1);
- /* Unblock the signals and wait for them */
- sigsuspend(&mask);
- }
- }
- THREAD_SETMEM(self, p_cancel_jmp, NULL);
- /* The signals are now reblocked. Check for cancellation */
- pthread_testcancel();
- /* We should have self->p_signal != 0 and equal to the signal received */
- *sig = THREAD_GETMEM(self, p_signal);
- return 0;
-}
-
-/* Redefine raise() to send signal to calling thread only,
- as per POSIX 1003.1c */
-int raise (int sig)
-{
- int retcode = pthread_kill(pthread_self(), sig);
- if (retcode == 0)
- return 0;
- else {
- errno = retcode;
- return -1;
- }
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/specific.c b/newlib/libc/sys/linux/linuxthreads/specific.c
deleted file mode 100644
index 2dbf2055e..000000000
--- a/newlib/libc/sys/linux/linuxthreads/specific.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-/* Thread-specific data */
-
-#include <errno.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include "pthread.h"
-#include "internals.h"
-#include "spinlock.h"
-#include "restart.h"
-#include <bits/libc-lock.h>
-
-
-/* Table of keys. */
-
-static struct pthread_key_struct pthread_keys[PTHREAD_KEYS_MAX] =
- { { 0, NULL } };
-
-/* For debugging purposes put the maximum number of keys in a variable. */
-const int __linuxthreads_pthread_keys_max = PTHREAD_KEYS_MAX;
-const int __linuxthreads_pthread_key_2ndlevel_size = PTHREAD_KEY_2NDLEVEL_SIZE;
-
-/* Mutex to protect access to pthread_keys */
-
-static pthread_mutex_t pthread_keys_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-/* Create a new key */
-
-int __pthread_key_create(pthread_key_t * key, destr_function destr)
-{
- int i;
-
- pthread_mutex_lock(&pthread_keys_mutex);
- for (i = 0; i < PTHREAD_KEYS_MAX; i++) {
- if (! pthread_keys[i].in_use) {
- /* Mark key in use */
- pthread_keys[i].in_use = 1;
- pthread_keys[i].destr = destr;
- pthread_mutex_unlock(&pthread_keys_mutex);
- *key = i;
- return 0;
- }
- }
- pthread_mutex_unlock(&pthread_keys_mutex);
- return EAGAIN;
-}
-strong_alias (__pthread_key_create, pthread_key_create)
-
-/* Reset deleted key's value to NULL in each live thread.
- * NOTE: this executes in the context of the thread manager! */
-
-struct pthread_key_delete_helper_args {
- /* Damn, we need lexical closures in C! ;) */
- unsigned int idx1st, idx2nd;
- pthread_descr self;
-};
-
-static void pthread_key_delete_helper(void *arg, pthread_descr th)
-{
- struct pthread_key_delete_helper_args *args = arg;
- unsigned int idx1st = args->idx1st;
- unsigned int idx2nd = args->idx2nd;
- pthread_descr self = args->self;
-
- if (self == 0)
- self = args->self = thread_self();
-
- if (!th->p_terminated) {
- /* pthread_exit() may try to free th->p_specific[idx1st] concurrently. */
- __pthread_lock(THREAD_GETMEM(th, p_lock), self);
- if (th->p_specific[idx1st] != NULL)
- th->p_specific[idx1st][idx2nd] = NULL;
- __pthread_unlock(THREAD_GETMEM(th, p_lock));
- }
-}
-
-/* Delete a key */
-int pthread_key_delete(pthread_key_t key)
-{
- pthread_descr self = thread_self();
-
- pthread_mutex_lock(&pthread_keys_mutex);
- if (key >= PTHREAD_KEYS_MAX || !pthread_keys[key].in_use) {
- pthread_mutex_unlock(&pthread_keys_mutex);
- return EINVAL;
- }
- pthread_keys[key].in_use = 0;
- pthread_keys[key].destr = NULL;
-
- /* Set the value of the key to NULL in all running threads, so
- that if the key is reallocated later by pthread_key_create, its
- associated values will be NULL in all threads.
-
- Do nothing if no threads have been created yet. */
-
- if (__pthread_manager_request != -1)
- {
- struct pthread_key_delete_helper_args args;
- struct pthread_request request;
-
- args.idx1st = key / PTHREAD_KEY_2NDLEVEL_SIZE;
- args.idx2nd = key % PTHREAD_KEY_2NDLEVEL_SIZE;
- args.self = 0;
-
- request.req_thread = self;
- request.req_kind = REQ_FOR_EACH_THREAD;
- request.req_args.for_each.arg = &args;
- request.req_args.for_each.fn = pthread_key_delete_helper;
-
- TEMP_FAILURE_RETRY(__libc_write(__pthread_manager_request,
- (char *) &request, sizeof(request)));
- suspend(self);
- }
-
- pthread_mutex_unlock(&pthread_keys_mutex);
- return 0;
-}
-
-/* Set the value of a key */
-
-int __pthread_setspecific(pthread_key_t key, const void * pointer)
-{
- pthread_descr self = thread_self();
- unsigned int idx1st, idx2nd;
-
- if (key >= PTHREAD_KEYS_MAX || !pthread_keys[key].in_use)
- return EINVAL;
- idx1st = key / PTHREAD_KEY_2NDLEVEL_SIZE;
- idx2nd = key % PTHREAD_KEY_2NDLEVEL_SIZE;
- if (THREAD_GETMEM_NC(self, p_specific[idx1st]) == NULL) {
- void *newp = calloc(PTHREAD_KEY_2NDLEVEL_SIZE, sizeof (void *));
- if (newp == NULL)
- return ENOMEM;
- THREAD_SETMEM_NC(self, p_specific[idx1st], newp);
- }
- THREAD_GETMEM_NC(self, p_specific[idx1st])[idx2nd] = (void *) pointer;
- return 0;
-}
-strong_alias (__pthread_setspecific, pthread_setspecific)
-
-/* Get the value of a key */
-
-void * __pthread_getspecific(pthread_key_t key)
-{
- pthread_descr self = thread_self();
- unsigned int idx1st, idx2nd;
-
- if (key >= PTHREAD_KEYS_MAX)
- return NULL;
- idx1st = key / PTHREAD_KEY_2NDLEVEL_SIZE;
- idx2nd = key % PTHREAD_KEY_2NDLEVEL_SIZE;
- if (THREAD_GETMEM_NC(self, p_specific[idx1st]) == NULL
- || !pthread_keys[key].in_use)
- return NULL;
- return THREAD_GETMEM_NC(self, p_specific[idx1st])[idx2nd];
-}
-strong_alias (__pthread_getspecific, pthread_getspecific)
-
-/* Call the destruction routines on all keys */
-
-void __pthread_destroy_specifics()
-{
- pthread_descr self = thread_self();
- int i, j, round, found_nonzero;
- destr_function destr;
- void * data;
-
- for (round = 0, found_nonzero = 1;
- found_nonzero && round < PTHREAD_DESTRUCTOR_ITERATIONS;
- round++) {
- found_nonzero = 0;
- for (i = 0; i < PTHREAD_KEY_1STLEVEL_SIZE; i++)
- if (THREAD_GETMEM_NC(self, p_specific[i]) != NULL)
- for (j = 0; j < PTHREAD_KEY_2NDLEVEL_SIZE; j++) {
- destr = pthread_keys[i * PTHREAD_KEY_2NDLEVEL_SIZE + j].destr;
- data = THREAD_GETMEM_NC(self, p_specific[i])[j];
- if (destr != NULL && data != NULL) {
- THREAD_GETMEM_NC(self, p_specific[i])[j] = NULL;
- destr(data);
- found_nonzero = 1;
- }
- }
- }
- __pthread_lock(THREAD_GETMEM(self, p_lock), self);
- for (i = 0; i < PTHREAD_KEY_1STLEVEL_SIZE; i++) {
- if (THREAD_GETMEM_NC(self, p_specific[i]) != NULL) {
- free(THREAD_GETMEM_NC(self, p_specific[i]));
- THREAD_SETMEM_NC(self, p_specific[i], NULL);
- }
- }
- __pthread_unlock(THREAD_GETMEM(self, p_lock));
-}
-
-/* Thread-specific data for libc. */
-
-static int
-libc_internal_tsd_set(enum __libc_tsd_key_t key, const void * pointer)
-{
- pthread_descr self = thread_self();
-
- THREAD_SETMEM_NC(self, p_libc_specific[key], (void *) pointer);
- return 0;
-}
-int (*__libc_internal_tsd_set)(enum __libc_tsd_key_t key, const void * pointer)
- = libc_internal_tsd_set;
-
-static void *
-libc_internal_tsd_get(enum __libc_tsd_key_t key)
-{
- pthread_descr self = thread_self();
-
- return THREAD_GETMEM_NC(self, p_libc_specific[key]);
-}
-void * (*__libc_internal_tsd_get)(enum __libc_tsd_key_t key)
- = libc_internal_tsd_get;
diff --git a/newlib/libc/sys/linux/linuxthreads/spinlock.c b/newlib/libc/sys/linux/linuxthreads/spinlock.c
deleted file mode 100644
index 3e1682599..000000000
--- a/newlib/libc/sys/linux/linuxthreads/spinlock.c
+++ /dev/null
@@ -1,774 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1998 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-/* Internal locks */
-
-#include <errno.h>
-#include <sched.h>
-#include <time.h>
-#include <stdlib.h>
-#include <limits.h>
-#include "pthread.h"
-#include "internals.h"
-#include "spinlock.h"
-#include "restart.h"
-
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
-static void __pthread_acquire(int * spinlock);
-
-static inline void __pthread_release(int * spinlock)
-{
- WRITE_MEMORY_BARRIER();
- *spinlock = __LT_SPINLOCK_INIT;
- __asm __volatile ("" : "=m" (*spinlock) : "0" (*spinlock));
-}
-#endif
-
-
-/* The status field of a spinlock is a pointer whose least significant
- bit is a locked flag.
-
- Thus the field values have the following meanings:
-
- status == 0: spinlock is free
- status == 1: spinlock is taken; no thread is waiting on it
-
- (status & 1) == 1: spinlock is taken and (status & ~1L) is a
- pointer to the first waiting thread; other
- waiting threads are linked via the p_nextlock
- field.
- (status & 1) == 0: same as above, but spinlock is not taken.
-
- The waiting list is not sorted by priority order.
- Actually, we always insert at top of list (sole insertion mode
- that can be performed without locking).
- For __pthread_unlock, we perform a linear search in the list
- to find the highest-priority, oldest waiting thread.
- This is safe because there are no concurrent __pthread_unlock
- operations -- only the thread that locked the mutex can unlock it. */
-
-
-void internal_function __pthread_lock(struct _pthread_fastlock * lock,
- pthread_descr self)
-{
-#if defined HAS_COMPARE_AND_SWAP
- long oldstatus, newstatus;
- int successful_seizure, spurious_wakeup_count;
- int spin_count;
-#endif
-
-#if defined TEST_FOR_COMPARE_AND_SWAP
- if (!__pthread_has_cas)
-#endif
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
- {
- __pthread_acquire(&lock->__spinlock);
- return;
- }
-#endif
-
-#if defined HAS_COMPARE_AND_SWAP
- /* First try it without preparation. Maybe it's a completely
- uncontested lock. */
- if (lock->__status == 0 && __compare_and_swap (&lock->__status, 0, 1))
- return;
-
- spurious_wakeup_count = 0;
- spin_count = 0;
-
-again:
-
- /* On SMP, try spinning to get the lock. */
-
- if (__pthread_smp_kernel) {
- int max_count = lock->__spinlock * 2 + 10;
-
- if (max_count > MAX_ADAPTIVE_SPIN_COUNT)
- max_count = MAX_ADAPTIVE_SPIN_COUNT;
-
- for (spin_count = 0; spin_count < max_count; spin_count++) {
- if (((oldstatus = lock->__status) & 1) == 0) {
- if(__compare_and_swap(&lock->__status, oldstatus, oldstatus | 1))
- {
- if (spin_count)
- lock->__spinlock += (spin_count - lock->__spinlock) / 8;
- READ_MEMORY_BARRIER();
- return;
- }
- }
-#ifdef BUSY_WAIT_NOP
- BUSY_WAIT_NOP;
-#endif
- __asm __volatile ("" : "=m" (lock->__status) : "0" (lock->__status));
- }
-
- lock->__spinlock += (spin_count - lock->__spinlock) / 8;
- }
-
- /* No luck, try once more or suspend. */
-
- do {
- oldstatus = lock->__status;
- successful_seizure = 0;
-
- if ((oldstatus & 1) == 0) {
- newstatus = oldstatus | 1;
- successful_seizure = 1;
- } else {
- if (self == NULL)
- self = thread_self();
- newstatus = (long) self | 1;
- }
-
- if (self != NULL) {
- THREAD_SETMEM(self, p_nextlock, (pthread_descr) (oldstatus & ~1L));
- /* Make sure the store in p_nextlock completes before performing
- the compare-and-swap */
- MEMORY_BARRIER();
- }
- } while(! __compare_and_swap(&lock->__status, oldstatus, newstatus));
-
- /* Suspend with guard against spurious wakeup.
- This can happen in pthread_cond_timedwait_relative, when the thread
- wakes up due to timeout and is still on the condvar queue, and then
- locks the queue to remove itself. At that point it may still be on the
- queue, and may be resumed by a condition signal. */
-
- if (!successful_seizure) {
- for (;;) {
- suspend(self);
- if (self->p_nextlock != NULL) {
- /* Count resumes that don't belong to us. */
- spurious_wakeup_count++;
- continue;
- }
- break;
- }
- goto again;
- }
-
- /* Put back any resumes we caught that don't belong to us. */
- while (spurious_wakeup_count--)
- restart(self);
-
- READ_MEMORY_BARRIER();
-#endif
-}
-
-int __pthread_unlock(struct _pthread_fastlock * lock)
-{
-#if defined HAS_COMPARE_AND_SWAP
- long oldstatus;
- pthread_descr thr, * ptr, * maxptr;
- int maxprio;
-#endif
-
-#if defined TEST_FOR_COMPARE_AND_SWAP
- if (!__pthread_has_cas)
-#endif
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
- {
- __pthread_release(&lock->__spinlock);
- return 0;
- }
-#endif
-
-#if defined HAS_COMPARE_AND_SWAP
- WRITE_MEMORY_BARRIER();
-
-again:
- while ((oldstatus = lock->__status) == 1) {
- if (__compare_and_swap_with_release_semantics(&lock->__status,
- oldstatus, 0))
- return 0;
- }
-
- /* Find thread in waiting queue with maximal priority */
- ptr = (pthread_descr *) &lock->__status;
- thr = (pthread_descr) (oldstatus & ~1L);
- maxprio = 0;
- maxptr = ptr;
-
- /* Before we iterate over the wait queue, we need to execute
- a read barrier, otherwise we may read stale contents of nodes that may
- just have been inserted by other processors. One read barrier is enough to
- ensure we have a stable list; we don't need one for each pointer chase
- through the list, because we are the owner of the lock; other threads
- can only add nodes at the front; if a front node is consistent,
- the ones behind it must also be. */
-
- READ_MEMORY_BARRIER();
-
- while (thr != 0) {
- if (thr->p_priority >= maxprio) {
- maxptr = ptr;
- maxprio = thr->p_priority;
- }
- ptr = &(thr->p_nextlock);
- thr = *ptr;
- }
-
- /* Remove max prio thread from waiting list. */
- if (maxptr == (pthread_descr *) &lock->__status) {
- /* If max prio thread is at head, remove it with compare-and-swap
- to guard against concurrent lock operation. This removal
- also has the side effect of marking the lock as released
- because the new status comes from thr->p_nextlock whose
- least significant bit is clear. */
- thr = (pthread_descr) (oldstatus & ~1L);
- if (! __compare_and_swap_with_release_semantics
- (&lock->__status, oldstatus, (long)(thr->p_nextlock)))
- goto again;
- } else {
- /* No risk of concurrent access, remove max prio thread normally.
- But in this case we must also flip the least significant bit
- of the status to mark the lock as released. */
- thr = *maxptr;
- *maxptr = thr->p_nextlock;
-
- /* Ensure deletion from linked list completes before we
- release the lock. */
- WRITE_MEMORY_BARRIER();
-
- do {
- oldstatus = lock->__status;
- } while (!__compare_and_swap_with_release_semantics(&lock->__status,
- oldstatus, oldstatus & ~1L));
- }
-
- /* Wake up the selected waiting thread. Woken thread can check
- its own p_nextlock field for NULL to detect that it has been removed. No
- barrier is needed here, since restart() and suspend() take
- care of memory synchronization. */
-
- thr->p_nextlock = NULL;
- restart(thr);
-
- return 0;
-#endif
-}
-
-/*
- * Alternate fastlocks do not queue threads directly. Instead, they queue
- * these wait queue node structures. When a timed wait wakes up due to
- * a timeout, it can leave its wait node in the queue (because there
- * is no safe way to remove from the quue). Some other thread will
- * deallocate the abandoned node.
- */
-
-
-struct wait_node {
- struct wait_node *next; /* Next node in null terminated linked list */
- pthread_descr thr; /* The thread waiting with this node */
- int abandoned; /* Atomic flag */
-};
-
-static long wait_node_free_list;
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
-static int wait_node_free_list_spinlock;
-#endif
-
-/* Allocate a new node from the head of the free list using an atomic
- operation, or else using malloc if that list is empty. A fundamental
- assumption here is that we can safely access wait_node_free_list->next.
- That's because we never free nodes once we allocate them, so a pointer to a
- node remains valid indefinitely. */
-
-static struct wait_node *wait_node_alloc(void)
-{
-#if defined HAS_COMPARE_AND_SWAP
- long oldvalue, newvalue;
-#endif
-
-#if defined TEST_FOR_COMPARE_AND_SWAP
- if (!__pthread_has_cas)
-#endif
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
- {
- struct wait_node *new_node = 0;
-
- __pthread_acquire(&wait_node_free_list_spinlock);
- if (wait_node_free_list != 0) {
- new_node = (struct wait_node *) wait_node_free_list;
- wait_node_free_list = (long) new_node->next;
- }
- WRITE_MEMORY_BARRIER();
- wait_node_free_list_spinlock = 0;
-
- if (new_node == 0)
- return malloc(sizeof *wait_node_alloc());
-
- return new_node;
- }
-#endif
-
-#if defined HAS_COMPARE_AND_SWAP
- do {
- oldvalue = wait_node_free_list;
-
- if (oldvalue == 0)
- return malloc(sizeof *wait_node_alloc());
-
- /* Ensure we don't read stale next link through oldvalue pointer. */
- READ_MEMORY_BARRIER();
- newvalue = (long) ((struct wait_node *) oldvalue)->next;
- } while (! __compare_and_swap(&wait_node_free_list, oldvalue, newvalue));
-
- return (struct wait_node *) oldvalue;
-#endif
-}
-
-/* Return a node to the head of the free list using an atomic
- operation. */
-
-static void wait_node_free(struct wait_node *wn)
-{
-#if defined HAS_COMPARE_AND_SWAP
- long oldvalue, newvalue;
-#endif
-
-#if defined TEST_FOR_COMPARE_AND_SWAP
- if (!__pthread_has_cas)
-#endif
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
- {
- __pthread_acquire(&wait_node_free_list_spinlock);
- wn->next = (struct wait_node *) wait_node_free_list;
- wait_node_free_list = (long) wn;
- WRITE_MEMORY_BARRIER();
- wait_node_free_list_spinlock = 0;
- return;
- }
-#endif
-
-#if defined HAS_COMPARE_AND_SWAP
- do {
- oldvalue = wait_node_free_list;
- wn->next = (struct wait_node *) oldvalue;
- newvalue = (long) wn;
- /* Ensure node contents are written before we swap it into the list. */
- WRITE_MEMORY_BARRIER();
- } while (! __compare_and_swap(&wait_node_free_list, oldvalue, newvalue));
-#endif
-}
-
-#if defined HAS_COMPARE_AND_SWAP
-
-/* Remove a wait node from the specified queue. It is assumed
- that the removal takes place concurrently with only atomic insertions at the
- head of the queue. */
-
-static void wait_node_dequeue(struct wait_node **pp_head,
- struct wait_node **pp_node,
- struct wait_node *p_node)
-{
- /* If the node is being deleted from the head of the
- list, it must be deleted using atomic compare-and-swap.
- Otherwise it can be deleted in the straightforward way. */
-
- if (pp_node == pp_head) {
- /* We don't need a read barrier between these next two loads,
- because it is assumed that the caller has already ensured
- the stability of *p_node with respect to p_node. */
-
- long oldvalue = (long) p_node;
- long newvalue = (long) p_node->next;
-
- if (__compare_and_swap((long *) pp_node, oldvalue, newvalue))
- return;
-
- /* Oops! Compare and swap failed, which means the node is
- no longer first. We delete it using the ordinary method. But we don't
- know the identity of the node which now holds the pointer to the node
- being deleted, so we must search from the beginning. */
-
- for (pp_node = pp_head; p_node != *pp_node; ) {
- pp_node = &(*pp_node)->next;
- READ_MEMORY_BARRIER(); /* Stabilize *pp_node for next iteration. */
- }
- }
-
- *pp_node = p_node->next;
- return;
-}
-
-#endif
-
-void __pthread_alt_lock(struct _pthread_fastlock * lock,
- pthread_descr self)
-{
-#if defined HAS_COMPARE_AND_SWAP
- long oldstatus, newstatus;
-#endif
- struct wait_node wait_node;
-
-#if defined TEST_FOR_COMPARE_AND_SWAP
- if (!__pthread_has_cas)
-#endif
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
- {
- int suspend_needed = 0;
- __pthread_acquire(&lock->__spinlock);
-
- if (lock->__status == 0)
- lock->__status = 1;
- else {
- if (self == NULL)
- self = thread_self();
-
- wait_node.abandoned = 0;
- wait_node.next = (struct wait_node *) lock->__status;
- wait_node.thr = self;
- lock->__status = (long) &wait_node;
- suspend_needed = 1;
- }
-
- __pthread_release(&lock->__spinlock);
-
- if (suspend_needed)
- suspend (self);
- return;
- }
-#endif
-
-#if defined HAS_COMPARE_AND_SWAP
- do {
- oldstatus = lock->__status;
- if (oldstatus == 0) {
- newstatus = 1;
- } else {
- if (self == NULL)
- self = thread_self();
- wait_node.thr = self;
- newstatus = (long) &wait_node;
- }
- wait_node.abandoned = 0;
- wait_node.next = (struct wait_node *) oldstatus;
- /* Make sure the store in wait_node.next completes before performing
- the compare-and-swap */
- MEMORY_BARRIER();
- } while(! __compare_and_swap(&lock->__status, oldstatus, newstatus));
-
- /* Suspend. Note that unlike in __pthread_lock, we don't worry
- here about spurious wakeup. That's because this lock is not
- used in situations where that can happen; the restart can
- only come from the previous lock owner. */
-
- if (oldstatus != 0)
- suspend(self);
-
- READ_MEMORY_BARRIER();
-#endif
-}
-
-/* Timed-out lock operation; returns 0 to indicate timeout. */
-
-int __pthread_alt_timedlock(struct _pthread_fastlock * lock,
- pthread_descr self, const struct timespec *abstime)
-{
- long oldstatus = 0;
-#if defined HAS_COMPARE_AND_SWAP
- long newstatus;
-#endif
- struct wait_node *p_wait_node = wait_node_alloc();
-
- /* Out of memory, just give up and do ordinary lock. */
- if (p_wait_node == 0) {
- __pthread_alt_lock(lock, self);
- return 1;
- }
-
-#if defined TEST_FOR_COMPARE_AND_SWAP
- if (!__pthread_has_cas)
-#endif
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
- {
- __pthread_acquire(&lock->__spinlock);
-
- if (lock->__status == 0)
- lock->__status = 1;
- else {
- if (self == NULL)
- self = thread_self();
-
- p_wait_node->abandoned = 0;
- p_wait_node->next = (struct wait_node *) lock->__status;
- p_wait_node->thr = self;
- lock->__status = (long) p_wait_node;
- oldstatus = 1; /* force suspend */
- }
-
- __pthread_release(&lock->__spinlock);
- goto suspend;
- }
-#endif
-
-#if defined HAS_COMPARE_AND_SWAP
- do {
- oldstatus = lock->__status;
- if (oldstatus == 0) {
- newstatus = 1;
- } else {
- if (self == NULL)
- self = thread_self();
- p_wait_node->thr = self;
- newstatus = (long) p_wait_node;
- }
- p_wait_node->abandoned = 0;
- p_wait_node->next = (struct wait_node *) oldstatus;
- /* Make sure the store in wait_node.next completes before performing
- the compare-and-swap */
- MEMORY_BARRIER();
- } while(! __compare_and_swap(&lock->__status, oldstatus, newstatus));
-#endif
-
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
- suspend:
-#endif
-
- /* If we did not get the lock, do a timed suspend. If we wake up due
- to a timeout, then there is a race; the old lock owner may try
- to remove us from the queue. This race is resolved by us and the owner
- doing an atomic testandset() to change the state of the wait node from 0
- to 1. If we succeed, then it's a timeout and we abandon the node in the
- queue. If we fail, it means the owner gave us the lock. */
-
- if (oldstatus != 0) {
- if (timedsuspend(self, abstime) == 0) {
- if (!testandset(&p_wait_node->abandoned))
- return 0; /* Timeout! */
-
- /* Eat oustanding resume from owner, otherwise wait_node_free() below
- will race with owner's wait_node_dequeue(). */
- suspend(self);
- }
- }
-
- wait_node_free(p_wait_node);
-
- READ_MEMORY_BARRIER();
-
- return 1; /* Got the lock! */
-}
-
-void __pthread_alt_unlock(struct _pthread_fastlock *lock)
-{
- struct wait_node *p_node, **pp_node, *p_max_prio, **pp_max_prio;
- struct wait_node ** const pp_head = (struct wait_node **) &lock->__status;
- int maxprio;
-
- WRITE_MEMORY_BARRIER();
-
-#if defined TEST_FOR_COMPARE_AND_SWAP
- if (!__pthread_has_cas)
-#endif
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
- {
- __pthread_acquire(&lock->__spinlock);
- }
-#endif
-
- while (1) {
-
- /* If no threads are waiting for this lock, try to just
- atomically release it. */
-#if defined TEST_FOR_COMPARE_AND_SWAP
- if (!__pthread_has_cas)
-#endif
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
- {
- if (lock->__status == 0 || lock->__status == 1) {
- lock->__status = 0;
- break;
- }
- }
-#endif
-
-#if defined TEST_FOR_COMPARE_AND_SWAP
- else
-#endif
-
-#if defined HAS_COMPARE_AND_SWAP
- {
- long oldstatus = lock->__status;
- if (oldstatus == 0 || oldstatus == 1) {
- if (__compare_and_swap_with_release_semantics (&lock->__status, oldstatus, 0))
- break;
- else
- continue;
- }
- }
-#endif
-
- /* Process the entire queue of wait nodes. Remove all abandoned
- wait nodes and put them into the global free queue, and
- remember the one unabandoned node which refers to the thread
- having the highest priority. */
-
- pp_max_prio = pp_node = pp_head;
- p_max_prio = p_node = *pp_head;
- maxprio = INT_MIN;
-
- READ_MEMORY_BARRIER(); /* Prevent access to stale data through p_node */
-
- while (p_node != (struct wait_node *) 1) {
- int prio;
-
- if (p_node->abandoned) {
- /* Remove abandoned node. */
-#if defined TEST_FOR_COMPARE_AND_SWAP
- if (!__pthread_has_cas)
-#endif
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
- *pp_node = p_node->next;
-#endif
-#if defined TEST_FOR_COMPARE_AND_SWAP
- else
-#endif
-#if defined HAS_COMPARE_AND_SWAP
- wait_node_dequeue(pp_head, pp_node, p_node);
-#endif
- wait_node_free(p_node);
- /* Note that the next assignment may take us to the beginning
- of the queue, to newly inserted nodes, if pp_node == pp_head.
- In that case we need a memory barrier to stabilize the first of
- these new nodes. */
- p_node = *pp_node;
- if (pp_node == pp_head)
- READ_MEMORY_BARRIER(); /* No stale reads through p_node */
- continue;
- } else if ((prio = p_node->thr->p_priority) >= maxprio) {
- /* Otherwise remember it if its thread has a higher or equal priority
- compared to that of any node seen thus far. */
- maxprio = prio;
- pp_max_prio = pp_node;
- p_max_prio = p_node;
- }
-
- /* This canno6 jump backward in the list, so no further read
- barrier is needed. */
- pp_node = &p_node->next;
- p_node = *pp_node;
- }
-
- /* If all threads abandoned, go back to top */
- if (maxprio == INT_MIN)
- continue;
-
- ASSERT (p_max_prio != (struct wait_node *) 1);
-
- /* Now we want to to remove the max priority thread's wait node from
- the list. Before we can do this, we must atomically try to change the
- node's abandon state from zero to nonzero. If we succeed, that means we
- have the node that we will wake up. If we failed, then it means the
- thread timed out and abandoned the node in which case we repeat the
- whole unlock operation. */
-
- if (!testandset(&p_max_prio->abandoned)) {
-#if defined TEST_FOR_COMPARE_AND_SWAP
- if (!__pthread_has_cas)
-#endif
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
- *pp_max_prio = p_max_prio->next;
-#endif
-#if defined TEST_FOR_COMPARE_AND_SWAP
- else
-#endif
-#if defined HAS_COMPARE_AND_SWAP
- wait_node_dequeue(pp_head, pp_max_prio, p_max_prio);
-#endif
- restart(p_max_prio->thr);
- break;
- }
- }
-
-#if defined TEST_FOR_COMPARE_AND_SWAP
- if (!__pthread_has_cas)
-#endif
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
- {
- __pthread_release(&lock->__spinlock);
- }
-#endif
-}
-
-
-/* Compare-and-swap emulation with a spinlock */
-
-#ifdef TEST_FOR_COMPARE_AND_SWAP
-int __pthread_has_cas = 0;
-#endif
-
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
-
-int __pthread_compare_and_swap(long * ptr, long oldval, long newval,
- int * spinlock)
-{
- int res;
-
- __pthread_acquire(spinlock);
-
- if (*ptr == oldval) {
- *ptr = newval; res = 1;
- } else {
- res = 0;
- }
-
- __pthread_release(spinlock);
-
- return res;
-}
-
-/* This function is called if the inlined test-and-set
- in __pthread_compare_and_swap() failed */
-
-/* The retry strategy is as follows:
- - We test and set the spinlock MAX_SPIN_COUNT times, calling
- sched_yield() each time. This gives ample opportunity for other
- threads with priority >= our priority to make progress and
- release the spinlock.
- - If a thread with priority < our priority owns the spinlock,
- calling sched_yield() repeatedly is useless, since we're preventing
- the owning thread from making progress and releasing the spinlock.
- So, after MAX_SPIN_LOCK attemps, we suspend the calling thread
- using nanosleep(). This again should give time to the owning thread
- for releasing the spinlock.
- Notice that the nanosleep() interval must not be too small,
- since the kernel does busy-waiting for short intervals in a realtime
- process (!). The smallest duration that guarantees thread
- suspension is currently 2ms.
- - When nanosleep() returns, we try again, doing MAX_SPIN_COUNT
- sched_yield(), then sleeping again if needed. */
-
-static void __pthread_acquire(int * spinlock)
-{
- int cnt = 0;
- struct timespec tm;
-
- READ_MEMORY_BARRIER();
-
- while (testandset(spinlock)) {
- if (cnt < MAX_SPIN_COUNT) {
- sched_yield();
- cnt++;
- } else {
- tm.tv_sec = 0;
- tm.tv_nsec = SPIN_SLEEP_DURATION;
- nanosleep(&tm, NULL);
- cnt = 0;
- }
- }
-}
-
-#endif
diff --git a/newlib/libc/sys/linux/linuxthreads/spinlock.h b/newlib/libc/sys/linux/linuxthreads/spinlock.h
deleted file mode 100644
index 0ec40c57c..000000000
--- a/newlib/libc/sys/linux/linuxthreads/spinlock.h
+++ /dev/null
@@ -1,218 +0,0 @@
-/* Linuxthreads - a simple clone()-based implementation of Posix */
-/* threads for Linux. */
-/* Copyright (C) 1998 Xavier Leroy (Xavier.Leroy@inria.fr) */
-/* */
-/* This program is free software; you can redistribute it and/or */
-/* modify it under the terms of the GNU Library General Public License */
-/* as published by the Free Software Foundation; either version 2 */
-/* of the License, or (at your option) any later version. */
-/* */
-/* This program is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU Library General Public License for more details. */
-
-#include <bits/initspin.h>
-
-
-/* There are 2 compare and swap synchronization primitives with
- different semantics:
-
- 1. compare_and_swap, which has acquire semantics (i.e. it
- completes befor subsequent writes.)
- 2. compare_and_swap_with_release_semantics, which has release
- semantics (it completes after previous writes.)
-
- For those platforms on which they are the same. HAS_COMPARE_AND_SWAP
- should be defined. For those platforms on which they are different,
- HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS has to be defined. */
-
-#ifndef HAS_COMPARE_AND_SWAP
-#ifdef HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
-#define HAS_COMPARE_AND_SWAP
-#endif
-#endif
-
-#if defined(TEST_FOR_COMPARE_AND_SWAP)
-
-extern int __pthread_has_cas;
-extern int __pthread_compare_and_swap(long * ptr, long oldval, long newval,
- int * spinlock);
-
-static inline int compare_and_swap(long * ptr, long oldval, long newval,
- int * spinlock)
-{
- if (__builtin_expect (__pthread_has_cas, 1))
- return __compare_and_swap(ptr, oldval, newval);
- else
- return __pthread_compare_and_swap(ptr, oldval, newval, spinlock);
-}
-
-#elif defined(HAS_COMPARE_AND_SWAP)
-
-#ifdef IMPLEMENT_TAS_WITH_CAS
-#define testandset(p) !__compare_and_swap((long int *) p, 0, 1)
-#endif
-
-#ifdef HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
-
-static inline int
-compare_and_swap_with_release_semantics (long * ptr, long oldval,
- long newval, int * spinlock)
-{
- return __compare_and_swap_with_release_semantics (ptr, oldval,
- newval);
-}
-
-#endif
-
-static inline int compare_and_swap(long * ptr, long oldval, long newval,
- int * spinlock)
-{
- return __compare_and_swap(ptr, oldval, newval);
-}
-
-#else
-
-extern int __pthread_compare_and_swap(long * ptr, long oldval, long newval,
- int * spinlock);
-
-static inline int compare_and_swap(long * ptr, long oldval, long newval,
- int * spinlock)
-{
- return __pthread_compare_and_swap(ptr, oldval, newval, spinlock);
-}
-
-#endif
-
-#ifndef HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
-#define compare_and_swap_with_release_semantics compare_and_swap
-#define __compare_and_swap_with_release_semantics __compare_and_swap
-#endif
-
-/* Internal locks */
-
-extern void internal_function __pthread_lock(struct _pthread_fastlock * lock,
- pthread_descr self);
-extern int __pthread_unlock(struct _pthread_fastlock *lock);
-
-static inline void __pthread_init_lock(struct _pthread_fastlock * lock)
-{
- lock->__status = 0;
- lock->__spinlock = __LT_SPINLOCK_INIT;
-}
-
-static inline int __pthread_trylock (struct _pthread_fastlock * lock)
-{
-#if defined TEST_FOR_COMPARE_AND_SWAP
- if (!__pthread_has_cas)
-#endif
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
- {
- return (testandset(&lock->__spinlock) ? EBUSY : 0);
- }
-#endif
-
-#if defined HAS_COMPARE_AND_SWAP
- do {
- if (lock->__status != 0) return EBUSY;
- } while(! __compare_and_swap(&lock->__status, 0, 1));
- return 0;
-#endif
-}
-
-/* Variation of internal lock used for pthread_mutex_t, supporting
- timed-out waits. Warning: do not mix these operations with the above ones
- over the same lock object! */
-
-extern void __pthread_alt_lock(struct _pthread_fastlock * lock,
- pthread_descr self);
-
-extern int __pthread_alt_timedlock(struct _pthread_fastlock * lock,
- pthread_descr self, const struct timespec *abstime);
-
-extern void __pthread_alt_unlock(struct _pthread_fastlock *lock);
-
-static inline void __pthread_alt_init_lock(struct _pthread_fastlock * lock)
-{
- lock->__status = 0;
- lock->__spinlock = __LT_SPINLOCK_INIT;
-}
-
-static inline int __pthread_alt_trylock (struct _pthread_fastlock * lock)
-{
-#if defined TEST_FOR_COMPARE_AND_SWAP
- if (!__pthread_has_cas)
-#endif
-#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
- {
- int res = EBUSY;
-
- if (testandset(&lock->__spinlock) == 0)
- {
- if (lock->__status == 0)
- {
- lock->__status = 1;
- WRITE_MEMORY_BARRIER();
- res = 0;
- }
- lock->__spinlock = __LT_SPINLOCK_INIT;
- }
- return res;
- }
-#endif
-
-#if defined HAS_COMPARE_AND_SWAP
- do {
- if (lock->__status != 0) return EBUSY;
- } while(! compare_and_swap(&lock->__status, 0, 1, &lock->__spinlock));
- return 0;
-#endif
-}
-
-/* Operations on pthread_atomic, which is defined in internals.h */
-
-static inline long atomic_increment(struct pthread_atomic *pa)
-{
- long oldval;
-
- do {
- oldval = pa->p_count;
- } while (!compare_and_swap(&pa->p_count, oldval, oldval + 1, &pa->p_spinlock));
-
- return oldval;
-}
-
-
-static inline long atomic_decrement(struct pthread_atomic *pa)
-{
- long oldval;
-
- do {
- oldval = pa->p_count;
- } while (!compare_and_swap(&pa->p_count, oldval, oldval - 1, &pa->p_spinlock));
-
- return oldval;
-}
-
-
-static inline void
-__pthread_set_own_extricate_if (pthread_descr self, pthread_extricate_if *peif)
-{
- /* Only store a non-null peif if the thread has cancellation enabled.
- Otherwise pthread_cancel will unconditionally call the extricate handler,
- and restart the thread giving rise to forbidden spurious wakeups. */
- if (peif == NULL
- || THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE)
- {
- /* If we are removing the extricate interface, we need to synchronize
- against pthread_cancel so that it does not continue with a pointer
- to a deallocated pthread_extricate_if struct! The thread lock
- is (ab)used for this synchronization purpose. */
- if (peif == NULL)
- __pthread_lock (THREAD_GETMEM(self, p_lock), self);
- THREAD_SETMEM(self, p_extricate, peif);
- if (peif == NULL)
- __pthread_unlock (THREAD_GETMEM(self, p_lock));
- }
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/sysctl.c b/newlib/libc/sys/linux/linuxthreads/sysctl.c
deleted file mode 100644
index 2512f17f1..000000000
--- a/newlib/libc/sys/linux/linuxthreads/sysctl.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Read or write system information. Linux version.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <sys/sysctl.h>
-
-#include <machine/syscall.h>
-
-static _syscall1(int,_sysctl,struct __sysctl_args *,args)
-
-int
-__sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
- void *newval, size_t newlen)
-{
- struct __sysctl_args args =
- {
- name: name,
- nlen: nlen,
- oldval: oldval,
- oldlenp: oldlenp,
- newval: newval,
- newlen: newlen
- };
-
- return _sysctl(&args);
-}
-weak_alias (__sysctl, sysctl)
diff --git a/newlib/libc/sys/linux/linuxthreads/td_init.c b/newlib/libc/sys/linux/linuxthreads/td_init.c
deleted file mode 100644
index c9d08e9ac..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_init.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Initialization function of thread debugger support library.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-int __td_debug;
-
-
-td_err_e
-td_init (void)
-{
- /* XXX We have to figure out what has to be done. */
- LOG ("td_init");
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_log.c b/newlib/libc/sys/linux/linuxthreads/td_log.c
deleted file mode 100644
index 531cf87d3..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_log.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Noop, left for historical reasons.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_log (void)
-{
- /* This interface is deprecated in the Sun interface. We provide it
- for compatibility but don't do anyhting ourself. We might in
- future do some logging if this seems reasonable. */
- LOG ("td_log");
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_symbol_list.c b/newlib/libc/sys/linux/linuxthreads/td_symbol_list.c
deleted file mode 100644
index e64d298f9..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_symbol_list.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Return list of symbols the library can request.
- Copyright (C) 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <assert.h>
-#include <gnu/lib-names.h>
-#include "thread_dbP.h"
-
-
-static const char *symbol_list_arr[] =
-{
- [PTHREAD_THREADS_EVENTS] = "__pthread_threads_events",
- [PTHREAD_LAST_EVENT] = "__pthread_last_event",
- [PTHREAD_HANDLES_NUM] = "__pthread_handles_num",
- [PTHREAD_HANDLES] = "__pthread_handles",
- [PTHREAD_KEYS] = "pthread_keys",
- [LINUXTHREADS_PTHREAD_THREADS_MAX] = "__linuxthreads_pthread_threads_max",
- [LINUXTHREADS_PTHREAD_KEYS_MAX] = "__linuxthreads_pthread_keys_max",
- [LINUXTHREADS_PTHREAD_SIZEOF_DESCR] = "__linuxthreads_pthread_sizeof_descr",
- [LINUXTHREADS_CREATE_EVENT] = "__linuxthreads_create_event",
- [LINUXTHREADS_DEATH_EVENT] = "__linuxthreads_death_event",
- [LINUXTHREADS_REAP_EVENT] = "__linuxthreads_reap_event",
- [NUM_MESSAGES] = NULL
-};
-
-
-const char **
-td_symbol_list (void)
-{
- return symbol_list_arr;
-}
-
-
-int
-td_lookup (struct ps_prochandle *ps, int idx, psaddr_t *sym_addr)
-{
- assert (idx >= 0 && idx < NUM_MESSAGES);
- return ps_pglobal_lookup (ps, LIBPTHREAD_SO, symbol_list_arr[idx], sym_addr);
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_clear_event.c b/newlib/libc/sys/linux/linuxthreads/td_ta_clear_event.c
deleted file mode 100644
index 151283394..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_clear_event.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Globally disable events.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_ta_clear_event (ta, event)
- const td_thragent_t *ta;
- td_thr_events_t *event;
-{
- td_thr_events_t old_event;
- int i;
-
- LOG ("td_ta_clear_event");
-
- /* Test whether the TA parameter is ok. */
- if (! ta_ok (ta))
- return TD_BADTA;
-
- /* Write the new value into the thread data structure. */
- if (ps_pdread (ta->ph, ta->pthread_threads_eventsp,
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* Remove the set bits in. */
- for (i = 0; i < TD_EVENTSIZE; ++i)
- old_event.event_bits[i] &= ~event->event_bits[i];
-
- /* Write the new value into the thread data structure. */
- if (ps_pdwrite (ta->ph, ta->pthread_threads_eventsp,
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_delete.c b/newlib/libc/sys/linux/linuxthreads/td_ta_delete.c
deleted file mode 100644
index 6af436813..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_delete.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Detach to target process.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stdlib.h>
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_ta_delete (td_thragent_t *ta)
-{
- LOG ("td_ta_delete");
-
- /* Safety check. */
- if (ta == NULL || __td_agent_list == NULL)
- return TD_BADTA;
-
- /* Remove the handle from the list. */
- if (ta == __td_agent_list->ta)
- /* It's the first element of the list. */
- __td_agent_list = __td_agent_list->next;
- else
- {
- /* We have to search for it. */
- struct agent_list *runp = __td_agent_list;
-
- while (runp->next != NULL && runp->next->ta != ta)
- runp = runp->next;
-
- if (runp->next == NULL)
- /* It's not a valid decriptor since it is not in the list. */
- return TD_BADTA;
-
- runp->next = runp->next->next;
- }
-
- /* The handle was allocated in `td_ta_new'. */
- free (ta);
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_enable_stats.c b/newlib/libc/sys/linux/linuxthreads/td_ta_enable_stats.c
deleted file mode 100644
index 43de1b2e6..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_enable_stats.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Enable collection of statistics for process.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_ta_enable_stats (const td_thragent_t *ta, int enable)
-{
- /* XXX We have to figure out what has to be done. */
- LOG ("td_ta_enable_stats");
-
- /* Test whether the TA parameter is ok. */
- if (! ta_ok (ta))
- return TD_BADTA;
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_event_addr.c b/newlib/libc/sys/linux/linuxthreads/td_ta_event_addr.c
deleted file mode 100644
index 8bce35ae8..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_event_addr.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Get event address.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_ta_event_addr (const td_thragent_t *ta, td_event_e event, td_notify_t *addr)
-{
- td_err_e res = TD_NOEVENT;
- int idx = -1;
-
- LOG ("td_ta_event_addr");
-
- /* Test whether the TA parameter is ok. */
- if (! ta_ok (ta))
- return TD_BADTA;
-
- switch (event)
- {
- case TD_CREATE:
- idx = LINUXTHREADS_CREATE_EVENT;
- break;
-
- case TD_DEATH:
- idx = LINUXTHREADS_DEATH_EVENT;
- break;
-
- case TD_REAP:
- idx = LINUXTHREADS_REAP_EVENT;
- break;
-
- default:
- /* Event cannot be handled. */
- break;
- }
-
- /* Now get the address. */
- if (idx != -1)
- {
- psaddr_t taddr;
-
- if (td_lookup (ta->ph, idx, &taddr) == PS_OK)
- {
- /* Success, we got the address. */
- addr->type = NOTIFY_BPT;
- addr->u.bptaddr = taddr;
-
- res = TD_OK;
- }
- else
- res = TD_ERR;
- }
-
- return res;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_event_getmsg.c b/newlib/libc/sys/linux/linuxthreads/td_ta_event_getmsg.c
deleted file mode 100644
index a4ccba3d0..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_event_getmsg.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Retrieve event.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stddef.h>
-#include <string.h>
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_ta_event_getmsg (const td_thragent_t *ta, td_event_msg_t *msg)
-{
- /* XXX I cannot think of another way but using a static variable. */
- static td_thrhandle_t th;
- td_eventbuf_t event;
- psaddr_t addr;
-
- LOG ("td_ta_event_getmsg");
-
- /* Test whether the TA parameter is ok. */
- if (! ta_ok (ta))
- return TD_BADTA;
-
- /* Get the pointer to the thread descriptor with the last event. */
- if (ps_pdread (ta->ph, ta->pthread_last_event,
- &addr, sizeof (void *)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* If the pointer is NULL no event occurred. */
- if (addr == 0)
- return TD_NOMSG;
-
- /* Read the even structure from the target. */
- if (ps_pdread (ta->ph,
- ((char *) addr
- + offsetof (struct _pthread_descr_struct, p_eventbuf)),
- &event, sizeof (td_eventbuf_t)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* Check whether an event occurred. */
- if (event.eventnum == TD_EVENT_NONE)
- {
- /* Oh well, this means the last event was already read. So
- we have to look for any other event. */
- struct pthread_handle_struct handles[ta->pthread_threads_max];
- int num;
- int i;
-
- /* Read the number of currently active threads. */
- if (ps_pdread (ta->ph, ta->pthread_handles_num, &num, sizeof (int))
- != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* Now read the handles. */
- if (ps_pdread (ta->ph, ta->handles, handles,
- ta->pthread_threads_max * sizeof (handles[0])) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- for (i = 0; i < ta->pthread_threads_max && num > 0; ++i)
- {
- if (handles[i].h_descr == NULL)
- /* No entry here. */
- continue;
-
- /* First count this active thread. */
- --num;
-
- if (handles[i].h_descr == addr)
- /* We already handled this. */
- continue;
-
- /* Read the event data for this thread. */
- if (ps_pdread (ta->ph,
- ((char *) handles[i].h_descr
- + offsetof (struct _pthread_descr_struct,
- p_eventbuf)),
- &event, sizeof (td_eventbuf_t)) != PS_OK)
- return TD_ERR;
-
- if (event.eventnum != TD_EVENT_NONE)
- {
- /* We found a thread with an unreported event. */
- addr = handles[i].h_descr;
- break;
- }
- }
-
- /* If we haven't found any other event signal this to the user. */
- if (event.eventnum == TD_EVENT_NONE)
- return TD_NOMSG;
- }
-
- /* Generate the thread descriptor. */
- th.th_ta_p = (td_thragent_t *) ta;
- th.th_unique = addr;
-
- /* Fill the user's data structure. */
- msg->event = event.eventnum;
- msg->th_p = &th;
- msg->msg.data = (uintptr_t) event.eventdata;
-
- /* And clear the event message in the target. */
- memset (&event, '\0', sizeof (td_eventbuf_t));
- if (ps_pdwrite (ta->ph,
- ((char *) addr
- + offsetof (struct _pthread_descr_struct, p_eventbuf)),
- &event, sizeof (td_eventbuf_t)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_get_nthreads.c b/newlib/libc/sys/linux/linuxthreads/td_ta_get_nthreads.c
deleted file mode 100644
index 839b56be5..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_get_nthreads.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Get the number of threads in the process.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-td_err_e
-td_ta_get_nthreads (const td_thragent_t *ta, int *np)
-{
- psaddr_t addr;
-
- LOG ("td_ta_get_nthreads");
-
- /* Test whether the TA parameter is ok. */
- if (! ta_ok (ta))
- return TD_BADTA;
-
- /* Access the variable `__pthread_handles_num'. */
- if (td_lookup (ta->ph, PTHREAD_HANDLES_NUM, &addr) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- if (ps_pdread (ta->ph, addr, np, sizeof (int)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_get_ph.c b/newlib/libc/sys/linux/linuxthreads/td_ta_get_ph.c
deleted file mode 100644
index ffa833d92..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_get_ph.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Get external process handle.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_ta_get_ph (const td_thragent_t *ta, struct ps_prochandle **ph)
-{
- LOG ("td_ta_get_ph");
-
- /* Test whether the TA parameter is ok. */
- if (! ta_ok (ta))
- return TD_BADTA;
-
- *ph = ta->ph;
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_get_stats.c b/newlib/libc/sys/linux/linuxthreads/td_ta_get_stats.c
deleted file mode 100644
index d2ba342d7..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_get_stats.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Retrieve statistics for process.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_ta_get_stats (const td_thragent_t *ta, td_ta_stats_t *statsp)
-{
- /* XXX We have to figure out what has to be done. */
- LOG ("td_ta_get_stats");
-
- /* Test whether the TA parameter is ok. */
- if (! ta_ok (ta))
- return TD_BADTA;
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_map_id2thr.c b/newlib/libc/sys/linux/linuxthreads/td_ta_map_id2thr.c
deleted file mode 100644
index 184f2de2e..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_map_id2thr.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Map thread ID to thread handle.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_ta_map_id2thr (const td_thragent_t *ta, pthread_t pt, td_thrhandle_t *th)
-{
- struct pthread_handle_struct phc;
- struct _pthread_descr_struct pds;
- int pthread_threads_max;
-
- LOG ("td_ta_map_id2thr");
-
- /* Test whether the TA parameter is ok. */
- if (! ta_ok (ta))
- return TD_BADTA;
-
- /* Make the following expression a bit smaller. */
- pthread_threads_max = ta->pthread_threads_max;
-
- /* We can compute the entry in the handle array we want. */
- if (ps_pdread (ta->ph, ta->handles + pt % pthread_threads_max, &phc,
- sizeof (struct pthread_handle_struct)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* Test whether this entry is in use. */
- if (phc.h_descr == NULL)
- return TD_BADTH;
-
- /* Next test: get the descriptor to see whether this is not an old
- thread handle. */
- if (ps_pdread (ta->ph, phc.h_descr, &pds,
- sizeof (struct _pthread_descr_struct)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- if (pds.p_tid != pt)
- return TD_BADTH;
-
- if (pds.p_terminated != 0)
- return TD_NOTHR;
-
- /* Create the `td_thrhandle_t' object. */
- th->th_ta_p = (td_thragent_t *) ta;
- th->th_unique = phc.h_descr;
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_map_lwp2thr.c b/newlib/libc/sys/linux/linuxthreads/td_ta_map_lwp2thr.c
deleted file mode 100644
index 78b9fbb66..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_map_lwp2thr.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Which thread is running on an lwp?
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_ta_map_lwp2thr (const td_thragent_t *ta, lwpid_t lwpid, td_thrhandle_t *th)
-{
- int pthread_threads_max = ta->pthread_threads_max;
- size_t sizeof_descr = ta->sizeof_descr;
- struct pthread_handle_struct phc[pthread_threads_max];
- size_t cnt;
-#ifdef ALL_THREADS_STOPPED
- int num;
-#else
-# define num 1
-#endif
-
- LOG ("td_ta_map_lwp2thr");
-
- /* Test whether the TA parameter is ok. */
- if (! ta_ok (ta))
- return TD_BADTA;
-
- /* Read all the descriptors. */
- if (ps_pdread (ta->ph, ta->handles, phc,
- sizeof (struct pthread_handle_struct) * pthread_threads_max)
- != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
-#ifdef ALL_THREADS_STOPPED
- /* Read the number of currently active threads. */
- if (ps_pdread (ta->ph, ta->pthread_handles_num, &num, sizeof (int)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-#endif
-
- /* Get the entries one after the other and find out whether the ID
- matches. */
- for (cnt = 0; cnt < pthread_threads_max && num > 0; ++cnt)
- if (phc[cnt].h_descr != NULL)
- {
- struct _pthread_descr_struct pds;
-
-#ifdef ALL_THREADS_STOPPED
- /* First count this active thread. */
- --num;
-#endif
-
- if (ps_pdread (ta->ph, phc[cnt].h_descr, &pds, sizeof_descr) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- if ((pds.p_pid ?: ps_getpid (ta->ph)) == lwpid)
- {
- /* Found it. Now fill in the `td_thrhandle_t' object. */
- th->th_ta_p = (td_thragent_t *) ta;
- th->th_unique = phc[cnt].h_descr;
-
- return TD_OK;
- }
- }
-
- return TD_NOLWP;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_new.c b/newlib/libc/sys/linux/linuxthreads/td_ta_new.c
deleted file mode 100644
index 7505f53e6..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_new.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/* Attach to target process.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stddef.h>
-#include <stdlib.h>
-
-#include "thread_dbP.h"
-
-
-/* Datatype for the list of known thread agents. Normally there will
- be exactly one so we don't spend much though on making it fast. */
-struct agent_list *__td_agent_list;
-
-
-td_err_e
-td_ta_new (struct ps_prochandle *ps, td_thragent_t **ta)
-{
- psaddr_t addr;
- struct agent_list *elemp;
-
- LOG ("td_ta_new");
-
- /* Get the global event mask. This is one of the variables which
- are new in the thread library to enable debugging. If it is
- not available we cannot debug. */
- if (td_lookup (ps, PTHREAD_THREADS_EVENTS, &addr) != PS_OK)
- return TD_NOLIBTHREAD;
-
- /* Fill in the appropriate information. */
- *ta = (td_thragent_t *) malloc (sizeof (td_thragent_t));
- if (*ta == NULL)
- return TD_MALLOC;
-
- /* Store the proc handle which we will pass to the callback functions
- back into the debugger. */
- (*ta)->ph = ps;
-
- /* Remember the address. */
- (*ta)->pthread_threads_eventsp = (td_thr_events_t *) addr;
-
- /* Get the pointer to the variable pointing to the thread descriptor
- with the last event. */
- if (td_lookup (ps, PTHREAD_LAST_EVENT, &(*ta)->pthread_last_event) != PS_OK)
- {
- free_return:
- free (*ta);
- return TD_ERR;
- }
-
- /* Get the pointer to the variable containing the number of active
- threads. */
- if (td_lookup (ps, PTHREAD_HANDLES_NUM, &(*ta)->pthread_handles_num)
- != PS_OK)
- goto free_return;
-
- /* See whether the library contains the necessary symbols. */
- if (td_lookup (ps, PTHREAD_HANDLES, &addr) != PS_OK)
- goto free_return;
-
- (*ta)->handles = (struct pthread_handle_struct *) addr;
-
-
- if (td_lookup (ps, PTHREAD_KEYS, &addr) != PS_OK)
- goto free_return;
-
- /* Cast to the right type. */
- (*ta)->keys = (struct pthread_key_struct *) addr;
-
- /* Find out about the maximum number of threads. Old implementations
- don't provide this information. In this case we assume that the
- debug library is compiled with the same values. */
- if (td_lookup (ps, LINUXTHREADS_PTHREAD_THREADS_MAX, &addr) != PS_OK)
- (*ta)->pthread_threads_max = PTHREAD_THREADS_MAX;
- else
- {
- if (ps_pdread (ps, addr, &(*ta)->pthread_threads_max, sizeof (int))
- != PS_OK)
- goto free_return;
- }
-
- /* Similar for the maximum number of thread local data keys. */
- if (td_lookup (ps, LINUXTHREADS_PTHREAD_KEYS_MAX, &addr) != PS_OK)
- (*ta)->pthread_keys_max = PTHREAD_KEYS_MAX;
- else
- {
- if (ps_pdread (ps, addr, &(*ta)->pthread_keys_max, sizeof (int))
- != PS_OK)
- goto free_return;
- }
-
- /* And for the size of the second level arrays for the keys. */
- if (td_lookup (ps, LINUXTHREADS_PTHREAD_SIZEOF_DESCR, &addr) != PS_OK)
- (*ta)->sizeof_descr = sizeof (struct _pthread_descr_struct);
- else
- {
- if (ps_pdread (ps, addr, &(*ta)->sizeof_descr, sizeof (int)) != PS_OK)
- goto free_return;
- }
-
- /* Now add the new agent descriptor to the list. */
- elemp = (struct agent_list *) malloc (sizeof (struct agent_list));
- if (elemp == NULL)
- {
- /* Argh, now that everything else worked... */
- free (*ta);
- return TD_MALLOC;
- }
-
- /* We don't care for thread-safety here. */
- elemp->ta = *ta;
- elemp->next = __td_agent_list;
- __td_agent_list = elemp;
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_reset_stats.c b/newlib/libc/sys/linux/linuxthreads/td_ta_reset_stats.c
deleted file mode 100644
index 533d4c412..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_reset_stats.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Reset statistics.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_ta_reset_stats (const td_thragent_t *ta)
-{
- /* XXX We have to figure out what has to be done. */
- LOG ("td_ta_reset_stats");
-
- /* Test whether the TA parameter is ok. */
- if (! ta_ok (ta))
- return TD_BADTA;
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_set_event.c b/newlib/libc/sys/linux/linuxthreads/td_ta_set_event.c
deleted file mode 100644
index 041aaec40..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_set_event.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Globally enable events.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_ta_set_event (ta, event)
- const td_thragent_t *ta;
- td_thr_events_t *event;
-{
- td_thr_events_t old_event;
- int i;
-
- LOG ("td_ta_set_event");
-
- /* Test whether the TA parameter is ok. */
- if (! ta_ok (ta))
- return TD_BADTA;
-
- /* Write the new value into the thread data structure. */
- if (ps_pdread (ta->ph, ta->pthread_threads_eventsp,
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* Or the new bits in. */
- for (i = 0; i < TD_EVENTSIZE; ++i)
- old_event.event_bits[i] |= event->event_bits[i];
-
- /* Write the new value into the thread data structure. */
- if (ps_pdwrite (ta->ph, ta->pthread_threads_eventsp,
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_setconcurrency.c b/newlib/libc/sys/linux/linuxthreads/td_ta_setconcurrency.c
deleted file mode 100644
index da15a0f61..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_setconcurrency.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Set suggested concurrency level for process.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_ta_setconcurrency (const td_thragent_t *ta, int level)
-{
- /* This is something LinuxThreads does not support. */
- LOG ("td_ta_setconcurrency");
-
- /* Test whether the TA parameter is ok. */
- if (! ta_ok (ta))
- return TD_BADTA;
-
- return TD_NOCAPAB;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_thr_iter.c b/newlib/libc/sys/linux/linuxthreads/td_ta_thr_iter.c
deleted file mode 100644
index a77186d22..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_thr_iter.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* Iterate over a process's threads.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-#include <alloca.h>
-
-static int
-handle_descr (const td_thragent_t *ta, td_thr_iter_f *callback,
- void *cbdata_p, td_thr_state_e state, int ti_pri,
- size_t cnt, pthread_descr descr)
-{
- struct _pthread_descr_struct pds;
- size_t sizeof_descr = ta->sizeof_descr;
- td_thrhandle_t th;
-
- if (ps_pdread (ta->ph, descr, &pds, sizeof_descr) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* The manager thread must be handled special. The descriptor
- exists but the thread only gets created when the first
- `pthread_create' call is issued. A clear indication that this
- happened is when the p_pid field is non-zero. */
- if (cnt == 1 && pds.p_pid == 0)
- return TD_OK;
-
- /* Now test whether this thread matches the specified
- conditions. */
-
- /* Only if the priority level is as high or higher. */
- if (pds.p_priority < ti_pri)
- return TD_OK;
-
- /* Test the state.
- XXX This is incomplete. */
- if (state != TD_THR_ANY_STATE)
- return TD_OK;
-
- /* XXX For now we ignore threads which are not running anymore.
- The reason is that gdb tries to get the registers and fails.
- In future we should have a special mode of the thread library
- in which we keep the process around until the actual join
- operation happened. */
- if (pds.p_exited != 0)
- return TD_OK;
-
- /* Yep, it matches. Call the callback function. */
- th.th_ta_p = (td_thragent_t *) ta;
- th.th_unique = descr;
- if (callback (&th, cbdata_p) != 0)
- return TD_DBERR;
-
- /* All done successfully. */
- return TD_OK;
-}
-
-
-td_err_e
-td_ta_thr_iter (const td_thragent_t *ta, td_thr_iter_f *callback,
- void *cbdata_p, td_thr_state_e state, int ti_pri,
- sigset_t *ti_sigmask_p, unsigned int ti_user_flags)
-{
- int pthread_threads_max;
- struct pthread_handle_struct *phc;
- td_err_e result = TD_OK;
- int cnt;
-#ifdef ALL_THREADS_STOPPED
- int num;
-#else
-# define num 1
-#endif
-
- LOG ("td_ta_thr_iter");
-
- /* Test whether the TA parameter is ok. */
- if (! ta_ok (ta))
- return TD_BADTA;
-
- pthread_threads_max = ta->pthread_threads_max;
- phc = (struct pthread_handle_struct *) alloca (sizeof (phc[0])
- * pthread_threads_max);
-
- /* First read only the main thread and manager thread information. */
- if (ps_pdread (ta->ph, ta->handles, phc,
- sizeof (struct pthread_handle_struct) * 2) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* Now handle these descriptors. */
- result = handle_descr (ta, callback, cbdata_p, state, ti_pri, 0,
- phc[0].h_descr);
- if (result != TD_OK)
- return result;
- result = handle_descr (ta, callback, cbdata_p, state, ti_pri, 1,
- phc[1].h_descr);
- if (result != TD_OK)
- return result;
-
- /* Read all the descriptors. */
- if (ps_pdread (ta->ph, ta->handles + 2, &phc[2],
- (sizeof (struct pthread_handle_struct)
- * (pthread_threads_max - 2))) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
-#ifdef ALL_THREADS_STOPPED
- /* Read the number of currently active threads. */
- if (ps_pdread (ta->ph, ta->pthread_handles_num, &num, sizeof (int)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-#endif
-
- /* Now get all descriptors, one after the other. */
- for (cnt = 2; cnt < pthread_threads_max && num > 0; ++cnt)
- if (phc[cnt].h_descr != NULL)
- {
-#ifdef ALL_THREADS_STOPPED
- /* First count this active thread. */
- --num;
-#endif
-
- result = handle_descr (ta, callback, cbdata_p, state, ti_pri, cnt,
- phc[cnt].h_descr);
- if (result != TD_OK)
- break;
- }
-
- return result;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_ta_tsd_iter.c b/newlib/libc/sys/linux/linuxthreads/td_ta_tsd_iter.c
deleted file mode 100644
index 92ceb1f28..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_ta_tsd_iter.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Iterate over a process's thread-specific data.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-#include <alloca.h>
-
-td_err_e
-td_ta_tsd_iter (const td_thragent_t *ta, td_key_iter_f *callback,
- void *cbdata_p)
-{
- struct pthread_key_struct *keys;
- int pthread_keys_max;
- int cnt;
-
- LOG ("td_ta_tsd_iter");
-
- /* Test whether the TA parameter is ok. */
- if (! ta_ok (ta))
- return TD_BADTA;
-
- pthread_keys_max = ta->pthread_keys_max;
- keys = (struct pthread_key_struct *) alloca (sizeof (keys[0])
- * pthread_keys_max);
-
- /* Read all the information about the keys. */
- if (ps_pdread (ta->ph, ta->keys, keys,
- sizeof (keys[0]) * pthread_keys_max) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* Now get all descriptors, one after the other. */
- for (cnt = 0; cnt < pthread_keys_max; ++cnt)
- if (keys[cnt].in_use
- /* Return with an error if the callback returns a nonzero value. */
- && callback (cnt, keys[cnt].destr, cbdata_p) != 0)
- return TD_DBERR;
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_clear_event.c b/newlib/libc/sys/linux/linuxthreads/td_thr_clear_event.c
deleted file mode 100644
index e40e4c36c..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_clear_event.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Disable specific event for thread.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stddef.h>
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_clear_event (th, event)
- const td_thrhandle_t *th;
- td_thr_events_t *event;
-{
- td_thr_events_t old_event;
- int i;
-
- LOG ("td_thr_clear_event");
-
- /* Write the new value into the thread data structure. */
- if (ps_pdread (th->th_ta_p->ph,
- ((char *) th->th_unique
- + offsetof (struct _pthread_descr_struct,
- p_eventbuf.eventmask)),
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* Remove the set bits in. */
- for (i = 0; i < TD_EVENTSIZE; ++i)
- old_event.event_bits[i] &= ~event->event_bits[i];
-
- /* Write the new value into the thread data structure. */
- if (ps_pdwrite (th->th_ta_p->ph,
- ((char *) th->th_unique
- + offsetof (struct _pthread_descr_struct,
- p_eventbuf.eventmask)),
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_dbresume.c b/newlib/libc/sys/linux/linuxthreads/td_thr_dbresume.c
deleted file mode 100644
index dbe10bc1c..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_dbresume.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Resume execution of given thread.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_dbresume (const td_thrhandle_t *th)
-{
- /* XXX We have to figure out what has to be done. */
- LOG ("td_thr_dbresume");
- return TD_NOCAPAB;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_dbsuspend.c b/newlib/libc/sys/linux/linuxthreads/td_thr_dbsuspend.c
deleted file mode 100644
index f96be3628..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_dbsuspend.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Suspend execution of given thread.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_dbsuspend (const td_thrhandle_t *th)
-{
- /* XXX We have to figure out what has to be done. */
- LOG ("td_thr_dbsuspend");
- return TD_NOCAPAB;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_event_enable.c b/newlib/libc/sys/linux/linuxthreads/td_thr_event_enable.c
deleted file mode 100644
index 3eecd21e2..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_event_enable.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Enable event process-wide.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stddef.h>
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_event_enable (th, onoff)
- const td_thrhandle_t *th;
- int onoff;
-{
- LOG ("td_thr_event_enable");
-
- /* Write the new value into the thread data structure. */
- if (ps_pdwrite (th->th_ta_p->ph,
- ((char *) th->th_unique
- + offsetof (struct _pthread_descr_struct, p_report_events)),
- &onoff, sizeof (int)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_event_getmsg.c b/newlib/libc/sys/linux/linuxthreads/td_thr_event_getmsg.c
deleted file mode 100644
index 582e89e5f..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_event_getmsg.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Retrieve event.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stddef.h>
-#include <string.h>
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_event_getmsg (const td_thrhandle_t *th, td_event_msg_t *msg)
-{
- td_eventbuf_t event;
-
- LOG ("td_thr_event_getmsg");
-
- /* Read the even structure from the target. */
- if (ps_pdread (th->th_ta_p->ph,
- ((char *) th->th_unique
- + offsetof (struct _pthread_descr_struct, p_eventbuf)),
- &event, sizeof (td_eventbuf_t)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* Check whether an event occurred. */
- if (event.eventnum == TD_EVENT_NONE)
- /* Nothing. */
- return TD_NOMSG;
-
- /* Fill the user's data structure. */
- msg->event = event.eventnum;
- msg->th_p = th;
- msg->msg.data = (uintptr_t) event.eventdata;
-
- /* And clear the event message in the target. */
- memset (&event, '\0', sizeof (td_eventbuf_t));
- if (ps_pdwrite (th->th_ta_p->ph,
- ((char *) th->th_unique
- + offsetof (struct _pthread_descr_struct, p_eventbuf)),
- &event, sizeof (td_eventbuf_t)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_get_info.c b/newlib/libc/sys/linux/linuxthreads/td_thr_get_info.c
deleted file mode 100644
index b4979583a..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_get_info.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Get thread information.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stddef.h>
-#include <string.h>
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_get_info (const td_thrhandle_t *th, td_thrinfo_t *infop)
-{
- struct _pthread_descr_struct pds;
-
- LOG ("td_thr_get_info");
-
- /* Get the thread descriptor. */
- if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
- th->th_ta_p->sizeof_descr) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* Fill in information. Clear first to provide reproducable
- results for the fields we do not fill in. */
- memset (infop, '\0', sizeof (td_thrinfo_t));
-
- /* We have to handle the manager thread special since the thread
- descriptor in older versions is not fully initialized. */
- if (pds.p_nr == 1)
- {
- infop->ti_tid = th->th_ta_p->pthread_threads_max * 2 + 1;
- infop->ti_type = TD_THR_SYSTEM;
- infop->ti_state = TD_THR_ACTIVE;
- }
- else
- {
- infop->ti_tid = pds.p_tid;
- infop->ti_tls = (char *) pds.p_specific;
- infop->ti_pri = pds.p_priority;
- infop->ti_type = TD_THR_USER;
-
- if (! pds.p_terminated)
- /* XXX For now there is no way to get more information. */
- infop->ti_state = TD_THR_ACTIVE;
- else if (! pds.p_detached)
- infop->ti_state = TD_THR_ZOMBIE;
- else
- infop->ti_state = TD_THR_UNKNOWN;
- }
-
- /* Initialization which are the same in both cases. */
- infop->ti_lid = pds.p_pid ?: ps_getpid (th->th_ta_p->ph);
- infop->ti_ta_p = th->th_ta_p;
- infop->ti_startfunc = pds.p_start_args.start_routine;
- memcpy (&infop->ti_events, &pds.p_eventbuf.eventmask,
- sizeof (td_thr_events_t));
- infop->ti_traceme = pds.p_report_events != 0;
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_getfpregs.c b/newlib/libc/sys/linux/linuxthreads/td_thr_getfpregs.c
deleted file mode 100644
index b453cc0e9..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_getfpregs.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Get a thread's floating-point register set.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_getfpregs (const td_thrhandle_t *th, prfpregset_t *regset)
-{
- struct _pthread_descr_struct pds;
-
- LOG ("td_thr_getfpregs");
-
- /* We have to get the state and the PID for this thread. */
- if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
- sizeof (struct _pthread_descr_struct)) != PS_OK)
- return TD_ERR;
-
- /* If the thread already terminated we return all zeroes. */
- if (pds.p_terminated)
- memset (regset, '\0', sizeof (*regset));
- /* Otherwise get the register content through the callback. */
- else
- {
- pid_t pid = pds.p_pid ?: ps_getpid (th->th_ta_p->ph);
-
- if (ps_lgetfpregs (th->th_ta_p->ph, pid, regset) != PS_OK)
- return TD_ERR;
- }
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_getgregs.c b/newlib/libc/sys/linux/linuxthreads/td_thr_getgregs.c
deleted file mode 100644
index 462a1a192..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_getgregs.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Get a thread's general register set.
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_getgregs (const td_thrhandle_t *th, prgregset_t gregs)
-{
- struct _pthread_descr_struct pds;
-
- LOG ("td_thr_getgregs");
-
- /* We have to get the state and the PID for this thread. */
- if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
- sizeof (struct _pthread_descr_struct)) != PS_OK)
- return TD_ERR;
-
- /* If the thread already terminated we return all zeroes. */
- if (pds.p_terminated)
- memset (gregs, '\0', sizeof (prgregset_t));
- /* Otherwise get the register content through the callback. */
- else
- {
- pid_t pid = pds.p_pid ?: ps_getpid (th->th_ta_p->ph);
-
- if (ps_lgetregs (th->th_ta_p->ph, pid, gregs) != PS_OK)
- return TD_ERR;
- }
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_getxregs.c b/newlib/libc/sys/linux/linuxthreads/td_thr_getxregs.c
deleted file mode 100644
index a5194568c..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_getxregs.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Get a thread's extra state register set.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_getxregs (const td_thrhandle_t *th, void *xregs)
-{
- /* XXX This might be platform specific. */
- LOG ("td_thr_getxregs");
- return TD_NOXREGS;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_getxregsize.c b/newlib/libc/sys/linux/linuxthreads/td_thr_getxregsize.c
deleted file mode 100644
index ddf8cbbe6..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_getxregsize.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Get the size of the extra state register set for this architecture.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_getxregsize (const td_thrhandle_t *th, int *sizep)
-{
- /* XXX This might be platform specific. */
- LOG ("td_thr_getxregsize");
- return TD_NOXREGS;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_set_event.c b/newlib/libc/sys/linux/linuxthreads/td_thr_set_event.c
deleted file mode 100644
index 6171155b6..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_set_event.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Enable specific event for thread.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stddef.h>
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_set_event (th, event)
- const td_thrhandle_t *th;
- td_thr_events_t *event;
-{
- td_thr_events_t old_event;
- int i;
-
- LOG ("td_thr_set_event");
-
- /* Write the new value into the thread data structure. */
- if (ps_pdread (th->th_ta_p->ph,
- ((char *) th->th_unique
- + offsetof (struct _pthread_descr_struct,
- p_eventbuf.eventmask)),
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* Or the new bits in. */
- for (i = 0; i < TD_EVENTSIZE; ++i)
- old_event.event_bits[i] |= event->event_bits[i];
-
- /* Write the new value into the thread data structure. */
- if (ps_pdwrite (th->th_ta_p->ph,
- ((char *) th->th_unique
- + offsetof (struct _pthread_descr_struct,
- p_eventbuf.eventmask)),
- &old_event, sizeof (td_thrhandle_t)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_setfpregs.c b/newlib/libc/sys/linux/linuxthreads/td_thr_setfpregs.c
deleted file mode 100644
index 0d4fce540..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_setfpregs.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Set a thread's floating-point register set.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_setfpregs (const td_thrhandle_t *th, const prfpregset_t *fpregs)
-{
- struct _pthread_descr_struct pds;
-
- LOG ("td_thr_setfpregs");
-
- /* We have to get the state and the PID for this thread. */
- if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
- sizeof (struct _pthread_descr_struct)) != PS_OK)
- return TD_ERR;
-
- /* Only set the registers if the thread hasn't yet terminated. */
- if (pds.p_terminated == 0)
- {
- pid_t pid = pds.p_pid ?: ps_getpid (th->th_ta_p->ph);
-
- if (ps_lsetfpregs (th->th_ta_p->ph, pid, fpregs) != PS_OK)
- return TD_ERR;
- }
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_setgregs.c b/newlib/libc/sys/linux/linuxthreads/td_thr_setgregs.c
deleted file mode 100644
index 3cf653956..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_setgregs.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Set a thread's general register set.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_setgregs (const td_thrhandle_t *th, prgregset_t gregs)
-{
- struct _pthread_descr_struct pds;
-
- LOG ("td_thr_setgregs");
-
- /* We have to get the state and the PID for this thread. */
- if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
- sizeof (struct _pthread_descr_struct)) != PS_OK)
- return TD_ERR;
-
- /* Only set the registers if the thread hasn't yet terminated. */
- if (pds.p_terminated == 0)
- {
- pid_t pid = pds.p_pid ?: ps_getpid (th->th_ta_p->ph);
-
- if (ps_lsetregs (th->th_ta_p->ph, pid, gregs) != PS_OK)
- return TD_ERR;
- }
-
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_setprio.c b/newlib/libc/sys/linux/linuxthreads/td_thr_setprio.c
deleted file mode 100644
index 01eab4811..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_setprio.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Set a thread's priority.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_setprio (const td_thrhandle_t *th, int prio)
-{
- /* XXX We have to figure out what has to be done. */
- LOG ("td_thr_setprio");
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_setsigpending.c b/newlib/libc/sys/linux/linuxthreads/td_thr_setsigpending.c
deleted file mode 100644
index 6ecd74787..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_setsigpending.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Raise a signal for a thread.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_setsigpending (const td_thrhandle_t *th, unsigned char n,
- const sigset_t *ss)
-{
- /* XXX We have to figure out what has to be done. */
- LOG ("td_thr_setsigpending");
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_setxregs.c b/newlib/libc/sys/linux/linuxthreads/td_thr_setxregs.c
deleted file mode 100644
index 15ea14a66..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_setxregs.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Set a thread's extra state register set.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_setxregs (const td_thrhandle_t *ta, const void *addr)
-{
- /* XXX This might have to be platform specific. */
- LOG ("td_thr_setxregs");
- return TD_NOXREGS;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_sigsetmask.c b/newlib/libc/sys/linux/linuxthreads/td_thr_sigsetmask.c
deleted file mode 100644
index 79f144328..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_sigsetmask.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Set a thread's signal mask.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_sigsetmask (const td_thrhandle_t *th, const sigset_t *ss)
-{
- /* XXX We have to figure out what has to be done. */
- LOG ("td_thr_sigsetmask");
- return TD_OK;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_tsd.c b/newlib/libc/sys/linux/linuxthreads/td_thr_tsd.c
deleted file mode 100644
index 192b42571..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_tsd.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Get a thread-specific data pointer for a thread.
- Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_tsd (const td_thrhandle_t *th, const thread_key_t tk, void **data)
-{
- struct _pthread_descr_struct pds;
- struct pthread_key_struct *keys = th->th_ta_p->keys;
- struct pthread_key_struct key;
- int pthread_keys_max = th->th_ta_p->pthread_keys_max;
- int pthread_key_2ndlevel_size = th->th_ta_p->pthread_key_2ndlevel_size;
- unsigned int idx1st;
- unsigned int idx2nd;
- void *p;
-
- LOG ("td_thr_tsd");
-
- /* Get the thread descriptor. */
- if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
- sizeof (struct _pthread_descr_struct)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* Check correct value of key. */
- if (tk >= pthread_keys_max)
- return TD_BADKEY;
-
- /* Get the key entry. */
- if (ps_pdread (th->th_ta_p->ph, keys, &key,
- sizeof (struct pthread_key_struct)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* Fail if this key is not at all used. */
- if (! key.in_use)
- return TD_BADKEY;
-
- /* Compute the indeces. */
- idx1st = tk / pthread_key_2ndlevel_size;
- idx2nd = tk % pthread_key_2ndlevel_size;
-
- /* Check the pointer to the second level array. */
- if (pds.p_specific[idx1st] == NULL)
- return TD_NOTSD;
-
- /* Now get the real key.
- XXX I don't know whether it's correct but there is currently no
- easy way to determine whether a key was never set or the value
- is NULL. We return an error whenever the value is NULL. */
- if (ps_pdread (th->th_ta_p->ph, &pds.p_specific[idx1st][idx2nd], &p,
- sizeof (void *)) != PS_OK)
- return TD_ERR;
-
- if (p != NULL)
- *data = p;
-
- return p != NULL ? TD_OK : TD_NOTSD;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/td_thr_validate.c b/newlib/libc/sys/linux/linuxthreads/td_thr_validate.c
deleted file mode 100644
index 8821f0e84..000000000
--- a/newlib/libc/sys/linux/linuxthreads/td_thr_validate.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Validate a thread handle.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include "thread_dbP.h"
-
-
-td_err_e
-td_thr_validate (const td_thrhandle_t *th)
-{
- struct pthread_handle_struct *handles = th->th_ta_p->handles;
- int pthread_threads_max = th->th_ta_p->pthread_threads_max;
- int cnt;
-
- LOG ("td_thr_validate");
-
- /* Now get all descriptors, one after the other. */
- for (cnt = 0; cnt < pthread_threads_max; ++cnt, ++handles)
- {
- struct pthread_handle_struct phc;
-
- if (ps_pdread (th->th_ta_p->ph, handles, &phc,
- sizeof (struct pthread_handle_struct)) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- if (phc.h_descr != NULL && phc.h_descr == th->th_unique)
- {
- struct _pthread_descr_struct pds;
-
- if (ps_pdread (th->th_ta_p->ph, phc.h_descr, &pds,
- th->th_ta_p->sizeof_descr) != PS_OK)
- return TD_ERR; /* XXX Other error value? */
-
- /* XXX There should be another test using the TID but this is
- currently not available. */
- return pds.p_terminated != 0 ? TD_NOTHR : TD_OK;
- }
- }
-
- return TD_ERR;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/testrtsig.h b/newlib/libc/sys/linux/linuxthreads/testrtsig.h
deleted file mode 100644
index cf36ab08a..000000000
--- a/newlib/libc/sys/linux/linuxthreads/testrtsig.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Test whether RT signals are really available.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <string.h>
-#include <sys/utsname.h>
-
-#include "kernel-features.h"
-
-static int
-kernel_has_rtsig (void)
-{
-#if __ASSUME_REALTIME_SIGNALS
- return 1;
-#else
- struct utsname name;
-
- return uname (&name) == 0 && __strverscmp (name.release, "2.1.70") >= 0;
-#endif
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/thread_db.h b/newlib/libc/sys/linux/linuxthreads/thread_db.h
deleted file mode 100644
index b192d1f2e..000000000
--- a/newlib/libc/sys/linux/linuxthreads/thread_db.h
+++ /dev/null
@@ -1,439 +0,0 @@
-/* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _THREAD_DB_H
-#define _THREAD_DB_H 1
-
-/* This is the debugger interface for the LinuxThreads library. It is
- modelled closely after the interface with same names in Solaris with
- the goal to share the same code in the debugger. */
-#include <pthread.h>
-#include <stdint.h>
-#include <sys/types.h>
-#include <sys/procfs.h>
-
-
-/* Error codes of the library. */
-typedef enum
-{
- TD_OK, /* No error. */
- TD_ERR, /* No further specified error. */
- TD_NOTHR, /* No matching thread found. */
- TD_NOSV, /* No matching synchronization handle found. */
- TD_NOLWP, /* No matching light-weighted process found. */
- TD_BADPH, /* Invalid process handle. */
- TD_BADTH, /* Invalid thread handle. */
- TD_BADSH, /* Invalid synchronization handle. */
- TD_BADTA, /* Invalid thread agent. */
- TD_BADKEY, /* Invalid key. */
- TD_NOMSG, /* No event available. */
- TD_NOFPREGS, /* No floating-point register content available. */
- TD_NOLIBTHREAD, /* Application not linked with thread library. */
- TD_NOEVENT, /* Requested event is not supported. */
- TD_NOCAPAB, /* Capability not available. */
- TD_DBERR, /* Internal debug library error. */
- TD_NOAPLIC, /* Operation is not applicable. */
- TD_NOTSD, /* No thread-specific data available. */
- TD_MALLOC, /* Out of memory. */
- TD_PARTIALREG, /* Not entire register set was read or written. */
- TD_NOXREGS /* X register set not available for given thread. */
-} td_err_e;
-
-
-/* Possible thread states. TD_THR_ANY_STATE is a pseudo-state used to
- select threads regardless of state in td_ta_thr_iter(). */
-typedef enum
-{
- TD_THR_ANY_STATE,
- TD_THR_UNKNOWN,
- TD_THR_STOPPED,
- TD_THR_RUN,
- TD_THR_ACTIVE,
- TD_THR_ZOMBIE,
- TD_THR_SLEEP,
- TD_THR_STOPPED_ASLEEP
-} td_thr_state_e;
-
-/* Thread type: user or system. TD_THR_ANY_TYPE is a pseudo-type used
- to select threads regardless of type in td_ta_thr_iter(). */
-typedef enum
-{
- TD_THR_ANY_TYPE,
- TD_THR_USER,
- TD_THR_SYSTEM
-} td_thr_type_e;
-
-
-/* Types of the debugging library. */
-
-/* Handle for a process. This type is opaque. */
-typedef struct td_thragent td_thragent_t;
-
-/* The actual thread handle type. This is also opaque. */
-typedef struct td_thrhandle
-{
- td_thragent_t *th_ta_p;
- psaddr_t th_unique;
-} td_thrhandle_t;
-
-
-/* Flags for `td_ta_thr_iter'. */
-#define TD_THR_ANY_USER_FLAGS 0xffffffff
-#define TD_THR_LOWEST_PRIORITY -20
-#define TD_SIGNO_MASK NULL
-
-
-#define TD_EVENTSIZE 2
-#define BT_UISHIFT 5 /* log base 2 of BT_NBIPUI, to extract word index */
-#define BT_NBIPUI (1 << BT_UISHIFT) /* n bits per uint */
-#define BT_UIMASK (BT_NBIPUI - 1) /* to extract bit index */
-
-/* Bitmask of enabled events. */
-typedef struct td_thr_events
-{
- uint32_t event_bits[TD_EVENTSIZE];
-} td_thr_events_t;
-
-/* Event set manipulation macros. */
-#define __td_eventmask(n) \
- (UINT32_C (1) << (((n) - 1) & BT_UIMASK))
-#define __td_eventword(n) \
- ((UINT32_C ((n) - 1)) >> BT_UISHIFT)
-
-#define td_event_emptyset(setp) \
- do { \
- int __i; \
- for (__i = TD_EVENTSIZE; __i > 0; --__i) \
- (setp)->event_bits[__i - 1] = 0; \
- } while (0)
-
-#define td_event_fillset(setp) \
- do { \
- int __i; \
- for (__i = TD_EVENTSIZE; __i > 0; --__i) \
- (setp)->event_bits[__i - 1] = UINT32_C (0xffffffff); \
- } while (0)
-
-#define td_event_addset(setp, n) \
- (((setp)->event_bits[__td_eventword (n)]) |= __td_eventmask (n))
-#define td_event_delset(setp, n) \
- (((setp)->event_bits[__td_eventword (n)]) &= ~__td_eventmask (n))
-#define td_eventismember(setp, n) \
- (__td_eventmask (n) & ((setp)->event_bits[__td_eventword (n)]))
-#if TD_EVENTSIZE == 2
-# define td_eventisempty(setp) \
- (!((setp)->event_bits[0]) && !((setp)->event_bits[1]))
-#else
-# error "td_eventisempty must be changed to match TD_EVENTSIZE"
-#endif
-
-/* Events reportable by the thread implementation. */
-typedef enum
-{
- TD_ALL_EVENTS, /* Pseudo-event number. */
- TD_EVENT_NONE = TD_ALL_EVENTS, /* Depends on context. */
- TD_READY, /* Is executable now. */
- TD_SLEEP, /* Blocked in a synchronization obj. */
- TD_SWITCHTO, /* Now assigned to a process. */
- TD_SWITCHFROM, /* Not anymore assigned to a process. */
- TD_LOCK_TRY, /* Trying to get an unavailable lock. */
- TD_CATCHSIG, /* Signal posted to the thread. */
- TD_IDLE, /* Process getting idle. */
- TD_CREATE, /* New thread created. */
- TD_DEATH, /* Thread terminated. */
- TD_PREEMPT, /* Preempted. */
- TD_PRI_INHERIT, /* Inherited elevated priority. */
- TD_REAP, /* Reaped. */
- TD_CONCURRENCY, /* Number of processes changing. */
- TD_TIMEOUT, /* Conditional variable wait timed out. */
- TD_MIN_EVENT_NUM = TD_READY,
- TD_MAX_EVENT_NUM = TD_TIMEOUT,
- TD_EVENTS_ENABLE = 31 /* Event reporting enabled. */
-} td_event_e;
-
-/* Values representing the different ways events are reported. */
-typedef enum
-{
- NOTIFY_BPT, /* User must insert breakpoint at u.bptaddr. */
- NOTIFY_AUTOBPT, /* Breakpoint at u.bptaddr is automatically
- inserted. */
- NOTIFY_SYSCALL /* System call u.syscallno will be invoked. */
-} td_notify_e;
-
-/* Description how event type is reported. */
-typedef struct td_notify
-{
- td_notify_e type; /* Way the event is reported. */
- union
- {
- psaddr_t bptaddr; /* Address of breakpoint. */
- int syscallno; /* Number of system call used. */
- } u;
-} td_notify_t;
-
-/* Structure used to report event. */
-typedef struct td_event_msg
-{
- td_event_e event; /* Event type being reported. */
- const td_thrhandle_t *th_p; /* Thread reporting the event. */
- union
- {
-# if 0
- td_synchandle_t *sh; /* Handle of synchronization object. */
-#endif
- uintptr_t data; /* Event specific data. */
- } msg;
-} td_event_msg_t;
-
-/* Structure containing event data available in each thread structure. */
-typedef struct
-{
- td_thr_events_t eventmask; /* Mask of enabled events. */
- td_event_e eventnum; /* Number of last event. */
- void *eventdata; /* Data associated with event. */
-} td_eventbuf_t;
-
-
-/* Gathered statistics about the process. */
-typedef struct td_ta_stats
-{
- int nthreads; /* Total number of threads in use. */
- int r_concurrency; /* Concurrency level requested by user. */
- int nrunnable_num; /* Average runnable threads, numerator. */
- int nrunnable_den; /* Average runnable threads, denominator. */
- int a_concurrency_num; /* Achieved concurrency level, numerator. */
- int a_concurrency_den; /* Achieved concurrency level, denominator. */
- int nlwps_num; /* Average number of processes in use,
- numerator. */
- int nlwps_den; /* Average number of processes in use,
- denominator. */
- int nidle_num; /* Average number of idling processes,
- numerator. */
- int nidle_den; /* Average number of idling processes,
- denominator. */
-} td_ta_stats_t;
-
-
-/* Since Sun's library is based on Solaris threads we have to define a few
- types to map them to POSIX threads. */
-typedef pthread_t thread_t;
-typedef pthread_key_t thread_key_t;
-
-
-/* Callback for iteration over threads. */
-typedef int td_thr_iter_f (const td_thrhandle_t *, void *);
-
-/* Callback for iteration over thread local data. */
-typedef int td_key_iter_f (thread_key_t, void (*) (void *), void *);
-
-
-
-/* Forward declaration. This has to be defined by the user. */
-struct ps_prochandle;
-
-
-/* Information about the thread. */
-typedef struct td_thrinfo
-{
- td_thragent_t *ti_ta_p; /* Process handle. */
- unsigned int ti_user_flags; /* Unused. */
- thread_t ti_tid; /* Thread ID returned by
- pthread_create(). */
- char *ti_tls; /* Pointer to thread-local data. */
- psaddr_t ti_startfunc; /* Start function passed to
- pthread_create(). */
- psaddr_t ti_stkbase; /* Base of thread's stack. */
- long int ti_stksize; /* Size of thread's stack. */
- psaddr_t ti_ro_area; /* Unused. */
- int ti_ro_size; /* Unused. */
- td_thr_state_e ti_state; /* Thread state. */
- unsigned char ti_db_suspended; /* Nonzero if suspended by debugger. */
- td_thr_type_e ti_type; /* Type of the thread (system vs
- user thread). */
- intptr_t ti_pc; /* Unused. */
- intptr_t ti_sp; /* Unused. */
- short int ti_flags; /* Unused. */
- int ti_pri; /* Thread priority. */
- lwpid_t ti_lid; /* Unused. */
- sigset_t ti_sigmask; /* Signal mask. */
- unsigned char ti_traceme; /* Nonzero if event reporting
- enabled. */
- unsigned char ti_preemptflag; /* Unused. */
- unsigned char ti_pirecflag; /* Unused. */
- sigset_t ti_pending; /* Set of pending signals. */
- td_thr_events_t ti_events; /* Set of enabled events. */
-} td_thrinfo_t;
-
-
-
-/* Prototypes for exported library functions. */
-
-/* Initialize the thread debug support library. */
-extern td_err_e td_init (void);
-
-/* Historical relict. Should not be used anymore. */
-extern td_err_e td_log (void);
-
-/* Return list of symbols the library can request. */
-extern const char **td_symbol_list (void);
-
-/* Generate new thread debug library handle for process PS. */
-extern td_err_e td_ta_new (struct ps_prochandle *__ps, td_thragent_t **__ta);
-
-/* Free resources allocated for TA. */
-extern td_err_e td_ta_delete (td_thragent_t *__ta);
-
-/* Get number of currently running threads in process associated with TA. */
-extern td_err_e td_ta_get_nthreads (const td_thragent_t *__ta, int *__np);
-
-/* Return process handle passed in `td_ta_new' for process associated with
- TA. */
-extern td_err_e td_ta_get_ph (const td_thragent_t *__ta,
- struct ps_prochandle **__ph);
-
-/* Map thread library handle PT to thread debug library handle for process
- associated with TA and store result in *TH. */
-extern td_err_e td_ta_map_id2thr (const td_thragent_t *__ta, pthread_t __pt,
- td_thrhandle_t *__th);
-
-/* Map process ID LWPID to thread debug library handle for process
- associated with TA and store result in *TH. */
-extern td_err_e td_ta_map_lwp2thr (const td_thragent_t *__ta, lwpid_t __lwpid,
- td_thrhandle_t *__th);
-
-
-/* Call for each thread in a process associated with TA the callback function
- CALLBACK. */
-extern td_err_e td_ta_thr_iter (const td_thragent_t *__ta,
- td_thr_iter_f *__callback, void *__cbdata_p,
- td_thr_state_e __state, int __ti_pri,
- sigset_t *__ti_sigmask_p,
- unsigned int __ti_user_flags);
-
-/* Call for each defined thread local data entry the callback function KI. */
-extern td_err_e td_ta_tsd_iter (const td_thragent_t *__ta, td_key_iter_f *__ki,
- void *__p);
-
-
-/* Get event address for EVENT. */
-extern td_err_e td_ta_event_addr (const td_thragent_t *__ta,
- td_event_e __event, td_notify_t *__ptr);
-
-/* Enable EVENT in global mask. */
-extern td_err_e td_ta_set_event (const td_thragent_t *__ta,
- td_thr_events_t *__event);
-
-/* Disable EVENT in global mask. */
-extern td_err_e td_ta_clear_event (const td_thragent_t *__ta,
- td_thr_events_t *__event);
-
-/* Return information about last event. */
-extern td_err_e td_ta_event_getmsg (const td_thragent_t *__ta,
- td_event_msg_t *msg);
-
-
-/* Set suggested concurrency level for process associated with TA. */
-extern td_err_e td_ta_setconcurrency (const td_thragent_t *__ta, int __level);
-
-
-/* Enable collecting statistics for process associated with TA. */
-extern td_err_e td_ta_enable_stats (const td_thragent_t *__ta, int __enable);
-
-/* Reset statistics. */
-extern td_err_e td_ta_reset_stats (const td_thragent_t *__ta);
-
-/* Retrieve statistics from process associated with TA. */
-extern td_err_e td_ta_get_stats (const td_thragent_t *__ta,
- td_ta_stats_t *__statsp);
-
-
-/* Validate that TH is a thread handle. */
-extern td_err_e td_thr_validate (const td_thrhandle_t *__th);
-
-/* Return information about thread TH. */
-extern td_err_e td_thr_get_info (const td_thrhandle_t *__th,
- td_thrinfo_t *__infop);
-
-/* Retrieve floating-point register contents of process running thread TH. */
-extern td_err_e td_thr_getfpregs (const td_thrhandle_t *__th,
- prfpregset_t *__regset);
-
-/* Retrieve general register contents of process running thread TH. */
-extern td_err_e td_thr_getgregs (const td_thrhandle_t *__th,
- prgregset_t __gregs);
-
-/* Retrieve extended register contents of process running thread TH. */
-extern td_err_e td_thr_getxregs (const td_thrhandle_t *__th, void *__xregs);
-
-/* Get size of extended register set of process running thread TH. */
-extern td_err_e td_thr_getxregsize (const td_thrhandle_t *__th, int *__sizep);
-
-/* Set floating-point register contents of process running thread TH. */
-extern td_err_e td_thr_setfpregs (const td_thrhandle_t *__th,
- const prfpregset_t *__fpregs);
-
-/* Set general register contents of process running thread TH. */
-extern td_err_e td_thr_setgregs (const td_thrhandle_t *__th,
- prgregset_t __gregs);
-
-/* Set extended register contents of process running thread TH. */
-extern td_err_e td_thr_setxregs (const td_thrhandle_t *__th,
- const void *__addr);
-
-
-/* Enable reporting for EVENT for thread TH. */
-extern td_err_e td_thr_event_enable (const td_thrhandle_t *__th, int __event);
-
-/* Enable EVENT for thread TH. */
-extern td_err_e td_thr_set_event (const td_thrhandle_t *__th,
- td_thr_events_t *__event);
-
-/* Disable EVENT for thread TH. */
-extern td_err_e td_thr_clear_event (const td_thrhandle_t *__th,
- td_thr_events_t *__event);
-
-/* Get event message for thread TH. */
-extern td_err_e td_thr_event_getmsg (const td_thrhandle_t *__th,
- td_event_msg_t *__msg);
-
-
-/* Set priority of thread TH. */
-extern td_err_e td_thr_setprio (const td_thrhandle_t *__th, int __prio);
-
-
-/* Set pending signals for thread TH. */
-extern td_err_e td_thr_setsigpending (const td_thrhandle_t *__th,
- unsigned char __n, const sigset_t *__ss);
-
-/* Set signal mask for thread TH. */
-extern td_err_e td_thr_sigsetmask (const td_thrhandle_t *__th,
- const sigset_t *__ss);
-
-
-/* Return thread local data associated with key TK in thread TH. */
-extern td_err_e td_thr_tsd (const td_thrhandle_t *__th,
- const thread_key_t __tk, void **__data);
-
-
-/* Suspend execution of thread TH. */
-extern td_err_e td_thr_dbsuspend (const td_thrhandle_t *__th);
-
-/* Resume execution of thread TH. */
-extern td_err_e td_thr_dbresume (const td_thrhandle_t *__th);
-
-#endif /* thread_db.h */
diff --git a/newlib/libc/sys/linux/linuxthreads/thread_dbP.h b/newlib/libc/sys/linux/linuxthreads/thread_dbP.h
deleted file mode 100644
index c695fa253..000000000
--- a/newlib/libc/sys/linux/linuxthreads/thread_dbP.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Private header for thread debug library. */
-#ifndef _THREAD_DBP_H
-#define _THREAD_DBP_H 1
-
-#include <string.h>
-#include "proc_service.h"
-#include "thread_db.h"
-#include "internals.h"
-
-
-/* Indeces for the symbol names. */
-enum
- {
- PTHREAD_THREADS_EVENTS = 0,
- PTHREAD_LAST_EVENT,
- PTHREAD_HANDLES_NUM,
- PTHREAD_HANDLES,
- PTHREAD_KEYS,
- LINUXTHREADS_PTHREAD_THREADS_MAX,
- LINUXTHREADS_PTHREAD_KEYS_MAX,
- LINUXTHREADS_PTHREAD_SIZEOF_DESCR,
- LINUXTHREADS_CREATE_EVENT,
- LINUXTHREADS_DEATH_EVENT,
- LINUXTHREADS_REAP_EVENT,
- NUM_MESSAGES
- };
-
-
-/* Comment out the following for less verbose output. */
-#ifndef NDEBUG
-# define LOG(c) if (__td_debug) __libc_write (2, c "\n", strlen (c "\n"))
-extern int __td_debug;
-#else
-# define LOG(c)
-#endif
-
-
-/* Handle for a process. This type is opaque. */
-struct td_thragent
-{
- /* Delivered by the debugger and we have to pass it back in the
- proc callbacks. */
- struct ps_prochandle *ph;
-
- /* Some cached information. */
-
- /* Address of the `__pthread_handles' array. */
- struct pthread_handle_struct *handles;
-
- /* Address of the `pthread_kyes' array. */
- struct pthread_key_struct *keys;
-
- /* Maximum number of threads. */
- int pthread_threads_max;
-
- /* Maximum number of thread-local data keys. */
- int pthread_keys_max;
-
- /* Size of 2nd level array for thread-local data keys. */
- int pthread_key_2ndlevel_size;
-
- /* Sizeof struct _pthread_descr_struct. */
- int sizeof_descr;
-
- /* Pointer to the `__pthread_threads_events' variable in the target. */
- psaddr_t pthread_threads_eventsp;
-
- /* Pointer to the `__pthread_last_event' variable in the target. */
- psaddr_t pthread_last_event;
-
- /* Pointer to the `__pthread_handles_num' variable. */
- psaddr_t pthread_handles_num;
-};
-
-
-/* Type used internally to keep track of thread agent descriptors. */
-struct agent_list
-{
- td_thragent_t *ta;
- struct agent_list *next;
-};
-
-/* List of all known descriptors. */
-extern struct agent_list *__td_agent_list;
-
-/* Function used to test for correct thread agent pointer. */
-static inline int
-ta_ok (const td_thragent_t *ta)
-{
- struct agent_list *runp = __td_agent_list;
-
- if (ta == NULL)
- return 0;
-
- while (runp != NULL && runp->ta != ta)
- runp = runp->next;
-
- return runp != NULL;
-}
-
-
-/* Internal wrapper around ps_pglobal_lookup. */
-extern int td_lookup (struct ps_prochandle *ps, int idx, psaddr_t *sym_addr);
-
-#endif /* thread_dbP.h */
diff --git a/newlib/libc/sys/linux/linuxthreads/timer_create.c b/newlib/libc/sys/linux/linuxthreads/timer_create.c
deleted file mode 100644
index 1dccd3036..000000000
--- a/newlib/libc/sys/linux/linuxthreads/timer_create.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Kaz Kylheku <kaz@ashi.footprints.net>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <signal.h>
-#include <pthread.h>
-#include <time.h>
-#include <unistd.h>
-
-#include "posix-timer.h"
-
-
-/* Create new per-process timer using CLOCK. */
-int
-timer_create (clock_id, evp, timerid)
- clockid_t clock_id;
- struct sigevent *evp;
- timer_t *timerid;
-{
- int retval = -1;
- struct timer_node *newtimer = NULL;
- struct thread_node *thread = NULL;
-
- if (clock_id != CLOCK_REALTIME
-#ifdef _POSIX_CPUTIME
- && clock_id != CLOCK_PROCESS_CPUTIME_ID
-#endif
-#ifdef _POSIX_THREAD_CPUTIME
- && clock_id != CLOCK_THREAD_CPUTIME_ID
-#endif
- )
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- pthread_once (&__timer_init_once_control, __timer_init_once);
-
- if (__timer_init_failed)
- {
- __set_errno (ENOMEM);
- return -1;
- }
-
- pthread_mutex_lock (&__timer_mutex);
-
- newtimer = __timer_alloc ();
- if (__builtin_expect (newtimer == NULL, 0))
- {
- __set_errno (EAGAIN);
- goto unlock_bail;
- }
-
- if (evp != NULL)
- newtimer->event = *evp;
- else
- {
- newtimer->event.sigev_notify = SIGEV_SIGNAL;
- newtimer->event.sigev_signo = SIGALRM;
- newtimer->event.sigev_value.sival_int = timer_ptr2id (newtimer);
- newtimer->event.sigev_notify_function = 0;
- }
-
- newtimer->event.sigev_notify_attributes = &newtimer->attr;
- newtimer->creator_pid = getpid ();
-
- switch (__builtin_expect (newtimer->event.sigev_notify, SIGEV_SIGNAL))
- {
- case SIGEV_NONE:
- /* This is a strange choice! */
- break;
-
- case SIGEV_SIGNAL:
- /* We have a global thread for delivering timed signals.
- If it is not running, try to start it up. */
- switch (clock_id)
- {
- case CLOCK_REALTIME:
- default:
- thread = &__timer_signal_thread_rclk;
- break;
-#ifdef _POSIX_CPUTIME
- case CLOCK_PROCESS_CPUTIME_ID:
- thread = &__timer_signal_thread_pclk;
- break;
-#endif
-#ifdef _POSIX_THREAD_CPUTIME
- case CLOCK_THREAD_CPUTIME_ID:
- thread = &__timer_signal_thread_tclk;
- break;
-#endif
- }
-
- if (! thread->exists)
- {
- if (__builtin_expect (__timer_thread_start (thread),
- 1) < 0)
- {
- __set_errno (EAGAIN);
- goto unlock_bail;
- }
- }
- break;
-
- case SIGEV_THREAD:
- /* Copy over thread attributes or set up default ones. */
- if (evp->sigev_notify_attributes)
- newtimer->attr = *(pthread_attr_t *) evp->sigev_notify_attributes;
- else
- pthread_attr_init (&newtimer->attr);
-
- /* Ensure thread attributes call for deatched thread. */
- pthread_attr_setdetachstate (&newtimer->attr, PTHREAD_CREATE_DETACHED);
-
- /* Try to find existing thread having the right attributes. */
- thread = __timer_thread_find_matching (&newtimer->attr, clock_id);
-
- /* If no existing thread has these attributes, try to allocate one. */
- if (thread == NULL)
- thread = __timer_thread_alloc (&newtimer->attr, clock_id);
-
- /* Out of luck; no threads are available. */
- if (__builtin_expect (thread == NULL, 0))
- {
- __set_errno (EAGAIN);
- goto unlock_bail;
- }
-
- /* If the thread is not running already, try to start it. */
- if (! thread->exists
- && __builtin_expect (! __timer_thread_start (thread), 0))
- {
- __set_errno (EAGAIN);
- goto unlock_bail;
- }
- break;
-
- default:
- __set_errno (EINVAL);
- goto unlock_bail;
- }
-
- newtimer->clock = clock_id;
- newtimer->abstime = 0;
- newtimer->armed = 0;
- newtimer->thread = thread;
-
- *timerid = timer_ptr2id (newtimer);
- retval = 0;
-
- if (__builtin_expect (retval, 0) == -1)
- {
- unlock_bail:
- if (thread != NULL)
- __timer_thread_dealloc (thread);
- if (newtimer != NULL)
- __timer_dealloc (newtimer);
- }
-
- pthread_mutex_unlock (&__timer_mutex);
-
- return retval;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/timer_delete.c b/newlib/libc/sys/linux/linuxthreads/timer_delete.c
deleted file mode 100644
index 24f4ffed3..000000000
--- a/newlib/libc/sys/linux/linuxthreads/timer_delete.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Kaz Kylheku <kaz@ashi.footprints.net>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-#include <time.h>
-
-#include "posix-timer.h"
-
-
-/* Delete timer TIMERID. */
-int
-timer_delete (timerid)
- timer_t timerid;
-{
- struct timer_node *timer;
- int retval = -1;
-
- pthread_mutex_lock (&__timer_mutex);
-
- timer = timer_id2ptr (timerid);
- if (! timer_valid (timer))
- /* Invalid timer ID or the timer is not in use. */
- __set_errno (EINVAL);
- else
- {
- if (timer->armed && timer->thread != NULL)
- {
- struct thread_node *thread = timer->thread;
- assert (thread != NULL);
-
- /* If thread is cancelled while waiting for handler to terminate,
- the mutex is unlocked and timer_delete is aborted. */
- pthread_cleanup_push (__timer_mutex_cancel_handler, &__timer_mutex);
-
- /* If timer is currently being serviced, wait for it to finish. */
- while (thread->current_timer == timer)
- pthread_cond_wait (&thread->cond, &__timer_mutex);
-
- pthread_cleanup_pop (0);
- }
-
- /* Remove timer from whatever queue it may be on and deallocate it. */
- timer->inuse = TIMER_DELETED;
- list_unlink_ip (&timer->links);
- timer_delref (timer);
- retval = 0;
- }
-
- pthread_mutex_unlock (&__timer_mutex);
-
- return retval;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/timer_getoverr.c b/newlib/libc/sys/linux/linuxthreads/timer_getoverr.c
deleted file mode 100644
index 204addc85..000000000
--- a/newlib/libc/sys/linux/linuxthreads/timer_getoverr.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Kaz Kylheku <kaz@ashi.footprints.net>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <pthread.h>
-#include <time.h>
-
-#include "posix-timer.h"
-
-
-/* Get expiration overrun for timer TIMERID. */
-int
-timer_getoverrun (timerid)
- timer_t timerid;
-{
- struct timer_node *timer;
- int retval = -1;
-
- pthread_mutex_lock (&__timer_mutex);
-
- if (! timer_valid (timer = timer_id2ptr (timerid)))
- __set_errno (EINVAL);
- else
- retval = 0; /* TODO: overrun counting not supported */
-
- pthread_mutex_unlock (&__timer_mutex);
-
- return retval;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/timer_gettime.c b/newlib/libc/sys/linux/linuxthreads/timer_gettime.c
deleted file mode 100644
index dbee9d915..000000000
--- a/newlib/libc/sys/linux/linuxthreads/timer_gettime.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Kaz Kylheku <kaz@ashi.footprints.net>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <pthread.h>
-#include <time.h>
-
-#include "posix-timer.h"
-
-
-/* Get current value of timer TIMERID and store it in VLAUE. */
-int
-timer_gettime (timerid, value)
- timer_t timerid;
- struct itimerspec *value;
-{
- struct timer_node *timer;
- struct timespec now, expiry;
- int retval = -1, armed = 0, valid;
- clock_t clock = 0;
-
- pthread_mutex_lock (&__timer_mutex);
-
- timer = timer_id2ptr (timerid);
- valid = timer_valid (timer);
-
- if (valid) {
- armed = timer->armed;
- expiry = timer->expirytime;
- clock = timer->clock;
- value->it_interval = timer->value.it_interval;
- }
-
- pthread_mutex_unlock (&__timer_mutex);
-
- if (valid)
- {
- if (armed)
- {
- clock_gettime (clock, &now);
- timespec_sub (&value->it_value, &expiry, &now);
- }
- else
- {
- value->it_value.tv_sec = 0;
- value->it_value.tv_nsec = 0;
- }
-
- retval = 0;
- }
- else
- __set_errno (EINVAL);
-
- return retval;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/timer_routines.c b/newlib/libc/sys/linux/linuxthreads/timer_routines.c
deleted file mode 100644
index 65dc5dca5..000000000
--- a/newlib/libc/sys/linux/linuxthreads/timer_routines.c
+++ /dev/null
@@ -1,584 +0,0 @@
-/* Helper code for POSIX timer implementation on LinuxThreads.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Kaz Kylheku <kaz@ashi.footprints.net>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <assert.h>
-#include <errno.h>
-#include <pthread.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sysdep.h>
-#include <time.h>
-#include <unistd.h>
-#include <sys/syscall.h>
-
-#include "posix-timer.h"
-
-
-/* Number of threads used. */
-#define THREAD_MAXNODES 16
-
-/* Array containing the descriptors for the used threads. */
-static struct thread_node thread_array[THREAD_MAXNODES];
-
-/* Static array with the structures for all the timers. */
-struct timer_node __timer_array[TIMER_MAX];
-
-/* Global lock to protect operation on the lists. */
-pthread_mutex_t __timer_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-/* Variable to protext initialization. */
-pthread_once_t __timer_init_once_control = PTHREAD_ONCE_INIT;
-
-/* Nonzero if initialization of timer implementation failed. */
-int __timer_init_failed;
-
-/* Node for the thread used to deliver signals. */
-struct thread_node __timer_signal_thread_rclk;
-#ifdef _POSIX_CPUTIME
-struct thread_node __timer_signal_thread_pclk;
-#endif
-#ifdef _POSIX_THREAD_CPUTIME
-struct thread_node __timer_signal_thread_tclk;
-#endif
-
-/* Lists to keep free and used timers and threads. */
-struct list_links timer_free_list;
-struct list_links thread_free_list;
-struct list_links thread_active_list;
-
-
-#ifdef __NR_rt_sigqueueinfo
-extern int __syscall_rt_sigqueueinfo (int, int, siginfo_t *);
-#endif
-
-
-/* List handling functions. */
-static inline void
-list_init (struct list_links *list)
-{
- list->next = list->prev = list;
-}
-
-static inline void
-list_append (struct list_links *list, struct list_links *newp)
-{
- newp->prev = list->prev;
- newp->next = list;
- list->prev->next = newp;
- list->prev = newp;
-}
-
-static inline void
-list_insbefore (struct list_links *list, struct list_links *newp)
-{
- list_append (list, newp);
-}
-
-/*
- * Like list_unlink_ip, except that calling it on a node that
- * is already unlinked is disastrous rather than a noop.
- */
-
-static inline void
-list_unlink (struct list_links *list)
-{
- struct list_links *lnext = list->next, *lprev = list->prev;
-
- lnext->prev = lprev;
- lprev->next = lnext;
-}
-
-static inline struct list_links *
-list_first (struct list_links *list)
-{
- return list->next;
-}
-
-static inline struct list_links *
-list_null (struct list_links *list)
-{
- return list;
-}
-
-static inline struct list_links *
-list_next (struct list_links *list)
-{
- return list->next;
-}
-
-static inline int
-list_isempty (struct list_links *list)
-{
- return list->next == list;
-}
-
-
-/* Functions build on top of the list functions. */
-static inline struct thread_node *
-thread_links2ptr (struct list_links *list)
-{
- return (struct thread_node *) ((char *) list
- - offsetof (struct thread_node, links));
-}
-
-static inline struct timer_node *
-timer_links2ptr (struct list_links *list)
-{
- return (struct timer_node *) ((char *) list
- - offsetof (struct timer_node, links));
-}
-
-
-/* Initialize a newly allocated thread structure. */
-static void
-thread_init (struct thread_node *thread, const pthread_attr_t *attr, clockid_t clock_id)
-{
- if (attr != NULL)
- thread->attr = *attr;
- else
- {
- pthread_attr_init (&thread->attr);
- pthread_attr_setdetachstate (&thread->attr, PTHREAD_CREATE_DETACHED);
- }
-
- thread->exists = 0;
- list_init (&thread->timer_queue);
- pthread_cond_init (&thread->cond, 0);
- thread->current_timer = 0;
- thread->captured = pthread_self ();
- thread->clock_id = clock_id;
-}
-
-
-/* Initialize the global lists, and acquire global resources. Error
- reporting is done by storing a non-zero value to the global variable
- timer_init_failed. */
-static void
-init_module (void)
-{
- int i;
-
- list_init (&timer_free_list);
- list_init (&thread_free_list);
- list_init (&thread_active_list);
-
- for (i = 0; i < TIMER_MAX; ++i)
- {
- list_append (&timer_free_list, &__timer_array[i].links);
- __timer_array[i].inuse = TIMER_FREE;
- }
-
- for (i = 0; i < THREAD_MAXNODES; ++i)
- list_append (&thread_free_list, &thread_array[i].links);
-
- thread_init (&__timer_signal_thread_rclk, 0, CLOCK_REALTIME);
-#ifdef _POSIX_CPUTIME
- thread_init (&__timer_signal_thread_pclk, 0, CLOCK_PROCESS_CPUTIME_ID);
-#endif
-#ifdef _POSIX_THREAD_CPUTIME
- thread_init (&__timer_signal_thread_tclk, 0, CLOCK_THREAD_CPUTIME_ID);
-#endif
-}
-
-
-/* This is a handler executed in a child process after a fork()
- occurs. It reinitializes the module, resetting all of the data
- structures to their initial state. The mutex is initialized in
- case it was locked in the parent process. */
-static void
-reinit_after_fork (void)
-{
- init_module ();
- pthread_mutex_init (&__timer_mutex, 0);
-}
-
-
-/* Called once form pthread_once in timer_init. This initializes the
- module and ensures that reinit_after_fork will be executed in any
- child process. */
-void
-__timer_init_once (void)
-{
- init_module ();
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 3
- pthread_atfork (0, 0, reinit_after_fork);
-#endif
-}
-
-
-/* Deinitialize a thread that is about to be deallocated. */
-static void
-thread_deinit (struct thread_node *thread)
-{
- assert (list_isempty (&thread->timer_queue));
- pthread_cond_destroy (&thread->cond);
-}
-
-
-/* Allocate a thread structure from the global free list. Global
- mutex lock must be held by caller. The thread is moved to
- the active list. */
-struct thread_node *
-__timer_thread_alloc (const pthread_attr_t *desired_attr, clockid_t clock_id)
-{
- struct list_links *node = list_first (&thread_free_list);
-
- if (node != list_null (&thread_free_list))
- {
- struct thread_node *thread = thread_links2ptr (node);
- list_unlink (node);
- thread_init (thread, desired_attr, clock_id);
- list_append (&thread_active_list, node);
- return thread;
- }
-
- return 0;
-}
-
-
-/* Return a thread structure to the global free list. Global lock
- must be held by caller. */
-void
-__timer_thread_dealloc (struct thread_node *thread)
-{
- thread_deinit (thread);
- list_unlink (&thread->links);
- list_append (&thread_free_list, &thread->links);
-}
-
-
-/* Each of our threads which terminates executes this cleanup
- handler. We never terminate threads ourselves; if a thread gets here
- it means that the evil application has killed it. If the thread has
- timers, these require servicing and so we must hire a replacement
- thread right away. We must also unblock another thread that may
- have been waiting for this thread to finish servicing a timer (see
- timer_delete()). */
-
-static void
-thread_cleanup (void *val)
-{
- if (val != NULL)
- {
- struct thread_node *thread = val;
-
- /* How did the signal thread get killed? */
- assert (thread != &__timer_signal_thread_rclk);
-#ifdef _POSIX_CPUTIME
- assert (thread != &__timer_signal_thread_pclk);
-#endif
-#ifdef _POSIX_THREAD_CPUTIME
- assert (thread != &__timer_signal_thread_tclk);
-#endif
-
- pthread_mutex_lock (&__timer_mutex);
-
- thread->exists = 0;
-
- /* We are no longer processing a timer event. */
- thread->current_timer = 0;
-
- if (list_isempty (&thread->timer_queue))
- __timer_thread_dealloc (thread);
- else
- (void) __timer_thread_start (thread);
-
- pthread_mutex_unlock (&__timer_mutex);
-
- /* Unblock potentially blocked timer_delete(). */
- pthread_cond_broadcast (&thread->cond);
- }
-}
-
-
-/* Handle a timer which is supposed to go off now. */
-static void
-thread_expire_timer (struct thread_node *self, struct timer_node *timer)
-{
- self->current_timer = timer; /* Lets timer_delete know timer is running. */
-
- pthread_mutex_unlock (&__timer_mutex);
-
- switch (__builtin_expect (timer->event.sigev_notify, SIGEV_SIGNAL))
- {
- case SIGEV_NONE:
- assert (! "timer_create should never have created such a timer");
- break;
-
- case SIGEV_SIGNAL:
-#ifdef __NR_rt_sigqueueinfo
- {
- siginfo_t info;
-
- /* First, clear the siginfo_t structure, so that we don't pass our
- stack content to other tasks. */
- memset (&info, 0, sizeof (siginfo_t));
- /* We must pass the information about the data in a siginfo_t
- value. */
- info.si_signo = timer->event.sigev_signo;
- info.si_code = SI_TIMER;
- info.si_pid = timer->creator_pid;
- info.si_uid = getuid ();
- info.si_value = timer->event.sigev_value;
-
- INLINE_SYSCALL (rt_sigqueueinfo, 3, info.si_pid, info.si_signo, &info);
- }
-#else
- if (pthread_kill (self->captured, timer->event.sigev_signo) != 0)
- {
- if (pthread_kill (self->id, timer->event.sigev_signo) != 0)
- abort ();
- }
-#endif
- break;
-
- case SIGEV_THREAD:
- timer->event.sigev_notify_function (timer->event.sigev_value);
- break;
-
- default:
- assert (! "unknown event");
- break;
- }
-
- pthread_mutex_lock (&__timer_mutex);
-
- self->current_timer = 0;
-
- pthread_cond_broadcast (&self->cond);
-}
-
-
-/* Thread function; executed by each timer thread. The job of this
- function is to wait on the thread's timer queue and expire the
- timers in chronological order as close to their scheduled time as
- possible. */
-static void *
-__attribute__ ((noreturn))
-thread_func (void *arg)
-{
- struct thread_node *self = arg;
-
- /* Register cleanup handler, in case rogue application terminates
- this thread. (This cannot happen to __timer_signal_thread, which
- doesn't invoke application callbacks). */
-
- pthread_cleanup_push (thread_cleanup, self);
-
- pthread_mutex_lock (&__timer_mutex);
-
- while (1)
- {
- struct list_links *first;
- struct timer_node *timer = NULL;
-
- /* While the timer queue is not empty, inspect the first node. */
- first = list_first (&self->timer_queue);
- if (first != list_null (&self->timer_queue))
- {
- struct timespec now;
-
- timer = timer_links2ptr (first);
-
- /* This assumes that the elements of the list of one thread
- are all for the same clock. */
- clock_gettime (timer->clock, &now);
-
- while (1)
- {
- /* If the timer is due or overdue, remove it from the queue.
- If it's a periodic timer, re-compute its new time and
- requeue it. Either way, perform the timer expiry. */
- if (timespec_compare (&now, &timer->expirytime) < 0)
- break;
-
- list_unlink_ip (first);
-
- if (__builtin_expect (timer->value.it_interval.tv_sec, 0) != 0
- || timer->value.it_interval.tv_nsec != 0)
- {
- timespec_add (&timer->expirytime, &now,
- &timer->value.it_interval);
- __timer_thread_queue_timer (self, timer);
- }
-
- thread_expire_timer (self, timer);
-
- first = list_first (&self->timer_queue);
- if (first == list_null (&self->timer_queue))
- break;
-
- timer = timer_links2ptr (first);
- }
- }
-
- /* If the queue is not empty, wait until the expiry time of the
- first node. Otherwise wait indefinitely. Insertions at the
- head of the queue must wake up the thread by broadcasting
- this condition variable. */
- if (timer != NULL)
- pthread_cond_timedwait (&self->cond, &__timer_mutex,
- &timer->expirytime);
- else
- pthread_cond_wait (&self->cond, &__timer_mutex);
- }
- /* This macro will never be executed since the while loop loops
- forever - but we have to add it for proper nesting. */
- pthread_cleanup_pop (1);
-
-}
-
-
-/* Enqueue a timer in wakeup order in the thread's timer queue.
- Returns 1 if the timer was inserted at the head of the queue,
- causing the queue's next wakeup time to change. */
-
-int
-__timer_thread_queue_timer (struct thread_node *thread,
- struct timer_node *insert)
-{
- struct list_links *iter;
- int athead = 1;
-
- for (iter = list_first (&thread->timer_queue);
- iter != list_null (&thread->timer_queue);
- iter = list_next (iter))
- {
- struct timer_node *timer = timer_links2ptr (iter);
-
- if (timespec_compare (&insert->expirytime, &timer->expirytime) < 0)
- break;
- athead = 0;
- }
-
- list_insbefore (iter, &insert->links);
- return athead;
-}
-
-
-/* Start a thread and associate it with the given thread node. Global
- lock must be held by caller. */
-int
-__timer_thread_start (struct thread_node *thread)
-{
- int retval = 1;
-
- assert (!thread->exists);
- thread->exists = 1;
-
- if (pthread_create (&thread->id, &thread->attr, thread_func, thread) != 0)
- {
- thread->exists = 0;
- retval = -1;
- }
-
- return retval;
-}
-
-
-void
-__timer_thread_wakeup (struct thread_node *thread)
-{
- pthread_cond_broadcast (&thread->cond);
-}
-
-
-/* Compare two pthread_attr_t thread attributes for exact equality.
- Returns 1 if they are equal, otherwise zero if they are not equal or
- contain illegal values. This version is LinuxThreads-specific for
- performance reason. One could use the access functions to get the
- values of all the fields of the attribute structure. */
-static int
-thread_attr_compare (const pthread_attr_t *left, const pthread_attr_t *right)
-{
- return (left->__detachstate == right->__detachstate
- && left->__schedpolicy == right->__schedpolicy
- && (left->__schedparam.sched_priority
- == right->__schedparam.sched_priority)
- && left->__inheritsched == right->__inheritsched
- && left->__scope == right->__scope);
-}
-
-
-/* Search the list of active threads and find one which has matching
- attributes. Global mutex lock must be held by caller. */
-struct thread_node *
-__timer_thread_find_matching (const pthread_attr_t *desired_attr,
- clockid_t desired_clock_id)
-{
- struct list_links *iter = list_first (&thread_active_list);
-
- while (iter != list_null (&thread_active_list))
- {
- struct thread_node *candidate = thread_links2ptr (iter);
-
- if (thread_attr_compare (desired_attr, &candidate->attr)
- && desired_clock_id == candidate->clock_id)
- {
- list_unlink (iter);
- return candidate;
- }
-
- iter = list_next (iter);
- }
-
- return NULL;
-}
-
-
-/* Grab a free timer structure from the global free list. The global
- lock must be held by the caller. */
-struct timer_node *
-__timer_alloc (void)
-{
- struct list_links *node = list_first (&timer_free_list);
-
- if (node != list_null (&timer_free_list))
- {
- struct timer_node *timer = timer_links2ptr (node);
- list_unlink_ip (node);
- timer->inuse = TIMER_INUSE;
- timer->refcount = 1;
- return timer;
- }
-
- return NULL;
-}
-
-
-/* Return a timer structure to the global free list. The global lock
- must be held by the caller. */
-void
-__timer_dealloc (struct timer_node *timer)
-{
- assert (timer->refcount == 0);
- timer->thread = NULL; /* Break association between timer and thread. */
- timer->inuse = TIMER_FREE;
- list_append (&timer_free_list, &timer->links);
-}
-
-
-/* Thread cancellation handler which unlocks a mutex. */
-void
-__timer_mutex_cancel_handler (void *arg)
-{
- pthread_mutex_unlock (arg);
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/timer_settime.c b/newlib/libc/sys/linux/linuxthreads/timer_settime.c
deleted file mode 100644
index 2f187fd18..000000000
--- a/newlib/libc/sys/linux/linuxthreads/timer_settime.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Kaz Kylheku <kaz@ashi.footprints.net>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <pthread.h>
-#include <time.h>
-
-#include "posix-timer.h"
-
-
-/* Set timer TIMERID to VALUE, returning old value in OVLAUE. */
-int
-timer_settime (timerid, flags, value, ovalue)
- timer_t timerid;
- int flags;
- const struct itimerspec *value;
- struct itimerspec *ovalue;
-{
- struct timer_node *timer;
- struct thread_node *thread = NULL;
- struct timespec now;
- int have_now = 0, need_wakeup = 0;
- int retval = -1;
-
- timer = timer_id2ptr (timerid);
- if (timer == NULL)
- {
- __set_errno (EINVAL);
- goto bail;
- }
-
- if (value->it_interval.tv_nsec < 0
- || value->it_interval.tv_nsec >= 1000000000
- || value->it_value.tv_nsec < 0
- || value->it_value.tv_nsec >= 1000000000)
- {
- __set_errno (EINVAL);
- goto bail;
- }
-
- /* Will need to know current time since this is a relative timer;
- might as well make the system call outside of the lock now! */
-
- if ((flags & TIMER_ABSTIME) == 0)
- {
- clock_gettime (timer->clock, &now);
- have_now = 1;
- }
-
- pthread_mutex_lock (&__timer_mutex);
- timer_addref (timer);
-
- /* One final check of timer validity; this one is possible only
- until we have the mutex, because it accesses the inuse flag. */
-
- if (! timer_valid(timer))
- {
- __set_errno (EINVAL);
- goto unlock_bail;
- }
-
- if (ovalue != NULL)
- {
- ovalue->it_interval = timer->value.it_interval;
-
- if (timer->armed)
- {
- if (! have_now)
- {
- pthread_mutex_unlock (&__timer_mutex);
- clock_gettime (timer->clock, &now);
- have_now = 1;
- pthread_mutex_lock (&__timer_mutex);
- timer_addref (timer);
- }
-
- timespec_sub (&ovalue->it_value, &timer->expirytime, &now);
- }
- else
- {
- ovalue->it_value.tv_sec = 0;
- ovalue->it_value.tv_nsec = 0;
- }
- }
-
- timer->value = *value;
-
- list_unlink_ip (&timer->links);
- timer->armed = 0;
-
- thread = timer->thread;
-
- /* A value of { 0, 0 } causes the timer to be stopped. */
- if (value->it_value.tv_sec != 0
- || __builtin_expect (value->it_value.tv_nsec != 0, 1))
- {
- if ((flags & TIMER_ABSTIME) != 0)
- /* The user specified the expiration time. */
- timer->expirytime = value->it_value;
- else
- timespec_add (&timer->expirytime, &now, &value->it_value);
-
- /* Only need to wake up the thread if timer is inserted
- at the head of the queue. */
- if (thread != NULL)
- need_wakeup = __timer_thread_queue_timer (thread, timer);
- timer->armed = 1;
- }
-
- retval = 0;
-
-unlock_bail:
- timer_delref (timer);
- pthread_mutex_unlock (&__timer_mutex);
-
-bail:
- if (thread != NULL && need_wakeup)
- __timer_thread_wakeup (thread);
-
- return retval;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/tst-cancel.c b/newlib/libc/sys/linux/linuxthreads/tst-cancel.c
deleted file mode 100644
index da32aaf5e..000000000
--- a/newlib/libc/sys/linux/linuxthreads/tst-cancel.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/* Tests for cancelation handling. */
-
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/stat.h>
-
-int fd;
-
-pthread_barrier_t bar;
-
-
-static void
-cleanup (void *arg)
-{
- int nr = (int) (long int) arg;
- char s[30];
- char *cp = stpcpy (s, "cleanup ");
- *cp++ = '0' + nr;
- *cp++ = '\n';
- __libc_lseek (fd, 0, SEEK_END);
- __libc_write (fd, s, cp - s);
-}
-
-
-static void *
-t1 (void *arg)
-{
- pthread_cleanup_push (cleanup, (void *) (long int) 1);
- return NULL;
- pthread_cleanup_pop (0);
-}
-
-
-static void
-inner (int a)
-{
- pthread_cleanup_push (cleanup, (void *) (long int) a);
- if (a)
- return;
- pthread_cleanup_pop (0);
-}
-
-
-static void *
-t2 (void *arg)
-{
- pthread_cleanup_push (cleanup, (void *) (long int) 2);
- inner ((int) (long int) arg);
- return NULL;
- pthread_cleanup_pop (0);
-}
-
-
-/* This does not work yet. */
-volatile int cleanupokcnt;
-
-static void
-cleanupok (void *arg)
-{
- ++cleanupokcnt;
-}
-
-
-static void *
-t3 (void *arg)
-{
- pthread_cleanup_push (cleanupok, (void *) (long int) 4);
- inner ((int) (long int) arg);
- pthread_exit (NULL);
- pthread_cleanup_pop (0);
-}
-
-
-static void
-innerok (int a)
-{
- pthread_cleanup_push (cleanupok, (void *) (long int) a);
- pthread_exit (NULL);
- pthread_cleanup_pop (0);
-}
-
-
-static void *
-t4 (void *arg)
-{
- pthread_cleanup_push (cleanupok, (void *) (long int) 6);
- innerok ((int) (long int) arg);
- pthread_cleanup_pop (0);
- return NULL;
-}
-
-
-int
-main (int argc, char *argv[])
-{
- pthread_t td;
- int err;
- char *tmp;
- const char *prefix;
- const char template[] = "thtstXXXXXX";
- struct stat64 st;
- int result = 0;
-
- prefix = argc > 1 ? argv[1] : "";
- tmp = (char *) alloca (strlen (prefix) + sizeof template);
- strcpy (stpcpy (tmp, prefix), template);
-
- fd = mkstemp (tmp);
- if (fd == -1)
- {
- printf ("cannot create temporary file: %m");
- exit (1);
- }
- unlink (tmp);
-
- err = pthread_barrier_init (&bar, NULL, 2);
- if (err != 0 )
- {
- printf ("cannot create barrier: %s\n", strerror (err));
- exit (1);
- }
-
-#ifdef NOT_YET
- err = pthread_create (&td, NULL, t1, NULL);
- if (err != 0)
- {
- printf ("cannot create thread t1: %s\n", strerror (err));
- exit (1);
- }
-
- err = pthread_join (td, NULL);
- if (err != 0)
- {
- printf ("cannot join thread: %s\n", strerror (err));
- exit (1);
- }
-
- err = pthread_create (&td, NULL, t2, (void *) 3);
- if (err != 0)
- {
- printf ("cannot create thread t2: %s\n", strerror (err));
- exit (1);
- }
-
- err = pthread_join (td, NULL);
- if (err != 0)
- {
- printf ("cannot join thread: %s\n", strerror (err));
- exit (1);
- }
-
- err = pthread_create (&td, NULL, t3, (void *) 5);
- if (err != 0)
- {
- printf ("cannot create thread t3: %s\n", strerror (err));
- exit (1);
- }
-
- err = pthread_join (td, NULL);
- if (err != 0)
- {
- printf ("cannot join thread: %s\n", strerror (err));
- exit (1);
- }
-#endif
-
- err = pthread_create (&td, NULL, t4, (void *) 7);
- if (err != 0)
- {
- printf ("cannot create thread t3: %s\n", strerror (err));
- exit (1);
- }
-
- err = pthread_join (td, NULL);
- if (err != 0)
- {
- printf ("cannot join thread: %s\n", strerror (err));
- exit (1);
- }
-
- if (fstat64 (fd, &st) < 0)
- {
- printf ("cannot stat temporary file: %m\n");
- result = 1;
- }
- else if (st.st_size != 0)
- {
- char buf[512];
- puts ("some cleanup handlers ran:");
- fflush (stdout);
- __lseek (fd, 0, SEEK_SET);
- while (1)
- {
- ssize_t n = read (fd, buf, sizeof buf);
- if (n <= 0)
- break;
- write (STDOUT_FILENO, buf, n);
- }
- result = 1;
- }
-
- // if (cleanupokcnt != 3) will be three once t3 runs
- if (cleanupokcnt != 2)
- {
- printf ("cleanupokcnt = %d\n", cleanupokcnt);
- result = 1;
- }
-
- return result;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/tst-context.c b/newlib/libc/sys/linux/linuxthreads/tst-context.c
deleted file mode 100644
index 9066e837e..000000000
--- a/newlib/libc/sys/linux/linuxthreads/tst-context.c
+++ /dev/null
@@ -1,109 +0,0 @@
-#include <errno.h>
-#include <error.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ucontext.h>
-
-#include "pt-machine.h"
-
-
-#define N 4
-
-#ifdef FLOATING_STACKS
-static char stacks[N][8192];
-static ucontext_t ctx[N][2];
-static volatile int failures;
-
-static void
-fct (long int n)
-{
- /* Just to use the thread local descriptor. */
- printf ("%ld: in %s now\n", n, __FUNCTION__);
- errno = 0;
-}
-
-static void *
-threadfct (void *arg)
-{
- int n = (int) (long int) arg;
-
- if (getcontext (&ctx[n][1]) != 0)
- {
- printf ("%d: cannot get context: %m\n", n);
- exit (1);
- }
-
- printf ("%d: %s: before makecontext\n", n, __FUNCTION__);
-
- ctx[n][1].uc_stack.ss_sp = stacks[n];
- ctx[n][1].uc_stack.ss_size = 8192;
- ctx[n][1].uc_link = &ctx[n][0];
- makecontext (&ctx[n][1], (void (*) (void)) fct, 1, (long int) n);
-
- printf ("%d: %s: before swapcontext\n", n, __FUNCTION__);
-
- if (swapcontext (&ctx[n][0], &ctx[n][1]) != 0)
- {
- ++failures;
- printf ("%d: %s: swapcontext failed\n", n, __FUNCTION__);
- }
- else
- printf ("%d: back in %s\n", n, __FUNCTION__);
-
- return NULL;
-}
-#endif
-
-
-#ifdef FLOATING_STACKS
-static volatile int global;
-#endif
-
-int
-main (void)
-{
-#ifndef FLOATING_STACKS
- puts ("not supported");
- return 0;
-#else
- int n;
- pthread_t th[N];
- ucontext_t mctx;
-
- puts ("making contexts");
- if (getcontext (&mctx) != 0)
- {
- if (errno == ENOSYS)
- {
- puts ("context handling not supported");
- exit (0);
- }
-
- printf ("%s: getcontext: %m\n", __FUNCTION__);
- exit (1);
- }
-
- /* Play some tricks with this context. */
- if (++global == 1)
- if (setcontext (&mctx) != 0)
- {
- printf ("%s: setcontext: %m\n", __FUNCTION__);
- exit (1);
- }
- if (global != 2)
- {
- printf ("%s: 'global' not incremented twice\n", __FUNCTION__);
- exit (1);
- }
-
- for (n = 0; n < N; ++n)
- if (pthread_create (&th[n], NULL, threadfct, (void *) n) != 0)
- error (EXIT_FAILURE, errno, "cannot create all threads");
-
- for (n = 0; n < N; ++n)
- pthread_join (th[n], NULL);
-
- return failures;
-#endif
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/tststack.c b/newlib/libc/sys/linux/linuxthreads/tststack.c
deleted file mode 100644
index 6789ff861..000000000
--- a/newlib/libc/sys/linux/linuxthreads/tststack.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Tests for variable stack size handling.
- Copyright (C) 2000 Free Software Foundation, Inc.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2000.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <pthread.h>
-#include <stdio.h>
-#include <unistd.h>
-
-static void *f1 (void *);
-static void *f2 (void *);
-
-int
-main (void)
-{
- pthread_attr_t attr;
- pthread_t th1 = 0;
- pthread_t th2 = 0;
- void *res1;
- void *res2;
-
- pthread_attr_init (&attr);
- if (pthread_attr_setstacksize (&attr, 70*1024) != 0)
- {
- puts ("invalid stack size");
- return 1;
- }
-
- pthread_create (&th1, NULL, f1, NULL);
- pthread_create (&th2, &attr, f2, NULL);
-
- pthread_join (th1, &res1);
- pthread_join (th2, &res2);
-
- printf ("res1 = %p\n", res1);
- printf ("res2 = %p\n", res2);
-
- return res1 != (void *) 1 || res2 != (void *) 2;
-}
-
-static void *
-f1 (void *parm)
-{
- printf ("This is `%s'\n", __FUNCTION__);
- fflush (stdout);
-
- return (void *) 1;
-}
-
-static void *
-f2 (void *parm)
-{
- printf ("This is `%s'\n", __FUNCTION__);
- fflush (stdout);
- sleep (1);
-
- return (void *) 2;
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/unload.c b/newlib/libc/sys/linux/linuxthreads/unload.c
deleted file mode 100644
index c528df234..000000000
--- a/newlib/libc/sys/linux/linuxthreads/unload.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Tests for non-unloading of libpthread.
- Copyright (C) 2000 Free Software Foundation, Inc.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2000.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <dlfcn.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <gnu/lib-names.h>
-
-int
-main (void)
-{
- void *p = dlopen (PREFIX LIBPTHREAD_SO, RTLD_LAZY);
-
- if (p == NULL)
- {
- puts ("failed to load " LIBPTHREAD_SO);
- exit (1);
- }
-
- if (dlclose (p) != 0)
- {
- puts ("dlclose (" LIBPTHREAD_SO ") failed");
- exit (1);
- }
-
- puts ("seems to work");
-
- exit (0);
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/weaks.c b/newlib/libc/sys/linux/linuxthreads/weaks.c
deleted file mode 100644
index 6e2cf4bf1..000000000
--- a/newlib/libc/sys/linux/linuxthreads/weaks.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/* The weak pthread functions for Linux.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <errno.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <shlib-compat.h>
-#include <bp-sym.h>
-#include "libc-symbols.h"
-
-extern int __pthread_return_0 (void);
-extern int __pthread_return_1 (void);
-extern void __pthread_return_void (void);
-extern void weak_function pthread_exit (void *__retval)
- __attribute__ ((noreturn));
-
-/* Those are pthread functions which return 0 if successful. */
-weak_alias (__pthread_return_0, BP_SYM (__libc_pthread_attr_init_2_1))
-versioned_symbol (libpthread, BP_SYM (__libc_pthread_attr_init_2_1),
- BP_SYM (pthread_attr_init), GLIBC_2_1);
-#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
-weak_alias (__pthread_return_0, BP_SYM (__libc_pthread_attr_init_2_0))
-compat_symbol (libpthread, BP_SYM (__libc_pthread_attr_init_2_0),
- BP_SYM (pthread_attr_init), GLIBC_2_0);
-#endif
-weak_alias (__pthread_return_0, BP_SYM (pthread_attr_destroy))
-weak_alias (__pthread_return_0, BP_SYM (pthread_attr_setdetachstate))
-weak_alias (__pthread_return_0, BP_SYM (pthread_attr_getdetachstate))
-weak_alias (__pthread_return_0, BP_SYM (pthread_attr_setschedparam))
-weak_alias (__pthread_return_0, BP_SYM (pthread_attr_getschedparam))
-weak_alias (__pthread_return_0, BP_SYM (pthread_attr_setschedpolicy))
-weak_alias (__pthread_return_0, BP_SYM (pthread_attr_getschedpolicy))
-weak_alias (__pthread_return_0, BP_SYM (pthread_attr_setinheritsched))
-weak_alias (__pthread_return_0, BP_SYM (pthread_attr_getinheritsched))
-weak_alias (__pthread_return_0, BP_SYM (pthread_attr_setscope))
-weak_alias (__pthread_return_0, BP_SYM (pthread_attr_getscope))
-weak_alias (__pthread_return_0, BP_SYM (pthread_attr_setstackaddr))
-weak_alias (__pthread_return_0, BP_SYM (pthread_attr_getstackaddr))
-weak_alias (__pthread_return_0, BP_SYM (pthread_attr_setstacksize))
-weak_alias (__pthread_return_0, BP_SYM (pthread_attr_getstacksize))
-weak_alias (__pthread_return_0, BP_SYM (pthread_mutex_init))
-weak_alias (__pthread_return_0, BP_SYM (pthread_mutex_destroy))
-weak_alias (__pthread_return_0, BP_SYM (pthread_mutex_lock))
-weak_alias (__pthread_return_0, BP_SYM (pthread_mutex_trylock))
-weak_alias (__pthread_return_0, BP_SYM (pthread_mutex_unlock))
-weak_alias (__pthread_return_0, BP_SYM (pthread_mutexattr_init))
-weak_alias (__pthread_return_0, BP_SYM (pthread_mutexattr_destroy))
-weak_alias (__pthread_return_0, BP_SYM (pthread_mutexattr_settype))
-weak_alias (__pthread_return_0, BP_SYM (pthread_mutexattr_gettype))
-weak_alias (__pthread_return_0, BP_SYM (pthread_condattr_init))
-weak_alias (__pthread_return_0, BP_SYM (pthread_condattr_destroy))
-weak_alias (__pthread_return_0, BP_SYM (pthread_setschedparam))
-weak_alias (__pthread_return_0, BP_SYM (pthread_getschedparam))
-weak_alias (__pthread_return_0, BP_SYM (pthread_getcancelstate))
-weak_alias (__pthread_return_0, BP_SYM (pthread_setcancelstate))
-weak_alias (__pthread_return_0, BP_SYM (pthread_setcanceltype))
-weak_alias (__pthread_return_0, pthread_setconcurrency)
-weak_alias (__pthread_return_0, pthread_getconcurrency)
-weak_alias (__pthread_return_0, pthread_self)
-weak_alias (__pthread_return_0, BP_SYM (pthread_cond_init))
-weak_alias (__pthread_return_0, BP_SYM (pthread_cond_destroy))
-weak_alias (__pthread_return_0, BP_SYM (pthread_cond_wait))
-weak_alias (__pthread_return_0, BP_SYM (pthread_cond_timedwait))
-weak_alias (__pthread_return_0, BP_SYM (pthread_cond_signal))
-weak_alias (__pthread_return_0, BP_SYM (pthread_cond_broadcast))
-weak_alias (__pthread_return_0, BP_SYM (pthread_rwlock_init))
-weak_alias (__pthread_return_0, BP_SYM (pthread_rwlock_destroy))
-weak_alias (__pthread_return_0, BP_SYM (pthread_rwlock_rdlock))
-weak_alias (__pthread_return_0, BP_SYM (pthread_rwlock_wrlock))
-weak_alias (__pthread_return_0, BP_SYM (pthread_rwlock_tryrdlock))
-weak_alias (__pthread_return_0, BP_SYM (pthread_rwlock_trywrlock))
-weak_alias (__pthread_return_0, BP_SYM (pthread_rwlock_unlock))
-weak_alias (__pthread_return_0, BP_SYM (pthread_rwlockattr_init))
-weak_alias (__pthread_return_0, BP_SYM (pthread_rwlockattr_destroy))
-weak_alias (__pthread_return_0, BP_SYM (pthread_rwlockattr_setpshared))
-weak_alias (__pthread_return_0, BP_SYM (pthread_rwlockattr_getpshared))
-
-
-/* Those are pthread functions which return 1 if successful. */
-weak_alias (__pthread_return_1, pthread_equal)
-
-/* pthread_exit () is a special case. */
-void
-weak_function
-pthread_exit (void *retval)
-{
- exit (EXIT_SUCCESS);
-}
-
-int
-__pthread_return_0 (void)
-{
- return 0;
-}
-
-int
-__pthread_return_1 (void)
-{
- return 1;
-}
-
-void
-__pthread_return_void (void)
-{
-}
diff --git a/newlib/libc/sys/linux/linuxthreads/wrapsyscall.c b/newlib/libc/sys/linux/linuxthreads/wrapsyscall.c
deleted file mode 100644
index ec1bc2a90..000000000
--- a/newlib/libc/sys/linux/linuxthreads/wrapsyscall.c
+++ /dev/null
@@ -1,251 +0,0 @@
-/* Wrapper arpund system calls to provide cancelation points.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <pthread.h>
-#include <unistd.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <termios.h>
-#include <sys/resource.h>
-#include <sys/wait.h>
-#include <sys/socket.h>
-#include "libc-symbols.h"
-
-
-#ifndef SHARED
-/* We need a hook to force this file to be linked in when static
- libpthread is used. */
-const int __pthread_provide_wrappers = 0;
-#endif
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 2
-#define ELIX_2_PLUS
-#endif
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 3
-#define ELIX_3_PLUS
-#endif
-
-#define CANCELABLE_SYSCALL(res_type, name, param_list, params) \
-res_type __libc_##name param_list; \
-res_type \
-__attribute__ ((weak)) \
-name param_list \
-{ \
- res_type result; \
- int oldtype; \
- pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype); \
- result = __libc_##name params; \
- pthread_setcanceltype (oldtype, NULL); \
- return result; \
-}
-
-#define CANCELABLE_SYSCALL_VA(res_type, name, param_list, params, last_arg) \
-res_type __libc_##name param_list; \
-res_type \
-__attribute__ ((weak)) \
-name param_list \
-{ \
- res_type result; \
- int oldtype; \
- va_list ap; \
- pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype); \
- va_start (ap, last_arg); \
- result = __libc_##name params; \
- va_end (ap); \
- pthread_setcanceltype (oldtype, NULL); \
- return result; \
-}
-
-
-/* close(2). */
-CANCELABLE_SYSCALL (int, close, (int fd), (fd))
-strong_alias (close, __close)
-
-
-/* fcntl(2). */
-CANCELABLE_SYSCALL_VA (int, fcntl, (int fd, int cmd, ...),
- (fd, cmd, va_arg (ap, long int)), cmd)
-strong_alias (fcntl, __fcntl)
-
-
-/* fsync(2). */
-CANCELABLE_SYSCALL (int, fsync, (int fd), (fd))
-
-
-/* lseek(2). */
-CANCELABLE_SYSCALL (off_t, lseek, (int fd, off_t offset, int whence),
- (fd, offset, whence))
-strong_alias (lseek, __lseek)
-
-
-#ifdef ELIX_2_PLUS
-/* lseek64(2). */
-CANCELABLE_SYSCALL (loff_t, lseek64, (int fd, loff_t offset, int whence),
- (fd, offset, whence))
-#endif
-
-
-/* msync(2). */
-CANCELABLE_SYSCALL (int, msync, (__ptr_t addr, size_t length, int flags),
- (addr, length, flags))
-
-
-/* nanosleep(2). */
-CANCELABLE_SYSCALL (int, nanosleep, (const struct timespec *requested_time,
- struct timespec *remaining),
- (requested_time, remaining))
-
-
-/* open(2). */
-CANCELABLE_SYSCALL_VA (int, open, (const char *pathname, int flags, ...),
- (pathname, flags, va_arg (ap, int)), flags)
-strong_alias (open, __open)
-
-
-#ifdef ELIX_2_PLUS
-/* open64(3). */
-CANCELABLE_SYSCALL_VA (int, open64, (const char *pathname, int flags, ...),
- (pathname, flags, va_arg (ap, int)), flags)
-strong_alias (open64, __open64)
-#endif
-
-
-/* pause(2). */
-CANCELABLE_SYSCALL (int, pause, (void), ())
-
-
-/* pread(3). */
-CANCELABLE_SYSCALL (ssize_t, pread, (int fd, void *buf, size_t count,
- off_t offset),
- (fd, buf, count, offset))
-
-
-#ifdef ELIX_2_PLUS
-/* pread64(3). */
-CANCELABLE_SYSCALL (ssize_t, pread64, (int fd, void *buf, size_t count,
- loff_t offset),
- (fd, buf, count, offset))
-strong_alias (pread64, __pread64)
-#endif
-
-
-/* pwrite(3). */
-CANCELABLE_SYSCALL (ssize_t, pwrite, (int fd, const void *buf, size_t n,
- off_t offset),
- (fd, buf, n, offset))
-
-
-#ifdef ELIX_2_PLUS
-/* pwrite64(3). */
-CANCELABLE_SYSCALL (ssize_t, pwrite64, (int fd, const void *buf, size_t n,
- loff_t offset),
- (fd, buf, n, offset))
-strong_alias (pwrite64, __pwrite64)
-#endif
-
-
-/* read(2). */
-CANCELABLE_SYSCALL (ssize_t, read, (int fd, void *buf, size_t count),
- (fd, buf, count))
-strong_alias (read, __read)
-
-
-#ifdef ELIX_3_PLUS
-/* system(3). */
-CANCELABLE_SYSCALL (int, system, (const char *line), (line))
-#endif
-
-
-/* tcdrain(2). */
-CANCELABLE_SYSCALL (int, tcdrain, (int fd), (fd))
-
-
-#ifdef ELIX_3_PLUS
-/* wait(2). */
-CANCELABLE_SYSCALL (__pid_t, wait, (int *stat_loc), (stat_loc))
-strong_alias (wait, __wait)
-#endif
-
-
-#ifdef ELIX_3_PLUS
-/* waitpid(2). */
-CANCELABLE_SYSCALL (__pid_t, waitpid, (__pid_t pid, int *stat_loc,
- int options),
- (pid, stat_loc, options))
-#endif
-
-/* for libpthread usage */
-CANCELABLE_SYSCALL (__pid_t, __waitpid, (__pid_t pid, int *stat_loc,
- int options),
- (pid, stat_loc, options))
-
-/* write(2). */
-CANCELABLE_SYSCALL (ssize_t, write, (int fd, const void *buf, size_t n),
- (fd, buf, n))
-strong_alias (write, __write)
-
-
-/* The following system calls are thread cancellation points specified
- in XNS. */
-
-/* accept(2). */
-CANCELABLE_SYSCALL (int, accept, (int fd, __SOCKADDR_ARG addr,
- socklen_t *addr_len),
- (fd, addr, addr_len))
-
-/* connect(2). */
-CANCELABLE_SYSCALL (int, connect, (int fd, __CONST_SOCKADDR_ARG addr,
- socklen_t len),
- (fd, addr, len))
-strong_alias (connect, __connect)
-
-/* recv(2). */
-CANCELABLE_SYSCALL (ssize_t, recv, (int fd, __ptr_t buf, size_t n, int flags),
- (fd, buf, n, flags))
-
-/* recvfrom(2). */
-CANCELABLE_SYSCALL (ssize_t, recvfrom, (int fd, __ptr_t buf, size_t n, int flags,
- __SOCKADDR_ARG addr, socklen_t *addr_len),
- (fd, buf, n, flags, addr, addr_len))
-
-/* recvmsg(2). */
-CANCELABLE_SYSCALL (ssize_t, recvmsg, (int fd, struct msghdr *message, int flags),
- (fd, message, flags))
-
-/* send(2). */
-CANCELABLE_SYSCALL (ssize_t, send, (int fd, const __ptr_t buf, size_t n,
- int flags),
- (fd, buf, n, flags))
-strong_alias (send, __send)
-
-/* sendmsg(2). */
-CANCELABLE_SYSCALL (ssize_t, sendmsg, (int fd, const struct msghdr *message,
- int flags),
- (fd, message, flags))
-
-/* sendto(2). */
-CANCELABLE_SYSCALL (ssize_t, sendto, (int fd, const __ptr_t buf, size_t n,
- int flags, __CONST_SOCKADDR_ARG addr,
- socklen_t addr_len),
- (fd, buf, n, flags, addr, addr_len))
diff --git a/newlib/libc/sys/linux/machine/Makefile.am b/newlib/libc/sys/linux/machine/Makefile.am
deleted file mode 100644
index 3f10b8fbf..000000000
--- a/newlib/libc/sys/linux/machine/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-SUBDIRS = $(machine_dir) .
-
-noinst_DATA = $(CRT0)
-
-$(CRT0): $(machine_dir)/$(CRT0)
- rm -f $@
- ln $(machine_dir)/$(CRT0) $@ >/dev/null 2>/dev/null \
- || cp $(machine_dir)/$(CRT0) $@
-
-$(machine_dir)/$(CRT0): ; @true
-
-CLEANFILES = $(CRT0)
-
-doc:
-
-ACLOCAL_AMFLAGS = -I ../../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/linux/machine/Makefile.in b/newlib/libc/sys/linux/machine/Makefile.in
deleted file mode 100644
index 1e68c01d6..000000000
--- a/newlib/libc/sys/linux/machine/Makefile.in
+++ /dev/null
@@ -1,371 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-CRT0 = @CRT0@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-EXEEXT = @EXEEXT@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-SUBDIRS = $(machine_dir) .
-
-noinst_DATA = $(CRT0)
-
-CLEANFILES = $(CRT0)
-
-ACLOCAL_AMFLAGS = -I ../../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-DATA = $(noinst_DATA)
-
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-all: all-redirect
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../../acinclude.m4 ../../../../aclocal.m4 \
- ../../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- dot_seen=yes; \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done; \
- if test "$$dot_seen" = "no"; then \
- $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
- fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
- dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
- rev="$$subdir $$rev"; \
- test "$$subdir" != "." || dot_seen=yes; \
- done; \
- test "$$dot_seen" = "no" && rev=". $$rev"; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
- for subdir in $(SUBDIRS); do \
- if test "$$subdir" = .; then :; else \
- test -d $(distdir)/$$subdir \
- || mkdir $(distdir)/$$subdir \
- || exit 1; \
- chmod 777 $(distdir)/$$subdir; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
- || exit 1; \
- fi; \
- done
-info-am:
-info: info-recursive
-dvi-am:
-dvi: dvi-recursive
-check-am:
-check: check-recursive
-installcheck-am:
-installcheck: installcheck-recursive
-install-info-am:
-install-info: install-info-recursive
-install-exec-am:
-install-exec: install-exec-recursive
-
-install-data-am:
-install-data: install-data-recursive
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-recursive
-uninstall-am:
-uninstall: uninstall-recursive
-all-am: Makefile $(DATA)
-all-redirect: all-recursive
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs: installdirs-recursive
-installdirs-am:
-
-
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-recursive
-
-clean-am: clean-tags clean-generic mostlyclean-am
-
-clean: clean-recursive
-
-distclean-am: distclean-tags distclean-generic clean-am
- -rm -f libtool
-
-distclean: distclean-recursive
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-recursive
- -rm -f config.status
-
-.PHONY: install-data-recursive uninstall-data-recursive \
-install-exec-recursive uninstall-exec-recursive installdirs-recursive \
-uninstalldirs-recursive all-recursive check-recursive \
-installcheck-recursive info-recursive dvi-recursive \
-mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
-dvi-am dvi check check-am installcheck-am installcheck install-info-am \
-install-info install-exec-am install-exec install-data-am install-data \
-install-am install uninstall-am uninstall all-redirect all-am all \
-installdirs-am installdirs mostlyclean-generic distclean-generic \
-clean-generic maintainer-clean-generic clean mostlyclean distclean \
-maintainer-clean
-
-
-$(CRT0): $(machine_dir)/$(CRT0)
- rm -f $@
- ln $(machine_dir)/$(CRT0) $@ >/dev/null 2>/dev/null \
- || cp $(machine_dir)/$(CRT0) $@
-
-$(machine_dir)/$(CRT0): ; @true
-
-doc:
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/linux/machine/aclocal.m4 b/newlib/libc/sys/linux/machine/aclocal.m4
deleted file mode 100644
index c0a206827..000000000
--- a/newlib/libc/sys/linux/machine/aclocal.m4
+++ /dev/null
@@ -1,1223 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
-
-# serial 46 AC_PROG_LIBTOOL
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
- AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [AC_LIBTOOL_CXX],
- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
- AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [ifdef([AC_PROG_GCJ],
- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([A][M_PROG_GCJ],
- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([LT_AC_PROG_GCJ],
- [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])])])])])
-
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- AC_PATH_MAGIC
- fi
- ;;
-esac
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-AC_ARG_WITH(pic,
- [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
- pic_mode="$withval", pic_mode=default)
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_SAVE
- AC_LANG_C
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_RESTORE])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
- [AC_TRY_LINK([],
- [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);],
- [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
- [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
- ])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_LIBTOOL_PICMODE - implement the --with-pic flag
-# Usage: AC_LIBTOOL_PICMODE[(MODE)]
-# Where MODE is either `yes' or `no'. If omitted, it defaults to
-# `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)])
-
-
-# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="ifelse([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-])
-
-
-# AC_PATH_MAGIC - find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
-AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])
-
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- re_direlt=['/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])
-
-# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
-[lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-])
-
-# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependant libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.[012])
- lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd* )
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- ia64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
- else
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
- fi
- ;;
-
-newsos6)
- [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-[sysv5uw[78]* | sysv4*uw2*)]
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-])
-
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-convenience to the
-# configure arguments. Note that LIBLTDL and INCLTDL are not
-# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
-# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
-# with '${top_builddir}/' and INCLTDL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!). If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case $enable_ltdl_convenience in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-install to the configure
-# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
-# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
-# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
-# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
-# with '${top_srcdir}/' (note the single quotes!). If your package is
-# not flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-# If this macro is not defined by Autoconf, define it here.
-ifdef([AC_PROVIDE_IFELSE],
- [],
- [define([AC_PROVIDE_IFELSE],
- [ifdef([AC_PROVIDE_$1],
- [$2], [$3])])])
-
-# AC_LIBTOOL_CXX - enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
-
-AC_DEFUN([_AC_LIBTOOL_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
-LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
-lt_save_CC="$CC"
-lt_save_CFLAGS="$CFLAGS"
-dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
-dnl is set to the C++ compiler.
-AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
-CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-# AC_LIBTOOL_GCJ - enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
-
-AC_DEFUN([_AC_LIBTOOL_GCJ],
-[AC_REQUIRE([AC_PROG_LIBTOOL])
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
- [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
- [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
- [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
-lt_save_CC="$CC"
-lt_save_CFLAGS="$CFLAGS"
-dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
-dnl is set to the C++ compiler.
-AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
-CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-dnl old names
-AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)
-])
-
diff --git a/newlib/libc/sys/linux/machine/configure b/newlib/libc/sys/linux/machine/configure
deleted file mode 100755
index fe2d0bdb9..000000000
--- a/newlib/libc/sys/linux/machine/configure
+++ /dev/null
@@ -1,3429 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-shared[=PKGS] build shared libraries [default=yes]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=i386
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../../.. $srcdir/../../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../../.. $srcdir/../../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:590: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:643: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:700: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:733: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 738 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:766: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 771 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:948: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:969: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:987: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1030: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1043: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1056: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1069: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1082: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1107: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1137: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1186: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1210: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1241: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1273: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1305: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1337: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1382: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1436: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1470: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-if test "${use_libtool}" = "yes"; then
-
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_shared=yes
-fi
-
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
- enableval="$enable_static"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_static=yes
-fi
-
-# Check whether --enable-fast-install or --disable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
- enableval="$enable_fast_install"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_fast_install=yes
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1655: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1685: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1736: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1779 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1810: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1815: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1843: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1886: checking for ld used by GCC" >&5
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1916: checking for GNU ld" >&5
-else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1919: checking for non-GNU ld" >&5
-fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
-echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1954: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi
-fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1971: checking for $LD option to reload object files" >&5
-if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-
-echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-
-echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1983: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi
-fi
-
-NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
-
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:2021: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
-else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:2042: checking how to recognise dependant libraries" >&5
-if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.012)
- lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd* )
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
- fi
- ;;
-
-newsos6)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-sysv5uw[78]* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-
-fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2215: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:2245: checking for ${ac_tool_prefix}file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:2307: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2378: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2410: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2445: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_STRIP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2477: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- STRIP=":"
-fi
-fi
-
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-
-libtool_flags="$libtool_flags --enable-win32-dll"
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
- :
-fi
-
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
-else
- pic_mode=default
-fi
-
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 2544 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2582: checking whether the C compiler needs -belf" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 2595 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_needs_belf=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
-fi
-rm -f conftest*
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-fi
-
-echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2632: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_DLLTOOL"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2664: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- DLLTOOL="false"
-fi
-fi
-
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2699: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AS"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2731: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AS="false"
-fi
-fi
-
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2766: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_OBJDUMP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2798: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- OBJDUMP="false"
-fi
-fi
-
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
-echo "configure:2834: checking if libtool should supply DllMain function" >&5
-if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2839 "configure"
-#include "confdefs.h"
-
-int main() {
-extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:2847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_need_dllmain=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_need_dllmain=yes
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_need_dllmain" 1>&6
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
-echo "configure:2868: checking how to link DLLs" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2873 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_dll_switch=-mdll
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_dll_switch=-dll
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
-
-esac
-
-
-# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
-
-# Reload cache, that may have been modified by ltconfig
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-
-
-
-
-
-
-fi
-
-if test -n "${machine_dir}"; then
- subdirs="${machine_dir}"
-
-fi
-
-CRT0=
-if test -n "${machine_dir}"; then
- CRT0=crt0.o
-fi
-
-
-
-
-if test x${machine_dir} != x; then
- HAVE_MACHINE_DIR_TRUE=
- HAVE_MACHINE_DIR_FALSE='#'
-else
- HAVE_MACHINE_DIR_TRUE='#'
- HAVE_MACHINE_DIR_FALSE=
-fi
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-s%@LN_S@%$LN_S%g
-s%@STRIP@%$STRIP%g
-s%@DLLTOOL@%$DLLTOOL%g
-s%@OBJDUMP@%$OBJDUMP%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@subdirs@%$subdirs%g
-s%@CRT0@%$CRT0%g
-s%@HAVE_MACHINE_DIR_TRUE@%$HAVE_MACHINE_DIR_TRUE%g
-s%@HAVE_MACHINE_DIR_FALSE@%$HAVE_MACHINE_DIR_FALSE%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-if test "$no_recursion" != yes; then
-
- # Remove --cache-file and --srcdir arguments so they do not pile up.
- ac_sub_configure_args=
- ac_prev=
- for ac_arg in $ac_configure_args; do
- if test -n "$ac_prev"; then
- ac_prev=
- continue
- fi
- case "$ac_arg" in
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- ;;
- *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
- esac
- done
-
- for ac_config_dir in ${machine_dir}; do
-
- # Do not complain, so a configure script can configure whichever
- # parts of a large source tree are present.
- if test ! -d $srcdir/$ac_config_dir; then
- continue
- fi
-
- echo configuring in $ac_config_dir
-
- case "$srcdir" in
- .) ;;
- *)
- if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
- else
- { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
- fi
- ;;
- esac
-
- ac_popdir=`pwd`
- cd $ac_config_dir
-
- # A "../" for each directory in /$ac_config_dir.
- ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
-
- case "$srcdir" in
- .) # No --srcdir option. We are building in place.
- ac_sub_srcdir=$srcdir ;;
- /*) # Absolute path.
- ac_sub_srcdir=$srcdir/$ac_config_dir ;;
- *) # Relative path.
- ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
- esac
-
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_sub_srcdir/configure; then
- ac_sub_configure=$ac_sub_srcdir/configure
- elif test -f $ac_sub_srcdir/configure.in; then
- ac_sub_configure=$ac_configure
- else
- echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
- ac_sub_configure=
- fi
-
- # The recursion is here.
- if test -n "$ac_sub_configure"; then
-
- # Make the cache file name correct relative to the subdirectory.
- case "$cache_file" in
- /*) ac_sub_cache_file=$cache_file ;;
- *) # Relative path.
- ac_sub_cache_file="$ac_dots$cache_file" ;;
- esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
- # The eval makes quoting arguments work.
- if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
- then :
- else
- { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
- fi
- fi
-
- cd $ac_popdir
- done
-fi
-
diff --git a/newlib/libc/sys/linux/machine/configure.in b/newlib/libc/sys/linux/machine/configure.in
deleted file mode 100644
index a9dc30c9d..000000000
--- a/newlib/libc/sys/linux/machine/configure.in
+++ /dev/null
@@ -1,32 +0,0 @@
-dnl This is the newlib/libc/sys configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(i386)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../../..)
-
-NEWLIB_CONFIGURE(../../../..)
-
-dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
-dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
-dnl line of the macro which fail because appropriate LDFLAGS are not set.
-if test "${use_libtool}" = "yes"; then
-AC_LIBTOOL_WIN32_DLL
-AM_PROG_LIBTOOL
-fi
-
-if test -n "${machine_dir}"; then
- AC_CONFIG_SUBDIRS(${machine_dir})
-fi
-
-CRT0=
-if test -n "${machine_dir}"; then
- CRT0=crt0.o
-fi
-AC_SUBST(CRT0)
-
-AM_CONDITIONAL(HAVE_MACHINE_DIR, test x${machine_dir} != x)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/linux/machine/hp-timing.h b/newlib/libc/sys/linux/machine/hp-timing.h
deleted file mode 100644
index 099342db8..000000000
--- a/newlib/libc/sys/linux/machine/hp-timing.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* High precision, low overhead timing functions. Generic version.
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _HP_TIMING_H
-#define _HP_TIMING_H 1
-
-
-/* There are no generic definitions for the times. We could write something
- using the `gettimeofday' system call where available but the overhead of
- the system call might be too high.
-
- In case a platform supports timers in the hardware the following macros
- and types must be defined:
-
- - HP_TIMING_AVAIL: test for availability.
-
- - HP_TIMING_INLINE: this macro is non-zero if the functionality is not
- implemented using function calls but instead uses some inlined code
- which might simply consist of a few assembler instructions. We have to
- know this since we might want to use the macros here in places where we
- cannot make function calls.
-
- - hp_timing_t: This is the type for variables used to store the time
- values.
-
- - HP_TIMING_ZERO: clear `hp_timing_t' object.
-
- - HP_TIMING_NOW: place timestamp for current time in variable given as
- parameter.
-
- - HP_TIMING_DIFF_INIT: do whatever is necessary to be able to use the
- HP_TIMING_DIFF macro.
-
- - HP_TIMING_DIFF: compute difference between two times and store it
- in a third. Source and destination might overlap.
-
- - HP_TIMING_ACCUM: add time difference to another variable. This might
- be a bit more complicated to implement for some platforms as the
- operation should be thread-safe and 64bit arithmetic on 32bit platforms
- is not.
-
- - HP_TIMING_ACCUM_NT: this is the variant for situations where we know
- there are no threads involved.
-
- - HP_TIMING_PRINT: write decimal representation of the timing value into
- the given string. This operation need not be inline even though
- HP_TIMING_INLINE is specified.
-
-*/
-
-/* Provide dummy definitions. */
-#define HP_TIMING_AVAIL (0)
-#define HP_TIMING_INLINE (0)
-typedef int hp_timing_t;
-#define HP_TIMING_ZERO(Var)
-#define HP_TIMING_NOW(var)
-#define HP_TIMING_DIFF_INIT()
-#define HP_TIMING_DIFF(Diff, Start, End)
-#define HP_TIMING_ACCUM(Sum, Diff)
-#define HP_TIMING_ACCUM_NT(Sum, Diff)
-#define HP_TIMING_PRINT(Buf, Len, Val)
-
-/* Since this implementation is not available we tell the user about it. */
-#define HP_TIMING_NONAVAIL 1
-
-#endif /* hp-timing.h */
diff --git a/newlib/libc/sys/linux/machine/i386/Makefile.am b/newlib/libc/sys/linux/machine/i386/Makefile.am
deleted file mode 100644
index 4a49d8fe0..000000000
--- a/newlib/libc/sys/linux/machine/i386/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = get_clockfreq.c getpagesize.c hp-timing.c setjmp.S sigaction.c dl-procinfo.c
-
-liblinuxi386_la_LDFLAGS = -Xcompiler -nostdlib
-
-if USE_LIBTOOL
-noinst_LTLIBRARIES = liblinuxi386.la
-liblinuxi386_la_SOURCES = $(LIB_SOURCES)
-noinst_DATA = objectlist.awk.in
-else
-noinst_LIBRARIES = lib.a
-lib_a_SOURCES = $(LIB_SOURCES)
-noinst_DATA =
-endif # USE_LIBTOOL
-
-include $(srcdir)/../../../../../Makefile.shared
-
-all: crt0.o
-
-AM_CFLAGS = -I$(srcdir)/../..
-ACLOCAL_AMFLAGS = -I ../../../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/linux/machine/i386/Makefile.in b/newlib/libc/sys/linux/machine/i386/Makefile.in
deleted file mode 100644
index c740a00c4..000000000
--- a/newlib/libc/sys/linux/machine/i386/Makefile.in
+++ /dev/null
@@ -1,413 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-AWK = @AWK@
-CC = @CC@
-CPP = @CPP@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-EXEEXT = @EXEEXT@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = get_clockfreq.c getpagesize.c hp-timing.c setjmp.S sigaction.c dl-procinfo.c
-
-liblinuxi386_la_LDFLAGS = -Xcompiler -nostdlib
-
-@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = liblinuxi386.la
-@USE_LIBTOOL_TRUE@liblinuxi386_la_SOURCES = $(LIB_SOURCES)
-@USE_LIBTOOL_TRUE@noinst_DATA = objectlist.awk.in
-@USE_LIBTOOL_FALSE@noinst_DATA =
-@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
-@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
-
-AM_CFLAGS = -I$(srcdir)/../..
-ACLOCAL_AMFLAGS = -I ../../../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-@USE_LIBTOOL_FALSE@lib_a_OBJECTS = get_clockfreq.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@getpagesize.$(OBJEXT) hp-timing.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@setjmp.$(OBJEXT) sigaction.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@dl-procinfo.$(OBJEXT)
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-
-liblinuxi386_la_LIBADD =
-@USE_LIBTOOL_TRUE@liblinuxi386_la_OBJECTS = get_clockfreq.lo \
-@USE_LIBTOOL_TRUE@getpagesize.lo hp-timing.lo setjmp.lo sigaction.lo \
-@USE_LIBTOOL_TRUE@dl-procinfo.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DATA = $(noinst_DATA)
-
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES) $(liblinuxi386_la_SOURCES)
-OBJECTS = $(lib_a_OBJECTS) $(liblinuxi386_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/../../../../../Makefile.shared
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../../../acinclude.m4 ../../../../../aclocal.m4 \
- ../../../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-mostlyclean-noinstLTLIBRARIES:
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-liblinuxi386.la: $(liblinuxi386_la_OBJECTS) $(liblinuxi386_la_DEPENDENCIES)
- $(LINK) $(liblinuxi386_la_LDFLAGS) $(liblinuxi386_la_OBJECTS) $(liblinuxi386_la_LIBADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-noinstLTLIBRARIES \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-libtool \
- clean-noinstLTLIBRARIES clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-libtool distclean-noinstLTLIBRARIES \
- distclean-tags distclean-generic clean-am
- -rm -f libtool
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool mostlyclean-noinstLTLIBRARIES \
-distclean-noinstLTLIBRARIES clean-noinstLTLIBRARIES \
-maintainer-clean-noinstLTLIBRARIES tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-objectlist.awk.in: $(noinst_LTLIBRARIES)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
- do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
- done
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/linux/machine/i386/aclocal.m4 b/newlib/libc/sys/linux/machine/i386/aclocal.m4
deleted file mode 100644
index c0a206827..000000000
--- a/newlib/libc/sys/linux/machine/i386/aclocal.m4
+++ /dev/null
@@ -1,1223 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
-
-# serial 46 AC_PROG_LIBTOOL
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
- AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [AC_LIBTOOL_CXX],
- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
- AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [ifdef([AC_PROG_GCJ],
- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([A][M_PROG_GCJ],
- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([LT_AC_PROG_GCJ],
- [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])])])])])
-
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- AC_PATH_MAGIC
- fi
- ;;
-esac
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
-[libtool_flags="$libtool_flags --enable-dlopen"])
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-AC_ARG_WITH(pic,
- [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
- pic_mode="$withval", pic_mode=default)
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_SAVE
- AC_LANG_C
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_RESTORE])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
- [AC_TRY_LINK([],
- [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);],
- [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
- [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
- ])
-esac
-])
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_LIBTOOL_PICMODE - implement the --with-pic flag
-# Usage: AC_LIBTOOL_PICMODE[(MODE)]
-# Where MODE is either `yes' or `no'. If omitted, it defaults to
-# `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)])
-
-
-# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="ifelse([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-])
-
-
-# AC_PATH_MAGIC - find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
-AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])
-
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- re_direlt=['/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])
-
-# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
-[lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-])
-
-# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependant libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.[012])
- lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd* )
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- ia64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
- else
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
- fi
- ;;
-
-newsos6)
- [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-[sysv5uw[78]* | sysv4*uw2*)]
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-])
-
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
- ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-convenience to the
-# configure arguments. Note that LIBLTDL and INCLTDL are not
-# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
-# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
-# with '${top_builddir}/' and INCLTDL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!). If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case $enable_ltdl_convenience in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-install to the configure
-# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
-# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
-# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
-# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
-# with '${top_srcdir}/' (note the single quotes!). If your package is
-# not flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
- fi
-])
-
-# If this macro is not defined by Autoconf, define it here.
-ifdef([AC_PROVIDE_IFELSE],
- [],
- [define([AC_PROVIDE_IFELSE],
- [ifdef([AC_PROVIDE_$1],
- [$2], [$3])])])
-
-# AC_LIBTOOL_CXX - enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
-
-AC_DEFUN([_AC_LIBTOOL_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([AC_PROG_CXXCPP])
-LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
-lt_save_CC="$CC"
-lt_save_CFLAGS="$CFLAGS"
-dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
-dnl is set to the C++ compiler.
-AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
-CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-# AC_LIBTOOL_GCJ - enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
-
-AC_DEFUN([_AC_LIBTOOL_GCJ],
-[AC_REQUIRE([AC_PROG_LIBTOOL])
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
- [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
- [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
- [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
-lt_save_CC="$CC"
-lt_save_CFLAGS="$CFLAGS"
-dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
-dnl is set to the C++ compiler.
-AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
-CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-])
-
-dnl old names
-AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
-
-dnl This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])dnl
-
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)
-])
-
diff --git a/newlib/libc/sys/linux/machine/i386/configure b/newlib/libc/sys/linux/machine/i386/configure
deleted file mode 100755
index bad36c30f..000000000
--- a/newlib/libc/sys/linux/machine/i386/configure
+++ /dev/null
@@ -1,3343 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-shared[=PKGS] build shared libraries [default=yes]"
-ac_help="$ac_help
- --enable-static[=PKGS] build static libraries [default=yes]"
-ac_help="$ac_help
- --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
-ac_help="$ac_help
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
-ac_help="$ac_help
- --disable-libtool-lock avoid locking (might break parallel builds)"
-ac_help="$ac_help
- --with-pic try to use only PIC/non-PIC objects [default=use both]"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=crt0.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../../../.. $srcdir/../../../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../../../.. $srcdir/../../../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:590: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:643: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:700: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:733: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 738 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:766: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 771 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:948: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:969: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:987: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1030: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1043: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1056: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1069: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1082: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1107: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1137: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1186: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1210: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1241: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1273: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1305: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1337: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1382: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1436: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1470: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-
-if test "${use_libtool}" = "yes"; then
-
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_shared=yes
-fi
-
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
- enableval="$enable_static"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_static=yes
-fi
-
-# Check whether --enable-fast-install or --disable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
- enableval="$enable_fast_install"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_fast_install=yes
-fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1656: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1686: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1737: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1769: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 1780 "configure"
-#include "confdefs.h"
-
-main(){return(0);}
-EOF
-if { (eval echo configure:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1811: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1816: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-else
- GCC=
-fi
-
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1844: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1887: checking for ld used by GCC" >&5
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1917: checking for GNU ld" >&5
-else
- echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1920: checking for non-GNU ld" >&5
-fi
-if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
-echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1955: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi
-fi
-
-echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1972: checking for $LD option to reload object files" >&5
-if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-
-echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-
-echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1984: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi
-fi
-
-NM="$lt_cv_path_NM"
-echo "$ac_t""$NM" 1>&6
-
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:2022: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
-else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:2043: checking how to recognise dependant libraries" >&5
-if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.012)
- lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
-
-freebsd* )
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
- fi
- ;;
-
-newsos6)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-sysv5uw[78]* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-
-fi
-
-echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-
-echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:2216: checking for object suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- for ac_file in conftest.*; do
- case $ac_file in
- *.c) ;;
- *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
- esac
- done
-else
- { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_objext" 1>&6
-OBJEXT=$ac_cv_objext
-ac_objext=$ac_cv_objext
-
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:2246: checking for ${ac_tool_prefix}file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:2308: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$ac_t""$MAGIC_CMD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2379: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2411: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2446: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_STRIP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2478: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="strip"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
-fi
-fi
-STRIP="$ac_cv_prog_STRIP"
-if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- STRIP=":"
-fi
-fi
-
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-
-libtool_flags="$libtool_flags --enable-win32-dll"
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
- :
-fi
-
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
-else
- pic_mode=default
-fi
-
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 2545 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2583: checking whether the C compiler needs -belf" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
-
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
- cat > conftest.$ac_ext <<EOF
-#line 2596 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_needs_belf=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_needs_belf=no
-fi
-rm -f conftest*
- ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-fi
-
-echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2633: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_DLLTOOL"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2665: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_DLLTOOL="dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- DLLTOOL="false"
-fi
-fi
-
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2700: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AS"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2732: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AS="false"
-fi
-fi
-
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2767: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_OBJDUMP"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2799: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_OBJDUMP="objdump"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
-fi
-fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
-if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- OBJDUMP="false"
-fi
-fi
-
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
-echo "configure:2835: checking if libtool should supply DllMain function" >&5
-if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2840 "configure"
-#include "confdefs.h"
-
-int main() {
-extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);
-; return 0; }
-EOF
-if { (eval echo configure:2848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_need_dllmain=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_need_dllmain=yes
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_need_dllmain" 1>&6
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
-echo "configure:2869: checking how to link DLLs" >&5
-if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 2874 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- lt_cv_cc_dll_switch=-mdll
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- lt_cv_cc_dll_switch=-dll
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
-
-esac
-
-
-# Save cache, so that ltconfig can load it
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
-
-# Reload cache, that may have been modified by ltconfig
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-
-
-
-
-
-
-for ac_prog in mawk gawk nawk awk
-do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2995: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AWK="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AWK="$ac_cv_prog_AWK"
-if test -n "$AWK"; then
- echo "$ac_t""$AWK" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-test -n "$AWK" && break
-done
-
-fi
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-s%@LN_S@%$LN_S%g
-s%@STRIP@%$STRIP%g
-s%@DLLTOOL@%$DLLTOOL%g
-s%@OBJDUMP@%$OBJDUMP%g
-s%@LIBTOOL@%$LIBTOOL%g
-s%@AWK@%$AWK%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/linux/machine/i386/configure.in b/newlib/libc/sys/linux/machine/i386/configure.in
deleted file mode 100644
index 9d068f804..000000000
--- a/newlib/libc/sys/linux/machine/i386/configure.in
+++ /dev/null
@@ -1,22 +0,0 @@
-dnl This is the newlib/libc/sys/linux/machine/i386 configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(crt0.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../../../..)
-
-NEWLIB_CONFIGURE(../../../../..)
-
-dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
-dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
-dnl line of the macro which fail because appropriate LDFLAGS are not set.
-
-if test "${use_libtool}" = "yes"; then
-AC_LIBTOOL_WIN32_DLL
-AM_PROG_LIBTOOL
-AC_PROG_AWK
-fi
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/linux/machine/i386/crt0.c b/newlib/libc/sys/linux/machine/i386/crt0.c
deleted file mode 100644
index 4364f61d4..000000000
--- a/newlib/libc/sys/linux/machine/i386/crt0.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* libc/sys/linux/crt0.c - Run-time initialization */
-
-/* FIXME: This should be rewritten in assembler and
- placed in a subdirectory specific to a platform.
- There should also be calls to run constructors. */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#include <stdlib.h>
-#include <time.h>
-#include <string.h>
-
-
-extern char **environ;
-
-extern int main(int argc,char **argv,char **envp);
-
-extern char _end;
-extern char __bss_start;
-
-void _start(int args)
-{
- /*
- * The argument block begins above the current stack frame, because we
- * have no return address. The calculation assumes that sizeof(int) ==
- * sizeof(void *). This is okay for i386 user space, but may be invalid in
- * other cases.
- */
- int *params = &args-1;
- int argc = *params;
- char **argv = (char **) (params+1);
-
- environ = argv+argc+1;
-
- /* Note: do not clear the .bss section. When running with shared
- * libraries, certain data items such __mb_cur_max or environ
- * may get placed in the .bss, even though they are initialized
- * to non-zero values. Clearing the .bss will end up zeroing
- * out their initial values. The .bss is already initialized
- * by this time by Linux. */
-
- tzset(); /* initialize timezone info */
- exit(main(argc,argv,environ));
-}
diff --git a/newlib/libc/sys/linux/machine/i386/dl-machine.h b/newlib/libc/sys/linux/machine/i386/dl-machine.h
deleted file mode 100644
index 80757e89a..000000000
--- a/newlib/libc/sys/linux/machine/i386/dl-machine.h
+++ /dev/null
@@ -1,420 +0,0 @@
-/* Machine-dependent ELF dynamic relocation inline functions. i386 version.
- Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef dl_machine_h
-#define dl_machine_h
-
-#define ELF_MACHINE_NAME "i386"
-
-#include <sys/param.h>
-#include <machine/weakalias.h>
-
-/* Return nonzero iff ELF header is compatible with the running host. */
-static inline int __attribute__ ((unused))
-elf_machine_matches_host (const Elf32_Ehdr *ehdr)
-{
- return ehdr->e_machine == EM_386;
-}
-
-
-/* Return the link-time address of _DYNAMIC. Conveniently, this is the
- first element of the GOT. This must be inlined in a function which
- uses global data. */
-static inline Elf32_Addr __attribute__ ((unused))
-elf_machine_dynamic (void)
-{
- register Elf32_Addr *got asm ("%ebx");
- return *got;
-}
-
-
-/* Return the run-time load address of the shared object. */
-static inline Elf32_Addr __attribute__ ((unused))
-elf_machine_load_address (void)
-{
- Elf32_Addr addr;
- asm ("leal _dl_start@GOTOFF(%%ebx), %0\n"
- "subl _dl_start@GOT(%%ebx), %0"
- : "=r" (addr) : : "cc");
- return addr;
-}
-
-#if !defined PROF && !__BOUNDED_POINTERS__
-/* We add a declaration of this function here so that in dl-runtime.c
- the ELF_MACHINE_RUNTIME_TRAMPOLINE macro really can pass the parameters
- in registers.
-
- We cannot use this scheme for profiling because the _mcount call
- destroys the passed register information. */
-/* GKM FIXME: Fix trampoline to pass bounds so we can do
- without the `__unbounded' qualifier. */
-static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset)
- __attribute__ ((regparm (2), unused));
-static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset,
- ElfW(Addr) retaddr)
- __attribute__ ((regparm (3), unused));
-#endif
-
-/* Set up the loaded object described by L so its unrelocated PLT
- entries will jump to the on-demand fixup code in dl-runtime.c. */
-
-static inline int __attribute__ ((unused))
-elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
-{
- Elf32_Addr *got;
- extern void _dl_runtime_resolve (Elf32_Word);
- extern void _dl_runtime_profile (Elf32_Word);
-
- if (l->l_info[DT_JMPREL] && lazy)
- {
- /* The GOT entries for functions in the PLT have not yet been filled
- in. Their initial contents will arrange when called to push an
- offset into the .rel.plt section, push _GLOBAL_OFFSET_TABLE_[1],
- and then jump to _GLOBAL_OFFSET_TABLE[2]. */
- got = (Elf32_Addr *) D_PTR (l, l_info[DT_PLTGOT]);
- got[1] = (Elf32_Addr) l; /* Identify this shared object. */
-
- /* The got[2] entry contains the address of a function which gets
- called to get the address of a so far unresolved function and
- jump to it. The profiling extension of the dynamic linker allows
- to intercept the calls to collect information. In this case we
- don't store the address in the GOT so that all future calls also
- end in this function. */
- if (__builtin_expect (profile, 0))
- {
- got[2] = (Elf32_Addr) &_dl_runtime_profile;
-
- if (_dl_name_match_p (_dl_profile, l))
- /* This is the object we are looking for. Say that we really
- want profiling and the timers are started. */
- _dl_profile_map = l;
- }
- else
- /* This function will get called to fix up the GOT entry indicated by
- the offset on the stack, and then jump to the resolved address. */
- got[2] = (Elf32_Addr) &_dl_runtime_resolve;
- }
-
- return lazy;
-}
-
-/* This code is used in dl-runtime.c to call the `fixup' function
- and then redirect to the address it returns. */
-#if !defined PROF && !__BOUNDED_POINTERS__
-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\
- .text\n\
- .globl _dl_runtime_resolve\n\
- .type _dl_runtime_resolve, @function\n\
- .align 16\n\
-_dl_runtime_resolve:\n\
- pushl %eax # Preserve registers otherwise clobbered.\n\
- pushl %ecx\n\
- pushl %edx\n\
- movl 16(%esp), %edx # Copy args pushed by PLT in register. Note\n\
- movl 12(%esp), %eax # that `fixup' takes its parameters in regs.\n\
- call fixup # Call resolver.\n\
- popl %edx # Get register content back.\n\
- popl %ecx\n\
- xchgl %eax, (%esp) # Get %eax contents end store function address.\n\
- ret $8 # Jump to function address.\n\
- .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
-\n\
- .globl _dl_runtime_profile\n\
- .type _dl_runtime_profile, @function\n\
- .align 16\n\
-_dl_runtime_profile:\n\
- pushl %eax # Preserve registers otherwise clobbered.\n\
- pushl %ecx\n\
- pushl %edx\n\
- movl 20(%esp), %ecx # Load return address\n\
- movl 16(%esp), %edx # Copy args pushed by PLT in register. Note\n\
- movl 12(%esp), %eax # that `fixup' takes its parameters in regs.\n\
- call profile_fixup # Call resolver.\n\
- popl %edx # Get register content back.\n\
- popl %ecx\n\
- xchgl %eax, (%esp) # Get %eax contents end store function address.\n\
- ret $8 # Jump to function address.\n\
- .size _dl_runtime_profile, .-_dl_runtime_profile\n\
- .previous\n\
-");
-#else
-# define ELF_MACHINE_RUNTIME_TRAMPOLINE asm ("\n\
- .text\n\
- .globl _dl_runtime_resolve\n\
- .globl _dl_runtime_profile\n\
- .type _dl_runtime_resolve, @function\n\
- .type _dl_runtime_profile, @function\n\
- .align 16\n\
-_dl_runtime_resolve:\n\
-_dl_runtime_profile:\n\
- pushl %eax # Preserve registers otherwise clobbered.\n\
- pushl %ecx\n\
- pushl %edx\n\
- movl 16(%esp), %edx # Push the arguments for `fixup'\n\
- movl 12(%esp), %eax\n\
- pushl %edx\n\
- pushl %eax\n\
- call fixup # Call resolver.\n\
- popl %edx # Pop the parameters\n\
- popl %ecx\n\
- popl %edx # Get register content back.\n\
- popl %ecx\n\
- xchgl %eax, (%esp) # Get %eax contents end store function address.\n\
- ret $8 # Jump to function address.\n\
- .size _dl_runtime_resolve, .-_dl_runtime_resolve\n\
- .size _dl_runtime_profile, .-_dl_runtime_profile\n\
- .previous\n\
-");
-#endif
-
-/* Mask identifying addresses reserved for the user program,
- where the dynamic linker should not map anything. */
-#define ELF_MACHINE_USER_ADDRESS_MASK 0xf8000000UL
-
-/* Initial entry point code for the dynamic linker.
- The C function `_dl_start' is the real entry point;
- its return value is the user program's entry point. */
-
-#define RTLD_START asm ("\n\
- .text\n\
- .align 16\n\
-0: movl (%esp), %ebx\n\
- ret\n\
- .align 16\n\
-.globl _start\n\
-.globl _dl_start_user\n\
-_start:\n\
- pushl %esp\n\
- call _dl_start\n\
- popl %ebx\n\
-_dl_start_user:\n\
- # Save the user entry point address in %edi.\n\
- movl %eax, %edi\n\
- # Point %ebx at the GOT.\n\
- call 0b\n\
- addl $_GLOBAL_OFFSET_TABLE_, %ebx\n\
- # Store the highest stack address\n\
- movl __libc_stack_end@GOT(%ebx), %eax\n\
- movl %esp, (%eax)\n\
- # See if we were run as a command with the executable file\n\
- # name as an extra leading argument.\n\
- movl _dl_skip_args@GOT(%ebx), %eax\n\
- movl (%eax), %eax\n\
- # Pop the original argument count.\n\
- popl %edx\n\
- # Adjust the stack pointer to skip _dl_skip_args words.\n\
- leal (%esp,%eax,4), %esp\n\
- # Subtract _dl_skip_args from argc.\n\
- subl %eax, %edx\n\
- # Push argc back on the stack.\n\
- push %edx\n\
- # The special initializer gets called with the stack just\n\
- # as the application's entry point will see it; it can\n\
- # switch stacks if it moves these contents over.\n\
-" RTLD_START_SPECIAL_INIT "\n\
- # Load the parameters again.\n\
- # (eax, edx, ecx, *--esp) = (_dl_loaded, argc, argv, envp)\n\
- movl _dl_loaded@GOT(%ebx), %esi\n\
- leal 8(%esp,%edx,4), %eax\n\
- leal 4(%esp), %ecx\n\
- pushl %eax\n\
- movl (%esi), %eax\n\
- # Call the function to run the initializers.\n\
- call _dl_init@PLT\n\
- # Pass our finalizer function to the user in %edx, as per ELF ABI.\n\
- movl _dl_fini@GOT(%ebx), %edx\n\
- # Jump to the user's entry point.\n\
- jmp *%edi\n\
- .previous\n\
-");
-
-#ifndef RTLD_START_SPECIAL_INIT
-#define RTLD_START_SPECIAL_INIT /* nothing */
-#endif
-
-/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
- PLT entries should not be allowed to define the value.
- ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
- of the main executable's symbols, as for a COPY reloc. */
-#define elf_machine_type_class(type) \
- ((((type) == R_386_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
- | (((type) == R_386_COPY) * ELF_RTYPE_CLASS_COPY))
-
-/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
-#define ELF_MACHINE_JMP_SLOT R_386_JMP_SLOT
-
-/* The i386 never uses Elf32_Rela relocations. */
-#define ELF_MACHINE_NO_RELA 1
-
-/* We define an initialization functions. This is called very early in
- _dl_sysdep_start. */
-#define DL_PLATFORM_INIT dl_platform_init ()
-
-extern const char *_dl_platform;
-
-static inline void __attribute__ ((unused))
-dl_platform_init (void)
-{
- if (_dl_platform != NULL && *_dl_platform == '\0')
- /* Avoid an empty string which would disturb us. */
- _dl_platform = NULL;
-}
-
-static inline Elf32_Addr
-elf_machine_fixup_plt (struct link_map *map, lookup_t t,
- const Elf32_Rel *reloc,
- Elf32_Addr *reloc_addr, Elf32_Addr value)
-{
- return *reloc_addr = value;
-}
-
-/* Return the final value of a plt relocation. */
-static inline Elf32_Addr
-elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc,
- Elf32_Addr value)
-{
- return value;
-}
-
-static inline void __attribute__ ((unused))
-elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
- const Elf32_Sym *sym, const struct r_found_version *version,
- Elf32_Addr *const reloc_addr,
- struct r_scope_elem *scope[]);
-
-static inline void __attribute__ ((unused))
-elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
- Elf32_Addr *const reloc_addr);
-
-static inline void
-elf_machine_lazy_rel (struct link_map *map,
- Elf32_Addr l_addr, const Elf32_Rel *reloc);
-
-#endif /* !dl_machine_h */
-
-#ifdef RESOLVE
-
-/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
- MAP is the object containing the reloc. */
-
-static inline void __attribute__ ((unused))
-elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
- const Elf32_Sym *sym, const struct r_found_version *version,
- Elf32_Addr *const reloc_addr,
- struct r_scope_elem *scope[])
-{
- const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
-
-#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
- if (__builtin_expect (r_type == R_386_RELATIVE, 0))
- {
-# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
- /* This is defined in rtld.c, but nowhere in the static libc.a;
- make the reference weak so static programs can still link.
- This declaration cannot be done when compiling rtld.c
- (i.e. #ifdef RTLD_BOOTSTRAP) because rtld.c contains the
- common defn for _dl_rtld_map, which is incompatible with a
- weak decl in the same file. */
- #pragma weak _dl_rtld_map
- if (map != &_dl_rtld_map) /* Already done in rtld itself. */
-# endif
- *reloc_addr += map->l_addr;
- }
-# ifndef RTLD_BOOTSTRAP
- else if (__builtin_expect (r_type == R_386_NONE, 0))
- return;
-# endif
- else
-#endif
- {
-#ifndef RTLD_BOOTSTRAP
- const Elf32_Sym *const refsym = sym;
-#endif
- /* String table object symbols. */
- const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
- Elf32_Addr value = RESOLVE (&sym, version, r_type, scope);
- if (sym)
- value += sym->st_value;
-
-#ifdef RTLD_BOOTSTRAP
- assert (r_type == R_386_GLOB_DAT || r_type == R_386_JMP_SLOT);
- *reloc_addr = value;
-#else
- switch (r_type)
- {
- case R_386_GLOB_DAT:
- case R_386_JMP_SLOT:
- *reloc_addr = value;
- break;
- case R_386_32:
- *reloc_addr += value;
- break;
- case R_386_PC32:
- *reloc_addr += (value - (Elf32_Addr) reloc_addr);
- break;
- case R_386_COPY:
- if (sym == NULL)
- /* This can happen in trace mode if an object could not be
- found. */
- break;
- if (__builtin_expect (sym->st_size > refsym->st_size, 0)
- || (__builtin_expect (sym->st_size < refsym->st_size, 0)
- && _dl_verbose))
- {
- const char *strtab;
-
- strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]);
- _dl_error_printf ("\
-%s: Symbol `%s' has different size in shared object, consider re-linking\n",
- _dl_argv[0] ?: "<program name unknown>",
- strtab + refsym->st_name);
- }
- memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
- refsym->st_size));
- break;
- default:
- _dl_reloc_bad_type (map, r_type, 0);
- break;
- }
-#endif
- }
-}
-
-static inline void __attribute__ ((unused))
-elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
- Elf32_Addr *const reloc_addr)
-{
- assert (ELF32_R_TYPE (reloc->r_info) == R_386_RELATIVE);
- *reloc_addr += l_addr;
-}
-
-static inline void
-elf_machine_lazy_rel (struct link_map *map,
- Elf32_Addr l_addr, const Elf32_Rel *reloc)
-{
- Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
- const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
- /* Check for unexpected PLT reloc type. */
- if (__builtin_expect (r_type == R_386_JMP_SLOT, 1))
- *reloc_addr += l_addr;
- else
- _dl_reloc_bad_type (map, r_type, 1);
-}
-
-#endif /* RESOLVE */
diff --git a/newlib/libc/sys/linux/machine/i386/dl-procinfo.c b/newlib/libc/sys/linux/machine/i386/dl-procinfo.c
deleted file mode 100644
index 75732b4e4..000000000
--- a/newlib/libc/sys/linux/machine/i386/dl-procinfo.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Data for Linux/i386 version of processor capability information.
- Copyright (C) 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* This information must be kept in sync with the _DL_HWCAP_COUNT and
- _DL_PLATFORM_COUNT definitions in procinfo.h. */
-
-
-/* If anything should be added here check whether the size of each string
- is still ok with the given array size. */
-const char _dl_x86_cap_flags[][7] =
- {
- "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce",
- "cx8", "apic", "10", "sep", "mtrr", "pge", "mca", "cmov",
- "pat", "pse36", "psn", "19", "20", "21", "22", "mmx",
- "osfxsr", "xmm", "xmm2", "27", "28", "29", "30", "amd3d"
- };
-
-const char _dl_x86_platforms[][5] =
- {
- "i386", "i486", "i586", "i686"
- };
diff --git a/newlib/libc/sys/linux/machine/i386/dl-procinfo.h b/newlib/libc/sys/linux/machine/i386/dl-procinfo.h
deleted file mode 100644
index d1658fafd..000000000
--- a/newlib/libc/sys/linux/machine/i386/dl-procinfo.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/* Linux/i386 version of processor capability information handling macros.
- Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _DL_PROCINFO_H
-#define _DL_PROCINFO_H 1
-
-#include <ldsodefs.h>
-
-/* If anything should be added here check whether the size of each string
- is still ok with the given array size. */
-extern const char _dl_x86_cap_flags[][7];
-#define _DL_HWCAP_COUNT 32
-
-extern const char _dl_x86_platforms[][5];
-#define _DL_PLATFORMS_COUNT 4
-
-/* Start at 48 to reserve some space. */
-#define _DL_FIRST_PLATFORM 48
-/* Mask to filter out platforms. */
-#define _DL_HWCAP_PLATFORM (7ULL << _DL_FIRST_PLATFORM)
-
-
-static inline int
-__attribute__ ((unused))
-_dl_procinfo (int word)
-{
- /* This table should match the information from arch/i386/kernel/setup.c
- in the kernel sources. */
- int i;
-
- _dl_printf ("AT_HWCAP: ");
-
- for (i = 0; i < _DL_HWCAP_COUNT; ++i)
- if (word & (1 << i))
- _dl_printf (" %s", _dl_x86_cap_flags[i]);
-
- _dl_printf ("\n");
-
- return 0;
-}
-
-static inline const char *
-__attribute__ ((unused))
-_dl_hwcap_string (int idx)
-{
- return _dl_x86_cap_flags[idx];
-};
-
-static inline const char *
-__attribute__ ((unused))
-_dl_platform_string (int idx)
-{
- return _dl_x86_platforms [idx - _DL_FIRST_PLATFORM];
-};
-
-enum
-{
- HWCAP_I386_FPU = 1 << 0,
- HWCAP_I386_VME = 1 << 1,
- HWCAP_I386_DE = 1 << 2,
- HWCAP_I386_PSE = 1 << 3,
- HWCAP_I386_TSC = 1 << 4,
- HWCAP_I386_MSR = 1 << 5,
- HWCAP_I386_PAE = 1 << 6,
- HWCAP_I386_MCE = 1 << 7,
- HWCAP_I386_CX8 = 1 << 8,
- HWCAP_I386_APIC = 1 << 9,
- HWCAP_I386_SEP = 1 << 11,
- HWCAP_I386_MTRR = 1 << 12,
- HWCAP_I386_PGE = 1 << 13,
- HWCAP_I386_MCA = 1 << 14,
- HWCAP_I386_CMOV = 1 << 15,
- HWCAP_I386_FCMOV = 1 << 16,
- HWCAP_I386_MMX = 1 << 23,
- HWCAP_I386_OSFXSR = 1 << 24,
- HWCAP_I386_XMM = 1 << 25,
- HWCAP_I386_XMM2 = 1 << 26,
- HWCAP_I386_AMD3D = 1 << 31,
-
- /* XXX Which others to add here? */
- HWCAP_IMPORTANT = (HWCAP_I386_MMX)
-
-};
-
-static inline int
-__attribute__ ((unused))
-_dl_string_hwcap (const char *str)
-{
- int i;
-
- for (i = 0; i < _DL_HWCAP_COUNT; i++)
- {
- if (strcmp (str, _dl_x86_cap_flags[i]) == 0)
- return i;
- }
- return -1;
-};
-
-
-static inline int
-__attribute__ ((unused))
-_dl_string_platform (const char *str)
-{
- int i;
-
- if (str != NULL)
- for (i = 0; i < _DL_PLATFORMS_COUNT; ++i)
- {
- if (strcmp (str, _dl_x86_platforms[i]) == 0)
- return _DL_FIRST_PLATFORM + i;
- }
- return -1;
-};
-
-#endif /* dl-procinfo.h */
diff --git a/newlib/libc/sys/linux/machine/i386/get_clockfreq.c b/newlib/libc/sys/linux/machine/i386/get_clockfreq.c
deleted file mode 100644
index ea46ed427..000000000
--- a/newlib/libc/sys/linux/machine/i386/get_clockfreq.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/* Get frequency of the system processor. i386/Linux version.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <ctype.h>
-#include <fcntl.h>
-#include <string.h>
-#include <unistd.h>
-#include <libc-internal.h>
-
-static
-void *memmem (const void *a, size_t len1, const void *b, size_t len2)
-{
- char *end, *start;
- char *ptr1, *ptr2;
-
- if (len2 > len1)
- return NULL;
-
- start = (char *)a;
- end = start + len1;
-
- while (start < end)
- {
- size_t len = len2;
- ptr1 = start;
- ptr2 = (char *)b;
- while (len > 0 && *ptr1++ == *ptr2++)
- --len;
- if (len == 0)
- return start;
- ++start;
- }
-
- return NULL;
-}
-
-hp_timing_t
-__get_clockfreq (void)
-{
- /* We read the information from the /proc filesystem. It contains at
- least one line like
- cpu MHz : 497.840237
- or also
- cpu MHz : 497.841
- We search for this line and convert the number in an integer. */
- static hp_timing_t result;
- int fd;
-
- /* If this function was called before, we know the result. */
- if (result != 0)
- return result;
-
- fd = open ("/proc/cpuinfo", O_RDONLY);
- if (__builtin_expect (fd != -1, 1))
- {
- /* XXX AFAIK the /proc filesystem can generate "files" only up
- to a size of 4096 bytes. */
- char buf[4096];
- ssize_t n;
-
- n = read (fd, buf, sizeof buf);
- if (__builtin_expect (n, 1) > 0)
- {
- char *mhz = memmem (buf, n, "cpu MHz", 7);
-
- if (__builtin_expect (mhz != NULL, 1))
- {
- char *endp = buf + n;
- int seen_decpoint = 0;
- int ndigits = 0;
-
- /* Search for the beginning of the string. */
- while (mhz < endp && (*mhz < '0' || *mhz > '9') && *mhz != '\n')
- ++mhz;
-
- while (mhz < endp && *mhz != '\n')
- {
- if (*mhz >= '0' && *mhz <= '9')
- {
- result *= 10;
- result += *mhz - '0';
- if (seen_decpoint)
- ++ndigits;
- }
- else if (*mhz == '.')
- seen_decpoint = 1;
-
- ++mhz;
- }
-
- /* Compensate for missing digits at the end. */
- while (ndigits++ < 6)
- result *= 10;
- }
- }
-
- close (fd);
- }
-
- return result;
-}
diff --git a/newlib/libc/sys/linux/machine/i386/getpagesize.c b/newlib/libc/sys/linux/machine/i386/getpagesize.c
deleted file mode 100644
index 3f80a7a38..000000000
--- a/newlib/libc/sys/linux/machine/i386/getpagesize.c
+++ /dev/null
@@ -1,6 +0,0 @@
-/* default pagesize */
-int __getpagesize ()
-{
- return 4096;
-}
-
diff --git a/newlib/libc/sys/linux/machine/i386/hp-timing.c b/newlib/libc/sys/linux/machine/i386/hp-timing.c
deleted file mode 100644
index c52099c73..000000000
--- a/newlib/libc/sys/linux/machine/i386/hp-timing.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Support for high precision, low overhead timing functions. i686 version.
- Copyright (C) 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <hp-timing.h>
-
-/* We have to define the variable for the overhead. */
-hp_timing_t __libc_hp_timing_overhead;
diff --git a/newlib/libc/sys/linux/machine/i386/hp-timing.h b/newlib/libc/sys/linux/machine/i386/hp-timing.h
deleted file mode 100644
index a34965ec8..000000000
--- a/newlib/libc/sys/linux/machine/i386/hp-timing.h
+++ /dev/null
@@ -1,187 +0,0 @@
-/* High precision, low overhead timing functions. i686 version.
- Copyright (C) 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Modified for newlib by Jeff Johnston - June 27, 2002 */
-
-#ifndef _HP_TIMING_H
-#define _HP_TIMING_H 1
-
-#include <string.h>
-#include <stdio.h>
-#include <sys/param.h>
-
-#ifdef __i686__
-
-/* The macros defined here use the timestamp counter in i586 and up versions
- of the x86 processors. They provide a very accurate way to measure the
- time with very little overhead. The time values themself have no real
- meaning, only differences are interesting.
-
- This version is for the i686 processors. The difference to the i586
- version is that the timerstamp register is unconditionally used. This is
- not the case for the i586 version where we have to perform runtime test
- whether the processor really has this capability. We have to make this
- distinction since the sysdeps/i386/i586 code is supposed to work on all
- platforms while the i686 already contains i686-specific code.
-
- The list of macros we need includes the following:
-
- - HP_TIMING_AVAIL: test for availability.
-
- - HP_TIMING_INLINE: this macro is non-zero if the functionality is not
- implemented using function calls but instead uses some inlined code
- which might simply consist of a few assembler instructions. We have to
- know this since we might want to use the macros here in places where we
- cannot make function calls.
-
- - hp_timing_t: This is the type for variables used to store the time
- values.
-
- - HP_TIMING_ZERO: clear `hp_timing_t' object.
-
- - HP_TIMING_NOW: place timestamp for current time in variable given as
- parameter.
-
- - HP_TIMING_DIFF_INIT: do whatever is necessary to be able to use the
- HP_TIMING_DIFF macro.
-
- - HP_TIMING_DIFF: compute difference between two times and store it
- in a third. Source and destination might overlap.
-
- - HP_TIMING_ACCUM: add time difference to another variable. This might
- be a bit more complicated to implement for some platforms as the
- operation should be thread-safe and 64bit arithmetic on 32bit platforms
- is not.
-
- - HP_TIMING_ACCUM_NT: this is the variant for situations where we know
- there are no threads involved.
-
- - HP_TIMING_PRINT: write decimal representation of the timing value into
- the given string. This operation need not be inline even though
- HP_TIMING_INLINE is specified.
-
-*/
-
-/* We always assume having the timestamp register. */
-#define HP_TIMING_AVAIL (1)
-
-/* We indeed have inlined functions. */
-#define HP_TIMING_INLINE (1)
-
-/* We use 64bit values for the times. */
-typedef unsigned long long int hp_timing_t;
-
-/* Internal variable used to store the overhead of the measurement
- opcodes. */
-extern hp_timing_t __libc_hp_timing_overhead;
-
-/* Set timestamp value to zero. */
-#define HP_TIMING_ZERO(Var) (Var) = (0)
-
-/* That's quite simple. Use the `rdtsc' instruction. Note that the value
- might not be 100% accurate since there might be some more instructions
- running in this moment. This could be changed by using a barrier like
- 'cpuid' right before the `rdtsc' instruciton. But we are not interested
- in accurate clock cycles here so we don't do this. */
-#define HP_TIMING_NOW(Var) __asm__ __volatile__ ("rdtsc" : "=A" (Var))
-
-/* Use two 'rdtsc' instructions in a row to find out how long it takes. */
-#define HP_TIMING_DIFF_INIT() \
- do { \
- int __cnt = 5; \
- __libc_hp_timing_overhead = ~0ull; \
- do \
- { \
- hp_timing_t __t1, __t2; \
- HP_TIMING_NOW (__t1); \
- HP_TIMING_NOW (__t2); \
- if (__t2 - __t1 < __libc_hp_timing_overhead) \
- __libc_hp_timing_overhead = __t2 - __t1; \
- } \
- while (--__cnt > 0); \
- } while (0)
-
-/* It's simple arithmetic for us. */
-#define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start))
-
-/* We have to jump through hoops to get this correctly implemented. */
-#define HP_TIMING_ACCUM(Sum, Diff) \
- do { \
- char __not_done; \
- hp_timing_t __oldval = (Sum); \
- hp_timing_t __diff = (Diff) - __libc_hp_timing_overhead; \
- do \
- { \
- hp_timing_t __newval = __oldval + __diff; \
- int __temp0, __temp1; \
- __asm__ __volatile__ ("xchgl %4, %%ebx\n\t" \
- "lock; cmpxchg8b %1\n\t" \
- "sete %0\n\t" \
- "movl %4, %%ebx" \
- : "=q" (__not_done), "=m" (Sum), \
- "=A" (__oldval), "=c" (__temp0), \
- "=SD" (__temp1) \
- : "1" (Sum), "2" (__oldval), \
- "3" (__newval >> 32), \
- "4" (__newval & 0xffffffff) \
- : "memory"); \
- } \
- while (__not_done); \
- } while (0)
-
-/* No threads, no extra work. */
-#define HP_TIMING_ACCUM_NT(Sum, Diff) (Sum) += (Diff)
-
-/* Print the time value. */
-#define HP_TIMING_PRINT(Buf, Len, Val) \
- do { \
- char __buf[20]; \
- char *__cp = __buf + sizeof (__buf); \
- int __len = (Len); \
- char *__dest = (Buf); \
- do { \
- *--__cp = Val % 10; \
- Val /= 10; \
- } while (Val > 0); \
- while (__len-- > 0 && __cp < __buf + sizeof (__buf)) \
- *__dest++ = *__cp++; \
- memcpy (__dest, " clock cycles", MIN (__len, sizeof (" clock cycles"))); \
- } while (0)
-
-#else /* !__i686__ */
-
-/* Provide dummy definitions. */
-#define HP_TIMING_AVAIL (0)
-#define HP_TIMING_INLINE (0)
-typedef int hp_timing_t;
-#define HP_TIMING_ZERO(Var)
-#define HP_TIMING_NOW(var)
-#define HP_TIMING_DIFF_INIT()
-#define HP_TIMING_DIFF(Diff, Start, End)
-#define HP_TIMING_ACCUM(Sum, Diff)
-#define HP_TIMING_ACCUM_NT(Sum, Diff)
-#define HP_TIMING_PRINT(Buf, Len, Val)
-
-/* Since this implementation is not available we tell the user about it. */
-#define HP_TIMING_NONAVAIL 1
-
-#endif
-
-#endif /* hp-timing.h */
diff --git a/newlib/libc/sys/linux/machine/i386/huge_val.h b/newlib/libc/sys/linux/machine/i386/huge_val.h
deleted file mode 100644
index 171517710..000000000
--- a/newlib/libc/sys/linux/machine/i386/huge_val.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* `HUGE_VAL' constants for ix86 (where it is infinity).
- Used by <stdlib.h> and <math.h> functions for overflow.
- Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <features.h>
-
-/* ISO C99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */
-
-# if __GNUC_PREREQ(2,96)
-
-# define HUGE_VALF (__extension__ 0x1.0p255f)
-# define HUGE_VALL (__extension__ 0x1.0p32767L)
-
-# else
-
-# define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f }
-
-# define __huge_valf_t union { unsigned char __c[4]; float __f; }
-# ifdef __GNUC__
-# define HUGE_VALF (__extension__ \
- ((__huge_valf_t) { __c: __HUGE_VALF_bytes }).__f)
-# else /* Not GCC. */
-static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes };
-# define HUGE_VALF (__huge_valf.__f)
-# endif /* GCC. */
-
-
-# define __HUGE_VALL_bytes { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 }
-
-# define __huge_vall_t union { unsigned char __c[12]; long double __ld; }
-# ifdef __GNUC__
-# define HUGE_VALL (__extension__ \
- ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld)
-# else /* Not GCC. */
-static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
-# define HUGE_VALL (__huge_vall.__ld)
-# endif /* GCC. */
-
-# endif /* GCC 2.95 */
-
diff --git a/newlib/libc/sys/linux/machine/i386/i386mach.h b/newlib/libc/sys/linux/machine/i386/i386mach.h
deleted file mode 100644
index 23c32190d..000000000
--- a/newlib/libc/sys/linux/machine/i386/i386mach.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* This file was based on the modified setjmp.S performed by
- * Joel Sherill (joel@OARcorp.com) which specified the use
- * of the __USER_LABEL_PREFIX__ and __REGISTER_PREFIX__ macros.
- **
- ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
- ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-/* These are predefined by new versions of GNU cpp. */
-
-#ifndef __USER_LABEL_PREFIX__
-#define __USER_LABEL_PREFIX__ _
-#endif
-
-#define __REG_PREFIX__ %
-
-/* ANSI concatenation macros. */
-
-#define CONCAT1(a, b) CONCAT2(a, b)
-#define CONCAT2(a, b) a##b
-
-/* Use the right prefix for global labels. */
-
-#define SYM(x) CONCAT1(__USER_LABEL_PREFIX__, x)
-
-/* Use the right prefix for registers. */
-
-#define REG(x) CONCAT1(__REG_PREFIX__, x)
-
-#define eax REG(eax)
-#define ebx REG(ebx)
-#define ecx REG(ecx)
-#define edx REG(edx)
-#define esi REG(esi)
-#define edi REG(edi)
-#define ebp REG(ebp)
-#define esp REG(esp)
-
-#define st0 REG(st)
-#define st1 REG(st(1))
-#define st2 REG(st(2))
-#define st3 REG(st(3))
-#define st4 REG(st(4))
-#define st5 REG(st(5))
-#define st6 REG(st(6))
-#define st7 REG(st(7))
-
-#define ax REG(ax)
-#define bx REG(bx)
-#define cx REG(cx)
-#define dx REG(dx)
-
-#define ah REG(ah)
-#define bh REG(bh)
-#define ch REG(ch)
-#define dh REG(dh)
-
-#define al REG(al)
-#define bl REG(bl)
-#define cl REG(cl)
-#define dl REG(dl)
-
-#define mm1 REG(mm1)
-#define mm2 REG(mm2)
-#define mm3 REG(mm3)
-#define mm4 REG(mm4)
-#define mm5 REG(mm5)
-#define mm6 REG(mm6)
-#define mm7 REG(mm7)
-
-#ifdef _I386MACH_NEED_SOTYPE_FUNCTION
-#define SOTYPE_FUNCTION(sym) .type SYM(sym),@function
-#else
-#define SOTYPE_FUNCTION(sym)
-#endif
-
-#ifdef _I386MACH_ALLOW_HW_INTERRUPTS
-#define __CLI
-#define __STI
-#else
-#define __CLI cli
-#define __STI sti
-#endif
diff --git a/newlib/libc/sys/linux/machine/i386/include/endian.h b/newlib/libc/sys/linux/machine/i386/include/endian.h
deleted file mode 100644
index aa9cd90a3..000000000
--- a/newlib/libc/sys/linux/machine/i386/include/endian.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 1987, 1991 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)endian.h 7.8 (Berkeley) 4/3/91
- * $Id$
- */
-
-#ifndef _MACHINE_ENDIAN_H_
-#define _MACHINE_ENDIAN_H_
-
-/*
- * Define the order of 32-bit words in 64-bit words.
- */
-#define _QUAD_HIGHWORD 1
-#define _QUAD_LOWWORD 0
-
-/*
- * Definitions for byte order, according to byte significance from low
- * address to high.
- */
-#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
-#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
-#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */
-
-#define BYTE_ORDER LITTLE_ENDIAN
-
-#ifndef KERNEL
-#include <sys/cdefs.h>
-#endif
-
-#include <sys/types.h>
-
-__BEGIN_DECLS
-unsigned long htonl __P((unsigned long));
-unsigned short htons __P((unsigned short));
-unsigned long ntohl __P((unsigned long));
-unsigned short ntohs __P((unsigned short));
-__END_DECLS
-
-#define __word_swap_long(x) \
-__extension__ ({ register u_long __X = (x); \
- __asm ("rorl $16, %1" \
- : "=r" (__X) \
- : "0" (__X)); \
- __X; })
-
-#if defined(KERNEL) && (defined(I486_CPU) || defined(I586_CPU) || defined(I686_CPU)) && !defined(I386_CPU)
-
-#define __byte_swap_long(x) \
-__extension__ ({ register u_long __X = (x); \
- __asm ("bswap %0" \
- : "=r" (__X) \
- : "0" (__X)); \
- __X; })
-#else
-
-#define __byte_swap_long(x) \
-__extension__ ({ register u_long __X = (x); \
- __asm ("xchgb %h1, %b1\n\trorl $16, %1\n\txchgb %h1, %b1" \
- : "=q" (__X) \
- : "0" (__X)); \
- __X; })
-#endif
-
-#define __byte_swap_word(x) \
-__extension__ ({ register u_short __X = (x); \
- __asm ("xchgb %h1, %b1" \
- : "=q" (__X) \
- : "0" (__X)); \
- __X; })
-
-/*
- * Macros for network/external number representation conversion.
- */
-#ifdef __GNUC__
-#define ntohl __byte_swap_long
-#define ntohs __byte_swap_word
-#define htonl __byte_swap_long
-#define htons __byte_swap_word
-#endif
-
-#define NTOHL(x) ((x) = ntohl((u_long)(x)))
-#define NTOHS(x) ((x) = ntohs((u_short)(x)))
-#define HTONL(x) ((x) = htonl((u_long)(x)))
-#define HTONS(x) ((x) = htons((u_short)(x)))
-
-#endif /* !_MACHINE_ENDIAN_H_ */
diff --git a/newlib/libc/sys/linux/machine/i386/include/param.h b/newlib/libc/sys/linux/machine/i386/include/param.h
deleted file mode 100644
index fbe1be2ac..000000000
--- a/newlib/libc/sys/linux/machine/i386/include/param.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)param.h 5.8 (Berkeley) 6/28/91
- * $FreeBSD: src/sys/i386/include/param.h,v 1.62 2001/09/12 08:37:33 julian Exp $
- */
-
-/*
- * Machine dependent constants for Intel 386.
- */
-
-#ifndef _MACHINE_PARAM_H_
-#define _MACHINE_PARAM_H_
-
-#ifndef MACHINE
-#define MACHINE "i386"
-#endif
-#ifndef MACHINE_ARCH
-#define MACHINE_ARCH "i386"
-#endif
-#define MID_MACHINE MID_I386
-
-/* Endian-ness */
-#ifndef BIG_ENDIAN
-#define BIG_ENDIAN 4321
-#endif
-#ifndef LITTLE_ENDIAN
-#define LITTLE_ENDIAN 1234
-#endif
-
-#define BYTE_ORDER LITTLE_ENDIAN
-
-/*
- * OBJFORMAT_NAMES is a comma-separated list of the object formats
- * that are supported on the architecture.
- */
-#define OBJFORMAT_NAMES "elf", "aout"
-#define OBJFORMAT_DEFAULT "elf"
-
-#define MAXHOSTNAMELEN 64
-
-#ifdef SMP
-#define MAXCPU 16
-#else
-#define MAXCPU 1
-#endif /* SMP */
-
-#define ALIGNBYTES _ALIGNBYTES
-#define ALIGN(p) _ALIGN(p)
-
-#define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t)))
-
-#define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t)))
-#define PDRSHIFT 22 /* LOG2(NBPDR) */
-#define NBPDR (1<<PDRSHIFT) /* bytes/page dir */
-#define PDRMASK (NBPDR-1)
-
-#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
-#define DEV_BSIZE (1<<DEV_BSHIFT)
-
-#ifndef BLKDEV_IOSIZE
-#define BLKDEV_IOSIZE PAGE_SIZE /* default block device I/O size */
-#endif
-#define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */
-#define MAXPHYS (128 * 1024) /* max raw I/O transfer size */
-#define MAXDUMPPGS (DFLTPHYS/PAGE_SIZE)
-
-#define IOPAGES 2 /* pages of i/o permission bitmap */
-
-#ifndef KSTACK_PAGES
-#define KSTACK_PAGES 2 /* Includes pcb! */
-#endif
-#define UAREA_PAGES 1 /* holds struct user WITHOUT PCB (see def.) */
-
-#define KSTACK_GUARD /* compile in the kstack guard page */
-
-/*
- * Ceiling on amount of swblock kva space.
- */
-#ifndef VM_SWZONE_SIZE_MAX
-#define VM_SWZONE_SIZE_MAX (70 * 1024 * 1024)
-#endif
-
-/*
- * Ceiling on size of buffer cache (really only effects write queueing,
- * the VM page cache is not effected).
- */
-#ifndef VM_BCACHE_SIZE_MAX
-#define VM_BCACHE_SIZE_MAX (200 * 1024 * 1024)
-#endif
-
-
-/*
- * Constants related to network buffer management.
- * MCLBYTES must be no larger than PAGE_SIZE.
- */
-#ifndef MSIZE
-#define MSIZE 256 /* size of an mbuf */
-#endif /* MSIZE */
-
-#ifndef MCLSHIFT
-#define MCLSHIFT 11 /* convert bytes to mbuf clusters */
-#endif /* MCLSHIFT */
-#define MCLBYTES (1 << MCLSHIFT) /* size of an mbuf cluster */
-
-/*
- * Some macros for units conversion
- */
-
-/* clicks to bytes */
-#define ctob(x) ((x)<<PAGE_SHIFT)
-
-/* bytes to clicks */
-#define btoc(x) (((unsigned)(x)+PAGE_MASK)>>PAGE_SHIFT)
-
-/*
- * btodb() is messy and perhaps slow because `bytes' may be an off_t. We
- * want to shift an unsigned type to avoid sign extension and we don't
- * want to widen `bytes' unnecessarily. Assume that the result fits in
- * a daddr_t.
- */
-#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
- (sizeof (bytes) > sizeof(long) \
- ? (daddr_t)((unsigned long long)(bytes) >> DEV_BSHIFT) \
- : (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT))
-
-#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
- ((off_t)(db) << DEV_BSHIFT)
-
-/*
- * Mach derived conversion macros
- */
-#define trunc_page(x) ((x) & ~PAGE_MASK)
-#define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK)
-#define trunc_4mpage(x) ((unsigned)(x) & ~PDRMASK)
-#define round_4mpage(x) ((((unsigned)(x)) + PDRMASK) & ~PDRMASK)
-
-#define atop(x) ((unsigned)(x) >> PAGE_SHIFT)
-#define ptoa(x) ((unsigned)(x) << PAGE_SHIFT)
-
-#define i386_btop(x) ((unsigned)(x) >> PAGE_SHIFT)
-#define i386_ptob(x) ((unsigned)(x) << PAGE_SHIFT)
-
-#define pgtok(x) ((x) * (PAGE_SIZE / 1024))
-
-#endif /* !_MACHINE_PARAM_H_ */
diff --git a/newlib/libc/sys/linux/machine/i386/include/setjmp.h b/newlib/libc/sys/linux/machine/i386/include/setjmp.h
deleted file mode 100644
index f080c3d9f..000000000
--- a/newlib/libc/sys/linux/machine/i386/include/setjmp.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#define _JBLEN 9
-typedef long __jmp_buf[_JBLEN];
-
-#define SP_INDEX 7
-#define _JMPBUF_UNWINDS(buf, address) \
- ((void *)(address) < (void *)(buf)[SP_INDEX])
diff --git a/newlib/libc/sys/linux/machine/i386/include/termios.h b/newlib/libc/sys/linux/machine/i386/include/termios.h
deleted file mode 100644
index ffbbed8ce..000000000
--- a/newlib/libc/sys/linux/machine/i386/include/termios.h
+++ /dev/null
@@ -1 +0,0 @@
-#define __MAX_BAUD B4000000
diff --git a/newlib/libc/sys/linux/machine/i386/setjmp.S b/newlib/libc/sys/linux/machine/i386/setjmp.S
deleted file mode 100644
index d276f55fb..000000000
--- a/newlib/libc/sys/linux/machine/i386/setjmp.S
+++ /dev/null
@@ -1,91 +0,0 @@
-/* This is file is a merger of SETJMP.S and LONGJMP.S */
-/*
- * This file was modified to use the __USER_LABEL_PREFIX__ and
- * __REGISTER_PREFIX__ macros defined by later versions of GNU cpp by
- * Joel Sherrill (joel@OARcorp.com)
- * Slight change: now includes i386mach.h for this (Werner Almesberger)
- *
- * Copyright (C) 1991 DJ Delorie
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms is permitted
- * provided that the above copyright notice and following paragraph are
- * duplicated in all such forms.
- *
- * This file is distributed WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
- /*
- ** jmp_buf:
- ** eax ebx ecx edx esi edi ebp esp eip
- ** 0 4 8 12 16 20 24 28 32
- */
-
- #include "i386mach.h"
-
- .global SYM (setjmp)
- .global SYM (__libc_longjmp)
- .weak SYM (longjmp)
- SOTYPE_FUNCTION(setjmp)
- SOTYPE_FUNCTION(longjmp)
- SOTYPE_FUNCTION(__libc_longjmp)
-
-SYM (setjmp):
-
- pushl ebp
- movl esp,ebp
-
- pushl edi
- movl 8 (ebp),edi
-
- movl eax,0 (edi)
- movl ebx,4 (edi)
- movl ecx,8 (edi)
- movl edx,12 (edi)
- movl esi,16 (edi)
-
- movl -4 (ebp),eax
- movl eax,20 (edi)
-
- movl 0 (ebp),eax
- movl eax,24 (edi)
-
- movl esp,eax
- addl $12,eax
- movl eax,28 (edi)
-
- movl 4 (ebp),eax
- movl eax,32 (edi)
-
- popl edi
- movl $0,eax
- leave
- ret
-
-SYM (__libc_longjmp):
-SYM (longjmp):
- .weak longjmp
- pushl ebp
- movl esp,ebp
-
- movl 8(ebp),edi /* get jmp_buf */
- movl 12(ebp),eax /* store retval in j->eax */
- movl eax,0(edi)
-
- movl 24(edi),ebp
-
- __CLI
- movl 28(edi),esp
-
- pushl 32(edi)
-
- movl 0(edi),eax
- movl 4(edi),ebx
- movl 8(edi),ecx
- movl 12(edi),edx
- movl 16(edi),esi
- movl 20(edi),edi
- __STI
-
- ret
diff --git a/newlib/libc/sys/linux/machine/i386/sigaction.c b/newlib/libc/sys/linux/machine/i386/sigaction.c
deleted file mode 100644
index 6edcb0ae7..000000000
--- a/newlib/libc/sys/linux/machine/i386/sigaction.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/* POSIX.1 `sigaction' call for Linux/i386.
- Copyright (C) 1991, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <signal.h>
-#include <string.h>
-
-#include <machine/syscall.h>
-
-/* The difference here is that the sigaction structure used in the
- kernel is not the same as we use in the libc. Therefore we must
- translate it here. */
-#include <kernel_sigaction.h>
-
-/* We do not globally define the SA_RESTORER flag so do it here. */
-#define SA_RESTORER 0x04000000
-
-#define __NR___rt_sigaction __NR_rt_sigaction
-
-static _syscall4(int,__rt_sigaction,int,sig,const struct kernel_sigaction *,act,
- struct kernel_sigaction *,oact,size_t,size)
-
-static void restore_rt (void) asm ("__restore_rt");
-static void restore (void) asm ("__restore");
-
-/* If ACT is not NULL, change the action for SIG to *ACT.
- If OACT is not NULL, put the old action for SIG in *OACT. */
-int
-__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
-{
- int result;
- struct kernel_sigaction kact, koact;
-
- if (act)
- {
- kact.k_sa_handler = act->sa_handler;
- memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t));
- kact.sa_flags = act->sa_flags | SA_RESTORER;
-
- kact.sa_restorer = ((act->sa_flags & SA_SIGINFO)
- ? &restore_rt : &restore);
- }
-
- /* XXX The size argument hopefully will have to be changed to the
- real size of the user-level sigset_t. */
- result = __rt_sigaction(sig, act ? (&kact) : NULL,
- oact ? (&koact) : NULL, _NSIG / 8);
-
- if (oact && result >= 0)
- {
- oact->sa_handler = koact.k_sa_handler;
- memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (sigset_t));
- oact->sa_flags = koact.sa_flags;
- oact->sa_restorer = koact.sa_restorer;
- }
- return result;
-}
-
-weak_alias (__libc_sigaction, __sigaction)
-weak_alias (__libc_sigaction, sigaction)
-
-/* NOTE: Please think twice before making any changes to the bits of
- code below. GDB needs some intimate knowledge about it to
- recognize them as signal trampolines, and make backtraces through
- signal handlers work right. Important are both the names
- (__restore and __restore_rt) and the exact instruction sequence.
- If you ever feel the need to make any changes, please notify the
- appropriate GDB maintainer. */
-
-#define RESTORE(name, syscall) RESTORE2 (name, syscall)
-#define RESTORE2(name, syscall) \
-asm \
- ( \
- ".text\n" \
- " .align 16\n" \
- "__" #name ":\n" \
- " movl $" #syscall ", %eax\n" \
- " int $0x80" \
- );
-
-/* The return code for realtime-signals. */
-RESTORE (restore_rt, __NR_rt_sigreturn)
-
-/* For the boring old signals. */
-# undef RESTORE2
-# define RESTORE2(name, syscall) \
-asm \
- ( \
- ".text\n" \
- " .align 8\n" \
- "__" #name ":\n" \
- " popl %eax\n" \
- " movl $" #syscall ", %eax\n" \
- " int $0x80" \
- );
-
-RESTORE (restore, __NR_sigreturn)
diff --git a/newlib/libc/sys/linux/machine/i386/sigstack.h b/newlib/libc/sys/linux/machine/i386/sigstack.h
deleted file mode 100644
index fe6d2d10d..000000000
--- a/newlib/libc/sys/linux/machine/i386/sigstack.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef _SIGSTACK_H
-
-#define _SIGSTACK_H
-
-#include <stddef.h>
-
-typedef struct sigaltstack
- {
- void *ss_sp;
- int ss_flags;
- size_t ss_size;
- } stack_t;
-
-#endif /* _SIGSTACK_H */
diff --git a/newlib/libc/sys/linux/machine/i386/socketcall.h b/newlib/libc/sys/linux/machine/i386/socketcall.h
deleted file mode 100644
index afb1e5808..000000000
--- a/newlib/libc/sys/linux/machine/i386/socketcall.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* libc/sys/linux/machine/i386/socketcall.h - x86 linux socket system calls */
-
-/* Copyright 2002, Red Hat Inc. */
-
-#ifndef _SOCKETCALL_H
-
-#define _SOCKETCALL_H
-
-#include <machine/weakalias.h>
-#include <sys/errno.h>
-#include <asm/unistd.h>
-#include "sockops.h"
-
-/*
- * PIC uses %ebx, so we need to save it during system calls
- */
-
-#ifdef __syscall_return
-
-#define __sockcall_base(type, name) \
-{ \
-long __res; \
-__asm__ volatile ("push %%ebx; movl %2,%%ebx; lea 8(%%ebp),%%ecx; int $0x80; pop %%ebx" \
- : "=a" (__res) \
- : "0" (__NR_socketcall),"r" (SOCK_##name)); \
-__syscall_return(type,__res); \
-}
-
-#else /* !defined(__syscall_return) */
-
-/* FIXME: we need to rewrite this for a vsyscall system. */
-
-#define __syscall_return(type, res) \
-do { \
- if ((unsigned long)(res) >= (unsigned long)(-125)) { \
- errno = -(res); \
- res = -1; \
- } \
- return (type) (res); \
-} while (0)
-
-#define __sockcall_base(type, name) \
-{ \
-long __res; \
-__asm__ volatile ("push %%ebx; movl %2,%%ebx; lea 8(%%ebp),%%ecx; int $0x80; pop %%ebx" \
- : "=a" (__res) \
- : "0" (__NR_socketcall),"r" (SOCK_##name)); \
-__syscall_return(type,__res); \
-}
-
-#endif /* !defined(__syscall_return) */
-
-#undef _sockcall1
-#define _sockcall1(type,name,type1,arg1) \
-type __libc_##name(type1 arg1) \
-__sockcall_base(type,name) \
-weak_alias(__libc_##name,name)
-
-#undef _sockcall2
-#define _sockcall2(type,name,type1,arg1,type2,arg2) \
-type __libc_##name(type1 arg1, type2 arg2) \
-__sockcall_base(type,name) \
-weak_alias(__libc_##name,name)
-
-#undef _sockcall3
-#define _sockcall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
-type __libc_##name(type1 arg1, type2 arg2, type3 arg3) \
-__sockcall_base(type,name) \
-weak_alias(__libc_##name,name)
-
-#undef _sockcall4
-#define _sockcall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
-type __libc_##name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
-__sockcall_base(type,name) \
-weak_alias(__libc_##name,name)
-
-#undef _sockcall5
-#define _sockcall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
-type __libc_##name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
-__sockcall_base(type,name) \
-weak_alias(__libc_##name,name)
-
-#undef _sockcall6
-#define _sockcall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \
-type __libc_##name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) \
-__sockcall_base(type,name) \
-weak_alias(__libc_##name,name)
-
-#endif /* _SOCKETCALL_H */
diff --git a/newlib/libc/sys/linux/machine/i386/syscall.h b/newlib/libc/sys/linux/machine/i386/syscall.h
deleted file mode 100644
index ec9bc2402..000000000
--- a/newlib/libc/sys/linux/machine/i386/syscall.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/* libc/sys/linux/machine/i386/syscall.h - x86 linux system calls */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#ifndef SYSCALL_H
-
-#include <machine/weakalias.h>
-#include <sys/errno.h>
-#include <asm/unistd.h>
-#include <unistd.h>
-
-
-/*
- * Note: several system calls are for SysV or BSD compatibility, or are
- * specific Linuxisms. Most of those system calls are not implemented in
- * this library.
- */
-
-
-#if defined(__PIC__) && defined(__i386__)
-
-/*
- * PIC uses %ebx, so we need to save it during system calls
- */
-
-#ifndef __syscall_return
-
-/* FIXME: remove this and switch over to use vsyscall. */
-
-#define __syscall_return(type, res) \
-do { \
- if ((unsigned long)(res) >= (unsigned long)(-125)) { \
- errno = -(res); \
- res = -1; \
- } \
- return (type) (res); \
-} while (0)
-
-#endif
-#undef __inline_syscall0
-#define __inline_syscall0(name,ret) \
-__asm__ volatile ("int $0x80" \
- : "=a" (ret) \
- : "0" (__NR_##name));
-
-#undef __inline_syscall1
-#define __inline_syscall1(name,ret,arg1) \
-__asm__ volatile ("push %%ebx; movl %2,%%ebx; int $0x80; pop %%ebx" \
- : "=a" (ret) \
- : "0" (__NR_##name),"r" ((long)(arg1)));
-
-#undef __inline_syscall2
-#define __inline_syscall2(name,ret,arg1,arg2) \
-__asm__ volatile ("push %%ebx; movl %2,%%ebx; int $0x80; pop %%ebx" \
- : "=a" (ret) \
- : "0" (__NR_##name),"r" ((long)(arg1)),"c" ((long)(arg2)));
-
-#undef __inline_syscall3
-#define __inline_syscall3(name,ret,arg1,arg2,arg3) \
-__asm__ volatile ("push %%ebx; movl %2,%%ebx; int $0x80; pop %%ebx" \
- : "=a" (ret) \
- : "0" (__NR_##name),"r" ((long)(arg1)),"c" ((long)(arg2)), \
- "d" ((long)(arg3)));
-
-#undef __inline_syscall4
-#define __inline_syscall4(name,ret,arg1,arg2,arg3,arg4) \
-__asm__ volatile ("push %%ebx; movl %2,%%ebx; int $0x80; pop %%ebx" \
- : "=a" (ret) \
- : "0" (__NR_##name),"r" ((long)(arg1)),"c" ((long)(arg2)), \
- "d" ((long)(arg3)),"S" ((long)(arg4)));
-
-#undef __inline_syscall5
-#define __inline_syscall5(name,ret,arg1,arg2,arg3,arg4,arg5) \
-__asm__ volatile ("push %%ebx; movl %2,%%ebx; int $0x80; pop %%ebx" \
- : "=a" (ret) \
- : "0" (__NR_##name),"m" ((long)(arg1)),"c" ((long)(arg2)), \
- "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)));
-
-#undef __inline_syscall6
-#define __inline_syscall6(name,ret,arg1,arg2,arg3,arg4,arg5,arg6) \
-__asm__ volatile ("push %%ebx; lea 8(%%ebp),%%ebx; int $0x80; pop %%ebx" \
- : "=a" (ret) \
- : "0" (__NR_##name));
-
-#undef _syscall0_base
-#define _syscall0_base(type,name) \
-type __libc_##name (void) \
-{ \
-long __res; \
-__inline_syscall0(name,__res) \
-__syscall_return(type,__res); \
-}
-
-#undef _syscall1_base
-#define _syscall1_base(type,name,type1,arg1) \
-type __libc_##name (type1 arg1) \
-{ \
-long __res; \
-__inline_syscall1(name,__res,arg1) \
-__syscall_return(type,__res); \
-}
-
-#undef _syscall2_base
-#define _syscall2_base(type,name,type1,arg1,type2,arg2) \
-type __libc_##name (type1 arg1,type2 arg2) \
-{ \
-long __res; \
-__inline_syscall2(name,__res,arg1,arg2) \
-__syscall_return(type,__res); \
-}
-
-#undef _syscall3_base
-#define _syscall3_base(type,name,type1,arg1,type2,arg2,type3,arg3) \
-type __libc_##name (type1 arg1,type2 arg2,type3 arg3) \
-{ \
-long __res; \
-__inline_syscall3(name,__res,arg1,arg2,arg3) \
-__syscall_return(type,__res); \
-}
-
-#undef _syscall4_base
-#define _syscall4_base(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
-type __libc_##name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
-{ \
-long __res; \
-__inline_syscall4(name,__res,arg1,arg2,arg3,arg4) \
-__syscall_return(type,__res); \
-}
-
-#undef _syscall5_base
-#define _syscall5_base(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
- type5,arg5) \
-type __libc_##name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
-{ \
-long __res; \
-__inline_syscall5(name,__res,arg1,arg2,arg3,arg4,arg5) \
-__syscall_return(type,__res); \
-} \
-
-#undef _syscall6_base
-#define _syscall6_base(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
- type5,arg5,type6,arg6) \
-type __libc_##name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
-{ \
-long __res; \
-__inline_syscall6(name,__res,arg1,arg2,arg3,arg4,arg5,arg6) \
-__syscall_return(type,__res); \
-}
-
-#undef _syscall0
-#define _syscall0(type,name) \
-_syscall0_base(type,name) \
-weak_alias(__libc_##name,name);
-
-#undef _syscall1
-#define _syscall1(type,name,type1,arg1) \
-_syscall1_base(type,name,type1,arg1) \
-weak_alias(__libc_##name,name);
-
-#undef _syscall2
-#define _syscall2(type,name,type1,arg1,type2,arg2) \
-_syscall2_base(type,name,type1,arg1,type2,arg2) \
-weak_alias(__libc_##name,name);
-
-#undef _syscall3
-#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
-_syscall3_base(type,name,type1,arg1,type2,arg2,type3,arg3) \
-weak_alias(__libc_##name,name);
-
-#undef _syscall4
-#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
-_syscall4_base(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
-weak_alias(__libc_##name,name);
-
-#undef _syscall5
-#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
- type5,arg5) \
-_syscall5_base(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
-weak_alias(__libc_##name,name);
-
-#undef _syscall6
-#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
- type5,arg5,type6,arg6) \
-_syscall6_base(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \
-weak_alias(__libc_##name,name);
-
-#endif /* __PIC__ && __i386__ */
-
-#endif /* SYSCALL_H */
diff --git a/newlib/libc/sys/linux/machine/i386/sysdep.h b/newlib/libc/sys/linux/machine/i386/sysdep.h
deleted file mode 100644
index 42becb3fd..000000000
--- a/newlib/libc/sys/linux/machine/i386/sysdep.h
+++ /dev/null
@@ -1 +0,0 @@
-#define NO_UNDERSCORES
diff --git a/newlib/libc/sys/linux/machine/i386/weakalias.h b/newlib/libc/sys/linux/machine/i386/weakalias.h
deleted file mode 100644
index 2813bfe26..000000000
--- a/newlib/libc/sys/linux/machine/i386/weakalias.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#define weak_alias(name, aliasname) \
- extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
-
-#if 0
-#define weak_extern(symbol) _weak_extern (symbol)
-#define _weak_extern(symbol) asm (".weak " #symbol);
-#endif
-
-#define weak_function __attribute__ ((weak))
-
diff --git a/newlib/libc/sys/linux/malign.c b/newlib/libc/sys/linux/malign.c
deleted file mode 100644
index 818e05a75..000000000
--- a/newlib/libc/sys/linux/malign.c
+++ /dev/null
@@ -1 +0,0 @@
-/* dummy file to override one object in stdlib directory */
diff --git a/newlib/libc/sys/linux/malignr.c b/newlib/libc/sys/linux/malignr.c
deleted file mode 100644
index 5b2e14ae4..000000000
--- a/newlib/libc/sys/linux/malignr.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdlib.h>
-
-void *
-_memalign_r (struct _reent *ptr, size_t alignment, size_t bytes)
-{
- return memalign (alignment, bytes);
-}
diff --git a/newlib/libc/sys/linux/mallinfor.c b/newlib/libc/sys/linux/mallinfor.c
deleted file mode 100644
index a2ee627bc..000000000
--- a/newlib/libc/sys/linux/mallinfor.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <malloc.h>
-
-struct mallinfo
-_mallinfo_r (struct _reent *ptr)
-{
- return mallinfo ();
-}
diff --git a/newlib/libc/sys/linux/malloc.c b/newlib/libc/sys/linux/malloc.c
deleted file mode 100644
index 25007e889..000000000
--- a/newlib/libc/sys/linux/malloc.c
+++ /dev/null
@@ -1,5082 +0,0 @@
-/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
- and Doug Lea <dl@cs.oswego.edu>, 1996.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* $Id$
-
- This work is mainly derived from malloc-2.6.4 by Doug Lea
- <dl@cs.oswego.edu>, which is available from:
-
- ftp://g.oswego.edu/pub/misc/malloc.c
-
- Most of the original comments are reproduced in the code below.
-
-* Why use this malloc?
-
- This is not the fastest, most space-conserving, most portable, or
- most tunable malloc ever written. However it is among the fastest
- while also being among the most space-conserving, portable and tunable.
- Consistent balance across these factors results in a good general-purpose
- allocator. For a high-level description, see
- http://g.oswego.edu/dl/html/malloc.html
-
- On many systems, the standard malloc implementation is by itself not
- thread-safe, and therefore wrapped with a single global lock around
- all malloc-related functions. In some applications, especially with
- multiple available processors, this can lead to contention problems
- and bad performance. This malloc version was designed with the goal
- to avoid waiting for locks as much as possible. Statistics indicate
- that this goal is achieved in many cases.
-
-* Synopsis of public routines
-
- (Much fuller descriptions are contained in the program documentation below.)
-
- ptmalloc_init();
- Initialize global configuration. When compiled for multiple threads,
- this function must be called once before any other function in the
- package. It is not required otherwise. It is called automatically
- in the Linux/GNU C libray or when compiling with MALLOC_HOOKS.
- malloc(size_t n);
- Return a pointer to a newly allocated chunk of at least n bytes, or null
- if no space is available.
- free(Void_t* p);
- Release the chunk of memory pointed to by p, or no effect if p is null.
- realloc(Void_t* p, size_t n);
- Return a pointer to a chunk of size n that contains the same data
- as does chunk p up to the minimum of (n, p's size) bytes, or null
- if no space is available. The returned pointer may or may not be
- the same as p. If p is null, equivalent to malloc. Unless the
- #define REALLOC_ZERO_BYTES_FREES below is set, realloc with a
- size argument of zero (re)allocates a minimum-sized chunk.
- memalign(size_t alignment, size_t n);
- Return a pointer to a newly allocated chunk of n bytes, aligned
- in accord with the alignment argument, which must be a power of
- two.
- valloc(size_t n);
- Equivalent to memalign(pagesize, n), where pagesize is the page
- size of the system (or as near to this as can be figured out from
- all the includes/defines below.)
- pvalloc(size_t n);
- Equivalent to valloc(minimum-page-that-holds(n)), that is,
- round up n to nearest pagesize.
- calloc(size_t unit, size_t quantity);
- Returns a pointer to quantity * unit bytes, with all locations
- set to zero.
- cfree(Void_t* p);
- Equivalent to free(p).
- malloc_trim(size_t pad);
- Release all but pad bytes of freed top-most memory back
- to the system. Return 1 if successful, else 0.
- malloc_usable_size(Void_t* p);
- Report the number usable allocated bytes associated with allocated
- chunk p. This may or may not report more bytes than were requested,
- due to alignment and minimum size constraints.
- malloc_stats();
- Prints brief summary statistics on stderr.
- mallinfo()
- Returns (by copy) a struct containing various summary statistics.
- mallopt(int parameter_number, int parameter_value)
- Changes one of the tunable parameters described below. Returns
- 1 if successful in changing the parameter, else 0.
-
-* Vital statistics:
-
- Alignment: 8-byte
- 8 byte alignment is currently hardwired into the design. This
- seems to suffice for all current machines and C compilers.
-
- Assumed pointer representation: 4 or 8 bytes
- Code for 8-byte pointers is untested by me but has worked
- reliably by Wolfram Gloger, who contributed most of the
- changes supporting this.
-
- Assumed size_t representation: 4 or 8 bytes
- Note that size_t is allowed to be 4 bytes even if pointers are 8.
-
- Minimum overhead per allocated chunk: 4 or 8 bytes
- Each malloced chunk has a hidden overhead of 4 bytes holding size
- and status information.
-
- Minimum allocated size: 4-byte ptrs: 16 bytes (including 4 overhead)
- 8-byte ptrs: 24/32 bytes (including, 4/8 overhead)
-
- When a chunk is freed, 12 (for 4byte ptrs) or 20 (for 8 byte
- ptrs but 4 byte size) or 24 (for 8/8) additional bytes are
- needed; 4 (8) for a trailing size field
- and 8 (16) bytes for free list pointers. Thus, the minimum
- allocatable size is 16/24/32 bytes.
-
- Even a request for zero bytes (i.e., malloc(0)) returns a
- pointer to something of the minimum allocatable size.
-
- Maximum allocated size: 4-byte size_t: 2^31 - 8 bytes
- 8-byte size_t: 2^63 - 16 bytes
-
- It is assumed that (possibly signed) size_t bit values suffice to
- represent chunk sizes. `Possibly signed' is due to the fact
- that `size_t' may be defined on a system as either a signed or
- an unsigned type. To be conservative, values that would appear
- as negative numbers are avoided.
- Requests for sizes with a negative sign bit will return a
- minimum-sized chunk.
-
- Maximum overhead wastage per allocated chunk: normally 15 bytes
-
- Alignment demands, plus the minimum allocatable size restriction
- make the normal worst-case wastage 15 bytes (i.e., up to 15
- more bytes will be allocated than were requested in malloc), with
- two exceptions:
- 1. Because requests for zero bytes allocate non-zero space,
- the worst case wastage for a request of zero bytes is 24 bytes.
- 2. For requests >= mmap_threshold that are serviced via
- mmap(), the worst case wastage is 8 bytes plus the remainder
- from a system page (the minimal mmap unit); typically 4096 bytes.
-
-* Limitations
-
- Here are some features that are NOT currently supported
-
- * No automated mechanism for fully checking that all accesses
- to malloced memory stay within their bounds.
- * No support for compaction.
-
-* Synopsis of compile-time options:
-
- People have reported using previous versions of this malloc on all
- versions of Unix, sometimes by tweaking some of the defines
- below. It has been tested most extensively on Solaris and
- Linux. People have also reported adapting this malloc for use in
- stand-alone embedded systems.
-
- The implementation is in straight, hand-tuned ANSI C. Among other
- consequences, it uses a lot of macros. Because of this, to be at
- all usable, this code should be compiled using an optimizing compiler
- (for example gcc -O2) that can simplify expressions and control
- paths.
-
- __STD_C (default: derived from C compiler defines)
- Nonzero if using ANSI-standard C compiler, a C++ compiler, or
- a C compiler sufficiently close to ANSI to get away with it.
- MALLOC_DEBUG (default: NOT defined)
- Define to enable debugging. Adds fairly extensive assertion-based
- checking to help track down memory errors, but noticeably slows down
- execution.
- MALLOC_HOOKS (default: NOT defined)
- Define to enable support run-time replacement of the allocation
- functions through user-defined `hooks'.
- REALLOC_ZERO_BYTES_FREES (default: defined)
- Define this if you think that realloc(p, 0) should be equivalent
- to free(p). (The C standard requires this behaviour, therefore
- it is the default.) Otherwise, since malloc returns a unique
- pointer for malloc(0), so does realloc(p, 0).
- HAVE_MEMCPY (default: defined)
- Define if you are not otherwise using ANSI STD C, but still
- have memcpy and memset in your C library and want to use them.
- Otherwise, simple internal versions are supplied.
- USE_MEMCPY (default: 1 if HAVE_MEMCPY is defined, 0 otherwise)
- Define as 1 if you want the C library versions of memset and
- memcpy called in realloc and calloc (otherwise macro versions are used).
- At least on some platforms, the simple macro versions usually
- outperform libc versions.
- HAVE_MMAP (default: defined as 1)
- Define to non-zero to optionally make malloc() use mmap() to
- allocate very large blocks.
- HAVE_MREMAP (default: defined as 0 unless Linux libc set)
- Define to non-zero to optionally make realloc() use mremap() to
- reallocate very large blocks.
- USE_ARENAS (default: the same as HAVE_MMAP)
- Enable support for multiple arenas, allocated using mmap().
- malloc_getpagesize (default: derived from system #includes)
- Either a constant or routine call returning the system page size.
- HAVE_USR_INCLUDE_MALLOC_H (default: NOT defined)
- Optionally define if you are on a system with a /usr/include/malloc.h
- that declares struct mallinfo. It is not at all necessary to
- define this even if you do, but will ensure consistency.
- INTERNAL_SIZE_T (default: size_t)
- Define to a 32-bit type (probably `unsigned int') if you are on a
- 64-bit machine, yet do not want or need to allow malloc requests of
- greater than 2^31 to be handled. This saves space, especially for
- very small chunks.
- _LIBC (default: NOT defined)
- Defined only when compiled as part of the Linux libc/glibc.
- Also note that there is some odd internal name-mangling via defines
- (for example, internally, `malloc' is named `mALLOc') needed
- when compiling in this case. These look funny but don't otherwise
- affect anything.
- LACKS_UNISTD_H (default: undefined)
- Define this if your system does not have a <unistd.h>.
- MORECORE (default: sbrk)
- The name of the routine to call to obtain more memory from the system.
- MORECORE_FAILURE (default: -1)
- The value returned upon failure of MORECORE.
- MORECORE_CLEARS (default 1)
- The degree to which the routine mapped to MORECORE zeroes out
- memory: never (0), only for newly allocated space (1) or always
- (2). The distinction between (1) and (2) is necessary because on
- some systems, if the application first decrements and then
- increments the break value, the contents of the reallocated space
- are unspecified.
- DEFAULT_TRIM_THRESHOLD
- DEFAULT_TOP_PAD
- DEFAULT_MMAP_THRESHOLD
- DEFAULT_MMAP_MAX
- Default values of tunable parameters (described in detail below)
- controlling interaction with host system routines (sbrk, mmap, etc).
- These values may also be changed dynamically via mallopt(). The
- preset defaults are those that give best performance for typical
- programs/systems.
- DEFAULT_CHECK_ACTION
- When the standard debugging hooks are in place, and a pointer is
- detected as corrupt, do nothing (0), print an error message (1),
- or call abort() (2).
-
-
-*/
-
-/*
-
-* Compile-time options for multiple threads:
-
- USE_PTHREADS, USE_THR, USE_SPROC
- Define one of these as 1 to select the thread interface:
- POSIX threads, Solaris threads or SGI sproc's, respectively.
- If none of these is defined as non-zero, you get a `normal'
- malloc implementation which is not thread-safe. Support for
- multiple threads requires HAVE_MMAP=1. As an exception, when
- compiling for GNU libc, i.e. when _LIBC is defined, then none of
- the USE_... symbols have to be defined.
-
- HEAP_MIN_SIZE
- HEAP_MAX_SIZE
- When thread support is enabled, additional `heap's are created
- with mmap calls. These are limited in size; HEAP_MIN_SIZE should
- be a multiple of the page size, while HEAP_MAX_SIZE must be a power
- of two for alignment reasons. HEAP_MAX_SIZE should be at least
- twice as large as the mmap threshold.
- THREAD_STATS
- When this is defined as non-zero, some statistics on mutex locking
- are computed.
-
-*/
-
-
-
-
-/* Preliminaries */
-
-#ifndef __STD_C
-#if defined (__STDC__)
-#define __STD_C 1
-#else
-#if __cplusplus
-#define __STD_C 1
-#else
-#define __STD_C 0
-#endif /*__cplusplus*/
-#endif /*__STDC__*/
-#endif /*__STD_C*/
-
-#ifndef Void_t
-#if __STD_C
-#define Void_t void
-#else
-#define Void_t char
-#endif
-#endif /*Void_t*/
-
-#define _GNU_SOURCE
-#include <features.h>
-#define _LIBC 1
-#define NOT_IN_libc 1
-
-#if __STD_C
-# include <stddef.h> /* for size_t */
-# if defined _LIBC || defined MALLOC_HOOKS
-# include <stdlib.h> /* for getenv(), abort() */
-# endif
-#else
-# include <sys/types.h>
-# if defined _LIBC || defined MALLOC_HOOKS
-extern char* getenv();
-# endif
-#endif
-
-/* newlib modifications */
-
-#include <libc-symbols.h>
-#include <sys/types.h>
-
-extern void __pthread_initialize (void) __attribute__((weak));
-extern void *__mmap (void *__addr, size_t __len, int __prot,
- int __flags, int __fd, off_t __offset);
-extern int __munmap (void *__addr, size_t __len);
-extern void *__mremap (void *__addr, size_t __old_len, size_t __new_len,
- int __may_move);
-extern int __getpagesize (void);
-
-#define __libc_enable_secure 1
-
-/* Macros for handling mutexes and thread-specific data. This is
- included early, because some thread-related header files (such as
- pthread.h) should be included before any others. */
-#include <bits/libc-lock.h>
-#include "thread-m.h"
-
-void *(*__malloc_internal_tsd_get) (enum __libc_tsd_key_t) = NULL;
-int (*__malloc_internal_tsd_set) (enum __libc_tsd_key_t,
- __const void *) = NULL;
-
-weak_alias(__malloc_internal_tsd_get, __libc_internal_tsd_get)
-weak_alias(__malloc_internal_tsd_set, __libc_internal_tsd_set)
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <errno.h>
-#include <stdio.h> /* needed for malloc_stats */
-
-
-/*
- Compile-time options
-*/
-
-
-/*
- Debugging:
-
- Because freed chunks may be overwritten with link fields, this
- malloc will often die when freed memory is overwritten by user
- programs. This can be very effective (albeit in an annoying way)
- in helping track down dangling pointers.
-
- If you compile with -DMALLOC_DEBUG, a number of assertion checks are
- enabled that will catch more memory errors. You probably won't be
- able to make much sense of the actual assertion errors, but they
- should help you locate incorrectly overwritten memory. The
- checking is fairly extensive, and will slow down execution
- noticeably. Calling malloc_stats or mallinfo with MALLOC_DEBUG set will
- attempt to check every non-mmapped allocated and free chunk in the
- course of computing the summaries. (By nature, mmapped regions
- cannot be checked very much automatically.)
-
- Setting MALLOC_DEBUG may also be helpful if you are trying to modify
- this code. The assertions in the check routines spell out in more
- detail the assumptions and invariants underlying the algorithms.
-
-*/
-
-#if MALLOC_DEBUG
-#include <assert.h>
-#else
-#define assert(x) ((void)0)
-#endif
-
-
-/*
- INTERNAL_SIZE_T is the word-size used for internal bookkeeping
- of chunk sizes. On a 64-bit machine, you can reduce malloc
- overhead by defining INTERNAL_SIZE_T to be a 32 bit `unsigned int'
- at the expense of not being able to handle requests greater than
- 2^31. This limitation is hardly ever a concern; you are encouraged
- to set this. However, the default version is the same as size_t.
-*/
-
-#ifndef INTERNAL_SIZE_T
-#define INTERNAL_SIZE_T size_t
-#endif
-
-/*
- REALLOC_ZERO_BYTES_FREES should be set if a call to realloc with
- zero bytes should be the same as a call to free. The C standard
- requires this. Otherwise, since this malloc returns a unique pointer
- for malloc(0), so does realloc(p, 0).
-*/
-
-
-#define REALLOC_ZERO_BYTES_FREES
-
-
-/*
- HAVE_MEMCPY should be defined if you are not otherwise using
- ANSI STD C, but still have memcpy and memset in your C library
- and want to use them in calloc and realloc. Otherwise simple
- macro versions are defined here.
-
- USE_MEMCPY should be defined as 1 if you actually want to
- have memset and memcpy called. People report that the macro
- versions are often enough faster than libc versions on many
- systems that it is better to use them.
-
-*/
-
-#define HAVE_MEMCPY 1
-
-#ifndef USE_MEMCPY
-#ifdef HAVE_MEMCPY
-#define USE_MEMCPY 1
-#else
-#define USE_MEMCPY 0
-#endif
-#endif
-
-#if (__STD_C || defined(HAVE_MEMCPY))
-
-#if __STD_C
-void* memset(void*, int, size_t);
-void* memcpy(void*, const void*, size_t);
-void* memmove(void*, const void*, size_t);
-#else
-Void_t* memset();
-Void_t* memcpy();
-Void_t* memmove();
-#endif
-#endif
-
-/* The following macros are only invoked with (2n+1)-multiples of
- INTERNAL_SIZE_T units, with a positive integer n. This is exploited
- for fast inline execution when n is small. If the regions to be
- copied do overlap, the destination lies always _below_ the source. */
-
-#if USE_MEMCPY
-
-#define MALLOC_ZERO(charp, nbytes) \
-do { \
- INTERNAL_SIZE_T mzsz = (nbytes); \
- if(mzsz <= 9*sizeof(mzsz)) { \
- INTERNAL_SIZE_T* mz = (INTERNAL_SIZE_T*) (charp); \
- if(mzsz >= 5*sizeof(mzsz)) { *mz++ = 0; \
- *mz++ = 0; \
- if(mzsz >= 7*sizeof(mzsz)) { *mz++ = 0; \
- *mz++ = 0; \
- if(mzsz >= 9*sizeof(mzsz)) { *mz++ = 0; \
- *mz++ = 0; }}} \
- *mz++ = 0; \
- *mz++ = 0; \
- *mz = 0; \
- } else memset((charp), 0, mzsz); \
-} while(0)
-
-/* If the regions overlap, dest is always _below_ src. */
-
-#define MALLOC_COPY(dest,src,nbytes,overlap) \
-do { \
- INTERNAL_SIZE_T mcsz = (nbytes); \
- if(mcsz <= 9*sizeof(mcsz)) { \
- INTERNAL_SIZE_T* mcsrc = (INTERNAL_SIZE_T*) (src); \
- INTERNAL_SIZE_T* mcdst = (INTERNAL_SIZE_T*) (dest); \
- if(mcsz >= 5*sizeof(mcsz)) { *mcdst++ = *mcsrc++; \
- *mcdst++ = *mcsrc++; \
- if(mcsz >= 7*sizeof(mcsz)) { *mcdst++ = *mcsrc++; \
- *mcdst++ = *mcsrc++; \
- if(mcsz >= 9*sizeof(mcsz)) { *mcdst++ = *mcsrc++; \
- *mcdst++ = *mcsrc++; }}} \
- *mcdst++ = *mcsrc++; \
- *mcdst++ = *mcsrc++; \
- *mcdst = *mcsrc ; \
- } else if(overlap) \
- memmove(dest, src, mcsz); \
- else \
- memcpy(dest, src, mcsz); \
-} while(0)
-
-#else /* !USE_MEMCPY */
-
-/* Use Duff's device for good zeroing/copying performance. */
-
-#define MALLOC_ZERO(charp, nbytes) \
-do { \
- INTERNAL_SIZE_T* mzp = (INTERNAL_SIZE_T*)(charp); \
- long mctmp = (nbytes)/sizeof(INTERNAL_SIZE_T), mcn; \
- if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp %= 8; } \
- switch (mctmp) { \
- case 0: for(;;) { *mzp++ = 0; \
- case 7: *mzp++ = 0; \
- case 6: *mzp++ = 0; \
- case 5: *mzp++ = 0; \
- case 4: *mzp++ = 0; \
- case 3: *mzp++ = 0; \
- case 2: *mzp++ = 0; \
- case 1: *mzp++ = 0; if(mcn <= 0) break; mcn--; } \
- } \
-} while(0)
-
-/* If the regions overlap, dest is always _below_ src. */
-
-#define MALLOC_COPY(dest,src,nbytes,overlap) \
-do { \
- INTERNAL_SIZE_T* mcsrc = (INTERNAL_SIZE_T*) src; \
- INTERNAL_SIZE_T* mcdst = (INTERNAL_SIZE_T*) dest; \
- long mctmp = (nbytes)/sizeof(INTERNAL_SIZE_T), mcn; \
- if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp %= 8; } \
- switch (mctmp) { \
- case 0: for(;;) { *mcdst++ = *mcsrc++; \
- case 7: *mcdst++ = *mcsrc++; \
- case 6: *mcdst++ = *mcsrc++; \
- case 5: *mcdst++ = *mcsrc++; \
- case 4: *mcdst++ = *mcsrc++; \
- case 3: *mcdst++ = *mcsrc++; \
- case 2: *mcdst++ = *mcsrc++; \
- case 1: *mcdst++ = *mcsrc++; if(mcn <= 0) break; mcn--; } \
- } \
-} while(0)
-
-#endif
-
-
-#ifndef LACKS_UNISTD_H
-# include <unistd.h>
-#endif
-
-/*
- Define HAVE_MMAP to optionally make malloc() use mmap() to allocate
- very large blocks. These will be returned to the operating system
- immediately after a free(). HAVE_MMAP is also a prerequisite to
- support multiple `arenas' (see USE_ARENAS below).
-*/
-
-#ifndef HAVE_MMAP
-# ifdef _POSIX_MAPPED_FILES
-# define HAVE_MMAP 1
-# endif
-#endif
-
-/*
- Define HAVE_MREMAP to make realloc() use mremap() to re-allocate
- large blocks. This is currently only possible on Linux with
- kernel versions newer than 1.3.77.
-*/
-
-#ifndef HAVE_MREMAP
-#define HAVE_MREMAP defined(__linux__)
-#endif
-
-/* Define USE_ARENAS to enable support for multiple `arenas'. These
- are allocated using mmap(), are necessary for threads and
- occasionally useful to overcome address space limitations affecting
- sbrk(). */
-
-#ifndef USE_ARENAS
-#define USE_ARENAS HAVE_MMAP
-#endif
-
-#if HAVE_MMAP
-
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
-#define MAP_ANONYMOUS MAP_ANON
-#endif
-#if !defined(MAP_FAILED)
-#define MAP_FAILED ((char*)-1)
-#endif
-
-#ifndef MAP_NORESERVE
-# ifdef MAP_AUTORESRV
-# define MAP_NORESERVE MAP_AUTORESRV
-# else
-# define MAP_NORESERVE 0
-# endif
-#endif
-
-#endif /* HAVE_MMAP */
-
-/*
- Access to system page size. To the extent possible, this malloc
- manages memory from the system in page-size units.
-
- The following mechanics for getpagesize were adapted from
- bsd/gnu getpagesize.h
-*/
-
-#ifndef malloc_getpagesize
-# ifdef _SC_PAGESIZE /* some SVR4 systems omit an underscore */
-# ifndef _SC_PAGE_SIZE
-# define _SC_PAGE_SIZE _SC_PAGESIZE
-# endif
-# endif
-# ifdef _SC_PAGE_SIZE
-# define malloc_getpagesize sysconf(_SC_PAGE_SIZE)
-# else
-# if defined(BSD) || defined(DGUX) || defined(HAVE_GETPAGESIZE)
- extern size_t getpagesize();
-# define malloc_getpagesize getpagesize()
-# else
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define malloc_getpagesize EXEC_PAGESIZE
-# else
-# ifdef NBPG
-# ifndef CLSIZE
-# define malloc_getpagesize NBPG
-# else
-# define malloc_getpagesize (NBPG * CLSIZE)
-# endif
-# else
-# ifdef NBPC
-# define malloc_getpagesize NBPC
-# else
-# ifdef PAGESIZE
-# define malloc_getpagesize PAGESIZE
-# else
-# define malloc_getpagesize (4096) /* just guess */
-# endif
-# endif
-# endif
-# endif
-# endif
-# endif
-#endif
-
-
-
-/*
-
- This version of malloc supports the standard SVID/XPG mallinfo
- routine that returns a struct containing the same kind of
- information you can get from malloc_stats. It should work on
- any SVID/XPG compliant system that has a /usr/include/malloc.h
- defining struct mallinfo. (If you'd like to install such a thing
- yourself, cut out the preliminary declarations as described above
- and below and save them in a malloc.h file. But there's no
- compelling reason to bother to do this.)
-
- The main declaration needed is the mallinfo struct that is returned
- (by-copy) by mallinfo(). The SVID/XPG malloinfo struct contains a
- bunch of fields, most of which are not even meaningful in this
- version of malloc. Some of these fields are are instead filled by
- mallinfo() with other numbers that might possibly be of interest.
-
- HAVE_USR_INCLUDE_MALLOC_H should be set if you have a
- /usr/include/malloc.h file that includes a declaration of struct
- mallinfo. If so, it is included; else an SVID2/XPG2 compliant
- version is declared below. These must be precisely the same for
- mallinfo() to work.
-
-*/
-
-/* #define HAVE_USR_INCLUDE_MALLOC_H */
-
-#if HAVE_USR_INCLUDE_MALLOC_H
-# include "/usr/include/malloc.h"
-#else
-# ifdef _LIBC
-# include "malloc.h"
-# else
-# include "ptmalloc.h"
-# endif
-#endif
-
-#include <bp-checks.h>
-
-#ifndef DEFAULT_TRIM_THRESHOLD
-#define DEFAULT_TRIM_THRESHOLD (128 * 1024)
-#endif
-
-/*
- M_TRIM_THRESHOLD is the maximum amount of unused top-most memory
- to keep before releasing via malloc_trim in free().
-
- Automatic trimming is mainly useful in long-lived programs.
- Because trimming via sbrk can be slow on some systems, and can
- sometimes be wasteful (in cases where programs immediately
- afterward allocate more large chunks) the value should be high
- enough so that your overall system performance would improve by
- releasing.
-
- The trim threshold and the mmap control parameters (see below)
- can be traded off with one another. Trimming and mmapping are
- two different ways of releasing unused memory back to the
- system. Between these two, it is often possible to keep
- system-level demands of a long-lived program down to a bare
- minimum. For example, in one test suite of sessions measuring
- the XF86 X server on Linux, using a trim threshold of 128K and a
- mmap threshold of 192K led to near-minimal long term resource
- consumption.
-
- If you are using this malloc in a long-lived program, it should
- pay to experiment with these values. As a rough guide, you
- might set to a value close to the average size of a process
- (program) running on your system. Releasing this much memory
- would allow such a process to run in memory. Generally, it's
- worth it to tune for trimming rather than memory mapping when a
- program undergoes phases where several large chunks are
- allocated and released in ways that can reuse each other's
- storage, perhaps mixed with phases where there are no such
- chunks at all. And in well-behaved long-lived programs,
- controlling release of large blocks via trimming versus mapping
- is usually faster.
-
- However, in most programs, these parameters serve mainly as
- protection against the system-level effects of carrying around
- massive amounts of unneeded memory. Since frequent calls to
- sbrk, mmap, and munmap otherwise degrade performance, the default
- parameters are set to relatively high values that serve only as
- safeguards.
-
- The default trim value is high enough to cause trimming only in
- fairly extreme (by current memory consumption standards) cases.
- It must be greater than page size to have any useful effect. To
- disable trimming completely, you can set to (unsigned long)(-1);
-
-
-*/
-
-
-#ifndef DEFAULT_TOP_PAD
-#define DEFAULT_TOP_PAD (0)
-#endif
-
-/*
- M_TOP_PAD is the amount of extra `padding' space to allocate or
- retain whenever sbrk is called. It is used in two ways internally:
-
- * When sbrk is called to extend the top of the arena to satisfy
- a new malloc request, this much padding is added to the sbrk
- request.
-
- * When malloc_trim is called automatically from free(),
- it is used as the `pad' argument.
-
- In both cases, the actual amount of padding is rounded
- so that the end of the arena is always a system page boundary.
-
- The main reason for using padding is to avoid calling sbrk so
- often. Having even a small pad greatly reduces the likelihood
- that nearly every malloc request during program start-up (or
- after trimming) will invoke sbrk, which needlessly wastes
- time.
-
- Automatic rounding-up to page-size units is normally sufficient
- to avoid measurable overhead, so the default is 0. However, in
- systems where sbrk is relatively slow, it can pay to increase
- this value, at the expense of carrying around more memory than
- the program needs.
-
-*/
-
-
-#ifndef DEFAULT_MMAP_THRESHOLD
-#define DEFAULT_MMAP_THRESHOLD (128 * 1024)
-#endif
-
-/*
-
- M_MMAP_THRESHOLD is the request size threshold for using mmap()
- to service a request. Requests of at least this size that cannot
- be allocated using already-existing space will be serviced via mmap.
- (If enough normal freed space already exists it is used instead.)
-
- Using mmap segregates relatively large chunks of memory so that
- they can be individually obtained and released from the host
- system. A request serviced through mmap is never reused by any
- other request (at least not directly; the system may just so
- happen to remap successive requests to the same locations).
-
- Segregating space in this way has the benefit that mmapped space
- can ALWAYS be individually released back to the system, which
- helps keep the system level memory demands of a long-lived
- program low. Mapped memory can never become `locked' between
- other chunks, as can happen with normally allocated chunks, which
- menas that even trimming via malloc_trim would not release them.
-
- However, it has the disadvantages that:
-
- 1. The space cannot be reclaimed, consolidated, and then
- used to service later requests, as happens with normal chunks.
- 2. It can lead to more wastage because of mmap page alignment
- requirements
- 3. It causes malloc performance to be more dependent on host
- system memory management support routines which may vary in
- implementation quality and may impose arbitrary
- limitations. Generally, servicing a request via normal
- malloc steps is faster than going through a system's mmap.
-
- All together, these considerations should lead you to use mmap
- only for relatively large requests.
-
-
-*/
-
-
-
-#ifndef DEFAULT_MMAP_MAX
-#if HAVE_MMAP
-#define DEFAULT_MMAP_MAX (1024)
-#else
-#define DEFAULT_MMAP_MAX (0)
-#endif
-#endif
-
-/*
- M_MMAP_MAX is the maximum number of requests to simultaneously
- service using mmap. This parameter exists because:
-
- 1. Some systems have a limited number of internal tables for
- use by mmap.
- 2. In most systems, overreliance on mmap can degrade overall
- performance.
- 3. If a program allocates many large regions, it is probably
- better off using normal sbrk-based allocation routines that
- can reclaim and reallocate normal heap memory. Using a
- small value allows transition into this mode after the
- first few allocations.
-
- Setting to 0 disables all use of mmap. If HAVE_MMAP is not set,
- the default value is 0, and attempts to set it to non-zero values
- in mallopt will fail.
-*/
-
-
-
-#ifndef DEFAULT_CHECK_ACTION
-#define DEFAULT_CHECK_ACTION 1
-#endif
-
-/* What to do if the standard debugging hooks are in place and a
- corrupt pointer is detected: do nothing (0), print an error message
- (1), or call abort() (2). */
-
-
-
-#define HEAP_MIN_SIZE (32*1024)
-#define HEAP_MAX_SIZE (1024*1024) /* must be a power of two */
-
-/* HEAP_MIN_SIZE and HEAP_MAX_SIZE limit the size of mmap()ed heaps
- that are dynamically created for multi-threaded programs. The
- maximum size must be a power of two, for fast determination of
- which heap belongs to a chunk. It should be much larger than
- the mmap threshold, so that requests with a size just below that
- threshold can be fulfilled without creating too many heaps.
-*/
-
-
-
-#ifndef THREAD_STATS
-#define THREAD_STATS 0
-#endif
-
-/* If THREAD_STATS is non-zero, some statistics on mutex locking are
- computed. */
-
-
-/* Macro to set errno. */
-#ifndef __set_errno
-# define __set_errno(val) errno = (val)
-#endif
-
-/* On some platforms we can compile internal, not exported functions better.
- Let the environment provide a macro and define it to be empty if it
- is not available. */
-#ifndef internal_function
-# define internal_function
-#endif
-
-
-/*
-
- Special defines for the Linux/GNU C library.
-
-*/
-
-
-#ifdef _LIBC
-
-#if __STD_C
-
-Void_t * __default_morecore (ptrdiff_t);
-Void_t *(*__morecore)(ptrdiff_t) = __default_morecore;
-
-#else
-
-Void_t * __default_morecore ();
-Void_t *(*__morecore)() = __default_morecore;
-
-#endif
-
-#define MORECORE (*__morecore)
-#define MORECORE_FAILURE 0
-
-#ifndef MORECORE_CLEARS
-#define MORECORE_CLEARS 1
-#endif
-
-static size_t __libc_pagesize;
-
-#define access __access
-#define mmap __mmap
-#define munmap __munmap
-#define mremap __mremap
-#define mprotect __mprotect
-#undef malloc_getpagesize
-#define malloc_getpagesize __libc_pagesize
-
-#else /* _LIBC */
-
-#if __STD_C
-extern Void_t* sbrk(ptrdiff_t);
-#else
-extern Void_t* sbrk();
-#endif
-
-#ifndef MORECORE
-#define MORECORE sbrk
-#endif
-
-#ifndef MORECORE_FAILURE
-#define MORECORE_FAILURE -1
-#endif
-
-#ifndef MORECORE_CLEARS
-#define MORECORE_CLEARS 1
-#endif
-
-#endif /* _LIBC */
-
-#ifdef _LIBC
-
-#define cALLOc __libc_calloc
-#define fREe __libc_free
-#define mALLOc __libc_malloc
-#define mEMALIGn __libc_memalign
-#define rEALLOc __libc_realloc
-#define vALLOc __libc_valloc
-#define pvALLOc __libc_pvalloc
-#define mALLINFo __libc_mallinfo
-#define mALLOPt __libc_mallopt
-#define mALLOC_STATs __malloc_stats
-#define mALLOC_USABLE_SIZe __malloc_usable_size
-#define mALLOC_TRIm __malloc_trim
-#define mALLOC_GET_STATe __malloc_get_state
-#define mALLOC_SET_STATe __malloc_set_state
-
-#else
-
-#define cALLOc calloc
-#define fREe free
-#define mALLOc malloc
-#define mEMALIGn memalign
-#define rEALLOc realloc
-#define vALLOc valloc
-#define pvALLOc pvalloc
-#define mALLINFo mallinfo
-#define mALLOPt mallopt
-#define mALLOC_STATs malloc_stats
-#define mALLOC_USABLE_SIZe malloc_usable_size
-#define mALLOC_TRIm malloc_trim
-#define mALLOC_GET_STATe malloc_get_state
-#define mALLOC_SET_STATe malloc_set_state
-
-#endif
-
-/* Public routines */
-
-#if __STD_C
-
-#ifndef _LIBC
-void ptmalloc_init(void);
-#endif
-Void_t* mALLOc(size_t);
-void fREe(Void_t*);
-Void_t* rEALLOc(Void_t*, size_t);
-Void_t* mEMALIGn(size_t, size_t);
-Void_t* vALLOc(size_t);
-Void_t* pvALLOc(size_t);
-Void_t* cALLOc(size_t, size_t);
-void cfree(Void_t*);
-int mALLOC_TRIm(size_t);
-size_t mALLOC_USABLE_SIZe(Void_t*);
-void mALLOC_STATs(void);
-int mALLOPt(int, int);
-struct mallinfo mALLINFo(void);
-Void_t* mALLOC_GET_STATe(void);
-int mALLOC_SET_STATe(Void_t*);
-
-#else /* !__STD_C */
-
-#ifndef _LIBC
-void ptmalloc_init();
-#endif
-Void_t* mALLOc();
-void fREe();
-Void_t* rEALLOc();
-Void_t* mEMALIGn();
-Void_t* vALLOc();
-Void_t* pvALLOc();
-Void_t* cALLOc();
-void cfree();
-int mALLOC_TRIm();
-size_t mALLOC_USABLE_SIZe();
-void mALLOC_STATs();
-int mALLOPt();
-struct mallinfo mALLINFo();
-Void_t* mALLOC_GET_STATe();
-int mALLOC_SET_STATe();
-
-#endif /* __STD_C */
-
-
-#ifdef __cplusplus
-} /* end of extern "C" */
-#endif
-
-#if !defined(NO_THREADS) && !HAVE_MMAP
-"Can't have threads support without mmap"
-#endif
-#if USE_ARENAS && !HAVE_MMAP
-"Can't have multiple arenas without mmap"
-#endif
-
-
-/*
- Type declarations
-*/
-
-
-struct malloc_chunk
-{
- INTERNAL_SIZE_T prev_size; /* Size of previous chunk (if free). */
- INTERNAL_SIZE_T size; /* Size in bytes, including overhead. */
- struct malloc_chunk* fd; /* double links -- used only if free. */
- struct malloc_chunk* bk;
-};
-
-typedef struct malloc_chunk* mchunkptr;
-
-/*
-
- malloc_chunk details:
-
- (The following includes lightly edited explanations by Colin Plumb.)
-
- Chunks of memory are maintained using a `boundary tag' method as
- described in e.g., Knuth or Standish. (See the paper by Paul
- Wilson ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps for a
- survey of such techniques.) Sizes of free chunks are stored both
- in the front of each chunk and at the end. This makes
- consolidating fragmented chunks into bigger chunks very fast. The
- size fields also hold bits representing whether chunks are free or
- in use.
-
- An allocated chunk looks like this:
-
-
- chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of previous chunk, if allocated | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of chunk, in bytes |P|
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | User data starts here... .
- . .
- . (malloc_usable_space() bytes) .
- . |
-nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of chunk |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-
- Where "chunk" is the front of the chunk for the purpose of most of
- the malloc code, but "mem" is the pointer that is returned to the
- user. "Nextchunk" is the beginning of the next contiguous chunk.
-
- Chunks always begin on even word boundaries, so the mem portion
- (which is returned to the user) is also on an even word boundary, and
- thus double-word aligned.
-
- Free chunks are stored in circular doubly-linked lists, and look like this:
-
- chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of previous chunk |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- `head:' | Size of chunk, in bytes |P|
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Forward pointer to next chunk in list |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Back pointer to previous chunk in list |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Unused space (may be 0 bytes long) .
- . .
- . |
-nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- `foot:' | Size of chunk, in bytes |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
- The P (PREV_INUSE) bit, stored in the unused low-order bit of the
- chunk size (which is always a multiple of two words), is an in-use
- bit for the *previous* chunk. If that bit is *clear*, then the
- word before the current chunk size contains the previous chunk
- size, and can be used to find the front of the previous chunk.
- (The very first chunk allocated always has this bit set,
- preventing access to non-existent (or non-owned) memory.)
-
- Note that the `foot' of the current chunk is actually represented
- as the prev_size of the NEXT chunk. (This makes it easier to
- deal with alignments etc).
-
- The two exceptions to all this are
-
- 1. The special chunk `top', which doesn't bother using the
- trailing size field since there is no
- next contiguous chunk that would have to index off it. (After
- initialization, `top' is forced to always exist. If it would
- become less than MINSIZE bytes long, it is replenished via
- malloc_extend_top.)
-
- 2. Chunks allocated via mmap, which have the second-lowest-order
- bit (IS_MMAPPED) set in their size fields. Because they are
- never merged or traversed from any other chunk, they have no
- foot size or inuse information.
-
- Available chunks are kept in any of several places (all declared below):
-
- * `av': An array of chunks serving as bin headers for consolidated
- chunks. Each bin is doubly linked. The bins are approximately
- proportionally (log) spaced. There are a lot of these bins
- (128). This may look excessive, but works very well in
- practice. All procedures maintain the invariant that no
- consolidated chunk physically borders another one. Chunks in
- bins are kept in size order, with ties going to the
- approximately least recently used chunk.
-
- The chunks in each bin are maintained in decreasing sorted order by
- size. This is irrelevant for the small bins, which all contain
- the same-sized chunks, but facilitates best-fit allocation for
- larger chunks. (These lists are just sequential. Keeping them in
- order almost never requires enough traversal to warrant using
- fancier ordered data structures.) Chunks of the same size are
- linked with the most recently freed at the front, and allocations
- are taken from the back. This results in LRU or FIFO allocation
- order, which tends to give each chunk an equal opportunity to be
- consolidated with adjacent freed chunks, resulting in larger free
- chunks and less fragmentation.
-
- * `top': The top-most available chunk (i.e., the one bordering the
- end of available memory) is treated specially. It is never
- included in any bin, is used only if no other chunk is
- available, and is released back to the system if it is very
- large (see M_TRIM_THRESHOLD).
-
- * `last_remainder': A bin holding only the remainder of the
- most recently split (non-top) chunk. This bin is checked
- before other non-fitting chunks, so as to provide better
- locality for runs of sequentially allocated chunks.
-
- * Implicitly, through the host system's memory mapping tables.
- If supported, requests greater than a threshold are usually
- serviced via calls to mmap, and then later released via munmap.
-
-*/
-
-/*
- Bins
-
- The bins are an array of pairs of pointers serving as the
- heads of (initially empty) doubly-linked lists of chunks, laid out
- in a way so that each pair can be treated as if it were in a
- malloc_chunk. (This way, the fd/bk offsets for linking bin heads
- and chunks are the same).
-
- Bins for sizes < 512 bytes contain chunks of all the same size, spaced
- 8 bytes apart. Larger bins are approximately logarithmically
- spaced. (See the table below.)
-
- Bin layout:
-
- 64 bins of size 8
- 32 bins of size 64
- 16 bins of size 512
- 8 bins of size 4096
- 4 bins of size 32768
- 2 bins of size 262144
- 1 bin of size what's left
-
- There is actually a little bit of slop in the numbers in bin_index
- for the sake of speed. This makes no difference elsewhere.
-
- The special chunks `top' and `last_remainder' get their own bins,
- (this is implemented via yet more trickery with the av array),
- although `top' is never properly linked to its bin since it is
- always handled specially.
-
-*/
-
-#define NAV 128 /* number of bins */
-
-typedef struct malloc_chunk* mbinptr;
-
-/* An arena is a configuration of malloc_chunks together with an array
- of bins. With multiple threads, it must be locked via a mutex
- before changing its data structures. One or more `heaps' are
- associated with each arena, except for the main_arena, which is
- associated only with the `main heap', i.e. the conventional free
- store obtained with calls to MORECORE() (usually sbrk). The `av'
- array is never mentioned directly in the code, but instead used via
- bin access macros. */
-
-typedef struct _arena {
- mbinptr av[2*NAV + 2];
- struct _arena *next;
- size_t size;
-#if THREAD_STATS
- long stat_lock_direct, stat_lock_loop, stat_lock_wait;
-#endif
- mutex_t mutex;
-} arena;
-
-
-/* A heap is a single contiguous memory region holding (coalesceable)
- malloc_chunks. It is allocated with mmap() and always starts at an
- address aligned to HEAP_MAX_SIZE. Not used unless compiling with
- USE_ARENAS. */
-
-typedef struct _heap_info {
- arena *ar_ptr; /* Arena for this heap. */
- struct _heap_info *prev; /* Previous heap. */
- size_t size; /* Current size in bytes. */
- size_t pad; /* Make sure the following data is properly aligned. */
-} heap_info;
-
-
-/*
- Static functions (forward declarations)
-*/
-
-#if __STD_C
-
-static void chunk_free(arena *ar_ptr, mchunkptr p) internal_function;
-static mchunkptr chunk_alloc(arena *ar_ptr, INTERNAL_SIZE_T size)
- internal_function;
-static mchunkptr chunk_realloc(arena *ar_ptr, mchunkptr oldp,
- INTERNAL_SIZE_T oldsize, INTERNAL_SIZE_T nb)
- internal_function;
-static mchunkptr chunk_align(arena *ar_ptr, INTERNAL_SIZE_T nb,
- size_t alignment) internal_function;
-static int main_trim(size_t pad) internal_function;
-#if USE_ARENAS
-static int heap_trim(heap_info *heap, size_t pad) internal_function;
-#endif
-#if defined _LIBC || defined MALLOC_HOOKS
-static Void_t* malloc_check(size_t sz, const Void_t *caller);
-static void free_check(Void_t* mem, const Void_t *caller);
-static Void_t* realloc_check(Void_t* oldmem, size_t bytes,
- const Void_t *caller);
-static Void_t* memalign_check(size_t alignment, size_t bytes,
- const Void_t *caller);
-#ifndef NO_THREADS
-static Void_t* malloc_starter(size_t sz, const Void_t *caller);
-static void free_starter(Void_t* mem, const Void_t *caller);
-static Void_t* malloc_atfork(size_t sz, const Void_t *caller);
-static void free_atfork(Void_t* mem, const Void_t *caller);
-#endif
-#endif
-
-#else
-
-static void chunk_free();
-static mchunkptr chunk_alloc();
-static mchunkptr chunk_realloc();
-static mchunkptr chunk_align();
-static int main_trim();
-#if USE_ARENAS
-static int heap_trim();
-#endif
-#if defined _LIBC || defined MALLOC_HOOKS
-static Void_t* malloc_check();
-static void free_check();
-static Void_t* realloc_check();
-static Void_t* memalign_check();
-#ifndef NO_THREADS
-static Void_t* malloc_starter();
-static void free_starter();
-static Void_t* malloc_atfork();
-static void free_atfork();
-#endif
-#endif
-
-#endif
-
-
-
-/* sizes, alignments */
-
-#define SIZE_SZ (sizeof(INTERNAL_SIZE_T))
-/* Allow the default to be overwritten on the compiler command line. */
-#ifndef MALLOC_ALIGNMENT
-# define MALLOC_ALIGNMENT (SIZE_SZ + SIZE_SZ)
-#endif
-#define MALLOC_ALIGN_MASK (MALLOC_ALIGNMENT - 1)
-#define MINSIZE (sizeof(struct malloc_chunk))
-
-/* conversion from malloc headers to user pointers, and back */
-
-#define chunk2mem(p) ((Void_t*)((char*)(p) + 2*SIZE_SZ))
-#define mem2chunk(mem) chunk_at_offset((mem), -2*SIZE_SZ)
-
-/* pad request bytes into a usable size, return non-zero on overflow */
-
-#define request2size(req, nb) \
- ((nb = (req) + (SIZE_SZ + MALLOC_ALIGN_MASK)),\
- ((long)nb <= 0 || nb < (INTERNAL_SIZE_T) (req) \
- ? (__set_errno (ENOMEM), 1) \
- : ((nb < (MINSIZE + MALLOC_ALIGN_MASK) \
- ? (nb = MINSIZE) : (nb &= ~MALLOC_ALIGN_MASK)), 0)))
-
-/* Check if m has acceptable alignment */
-
-#define aligned_OK(m) (((unsigned long)((m)) & (MALLOC_ALIGN_MASK)) == 0)
-
-
-
-
-/*
- Physical chunk operations
-*/
-
-
-/* size field is or'ed with PREV_INUSE when previous adjacent chunk in use */
-
-#define PREV_INUSE 0x1UL
-
-/* size field is or'ed with IS_MMAPPED if the chunk was obtained with mmap() */
-
-#define IS_MMAPPED 0x2UL
-
-/* Bits to mask off when extracting size */
-
-#define SIZE_BITS (PREV_INUSE|IS_MMAPPED)
-
-
-/* Ptr to next physical malloc_chunk. */
-
-#define next_chunk(p) chunk_at_offset((p), (p)->size & ~PREV_INUSE)
-
-/* Ptr to previous physical malloc_chunk */
-
-#define prev_chunk(p) chunk_at_offset((p), -(p)->prev_size)
-
-
-/* Treat space at ptr + offset as a chunk */
-
-#define chunk_at_offset(p, s) BOUNDED_1((mchunkptr)(((char*)(p)) + (s)))
-
-
-
-
-/*
- Dealing with use bits
-*/
-
-/* extract p's inuse bit */
-
-#define inuse(p) (next_chunk(p)->size & PREV_INUSE)
-
-/* extract inuse bit of previous chunk */
-
-#define prev_inuse(p) ((p)->size & PREV_INUSE)
-
-/* check for mmap()'ed chunk */
-
-#define chunk_is_mmapped(p) ((p)->size & IS_MMAPPED)
-
-/* set/clear chunk as in use without otherwise disturbing */
-
-#define set_inuse(p) (next_chunk(p)->size |= PREV_INUSE)
-
-#define clear_inuse(p) (next_chunk(p)->size &= ~PREV_INUSE)
-
-/* check/set/clear inuse bits in known places */
-
-#define inuse_bit_at_offset(p, s) \
- (chunk_at_offset((p), (s))->size & PREV_INUSE)
-
-#define set_inuse_bit_at_offset(p, s) \
- (chunk_at_offset((p), (s))->size |= PREV_INUSE)
-
-#define clear_inuse_bit_at_offset(p, s) \
- (chunk_at_offset((p), (s))->size &= ~(PREV_INUSE))
-
-
-
-
-/*
- Dealing with size fields
-*/
-
-/* Get size, ignoring use bits */
-
-#define chunksize(p) ((p)->size & ~(SIZE_BITS))
-
-/* Set size at head, without disturbing its use bit */
-
-#define set_head_size(p, s) ((p)->size = (((p)->size & PREV_INUSE) | (s)))
-
-/* Set size/use ignoring previous bits in header */
-
-#define set_head(p, s) ((p)->size = (s))
-
-/* Set size at footer (only when chunk is not in use) */
-
-#define set_foot(p, s) (chunk_at_offset(p, s)->prev_size = (s))
-
-
-
-
-
-/* access macros */
-
-#define bin_at(a, i) BOUNDED_1(_bin_at(a, i))
-#define _bin_at(a, i) ((mbinptr)((char*)&(((a)->av)[2*(i)+2]) - 2*SIZE_SZ))
-#define init_bin(a, i) ((a)->av[2*(i)+2] = (a)->av[2*(i)+3] = bin_at((a), (i)))
-#define next_bin(b) ((mbinptr)((char*)(b) + 2 * sizeof(((arena*)0)->av[0])))
-#define prev_bin(b) ((mbinptr)((char*)(b) - 2 * sizeof(((arena*)0)->av[0])))
-
-/*
- The first 2 bins are never indexed. The corresponding av cells are instead
- used for bookkeeping. This is not to save space, but to simplify
- indexing, maintain locality, and avoid some initialization tests.
-*/
-
-#define binblocks(a) (bin_at(a,0)->size)/* bitvector of nonempty blocks */
-#define top(a) (bin_at(a,0)->fd) /* The topmost chunk */
-#define last_remainder(a) (bin_at(a,1)) /* remainder from last split */
-
-/*
- Because top initially points to its own bin with initial
- zero size, thus forcing extension on the first malloc request,
- we avoid having any special code in malloc to check whether
- it even exists yet. But we still need to in malloc_extend_top.
-*/
-
-#define initial_top(a) ((mchunkptr)bin_at(a, 0))
-
-
-
-/* field-extraction macros */
-
-#define first(b) ((b)->fd)
-#define last(b) ((b)->bk)
-
-/*
- Indexing into bins
-*/
-
-#define bin_index(sz) \
-(((((unsigned long)(sz)) >> 9) == 0) ? (((unsigned long)(sz)) >> 3):\
- ((((unsigned long)(sz)) >> 9) <= 4) ? 56 + (((unsigned long)(sz)) >> 6):\
- ((((unsigned long)(sz)) >> 9) <= 20) ? 91 + (((unsigned long)(sz)) >> 9):\
- ((((unsigned long)(sz)) >> 9) <= 84) ? 110 + (((unsigned long)(sz)) >> 12):\
- ((((unsigned long)(sz)) >> 9) <= 340) ? 119 + (((unsigned long)(sz)) >> 15):\
- ((((unsigned long)(sz)) >> 9) <= 1364) ? 124 + (((unsigned long)(sz)) >> 18):\
- 126)
-/*
- bins for chunks < 512 are all spaced 8 bytes apart, and hold
- identically sized chunks. This is exploited in malloc.
-*/
-
-#define MAX_SMALLBIN 63
-#define MAX_SMALLBIN_SIZE 512
-#define SMALLBIN_WIDTH 8
-
-#define smallbin_index(sz) (((unsigned long)(sz)) >> 3)
-
-/*
- Requests are `small' if both the corresponding and the next bin are small
-*/
-
-#define is_small_request(nb) ((nb) < MAX_SMALLBIN_SIZE - SMALLBIN_WIDTH)
-
-
-
-/*
- To help compensate for the large number of bins, a one-level index
- structure is used for bin-by-bin searching. `binblocks' is a
- one-word bitvector recording whether groups of BINBLOCKWIDTH bins
- have any (possibly) non-empty bins, so they can be skipped over
- all at once during during traversals. The bits are NOT always
- cleared as soon as all bins in a block are empty, but instead only
- when all are noticed to be empty during traversal in malloc.
-*/
-
-#define BINBLOCKWIDTH 4 /* bins per block */
-
-/* bin<->block macros */
-
-#define idx2binblock(ix) ((unsigned)1 << ((ix) / BINBLOCKWIDTH))
-#define mark_binblock(a, ii) (binblocks(a) |= idx2binblock(ii))
-#define clear_binblock(a, ii) (binblocks(a) &= ~(idx2binblock(ii)))
-
-
-
-
-/* Static bookkeeping data */
-
-/* Helper macro to initialize bins */
-#define IAV(i) _bin_at(&main_arena, i), _bin_at(&main_arena, i)
-
-static arena main_arena = {
- {
- 0, 0,
- IAV(0), IAV(1), IAV(2), IAV(3), IAV(4), IAV(5), IAV(6), IAV(7),
- IAV(8), IAV(9), IAV(10), IAV(11), IAV(12), IAV(13), IAV(14), IAV(15),
- IAV(16), IAV(17), IAV(18), IAV(19), IAV(20), IAV(21), IAV(22), IAV(23),
- IAV(24), IAV(25), IAV(26), IAV(27), IAV(28), IAV(29), IAV(30), IAV(31),
- IAV(32), IAV(33), IAV(34), IAV(35), IAV(36), IAV(37), IAV(38), IAV(39),
- IAV(40), IAV(41), IAV(42), IAV(43), IAV(44), IAV(45), IAV(46), IAV(47),
- IAV(48), IAV(49), IAV(50), IAV(51), IAV(52), IAV(53), IAV(54), IAV(55),
- IAV(56), IAV(57), IAV(58), IAV(59), IAV(60), IAV(61), IAV(62), IAV(63),
- IAV(64), IAV(65), IAV(66), IAV(67), IAV(68), IAV(69), IAV(70), IAV(71),
- IAV(72), IAV(73), IAV(74), IAV(75), IAV(76), IAV(77), IAV(78), IAV(79),
- IAV(80), IAV(81), IAV(82), IAV(83), IAV(84), IAV(85), IAV(86), IAV(87),
- IAV(88), IAV(89), IAV(90), IAV(91), IAV(92), IAV(93), IAV(94), IAV(95),
- IAV(96), IAV(97), IAV(98), IAV(99), IAV(100), IAV(101), IAV(102), IAV(103),
- IAV(104), IAV(105), IAV(106), IAV(107), IAV(108), IAV(109), IAV(110), IAV(111),
- IAV(112), IAV(113), IAV(114), IAV(115), IAV(116), IAV(117), IAV(118), IAV(119),
- IAV(120), IAV(121), IAV(122), IAV(123), IAV(124), IAV(125), IAV(126), IAV(127)
- },
- &main_arena, /* next */
- 0, /* size */
-#if THREAD_STATS
- 0, 0, 0, /* stat_lock_direct, stat_lock_loop, stat_lock_wait */
-#endif
- MUTEX_INITIALIZER /* mutex */
-};
-
-#undef IAV
-
-/* Thread specific data */
-
-static tsd_key_t arena_key;
-static mutex_t list_lock = MUTEX_INITIALIZER;
-
-#if THREAD_STATS
-static int stat_n_heaps;
-#define THREAD_STAT(x) x
-#else
-#define THREAD_STAT(x) do ; while(0)
-#endif
-
-/* variables holding tunable values */
-
-static unsigned long trim_threshold = DEFAULT_TRIM_THRESHOLD;
-static unsigned long top_pad = DEFAULT_TOP_PAD;
-static unsigned int n_mmaps_max = DEFAULT_MMAP_MAX;
-static unsigned long mmap_threshold = DEFAULT_MMAP_THRESHOLD;
-static int check_action = DEFAULT_CHECK_ACTION;
-
-/* The first value returned from sbrk */
-static char* sbrk_base = (char*)(-1);
-
-/* The maximum memory obtained from system via sbrk */
-static unsigned long max_sbrked_mem;
-
-/* The maximum via either sbrk or mmap (too difficult to track with threads) */
-#ifdef NO_THREADS
-static unsigned long max_total_mem;
-#endif
-
-/* The total memory obtained from system via sbrk */
-#define sbrked_mem (main_arena.size)
-
-/* Tracking mmaps */
-
-static unsigned int n_mmaps;
-static unsigned int max_n_mmaps;
-static unsigned long mmapped_mem;
-static unsigned long max_mmapped_mem;
-
-/* Mapped memory in non-main arenas (reliable only for NO_THREADS). */
-static unsigned long arena_mem;
-
-
-
-#ifndef _LIBC
-#define weak_variable
-#else
-/* In GNU libc we want the hook variables to be weak definitions to
- avoid a problem with Emacs. */
-#define weak_variable weak_function
-#endif
-
-/* Already initialized? */
-int __malloc_initialized = -1;
-
-
-#ifndef NO_THREADS
-
-/* Magic value for the thread-specific arena pointer when
- malloc_atfork() is in use. */
-
-#define ATFORK_ARENA_PTR ((Void_t*)-1)
-
-/* The following two functions are registered via thread_atfork() to
- make sure that the mutexes remain in a consistent state in the
- fork()ed version of a thread. Also adapt the malloc and free hooks
- temporarily, because the `atfork' handler mechanism may use
- malloc/free internally (e.g. in LinuxThreads). */
-
-#if defined _LIBC || defined MALLOC_HOOKS
-static __malloc_ptr_t (*save_malloc_hook) __MALLOC_P ((size_t __size,
- const __malloc_ptr_t));
-static void (*save_free_hook) __MALLOC_P ((__malloc_ptr_t __ptr,
- const __malloc_ptr_t));
-static Void_t* save_arena;
-#endif
-
-static void
-ptmalloc_lock_all __MALLOC_P((void))
-{
- arena *ar_ptr;
-
- (void)mutex_lock(&list_lock);
- for(ar_ptr = &main_arena;;) {
- (void)mutex_lock(&ar_ptr->mutex);
- ar_ptr = ar_ptr->next;
- if(ar_ptr == &main_arena) break;
- }
-#if defined _LIBC || defined MALLOC_HOOKS
- save_malloc_hook = __malloc_hook;
- save_free_hook = __free_hook;
- __malloc_hook = malloc_atfork;
- __free_hook = free_atfork;
- /* Only the current thread may perform malloc/free calls now. */
- tsd_getspecific(arena_key, save_arena);
- tsd_setspecific(arena_key, ATFORK_ARENA_PTR);
-#endif
-}
-
-static void
-ptmalloc_unlock_all __MALLOC_P((void))
-{
- arena *ar_ptr;
-
-#if defined _LIBC || defined MALLOC_HOOKS
- tsd_setspecific(arena_key, save_arena);
- __malloc_hook = save_malloc_hook;
- __free_hook = save_free_hook;
-#endif
- for(ar_ptr = &main_arena;;) {
- (void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = ar_ptr->next;
- if(ar_ptr == &main_arena) break;
- }
- (void)mutex_unlock(&list_lock);
-}
-
-static void
-ptmalloc_init_all __MALLOC_P((void))
-{
- arena *ar_ptr;
-
-#if defined _LIBC || defined MALLOC_HOOKS
- tsd_setspecific(arena_key, save_arena);
- __malloc_hook = save_malloc_hook;
- __free_hook = save_free_hook;
-#endif
- for(ar_ptr = &main_arena;;) {
- (void)mutex_init(&ar_ptr->mutex);
- ar_ptr = ar_ptr->next;
- if(ar_ptr == &main_arena) break;
- }
- (void)mutex_init(&list_lock);
-}
-
-#endif /* !defined NO_THREADS */
-
-/* Initialization routine. */
-#if defined(_LIBC)
-#if 0
-static void ptmalloc_init __MALLOC_P ((void)) __attribute__ ((constructor));
-#endif
-
-#ifdef _LIBC
-#include <string.h>
-extern char **environ;
-
-static char *
-internal_function
-next_env_entry (char ***position)
-{
- char **current = *position;
- char *result = NULL;
-
- while (*current != NULL)
- {
- if (__builtin_expect ((*current)[0] == 'M', 0)
- && (*current)[1] == 'A'
- && (*current)[2] == 'L'
- && (*current)[3] == 'L'
- && (*current)[4] == 'O'
- && (*current)[5] == 'C'
- && (*current)[6] == '_')
- {
- result = &(*current)[7];
-
- /* Save current position for next visit. */
- *position = ++current;
-
- break;
- }
-
- ++current;
- }
-
- return result;
-}
-#endif
-
-static void
-ptmalloc_init __MALLOC_P((void))
-#else
-void
-ptmalloc_init __MALLOC_P((void))
-#endif
-{
-#if defined _LIBC || defined MALLOC_HOOKS
-# if __STD_C
- const char* s;
-# else
- char* s;
-# endif
-#endif
- int secure;
-
- if(__malloc_initialized >= 0) return;
- __malloc_initialized = 0;
-#ifdef _LIBC
- __libc_pagesize = __getpagesize();
-#endif
-#ifndef NO_THREADS
-#if defined _LIBC || defined MALLOC_HOOKS
- /* With some threads implementations, creating thread-specific data
- or initializing a mutex may call malloc() itself. Provide a
- simple starter version (realloc() won't work). */
- save_malloc_hook = __malloc_hook;
- save_free_hook = __free_hook;
- __malloc_hook = malloc_starter;
- __free_hook = free_starter;
-#endif
-#ifdef _LIBC
- /* Initialize the pthreads interface. */
- if (__pthread_initialize != NULL)
- __pthread_initialize();
-#endif
-#endif /* !defined NO_THREADS */
- mutex_init(&main_arena.mutex);
- mutex_init(&list_lock);
- tsd_key_create(&arena_key, NULL);
- tsd_setspecific(arena_key, (Void_t *)&main_arena);
- thread_atfork(ptmalloc_lock_all, ptmalloc_unlock_all, ptmalloc_init_all);
-#if defined _LIBC || defined MALLOC_HOOKS
-#ifndef NO_THREADS
- __malloc_hook = save_malloc_hook;
- __free_hook = save_free_hook;
-#endif
- secure = __libc_enable_secure;
-#ifdef _LIBC
- s = NULL;
- if (environ != NULL)
- {
- char **runp = environ;
- char *envline;
-
- while (__builtin_expect ((envline = next_env_entry (&runp)) != NULL, 0))
- {
- size_t len = strcspn (envline, "=");
-
- if (envline[len] != '=')
- /* This is a "MALLOC_" variable at the end of the string
- without a '=' character. Ignore it since otherwise we
- will access invalid memory below. */
- continue;
-
- switch (len)
- {
- case 6:
- if (memcmp (envline, "CHECK_", 6) == 0)
- s = &envline[7];
- break;
- case 8:
- if (! secure && memcmp (envline, "TOP_PAD_", 8) == 0)
- mALLOPt(M_TOP_PAD, atoi(&envline[9]));
- break;
- case 9:
- if (! secure && memcmp (envline, "MMAP_MAX_", 9) == 0)
- mALLOPt(M_MMAP_MAX, atoi(&envline[10]));
- break;
- case 15:
- if (! secure)
- {
- if (memcmp (envline, "TRIM_THRESHOLD_", 15) == 0)
- mALLOPt(M_TRIM_THRESHOLD, atoi(&envline[16]));
- else if (memcmp (envline, "MMAP_THRESHOLD_", 15) == 0)
- mALLOPt(M_MMAP_THRESHOLD, atoi(&envline[16]));
- }
- break;
- default:
- break;
- }
- }
- }
-#else
- if (! secure)
- {
- if((s = getenv("MALLOC_TRIM_THRESHOLD_")))
- mALLOPt(M_TRIM_THRESHOLD, atoi(s));
- if((s = getenv("MALLOC_TOP_PAD_")))
- mALLOPt(M_TOP_PAD, atoi(s));
- if((s = getenv("MALLOC_MMAP_THRESHOLD_")))
- mALLOPt(M_MMAP_THRESHOLD, atoi(s));
- if((s = getenv("MALLOC_MMAP_MAX_")))
- mALLOPt(M_MMAP_MAX, atoi(s));
- }
- s = getenv("MALLOC_CHECK_");
-#endif
- if(s) {
- if(s[0]) mALLOPt(M_CHECK_ACTION, (int)(s[0] - '0'));
- __malloc_check_init();
- }
- if(__malloc_initialize_hook != NULL)
- (*__malloc_initialize_hook)();
-#endif
- __malloc_initialized = 1;
-}
-
-/* There are platforms (e.g. Hurd) with a link-time hook mechanism. */
-#ifdef thread_atfork_static
-thread_atfork_static(ptmalloc_lock_all, ptmalloc_unlock_all, \
- ptmalloc_init_all)
-#endif
-
-#if defined _LIBC || defined MALLOC_HOOKS
-
-/* Hooks for debugging versions. The initial hooks just call the
- initialization routine, then do the normal work. */
-
-static Void_t*
-#if __STD_C
-malloc_hook_ini(size_t sz, const __malloc_ptr_t caller)
-#else
-malloc_hook_ini(sz, caller)
- size_t sz; const __malloc_ptr_t caller;
-#endif
-{
- __malloc_hook = NULL;
- ptmalloc_init();
- return mALLOc(sz);
-}
-
-static Void_t*
-#if __STD_C
-realloc_hook_ini(Void_t* ptr, size_t sz, const __malloc_ptr_t caller)
-#else
-realloc_hook_ini(ptr, sz, caller)
- Void_t* ptr; size_t sz; const __malloc_ptr_t caller;
-#endif
-{
- __malloc_hook = NULL;
- __realloc_hook = NULL;
- ptmalloc_init();
- return rEALLOc(ptr, sz);
-}
-
-static Void_t*
-#if __STD_C
-memalign_hook_ini(size_t alignment, size_t sz, const __malloc_ptr_t caller)
-#else
-memalign_hook_ini(alignment, sz, caller)
- size_t alignment; size_t sz; const __malloc_ptr_t caller;
-#endif
-{
- __memalign_hook = NULL;
- ptmalloc_init();
- return mEMALIGn(alignment, sz);
-}
-
-void weak_variable (*__malloc_initialize_hook) __MALLOC_P ((void)) = NULL;
-void weak_variable (*__free_hook) __MALLOC_P ((__malloc_ptr_t __ptr,
- const __malloc_ptr_t)) = NULL;
-__malloc_ptr_t weak_variable (*__malloc_hook)
- __MALLOC_P ((size_t __size, const __malloc_ptr_t)) = malloc_hook_ini;
-__malloc_ptr_t weak_variable (*__realloc_hook)
- __MALLOC_P ((__malloc_ptr_t __ptr, size_t __size, const __malloc_ptr_t))
- = realloc_hook_ini;
-__malloc_ptr_t weak_variable (*__memalign_hook)
- __MALLOC_P ((size_t __alignment, size_t __size, const __malloc_ptr_t))
- = memalign_hook_ini;
-void weak_variable (*__after_morecore_hook) __MALLOC_P ((void)) = NULL;
-
-/* Whether we are using malloc checking. */
-static int using_malloc_checking;
-
-/* A flag that is set by malloc_set_state, to signal that malloc checking
- must not be enabled on the request from the user (via the MALLOC_CHECK_
- environment variable). It is reset by __malloc_check_init to tell
- malloc_set_state that the user has requested malloc checking.
-
- The purpose of this flag is to make sure that malloc checking is not
- enabled when the heap to be restored was constructed without malloc
- checking, and thus does not contain the required magic bytes.
- Otherwise the heap would be corrupted by calls to free and realloc. If
- it turns out that the heap was created with malloc checking and the
- user has requested it malloc_set_state just calls __malloc_check_init
- again to enable it. On the other hand, reusing such a heap without
- further malloc checking is safe. */
-static int disallow_malloc_check;
-
-/* Activate a standard set of debugging hooks. */
-void
-__malloc_check_init()
-{
- if (disallow_malloc_check) {
- disallow_malloc_check = 0;
- return;
- }
- using_malloc_checking = 1;
- __malloc_hook = malloc_check;
- __free_hook = free_check;
- __realloc_hook = realloc_check;
- __memalign_hook = memalign_check;
- if(check_action & 1)
- fprintf(stderr, "malloc: using debugging hooks\n");
-}
-
-#endif
-
-
-
-
-
-/* Routines dealing with mmap(). */
-
-#if HAVE_MMAP
-
-#ifndef MAP_ANONYMOUS
-
-static int dev_zero_fd = -1; /* Cached file descriptor for /dev/zero. */
-
-#define MMAP(addr, size, prot, flags) ((dev_zero_fd < 0) ? \
- (dev_zero_fd = open("/dev/zero", O_RDWR), \
- mmap((addr), (size), (prot), (flags), dev_zero_fd, 0)) : \
- mmap((addr), (size), (prot), (flags), dev_zero_fd, 0))
-
-#else
-
-#define MMAP(addr, size, prot, flags) \
- (mmap((addr), (size), (prot), (flags)|MAP_ANONYMOUS, -1, 0))
-
-#endif
-
-#if defined __GNUC__ && __GNUC__ >= 2
-/* This function is only called from one place, inline it. */
-__inline__
-#endif
-static mchunkptr
-internal_function
-#if __STD_C
-mmap_chunk(size_t size)
-#else
-mmap_chunk(size) size_t size;
-#endif
-{
- size_t page_mask = malloc_getpagesize - 1;
- mchunkptr p;
-
- /* For mmapped chunks, the overhead is one SIZE_SZ unit larger, because
- * there is no following chunk whose prev_size field could be used.
- */
- size = (size + SIZE_SZ + page_mask) & ~page_mask;
-
- p = (mchunkptr)MMAP(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE);
- if(p == (mchunkptr) MAP_FAILED) return 0;
-
- n_mmaps++;
- if (n_mmaps > max_n_mmaps) max_n_mmaps = n_mmaps;
-
- /* We demand that eight bytes into a page must be 8-byte aligned. */
- assert(aligned_OK(chunk2mem(p)));
-
- /* The offset to the start of the mmapped region is stored
- * in the prev_size field of the chunk; normally it is zero,
- * but that can be changed in memalign().
- */
- p->prev_size = 0;
- set_head(p, size|IS_MMAPPED);
-
- mmapped_mem += size;
- if ((unsigned long)mmapped_mem > (unsigned long)max_mmapped_mem)
- max_mmapped_mem = mmapped_mem;
-#ifdef NO_THREADS
- if ((unsigned long)(mmapped_mem + arena_mem + sbrked_mem) > max_total_mem)
- max_total_mem = mmapped_mem + arena_mem + sbrked_mem;
-#endif
- return p;
-}
-
-static void
-internal_function
-#if __STD_C
-munmap_chunk(mchunkptr p)
-#else
-munmap_chunk(p) mchunkptr p;
-#endif
-{
- INTERNAL_SIZE_T size = chunksize(p);
- int ret;
-
- assert (chunk_is_mmapped(p));
- assert(! ((char*)p >= sbrk_base && (char*)p < sbrk_base + sbrked_mem));
- assert((n_mmaps > 0));
- assert(((p->prev_size + size) & (malloc_getpagesize-1)) == 0);
-
- n_mmaps--;
- mmapped_mem -= (size + p->prev_size);
-
- ret = munmap((char *)p - p->prev_size, size + p->prev_size);
-
- /* munmap returns non-zero on failure */
- assert(ret == 0);
-}
-
-#if HAVE_MREMAP
-
-static mchunkptr
-internal_function
-#if __STD_C
-mremap_chunk(mchunkptr p, size_t new_size)
-#else
-mremap_chunk(p, new_size) mchunkptr p; size_t new_size;
-#endif
-{
- size_t page_mask = malloc_getpagesize - 1;
- INTERNAL_SIZE_T offset = p->prev_size;
- INTERNAL_SIZE_T size = chunksize(p);
- char *cp;
-
- assert (chunk_is_mmapped(p));
- assert(! ((char*)p >= sbrk_base && (char*)p < sbrk_base + sbrked_mem));
- assert((n_mmaps > 0));
- assert(((size + offset) & (malloc_getpagesize-1)) == 0);
-
- /* Note the extra SIZE_SZ overhead as in mmap_chunk(). */
- new_size = (new_size + offset + SIZE_SZ + page_mask) & ~page_mask;
-
- cp = (char *)mremap((char *)p - offset, size + offset, new_size,
- MREMAP_MAYMOVE);
-
- if (cp == MAP_FAILED) return 0;
-
- p = (mchunkptr)(cp + offset);
-
- assert(aligned_OK(chunk2mem(p)));
-
- assert((p->prev_size == offset));
- set_head(p, (new_size - offset)|IS_MMAPPED);
-
- mmapped_mem -= size + offset;
- mmapped_mem += new_size;
- if ((unsigned long)mmapped_mem > (unsigned long)max_mmapped_mem)
- max_mmapped_mem = mmapped_mem;
-#ifdef NO_THREADS
- if ((unsigned long)(mmapped_mem + arena_mem + sbrked_mem) > max_total_mem)
- max_total_mem = mmapped_mem + arena_mem + sbrked_mem;
-#endif
- return p;
-}
-
-#endif /* HAVE_MREMAP */
-
-#endif /* HAVE_MMAP */
-
-
-
-/* Managing heaps and arenas (for concurrent threads) */
-
-#if USE_ARENAS
-
-/* Create a new heap. size is automatically rounded up to a multiple
- of the page size. */
-
-static heap_info *
-internal_function
-#if __STD_C
-new_heap(size_t size)
-#else
-new_heap(size) size_t size;
-#endif
-{
- size_t page_mask = malloc_getpagesize - 1;
- char *p1, *p2;
- unsigned long ul;
- heap_info *h;
-
- if(size+top_pad < HEAP_MIN_SIZE)
- size = HEAP_MIN_SIZE;
- else if(size+top_pad <= HEAP_MAX_SIZE)
- size += top_pad;
- else if(size > HEAP_MAX_SIZE)
- return 0;
- else
- size = HEAP_MAX_SIZE;
- size = (size + page_mask) & ~page_mask;
-
- /* A memory region aligned to a multiple of HEAP_MAX_SIZE is needed.
- No swap space needs to be reserved for the following large
- mapping (on Linux, this is the case for all non-writable mappings
- anyway). */
- p1 = (char *)MMAP(0, HEAP_MAX_SIZE<<1, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE);
- if(p1 != MAP_FAILED) {
- p2 = (char *)(((unsigned long)p1 + (HEAP_MAX_SIZE-1)) & ~(HEAP_MAX_SIZE-1));
- ul = p2 - p1;
- if (ul)
- munmap(p1, ul);
- munmap(p2 + HEAP_MAX_SIZE, HEAP_MAX_SIZE - ul);
- } else {
- /* Try to take the chance that an allocation of only HEAP_MAX_SIZE
- is already aligned. */
- p2 = (char *)MMAP(0, HEAP_MAX_SIZE, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE);
- if(p2 == MAP_FAILED)
- return 0;
- if((unsigned long)p2 & (HEAP_MAX_SIZE-1)) {
- munmap(p2, HEAP_MAX_SIZE);
- return 0;
- }
- }
- if(MMAP(p2, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED)
- == (char *) MAP_FAILED) {
- munmap(p2, HEAP_MAX_SIZE);
- return 0;
- }
- h = (heap_info *)p2;
- h->size = size;
- THREAD_STAT(stat_n_heaps++);
- return h;
-}
-
-/* Grow or shrink a heap. size is automatically rounded up to a
- multiple of the page size if it is positive. */
-
-static int
-#if __STD_C
-grow_heap(heap_info *h, long diff)
-#else
-grow_heap(h, diff) heap_info *h; long diff;
-#endif
-{
- size_t page_mask = malloc_getpagesize - 1;
- long new_size;
-
- if(diff >= 0) {
- diff = (diff + page_mask) & ~page_mask;
- new_size = (long)h->size + diff;
- if(new_size > HEAP_MAX_SIZE)
- return -1;
- if(MMAP((char *)h + h->size, diff, PROT_READ|PROT_WRITE,
- MAP_PRIVATE|MAP_FIXED) == (char *) MAP_FAILED)
- return -2;
- } else {
- new_size = (long)h->size + diff;
- if(new_size < (long)sizeof(*h))
- return -1;
- /* Try to re-map the extra heap space freshly to save memory, and
- make it inaccessible. */
- if((char *)MMAP((char *)h + new_size, -diff, PROT_NONE,
- MAP_PRIVATE|MAP_FIXED) == (char *) MAP_FAILED)
- return -2;
- }
- h->size = new_size;
- return 0;
-}
-
-/* Delete a heap. */
-
-#define delete_heap(heap) munmap((char*)(heap), HEAP_MAX_SIZE)
-
-/* arena_get() acquires an arena and locks the corresponding mutex.
- First, try the one last locked successfully by this thread. (This
- is the common case and handled with a macro for speed.) Then, loop
- once over the circularly linked list of arenas. If no arena is
- readily available, create a new one. In this latter case, `size'
- is just a hint as to how much memory will be required immediately
- in the new arena. */
-
-#define arena_get(ptr, size) do { \
- Void_t *vptr = NULL; \
- ptr = (arena *)tsd_getspecific(arena_key, vptr); \
- if(ptr && !mutex_trylock(&ptr->mutex)) { \
- THREAD_STAT(++(ptr->stat_lock_direct)); \
- } else \
- ptr = arena_get2(ptr, (size)); \
-} while(0)
-
-static arena *
-internal_function
-#if __STD_C
-arena_get2(arena *a_tsd, size_t size)
-#else
-arena_get2(a_tsd, size) arena *a_tsd; size_t size;
-#endif
-{
- arena *a;
- heap_info *h;
- char *ptr;
- int i;
- unsigned long misalign;
-
- if(!a_tsd)
- a = a_tsd = &main_arena;
- else {
- a = a_tsd->next;
- if(!a) {
- /* This can only happen while initializing the new arena. */
- (void)mutex_lock(&main_arena.mutex);
- THREAD_STAT(++(main_arena.stat_lock_wait));
- return &main_arena;
- }
- }
-
- /* Check the global, circularly linked list for available arenas. */
- repeat:
- do {
- if(!mutex_trylock(&a->mutex)) {
- THREAD_STAT(++(a->stat_lock_loop));
- tsd_setspecific(arena_key, (Void_t *)a);
- return a;
- }
- a = a->next;
- } while(a != a_tsd);
-
- /* If not even the list_lock can be obtained, try again. This can
- happen during `atfork', or for example on systems where thread
- creation makes it temporarily impossible to obtain _any_
- locks. */
- if(mutex_trylock(&list_lock)) {
- a = a_tsd;
- goto repeat;
- }
- (void)mutex_unlock(&list_lock);
-
- /* Nothing immediately available, so generate a new arena. */
- h = new_heap(size + (sizeof(*h) + sizeof(*a) + MALLOC_ALIGNMENT));
- if(!h) {
- /* Maybe size is too large to fit in a single heap. So, just try
- to create a minimally-sized arena and let chunk_alloc() attempt
- to deal with the large request via mmap_chunk(). */
- h = new_heap(sizeof(*h) + sizeof(*a) + MALLOC_ALIGNMENT);
- if(!h)
- return 0;
- }
- a = h->ar_ptr = (arena *)(h+1);
- for(i=0; i<NAV; i++)
- init_bin(a, i);
- a->next = NULL;
- a->size = h->size;
- arena_mem += h->size;
-#ifdef NO_THREADS
- if((unsigned long)(mmapped_mem + arena_mem + sbrked_mem) > max_total_mem)
- max_total_mem = mmapped_mem + arena_mem + sbrked_mem;
-#endif
- tsd_setspecific(arena_key, (Void_t *)a);
- mutex_init(&a->mutex);
- i = mutex_lock(&a->mutex); /* remember result */
-
- /* Set up the top chunk, with proper alignment. */
- ptr = (char *)(a + 1);
- misalign = (unsigned long)chunk2mem(ptr) & MALLOC_ALIGN_MASK;
- if (misalign > 0)
- ptr += MALLOC_ALIGNMENT - misalign;
- top(a) = (mchunkptr)ptr;
- set_head(top(a), (((char*)h + h->size) - ptr) | PREV_INUSE);
-
- /* Add the new arena to the list. */
- (void)mutex_lock(&list_lock);
- a->next = main_arena.next;
- main_arena.next = a;
- (void)mutex_unlock(&list_lock);
-
- if(i) /* locking failed; keep arena for further attempts later */
- return 0;
-
- THREAD_STAT(++(a->stat_lock_loop));
- return a;
-}
-
-/* find the heap and corresponding arena for a given ptr */
-
-#define heap_for_ptr(ptr) \
- ((heap_info *)((unsigned long)(ptr) & ~(HEAP_MAX_SIZE-1)))
-#define arena_for_ptr(ptr) \
- (((mchunkptr)(ptr) < top(&main_arena) && (char *)(ptr) >= sbrk_base) ? \
- &main_arena : heap_for_ptr(ptr)->ar_ptr)
-
-#else /* !USE_ARENAS */
-
-/* There is only one arena, main_arena. */
-
-#define arena_get(ptr, sz) (ptr = &main_arena)
-#define arena_for_ptr(ptr) (&main_arena)
-
-#endif /* USE_ARENAS */
-
-
-
-/*
- Debugging support
-*/
-
-#if MALLOC_DEBUG
-
-
-/*
- These routines make a number of assertions about the states
- of data structures that should be true at all times. If any
- are not true, it's very likely that a user program has somehow
- trashed memory. (It's also possible that there is a coding error
- in malloc. In which case, please report it!)
-*/
-
-#if __STD_C
-static void do_check_chunk(arena *ar_ptr, mchunkptr p)
-#else
-static void do_check_chunk(ar_ptr, p) arena *ar_ptr; mchunkptr p;
-#endif
-{
- INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE;
-
- /* No checkable chunk is mmapped */
- assert(!chunk_is_mmapped(p));
-
-#if USE_ARENAS
- if(ar_ptr != &main_arena) {
- heap_info *heap = heap_for_ptr(p);
- assert(heap->ar_ptr == ar_ptr);
- if(p != top(ar_ptr))
- assert((char *)p + sz <= (char *)heap + heap->size);
- else
- assert((char *)p + sz == (char *)heap + heap->size);
- return;
- }
-#endif
-
- /* Check for legal address ... */
- assert((char*)p >= sbrk_base);
- if (p != top(ar_ptr))
- assert((char*)p + sz <= (char*)top(ar_ptr));
- else
- assert((char*)p + sz <= sbrk_base + sbrked_mem);
-
-}
-
-
-#if __STD_C
-static void do_check_free_chunk(arena *ar_ptr, mchunkptr p)
-#else
-static void do_check_free_chunk(ar_ptr, p) arena *ar_ptr; mchunkptr p;
-#endif
-{
- INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE;
- mchunkptr next = chunk_at_offset(p, sz);
-
- do_check_chunk(ar_ptr, p);
-
- /* Check whether it claims to be free ... */
- assert(!inuse(p));
-
- /* Must have OK size and fields */
- assert((long)sz >= (long)MINSIZE);
- assert((sz & MALLOC_ALIGN_MASK) == 0);
- assert(aligned_OK(chunk2mem(p)));
- /* ... matching footer field */
- assert(next->prev_size == sz);
- /* ... and is fully consolidated */
- assert(prev_inuse(p));
- assert (next == top(ar_ptr) || inuse(next));
-
- /* ... and has minimally sane links */
- assert(p->fd->bk == p);
- assert(p->bk->fd == p);
-}
-
-#if __STD_C
-static void do_check_inuse_chunk(arena *ar_ptr, mchunkptr p)
-#else
-static void do_check_inuse_chunk(ar_ptr, p) arena *ar_ptr; mchunkptr p;
-#endif
-{
- mchunkptr next = next_chunk(p);
- do_check_chunk(ar_ptr, p);
-
- /* Check whether it claims to be in use ... */
- assert(inuse(p));
-
- /* ... whether its size is OK (it might be a fencepost) ... */
- assert(chunksize(p) >= MINSIZE || next->size == (0|PREV_INUSE));
-
- /* ... and is surrounded by OK chunks.
- Since more things can be checked with free chunks than inuse ones,
- if an inuse chunk borders them and debug is on, it's worth doing them.
- */
- if (!prev_inuse(p))
- {
- mchunkptr prv = prev_chunk(p);
- assert(next_chunk(prv) == p);
- do_check_free_chunk(ar_ptr, prv);
- }
- if (next == top(ar_ptr))
- {
- assert(prev_inuse(next));
- assert(chunksize(next) >= MINSIZE);
- }
- else if (!inuse(next))
- do_check_free_chunk(ar_ptr, next);
-
-}
-
-#if __STD_C
-static void do_check_malloced_chunk(arena *ar_ptr,
- mchunkptr p, INTERNAL_SIZE_T s)
-#else
-static void do_check_malloced_chunk(ar_ptr, p, s)
-arena *ar_ptr; mchunkptr p; INTERNAL_SIZE_T s;
-#endif
-{
- INTERNAL_SIZE_T sz = p->size & ~PREV_INUSE;
- long room = sz - s;
-
- do_check_inuse_chunk(ar_ptr, p);
-
- /* Legal size ... */
- assert((long)sz >= (long)MINSIZE);
- assert((sz & MALLOC_ALIGN_MASK) == 0);
- assert(room >= 0);
- assert(room < (long)MINSIZE);
-
- /* ... and alignment */
- assert(aligned_OK(chunk2mem(p)));
-
-
- /* ... and was allocated at front of an available chunk */
- assert(prev_inuse(p));
-
-}
-
-
-#define check_free_chunk(A,P) do_check_free_chunk(A,P)
-#define check_inuse_chunk(A,P) do_check_inuse_chunk(A,P)
-#define check_chunk(A,P) do_check_chunk(A,P)
-#define check_malloced_chunk(A,P,N) do_check_malloced_chunk(A,P,N)
-#else
-#define check_free_chunk(A,P)
-#define check_inuse_chunk(A,P)
-#define check_chunk(A,P)
-#define check_malloced_chunk(A,P,N)
-#endif
-
-
-
-/*
- Macro-based internal utilities
-*/
-
-
-/*
- Linking chunks in bin lists.
- Call these only with variables, not arbitrary expressions, as arguments.
-*/
-
-/*
- Place chunk p of size s in its bin, in size order,
- putting it ahead of others of same size.
-*/
-
-
-#define frontlink(A, P, S, IDX, BK, FD) \
-{ \
- if (S < MAX_SMALLBIN_SIZE) \
- { \
- IDX = smallbin_index(S); \
- mark_binblock(A, IDX); \
- BK = bin_at(A, IDX); \
- FD = BK->fd; \
- P->bk = BK; \
- P->fd = FD; \
- FD->bk = BK->fd = P; \
- } \
- else \
- { \
- IDX = bin_index(S); \
- BK = bin_at(A, IDX); \
- FD = BK->fd; \
- if (FD == BK) mark_binblock(A, IDX); \
- else \
- { \
- while (FD != BK && S < chunksize(FD)) FD = FD->fd; \
- BK = FD->bk; \
- } \
- P->bk = BK; \
- P->fd = FD; \
- FD->bk = BK->fd = P; \
- } \
-}
-
-
-/* take a chunk off a list */
-
-#define unlink(P, BK, FD) \
-{ \
- BK = P->bk; \
- FD = P->fd; \
- FD->bk = BK; \
- BK->fd = FD; \
-} \
-
-/* Place p as the last remainder */
-
-#define link_last_remainder(A, P) \
-{ \
- last_remainder(A)->fd = last_remainder(A)->bk = P; \
- P->fd = P->bk = last_remainder(A); \
-}
-
-/* Clear the last_remainder bin */
-
-#define clear_last_remainder(A) \
- (last_remainder(A)->fd = last_remainder(A)->bk = last_remainder(A))
-
-
-
-
-
-/*
- Extend the top-most chunk by obtaining memory from system.
- Main interface to sbrk (but see also malloc_trim).
-*/
-
-#if defined __GNUC__ && __GNUC__ >= 2
-/* This function is called only from one place, inline it. */
-__inline__
-#endif
-static void
-internal_function
-#if __STD_C
-malloc_extend_top(arena *ar_ptr, INTERNAL_SIZE_T nb)
-#else
-malloc_extend_top(ar_ptr, nb) arena *ar_ptr; INTERNAL_SIZE_T nb;
-#endif
-{
- unsigned long pagesz = malloc_getpagesize;
- mchunkptr old_top = top(ar_ptr); /* Record state of old top */
- INTERNAL_SIZE_T old_top_size = chunksize(old_top);
- INTERNAL_SIZE_T top_size; /* new size of top chunk */
-
-#if USE_ARENAS
- if(ar_ptr == &main_arena) {
-#endif
-
- char* brk; /* return value from sbrk */
- INTERNAL_SIZE_T front_misalign; /* unusable bytes at front of sbrked space */
- INTERNAL_SIZE_T correction; /* bytes for 2nd sbrk call */
- char* new_brk; /* return of 2nd sbrk call */
- char* old_end = (char*)(chunk_at_offset(old_top, old_top_size));
-
- /* Pad request with top_pad plus minimal overhead */
- INTERNAL_SIZE_T sbrk_size = nb + top_pad + MINSIZE;
-
- /* If not the first time through, round to preserve page boundary */
- /* Otherwise, we need to correct to a page size below anyway. */
- /* (We also correct below if an intervening foreign sbrk call.) */
-
- if (sbrk_base != (char*)(-1))
- sbrk_size = (sbrk_size + (pagesz - 1)) & ~(pagesz - 1);
-
- brk = (char*)(MORECORE (sbrk_size));
-
- /* Fail if sbrk failed or if a foreign sbrk call killed our space */
- if (brk == (char*)(MORECORE_FAILURE) ||
- (brk < old_end && old_top != initial_top(&main_arena)))
- return;
-
-#if defined _LIBC || defined MALLOC_HOOKS
- /* Call the `morecore' hook if necessary. */
- if (__after_morecore_hook)
- (*__after_morecore_hook) ();
-#endif
-
- sbrked_mem += sbrk_size;
-
- if (brk == old_end) { /* can just add bytes to current top */
- top_size = sbrk_size + old_top_size;
- set_head(old_top, top_size | PREV_INUSE);
- old_top = 0; /* don't free below */
- } else {
- if (sbrk_base == (char*)(-1)) /* First time through. Record base */
- sbrk_base = brk;
- else
- /* Someone else called sbrk(). Count those bytes as sbrked_mem. */
- sbrked_mem += brk - (char*)old_end;
-
- /* Guarantee alignment of first new chunk made from this space */
- front_misalign = (unsigned long)chunk2mem(brk) & MALLOC_ALIGN_MASK;
- if (front_misalign > 0) {
- correction = (MALLOC_ALIGNMENT) - front_misalign;
- brk += correction;
- } else
- correction = 0;
-
- /* Guarantee the next brk will be at a page boundary */
- correction += pagesz - ((unsigned long)(brk + sbrk_size) & (pagesz - 1));
-
- /* Allocate correction */
- new_brk = (char*)(MORECORE (correction));
- if (new_brk == (char*)(MORECORE_FAILURE)) return;
-
-#if defined _LIBC || defined MALLOC_HOOKS
- /* Call the `morecore' hook if necessary. */
- if (__after_morecore_hook)
- (*__after_morecore_hook) ();
-#endif
-
- sbrked_mem += correction;
-
- top(&main_arena) = chunk_at_offset(brk, 0);
- top_size = new_brk - brk + correction;
- set_head(top(&main_arena), top_size | PREV_INUSE);
-
- if (old_top == initial_top(&main_arena))
- old_top = 0; /* don't free below */
- }
-
- if ((unsigned long)sbrked_mem > (unsigned long)max_sbrked_mem)
- max_sbrked_mem = sbrked_mem;
-#ifdef NO_THREADS
- if ((unsigned long)(mmapped_mem + arena_mem + sbrked_mem) > max_total_mem)
- max_total_mem = mmapped_mem + arena_mem + sbrked_mem;
-#endif
-
-#if USE_ARENAS
- } else { /* ar_ptr != &main_arena */
- heap_info *old_heap, *heap;
- size_t old_heap_size;
-
- if(old_top_size < MINSIZE) /* this should never happen */
- return;
-
- /* First try to extend the current heap. */
- if(MINSIZE + nb <= old_top_size)
- return;
- old_heap = heap_for_ptr(old_top);
- old_heap_size = old_heap->size;
- if(grow_heap(old_heap, MINSIZE + nb - old_top_size) == 0) {
- ar_ptr->size += old_heap->size - old_heap_size;
- arena_mem += old_heap->size - old_heap_size;
-#ifdef NO_THREADS
- if(mmapped_mem + arena_mem + sbrked_mem > max_total_mem)
- max_total_mem = mmapped_mem + arena_mem + sbrked_mem;
-#endif
- top_size = ((char *)old_heap + old_heap->size) - (char *)old_top;
- set_head(old_top, top_size | PREV_INUSE);
- return;
- }
-
- /* A new heap must be created. */
- heap = new_heap(nb + (MINSIZE + sizeof(*heap)));
- if(!heap)
- return;
- heap->ar_ptr = ar_ptr;
- heap->prev = old_heap;
- ar_ptr->size += heap->size;
- arena_mem += heap->size;
-#ifdef NO_THREADS
- if((unsigned long)(mmapped_mem + arena_mem + sbrked_mem) > max_total_mem)
- max_total_mem = mmapped_mem + arena_mem + sbrked_mem;
-#endif
-
- /* Set up the new top, so we can safely use chunk_free() below. */
- top(ar_ptr) = chunk_at_offset(heap, sizeof(*heap));
- top_size = heap->size - sizeof(*heap);
- set_head(top(ar_ptr), top_size | PREV_INUSE);
- }
-#endif /* USE_ARENAS */
-
- /* We always land on a page boundary */
- assert(((unsigned long)((char*)top(ar_ptr) + top_size) & (pagesz-1)) == 0);
-
- /* Setup fencepost and free the old top chunk. */
- if(old_top) {
- /* The fencepost takes at least MINSIZE bytes, because it might
- become the top chunk again later. Note that a footer is set
- up, too, although the chunk is marked in use. */
- old_top_size -= MINSIZE;
- set_head(chunk_at_offset(old_top, old_top_size + 2*SIZE_SZ), 0|PREV_INUSE);
- if(old_top_size >= MINSIZE) {
- set_head(chunk_at_offset(old_top, old_top_size), (2*SIZE_SZ)|PREV_INUSE);
- set_foot(chunk_at_offset(old_top, old_top_size), (2*SIZE_SZ));
- set_head_size(old_top, old_top_size);
- chunk_free(ar_ptr, old_top);
- } else {
- set_head(old_top, (old_top_size + 2*SIZE_SZ)|PREV_INUSE);
- set_foot(old_top, (old_top_size + 2*SIZE_SZ));
- }
- }
-}
-
-
-
-
-/* Main public routines */
-
-
-/*
- Malloc Algorithm:
-
- The requested size is first converted into a usable form, `nb'.
- This currently means to add 4 bytes overhead plus possibly more to
- obtain 8-byte alignment and/or to obtain a size of at least
- MINSIZE (currently 16, 24, or 32 bytes), the smallest allocatable
- size. (All fits are considered `exact' if they are within MINSIZE
- bytes.)
-
- From there, the first successful of the following steps is taken:
-
- 1. The bin corresponding to the request size is scanned, and if
- a chunk of exactly the right size is found, it is taken.
-
- 2. The most recently remaindered chunk is used if it is big
- enough. This is a form of (roving) first fit, used only in
- the absence of exact fits. Runs of consecutive requests use
- the remainder of the chunk used for the previous such request
- whenever possible. This limited use of a first-fit style
- allocation strategy tends to give contiguous chunks
- coextensive lifetimes, which improves locality and can reduce
- fragmentation in the long run.
-
- 3. Other bins are scanned in increasing size order, using a
- chunk big enough to fulfill the request, and splitting off
- any remainder. This search is strictly by best-fit; i.e.,
- the smallest (with ties going to approximately the least
- recently used) chunk that fits is selected.
-
- 4. If large enough, the chunk bordering the end of memory
- (`top') is split off. (This use of `top' is in accord with
- the best-fit search rule. In effect, `top' is treated as
- larger (and thus less well fitting) than any other available
- chunk since it can be extended to be as large as necessary
- (up to system limitations).
-
- 5. If the request size meets the mmap threshold and the
- system supports mmap, and there are few enough currently
- allocated mmapped regions, and a call to mmap succeeds,
- the request is allocated via direct memory mapping.
-
- 6. Otherwise, the top of memory is extended by
- obtaining more space from the system (normally using sbrk,
- but definable to anything else via the MORECORE macro).
- Memory is gathered from the system (in system page-sized
- units) in a way that allows chunks obtained across different
- sbrk calls to be consolidated, but does not require
- contiguous memory. Thus, it should be safe to intersperse
- mallocs with other sbrk calls.
-
-
- All allocations are made from the `lowest' part of any found
- chunk. (The implementation invariant is that prev_inuse is
- always true of any allocated chunk; i.e., that each allocated
- chunk borders either a previously allocated and still in-use chunk,
- or the base of its memory arena.)
-
-*/
-
-#if __STD_C
-Void_t* mALLOc(size_t bytes)
-#else
-Void_t* mALLOc(bytes) size_t bytes;
-#endif
-{
- arena *ar_ptr;
- INTERNAL_SIZE_T nb; /* padded request size */
- mchunkptr victim;
-
-#if defined _LIBC || defined MALLOC_HOOKS
- __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, __const __malloc_ptr_t)) =
- __malloc_hook;
- if (hook != NULL) {
- Void_t* result;
-
-#if defined __GNUC__ && __GNUC__ >= 2
- result = (*hook)(bytes, RETURN_ADDRESS (0));
-#else
- result = (*hook)(bytes, NULL);
-#endif
- return result;
- }
-#endif
-
- if(request2size(bytes, nb))
- return 0;
- arena_get(ar_ptr, nb);
- if(!ar_ptr)
- return 0;
- victim = chunk_alloc(ar_ptr, nb);
- if(!victim) {
- /* Maybe the failure is due to running out of mmapped areas. */
- if(ar_ptr != &main_arena) {
- (void)mutex_unlock(&ar_ptr->mutex);
- (void)mutex_lock(&main_arena.mutex);
- victim = chunk_alloc(&main_arena, nb);
- (void)mutex_unlock(&main_arena.mutex);
- } else {
-#if USE_ARENAS
- /* ... or sbrk() has failed and there is still a chance to mmap() */
- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, nb);
- (void)mutex_unlock(&main_arena.mutex);
- if(ar_ptr) {
- victim = chunk_alloc(ar_ptr, nb);
- (void)mutex_unlock(&ar_ptr->mutex);
- }
-#endif
- }
- if(!victim) return 0;
- } else
- (void)mutex_unlock(&ar_ptr->mutex);
- return BOUNDED_N(chunk2mem(victim), bytes);
-}
-
-static mchunkptr
-internal_function
-#if __STD_C
-chunk_alloc(arena *ar_ptr, INTERNAL_SIZE_T nb)
-#else
-chunk_alloc(ar_ptr, nb) arena *ar_ptr; INTERNAL_SIZE_T nb;
-#endif
-{
- mchunkptr victim; /* inspected/selected chunk */
- INTERNAL_SIZE_T victim_size; /* its size */
- int idx; /* index for bin traversal */
- mbinptr bin; /* associated bin */
- mchunkptr remainder; /* remainder from a split */
- long remainder_size; /* its size */
- int remainder_index; /* its bin index */
- unsigned long block; /* block traverser bit */
- int startidx; /* first bin of a traversed block */
- mchunkptr fwd; /* misc temp for linking */
- mchunkptr bck; /* misc temp for linking */
- mbinptr q; /* misc temp */
-
-
- /* Check for exact match in a bin */
-
- if (is_small_request(nb)) /* Faster version for small requests */
- {
- idx = smallbin_index(nb);
-
- /* No traversal or size check necessary for small bins. */
-
- q = _bin_at(ar_ptr, idx);
- victim = last(q);
-
- /* Also scan the next one, since it would have a remainder < MINSIZE */
- if (victim == q)
- {
- q = next_bin(q);
- victim = last(q);
- }
- if (victim != q)
- {
- victim_size = chunksize(victim);
- unlink(victim, bck, fwd);
- set_inuse_bit_at_offset(victim, victim_size);
- check_malloced_chunk(ar_ptr, victim, nb);
- return victim;
- }
-
- idx += 2; /* Set for bin scan below. We've already scanned 2 bins. */
-
- }
- else
- {
- idx = bin_index(nb);
- bin = bin_at(ar_ptr, idx);
-
- for (victim = last(bin); victim != bin; victim = victim->bk)
- {
- victim_size = chunksize(victim);
- remainder_size = victim_size - nb;
-
- if (remainder_size >= (long)MINSIZE) /* too big */
- {
- --idx; /* adjust to rescan below after checking last remainder */
- break;
- }
-
- else if (remainder_size >= 0) /* exact fit */
- {
- unlink(victim, bck, fwd);
- set_inuse_bit_at_offset(victim, victim_size);
- check_malloced_chunk(ar_ptr, victim, nb);
- return victim;
- }
- }
-
- ++idx;
-
- }
-
- /* Try to use the last split-off remainder */
-
- if ( (victim = last_remainder(ar_ptr)->fd) != last_remainder(ar_ptr))
- {
- victim_size = chunksize(victim);
- remainder_size = victim_size - nb;
-
- if (remainder_size >= (long)MINSIZE) /* re-split */
- {
- remainder = chunk_at_offset(victim, nb);
- set_head(victim, nb | PREV_INUSE);
- link_last_remainder(ar_ptr, remainder);
- set_head(remainder, remainder_size | PREV_INUSE);
- set_foot(remainder, remainder_size);
- check_malloced_chunk(ar_ptr, victim, nb);
- return victim;
- }
-
- clear_last_remainder(ar_ptr);
-
- if (remainder_size >= 0) /* exhaust */
- {
- set_inuse_bit_at_offset(victim, victim_size);
- check_malloced_chunk(ar_ptr, victim, nb);
- return victim;
- }
-
- /* Else place in bin */
-
- frontlink(ar_ptr, victim, victim_size, remainder_index, bck, fwd);
- }
-
- /*
- If there are any possibly nonempty big-enough blocks,
- search for best fitting chunk by scanning bins in blockwidth units.
- */
-
- if ( (block = idx2binblock(idx)) <= binblocks(ar_ptr))
- {
-
- /* Get to the first marked block */
-
- if ( (block & binblocks(ar_ptr)) == 0)
- {
- /* force to an even block boundary */
- idx = (idx & ~(BINBLOCKWIDTH - 1)) + BINBLOCKWIDTH;
- block <<= 1;
- while ((block & binblocks(ar_ptr)) == 0)
- {
- idx += BINBLOCKWIDTH;
- block <<= 1;
- }
- }
-
- /* For each possibly nonempty block ... */
- for (;;)
- {
- startidx = idx; /* (track incomplete blocks) */
- q = bin = _bin_at(ar_ptr, idx);
-
- /* For each bin in this block ... */
- do
- {
- /* Find and use first big enough chunk ... */
-
- for (victim = last(bin); victim != bin; victim = victim->bk)
- {
- victim_size = chunksize(victim);
- remainder_size = victim_size - nb;
-
- if (remainder_size >= (long)MINSIZE) /* split */
- {
- remainder = chunk_at_offset(victim, nb);
- set_head(victim, nb | PREV_INUSE);
- unlink(victim, bck, fwd);
- link_last_remainder(ar_ptr, remainder);
- set_head(remainder, remainder_size | PREV_INUSE);
- set_foot(remainder, remainder_size);
- check_malloced_chunk(ar_ptr, victim, nb);
- return victim;
- }
-
- else if (remainder_size >= 0) /* take */
- {
- set_inuse_bit_at_offset(victim, victim_size);
- unlink(victim, bck, fwd);
- check_malloced_chunk(ar_ptr, victim, nb);
- return victim;
- }
-
- }
-
- bin = next_bin(bin);
-
- } while ((++idx & (BINBLOCKWIDTH - 1)) != 0);
-
- /* Clear out the block bit. */
-
- do /* Possibly backtrack to try to clear a partial block */
- {
- if ((startidx & (BINBLOCKWIDTH - 1)) == 0)
- {
- binblocks(ar_ptr) &= ~block;
- break;
- }
- --startidx;
- q = prev_bin(q);
- } while (first(q) == q);
-
- /* Get to the next possibly nonempty block */
-
- if ( (block <<= 1) <= binblocks(ar_ptr) && (block != 0) )
- {
- while ((block & binblocks(ar_ptr)) == 0)
- {
- idx += BINBLOCKWIDTH;
- block <<= 1;
- }
- }
- else
- break;
- }
- }
-
-
- /* Try to use top chunk */
-
- /* Require that there be a remainder, ensuring top always exists */
- if ( (remainder_size = chunksize(top(ar_ptr)) - nb) < (long)MINSIZE)
- {
-
-#if HAVE_MMAP
- /* If the request is big and there are not yet too many regions,
- and we would otherwise need to extend, try to use mmap instead. */
- if ((unsigned long)nb >= (unsigned long)mmap_threshold &&
- n_mmaps < n_mmaps_max &&
- (victim = mmap_chunk(nb)) != 0)
- return victim;
-#endif
-
- /* Try to extend */
- malloc_extend_top(ar_ptr, nb);
- if ((remainder_size = chunksize(top(ar_ptr)) - nb) < (long)MINSIZE)
- {
-#if HAVE_MMAP
- /* A last attempt: when we are out of address space in a
- non-main arena, try mmap anyway, as long as it is allowed at
- all. */
- if (ar_ptr != &main_arena &&
- n_mmaps_max > 0 &&
- (victim = mmap_chunk(nb)) != 0)
- return victim;
-#endif
- return 0; /* propagate failure */
- }
- }
-
- victim = top(ar_ptr);
- set_head(victim, nb | PREV_INUSE);
- top(ar_ptr) = chunk_at_offset(victim, nb);
- set_head(top(ar_ptr), remainder_size | PREV_INUSE);
- check_malloced_chunk(ar_ptr, victim, nb);
- return victim;
-
-}
-
-
-
-
-/*
-
- free() algorithm :
-
- cases:
-
- 1. free(0) has no effect.
-
- 2. If the chunk was allocated via mmap, it is released via munmap().
-
- 3. If a returned chunk borders the current high end of memory,
- it is consolidated into the top, and if the total unused
- topmost memory exceeds the trim threshold, malloc_trim is
- called.
-
- 4. Other chunks are consolidated as they arrive, and
- placed in corresponding bins. (This includes the case of
- consolidating with the current `last_remainder').
-
-*/
-
-
-#if __STD_C
-void fREe(Void_t* mem)
-#else
-void fREe(mem) Void_t* mem;
-#endif
-{
- arena *ar_ptr;
- mchunkptr p; /* chunk corresponding to mem */
-
-#if defined _LIBC || defined MALLOC_HOOKS
- void (*hook) __MALLOC_PMT ((__malloc_ptr_t, __const __malloc_ptr_t)) =
- __free_hook;
-
- if (hook != NULL) {
-#if defined __GNUC__ && __GNUC__ >= 2
- (*hook)(mem, RETURN_ADDRESS (0));
-#else
- (*hook)(mem, NULL);
-#endif
- return;
- }
-#endif
-
- if (mem == 0) /* free(0) has no effect */
- return;
-
- p = mem2chunk(mem);
-
-#if HAVE_MMAP
- if (chunk_is_mmapped(p)) /* release mmapped memory. */
- {
- munmap_chunk(p);
- return;
- }
-#endif
-
- ar_ptr = arena_for_ptr(p);
-#if THREAD_STATS
- if(!mutex_trylock(&ar_ptr->mutex))
- ++(ar_ptr->stat_lock_direct);
- else {
- (void)mutex_lock(&ar_ptr->mutex);
- ++(ar_ptr->stat_lock_wait);
- }
-#else
- (void)mutex_lock(&ar_ptr->mutex);
-#endif
- chunk_free(ar_ptr, p);
- (void)mutex_unlock(&ar_ptr->mutex);
-}
-
-static void
-internal_function
-#if __STD_C
-chunk_free(arena *ar_ptr, mchunkptr p)
-#else
-chunk_free(ar_ptr, p) arena *ar_ptr; mchunkptr p;
-#endif
-{
- INTERNAL_SIZE_T hd = p->size; /* its head field */
- INTERNAL_SIZE_T sz; /* its size */
- int idx; /* its bin index */
- mchunkptr next; /* next contiguous chunk */
- INTERNAL_SIZE_T nextsz; /* its size */
- INTERNAL_SIZE_T prevsz; /* size of previous contiguous chunk */
- mchunkptr bck; /* misc temp for linking */
- mchunkptr fwd; /* misc temp for linking */
- int islr; /* track whether merging with last_remainder */
-
- check_inuse_chunk(ar_ptr, p);
-
- sz = hd & ~PREV_INUSE;
- next = chunk_at_offset(p, sz);
- nextsz = chunksize(next);
-
- if (next == top(ar_ptr)) /* merge with top */
- {
- sz += nextsz;
-
- if (!(hd & PREV_INUSE)) /* consolidate backward */
- {
- prevsz = p->prev_size;
- p = chunk_at_offset(p, -(long)prevsz);
- sz += prevsz;
- unlink(p, bck, fwd);
- }
-
- set_head(p, sz | PREV_INUSE);
- top(ar_ptr) = p;
-
-#if USE_ARENAS
- if(ar_ptr == &main_arena) {
-#endif
- if ((unsigned long)(sz) >= (unsigned long)trim_threshold)
- main_trim(top_pad);
-#if USE_ARENAS
- } else {
- heap_info *heap = heap_for_ptr(p);
-
- assert(heap->ar_ptr == ar_ptr);
-
- /* Try to get rid of completely empty heaps, if possible. */
- if((unsigned long)(sz) >= (unsigned long)trim_threshold ||
- p == chunk_at_offset(heap, sizeof(*heap)))
- heap_trim(heap, top_pad);
- }
-#endif
- return;
- }
-
- islr = 0;
-
- if (!(hd & PREV_INUSE)) /* consolidate backward */
- {
- prevsz = p->prev_size;
- p = chunk_at_offset(p, -(long)prevsz);
- sz += prevsz;
-
- if (p->fd == last_remainder(ar_ptr)) /* keep as last_remainder */
- islr = 1;
- else
- unlink(p, bck, fwd);
- }
-
- if (!(inuse_bit_at_offset(next, nextsz))) /* consolidate forward */
- {
- sz += nextsz;
-
- if (!islr && next->fd == last_remainder(ar_ptr))
- /* re-insert last_remainder */
- {
- islr = 1;
- link_last_remainder(ar_ptr, p);
- }
- else
- unlink(next, bck, fwd);
-
- next = chunk_at_offset(p, sz);
- }
- else
- set_head(next, nextsz); /* clear inuse bit */
-
- set_head(p, sz | PREV_INUSE);
- next->prev_size = sz;
- if (!islr)
- frontlink(ar_ptr, p, sz, idx, bck, fwd);
-
-#if USE_ARENAS
- /* Check whether the heap containing top can go away now. */
- if(next->size < MINSIZE &&
- (unsigned long)sz > trim_threshold &&
- ar_ptr != &main_arena) { /* fencepost */
- heap_info *heap = heap_for_ptr(top(ar_ptr));
-
- if(top(ar_ptr) == chunk_at_offset(heap, sizeof(*heap)) &&
- heap->prev == heap_for_ptr(p))
- heap_trim(heap, top_pad);
- }
-#endif
-}
-
-
-
-
-
-/*
-
- Realloc algorithm:
-
- Chunks that were obtained via mmap cannot be extended or shrunk
- unless HAVE_MREMAP is defined, in which case mremap is used.
- Otherwise, if their reallocation is for additional space, they are
- copied. If for less, they are just left alone.
-
- Otherwise, if the reallocation is for additional space, and the
- chunk can be extended, it is, else a malloc-copy-free sequence is
- taken. There are several different ways that a chunk could be
- extended. All are tried:
-
- * Extending forward into following adjacent free chunk.
- * Shifting backwards, joining preceding adjacent space
- * Both shifting backwards and extending forward.
- * Extending into newly sbrked space
-
- Unless the #define REALLOC_ZERO_BYTES_FREES is set, realloc with a
- size argument of zero (re)allocates a minimum-sized chunk.
-
- If the reallocation is for less space, and the new request is for
- a `small' (<512 bytes) size, then the newly unused space is lopped
- off and freed.
-
- The old unix realloc convention of allowing the last-free'd chunk
- to be used as an argument to realloc is no longer supported.
- I don't know of any programs still relying on this feature,
- and allowing it would also allow too many other incorrect
- usages of realloc to be sensible.
-
-
-*/
-
-
-#if __STD_C
-Void_t* rEALLOc(Void_t* oldmem, size_t bytes)
-#else
-Void_t* rEALLOc(oldmem, bytes) Void_t* oldmem; size_t bytes;
-#endif
-{
- arena *ar_ptr;
- INTERNAL_SIZE_T nb; /* padded request size */
-
- mchunkptr oldp; /* chunk corresponding to oldmem */
- INTERNAL_SIZE_T oldsize; /* its size */
-
- mchunkptr newp; /* chunk to return */
-
-#if defined _LIBC || defined MALLOC_HOOKS
- __malloc_ptr_t (*hook) __MALLOC_PMT ((__malloc_ptr_t, size_t,
- __const __malloc_ptr_t)) =
- __realloc_hook;
- if (hook != NULL) {
- Void_t* result;
-
-#if defined __GNUC__ && __GNUC__ >= 2
- result = (*hook)(oldmem, bytes, RETURN_ADDRESS (0));
-#else
- result = (*hook)(oldmem, bytes, NULL);
-#endif
- return result;
- }
-#endif
-
-#ifdef REALLOC_ZERO_BYTES_FREES
- if (bytes == 0 && oldmem != NULL) { fREe(oldmem); return 0; }
-#endif
-
- /* realloc of null is supposed to be same as malloc */
- if (oldmem == 0) return mALLOc(bytes);
-
- oldp = mem2chunk(oldmem);
- oldsize = chunksize(oldp);
-
- if(request2size(bytes, nb))
- return 0;
-
-#if HAVE_MMAP
- if (chunk_is_mmapped(oldp))
- {
- Void_t* newmem;
-
-#if HAVE_MREMAP
- newp = mremap_chunk(oldp, nb);
- if(newp)
- return BOUNDED_N(chunk2mem(newp), bytes);
-#endif
- /* Note the extra SIZE_SZ overhead. */
- if(oldsize - SIZE_SZ >= nb) return oldmem; /* do nothing */
- /* Must alloc, copy, free. */
- newmem = mALLOc(bytes);
- if (newmem == 0) return 0; /* propagate failure */
- MALLOC_COPY(newmem, oldmem, oldsize - 2*SIZE_SZ, 0);
- munmap_chunk(oldp);
- return newmem;
- }
-#endif
-
- ar_ptr = arena_for_ptr(oldp);
-#if THREAD_STATS
- if(!mutex_trylock(&ar_ptr->mutex))
- ++(ar_ptr->stat_lock_direct);
- else {
- (void)mutex_lock(&ar_ptr->mutex);
- ++(ar_ptr->stat_lock_wait);
- }
-#else
- (void)mutex_lock(&ar_ptr->mutex);
-#endif
-
-#ifndef NO_THREADS
- /* As in malloc(), remember this arena for the next allocation. */
- tsd_setspecific(arena_key, (Void_t *)ar_ptr);
-#endif
-
- newp = chunk_realloc(ar_ptr, oldp, oldsize, nb);
-
- (void)mutex_unlock(&ar_ptr->mutex);
- return newp ? BOUNDED_N(chunk2mem(newp), bytes) : NULL;
-}
-
-static mchunkptr
-internal_function
-#if __STD_C
-chunk_realloc(arena* ar_ptr, mchunkptr oldp, INTERNAL_SIZE_T oldsize,
- INTERNAL_SIZE_T nb)
-#else
-chunk_realloc(ar_ptr, oldp, oldsize, nb)
-arena* ar_ptr; mchunkptr oldp; INTERNAL_SIZE_T oldsize, nb;
-#endif
-{
- mchunkptr newp = oldp; /* chunk to return */
- INTERNAL_SIZE_T newsize = oldsize; /* its size */
-
- mchunkptr next; /* next contiguous chunk after oldp */
- INTERNAL_SIZE_T nextsize; /* its size */
-
- mchunkptr prev; /* previous contiguous chunk before oldp */
- INTERNAL_SIZE_T prevsize; /* its size */
-
- mchunkptr remainder; /* holds split off extra space from newp */
- INTERNAL_SIZE_T remainder_size; /* its size */
-
- mchunkptr bck; /* misc temp for linking */
- mchunkptr fwd; /* misc temp for linking */
-
- check_inuse_chunk(ar_ptr, oldp);
-
- if ((long)(oldsize) < (long)(nb))
- {
- Void_t* oldmem = BOUNDED_N(chunk2mem(oldp), oldsize);
-
- /* Try expanding forward */
-
- next = chunk_at_offset(oldp, oldsize);
- if (next == top(ar_ptr) || !inuse(next))
- {
- nextsize = chunksize(next);
-
- /* Forward into top only if a remainder */
- if (next == top(ar_ptr))
- {
- if ((long)(nextsize + newsize) >= (long)(nb + MINSIZE))
- {
- newsize += nextsize;
- top(ar_ptr) = chunk_at_offset(oldp, nb);
- set_head(top(ar_ptr), (newsize - nb) | PREV_INUSE);
- set_head_size(oldp, nb);
- return oldp;
- }
- }
-
- /* Forward into next chunk */
- else if (((long)(nextsize + newsize) >= (long)(nb)))
- {
- unlink(next, bck, fwd);
- newsize += nextsize;
- goto split;
- }
- }
- else
- {
- next = 0;
- nextsize = 0;
- }
-
- oldsize -= SIZE_SZ;
-
- /* Try shifting backwards. */
-
- if (!prev_inuse(oldp))
- {
- prev = prev_chunk(oldp);
- prevsize = chunksize(prev);
-
- /* try forward + backward first to save a later consolidation */
-
- if (next != 0)
- {
- /* into top */
- if (next == top(ar_ptr))
- {
- if ((long)(nextsize + prevsize + newsize) >= (long)(nb + MINSIZE))
- {
- unlink(prev, bck, fwd);
- newp = prev;
- newsize += prevsize + nextsize;
- MALLOC_COPY(BOUNDED_N(chunk2mem(newp), oldsize), oldmem, oldsize,
- 1);
- top(ar_ptr) = chunk_at_offset(newp, nb);
- set_head(top(ar_ptr), (newsize - nb) | PREV_INUSE);
- set_head_size(newp, nb);
- return newp;
- }
- }
-
- /* into next chunk */
- else if (((long)(nextsize + prevsize + newsize) >= (long)(nb)))
- {
- unlink(next, bck, fwd);
- unlink(prev, bck, fwd);
- newp = prev;
- newsize += nextsize + prevsize;
- MALLOC_COPY(BOUNDED_N(chunk2mem(newp), oldsize), oldmem, oldsize, 1);
- goto split;
- }
- }
-
- /* backward only */
- if (prev != 0 && (long)(prevsize + newsize) >= (long)nb)
- {
- unlink(prev, bck, fwd);
- newp = prev;
- newsize += prevsize;
- MALLOC_COPY(BOUNDED_N(chunk2mem(newp), oldsize), oldmem, oldsize, 1);
- goto split;
- }
- }
-
- /* Must allocate */
-
- newp = chunk_alloc (ar_ptr, nb);
-
- if (newp == 0) {
- /* Maybe the failure is due to running out of mmapped areas. */
- if (ar_ptr != &main_arena) {
- (void)mutex_lock(&main_arena.mutex);
- newp = chunk_alloc(&main_arena, nb);
- (void)mutex_unlock(&main_arena.mutex);
- } else {
-#if USE_ARENAS
- /* ... or sbrk() has failed and there is still a chance to mmap() */
- arena* ar_ptr2 = arena_get2(ar_ptr->next ? ar_ptr : 0, nb);
- if(ar_ptr2) {
- newp = chunk_alloc(ar_ptr2, nb);
- (void)mutex_unlock(&ar_ptr2->mutex);
- }
-#endif
- }
- if (newp == 0) /* propagate failure */
- return 0;
- }
-
- /* Avoid copy if newp is next chunk after oldp. */
- /* (This can only happen when new chunk is sbrk'ed.) */
-
- if ( newp == next_chunk(oldp))
- {
- newsize += chunksize(newp);
- newp = oldp;
- goto split;
- }
-
- /* Otherwise copy, free, and exit */
- MALLOC_COPY(BOUNDED_N(chunk2mem(newp), oldsize), oldmem, oldsize, 0);
- chunk_free(ar_ptr, oldp);
- return newp;
- }
-
-
- split: /* split off extra room in old or expanded chunk */
-
- if (newsize - nb >= MINSIZE) /* split off remainder */
- {
- remainder = chunk_at_offset(newp, nb);
- remainder_size = newsize - nb;
- set_head_size(newp, nb);
- set_head(remainder, remainder_size | PREV_INUSE);
- set_inuse_bit_at_offset(remainder, remainder_size);
- chunk_free(ar_ptr, remainder);
- }
- else
- {
- set_head_size(newp, newsize);
- set_inuse_bit_at_offset(newp, newsize);
- }
-
- check_inuse_chunk(ar_ptr, newp);
- return newp;
-}
-
-
-
-
-/*
-
- memalign algorithm:
-
- memalign requests more than enough space from malloc, finds a spot
- within that chunk that meets the alignment request, and then
- possibly frees the leading and trailing space.
-
- The alignment argument must be a power of two. This property is not
- checked by memalign, so misuse may result in random runtime errors.
-
- 8-byte alignment is guaranteed by normal malloc calls, so don't
- bother calling memalign with an argument of 8 or less.
-
- Overreliance on memalign is a sure way to fragment space.
-
-*/
-
-
-#if __STD_C
-Void_t* mEMALIGn(size_t alignment, size_t bytes)
-#else
-Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes;
-#endif
-{
- arena *ar_ptr;
- INTERNAL_SIZE_T nb; /* padded request size */
- mchunkptr p;
-
-#if defined _LIBC || defined MALLOC_HOOKS
- __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
- __const __malloc_ptr_t)) =
- __memalign_hook;
- if (hook != NULL) {
- Void_t* result;
-
-#if defined __GNUC__ && __GNUC__ >= 2
- result = (*hook)(alignment, bytes, RETURN_ADDRESS (0));
-#else
- result = (*hook)(alignment, bytes, NULL);
-#endif
- return result;
- }
-#endif
-
- /* If need less alignment than we give anyway, just relay to malloc */
-
- if (alignment <= MALLOC_ALIGNMENT) return mALLOc(bytes);
-
- /* Otherwise, ensure that it is at least a minimum chunk size */
-
- if (alignment < MINSIZE) alignment = MINSIZE;
-
- if(request2size(bytes, nb))
- return 0;
- arena_get(ar_ptr, nb + alignment + MINSIZE);
- if(!ar_ptr)
- return 0;
- p = chunk_align(ar_ptr, nb, alignment);
- (void)mutex_unlock(&ar_ptr->mutex);
- if(!p) {
- /* Maybe the failure is due to running out of mmapped areas. */
- if(ar_ptr != &main_arena) {
- (void)mutex_lock(&main_arena.mutex);
- p = chunk_align(&main_arena, nb, alignment);
- (void)mutex_unlock(&main_arena.mutex);
- } else {
-#if USE_ARENAS
- /* ... or sbrk() has failed and there is still a chance to mmap() */
- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, nb);
- if(ar_ptr) {
- p = chunk_align(ar_ptr, nb, alignment);
- (void)mutex_unlock(&ar_ptr->mutex);
- }
-#endif
- }
- if(!p) return 0;
- }
- return BOUNDED_N(chunk2mem(p), bytes);
-}
-
-static mchunkptr
-internal_function
-#if __STD_C
-chunk_align(arena* ar_ptr, INTERNAL_SIZE_T nb, size_t alignment)
-#else
-chunk_align(ar_ptr, nb, alignment)
-arena* ar_ptr; INTERNAL_SIZE_T nb; size_t alignment;
-#endif
-{
- unsigned long m; /* memory returned by malloc call */
- mchunkptr p; /* corresponding chunk */
- char* brk; /* alignment point within p */
- mchunkptr newp; /* chunk to return */
- INTERNAL_SIZE_T newsize; /* its size */
- INTERNAL_SIZE_T leadsize; /* leading space befor alignment point */
- mchunkptr remainder; /* spare room at end to split off */
- long remainder_size; /* its size */
-
- /* Call chunk_alloc with worst case padding to hit alignment. */
- p = chunk_alloc(ar_ptr, nb + alignment + MINSIZE);
- if (p == 0)
- return 0; /* propagate failure */
-
- m = (unsigned long)chunk2mem(p);
-
- if ((m % alignment) == 0) /* aligned */
- {
-#if HAVE_MMAP
- if(chunk_is_mmapped(p)) {
- return p; /* nothing more to do */
- }
-#endif
- }
- else /* misaligned */
- {
- /*
- Find an aligned spot inside chunk.
- Since we need to give back leading space in a chunk of at
- least MINSIZE, if the first calculation places us at
- a spot with less than MINSIZE leader, we can move to the
- next aligned spot -- we've allocated enough total room so that
- this is always possible.
- */
-
- brk = (char*)mem2chunk(((m + alignment - 1)) & -(long)alignment);
- if ((long)(brk - (char*)(p)) < (long)MINSIZE) brk += alignment;
-
- newp = chunk_at_offset(brk, 0);
- leadsize = brk - (char*)(p);
- newsize = chunksize(p) - leadsize;
-
-#if HAVE_MMAP
- if(chunk_is_mmapped(p))
- {
- newp->prev_size = p->prev_size + leadsize;
- set_head(newp, newsize|IS_MMAPPED);
- return newp;
- }
-#endif
-
- /* give back leader, use the rest */
-
- set_head(newp, newsize | PREV_INUSE);
- set_inuse_bit_at_offset(newp, newsize);
- set_head_size(p, leadsize);
- chunk_free(ar_ptr, p);
- p = newp;
-
- assert (newsize>=nb && (((unsigned long)(chunk2mem(p))) % alignment) == 0);
- }
-
- /* Also give back spare room at the end */
-
- remainder_size = chunksize(p) - nb;
-
- if (remainder_size >= (long)MINSIZE)
- {
- remainder = chunk_at_offset(p, nb);
- set_head(remainder, remainder_size | PREV_INUSE);
- set_head_size(p, nb);
- chunk_free(ar_ptr, remainder);
- }
-
- check_inuse_chunk(ar_ptr, p);
- return p;
-}
-
-
-
-
-/*
- valloc just invokes memalign with alignment argument equal
- to the page size of the system (or as near to this as can
- be figured out from all the includes/defines above.)
-*/
-
-#if __STD_C
-Void_t* vALLOc(size_t bytes)
-#else
-Void_t* vALLOc(bytes) size_t bytes;
-#endif
-{
- if(__malloc_initialized < 0)
- ptmalloc_init ();
- return mEMALIGn (malloc_getpagesize, bytes);
-}
-
-/*
- pvalloc just invokes valloc for the nearest pagesize
- that will accommodate request
-*/
-
-
-#if __STD_C
-Void_t* pvALLOc(size_t bytes)
-#else
-Void_t* pvALLOc(bytes) size_t bytes;
-#endif
-{
- size_t pagesize;
- if(__malloc_initialized < 0)
- ptmalloc_init ();
- pagesize = malloc_getpagesize;
- return mEMALIGn (pagesize, (bytes + pagesize - 1) & ~(pagesize - 1));
-}
-
-/*
-
- calloc calls chunk_alloc, then zeroes out the allocated chunk.
-
-*/
-
-#if __STD_C
-Void_t* cALLOc(size_t n, size_t elem_size)
-#else
-Void_t* cALLOc(n, elem_size) size_t n; size_t elem_size;
-#endif
-{
- arena *ar_ptr;
- mchunkptr p, oldtop;
- INTERNAL_SIZE_T sz, csz, oldtopsize;
- Void_t* mem;
-
-#if defined _LIBC || defined MALLOC_HOOKS
- __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, __const __malloc_ptr_t)) =
- __malloc_hook;
- if (hook != NULL) {
- sz = n * elem_size;
-#if defined __GNUC__ && __GNUC__ >= 2
- mem = (*hook)(sz, RETURN_ADDRESS (0));
-#else
- mem = (*hook)(sz, NULL);
-#endif
- if(mem == 0)
- return 0;
-#ifdef HAVE_MEMSET
- return memset(mem, 0, sz);
-#else
- while(sz > 0) ((char*)mem)[--sz] = 0; /* rather inefficient */
- return mem;
-#endif
- }
-#endif
-
- if(request2size(n * elem_size, sz))
- return 0;
- arena_get(ar_ptr, sz);
- if(!ar_ptr)
- return 0;
-
- /* Check if expand_top called, in which case there may be
- no need to clear. */
-#if MORECORE_CLEARS
- oldtop = top(ar_ptr);
- oldtopsize = chunksize(top(ar_ptr));
-#if MORECORE_CLEARS < 2
- /* Only newly allocated memory is guaranteed to be cleared. */
- if (ar_ptr == &main_arena &&
- oldtopsize < sbrk_base + max_sbrked_mem - (char *)oldtop)
- oldtopsize = (sbrk_base + max_sbrked_mem - (char *)oldtop);
-#endif
-#endif
- p = chunk_alloc (ar_ptr, sz);
-
- /* Only clearing follows, so we can unlock early. */
- (void)mutex_unlock(&ar_ptr->mutex);
-
- if (p == 0) {
- /* Maybe the failure is due to running out of mmapped areas. */
- if(ar_ptr != &main_arena) {
- (void)mutex_lock(&main_arena.mutex);
- p = chunk_alloc(&main_arena, sz);
- (void)mutex_unlock(&main_arena.mutex);
- } else {
-#if USE_ARENAS
- /* ... or sbrk() has failed and there is still a chance to mmap() */
- (void)mutex_lock(&main_arena.mutex);
- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, sz);
- (void)mutex_unlock(&main_arena.mutex);
- if(ar_ptr) {
- p = chunk_alloc(ar_ptr, sz);
- (void)mutex_unlock(&ar_ptr->mutex);
- }
-#endif
- }
- if (p == 0) return 0;
- }
- mem = BOUNDED_N(chunk2mem(p), n * elem_size);
-
- /* Two optional cases in which clearing not necessary */
-
-#if HAVE_MMAP
- if (chunk_is_mmapped(p)) return mem;
-#endif
-
- csz = chunksize(p);
-
-#if MORECORE_CLEARS
- if (p == oldtop && csz > oldtopsize) {
- /* clear only the bytes from non-freshly-sbrked memory */
- csz = oldtopsize;
- }
-#endif
-
- csz -= SIZE_SZ;
- MALLOC_ZERO(BOUNDED_N(chunk2mem(p), csz), csz);
- return mem;
-}
-
-/*
-
- cfree just calls free. It is needed/defined on some systems
- that pair it with calloc, presumably for odd historical reasons.
-
-*/
-
-#if !defined(_LIBC)
-#if __STD_C
-void cfree(Void_t *mem)
-#else
-void cfree(mem) Void_t *mem;
-#endif
-{
- fREe(mem);
-}
-#endif
-
-
-
-/*
-
- Malloc_trim gives memory back to the system (via negative
- arguments to sbrk) if there is unused memory at the `high' end of
- the malloc pool. You can call this after freeing large blocks of
- memory to potentially reduce the system-level memory requirements
- of a program. However, it cannot guarantee to reduce memory. Under
- some allocation patterns, some large free blocks of memory will be
- locked between two used chunks, so they cannot be given back to
- the system.
-
- The `pad' argument to malloc_trim represents the amount of free
- trailing space to leave untrimmed. If this argument is zero,
- only the minimum amount of memory to maintain internal data
- structures will be left (one page or less). Non-zero arguments
- can be supplied to maintain enough trailing space to service
- future expected allocations without having to re-obtain memory
- from the system.
-
- Malloc_trim returns 1 if it actually released any memory, else 0.
-
-*/
-
-#if __STD_C
-int mALLOC_TRIm(size_t pad)
-#else
-int mALLOC_TRIm(pad) size_t pad;
-#endif
-{
- int res;
-
- (void)mutex_lock(&main_arena.mutex);
- res = main_trim(pad);
- (void)mutex_unlock(&main_arena.mutex);
- return res;
-}
-
-/* Trim the main arena. */
-
-static int
-internal_function
-#if __STD_C
-main_trim(size_t pad)
-#else
-main_trim(pad) size_t pad;
-#endif
-{
- mchunkptr top_chunk; /* The current top chunk */
- long top_size; /* Amount of top-most memory */
- long extra; /* Amount to release */
- char* current_brk; /* address returned by pre-check sbrk call */
- char* new_brk; /* address returned by negative sbrk call */
-
- unsigned long pagesz = malloc_getpagesize;
-
- top_chunk = top(&main_arena);
- top_size = chunksize(top_chunk);
- extra = ((top_size - pad - MINSIZE + (pagesz-1)) / pagesz - 1) * pagesz;
-
- if (extra < (long)pagesz) /* Not enough memory to release */
- return 0;
-
- /* Test to make sure no one else called sbrk */
- current_brk = (char*)(MORECORE (0));
- if (current_brk != (char*)(top_chunk) + top_size)
- return 0; /* Apparently we don't own memory; must fail */
-
- new_brk = (char*)(MORECORE (-extra));
-
-#if defined _LIBC || defined MALLOC_HOOKS
- /* Call the `morecore' hook if necessary. */
- if (__after_morecore_hook)
- (*__after_morecore_hook) ();
-#endif
-
- if (new_brk == (char*)(MORECORE_FAILURE)) { /* sbrk failed? */
- /* Try to figure out what we have */
- current_brk = (char*)(MORECORE (0));
- top_size = current_brk - (char*)top_chunk;
- if (top_size >= (long)MINSIZE) /* if not, we are very very dead! */
- {
- sbrked_mem = current_brk - sbrk_base;
- set_head(top_chunk, top_size | PREV_INUSE);
- }
- check_chunk(&main_arena, top_chunk);
- return 0;
- }
- sbrked_mem -= extra;
-
- /* Success. Adjust top accordingly. */
- set_head(top_chunk, (top_size - extra) | PREV_INUSE);
- check_chunk(&main_arena, top_chunk);
- return 1;
-}
-
-#if USE_ARENAS
-
-static int
-internal_function
-#if __STD_C
-heap_trim(heap_info *heap, size_t pad)
-#else
-heap_trim(heap, pad) heap_info *heap; size_t pad;
-#endif
-{
- unsigned long pagesz = malloc_getpagesize;
- arena *ar_ptr = heap->ar_ptr;
- mchunkptr top_chunk = top(ar_ptr), p, bck, fwd;
- heap_info *prev_heap;
- long new_size, top_size, extra;
-
- /* Can this heap go away completely ? */
- while(top_chunk == chunk_at_offset(heap, sizeof(*heap))) {
- prev_heap = heap->prev;
- p = chunk_at_offset(prev_heap, prev_heap->size - (MINSIZE-2*SIZE_SZ));
- assert(p->size == (0|PREV_INUSE)); /* must be fencepost */
- p = prev_chunk(p);
- new_size = chunksize(p) + (MINSIZE-2*SIZE_SZ);
- assert(new_size>0 && new_size<(long)(2*MINSIZE));
- if(!prev_inuse(p))
- new_size += p->prev_size;
- assert(new_size>0 && new_size<HEAP_MAX_SIZE);
- if(new_size + (HEAP_MAX_SIZE - prev_heap->size) < pad + MINSIZE + pagesz)
- break;
- ar_ptr->size -= heap->size;
- arena_mem -= heap->size;
- delete_heap(heap);
- heap = prev_heap;
- if(!prev_inuse(p)) { /* consolidate backward */
- p = prev_chunk(p);
- unlink(p, bck, fwd);
- }
- assert(((unsigned long)((char*)p + new_size) & (pagesz-1)) == 0);
- assert( ((char*)p + new_size) == ((char*)heap + heap->size) );
- top(ar_ptr) = top_chunk = p;
- set_head(top_chunk, new_size | PREV_INUSE);
- check_chunk(ar_ptr, top_chunk);
- }
- top_size = chunksize(top_chunk);
- extra = ((top_size - pad - MINSIZE + (pagesz-1))/pagesz - 1) * pagesz;
- if(extra < (long)pagesz)
- return 0;
- /* Try to shrink. */
- if(grow_heap(heap, -extra) != 0)
- return 0;
- ar_ptr->size -= extra;
- arena_mem -= extra;
-
- /* Success. Adjust top accordingly. */
- set_head(top_chunk, (top_size - extra) | PREV_INUSE);
- check_chunk(ar_ptr, top_chunk);
- return 1;
-}
-
-#endif /* USE_ARENAS */
-
-
-
-/*
- malloc_usable_size:
-
- This routine tells you how many bytes you can actually use in an
- allocated chunk, which may be more than you requested (although
- often not). You can use this many bytes without worrying about
- overwriting other allocated objects. Not a particularly great
- programming practice, but still sometimes useful.
-
-*/
-
-#if __STD_C
-size_t mALLOC_USABLE_SIZe(Void_t* mem)
-#else
-size_t mALLOC_USABLE_SIZe(mem) Void_t* mem;
-#endif
-{
- mchunkptr p;
-
- if (mem == 0)
- return 0;
- else
- {
- p = mem2chunk(mem);
- if(!chunk_is_mmapped(p))
- {
- if (!inuse(p)) return 0;
- check_inuse_chunk(arena_for_ptr(mem), p);
- return chunksize(p) - SIZE_SZ;
- }
- return chunksize(p) - 2*SIZE_SZ;
- }
-}
-
-
-
-
-/* Utility to update mallinfo for malloc_stats() and mallinfo() */
-
-static void
-#if __STD_C
-malloc_update_mallinfo(arena *ar_ptr, struct mallinfo *mi)
-#else
-malloc_update_mallinfo(ar_ptr, mi) arena *ar_ptr; struct mallinfo *mi;
-#endif
-{
- int i, navail;
- mbinptr b;
- mchunkptr p;
-#if MALLOC_DEBUG
- mchunkptr q;
-#endif
- INTERNAL_SIZE_T avail;
-
- (void)mutex_lock(&ar_ptr->mutex);
- avail = chunksize(top(ar_ptr));
- navail = ((long)(avail) >= (long)MINSIZE)? 1 : 0;
-
- for (i = 1; i < NAV; ++i)
- {
- b = bin_at(ar_ptr, i);
- for (p = last(b); p != b; p = p->bk)
- {
-#if MALLOC_DEBUG
- check_free_chunk(ar_ptr, p);
- for (q = next_chunk(p);
- q != top(ar_ptr) && inuse(q) && (long)chunksize(q) > 0;
- q = next_chunk(q))
- check_inuse_chunk(ar_ptr, q);
-#endif
- avail += chunksize(p);
- navail++;
- }
- }
-
- mi->arena = ar_ptr->size;
- mi->ordblks = navail;
- mi->smblks = mi->usmblks = mi->fsmblks = 0; /* clear unused fields */
- mi->uordblks = ar_ptr->size - avail;
- mi->fordblks = avail;
- mi->hblks = n_mmaps;
- mi->hblkhd = mmapped_mem;
- mi->keepcost = chunksize(top(ar_ptr));
-
- (void)mutex_unlock(&ar_ptr->mutex);
-}
-
-#if USE_ARENAS && MALLOC_DEBUG > 1
-
-/* Print the complete contents of a single heap to stderr. */
-
-static void
-#if __STD_C
-dump_heap(heap_info *heap)
-#else
-dump_heap(heap) heap_info *heap;
-#endif
-{
- char *ptr;
- mchunkptr p;
-
- fprintf(stderr, "Heap %p, size %10lx:\n", heap, (long)heap->size);
- ptr = (heap->ar_ptr != (arena*)(heap+1)) ?
- (char*)(heap + 1) : (char*)(heap + 1) + sizeof(arena);
- p = (mchunkptr)(((unsigned long)ptr + MALLOC_ALIGN_MASK) &
- ~MALLOC_ALIGN_MASK);
- for(;;) {
- fprintf(stderr, "chunk %p size %10lx", p, (long)p->size);
- if(p == top(heap->ar_ptr)) {
- fprintf(stderr, " (top)\n");
- break;
- } else if(p->size == (0|PREV_INUSE)) {
- fprintf(stderr, " (fence)\n");
- break;
- }
- fprintf(stderr, "\n");
- p = next_chunk(p);
- }
-}
-
-#endif
-
-
-
-/*
-
- malloc_stats:
-
- For all arenas separately and in total, prints on stderr the
- amount of space obtained from the system, and the current number
- of bytes allocated via malloc (or realloc, etc) but not yet
- freed. (Note that this is the number of bytes allocated, not the
- number requested. It will be larger than the number requested
- because of alignment and bookkeeping overhead.) When not compiled
- for multiple threads, the maximum amount of allocated memory
- (which may be more than current if malloc_trim and/or munmap got
- called) is also reported. When using mmap(), prints the maximum
- number of simultaneous mmap regions used, too.
-
-*/
-
-void mALLOC_STATs()
-{
- int i;
- arena *ar_ptr;
- struct mallinfo mi;
- unsigned int in_use_b = mmapped_mem, system_b = in_use_b;
-#if THREAD_STATS
- long stat_lock_direct = 0, stat_lock_loop = 0, stat_lock_wait = 0;
-#endif
-
- for(i=0, ar_ptr = &main_arena;; i++) {
- malloc_update_mallinfo(ar_ptr, &mi);
- fprintf(stderr, "Arena %d:\n", i);
- fprintf(stderr, "system bytes = %10u\n", (unsigned int)mi.arena);
- fprintf(stderr, "in use bytes = %10u\n", (unsigned int)mi.uordblks);
- system_b += mi.arena;
- in_use_b += mi.uordblks;
-#if THREAD_STATS
- stat_lock_direct += ar_ptr->stat_lock_direct;
- stat_lock_loop += ar_ptr->stat_lock_loop;
- stat_lock_wait += ar_ptr->stat_lock_wait;
-#endif
-#if USE_ARENAS && MALLOC_DEBUG > 1
- if(ar_ptr != &main_arena) {
- heap_info *heap;
- (void)mutex_lock(&ar_ptr->mutex);
- heap = heap_for_ptr(top(ar_ptr));
- while(heap) { dump_heap(heap); heap = heap->prev; }
- (void)mutex_unlock(&ar_ptr->mutex);
- }
-#endif
- ar_ptr = ar_ptr->next;
- if(ar_ptr == &main_arena) break;
- }
-#if HAVE_MMAP
- fprintf(stderr, "Total (incl. mmap):\n");
-#else
- fprintf(stderr, "Total:\n");
-#endif
- fprintf(stderr, "system bytes = %10u\n", system_b);
- fprintf(stderr, "in use bytes = %10u\n", in_use_b);
-#ifdef NO_THREADS
- fprintf(stderr, "max system bytes = %10u\n", (unsigned int)max_total_mem);
-#endif
-#if HAVE_MMAP
- fprintf(stderr, "max mmap regions = %10u\n", (unsigned int)max_n_mmaps);
- fprintf(stderr, "max mmap bytes = %10lu\n", max_mmapped_mem);
-#endif
-#if THREAD_STATS
- fprintf(stderr, "heaps created = %10d\n", stat_n_heaps);
- fprintf(stderr, "locked directly = %10ld\n", stat_lock_direct);
- fprintf(stderr, "locked in loop = %10ld\n", stat_lock_loop);
- fprintf(stderr, "locked waiting = %10ld\n", stat_lock_wait);
- fprintf(stderr, "locked total = %10ld\n",
- stat_lock_direct + stat_lock_loop + stat_lock_wait);
-#endif
-}
-
-/*
- mallinfo returns a copy of updated current mallinfo.
- The information reported is for the arena last used by the thread.
-*/
-
-struct mallinfo mALLINFo()
-{
- struct mallinfo mi;
- Void_t *vptr = NULL;
-
-#ifndef NO_THREADS
- tsd_getspecific(arena_key, vptr);
- if(vptr == ATFORK_ARENA_PTR)
- vptr = (Void_t*)&main_arena;
-#endif
- malloc_update_mallinfo((vptr ? (arena*)vptr : &main_arena), &mi);
- return mi;
-}
-
-
-
-
-/*
- mallopt:
-
- mallopt is the general SVID/XPG interface to tunable parameters.
- The format is to provide a (parameter-number, parameter-value) pair.
- mallopt then sets the corresponding parameter to the argument
- value if it can (i.e., so long as the value is meaningful),
- and returns 1 if successful else 0.
-
- See descriptions of tunable parameters above.
-
-*/
-
-#if __STD_C
-int mALLOPt(int param_number, int value)
-#else
-int mALLOPt(param_number, value) int param_number; int value;
-#endif
-{
- switch(param_number)
- {
- case M_TRIM_THRESHOLD:
- trim_threshold = value; return 1;
- case M_TOP_PAD:
- top_pad = value; return 1;
- case M_MMAP_THRESHOLD:
-#if USE_ARENAS
- /* Forbid setting the threshold too high. */
- if((unsigned long)value > HEAP_MAX_SIZE/2) return 0;
-#endif
- mmap_threshold = value; return 1;
- case M_MMAP_MAX:
-#if HAVE_MMAP
- n_mmaps_max = value; return 1;
-#else
- if (value != 0) return 0; else n_mmaps_max = value; return 1;
-#endif
- case M_CHECK_ACTION:
- check_action = value; return 1;
-
- default:
- return 0;
- }
-}
-
-
-
-/* Get/set state: malloc_get_state() records the current state of all
- malloc variables (_except_ for the actual heap contents and `hook'
- function pointers) in a system dependent, opaque data structure.
- This data structure is dynamically allocated and can be free()d
- after use. malloc_set_state() restores the state of all malloc
- variables to the previously obtained state. This is especially
- useful when using this malloc as part of a shared library, and when
- the heap contents are saved/restored via some other method. The
- primary example for this is GNU Emacs with its `dumping' procedure.
- `Hook' function pointers are never saved or restored by these
- functions, with two exceptions: If malloc checking was in use when
- malloc_get_state() was called, then malloc_set_state() calls
- __malloc_check_init() if possible; if malloc checking was not in
- use in the recorded state but the user requested malloc checking,
- then the hooks are reset to 0. */
-
-#define MALLOC_STATE_MAGIC 0x444c4541l
-#define MALLOC_STATE_VERSION (0*0x100l + 1l) /* major*0x100 + minor */
-
-struct malloc_state {
- long magic;
- long version;
- mbinptr av[NAV * 2 + 2];
- char* sbrk_base;
- int sbrked_mem_bytes;
- unsigned long trim_threshold;
- unsigned long top_pad;
- unsigned int n_mmaps_max;
- unsigned long mmap_threshold;
- int check_action;
- unsigned long max_sbrked_mem;
- unsigned long max_total_mem;
- unsigned int n_mmaps;
- unsigned int max_n_mmaps;
- unsigned long mmapped_mem;
- unsigned long max_mmapped_mem;
- int using_malloc_checking;
-};
-
-Void_t*
-mALLOC_GET_STATe()
-{
- struct malloc_state* ms;
- int i;
- mbinptr b;
-
- ms = (struct malloc_state*)mALLOc(sizeof(*ms));
- if (!ms)
- return 0;
- (void)mutex_lock(&main_arena.mutex);
- ms->magic = MALLOC_STATE_MAGIC;
- ms->version = MALLOC_STATE_VERSION;
- ms->av[0] = main_arena.av[0];
- ms->av[1] = main_arena.av[1];
- for(i=0; i<NAV; i++) {
- b = bin_at(&main_arena, i);
- if(first(b) == b)
- ms->av[2*i+2] = ms->av[2*i+3] = 0; /* empty bin (or initial top) */
- else {
- ms->av[2*i+2] = first(b);
- ms->av[2*i+3] = last(b);
- }
- }
- ms->sbrk_base = sbrk_base;
- ms->sbrked_mem_bytes = sbrked_mem;
- ms->trim_threshold = trim_threshold;
- ms->top_pad = top_pad;
- ms->n_mmaps_max = n_mmaps_max;
- ms->mmap_threshold = mmap_threshold;
- ms->check_action = check_action;
- ms->max_sbrked_mem = max_sbrked_mem;
-#ifdef NO_THREADS
- ms->max_total_mem = max_total_mem;
-#else
- ms->max_total_mem = 0;
-#endif
- ms->n_mmaps = n_mmaps;
- ms->max_n_mmaps = max_n_mmaps;
- ms->mmapped_mem = mmapped_mem;
- ms->max_mmapped_mem = max_mmapped_mem;
-#if defined _LIBC || defined MALLOC_HOOKS
- ms->using_malloc_checking = using_malloc_checking;
-#else
- ms->using_malloc_checking = 0;
-#endif
- (void)mutex_unlock(&main_arena.mutex);
- return (Void_t*)ms;
-}
-
-int
-#if __STD_C
-mALLOC_SET_STATe(Void_t* msptr)
-#else
-mALLOC_SET_STATe(msptr) Void_t* msptr;
-#endif
-{
- struct malloc_state* ms = (struct malloc_state*)msptr;
- int i;
- mbinptr b;
-
-#if defined _LIBC || defined MALLOC_HOOKS
- disallow_malloc_check = 1;
-#endif
- ptmalloc_init();
- if(ms->magic != MALLOC_STATE_MAGIC) return -1;
- /* Must fail if the major version is too high. */
- if((ms->version & ~0xffl) > (MALLOC_STATE_VERSION & ~0xffl)) return -2;
- (void)mutex_lock(&main_arena.mutex);
- main_arena.av[0] = ms->av[0];
- main_arena.av[1] = ms->av[1];
- for(i=0; i<NAV; i++) {
- b = bin_at(&main_arena, i);
- if(ms->av[2*i+2] == 0)
- first(b) = last(b) = b;
- else {
- first(b) = ms->av[2*i+2];
- last(b) = ms->av[2*i+3];
- if(i > 0) {
- /* Make sure the links to the `av'-bins in the heap are correct. */
- first(b)->bk = b;
- last(b)->fd = b;
- }
- }
- }
- sbrk_base = ms->sbrk_base;
- sbrked_mem = ms->sbrked_mem_bytes;
- trim_threshold = ms->trim_threshold;
- top_pad = ms->top_pad;
- n_mmaps_max = ms->n_mmaps_max;
- mmap_threshold = ms->mmap_threshold;
- check_action = ms->check_action;
- max_sbrked_mem = ms->max_sbrked_mem;
-#ifdef NO_THREADS
- max_total_mem = ms->max_total_mem;
-#endif
- n_mmaps = ms->n_mmaps;
- max_n_mmaps = ms->max_n_mmaps;
- mmapped_mem = ms->mmapped_mem;
- max_mmapped_mem = ms->max_mmapped_mem;
- /* add version-dependent code here */
- if (ms->version >= 1) {
-#if defined _LIBC || defined MALLOC_HOOKS
- /* Check whether it is safe to enable malloc checking, or whether
- it is necessary to disable it. */
- if (ms->using_malloc_checking && !using_malloc_checking &&
- !disallow_malloc_check)
- __malloc_check_init ();
- else if (!ms->using_malloc_checking && using_malloc_checking) {
- __malloc_hook = 0;
- __free_hook = 0;
- __realloc_hook = 0;
- __memalign_hook = 0;
- using_malloc_checking = 0;
- }
-#endif
- }
-
- (void)mutex_unlock(&main_arena.mutex);
- return 0;
-}
-
-
-
-#if defined _LIBC || defined MALLOC_HOOKS
-
-/* A simple, standard set of debugging hooks. Overhead is `only' one
- byte per chunk; still this will catch most cases of double frees or
- overruns. The goal here is to avoid obscure crashes due to invalid
- usage, unlike in the MALLOC_DEBUG code. */
-
-#define MAGICBYTE(p) ( ( ((size_t)p >> 3) ^ ((size_t)p >> 11)) & 0xFF )
-
-/* Instrument a chunk with overrun detector byte(s) and convert it
- into a user pointer with requested size sz. */
-
-static Void_t*
-internal_function
-#if __STD_C
-chunk2mem_check(mchunkptr p, size_t sz)
-#else
-chunk2mem_check(p, sz) mchunkptr p; size_t sz;
-#endif
-{
- unsigned char* m_ptr = (unsigned char*)BOUNDED_N(chunk2mem(p), sz);
- size_t i;
-
- for(i = chunksize(p) - (chunk_is_mmapped(p) ? 2*SIZE_SZ+1 : SIZE_SZ+1);
- i > sz;
- i -= 0xFF) {
- if(i-sz < 0x100) {
- m_ptr[i] = (unsigned char)(i-sz);
- break;
- }
- m_ptr[i] = 0xFF;
- }
- m_ptr[sz] = MAGICBYTE(p);
- return (Void_t*)m_ptr;
-}
-
-/* Convert a pointer to be free()d or realloc()ed to a valid chunk
- pointer. If the provided pointer is not valid, return NULL. */
-
-static mchunkptr
-internal_function
-#if __STD_C
-mem2chunk_check(Void_t* mem)
-#else
-mem2chunk_check(mem) Void_t* mem;
-#endif
-{
- mchunkptr p;
- INTERNAL_SIZE_T sz, c;
- unsigned char magic;
-
- p = mem2chunk(mem);
- if(!aligned_OK(p)) return NULL;
- if( (char*)p>=sbrk_base && (char*)p<(sbrk_base+sbrked_mem) ) {
- /* Must be a chunk in conventional heap memory. */
- if(chunk_is_mmapped(p) ||
- ( (sz = chunksize(p)), ((char*)p + sz)>=(sbrk_base+sbrked_mem) ) ||
- sz<MINSIZE || sz&MALLOC_ALIGN_MASK || !inuse(p) ||
- ( !prev_inuse(p) && (p->prev_size&MALLOC_ALIGN_MASK ||
- (long)prev_chunk(p)<(long)sbrk_base ||
- next_chunk(prev_chunk(p))!=p) ))
- return NULL;
- magic = MAGICBYTE(p);
- for(sz += SIZE_SZ-1; (c = ((unsigned char*)p)[sz]) != magic; sz -= c) {
- if(c<=0 || sz<(c+2*SIZE_SZ)) return NULL;
- }
- ((unsigned char*)p)[sz] ^= 0xFF;
- } else {
- unsigned long offset, page_mask = malloc_getpagesize-1;
-
- /* mmap()ed chunks have MALLOC_ALIGNMENT or higher power-of-two
- alignment relative to the beginning of a page. Check this
- first. */
- offset = (unsigned long)mem & page_mask;
- if((offset!=MALLOC_ALIGNMENT && offset!=0 && offset!=0x10 &&
- offset!=0x20 && offset!=0x40 && offset!=0x80 && offset!=0x100 &&
- offset!=0x200 && offset!=0x400 && offset!=0x800 && offset!=0x1000 &&
- offset<0x2000) ||
- !chunk_is_mmapped(p) || (p->size & PREV_INUSE) ||
- ( (((unsigned long)p - p->prev_size) & page_mask) != 0 ) ||
- ( (sz = chunksize(p)), ((p->prev_size + sz) & page_mask) != 0 ) )
- return NULL;
- magic = MAGICBYTE(p);
- for(sz -= 1; (c = ((unsigned char*)p)[sz]) != magic; sz -= c) {
- if(c<=0 || sz<(c+2*SIZE_SZ)) return NULL;
- }
- ((unsigned char*)p)[sz] ^= 0xFF;
- }
- return p;
-}
-
-/* Check for corruption of the top chunk, and try to recover if
- necessary. */
-
-static int
-internal_function
-#if __STD_C
-top_check(void)
-#else
-top_check()
-#endif
-{
- mchunkptr t = top(&main_arena);
- char* brk, * new_brk;
- INTERNAL_SIZE_T front_misalign, sbrk_size;
- unsigned long pagesz = malloc_getpagesize;
-
- if((char*)t + chunksize(t) == sbrk_base + sbrked_mem ||
- t == initial_top(&main_arena)) return 0;
-
- if(check_action & 1)
- fprintf(stderr, "malloc: top chunk is corrupt\n");
- if(check_action & 2)
- abort();
-
- /* Try to set up a new top chunk. */
- brk = MORECORE(0);
- front_misalign = (unsigned long)chunk2mem(brk) & MALLOC_ALIGN_MASK;
- if (front_misalign > 0)
- front_misalign = MALLOC_ALIGNMENT - front_misalign;
- sbrk_size = front_misalign + top_pad + MINSIZE;
- sbrk_size += pagesz - ((unsigned long)(brk + sbrk_size) & (pagesz - 1));
- new_brk = (char*)(MORECORE (sbrk_size));
- if (new_brk == (char*)(MORECORE_FAILURE)) return -1;
- sbrked_mem = (new_brk - sbrk_base) + sbrk_size;
-
- top(&main_arena) = (mchunkptr)(brk + front_misalign);
- set_head(top(&main_arena), (sbrk_size - front_misalign) | PREV_INUSE);
-
- return 0;
-}
-
-static Void_t*
-#if __STD_C
-malloc_check(size_t sz, const Void_t *caller)
-#else
-malloc_check(sz, caller) size_t sz; const Void_t *caller;
-#endif
-{
- mchunkptr victim;
- INTERNAL_SIZE_T nb;
-
- if(request2size(sz+1, nb))
- return 0;
- (void)mutex_lock(&main_arena.mutex);
- victim = (top_check() >= 0) ? chunk_alloc(&main_arena, nb) : NULL;
- (void)mutex_unlock(&main_arena.mutex);
- if(!victim) return NULL;
- return chunk2mem_check(victim, sz);
-}
-
-static void
-#if __STD_C
-free_check(Void_t* mem, const Void_t *caller)
-#else
-free_check(mem, caller) Void_t* mem; const Void_t *caller;
-#endif
-{
- mchunkptr p;
-
- if(!mem) return;
- (void)mutex_lock(&main_arena.mutex);
- p = mem2chunk_check(mem);
- if(!p) {
- (void)mutex_unlock(&main_arena.mutex);
- if(check_action & 1)
- fprintf(stderr, "free(): invalid pointer %p!\n", mem);
- if(check_action & 2)
- abort();
- return;
- }
-#if HAVE_MMAP
- if (chunk_is_mmapped(p)) {
- (void)mutex_unlock(&main_arena.mutex);
- munmap_chunk(p);
- return;
- }
-#endif
-#if 0 /* Erase freed memory. */
- memset(mem, 0, chunksize(p) - (SIZE_SZ+1));
-#endif
- chunk_free(&main_arena, p);
- (void)mutex_unlock(&main_arena.mutex);
-}
-
-static Void_t*
-#if __STD_C
-realloc_check(Void_t* oldmem, size_t bytes, const Void_t *caller)
-#else
-realloc_check(oldmem, bytes, caller)
- Void_t* oldmem; size_t bytes; const Void_t *caller;
-#endif
-{
- mchunkptr oldp, newp;
- INTERNAL_SIZE_T nb, oldsize;
-
- if (oldmem == 0) return malloc_check(bytes, NULL);
- (void)mutex_lock(&main_arena.mutex);
- oldp = mem2chunk_check(oldmem);
- if(!oldp) {
- (void)mutex_unlock(&main_arena.mutex);
- if(check_action & 1)
- fprintf(stderr, "realloc(): invalid pointer %p!\n", oldmem);
- if(check_action & 2)
- abort();
- return malloc_check(bytes, NULL);
- }
- oldsize = chunksize(oldp);
-
- if(request2size(bytes+1, nb)) {
- (void)mutex_unlock(&main_arena.mutex);
- return 0;
- }
-
-#if HAVE_MMAP
- if (chunk_is_mmapped(oldp)) {
-#if HAVE_MREMAP
- newp = mremap_chunk(oldp, nb);
- if(!newp) {
-#endif
- /* Note the extra SIZE_SZ overhead. */
- if(oldsize - SIZE_SZ >= nb) newp = oldp; /* do nothing */
- else {
- /* Must alloc, copy, free. */
- newp = (top_check() >= 0) ? chunk_alloc(&main_arena, nb) : NULL;
- if (newp) {
- MALLOC_COPY(BOUNDED_N(chunk2mem(newp), nb),
- oldmem, oldsize - 2*SIZE_SZ, 0);
- munmap_chunk(oldp);
- }
- }
-#if HAVE_MREMAP
- }
-#endif
- } else {
-#endif /* HAVE_MMAP */
- newp = (top_check() >= 0) ?
- chunk_realloc(&main_arena, oldp, oldsize, nb) : NULL;
-#if 0 /* Erase freed memory. */
- nb = chunksize(newp);
- if(oldp<newp || oldp>=chunk_at_offset(newp, nb)) {
- memset((char*)oldmem + 2*sizeof(mbinptr), 0,
- oldsize - (2*sizeof(mbinptr)+2*SIZE_SZ+1));
- } else if(nb > oldsize+SIZE_SZ) {
- memset((char*)BOUNDED_N(chunk2mem(newp), bytes) + oldsize,
- 0, nb - (oldsize+SIZE_SZ));
- }
-#endif
-#if HAVE_MMAP
- }
-#endif
- (void)mutex_unlock(&main_arena.mutex);
-
- if(!newp) return NULL;
- return chunk2mem_check(newp, bytes);
-}
-
-static Void_t*
-#if __STD_C
-memalign_check(size_t alignment, size_t bytes, const Void_t *caller)
-#else
-memalign_check(alignment, bytes, caller)
- size_t alignment; size_t bytes; const Void_t *caller;
-#endif
-{
- INTERNAL_SIZE_T nb;
- mchunkptr p;
-
- if (alignment <= MALLOC_ALIGNMENT) return malloc_check(bytes, NULL);
- if (alignment < MINSIZE) alignment = MINSIZE;
-
- if(request2size(bytes+1, nb))
- return 0;
- (void)mutex_lock(&main_arena.mutex);
- p = (top_check() >= 0) ? chunk_align(&main_arena, nb, alignment) : NULL;
- (void)mutex_unlock(&main_arena.mutex);
- if(!p) return NULL;
- return chunk2mem_check(p, bytes);
-}
-
-#ifndef NO_THREADS
-
-/* The following hooks are used when the global initialization in
- ptmalloc_init() hasn't completed yet. */
-
-static Void_t*
-#if __STD_C
-malloc_starter(size_t sz, const Void_t *caller)
-#else
-malloc_starter(sz, caller) size_t sz; const Void_t *caller;
-#endif
-{
- INTERNAL_SIZE_T nb;
- mchunkptr victim;
-
- if(request2size(sz, nb))
- return 0;
- victim = chunk_alloc(&main_arena, nb);
-
- return victim ? BOUNDED_N(chunk2mem(victim), sz) : 0;
-}
-
-static void
-#if __STD_C
-free_starter(Void_t* mem, const Void_t *caller)
-#else
-free_starter(mem, caller) Void_t* mem; const Void_t *caller;
-#endif
-{
- mchunkptr p;
-
- if(!mem) return;
- p = mem2chunk(mem);
-#if HAVE_MMAP
- if (chunk_is_mmapped(p)) {
- munmap_chunk(p);
- return;
- }
-#endif
- chunk_free(&main_arena, p);
-}
-
-/* The following hooks are used while the `atfork' handling mechanism
- is active. */
-
-static Void_t*
-#if __STD_C
-malloc_atfork (size_t sz, const Void_t *caller)
-#else
-malloc_atfork(sz, caller) size_t sz; const Void_t *caller;
-#endif
-{
- Void_t *vptr = NULL;
- INTERNAL_SIZE_T nb;
- mchunkptr victim;
-
- tsd_getspecific(arena_key, vptr);
- if(vptr == ATFORK_ARENA_PTR) {
- /* We are the only thread that may allocate at all. */
- if(save_malloc_hook != malloc_check) {
- if(request2size(sz, nb))
- return 0;
- victim = chunk_alloc(&main_arena, nb);
- return victim ? BOUNDED_N(chunk2mem(victim), sz) : 0;
- } else {
- if(top_check()<0 || request2size(sz+1, nb))
- return 0;
- victim = chunk_alloc(&main_arena, nb);
- return victim ? chunk2mem_check(victim, sz) : 0;
- }
- } else {
- /* Suspend the thread until the `atfork' handlers have completed.
- By that time, the hooks will have been reset as well, so that
- mALLOc() can be used again. */
- (void)mutex_lock(&list_lock);
- (void)mutex_unlock(&list_lock);
- return mALLOc(sz);
- }
-}
-
-static void
-#if __STD_C
-free_atfork(Void_t* mem, const Void_t *caller)
-#else
-free_atfork(mem, caller) Void_t* mem; const Void_t *caller;
-#endif
-{
- Void_t *vptr = NULL;
- arena *ar_ptr;
- mchunkptr p; /* chunk corresponding to mem */
-
- if (mem == 0) /* free(0) has no effect */
- return;
-
- p = mem2chunk(mem); /* do not bother to replicate free_check here */
-
-#if HAVE_MMAP
- if (chunk_is_mmapped(p)) /* release mmapped memory. */
- {
- munmap_chunk(p);
- return;
- }
-#endif
-
- ar_ptr = arena_for_ptr(p);
- tsd_getspecific(arena_key, vptr);
- if(vptr != ATFORK_ARENA_PTR)
- (void)mutex_lock(&ar_ptr->mutex);
- chunk_free(ar_ptr, p);
- if(vptr != ATFORK_ARENA_PTR)
- (void)mutex_unlock(&ar_ptr->mutex);
-}
-
-#endif /* !defined NO_THREADS */
-
-#endif /* defined _LIBC || defined MALLOC_HOOKS */
-
-
-
-#ifdef _LIBC
-
-/* default method of getting more storage */
-__malloc_ptr_t
-__default_morecore (int inc)
-{
- __malloc_ptr_t result = (__malloc_ptr_t)sbrk (inc);
- if (result == (__malloc_ptr_t)-1)
- return NULL;
- return result;
-}
-
-/* We need a wrapper function for one of the additions of POSIX. */
-int
-__posix_memalign (void **memptr, size_t alignment, size_t size)
-{
- void *mem;
-
- /* Test whether the ALIGNMENT argument is valid. It must be a power
- of two multiple of sizeof (void *). */
- if (alignment % sizeof (void *) != 0 || (alignment & (alignment - 1)) != 0)
- return EINVAL;
-
- mem = __libc_memalign (alignment, size);
-
- if (mem != NULL)
- {
- *memptr = mem;
- return 0;
- }
-
- return ENOMEM;
-}
-weak_alias (__posix_memalign, posix_memalign)
-
-weak_alias (__libc_calloc, __calloc) weak_alias (__libc_calloc, calloc)
-weak_alias (__libc_free, __cfree) weak_alias (__libc_free, cfree)
-weak_alias (__libc_free, __free) weak_alias (__libc_free, free)
-weak_alias (__libc_malloc, __malloc) weak_alias (__libc_malloc, malloc)
-weak_alias (__libc_memalign, __memalign) weak_alias (__libc_memalign, memalign)
-weak_alias (__libc_realloc, __realloc) weak_alias (__libc_realloc, realloc)
-weak_alias (__libc_valloc, __valloc) weak_alias (__libc_valloc, valloc)
-weak_alias (__libc_pvalloc, __pvalloc) weak_alias (__libc_pvalloc, pvalloc)
-weak_alias (__libc_mallinfo, __mallinfo) weak_alias (__libc_mallinfo, mallinfo)
-weak_alias (__libc_mallopt, __mallopt) weak_alias (__libc_mallopt, mallopt)
-
-weak_alias (__malloc_stats, malloc_stats)
-weak_alias (__malloc_usable_size, malloc_usable_size)
-weak_alias (__malloc_trim, malloc_trim)
-weak_alias (__malloc_get_state, malloc_get_state)
-weak_alias (__malloc_set_state, malloc_set_state)
-#endif
-
-/*
-
-History:
-
- V2.6.4-pt3 Thu Feb 20 1997 Wolfram Gloger (wmglo@dent.med.uni-muenchen.de)
- * Added malloc_get/set_state() (mainly for use in GNU emacs),
- using interface from Marcus Daniels
- * All parameters are now adjustable via environment variables
-
- V2.6.4-pt2 Sat Dec 14 1996 Wolfram Gloger (wmglo@dent.med.uni-muenchen.de)
- * Added debugging hooks
- * Fixed possible deadlock in realloc() when out of memory
- * Don't pollute namespace in glibc: use __getpagesize, __mmap, etc.
-
- V2.6.4-pt Wed Dec 4 1996 Wolfram Gloger (wmglo@dent.med.uni-muenchen.de)
- * Very minor updates from the released 2.6.4 version.
- * Trimmed include file down to exported data structures.
- * Changes from H.J. Lu for glibc-2.0.
-
- V2.6.3i-pt Sep 16 1996 Wolfram Gloger (wmglo@dent.med.uni-muenchen.de)
- * Many changes for multiple threads
- * Introduced arenas and heaps
-
- V2.6.3 Sun May 19 08:17:58 1996 Doug Lea (dl at gee)
- * Added pvalloc, as recommended by H.J. Liu
- * Added 64bit pointer support mainly from Wolfram Gloger
- * Added anonymously donated WIN32 sbrk emulation
- * Malloc, calloc, getpagesize: add optimizations from Raymond Nijssen
- * malloc_extend_top: fix mask error that caused wastage after
- foreign sbrks
- * Add linux mremap support code from HJ Liu
-
- V2.6.2 Tue Dec 5 06:52:55 1995 Doug Lea (dl at gee)
- * Integrated most documentation with the code.
- * Add support for mmap, with help from
- Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
- * Use last_remainder in more cases.
- * Pack bins using idea from colin@nyx10.cs.du.edu
- * Use ordered bins instead of best-fit threshold
- * Eliminate block-local decls to simplify tracing and debugging.
- * Support another case of realloc via move into top
- * Fix error occurring when initial sbrk_base not word-aligned.
- * Rely on page size for units instead of SBRK_UNIT to
- avoid surprises about sbrk alignment conventions.
- * Add mallinfo, mallopt. Thanks to Raymond Nijssen
- (raymond@es.ele.tue.nl) for the suggestion.
- * Add `pad' argument to malloc_trim and top_pad mallopt parameter.
- * More precautions for cases where other routines call sbrk,
- courtesy of Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
- * Added macros etc., allowing use in linux libc from
- H.J. Lu (hjl@gnu.ai.mit.edu)
- * Inverted this history list
-
- V2.6.1 Sat Dec 2 14:10:57 1995 Doug Lea (dl at gee)
- * Re-tuned and fixed to behave more nicely with V2.6.0 changes.
- * Removed all preallocation code since under current scheme
- the work required to undo bad preallocations exceeds
- the work saved in good cases for most test programs.
- * No longer use return list or unconsolidated bins since
- no scheme using them consistently outperforms those that don't
- given above changes.
- * Use best fit for very large chunks to prevent some worst-cases.
- * Added some support for debugging
-
- V2.6.0 Sat Nov 4 07:05:23 1995 Doug Lea (dl at gee)
- * Removed footers when chunks are in use. Thanks to
- Paul Wilson (wilson@cs.texas.edu) for the suggestion.
-
- V2.5.4 Wed Nov 1 07:54:51 1995 Doug Lea (dl at gee)
- * Added malloc_trim, with help from Wolfram Gloger
- (wmglo@Dent.MED.Uni-Muenchen.DE).
-
- V2.5.3 Tue Apr 26 10:16:01 1994 Doug Lea (dl at g)
-
- V2.5.2 Tue Apr 5 16:20:40 1994 Doug Lea (dl at g)
- * realloc: try to expand in both directions
- * malloc: swap order of clean-bin strategy;
- * realloc: only conditionally expand backwards
- * Try not to scavenge used bins
- * Use bin counts as a guide to preallocation
- * Occasionally bin return list chunks in first scan
- * Add a few optimizations from colin@nyx10.cs.du.edu
-
- V2.5.1 Sat Aug 14 15:40:43 1993 Doug Lea (dl at g)
- * faster bin computation & slightly different binning
- * merged all consolidations to one part of malloc proper
- (eliminating old malloc_find_space & malloc_clean_bin)
- * Scan 2 returns chunks (not just 1)
- * Propagate failure in realloc if malloc returns 0
- * Add stuff to allow compilation on non-ANSI compilers
- from kpv@research.att.com
-
- V2.5 Sat Aug 7 07:41:59 1993 Doug Lea (dl at g.oswego.edu)
- * removed potential for odd address access in prev_chunk
- * removed dependency on getpagesize.h
- * misc cosmetics and a bit more internal documentation
- * anticosmetics: mangled names in macros to evade debugger strangeness
- * tested on sparc, hp-700, dec-mips, rs6000
- with gcc & native cc (hp, dec only) allowing
- Detlefs & Zorn comparison study (in SIGPLAN Notices.)
-
- Trial version Fri Aug 28 13:14:29 1992 Doug Lea (dl at g.oswego.edu)
- * Based loosely on libg++-1.2X malloc. (It retains some of the overall
- structure of old version, but most details differ.)
-
-*/
diff --git a/newlib/libc/sys/linux/mallocr.c b/newlib/libc/sys/linux/mallocr.c
deleted file mode 100644
index b5129a5e1..000000000
--- a/newlib/libc/sys/linux/mallocr.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdlib.h>
-
-void *
-_malloc_r (struct _reent *ptr, size_t size)
-{
- return malloc (size);
-}
diff --git a/newlib/libc/sys/linux/malloptr.c b/newlib/libc/sys/linux/malloptr.c
deleted file mode 100644
index 13d4e9f6a..000000000
--- a/newlib/libc/sys/linux/malloptr.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdlib.h>
-
-int
-_mallopt_r (struct _reent *ptr, int param_number, int value)
-{
- return mallopt (param_number, value);
-}
diff --git a/newlib/libc/sys/linux/mallstatsr.c b/newlib/libc/sys/linux/mallstatsr.c
deleted file mode 100644
index 8a1f64211..000000000
--- a/newlib/libc/sys/linux/mallstatsr.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdlib.h>
-
-void
-_malloc_stats_r (struct _reent *ptr)
-{
- malloc_stats ();
-}
diff --git a/newlib/libc/sys/linux/mcheck.c b/newlib/libc/sys/linux/mcheck.c
deleted file mode 100644
index eeb99da89..000000000
--- a/newlib/libc/sys/linux/mcheck.c
+++ /dev/null
@@ -1,358 +0,0 @@
-/* Standard debugging hooks for `malloc'.
- Copyright (C) 1990-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written May 1989 by Mike Haertel.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Modified for newlib, July 9, 2002 by Jeff Johnston */
-
-#ifndef _MALLOC_INTERNAL
-# define _MALLOC_INTERNAL
-# include <features.h>
-# define _LIBC 1
-# include <malloc.h>
-# include <mcheck.h>
-# include <stdint.h>
-# include <stdio.h>
-# include <stdlib.h>
-# include <libintl.h>
-# include <sys/cdefs.h>
-#endif
-
-/* Old hook values. */
-static void (*old_free_hook) __P ((__ptr_t ptr, __const __ptr_t));
-static __ptr_t (*old_malloc_hook) __P ((__malloc_size_t size, const __ptr_t));
-static __ptr_t (*old_realloc_hook) __P ((__ptr_t ptr, __malloc_size_t size,
- __const __ptr_t));
-
-/* Function to call when something awful happens. */
-static void (*abortfunc) __P ((enum mcheck_status));
-
-/* Arbitrary magical numbers. */
-#define MAGICWORD 0xfedabeeb
-#define MAGICFREE 0xd8675309
-#define MAGICBYTE ((char) 0xd7)
-#define MALLOCFLOOD ((char) 0x93)
-#define FREEFLOOD ((char) 0x95)
-
-struct hdr
- {
- __malloc_size_t size; /* Exact size requested by user. */
- unsigned long int magic; /* Magic number to check header integrity. */
- struct hdr *prev;
- struct hdr *next;
- };
-
-/* This is the beginning of the list of all memory blocks allocated.
- It is only constructed if the pedantic testing is requested. */
-static struct hdr *root;
-
-static int mcheck_used;
-
-/* Nonzero if pedentic checking of all blocks is requested. */
-static int pedantic;
-
-#if defined _LIBC || defined STDC_HEADERS || defined USG
-# include <string.h>
-# define flood memset
-#else
-static void flood __P ((__ptr_t, int, __malloc_size_t));
-static void
-flood (ptr, val, size)
- __ptr_t ptr;
- int val;
- __malloc_size_t size;
-{
- char *cp = ptr;
- while (size--)
- *cp++ = val;
-}
-#endif
-
-static enum mcheck_status checkhdr __P ((const struct hdr *));
-static enum mcheck_status
-checkhdr (hdr)
- const struct hdr *hdr;
-{
- enum mcheck_status status;
-
- if (!mcheck_used)
- /* Maybe the mcheck used is disabled? This happens when we find
- an error and report it. */
- return MCHECK_OK;
-
- switch (hdr->magic ^ ((uintptr_t) hdr->prev + (uintptr_t) hdr->next))
- {
- default:
- status = MCHECK_HEAD;
- break;
- case MAGICFREE:
- status = MCHECK_FREE;
- break;
- case MAGICWORD:
- if (((char *) &hdr[1])[hdr->size] != MAGICBYTE)
- status = MCHECK_TAIL;
- else
- status = MCHECK_OK;
- break;
- }
- if (status != MCHECK_OK)
- {
- mcheck_used = 0;
- (*abortfunc) (status);
- mcheck_used = 1;
- }
- return status;
-}
-
-void
-mcheck_check_all ()
-{
- /* Walk through all the active blocks and test whether they were tempered
- with. */
- struct hdr *runp = root;
-
- /* Temporarily turn off the checks. */
- pedantic = 0;
-
- while (runp != NULL)
- {
- (void) checkhdr (runp);
-
- runp = runp->next;
- }
-
- /* Turn checks on again. */
- pedantic = 1;
-}
-
-static void unlink_blk __P ((struct hdr *ptr));
-static void
-unlink_blk (ptr)
- struct hdr *ptr;
-{
- if (ptr->next != NULL)
- {
- ptr->next->prev = ptr->prev;
- ptr->next->magic = MAGICWORD ^ ((uintptr_t) ptr->next->prev
- + (uintptr_t) ptr->next->next);
- }
- if (ptr->prev != NULL)
- {
- ptr->prev->next = ptr->next;
- ptr->prev->magic = MAGICWORD ^ ((uintptr_t) ptr->prev->prev
- + (uintptr_t) ptr->prev->next);
- }
- else
- root = ptr->next;
-}
-
-static void link_blk __P ((struct hdr *ptr));
-static void
-link_blk (hdr)
- struct hdr *hdr;
-{
- hdr->prev = NULL;
- hdr->next = root;
- root = hdr;
- hdr->magic = MAGICWORD ^ (uintptr_t) hdr->next;
-
- /* And the next block. */
- if (hdr->next != NULL)
- {
- hdr->next->prev = hdr;
- hdr->next->magic = MAGICWORD ^ ((uintptr_t) hdr
- + (uintptr_t) hdr->next->next);
- }
-}
-
-static void freehook __P ((__ptr_t, const __ptr_t));
-static void
-freehook (ptr, caller)
- __ptr_t ptr;
- const __ptr_t caller;
-{
- if (pedantic)
- mcheck_check_all ();
- if (ptr)
- {
- struct hdr *hdr = ((struct hdr *) ptr) - 1;
- checkhdr (hdr);
- hdr->magic = MAGICFREE;
- unlink_blk (hdr);
- hdr->prev = hdr->next = NULL;
- flood (ptr, FREEFLOOD, hdr->size);
- ptr = (__ptr_t) hdr;
- }
- __free_hook = old_free_hook;
- if (old_free_hook != NULL)
- (*old_free_hook) (ptr, caller);
- else
- free (ptr);
- __free_hook = freehook;
-}
-
-static __ptr_t mallochook __P ((__malloc_size_t, const __ptr_t));
-static __ptr_t
-mallochook (size, caller)
- __malloc_size_t size;
- const __ptr_t caller;
-{
- struct hdr *hdr;
-
- if (pedantic)
- mcheck_check_all ();
-
- __malloc_hook = old_malloc_hook;
- if (old_malloc_hook != NULL)
- hdr = (struct hdr *) (*old_malloc_hook) (sizeof (struct hdr) + size + 1,
- caller);
- else
- hdr = (struct hdr *) malloc (sizeof (struct hdr) + size + 1);
- __malloc_hook = mallochook;
- if (hdr == NULL)
- return NULL;
-
- hdr->size = size;
- link_blk (hdr);
- ((char *) &hdr[1])[size] = MAGICBYTE;
- flood ((__ptr_t) (hdr + 1), MALLOCFLOOD, size);
- return (__ptr_t) (hdr + 1);
-}
-
-static __ptr_t reallochook __P ((__ptr_t, __malloc_size_t, const __ptr_t));
-static __ptr_t
-reallochook (ptr, size, caller)
- __ptr_t ptr;
- __malloc_size_t size;
- const __ptr_t caller;
-{
- struct hdr *hdr;
- __malloc_size_t osize;
-
- if (pedantic)
- mcheck_check_all ();
-
- if (ptr)
- {
- hdr = ((struct hdr *) ptr) - 1;
- osize = hdr->size;
-
- checkhdr (hdr);
- unlink_blk (hdr);
- if (size < osize)
- flood ((char *) ptr + size, FREEFLOOD, osize - size);
- }
- else
- {
- osize = 0;
- hdr = NULL;
- }
- __free_hook = old_free_hook;
- __malloc_hook = old_malloc_hook;
- __realloc_hook = old_realloc_hook;
- if (old_realloc_hook != NULL)
- hdr = (struct hdr *) (*old_realloc_hook) ((__ptr_t) hdr,
- sizeof (struct hdr) + size + 1,
- caller);
- else
- hdr = (struct hdr *) realloc ((__ptr_t) hdr,
- sizeof (struct hdr) + size + 1);
- __free_hook = freehook;
- __malloc_hook = mallochook;
- __realloc_hook = reallochook;
- if (hdr == NULL)
- return NULL;
-
- hdr->size = size;
- link_blk (hdr);
- ((char *) &hdr[1])[size] = MAGICBYTE;
- if (size > osize)
- flood ((char *) (hdr + 1) + osize, MALLOCFLOOD, size - osize);
- return (__ptr_t) (hdr + 1);
-}
-
-static void mabort __P ((enum mcheck_status status))
- __attribute__ ((noreturn));
-static void
-mabort (status)
- enum mcheck_status status;
-{
- const char *msg;
- switch (status)
- {
- case MCHECK_OK:
- msg = _("memory is consistent, library is buggy\n");
- break;
- case MCHECK_HEAD:
- msg = _("memory clobbered before allocated block\n");
- break;
- case MCHECK_TAIL:
- msg = _("memory clobbered past end of allocated block\n");
- break;
- case MCHECK_FREE:
- msg = _("block freed twice\n");
- break;
- default:
- msg = _("bogus mcheck_status, library is buggy\n");
- break;
- }
- fprintf (stderr, "mcheck: %s", msg);
- fflush (stderr);
- abort ();
-}
-
-int
-mcheck (func)
- void (*func) __P ((enum mcheck_status));
-{
- abortfunc = (func != NULL) ? func : &mabort;
-
- /* These hooks may not be safely inserted if malloc is already in use. */
- if (__malloc_initialized <= 0 && !mcheck_used)
- {
- /* We call malloc() once here to ensure it is initialized. */
- void *p = malloc (0);
- free (p);
-
- old_free_hook = __free_hook;
- __free_hook = freehook;
- old_malloc_hook = __malloc_hook;
- __malloc_hook = mallochook;
- old_realloc_hook = __realloc_hook;
- __realloc_hook = reallochook;
- mcheck_used = 1;
- }
-
- return mcheck_used ? 0 : -1;
-}
-
-int
-mcheck_pedantic (func)
- void (*func) __P ((enum mcheck_status));
-{
- int res = mcheck (func);
- if (res == 0)
- pedantic = 1;
- return res;
-}
-
-enum mcheck_status
-mprobe (__ptr_t ptr)
-{
- return mcheck_used ? checkhdr (((struct hdr *) ptr) - 1) : MCHECK_DISABLED;
-}
diff --git a/newlib/libc/sys/linux/mhooks.h b/newlib/libc/sys/linux/mhooks.h
deleted file mode 100644
index 4a2e60656..000000000
--- a/newlib/libc/sys/linux/mhooks.h
+++ /dev/null
@@ -1,12 +0,0 @@
-
-/* Functions used by mcheck/mprobe */
-extern void (*__malloc_initialize_hook) (void);
-extern void (*__free_hook) (void * __ptr, const void *);
-extern void * (*__malloc_hook) (size_t __size, const void *);
-extern void * (*__realloc_hook) (void * __ptr, size_t __size, const void *);
-extern void * (*__memalign_hook) (size_t __alignment, size_t __size,
- const void *);
-extern void (*__after_morecore_hook) (void);
-extern void __malloc_check_init (void);
-
-extern int __malloc_initialized;
diff --git a/newlib/libc/sys/linux/mmap.c b/newlib/libc/sys/linux/mmap.c
deleted file mode 100644
index 6af2b851d..000000000
--- a/newlib/libc/sys/linux/mmap.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* libc/sys/linux/mmap.c - Memory mapping functions */
-
-/* Copyright 2002, Red Hat Inc. */
-
-#include <sys/mman.h>
-#include <machine/syscall.h>
-
-_syscall6(void *,mmap,void *,addr,size_t,len,int,prot,int,flags,int,fd,off_t,off);
-_syscall2(int,munmap,void *,addr,size_t,len);
-_syscall1(int,mlockall,int,flags);
-_syscall0(int,munlockall);
-_syscall2(int,mlock,const void *,addr,size_t,len);
-_syscall2(int,munlock,const void *,addr,size_t,len);
-_syscall3(int,mprotect,void *,addr,size_t,len,int,prot);
-_syscall3(int,msync,void *,addr,size_t,len,int,flags);
-_syscall4(void *,mremap,void *,addr,size_t,oldlen,size_t,newlen,int,maymove);
-
-weak_alias(__libc_mmap,__mmap)
-weak_alias(__libc_munmap,__munmap)
-weak_alias(__libc_mremap,__mremap)
diff --git a/newlib/libc/sys/linux/mntent.c b/newlib/libc/sys/linux/mntent.c
deleted file mode 100644
index 0101b94e4..000000000
--- a/newlib/libc/sys/linux/mntent.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* Utilities for reading/writing fstab, mtab, etc.
- Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <features.h>
-#include <mntent.h>
-#include <stdlib.h>
-#include <libc-symbols.h>
-#define _LIBC 1
-#define NOT_IN_libc 1
-#include <bits/libc-lock.h>
-
-/* We don't want to allocate the static buffer all the time since it
- is not always used (in fact, rather infrequently). Accept the
- extra cost of a `malloc'. */
-static char *getmntent_buffer;
-
-/* This is the size of the buffer. This is really big. */
-#define BUFFER_SIZE 4096
-
-
-static void
-allocate (void)
-{
- getmntent_buffer = (char *) malloc (BUFFER_SIZE);
-}
-
-
-struct mntent *
-getmntent (FILE *stream)
-{
- static struct mntent m;
- static int once;
-
- do {
- if (__pthread_once != NULL)
- __pthread_once (&once, allocate);
- else if (once == 0) {
- allocate ();
- once = !(0);
- }
- } while (0);
-
-
- if (getmntent_buffer == NULL)
- /* If no core is available we don't have a chance to run the
- program successfully and so returning NULL is an acceptable
- result. */
- return NULL;
-
- return __getmntent_r (stream, &m, getmntent_buffer, BUFFER_SIZE);
-}
-
-
-/* Make sure the memory is freed if the programs ends while in
- memory-debugging mode and something actually was allocated. */
-static void
-__attribute__ ((unused))
-free_mem (void)
-{
- free (getmntent_buffer);
-}
-
-text_set_element (__libc_subfreeres, free_mem);
diff --git a/newlib/libc/sys/linux/mntent_r.c b/newlib/libc/sys/linux/mntent_r.c
deleted file mode 100644
index b534fb69d..000000000
--- a/newlib/libc/sys/linux/mntent_r.c
+++ /dev/null
@@ -1,256 +0,0 @@
-/* Utilities for reading/writing fstab, mtab, etc.
- Copyright (C) 1995-2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <alloca.h>
-#include <mntent.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <machine/weakalias.h>
-
-/* Prepare to begin reading and/or writing mount table entries from the
- beginning of FILE. MODE is as for `fopen'. */
-FILE *
-__setmntent (const char *file, const char *mode)
-{
- FILE *result = fopen (file, mode);
-
- return result;
-}
-weak_alias (__setmntent, setmntent)
-
-
-/* Close a stream opened with `setmntent'. */
-int
-__endmntent (FILE *stream)
-{
- if (stream) /* SunOS 4.x allows for NULL stream */
- fclose (stream);
- return 1; /* SunOS 4.x says to always return 1 */
-}
-weak_alias (__endmntent, endmntent)
-
-
-/* Since the values in a line are separated by spaces, a name cannot
- contain a space. Therefore some programs encode spaces in names
- by the strings "\040". We undo the encoding when reading an entry.
- The decoding happens in place. */
-static char *
-decode_name (char *buf)
-{
- char *rp = buf;
- char *wp = buf;
-
- do
- if (rp[0] == '\\' && rp[1] == '0' && rp[2] == '4' && rp[3] == '0')
- {
- /* \040 is a SPACE. */
- *wp++ = ' ';
- rp += 3;
- }
- else if (rp[0] == '\\' && rp[1] == '0' && rp[2] == '1' && rp[3] == '2')
- {
- /* \012 is a TAB. */
- *wp++ = '\t';
- rp += 3;
- }
- else if (rp[0] == '\\' && rp[1] == '\\')
- {
- /* We have to escape \\ to be able to represent all characters. */
- *wp++ = '\\';
- rp += 1;
- }
- else
- *wp++ = *rp;
- while (*rp++ != '\0');
-
- return buf;
-}
-
-
-/* Read one mount table entry from STREAM. Returns a pointer to storage
- reused on the next call, or null for EOF or error (use feof/ferror to
- check). */
-struct mntent *
-__getmntent_r (FILE *stream, struct mntent *mp, char *buffer, int bufsiz)
-{
- char *cp;
- char *head;
-
- flockfile (stream);
- do
- {
- char *end_ptr;
-
- if (fgets (buffer, bufsiz, stream) == NULL)
- {
- funlockfile (stream);
- return NULL;
- }
-
- end_ptr = strchr (buffer, '\n');
- if (end_ptr != NULL) /* chop newline */
- *end_ptr = '\0';
- else
- {
- /* Not the whole line was read. Do it now but forget it. */
- char tmp[1024];
- while (fgets (tmp, sizeof tmp, stream) != NULL)
- if (strchr (tmp, '\n') != NULL)
- break;
- }
-
- head = buffer + strspn (buffer, " \t");
- /* skip empty lines and comment lines: */
- }
- while (head[0] == '\0' || head[0] == '#');
-
- cp = strsep (&head, " \t");
- mp->mnt_fsname = cp != NULL ? decode_name (cp) : (char *) "";
- if (head)
- head += strspn (head, " \t");
- cp = strsep (&head, " \t");
- mp->mnt_dir = cp != NULL ? decode_name (cp) : (char *) "";
- if (head)
- head += strspn (head, " \t");
- cp = strsep (&head, " \t");
- mp->mnt_type = cp != NULL ? decode_name (cp) : (char *) "";
- if (head)
- head += strspn (head, " \t");
- cp = strsep (&head, " \t");
- mp->mnt_opts = cp != NULL ? decode_name (cp) : (char *) "";
- switch (head ? sscanf (head, " %d %d ", &mp->mnt_freq, &mp->mnt_passno) : 0)
- {
- case 0:
- mp->mnt_freq = 0;
- case 1:
- mp->mnt_passno = 0;
- case 2:
- break;
- }
- funlockfile (stream);
-
- return mp;
-}
-weak_alias (__getmntent_r, getmntent_r)
-
-
-/* We have to use an encoding for names if they contain spaces or tabs.
- To be able to represent all characters we also have to escape the
- backslash itself. This "function" must be a macro since we use
- `alloca'. */
-#define encode_name(name) \
- do { \
- const char *rp = name; \
- \
- while (*rp != '\0') \
- if (*rp == ' ' || *rp == '\t' || *rp == '\\') \
- break; \
- else \
- ++rp; \
- \
- if (*rp != '\0') \
- { \
- /* In the worst case the length of the string can increase to \
- founr times the current length. */ \
- char *wp; \
- \
- rp = name; \
- name = wp = (char *) alloca (strlen (name) * 4 + 1); \
- \
- do \
- if (*rp == ' ') \
- { \
- *wp++ = '\\'; \
- *wp++ = '0'; \
- *wp++ = '4'; \
- *wp++ = '0'; \
- } \
- else if (*rp == '\t') \
- { \
- *wp++ = '\\'; \
- *wp++ = '0'; \
- *wp++ = '1'; \
- *wp++ = '2'; \
- } \
- else if (*rp == '\\') \
- { \
- *wp++ = '\\'; \
- *wp++ = '\\'; \
- } \
- else \
- *wp++ = *rp; \
- while (*rp++ != '\0'); \
- } \
- } while (0)
-
-
-/* Write the mount table entry described by MNT to STREAM.
- Return zero on success, nonzero on failure. */
-int
-__addmntent (FILE *stream, const struct mntent *mnt)
-{
- struct mntent mntcopy = *mnt;
- if (fseek (stream, 0, SEEK_END))
- return 1;
-
- /* Encode spaces and tabs in the names. */
- encode_name (mntcopy.mnt_fsname);
- encode_name (mntcopy.mnt_dir);
- encode_name (mntcopy.mnt_type);
- encode_name (mntcopy.mnt_opts);
-
- return (fprintf (stream, "%s %s %s %s %d %d\n",
- mntcopy.mnt_fsname,
- mntcopy.mnt_dir,
- mntcopy.mnt_type,
- mntcopy.mnt_opts,
- mntcopy.mnt_freq,
- mntcopy.mnt_passno)
- < 0 ? 1 : 0);
-}
-weak_alias (__addmntent, addmntent)
-
-
-/* Search MNT->mnt_opts for an option matching OPT.
- Returns the address of the substring, or null if none found. */
-char *
-__hasmntopt (const struct mntent *mnt, const char *opt)
-{
- const size_t optlen = strlen (opt);
- char *rest = mnt->mnt_opts, *p;
-
- while ((p = strstr (rest, opt)) != NULL)
- {
- if (p == rest
- || (p[-1] == ','
- && (p[optlen] == '\0' ||
- p[optlen] == '=' ||
- p[optlen] == ',')))
- return p;
-
- rest = strchr (rest, ',');
- if (rest == NULL)
- break;
- ++rest;
- }
-
- return NULL;
-}
-weak_alias (__hasmntopt, hasmntopt)
diff --git a/newlib/libc/sys/linux/mq_close.c b/newlib/libc/sys/linux/mq_close.c
deleted file mode 100644
index 884c30f64..000000000
--- a/newlib/libc/sys/linux/mq_close.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright 2002, Red Hat Inc. */
-
-#include <mqueue.h>
-#include <errno.h>
-#include <sys/sem.h>
-#define _LIBC 1
-#include <sys/lock.h>
-#undef _LIBC
-
-#include "mqlocal.h"
-
-int
-mq_close (mqd_t msgid)
-{
- struct libc_mq *info;
- struct sembuf sb0 = {0, -1, 0};
- int rc;
- int semid;
-
- info = __find_mq (msgid);
-
- if (info == NULL)
- {
- errno = EBADF;
- return -1;
- }
-
- /* lock message queue */
- semid = info->semid;
- rc = semop (semid, &sb0, 1);
-
- if (rc == 0)
- {
- __cleanup_mq (msgid);
-
- /* unlock message queue */
- sb0.sem_op = 1;
- semop (semid, &sb0, 1);
- }
-
- return rc;
-}
-
-
-
-
-
-
diff --git a/newlib/libc/sys/linux/mq_getattr.c b/newlib/libc/sys/linux/mq_getattr.c
deleted file mode 100644
index 65813f3b3..000000000
--- a/newlib/libc/sys/linux/mq_getattr.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright 2002, Red Hat Inc. */
-
-#include <mqueue.h>
-#include <errno.h>
-#include <sys/sem.h>
-#include <string.h>
-#define _LIBC 1
-#include <sys/lock.h>
-#undef _LIBC
-
-#include "mqlocal.h"
-
-int
-mq_getattr (mqd_t msgid, struct mq_attr *mqstat)
-{
- struct libc_mq *info;
- struct sembuf sb0 = {0, -1, 0};
- int num_msgs;
- int rc = 0;
-
- info = __find_mq (msgid);
-
- if (info == NULL)
- {
- errno = EBADF;
- return -1;
- }
-
- /* temporarily lock message queue */
- semop (info->semid, &sb0, 1);
-
- num_msgs = semctl (info->semid, 3, GETVAL);
- if (num_msgs >= 0)
- {
- memcpy (mqstat, info->attr, sizeof(struct mq_attr));
- mqstat->mq_curmsgs = num_msgs;
- }
- else
- rc = -1;
-
- /* release message queue */
- sb0.sem_op = 1;
- semop (info->semid, &sb0, 1);
-
- return rc;
-}
-
-
-
-
-
-
diff --git a/newlib/libc/sys/linux/mq_notify.c b/newlib/libc/sys/linux/mq_notify.c
deleted file mode 100644
index fd4606bd4..000000000
--- a/newlib/libc/sys/linux/mq_notify.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright 2002, Red Hat Inc. */
-
-#include <mqueue.h>
-#include <errno.h>
-#include <machine/weakalias.h>
-
-#include "mqlocal.h"
-
-int
-__libc_mq_notify (mqd_t msgid, const struct sigevent *notification)
-{
- errno = ENOSYS;
- return -1;
-}
-weak_alias (__libc_mq_notify, mq_notify)
-
-
-
-
-
-
-
diff --git a/newlib/libc/sys/linux/mq_open.c b/newlib/libc/sys/linux/mq_open.c
deleted file mode 100644
index 9b72e9073..000000000
--- a/newlib/libc/sys/linux/mq_open.c
+++ /dev/null
@@ -1,346 +0,0 @@
-/* Copyright 2002, Red Hat Inc. */
-
-#include <mqueue.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
-#include <stdarg.h>
-#include <machine/weakalias.h>
-#define _LIBC 1
-#include <sys/lock.h>
-#undef _LIBC
-
-#include "mqlocal.h"
-
-#define NHASH 32 /* Num of hash lists, must be a power of 2 */
-#define LOCHASH(i) ((i)&(NHASH-1))
-
-static long mq_index; /* Index of next entry */
-static struct libc_mq *mq_hash[NHASH]; /* Hash list heads for mqopen_infos */
-
-__LOCK_INIT(static, mq_hash_lock);
-
-mqd_t
-mq_open (const char *name, int oflag, ...)
-{
- MSG *wrbuf = NULL;
- MSG *rdbuf = NULL;
- int msgqid = -1;
- int rc = -1;
- int fd = -1;
- int semid = -1;
- int created = 0;
- key_t key = (key_t)-1;
- struct mq_attr *attr = (struct mq_attr *)MAP_FAILED;
- struct sembuf sb = {0, 0, 0};
- mode_t mode = 0;
- int size;
- int i, index, saved_errno;
- char *real_name;
- char *ptr;
- struct mq_attr *user_attr = NULL;
- struct libc_mq *info;
- union semun arg;
-
- /* ignore opening slash if present */
- if (*name == '/')
- ++name;
- size = strlen(name);
-
- if ((real_name = (char *)malloc (size + sizeof(MSGQ_PREFIX))) == NULL ||
- (info = (struct libc_mq *)malloc (sizeof(struct libc_mq))) == NULL)
- {
- errno = ENOSPC;
- if (real_name)
- free (real_name);
- return (mqd_t)-1;
- }
-
- /* use given name to create shared memory file name - we convert any
- slashes to underscores so we don't have to create directories */
- memcpy (real_name, MSGQ_PREFIX, sizeof(MSGQ_PREFIX) - 1);
- memcpy (real_name + sizeof(MSGQ_PREFIX) - 1, name, size + 1);
- ptr = real_name + sizeof(MSGQ_PREFIX) - 1;
- for (i = 0; i < size; ++i)
- {
- if (*ptr == '/')
- *ptr = '_';
- ++ptr;
- }
-
- /* open shared memory file based on msg queue open flags and then use memory
- file to create a unique key to use for semaphores, etc.. */
- if (oflag & O_CREAT)
- {
- va_list list;
- va_start (list, oflag);
-
- saved_errno = errno;
- mode = (mode_t)va_arg (list, int);
- user_attr = va_arg(list,struct mq_attr *);
- va_end (list);
-
- /* attempt to open the shared memory file for exclusive create so we know
- whether we are the owners or not */
- fd = open (real_name, O_RDWR | O_CREAT | O_EXCL, mode);
- if (fd < 0 && (oflag & O_EXCL))
- {
- /* we failed and the user wanted exclusive create */
- free (real_name);
- free (info);
- return (mqd_t)-1;
- }
- errno = saved_errno;
- /* check if we created the file or not */
- if (fd >= 0)
- created = 1;
- }
-
- if (fd < 0)
- fd = open (real_name, O_RDWR, 0);
-
- if (fd >= 0)
- key = ftok(real_name, 255);
-
- if (key != (key_t)-1)
- /* memory map the shared memory file so we have a global shared data area to use */
- attr = (struct mq_attr *)mmap (0, sizeof(struct mq_attr), PROT_READ | PROT_WRITE,
- MAP_SHARED, fd, 0);
-
- if (attr != (struct mq_attr *)MAP_FAILED)
- {
- /* we need semaphores to prevent multi-process race conditions on the
- shared storage which contains a shared structure. The following
- are the ones we need.
-
- 0 = open semaphore
- 1 = number of opens
- 2 = number of writes left until queue is full
- 3 = number of reads available in queue
- 4 = notify semaphore
- 5 = number of readers */
- arg.val = 0;
- /* make sure the creator of the shared memory file also is the creator of the
- semaphores...this will ensure that it also creates the message queue */
- if (created)
- {
- saved_errno = errno;
- semid = semget (key, 6, IPC_CREAT | IPC_EXCL | mode);
- errno = saved_errno;
- /* now that we have created the semaphore, we should initialize it */
- if (semid != -1)
- semctl (semid, 0, SETVAL, arg);
- }
- else
- {
- /* if we didn't create the shared memory file but have gotten to here, we want
- to ensure we haven't gotten ahead of the creator temporarily so we will
- loop until the semaphore exists. This ensures that the creator will be the
- one to create the message queue with the correct mode and we will be blocked
- by the open semaphore 0. We impose a time limit to ensure something terrible
- hasn't gone wrong. */
- struct timespec tms;
- int i;
-
- tms.tv_sec = 0;
- tms.tv_nsec = 10000; /* 10 microseconds */
- for (i = 0; i < 100; ++i)
- {
- if ((semid = semget (key, 6, 0)) != -1)
- break;
- /* sleep in case we our a higher priority process */
- nanosleep (&tms, NULL);
- }
- }
- }
-
- if (semid != -1)
- {
- /* acquire main open semaphore if we didn't create it */
- if (!created)
- {
- sb.sem_op = -1;
- rc = semop (semid, &sb, 1);
- }
- else
- rc = 0; /* need this to continue below */
- }
-
- if (rc == 0)
- {
- if (created)
- {
- /* the creator must get here first so the message queue will be created */
- msgqid = msgget (key, IPC_CREAT | mode);
- if (msgqid >= 0)
- {
- /* we have created the message queue so check and set the attributes */
- if ((wrbuf = (MSG *)malloc (user_attr->mq_msgsize + sizeof(int))) == NULL ||
- (rdbuf = (MSG *)malloc (user_attr->mq_msgsize + sizeof(int))) == NULL ||
- user_attr == NULL || user_attr->mq_msgsize <= 0 || user_attr->mq_maxmsg <= 0)
- {
- /* we're out of space and we created the message queue so we should
- try to remove it */
- msgctl (msgqid, IPC_RMID, NULL);
- msgqid = -1; /* allow clean up to occur below */
- if (wrbuf && rdbuf)
- errno = EINVAL;
- else
- errno = ENOSPC;
- }
- else /* valid attributes */
- {
- write (fd, user_attr, sizeof(struct mq_attr));
- attr->mq_curmsgs = 0;
- attr->mq_flags = oflag & O_NONBLOCK;
- arg.val = 0;
- semctl (semid, 1, SETVAL, arg); /* number of opens starts at 0 */
- semctl (semid, 3, SETVAL, arg); /* number of reads available starts at 0 */
- semctl (semid, 5, SETVAL, arg); /* number of readers starts at 0 */
- arg.val = 1;
- semctl (semid, 4, SETVAL, arg); /* notify semaphore */
- arg.val = user_attr->mq_maxmsg;
- semctl (semid, 2, SETVAL, arg); /* number of writes left starts at mq_maxmsg */
- }
- }
- }
- else /* just open it */
- {
- msgqid = msgget (key, 0);
- wrbuf = (MSG *)malloc (attr->mq_msgsize + sizeof(int));
- rdbuf = (MSG *)malloc (attr->mq_msgsize + sizeof(int));
- }
-
- /* release semaphore acquired earlier */
- sb.sem_op = 1;
- semop (semid, &sb, 1);
- }
-
- /* if we get here and we haven't got a message queue id, then we need to clean up
- our mess and return failure */
- if (msgqid < 0)
- {
- if (fd >= 0)
- close (fd);
- if (attr != (struct mq_attr *)MAP_FAILED)
- munmap (attr, sizeof(struct mq_attr));
- if (created)
- {
- unlink (real_name);
- if (semid != -1)
- semctl (semid, 0, IPC_RMID);
- }
- free (real_name);
- free (info);
- if (wrbuf)
- free (wrbuf);
- if (rdbuf)
- free (rdbuf);
- return (mqd_t)-1;
- }
-
- /* we are successful so register the message queue */
-
- /* up the count of msg queue opens */
- sb.sem_op = 1;
- sb.sem_num = 1;
- semop (semid, &sb, 1);
-
- /* success, translate into index into mq_info array */
- __lock_acquire(mq_hash_lock);
- index = mq_index++;
- info->index = index;
- info->msgqid = msgqid;
- info->name = real_name;
- info->semid = semid;
- info->fd = fd;
- info->oflag = oflag;
- info->wrbuf = wrbuf;
- info->rdbuf = rdbuf;
- info->cleanup_notify = NULL;
- info->next = mq_hash[LOCHASH(index)];
- info->attr = attr;
- mq_hash[LOCHASH(index)] = info;
- __lock_release(mq_hash_lock);
-
- return (mqd_t)index;
-}
-
-struct libc_mq *
-__find_mq (mqd_t mq)
-{
- struct libc_mq *ptr;
-
- __lock_acquire(mq_hash_lock);
-
- ptr = mq_hash[LOCHASH((int)mq)];
-
- while (ptr)
- {
- if (ptr->index == (int)mq)
- break;
- ptr = ptr->next;
- }
-
- __lock_release(mq_hash_lock);
-
- return ptr;
-}
-
-void
-__cleanup_mq (mqd_t mq)
-{
- struct libc_mq *ptr;
- struct libc_mq *prev;
- int semid;
- struct sembuf sb = {0, 0, 0};
-
- __lock_acquire(mq_hash_lock);
-
- ptr = mq_hash[LOCHASH((int)mq)];
- prev = NULL;
-
- while (ptr)
- {
- if (ptr->index == (int)mq)
- break;
- prev = ptr;
- ptr = ptr->next;
- }
-
- if (ptr != NULL)
- {
- if (ptr->cleanup_notify != NULL)
- ptr->cleanup_notify (ptr);
- if (prev != NULL)
- prev->next = ptr->next;
- else
- mq_hash[LOCHASH((int)mq)] = NULL;
- munmap (ptr->attr, sizeof(struct mq_attr));
- close (ptr->fd);
- free (ptr->name);
- free (ptr->wrbuf);
- free (ptr->rdbuf);
- semid = ptr->semid;
- free (ptr);
- /* lower the count of msg queue opens */
- sb.sem_op = -1;
- sb.sem_num = 1;
- sb.sem_flg = IPC_NOWAIT;
- semop (semid, &sb, 1);
- }
-
- __lock_release(mq_hash_lock);
-}
-
-
-
-
-
diff --git a/newlib/libc/sys/linux/mq_receive.c b/newlib/libc/sys/linux/mq_receive.c
deleted file mode 100644
index 4dae0810b..000000000
--- a/newlib/libc/sys/linux/mq_receive.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright 2002, Red Hat Inc. */
-
-#include <mqueue.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-#include <string.h>
-#define _LIBC 1
-#include <sys/lock.h>
-#undef _LIBC
-
-#include "mqlocal.h"
-
-__LOCK_INIT(static, mq_rdbuf_lock);
-
-ssize_t
-mq_receive (mqd_t msgid, char *msg, size_t msg_len, unsigned int *msg_prio)
-{
- struct libc_mq *info;
- struct sembuf sb2 = {2, 1, 0};
- struct sembuf sb3 = {3, -1, IPC_NOWAIT};
- struct sembuf sb5 = {5, 1, IPC_NOWAIT};
- ssize_t num_bytes;
- int ipcflag;
-
- info = __find_mq (msgid);
-
- if (info == NULL || (info->oflag & O_ACCMODE) == O_WRONLY)
- {
- errno = EBADF;
- return -1;
- }
-
- if (msg_len < info->attr->mq_msgsize)
- {
- errno = EMSGSIZE;
- return -1;
- }
-
- __lock_acquire (mq_rdbuf_lock);
-
- ipcflag = (info->attr->mq_flags & O_NONBLOCK) ? IPC_NOWAIT : 0;
-
- semop (info->semid, &sb5, 1); /* increase number of readers */
- num_bytes = msgrcv (info->msgqid, info->rdbuf, msg_len, -MQ_PRIO_MAX, ipcflag);
- sb5.sem_op = -1;
- semop (info->semid, &sb5, 1); /* decrease number of readers */
-
- if (num_bytes != (ssize_t)-1)
- {
- semop (info->semid, &sb2, 1); /* add one to messages left to write */
- semop (info->semid, &sb3, 1); /* subtract one from messages to read */
- memcpy (msg, info->rdbuf->text, num_bytes);
- if (msg_prio != NULL)
- *msg_prio = MQ_PRIO_MAX - info->rdbuf->type;
- }
-
- __lock_release (mq_rdbuf_lock);
- return num_bytes;
-}
-
-
-
-
-
-
diff --git a/newlib/libc/sys/linux/mq_send.c b/newlib/libc/sys/linux/mq_send.c
deleted file mode 100644
index d3291fd2e..000000000
--- a/newlib/libc/sys/linux/mq_send.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Copyright 2002, Red Hat Inc. */
-
-#include <mqueue.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-#include <string.h>
-#include <stdlib.h>
-#define _LIBC 1
-#include <sys/lock.h>
-#undef _LIBC
-
-#include "mqlocal.h"
-
-__LOCK_INIT(static, mq_wrbuf_lock);
-
-int
-mq_send (mqd_t msgid, const char *msg, size_t msg_len, unsigned int msg_prio)
-{
- struct libc_mq *info;
- struct sembuf sb2 = {2, -1, 0};
- struct sembuf sb3 = {3, 1, 0};
- int rc;
- int ipcflag;
-
- info = __find_mq (msgid);
-
- if (info == NULL || (info->oflag & O_ACCMODE) == O_RDONLY)
- {
- errno = EBADF;
- return -1;
- }
-
- if (msg_len > info->attr->mq_msgsize)
- {
- errno = EMSGSIZE;
- return -1;
- }
-
- if (msg_prio > MQ_PRIO_MAX)
- {
- errno = EINVAL;
- return -1;
- }
-
- __lock_acquire (mq_wrbuf_lock);
-
- memcpy (info->wrbuf->text, msg, msg_len);
- info->wrbuf->type = (MQ_PRIO_MAX - msg_prio);
-
- ipcflag = (info->attr->mq_flags & O_NONBLOCK) ? IPC_NOWAIT : 0;
- sb2.sem_flg = ipcflag;
-
- /* check to see if max msgs are on queue */
- rc = semop (info->semid, &sb2, 1);
-
- if (rc == 0)
- rc = msgsnd (info->msgqid, info->wrbuf, msg_len, ipcflag);
-
- if (rc == 0)
- semop (info->semid, &sb3, 1); /* increment number of reads */
-
- __lock_release (mq_wrbuf_lock);
- return rc;
-}
-
-
-
-
-
-
diff --git a/newlib/libc/sys/linux/mq_setattr.c b/newlib/libc/sys/linux/mq_setattr.c
deleted file mode 100644
index 69f6cd598..000000000
--- a/newlib/libc/sys/linux/mq_setattr.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright 2002, Red Hat Inc. */
-
-#include <mqueue.h>
-#include <errno.h>
-#include <sys/sem.h>
-#include <string.h>
-#define _LIBC 1
-#include <sys/lock.h>
-#undef _LIBC
-
-#include "mqlocal.h"
-
-int
-mq_setattr (mqd_t msgid, const struct mq_attr *mqstat, struct mq_attr *omqstat)
-{
- struct libc_mq *info;
- struct sembuf sb0 = {0, -1, 0};
- int num_msgs;
- int rc = 0;
-
- info = __find_mq (msgid);
-
- if (info == NULL)
- {
- errno = EBADF;
- return -1;
- }
-
- /* temporarily lock message queue */
- semop (info->semid, &sb0, 1);
-
- /* make copy of old structure */
- if (omqstat != NULL)
- {
- num_msgs = semctl (info->semid, 3, GETVAL);
- if (num_msgs >= 0)
- {
- memcpy (omqstat, info->attr, sizeof(struct mq_attr));
- omqstat->mq_curmsgs = num_msgs;
- }
- else
- rc = -1;
- }
-
- /* only the mq_flags field can be changed */
- info->attr->mq_flags = mqstat->mq_flags;
-
- /* release message queue */
- sb0.sem_op = 1;
- semop (info->semid, &sb0, 1);
-
- return rc;
-}
-
-
-
-
-
-
diff --git a/newlib/libc/sys/linux/mq_unlink.c b/newlib/libc/sys/linux/mq_unlink.c
deleted file mode 100644
index ce7bd0e01..000000000
--- a/newlib/libc/sys/linux/mq_unlink.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Copyright 2002, Red Hat Inc. */
-
-#include <mqueue.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-#include <string.h>
-#include <stdlib.h>
-#include <machine/weakalias.h>
-#define _LIBC 1
-#include <sys/lock.h>
-#undef _LIBC
-
-#include "mqlocal.h"
-
-int
-mq_unlink (const char *name)
-{
- int size;
- int saved_errno;
- char *real_name;
- char *ptr;
- int i, rc;
- int semid, msgqid;
- key_t key;
-
- /* ignore opening slash if present */
- if (*name == '/')
- ++name;
- size = strlen(name);
-
- if ((real_name = (char *)malloc (size + sizeof(MSGQ_PREFIX))) == NULL)
- {
- errno = ENOSPC;
- return -1;
- }
-
- /* use given name to create shared memory file name - we convert any
- slashes to underscores so we don't have to create directories */
- memcpy (real_name, MSGQ_PREFIX, sizeof(MSGQ_PREFIX) - 1);
- memcpy (real_name + sizeof(MSGQ_PREFIX) - 1, name, size + 1);
- ptr = real_name + sizeof(MSGQ_PREFIX) - 1;
- for (i = 0; i < size; ++i)
- {
- if (*ptr == '/')
- *ptr = '_';
- ++ptr;
- }
-
- /* get key and then unlink shared memory file */
- if ((key = ftok(real_name, 255)) == (key_t)-1)
- return -1;
-
- rc = unlink (real_name);
-
- if (rc == 0)
- {
- /* try to remove semaphore and msg queues associated with shared memory file */
- saved_errno = errno;
- semid = semget (key, 6, 0);
- if (semid != -1)
- semctl (semid, 0, IPC_RMID);
- msgqid = msgget (key, 0);
- if (msgqid != -1)
- msgctl (msgqid, IPC_RMID, NULL);
- errno = saved_errno;
- }
-
- return rc;
-}
diff --git a/newlib/libc/sys/linux/mqlocal.h b/newlib/libc/sys/linux/mqlocal.h
deleted file mode 100644
index 56fd66c2d..000000000
--- a/newlib/libc/sys/linux/mqlocal.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* local definitions needed by mq routines */
-
-#include <sys/msg.h>
-#include <signal.h>
-
-/* a message */
-typedef struct
-{
- unsigned int type;
- char text[1];
-} MSG;
-
-union semun {
- int val;
- struct semid_ds *buf;
- unsigned short *array;
-} arg;
-
-/*
- * One of these structures is malloced to describe any open message queue
- * each time mq_open is called.
- */
-
-struct libc_mq;
-
-struct libc_mq {
- int index; /* index of this message queue */
- int msgqid; /* value returned by msgget */
- int semid; /* semaphore id */
- int fd; /* fd of shared memory file */
- int oflag; /* original open flag used */
- int th; /* thread id for mq_notify */
- char *name; /* name used */
- MSG *wrbuf; /* msg write buffer */
- MSG *rdbuf; /* msg read buffer */
- struct mq_attr *attr; /* pointer to attribute structure */
- struct sigevent *sigevent; /* used for mq_notify */
- void (*cleanup_notify)(struct libc_mq *); /* also used for mq_notify */
- struct libc_mq *next; /* next info struct in hash table */
-};
-
-extern struct libc_mq *__find_mq (mqd_t mq);
-extern void __cleanup_mq (mqd_t mq);
-extern void __cleanup_mq_notify (struct libc_mq *ptr);
-
-#define MSGQ_PREFIX "/dev/shm/__MSGQ__"
-
diff --git a/newlib/libc/sys/linux/msize.c b/newlib/libc/sys/linux/msize.c
deleted file mode 100644
index 818e05a75..000000000
--- a/newlib/libc/sys/linux/msize.c
+++ /dev/null
@@ -1 +0,0 @@
-/* dummy file to override one object in stdlib directory */
diff --git a/newlib/libc/sys/linux/msizer.c b/newlib/libc/sys/linux/msizer.c
deleted file mode 100644
index 7b7905389..000000000
--- a/newlib/libc/sys/linux/msizer.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdlib.h>
-
-size_t
-_malloc_usable_size_r (struct _reent *ptr, void *mem)
-{
- return malloc_usable_size (mem);
-}
diff --git a/newlib/libc/sys/linux/mstats.c b/newlib/libc/sys/linux/mstats.c
deleted file mode 100644
index 818e05a75..000000000
--- a/newlib/libc/sys/linux/mstats.c
+++ /dev/null
@@ -1 +0,0 @@
-/* dummy file to override one object in stdlib directory */
diff --git a/newlib/libc/sys/linux/mtrim.c b/newlib/libc/sys/linux/mtrim.c
deleted file mode 100644
index 818e05a75..000000000
--- a/newlib/libc/sys/linux/mtrim.c
+++ /dev/null
@@ -1 +0,0 @@
-/* dummy file to override one object in stdlib directory */
diff --git a/newlib/libc/sys/linux/mtrimr.c b/newlib/libc/sys/linux/mtrimr.c
deleted file mode 100644
index 3b2fbf367..000000000
--- a/newlib/libc/sys/linux/mtrimr.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdlib.h>
-
-void *
-_malloc_trim_r (struct _reent *ptr, size_t pad)
-{
- return 0;
-}
diff --git a/newlib/libc/sys/linux/net/Makefile.am b/newlib/libc/sys/linux/net/Makefile.am
deleted file mode 100644
index 5e31f0f59..000000000
--- a/newlib/libc/sys/linux/net/Makefile.am
+++ /dev/null
@@ -1,87 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/../include $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = addr2ascii.c ascii2addr.c base64.c bindresvport.c ether_addr.c getaddrinfo.c \
- gethostbydns.c gethostbyht.c gethostbynis.c gethostnamadr.c \
- getifaddrs.c getnameinfo.c \
- getnetbydns.c getnetbyht.c getnetbynis.c getnetnamadr.c \
- getproto.c getprotoent.c getprotoname.c getservbyname.c \
- getservbyport.c getservent.c herror.c hesiod.c inet_addr.c \
- ifname.c inet_lnaof.c \
- inet_makeaddr.c inet_net_ntop.c inet_net_pton.c inet_neta.c \
- inet_netof.c inet_network.c inet_ntoa.c inet_ntop.c \
- inet_pton.c innetgr-stub.c ip6opt.c issetugid-stub.c \
- linkaddr.c map_v4v6.c namespace.h un-namespace.h \
- name6.c ns_addr.c \
- ns_name.c ns_netint.c \
- ns_ntoa.c ns_parse.c ns_print.c ns_ttl.c \
- nsdispatch.c nslexer.c nsparser.c nsparser.h \
- nsap_addr.c res_comp.c res_data.c res_debug.c \
- res_init.c res_mkquery.c res_mkupdate.c res_query.c \
- res_send.c res_update.c rthdr.c vars.c
-
-ELIX_4_OBJS = \
- rcmd.$(oext) \
- rcmdsh.$(oext)
-
-if ELIX_LEVEL_1
-LIB_OBJS =
-else
-if ELIX_LEVEL_2
-LIB_OBJS =
-else
-if ELIX_LEVEL_3
-LIB_OBJS =
-else
-LIB_OBJS = $(ELIX_4_OBJS)
-endif
-endif
-endif
-
-libnet_la_LDFLAGS = -Xcompiler -nostdlib
-libnet_la_CFLAGS = -DINET6
-
-if USE_LIBTOOL
-noinst_LTLIBRARIES = libnet.la
-libnet_la_SOURCES = $(LIB_SOURCES)
-libnet_la_LIBADD = $(LIB_OBJS)
-libnet_la_DEPENDENCIES = $(LIB_OBJS)
-noinst_DATA = objectlist.awk.in
-else
-noinst_LIBRARIES = lib.a
-lib_a_SOURCES = $(LIB_SOURCES)
-lib_a_LIBADD = $(LIB_OBJS)
-lib_a_DEPENDENCIES = $(LIB_OBJS)
-noinst_DATA =
-endif # USE_LIBTOOL
-
-include $(srcdir)/../../../../Makefile.shared
-
-install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/arpa; \
- for i in $(srcdir)/../include/arpa/*.h; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/arpa/`basename $$i`; \
- done; \
- $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/net; \
- for i in $(srcdir)/../include/net/*.h; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/net/`basename $$i`; \
- done; \
- $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet; \
- for i in $(srcdir)/../include/netinet/*.h; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet/`basename $$i`; \
- done; \
- $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet6; \
- for i in $(srcdir)/../include/netinet6/*.h; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet6/`basename $$i`; \
- done; \
- $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netns; \
- for i in $(srcdir)/../include/netns/*.h; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netns/`basename $$i`; \
- done; \
- $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/rpc; \
- for i in $(srcdir)/../include/rpc/*.h; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/rpc/`basename $$i`; \
- done; \
diff --git a/newlib/libc/sys/linux/net/Makefile.in b/newlib/libc/sys/linux/net/Makefile.in
deleted file mode 100644
index ee45b4329..000000000
--- a/newlib/libc/sys/linux/net/Makefile.in
+++ /dev/null
@@ -1,447 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-AWK = @AWK@
-CC = @CC@
-CPP = @CPP@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-EXEEXT = @EXEEXT@
-EXTRA_SUBDIRS = @EXTRA_SUBDIRS@
-EXTRA_SUBLIBS = @EXTRA_SUBLIBS@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBTOOL = @LIBTOOL@
-LINUX_MACH_LIB = @LINUX_MACH_LIB@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = -I$(srcdir)/../include $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-LIB_SOURCES = addr2ascii.c ascii2addr.c base64.c bindresvport.c ether_addr.c getaddrinfo.c gethostbydns.c gethostbyht.c gethostbynis.c gethostnamadr.c getifaddrs.c getnameinfo.c getnetbydns.c getnetbyht.c getnetbynis.c getnetnamadr.c getproto.c getprotoent.c getprotoname.c getservbyname.c getservbyport.c getservent.c herror.c hesiod.c inet_addr.c ifname.c inet_lnaof.c inet_makeaddr.c inet_net_ntop.c inet_net_pton.c inet_neta.c inet_netof.c inet_network.c inet_ntoa.c inet_ntop.c inet_pton.c innetgr-stub.c ip6opt.c issetugid-stub.c linkaddr.c map_v4v6.c namespace.h un-namespace.h name6.c ns_addr.c ns_name.c ns_netint.c ns_ntoa.c ns_parse.c ns_print.c ns_ttl.c nsdispatch.c nslexer.c nsparser.c nsparser.h nsap_addr.c res_comp.c res_data.c res_debug.c res_init.c res_mkquery.c res_mkupdate.c res_query.c res_send.c res_update.c rthdr.c vars.c
-
-
-ELIX_4_OBJS = rcmd.$(oext) rcmdsh.$(oext)
-
-@ELIX_LEVEL_1_TRUE@LIB_OBJS =
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@LIB_OBJS =
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_TRUE@LIB_OBJS =
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@LIB_OBJS = $(ELIX_4_OBJS)
-
-libnet_la_LDFLAGS = -Xcompiler -nostdlib
-libnet_la_CFLAGS = -DINET6
-
-@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libnet.la
-@USE_LIBTOOL_TRUE@libnet_la_SOURCES = $(LIB_SOURCES)
-@USE_LIBTOOL_TRUE@libnet_la_LIBADD = $(LIB_OBJS)
-@USE_LIBTOOL_TRUE@libnet_la_DEPENDENCIES = $(LIB_OBJS)
-@USE_LIBTOOL_TRUE@noinst_DATA = objectlist.awk.in
-@USE_LIBTOOL_FALSE@noinst_DATA =
-@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
-@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
-@USE_LIBTOOL_FALSE@lib_a_LIBADD = $(LIB_OBJS)
-@USE_LIBTOOL_FALSE@lib_a_DEPENDENCIES = $(LIB_OBJS)
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-@USE_LIBTOOL_FALSE@lib_a_OBJECTS = addr2ascii.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@ascii2addr.$(OBJEXT) base64.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@bindresvport.$(OBJEXT) ether_addr.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@getaddrinfo.$(OBJEXT) gethostbydns.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@gethostbyht.$(OBJEXT) gethostbynis.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@gethostnamadr.$(OBJEXT) getifaddrs.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@getnameinfo.$(OBJEXT) getnetbydns.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@getnetbyht.$(OBJEXT) getnetbynis.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@getnetnamadr.$(OBJEXT) getproto.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@getprotoent.$(OBJEXT) getprotoname.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@getservbyname.$(OBJEXT) getservbyport.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@getservent.$(OBJEXT) herror.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@hesiod.$(OBJEXT) inet_addr.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@ifname.$(OBJEXT) inet_lnaof.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@inet_makeaddr.$(OBJEXT) inet_net_ntop.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@inet_net_pton.$(OBJEXT) inet_neta.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@inet_netof.$(OBJEXT) inet_network.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@inet_ntoa.$(OBJEXT) inet_ntop.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@inet_pton.$(OBJEXT) innetgr-stub.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@ip6opt.$(OBJEXT) issetugid-stub.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@linkaddr.$(OBJEXT) map_v4v6.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@name6.$(OBJEXT) ns_addr.$(OBJEXT) ns_name.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@ns_netint.$(OBJEXT) ns_ntoa.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@ns_parse.$(OBJEXT) ns_print.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@ns_ttl.$(OBJEXT) nsdispatch.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@nslexer.$(OBJEXT) nsparser.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@nsap_addr.$(OBJEXT) res_comp.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@res_data.$(OBJEXT) res_debug.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@res_init.$(OBJEXT) res_mkquery.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@res_mkupdate.$(OBJEXT) res_query.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@res_send.$(OBJEXT) res_update.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@rthdr.$(OBJEXT) vars.$(OBJEXT)
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-
-@USE_LIBTOOL_TRUE@libnet_la_OBJECTS = addr2ascii.lo ascii2addr.lo \
-@USE_LIBTOOL_TRUE@base64.lo bindresvport.lo ether_addr.lo \
-@USE_LIBTOOL_TRUE@getaddrinfo.lo gethostbydns.lo gethostbyht.lo \
-@USE_LIBTOOL_TRUE@gethostbynis.lo gethostnamadr.lo getifaddrs.lo \
-@USE_LIBTOOL_TRUE@getnameinfo.lo getnetbydns.lo getnetbyht.lo \
-@USE_LIBTOOL_TRUE@getnetbynis.lo getnetnamadr.lo getproto.lo \
-@USE_LIBTOOL_TRUE@getprotoent.lo getprotoname.lo getservbyname.lo \
-@USE_LIBTOOL_TRUE@getservbyport.lo getservent.lo herror.lo hesiod.lo \
-@USE_LIBTOOL_TRUE@inet_addr.lo ifname.lo inet_lnaof.lo inet_makeaddr.lo \
-@USE_LIBTOOL_TRUE@inet_net_ntop.lo inet_net_pton.lo inet_neta.lo \
-@USE_LIBTOOL_TRUE@inet_netof.lo inet_network.lo inet_ntoa.lo \
-@USE_LIBTOOL_TRUE@inet_ntop.lo inet_pton.lo innetgr-stub.lo ip6opt.lo \
-@USE_LIBTOOL_TRUE@issetugid-stub.lo linkaddr.lo map_v4v6.lo name6.lo \
-@USE_LIBTOOL_TRUE@ns_addr.lo ns_name.lo ns_netint.lo ns_ntoa.lo \
-@USE_LIBTOOL_TRUE@ns_parse.lo ns_print.lo ns_ttl.lo nsdispatch.lo \
-@USE_LIBTOOL_TRUE@nslexer.lo nsparser.lo nsap_addr.lo res_comp.lo \
-@USE_LIBTOOL_TRUE@res_data.lo res_debug.lo res_init.lo res_mkquery.lo \
-@USE_LIBTOOL_TRUE@res_mkupdate.lo res_query.lo res_send.lo \
-@USE_LIBTOOL_TRUE@res_update.lo rthdr.lo vars.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DATA = $(noinst_DATA)
-
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES) $(libnet_la_SOURCES)
-OBJECTS = $(lib_a_OBJECTS) $(libnet_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/../../../../Makefile.shared
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus net/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-mostlyclean-noinstLTLIBRARIES:
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-libnet.la: $(libnet_la_OBJECTS) $(libnet_la_DEPENDENCIES)
- $(LINK) $(libnet_la_LDFLAGS) $(libnet_la_OBJECTS) $(libnet_la_LIBADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = net
-
-distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am: install-data-local
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-noinstLTLIBRARIES \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-libtool \
- clean-noinstLTLIBRARIES clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-libtool distclean-noinstLTLIBRARIES \
- distclean-tags distclean-generic clean-am
- -rm -f libtool
-
-distclean: distclean-am
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool mostlyclean-noinstLTLIBRARIES \
-distclean-noinstLTLIBRARIES clean-noinstLTLIBRARIES \
-maintainer-clean-noinstLTLIBRARIES tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-local install-data-am \
-install-data install-am install uninstall-am uninstall all-redirect \
-all-am all installdirs mostlyclean-generic distclean-generic \
-clean-generic maintainer-clean-generic clean mostlyclean distclean \
-maintainer-clean
-
-
-objectlist.awk.in: $(noinst_LTLIBRARIES)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
- do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
- done
-
-install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/arpa; \
- for i in $(srcdir)/../include/arpa/*.h; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/arpa/`basename $$i`; \
- done; \
- $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/net; \
- for i in $(srcdir)/../include/net/*.h; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/net/`basename $$i`; \
- done; \
- $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet; \
- for i in $(srcdir)/../include/netinet/*.h; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet/`basename $$i`; \
- done; \
- $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet6; \
- for i in $(srcdir)/../include/netinet6/*.h; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet6/`basename $$i`; \
- done; \
- $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netns; \
- for i in $(srcdir)/../include/netns/*.h; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netns/`basename $$i`; \
- done; \
- $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/rpc; \
- for i in $(srcdir)/../include/rpc/*.h; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/rpc/`basename $$i`; \
- done; \
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/linux/net/addr2ascii.3 b/newlib/libc/sys/linux/net/addr2ascii.3
deleted file mode 100644
index 10b1ac7f9..000000000
--- a/newlib/libc/sys/linux/net/addr2ascii.3
+++ /dev/null
@@ -1,222 +0,0 @@
-.\"
-.\" Copyright 1996 Massachusetts Institute of Technology
-.\"
-.\" Permission to use, copy, modify, and distribute this software and
-.\" its documentation for any purpose and without fee is hereby
-.\" granted, provided that both the above copyright notice and this
-.\" permission notice appear in all copies, that both the above
-.\" copyright notice and this permission notice appear in all
-.\" supporting documentation, and that the name of M.I.T. not be used
-.\" in advertising or publicity pertaining to distribution of the
-.\" software without specific, written prior permission. M.I.T. makes
-.\" no representations about the suitability of this software for any
-.\" purpose. It is provided "as is" without express or implied
-.\" warranty.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
-.\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
-.\" SHALL M.I.T. 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.
-.\"
-.\" $ANA: addr2ascii.3,v 1.1 1996/06/13 18:41:46 wollman Exp $
-.\" $FreeBSD: src/lib/libc/net/addr2ascii.3,v 1.12 2001/10/01 16:08:55 ru Exp $
-.\"
-.Dd June 13, 1996
-.Dt ADDR2ASCII 3
-.Os
-.Sh NAME
-.Nm addr2ascii ,
-.Nm ascii2addr
-.Nd Generic address formatting routines
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In netinet/in.h
-.In arpa/inet.h
-.Ft "char *"
-.Fn addr2ascii "int af" "const void *addrp" "int len" "char *buf"
-.Ft int
-.Fn ascii2addr "int af" "const char *ascii" "void *result"
-.Sh DESCRIPTION
-The routines
-.Fn addr2ascii
-and
-.Fn ascii2addr
-are used to convert network addresses between binary form and a
-printable form appropriate to the address family. Both functions take
-an
-.Fa af
-argument, specifying the address family to be used in the conversion
-process.
-(Currently, only the
-.Dv AF_INET
-and
-.Dv AF_LINK
-address families are supported.)
-.Pp
-The
-.Fn addr2ascii
-function
-is used to convert binary, network-format addresses into printable
-form. In addition to
-.Fa af ,
-there are three other arguments. The
-.Fa addrp
-argument is a pointer to the network address to be converted.
-The
-.Fa len
-argument is the length of the address. The
-.Fa buf
-argument is an optional pointer to a caller-allocated buffer to hold
-the result; if a null pointer is passed,
-.Fn addr2ascii
-uses a statically-allocated buffer.
-.Pp
-The
-.Fn ascii2addr
-function performs the inverse operation to
-.Fn addr2ascii .
-In addition to
-.Fa af ,
-it takes two parameters,
-.Fa ascii
-and
-.Fa result .
-The
-.Fa ascii
-parameter is a pointer to the string which is to be converted into
-binary. The
-.Fa result
-parameter is a pointer to an appropriate network address structure for
-the specified family.
-.Pp
-The following gives the appropriate structure to use for binary
-addresses in the specified family:
-.Pp
-.Bl -tag -width AF_INETxxxx -compact
-.It Dv AF_INET
-.Li struct in_addr
-(in
-.Aq Pa netinet/in.h )
-.It Dv AF_LINK
-.Li struct sockaddr_dl
-(in
-.Aq Pa net/if_dl.h )
-.\" .It Dv AF_INET6
-.\" .Li struct in6_addr
-.\" (in
-.\" .Aq Pa netinet6/in6.h )
-.El
-.Sh RETURN VALUES
-The
-.Fn addr2ascii
-function returns the address of the buffer it was passed, or a static
-buffer if the a null pointer was passed; on failure, it returns a null
-pointer.
-The
-.Fn ascii2addr
-function returns the length of the binary address in bytes, or -1 on
-failure.
-.Sh EXAMPLES
-The
-.Xr inet 3
-functions
-.Fn inet_ntoa
-and
-.Fn inet_aton
-could be implemented thusly:
-.Bd -literal -offset indent
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-char *
-inet_ntoa(struct in_addr addr)
-{
- return addr2ascii(AF_INET, &addr, sizeof addr, 0);
-}
-
-int
-inet_aton(const char *ascii, struct in_addr *addr)
-{
- return (ascii2addr(AF_INET, ascii, addr)
- == sizeof(*addr));
-}
-.Ed
-.Pp
-In actuality, this cannot be done because
-.Fn addr2ascii
-and
-.Fn ascii2addr
-are implemented in terms of the
-.Xr inet 3
-functions, rather than the other way around.
-.Sh ERRORS
-When a failure is returned,
-.Li errno
-is set to one of the following values:
-.Bl -tag -width Er
-.It Bq Er ENAMETOOLONG
-The
-.Fn addr2ascii
-routine was passed a
-.Fa len
-parameter which was inappropriate for the address family given by
-.Fa af .
-.It Bq Er EPROTONOSUPPORT
-Either routine was passed an
-.Fa af
-parameter other than
-.Dv AF_INET
-or
-.Dv AF_LINK .
-.It Bq Er EINVAL
-The string passed to
-.Fn ascii2addr
-was improperly formatted for address family
-.Fa af .
-.El
-.Sh SEE ALSO
-.Xr inet 3 ,
-.Xr linkaddr 3 ,
-.Xr inet 4
-.Sh HISTORY
-An interface close to this one was originally suggested by Craig
-Partridge. This particular interface originally appeared in the
-.Tn INRIA
-.Tn IPv6
-implementation.
-.Sh AUTHORS
-Code and documentation by
-.An Garrett A. Wollman ,
-MIT Laboratory for Computer Science.
-.Sh BUGS
-The original implementations supported IPv6. This support should
-eventually be resurrected. The
-.Tn NRL
-implementation also included support for the
-.Dv AF_ISO
-and
-.Dv AF_NS
-address families.
-.Pp
-The genericity of this interface is somewhat questionable. A truly
-generic interface would provide a means for determining the length of
-the buffer to be used so that it could be dynamically allocated, and
-would always require a
-.Dq Li "struct sockaddr"
-to hold the binary address. Unfortunately, this is incompatible with existing
-practice. This limitation means that a routine for printing network
-addresses from arbitrary address families must still have internal
-knowledge of the maximum buffer length needed and the appropriate part
-of the address to use as the binary address.
diff --git a/newlib/libc/sys/linux/net/addr2ascii.c b/newlib/libc/sys/linux/net/addr2ascii.c
deleted file mode 100644
index f095339cc..000000000
--- a/newlib/libc/sys/linux/net/addr2ascii.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright 1996 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that both the above copyright notice and this
- * permission notice appear in all copies, that both the above
- * copyright notice and this permission notice appear in all
- * supporting documentation, and that the name of M.I.T. not be used
- * in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. M.I.T. makes
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
- * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
- * SHALL M.I.T. 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.
- *
- * $ANA: addr2ascii.c,v 1.1 1996/06/13 18:41:46 wollman Exp $
- */
-
-#include <sys/cdefs.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <errno.h>
-#include <string.h>
-
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*-
- * Convert a network address from binary to printable numeric format.
- * This API is copied from INRIA's IPv6 implementation, but it is a
- * bit bogus in two ways:
- *
- * 1) There is no value in passing both an address family and
- * an address length; either one should imply the other,
- * or we should be passing sockaddrs instead.
- * 2) There should by contrast be /added/ a length for the buffer
- * that we pass in, so that programmers are spared the need to
- * manually calculate (read: ``guess'') the maximum length.
- *
- * Flash: the API is also the same in the NRL implementation, and seems to
- * be some sort of standard, so we appear to be stuck with both the bad
- * naming and the poor choice of arguments.
- */
-char *
-addr2ascii(af, addrp, len, buf)
- int af;
- const void *addrp;
- int len; /* should be size_t XXX */
- char *buf; /* XXX should pass length of buffer */
-{
- static char staticbuf[64]; /* 64 for AF_LINK > 16 for AF_INET */
-
- if (!buf)
- buf = staticbuf;
-
- switch(af) {
- case AF_INET:
- if (len != sizeof(struct in_addr)) {
- errno = ENAMETOOLONG;
- return 0;
- }
- strcpy(buf, inet_ntoa(*(const struct in_addr *)addrp));
- break;
-
- default:
- errno = EPROTONOSUPPORT;
- return 0;
- }
- return buf;
-}
diff --git a/newlib/libc/sys/linux/net/ascii2addr.c b/newlib/libc/sys/linux/net/ascii2addr.c
deleted file mode 100644
index f69e029f8..000000000
--- a/newlib/libc/sys/linux/net/ascii2addr.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 1996 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that both the above copyright notice and this
- * permission notice appear in all copies, that both the above
- * copyright notice and this permission notice appear in all
- * supporting documentation, and that the name of M.I.T. not be used
- * in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. M.I.T. makes
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
- * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
- * SHALL M.I.T. 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.
- *
- * $ANA: ascii2addr.c,v 1.2 1996/06/13 18:46:02 wollman Exp $
- */
-
-#include <sys/cdefs.h>
-
-#include <sys/types.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <errno.h>
-#include <string.h>
-
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-int
-ascii2addr(af, ascii, result)
- int af;
- const char *ascii;
- void *result;
-{
- struct in_addr *ina;
- char strbuf[4*sizeof("123")]; /* long enough for V4 only */
-
- switch(af) {
- case AF_INET:
- ina = result;
- strbuf[0] = '\0';
- strncat(strbuf, ascii, (sizeof strbuf)-1);
- if (inet_aton(strbuf, ina))
- return sizeof(struct in_addr);
- errno = EINVAL;
- break;
-
- default:
- errno = EPROTONOSUPPORT;
- break;
- }
-
- return -1;
-}
diff --git a/newlib/libc/sys/linux/net/base64.c b/newlib/libc/sys/linux/net/base64.c
deleted file mode 100644
index 35f7d867b..000000000
--- a/newlib/libc/sys/linux/net/base64.c
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright (c) 1996, 1998 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1995 by International Business Machines, Inc.
- *
- * International Business Machines, Inc. (hereinafter called IBM) grants
- * permission under its copyrights to use, copy, modify, and distribute this
- * Software with or without fee, provided that the above copyright notice and
- * all paragraphs of this notice appear in all copies, and that the name of IBM
- * not be used in connection with the marketing of any product incorporating
- * the Software or modifications thereof, without specific, written prior
- * permission.
- *
- * To the extent it has a right to do so, IBM grants an immunity from suit
- * under its patents, if any, for the use, sale or manufacture of products to
- * the extent that such products are used for performing Domain Name System
- * dynamic updates in TCP/IP networks by means of the Software. No immunity is
- * granted for any product per se or for any other function of any product.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
- * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
- * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
- */
-
-#include <sys/cdefs.h>
-
-#include <sys/types.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <ctype.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define Assert(Cond) if (!(Cond)) abort()
-
-static const char Base64[] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-static const char Pad64 = '=';
-
-/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
- The following encoding technique is taken from RFC 1521 by Borenstein
- and Freed. It is reproduced here in a slightly edited form for
- convenience.
-
- A 65-character subset of US-ASCII is used, enabling 6 bits to be
- represented per printable character. (The extra 65th character, "=",
- is used to signify a special processing function.)
-
- The encoding process represents 24-bit groups of input bits as output
- strings of 4 encoded characters. Proceeding from left to right, a
- 24-bit input group is formed by concatenating 3 8-bit input groups.
- These 24 bits are then treated as 4 concatenated 6-bit groups, each
- of which is translated into a single digit in the base64 alphabet.
-
- Each 6-bit group is used as an index into an array of 64 printable
- characters. The character referenced by the index is placed in the
- output string.
-
- Table 1: The Base64 Alphabet
-
- Value Encoding Value Encoding Value Encoding Value Encoding
- 0 A 17 R 34 i 51 z
- 1 B 18 S 35 j 52 0
- 2 C 19 T 36 k 53 1
- 3 D 20 U 37 l 54 2
- 4 E 21 V 38 m 55 3
- 5 F 22 W 39 n 56 4
- 6 G 23 X 40 o 57 5
- 7 H 24 Y 41 p 58 6
- 8 I 25 Z 42 q 59 7
- 9 J 26 a 43 r 60 8
- 10 K 27 b 44 s 61 9
- 11 L 28 c 45 t 62 +
- 12 M 29 d 46 u 63 /
- 13 N 30 e 47 v
- 14 O 31 f 48 w (pad) =
- 15 P 32 g 49 x
- 16 Q 33 h 50 y
-
- Special processing is performed if fewer than 24 bits are available
- at the end of the data being encoded. A full encoding quantum is
- always completed at the end of a quantity. When fewer than 24 input
- bits are available in an input group, zero bits are added (on the
- right) to form an integral number of 6-bit groups. Padding at the
- end of the data is performed using the '=' character.
-
- Since all base64 input is an integral number of octets, only the
- -------------------------------------------------
- following cases can arise:
-
- (1) the final quantum of encoding input is an integral
- multiple of 24 bits; here, the final unit of encoded
- output will be an integral multiple of 4 characters
- with no "=" padding,
- (2) the final quantum of encoding input is exactly 8 bits;
- here, the final unit of encoded output will be two
- characters followed by two "=" padding characters, or
- (3) the final quantum of encoding input is exactly 16 bits;
- here, the final unit of encoded output will be three
- characters followed by one "=" padding character.
- */
-
-int
-b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
- size_t datalength = 0;
- u_char input[3];
- u_char output[4];
- size_t i;
-
- while (2 < srclength) {
- input[0] = *src++;
- input[1] = *src++;
- input[2] = *src++;
- srclength -= 3;
-
- output[0] = input[0] >> 2;
- output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
- output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
- output[3] = input[2] & 0x3f;
- Assert(output[0] < 64);
- Assert(output[1] < 64);
- Assert(output[2] < 64);
- Assert(output[3] < 64);
-
- if (datalength + 4 > targsize)
- return (-1);
- target[datalength++] = Base64[output[0]];
- target[datalength++] = Base64[output[1]];
- target[datalength++] = Base64[output[2]];
- target[datalength++] = Base64[output[3]];
- }
-
- /* Now we worry about padding. */
- if (0 != srclength) {
- /* Get what's left. */
- input[0] = input[1] = input[2] = '\0';
- for (i = 0; i < srclength; i++)
- input[i] = *src++;
-
- output[0] = input[0] >> 2;
- output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
- output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
- Assert(output[0] < 64);
- Assert(output[1] < 64);
- Assert(output[2] < 64);
-
- if (datalength + 4 > targsize)
- return (-1);
- target[datalength++] = Base64[output[0]];
- target[datalength++] = Base64[output[1]];
- if (srclength == 1)
- target[datalength++] = Pad64;
- else
- target[datalength++] = Base64[output[2]];
- target[datalength++] = Pad64;
- }
- if (datalength >= targsize)
- return (-1);
- target[datalength] = '\0'; /* Returned value doesn't count \0. */
- return (datalength);
-}
-
-/* skips all whitespace anywhere.
- converts characters, four at a time, starting at (or after)
- src from base - 64 numbers into three 8 bit bytes in the target area.
- it returns the number of data bytes stored at the target, or -1 on error.
- */
-
-int
-b64_pton(src, target, targsize)
- char const *src;
- u_char *target;
- size_t targsize;
-{
- int tarindex, state, ch;
- char *pos;
-
- state = 0;
- tarindex = 0;
-
- while ((ch = *src++) != '\0') {
- if (isspace((unsigned char)ch)) /* Skip whitespace anywhere. */
- continue;
-
- if (ch == Pad64)
- break;
-
- pos = strchr(Base64, ch);
- if (pos == 0) /* A non-base64 character. */
- return (-1);
-
- switch (state) {
- case 0:
- if (target) {
- if ((size_t)tarindex >= targsize)
- return (-1);
- target[tarindex] = (pos - Base64) << 2;
- }
- state = 1;
- break;
- case 1:
- if (target) {
- if ((size_t)tarindex + 1 >= targsize)
- return (-1);
- target[tarindex] |= (pos - Base64) >> 4;
- target[tarindex+1] = ((pos - Base64) & 0x0f)
- << 4 ;
- }
- tarindex++;
- state = 2;
- break;
- case 2:
- if (target) {
- if ((size_t)tarindex + 1 >= targsize)
- return (-1);
- target[tarindex] |= (pos - Base64) >> 2;
- target[tarindex+1] = ((pos - Base64) & 0x03)
- << 6;
- }
- tarindex++;
- state = 3;
- break;
- case 3:
- if (target) {
- if ((size_t)tarindex >= targsize)
- return (-1);
- target[tarindex] |= (pos - Base64);
- }
- tarindex++;
- state = 0;
- break;
- default:
- abort();
- }
- }
-
- /*
- * We are done decoding Base-64 chars. Let's see if we ended
- * on a byte boundary, and/or with erroneous trailing characters.
- */
-
- if (ch == Pad64) { /* We got a pad char. */
- ch = *src++; /* Skip it, get next. */
- switch (state) {
- case 0: /* Invalid = in first position */
- case 1: /* Invalid = in second position */
- return (-1);
-
- case 2: /* Valid, means one byte of info */
- /* Skip any number of spaces. */
- for ((void)NULL; ch != '\0'; ch = *src++)
- if (!isspace((unsigned char)ch))
- break;
- /* Make sure there is another trailing = sign. */
- if (ch != Pad64)
- return (-1);
- ch = *src++; /* Skip the = */
- /* Fall through to "single trailing =" case. */
- /* FALLTHROUGH */
-
- case 3: /* Valid, means two bytes of info */
- /*
- * We know this char is an =. Is there anything but
- * whitespace after it?
- */
- for ((void)NULL; ch != '\0'; ch = *src++)
- if (!isspace((unsigned char)ch))
- return (-1);
-
- /*
- * Now make sure for cases 2 and 3 that the "extra"
- * bits that slopped past the last full byte were
- * zeros. If we don't check them, they become a
- * subliminal channel.
- */
- if (target && target[tarindex] != 0)
- return (-1);
- }
- } else {
- /*
- * We ended by seeing the end of the string. Make sure we
- * have no partial bytes lying around.
- */
- if (state != 0)
- return (-1);
- }
-
- return (tarindex);
-}
diff --git a/newlib/libc/sys/linux/net/bindresvport.c b/newlib/libc/sys/linux/net/bindresvport.c
deleted file mode 100644
index 7b595b4dc..000000000
--- a/newlib/libc/sys/linux/net/bindresvport.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/* $NetBSD: bindresvport.c,v 1.19 2000/07/06 03:03:59 christos Exp $ */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)bindresvport.c 1.8 88/02/08 SMI";*/
-/*static char *sccsid = "from: @(#)bindresvport.c 2.2 88/07/29 4.0 RPCSRC";*/
-/*from: OpenBSD: bindresvport.c,v 1.7 1996/07/30 16:25:47 downsj Exp */
-#endif
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-/*
- * Copyright (c) 1987 by Sun Microsystems, Inc.
- *
- * Portions Copyright(C) 1996, Jason Downs. All rights reserved.
- */
-
-#include "namespace.h"
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <rpc/rpc.h>
-
-#include <string.h>
-#include "un-namespace.h"
-
-/*
- * Bind a socket to a privileged IP port
- */
-int
-bindresvport(sd, sin)
- int sd;
- struct sockaddr_in *sin;
-{
- return bindresvport_sa(sd, (struct sockaddr *)sin);
-}
-
-/*
- * Bind a socket to a privileged IP port
- */
-int
-bindresvport_sa(sd, sa)
- int sd;
- struct sockaddr *sa;
-{
- int old, error, af;
- struct sockaddr_storage myaddr;
- struct sockaddr_in *sin;
-#ifdef INET6
- struct sockaddr_in6 *sin6;
-#endif
- int proto, portrange, portlow;
- u_int16_t *portp;
- socklen_t salen;
-
- if (sa == NULL) {
- salen = sizeof(myaddr);
- sa = (struct sockaddr *)&myaddr;
-
- if (getsockname(sd, sa, &salen) == -1)
- return -1; /* errno is correctly set */
-
- af = sa->sa_family;
- memset(sa, 0, salen);
- } else
- af = sa->sa_family;
-
- switch (af) {
- case AF_INET:
- proto = IPPROTO_IP;
- portrange = IP_PORTRANGE;
- portlow = IP_PORTRANGE_LOW;
- sin = (struct sockaddr_in *)sa;
- salen = sizeof(struct sockaddr_in);
- portp = &sin->sin_port;
- break;
-#ifdef INET6
- case AF_INET6:
- proto = IPPROTO_IPV6;
- portrange = IPV6_PORTRANGE;
- portlow = IPV6_PORTRANGE_LOW;
- sin6 = (struct sockaddr_in6 *)sa;
- salen = sizeof(struct sockaddr_in6);
- portp = &sin6->sin6_port;
- break;
-#endif
- default:
- errno = EPFNOSUPPORT;
- return (-1);
- }
- sa->sa_family = af;
-
- if (*portp == 0) {
- socklen_t oldlen = sizeof(old);
-
- error = getsockopt(sd, proto, portrange, &old, &oldlen);
- if (error < 0)
- return (error);
-
- error = setsockopt(sd, proto, portrange, &portlow,
- sizeof(portlow));
- if (error < 0)
- return (error);
- }
-
- error = bind(sd, sa, salen);
-
- if (*portp == 0) {
- int saved_errno = errno;
-
- if (error < 0) {
- if (setsockopt(sd, proto, portrange, &old,
- sizeof(old)) < 0)
- errno = saved_errno;
- return (error);
- }
-
- if (sa != (struct sockaddr *)&myaddr) {
- /* Hmm, what did the kernel assign? */
- if (getsockname(sd, sa, &salen) < 0)
- errno = saved_errno;
- return (error);
- }
- }
- return (error);
-}
diff --git a/newlib/libc/sys/linux/net/byteorder.3 b/newlib/libc/sys/linux/net/byteorder.3
deleted file mode 100644
index 062ac9d70..000000000
--- a/newlib/libc/sys/linux/net/byteorder.3
+++ /dev/null
@@ -1,84 +0,0 @@
-.\" Copyright (c) 1983, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)byteorder.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/net/byteorder.3,v 1.9 2001/12/08 19:06:23 ru Exp $
-.\"
-.Dd June 4, 1993
-.Dt BYTEORDER 3
-.Os
-.Sh NAME
-.Nm htonl ,
-.Nm htons ,
-.Nm ntohl ,
-.Nm ntohs
-.Nd convert values between host and network byte order
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In arpa/inet.h
-.Ft uint32_t
-.Fn htonl "uint32_t hostlong"
-.Ft uint16_t
-.Fn htons "uint16_t hostshort"
-.Ft uint32_t
-.Fn ntohl "uint32_t netlong"
-.Ft uint16_t
-.Fn ntohs "uint16_t netshort"
-.Sh DESCRIPTION
-These routines convert 16 and 32 bit quantities between network
-byte order and host byte order.
-On machines which have a byte order which is the same as the network
-order, routines are defined as null macros.
-.Pp
-These routines are most often used in conjunction with Internet
-addresses and ports as returned by
-.Xr gethostbyname 3
-and
-.Xr getservent 3 .
-.Sh SEE ALSO
-.Xr gethostbyname 3 ,
-.Xr getservent 3
-.Sh STANDARDS
-The
-.Nm byteorder
-functions are expected to conform with
-.St -p1003.1-2001 .
-.Sh HISTORY
-The
-.Nm byteorder
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-On the
-.Tn VAX
-bytes are handled backwards from most everyone else in
-the world. This is not expected to be fixed in the near future.
diff --git a/newlib/libc/sys/linux/net/ether_addr.c b/newlib/libc/sys/linux/net/ether_addr.c
deleted file mode 100644
index 7d2b19f69..000000000
--- a/newlib/libc/sys/linux/net/ether_addr.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright (c) 1995
- * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Bill Paul.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY Bill Paul 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.
- *
- * ethernet address conversion and lookup routines
- *
- * Written by Bill Paul <wpaul@ctr.columbia.edu>
- * Center for Telecommunications Research
- * Columbia University, New York City
- */
-
-#include <sys/cdefs.h>
-
-#include <stdio.h>
-#include <paths.h>
-#include <sys/types.h>
-#include <sys/types.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <net/ethernet.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-#ifndef _PATH_ETHERS
-#define _PATH_ETHERS "/etc/ethers"
-#endif
-
-/*
- * Parse a string of text containing an ethernet address and hostname
- * and separate it into its component parts.
- */
-int
-ether_line(l, e, hostname)
- const char *l;
- struct ether_addr *e;
- char *hostname;
-{
- int i, o[6];
-
- i = sscanf(l, "%x:%x:%x:%x:%x:%x %s", &o[0], &o[1], &o[2],
- &o[3], &o[4], &o[5],
- hostname);
- if (i != 7)
- return (i);
-
- for (i=0; i<6; i++)
- e->octet[i] = o[i];
- return (0);
-}
-
-/*
- * Convert an ASCII representation of an ethernet address to
- * binary form.
- */
-struct
-ether_addr *ether_aton(a)
- const char *a;
-{
- int i;
- static struct ether_addr o;
- unsigned int o0, o1, o2, o3, o4, o5;
-
- i = sscanf(a, "%x:%x:%x:%x:%x:%x", &o0, &o1, &o2, &o3, &o4, &o5);
-
- if (i != 6)
- return (NULL);
-
- o.octet[0]=o0;
- o.octet[1]=o1;
- o.octet[2]=o2;
- o.octet[3]=o3;
- o.octet[4]=o4;
- o.octet[5]=o5;
-
- return ((struct ether_addr *)&o);
-}
-
-/*
- * Convert a binary representation of an ethernet address to
- * an ASCII string.
- */
-char
-*ether_ntoa(n)
- const struct ether_addr *n;
-{
- int i;
- static char a[18];
-
- i = sprintf(a, "%02x:%02x:%02x:%02x:%02x:%02x",
- n->octet[0], n->octet[1], n->octet[2],
- n->octet[3], n->octet[4], n->octet[5]);
- if (i < 17)
- return (NULL);
- return ((char *)&a);
-}
-
-/*
- * Map an ethernet address to a hostname. Use either /etc/ethers or
- * NIS/YP.
- */
-int
-ether_ntohost(hostname, e)
- char *hostname;
- const struct ether_addr *e;
-{
- FILE *fp;
- char buf[BUFSIZ + 2];
- struct ether_addr local_ether;
- char local_host[MAXHOSTNAMELEN];
-#ifdef YP
- char *result;
- int resultlen;
- char *ether_a;
- char *yp_domain;
-#endif
- if ((fp = fopen(_PATH_ETHERS, "r")) == NULL)
- return (1);
-
- while (fgets(buf,BUFSIZ,fp)) {
- if (buf[0] == '#')
- continue;
-#ifdef YP
- if (buf[0] == '+') {
- if (yp_get_default_domain(&yp_domain))
- continue;
- ether_a = ether_ntoa(e);
- if (yp_match(yp_domain, "ethers.byaddr", ether_a,
- strlen(ether_a), &result, &resultlen)) {
- continue;
- }
- strncpy(buf, result, resultlen);
- buf[resultlen] = '\0';
- free(result);
- }
-#endif
- if (!ether_line(buf, &local_ether, local_host)) {
- if (!memcmp((char *)&local_ether.octet[0],
- (char *)&e->octet[0], 6)) {
- /* We have a match */
- strcpy(hostname, local_host);
- fclose(fp);
- return(0);
- }
- }
- }
- fclose(fp);
- return (1);
-}
-
-/*
- * Map a hostname to an ethernet address using /etc/ethers or
- * NIS/YP.
- */
-int
-ether_hostton(hostname, e)
- const char *hostname;
- struct ether_addr *e;
-{
- FILE *fp;
- char buf[BUFSIZ + 2];
- struct ether_addr local_ether;
- char local_host[MAXHOSTNAMELEN];
-#ifdef YP
- char *result;
- int resultlen;
- char *yp_domain;
-#endif
- if ((fp = fopen(_PATH_ETHERS, "r")) == NULL)
- return (1);
-
- while (fgets(buf,BUFSIZ,fp)) {
- if (buf[0] == '#')
- continue;
-#ifdef YP
- if (buf[0] == '+') {
- if (yp_get_default_domain(&yp_domain))
- continue;
- if (yp_match(yp_domain, "ethers.byname", hostname,
- strlen(hostname), &result, &resultlen)) {
- continue;
- }
- strncpy(buf, result, resultlen);
- buf[resultlen] = '\0';
- free(result);
- }
-#endif
- if (!ether_line(buf, &local_ether, local_host)) {
- if (!strcmp(hostname, local_host)) {
- /* We have a match */
- bcopy((char *)&local_ether.octet[0],
- (char *)&e->octet[0], 6);
- fclose(fp);
- return(0);
- }
- }
- }
- fclose(fp);
- return (1);
-}
diff --git a/newlib/libc/sys/linux/net/ethers.3 b/newlib/libc/sys/linux/net/ethers.3
deleted file mode 100644
index 7b7866fd9..000000000
--- a/newlib/libc/sys/linux/net/ethers.3
+++ /dev/null
@@ -1,197 +0,0 @@
-.\" Copyright (c) 1995
-.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Bill Paul.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY Bill Paul 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.
-.\"
-.\" $FreeBSD: src/lib/libc/net/ethers.3,v 1.19 2002/01/14 16:59:00 ru Exp $
-.\"
-.Dd April 12, 1995
-.Dt ETHERS 3
-.Os
-.Sh NAME
-.Nm ethers ,
-.Nm ether_line ,
-.Nm ether_aton ,
-.Nm ether_ntoa ,
-.Nm ether_ntohost ,
-.Nm ether_hostton
-.Nd Ethernet address conversion and lookup routines
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/socket.h
-.In net/ethernet.h
-.Ft int
-.Fn ether_line "const char *l" "struct ether_addr *e" "char *hostname"
-.Ft struct ether_addr *
-.Fn ether_aton "const char *a"
-.Ft char *
-.Fn ether_ntoa "const struct ether_addr *n"
-.Ft int
-.Fn ether_ntohost "char *hostname" "const struct ether_addr *e"
-.Ft int
-.Fn ether_hostton "const char *hostname" "struct ether_addr *e"
-.Sh DESCRIPTION
-These functions operate on ethernet addresses using an
-.Ar ether_addr
-structure, which is defined in the header file
-.Aq Pa netinet/if_ether.h :
-.Bd -literal -offset indent
-/*
- * The number of bytes in an ethernet (MAC) address.
- */
-#define ETHER_ADDR_LEN 6
-
-/*
- * Structure of a 48-bit Ethernet address.
- */
-struct ether_addr {
- u_char octet[ETHER_ADDR_LEN];
-};
-.Ed
-.Pp
-The function
-.Fn ether_line
-scans
-.Ar l ,
-an
-.Tn ASCII
-string in
-.Xr ethers 5
-format and sets
-.Ar e
-to the ethernet address specified in the string and
-.Ar h
-to the hostname.
-This function is used to parse lines from
-.Pa /etc/ethers
-into their component parts.
-.Pp
-The
-.Fn ether_aton
-function converts an
-.Tn ASCII
-representation of an ethernet address into an
-.Ar ether_addr
-structure.
-Likewise,
-.Fn ether_ntoa
-converts an ethernet address specified as an
-.Ar ether_addr
-structure into an
-.Tn ASCII
-string.
-.Pp
-The
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions map ethernet addresses to their corresponding hostnames
-as specified in the
-.Pa /etc/ethers
-database.
-.Fn ether_ntohost
-converts from ethernet address to hostname, and
-.Fn ether_hostton
-converts from hostname to ethernet address.
-.Sh RETURN VALUES
-.Fn ether_line
-returns zero on success and non-zero if it was unable to parse
-any part of the supplied line
-.Ar l .
-It returns the extracted ethernet address in the supplied
-.Ar ether_addr
-structure
-.Ar e
-and the hostname in the supplied string
-.Ar h .
-.Pp
-On success,
-.Fn ether_ntoa
-returns a pointer to a string containing an
-.Tn ASCII
-representation of an ethernet address.
-If it is unable to convert
-the supplied
-.Ar ether_addr
-structure, it returns a
-.Dv NULL
-pointer.
-Likewise,
-.Fn ether_aton
-returns a pointer to an
-.Ar ether_addr
-structure on success and a
-.Dv NULL
-pointer on failure.
-.Pp
-The
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions both return zero on success or non-zero if they were
-unable to find a match in the
-.Pa /etc/ethers
-database.
-.Sh NOTES
-The user must insure that the hostname strings passed to the
-.Fn ether_line ,
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions are large enough to contain the returned hostnames.
-.Sh NIS INTERACTION
-If the
-.Pa /etc/ethers
-contains a line with a single + in it, the
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions will attempt to consult the NIS
-.Pa ethers.byname
-and
-.Pa ethers.byaddr
-maps in addition to the data in the
-.Pa /etc/ethers
-file.
-.Sh SEE ALSO
-.Xr ethers 5 ,
-.Xr yp 8
-.Sh BUGS
-The
-.Fn ether_aton
-and
-.Fn ether_ntoa
-functions returns values that are stored in static memory areas
-which may be overwritten the next time they are called.
-.Sh HISTORY
-This particular implementation of the
-.Nm
-library functions were written for and first appeared in
-.Fx 2.1 .
diff --git a/newlib/libc/sys/linux/net/getaddrinfo.3 b/newlib/libc/sys/linux/net/getaddrinfo.3
deleted file mode 100644
index eca8b03b2..000000000
--- a/newlib/libc/sys/linux/net/getaddrinfo.3
+++ /dev/null
@@ -1,620 +0,0 @@
-.\" $FreeBSD: src/lib/libc/net/getaddrinfo.3,v 1.18 2002/04/19 04:46:20 suz Exp $
-.\" $KAME: getaddrinfo.3,v 1.31 2001/08/05 18:19:38 itojun Exp $
-.\"
-.\" Copyright (c) 1983, 1987, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95
-.\"
-.Dd May 25, 1995
-.Dt GETADDRINFO 3
-.Os
-.\"
-.Sh NAME
-.Nm getaddrinfo ,
-.Nm freeaddrinfo ,
-.Nm gai_strerror
-.Nd nodename-to-address translation in protocol-independent manner
-.\"
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/socket.h
-.In netdb.h
-.Ft int
-.Fn getaddrinfo "const char *nodename" "const char *servname" \
-"const struct addrinfo *hints" "struct addrinfo **res"
-.Ft void
-.Fn freeaddrinfo "struct addrinfo *ai"
-.Ft "char *"
-.Fn gai_strerror "int ecode"
-.\"
-.Sh DESCRIPTION
-The
-.Fn getaddrinfo
-function is defined for protocol-independent nodename-to-address translation.
-It performs the functionality of
-.Xr gethostbyname 3
-and
-.Xr getservbyname 3 ,
-but in a more sophisticated manner.
-.Pp
-The
-.Li addrinfo
-structure is defined as a result of including the
-.Aq Pa netdb.h
-header:
-.Bd -literal -offset
-struct addrinfo {
- int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
- int ai_family; /* PF_xxx */
- int ai_socktype; /* SOCK_xxx */
- int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
- size_t ai_addrlen; /* length of ai_addr */
- char *ai_canonname; /* canonical name for nodename */
- struct sockaddr *ai_addr; /* binary address */
- struct addrinfo *ai_next; /* next structure in linked list */
-};
-.Ed
-.Pp
-The
-.Fa nodename
-and
-.Fa servname
-arguments are pointers to null-terminated strings or
-.Dv NULL .
-One or both of these two arguments must be a
-.Pf non Dv -NULL
-pointer.
-In the normal client scenario, both the
-.Fa nodename
-and
-.Fa servname
-are specified.
-In the normal server scenario, only the
-.Fa servname
-is specified.
-A
-.Pf non Dv -NULL
-.Fa nodename
-string can be either a node name or a numeric host address string
-(i.e., a dotted-decimal IPv4 address or an IPv6 hex address).
-A
-.Pf non Dv -NULL
-.Fa servname
-string can be either a service name or a decimal port number.
-.Pp
-The caller can optionally pass an
-.Li addrinfo
-structure, pointed to by the third argument,
-to provide hints concerning the type of socket that the caller supports.
-In this
-.Fa hints
-structure all members other than
-.Fa ai_flags ,
-.Fa ai_family ,
-.Fa ai_socktype ,
-and
-.Fa ai_protocol
-must be zero or a
-.Dv NULL
-pointer.
-A value of
-.Dv PF_UNSPEC
-for
-.Fa ai_family
-means the caller will accept any protocol family.
-A value of 0 for
-.Fa ai_socktype
-means the caller will accept any socket type.
-A value of 0 for
-.Fa ai_protocol
-means the caller will accept any protocol.
-For example, if the caller handles only TCP and not UDP, then the
-.Fa ai_socktype
-member of the hints structure should be set to
-.Dv SOCK_STREAM
-when
-.Fn getaddrinfo
-is called.
-If the caller handles only IPv4 and not IPv6, then the
-.Fa ai_family
-member of the
-.Fa hints
-structure should be set to
-.Dv PF_INET
-when
-.Fn getaddrinfo
-is called.
-If the third argument to
-.Fn getaddrinfo
-is a
-.Dv NULL
-pointer, this is the same as if the caller had filled in an
-.Li addrinfo
-structure initialized to zero with
-.Fa ai_family
-set to
-.Dv PF_UNSPEC .
-.Pp
-Upon successful return a pointer to a linked list of one or more
-.Li addrinfo
-structures is returned through the final argument.
-The caller can process each
-.Li addrinfo
-structure in this list by following the
-.Fa ai_next
-pointer, until a
-.Dv NULL
-pointer is encountered.
-In each returned
-.Li addrinfo
-structure the three members
-.Fa ai_family ,
-.Fa ai_socktype ,
-and
-.Fa ai_protocol
-are the corresponding arguments for a call to the
-.Fn socket
-function.
-In each
-.Li addrinfo
-structure the
-.Fa ai_addr
-member points to a filled-in socket address structure whose length is
-specified by the
-.Fa ai_addrlen
-member.
-.Pp
-If the
-.Dv AI_PASSIVE
-bit is set in the
-.Fa ai_flags
-member of the
-.Fa hints
-structure, then the caller plans to use the returned socket address
-structure in a call to
-.Fn bind .
-In this case, if the
-.Fa nodename
-argument is a
-.Dv NULL
-pointer, then the IP address portion of the socket
-address structure will be set to
-.Dv INADDR_ANY
-for an IPv4 address or
-.Dv IN6ADDR_ANY_INIT
-for an IPv6 address.
-.Pp
-If the
-.Dv AI_PASSIVE
-bit is not set in the
-.Fa ai_flags
-member of the
-.Fa hints
-structure, then the returned socket address structure will be ready for a
-call to
-.Fn connect
-(for a connection-oriented protocol)
-or either
-.Fn connect ,
-.Fn sendto ,
-or
-.Fn sendmsg
-(for a connectionless protocol).
-In this case, if the
-.Fa nodename
-argument is a
-.Dv NULL
-pointer, then the IP address portion of the
-socket address structure will be set to the loopback address.
-.Pp
-If the
-.Dv AI_CANONNAME
-bit is set in the
-.Fa ai_flags
-member of the
-.Fa hints
-structure, then upon successful return the
-.Fa ai_canonname
-member of the first
-.Li addrinfo
-structure in the linked list will point to a null-terminated string
-containing the canonical name of the specified
-.Fa nodename .
-.Pp
-If the
-.Dv AI_NUMERICHOST
-bit is set in the
-.Fa ai_flags
-member of the
-.Fa hints
-structure, then a
-.Pf non Dv -NULL
-.Fa nodename
-string must be a numeric host address string.
-Otherwise an error of
-.Dv EAI_NONAME
-is returned.
-This flag prevents any type of name resolution service (e.g., the DNS)
-from being called.
-.Pp
-The arguments to
-.Fn getaddrinfo
-must be sufficiently consistent and unambiguous.
-Here are some problem cases you may encounter:
-.Bl -bullet
-.It
-.Fn getaddrinfo
-will fail if the members in the
-.Fa hints
-structure are not consistent.
-For example, for internet address families,
-.Fn getaddrinfo
-will fail if you specify
-.Dv SOCK_STREAM
-to
-.Fa ai_socktype
-while you specify
-.Dv IPPROTO_UDP
-to
-.Fa ai_protocol .
-.It
-If you specify a
-.Fa servname
-which is defined only for certain
-.Fa ai_socktype ,
-.Fn getaddrinfo
-will fail because the arguments are not consistent.
-For example,
-.Fn getaddrinfo
-will return an error if you ask for
-.Dq Li tftp
-service on
-.Dv SOCK_STREAM .
-.It
-For internet address families, if you specify
-.Fa servname
-while you set
-.Fa ai_socktype
-to
-.Dv SOCK_RAW ,
-.Fn getaddrinfo
-will fail, because service names are not defined for the internet
-.Dv SOCK_RAW
-space.
-.It
-If you specify numeric
-.Fa servname ,
-while leaving
-.Fa ai_socktype
-and
-.Fa ai_protocol
-unspecified,
-.Fn getaddrinfo
-will fail.
-This is because the numeric
-.Fa servname
-does not identify any socket type, and
-.Fn getaddrinfo
-is not allowed to glob the argument in such case.
-.El
-.Pp
-All of the information returned by
-.Fn getaddrinfo
-is dynamically allocated:
-the
-.Li addrinfo
-structures, the socket address structures, and canonical node name
-strings pointed to by the addrinfo structures.
-To return this information to the system the function
-.Fn freeaddrinfo
-is called.
-The
-.Fa addrinfo
-structure pointed to by the
-.Fa ai argument
-is freed, along with any dynamic storage pointed to by the structure.
-This operation is repeated until a
-.Dv NULL
-.Fa ai_next
-pointer is encountered.
-.Pp
-To aid applications in printing error messages based on the
-.Dv EAI_xxx
-codes returned by
-.Fn getaddrinfo ,
-.Fn gai_strerror
-is defined.
-The argument is one of the
-.Dv EAI_xxx
-values defined earlier and the return value points to a string describing
-the error.
-If the argument is not one of the
-.Dv EAI_xxx
-values, the function still returns a pointer to a string whose contents
-indicate an unknown error.
-.\"
-.Sh EXTENSIONS
-This implementation supports numeric IPv6 address notation with the
-experimental scope identifier.
-By appending a percent sign and scope identifier to the address, you
-can specify the value of the
-.Li sin6_scope_id
-field of the socket address.
-This makes management of scoped address easier,
-and allows cut-and-paste input of scoped addresses.
-.Pp
-At the moment the code supports only link-local addresses in this format.
-The scope identifier is hardcoded to name of hardware interface associated
-with the link,
-(such as
-.Li ne0 ) .
-For example,
-.Dq Li fe80::1%ne0 ,
-which means
-.Do
-.Li fe80::1
-on the link associated with the
-.Li ne0
-interface
-.Dc .
-.Pp
-This implementation is still very experimental and non-standard.
-The current implementation assumes a one-to-one relationship between
-interfaces and links, which is not necessarily true according to the
-specification.
-.\"
-.Sh EXAMPLES
-The following code tries to connect to
-.Dq Li www.kame.net
-service
-.Dq Li http .
-via stream socket.
-It loops through all the addresses available, regardless of the address family.
-If the destination resolves to an IPv4 address, it will use an
-.Dv AF_INET
-socket.
-Similarly, if it resolves to IPv6, an
-.Dv AF_INET6
-socket is used.
-Observe that there is no hardcoded reference to particular address family.
-The code works even if
-.Fn getaddrinfo
-returns addresses that are not IPv4/v6.
-.Bd -literal -offset indent
-struct addrinfo hints, *res, *res0;
-int error;
-int s;
-const char *cause = NULL;
-
-memset(&hints, 0, sizeof(hints));
-hints.ai_family = PF_UNSPEC;
-hints.ai_socktype = SOCK_STREAM;
-error = getaddrinfo("www.kame.net", "http", &hints, &res0);
-if (error) {
- errx(1, "%s", gai_strerror(error));
- /*NOTREACHED*/
-}
-s = -1;
-cause = "no addresses";
-errno = EADDRNOTAVAIL;
-for (res = res0; res; res = res->ai_next) {
- s = socket(res->ai_family, res->ai_socktype,
- res->ai_protocol);
- if (s < 0) {
- cause = "socket";
- continue;
- }
-
- if (connect(s, res->ai_addr, res->ai_addrlen) < 0) {
- cause = "connect";
- close(s);
- s = -1;
- continue;
- }
-
- break; /* okay we got one */
-}
-if (s < 0) {
- err(1, cause);
- /*NOTREACHED*/
-}
-freeaddrinfo(res0);
-.Ed
-.Pp
-The following example tries to open a wildcard listening socket onto service
-.Dq Li http ,
-for all the address families available.
-.Bd -literal -offset indent
-struct addrinfo hints, *res, *res0;
-int error;
-int s[MAXSOCK];
-int nsock;
-const char *cause = NULL;
-
-memset(&hints, 0, sizeof(hints));
-hints.ai_family = PF_UNSPEC;
-hints.ai_socktype = SOCK_STREAM;
-hints.ai_flags = AI_PASSIVE;
-error = getaddrinfo(NULL, "http", &hints, &res0);
-if (error) {
- errx(1, "%s", gai_strerror(error));
- /*NOTREACHED*/
-}
-nsock = 0;
-for (res = res0; res && nsock < MAXSOCK; res = res->ai_next) {
- s[nsock] = socket(res->ai_family, res->ai_socktype,
- res->ai_protocol);
- if (s[nsock] < 0) {
- cause = "socket";
- continue;
- }
-
- if (bind(s[nsock], res->ai_addr, res->ai_addrlen) < 0) {
- cause = "bind";
- close(s[nsock]);
- continue;
- }
-
- if (listen(s[nsock], SOMAXCONN) < 0) {
- cause = "listen";
- close(s[nsock]);
- continue;
- }
-
- nsock++;
-}
-if (nsock == 0) {
- err(1, cause);
- /*NOTREACHED*/
-}
-freeaddrinfo(res0);
-.Ed
-.\"
-.Sh FILES
-.Bl -tag -width /etc/nsswitch.conf -compact
-.It Pa /etc/hosts
-.It Pa /etc/nsswitch.conf
-.It Pa /etc/resolv.conf
-.El
-.\"
-.Sh DIAGNOSTICS
-Error return status from
-.Fn getaddrinfo
-is zero on success and non-zero on errors.
-Non-zero error codes are defined in
-.Aq Pa netdb.h ,
-and as follows:
-.Pp
-.Bl -tag -width EAI_ADDRFAMILY -compact
-.It Dv EAI_ADDRFAMILY
-Address family for
-.Fa nodename
-not supported.
-.It Dv EAI_AGAIN
-Temporary failure in name resolution.
-.It Dv EAI_BADFLAGS
-Invalid value for
-.Fa ai_flags .
-.It Dv EAI_FAIL
-Non-recoverable failure in name resolution.
-.It Dv EAI_FAMILY
-.Fa ai_family
-not supported.
-.It Dv EAI_MEMORY
-Memory allocation failure.
-.It Dv EAI_NODATA
-No address associated with
-.Fa nodename .
-.It Dv EAI_NONAME
-.Fa nodename
-nor
-.Fa servname
-provided, or not known.
-.It Dv EAI_SERVICE
-.Fa servname
-not supported for
-.Fa ai_socktype .
-.It Dv EAI_SOCKTYPE
-.Fa ai_socktype
-not supported.
-.It Dv EAI_SYSTEM
-System error returned in
-.Va errno .
-.It Dv EAI_BADHINTS
-Invalid value for
-.Fa hints .
-.It Dv EAI_PROTOCOL
-Resolved protocol is unknown.
-.It Dv EAI_MAX
-Unknown error.
-.El
-.Pp
-If called with an appropriate argument,
-.Fn gai_strerror
-returns a pointer to a string describing the given error code.
-If the argument is not one of the
-.Dv EAI_xxx
-values, the function still returns a pointer to a string whose contents
-indicate an unknown error.
-.\"
-.Sh SEE ALSO
-.Xr gethostbyname 3 ,
-.Xr getnameinfo 3 ,
-.Xr getservbyname 3 ,
-.Xr hosts 5 ,
-.Xr resolv.conf 5 ,
-.Xr services 5 ,
-.Xr hostname 7 ,
-.Xr named 8
-.Pp
-.Rs
-.%A R. Gilligan
-.%A S. Thomson
-.%A J. Bound
-.%A W. Stevens
-.%T Basic Socket Interface Extensions for IPv6
-.%R RFC2553
-.%D March 1999
-.Re
-.Rs
-.%A Tatsuya Jinmei
-.%A Atsushi Onoe
-.%T "An Extension of Format for IPv6 Scoped Addresses"
-.%R internet draft
-.%N draft-ietf-ipngwg-scopedaddr-format-02.txt
-.%O work in progress material
-.Re
-.Rs
-.%A Craig Metz
-.%T Protocol Independence Using the Sockets API
-.%B "Proceedings of the freenix track: 2000 USENIX annual technical conference"
-.%D June 2000
-.Re
-.\"
-.Sh HISTORY
-The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit.
-.\"
-.Sh STANDARDS
-The
-.Fn getaddrinfo
-function is defined in
-.St -p1003.1g-2000 ,
-and documented in
-.Dq Basic Socket Interface Extensions for IPv6
-(RFC2553).
-.\"
-.Sh BUGS
-The current implementation is not thread-safe.
-.Pp
-The text was shamelessly copied from RFC2553.
diff --git a/newlib/libc/sys/linux/net/getaddrinfo.c b/newlib/libc/sys/linux/net/getaddrinfo.c
deleted file mode 100644
index 97ba36209..000000000
--- a/newlib/libc/sys/linux/net/getaddrinfo.c
+++ /dev/null
@@ -1,1979 +0,0 @@
-/* $KAME: getaddrinfo.c,v 1.15 2000/07/09 04:37:24 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * "#ifdef FAITH" part is local hack for supporting IPv4-v6 translator.
- *
- * Issues to be discussed:
- * - Thread safe-ness must be checked.
- * - Return values. There are nonstandard return values defined and used
- * in the source code. This is because RFC2553 is silent about which error
- * code must be returned for which situation.
- * - freeaddrinfo(NULL). RFC2553 is silent about it. XNET 5.2 says it is
- * invalid.
- * current code - SEGV on freeaddrinfo(NULL)
- * Note:
- * - We use getipnodebyname() just for thread-safeness. There's no intent
- * to let it do PF_UNSPEC (actually we never pass PF_UNSPEC to
- * getipnodebyname().
- * - The code filters out AFs that are not supported by the kernel,
- * when globbing NULL hostname (to loopback, or wildcard). Is it the right
- * thing to do? What is the relationship with post-RFC2553 AI_ADDRCONFIG
- * in ai_flags?
- * - (post-2553) semantics of AI_ADDRCONFIG itself is too vague.
- * (1) what should we do against numeric hostname (2) what should we do
- * against NULL hostname (3) what is AI_ADDRCONFIG itself. AF not ready?
- * non-loopback address configured? global address configured?
- * - To avoid search order issue, we have a big amount of code duplicate
- * from gethnamaddr.c and some other places. The issues that there's no
- * lower layer function to lookup "IPv4 or IPv6" record. Calling
- * gethostbyname2 from getaddrinfo will end up in wrong search order, as
- * follows:
- * - The code makes use of following calls when asked to resolver with
- * ai_family = PF_UNSPEC:
- * getipnodebyname(host, AF_INET6);
- * getipnodebyname(host, AF_INET);
- * This will result in the following queries if the node is configure to
- * prefer /etc/hosts than DNS:
- * lookup /etc/hosts for IPv6 address
- * lookup DNS for IPv6 address
- * lookup /etc/hosts for IPv4 address
- * lookup DNS for IPv4 address
- * which may not meet people's requirement.
- * The right thing to happen is to have underlying layer which does
- * PF_UNSPEC lookup (lookup both) and return chain of addrinfos.
- * This would result in a bit of code duplicate with _dns_ghbyname() and
- * friends.
- */
-/*
- * diffs with other KAME platforms:
- * - other KAME platforms already nuked FAITH ($GAI), but as FreeBSD
- * 4.0-RELEASE supplies it, we still have the code here.
- * - AI_ADDRCONFIG support is supplied
- * - some of FreeBSD style (#define tabify and others)
- * - classful IPv4 numeric (127.1) is allowed.
- */
-
-#include <sys/cdefs.h>
-#include <machine/endian.h>
-
-#include "namespace.h"
-#include <sys/types.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-#ifdef DEBUG
-#include <syslog.h>
-#endif
-
-#include <syslog.h>
-#include <stdarg.h>
-#include <nsswitch.h>
-#include "un-namespace.h"
-
-#if defined(__KAME__) && defined(INET6)
-# define FAITH
-#endif
-
-#define SUCCESS 0
-#define ANY 0
-#define YES 1
-#define NO 0
-
-static const char in_addrany[] = { 0, 0, 0, 0 };
-static const char in6_addrany[] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-static const char in_loopback[] = { 127, 0, 0, 1 };
-static const char in6_loopback[] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
-};
-
-static const struct afd {
- int a_af;
- int a_addrlen;
- int a_socklen;
- int a_off;
- const char *a_addrany;
- const char *a_loopback;
- int a_scoped;
-} afdl [] = {
-#ifdef INET6
-#define N_INET6 0
- {PF_INET6, sizeof(struct in6_addr),
- sizeof(struct sockaddr_in6),
- offsetof(struct sockaddr_in6, sin6_addr),
- in6_addrany, in6_loopback, 1},
-#define N_INET 1
-#else
-#define N_INET 0
-#endif
- {PF_INET, sizeof(struct in_addr),
- sizeof(struct sockaddr_in),
- offsetof(struct sockaddr_in, sin_addr),
- in_addrany, in_loopback, 0},
- {0, 0, 0, 0, NULL, NULL, 0},
-};
-
-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)
-#define WILD_PROTOCOL(ex) ((ex)->e_wild & 0x04)
-};
-
-static const struct explore explore[] = {
-#if 0
- { PF_LOCAL, 0, ANY, ANY, NULL, 0x01 },
-#endif
-#ifdef INET6
- { PF_INET6, SOCK_DGRAM, IPPROTO_UDP, "udp", 0x07 },
- { PF_INET6, SOCK_STREAM, IPPROTO_TCP, "tcp", 0x07 },
- { PF_INET6, SOCK_RAW, ANY, NULL, 0x05 },
-#endif
- { PF_INET, SOCK_DGRAM, IPPROTO_UDP, "udp", 0x07 },
- { PF_INET, SOCK_STREAM, IPPROTO_TCP, "tcp", 0x07 },
- { PF_INET, SOCK_RAW, ANY, NULL, 0x05 },
- { PF_UNSPEC, SOCK_DGRAM, IPPROTO_UDP, "udp", 0x07 },
- { PF_UNSPEC, SOCK_STREAM, IPPROTO_TCP, "tcp", 0x07 },
- { PF_UNSPEC, SOCK_RAW, ANY, NULL, 0x05 },
- { -1, 0, 0, NULL, 0 },
-};
-
-#ifdef INET6
-#define PTON_MAX 16
-#else
-#define PTON_MAX 4
-#endif
-
-static const ns_src default_dns_files[] = {
- { NSSRC_FILES, NS_SUCCESS },
- { NSSRC_DNS, NS_SUCCESS },
- { 0 }
-};
-
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
-
-typedef union {
- HEADER hdr;
- u_char buf[MAXPACKET];
-} querybuf;
-
-struct res_target {
- struct res_target *next;
- const char *name; /* domain name */
- int qclass, qtype; /* class and type of query */
- u_char *answer; /* buffer to put answer */
- int anslen; /* size of answer buffer */
- int n; /* result length */
-};
-
-static int str_isnumber(const char *);
-static int explore_fqdn(const struct addrinfo *, const char *,
- const char *, struct addrinfo **);
-static int explore_null(const struct addrinfo *,
- const char *, struct addrinfo **);
-static int explore_numeric(const struct addrinfo *, const char *,
- const char *, struct addrinfo **);
-static int explore_numeric_scope(const struct addrinfo *, const char *,
- const char *, struct addrinfo **);
-static int get_canonname(const struct addrinfo *,
- struct addrinfo *, const char *);
-static struct addrinfo *get_ai(const struct addrinfo *,
- const struct afd *, const char *);
-static int get_portmatch(const struct addrinfo *, const char *);
-static int get_port(struct addrinfo *, const char *, int);
-static const struct afd *find_afd(int);
-static int addrconfig(struct addrinfo *);
-#ifdef INET6
-static int ip6_str2scopeid(char *, struct sockaddr_in6 *);
-#endif
-
-static struct addrinfo *getanswer(const querybuf *, int, const char *, int,
- const struct addrinfo *);
-static int _dns_getaddrinfo(void *, void *, va_list);
-static void _sethtent(void);
-static void _endhtent(void);
-static struct addrinfo *_gethtent(const char *, const struct addrinfo *);
-static int _files_getaddrinfo(void *, void *, va_list);
-#ifdef YP
-static struct addrinfo *_yphostent(char *, const struct addrinfo *);
-static int _yp_getaddrinfo(void *, void *, va_list);
-extern int _yp_check(char **);
-#endif
-
-u_int16_t _getshort(const u_char *src);
-
-static int res_queryN(const char *, struct res_target *);
-static int res_searchN(const char *, struct res_target *);
-static int res_querydomainN(const char *, const char *,
- struct res_target *);
-
-static char *ai_errlist[] = {
- "Success",
- "Address family for hostname not supported", /* EAI_ADDRFAMILY */
- "Temporary failure in name resolution", /* EAI_AGAIN */
- "Invalid value for ai_flags", /* EAI_BADFLAGS */
- "Non-recoverable failure in name resolution", /* EAI_FAIL */
- "ai_family not supported", /* EAI_FAMILY */
- "Memory allocation failure", /* EAI_MEMORY */
- "No address associated with hostname", /* EAI_NODATA */
- "hostname nor servname provided, or not known", /* EAI_NONAME */
- "servname not supported for ai_socktype", /* EAI_SERVICE */
- "ai_socktype not supported", /* EAI_SOCKTYPE */
- "System error returned in errno", /* EAI_SYSTEM */
- "Invalid value for hints", /* EAI_BADHINTS */
- "Resolved protocol is unknown", /* EAI_PROTOCOL */
- "Unknown error", /* EAI_MAX */
-};
-
-/* XXX macros that make external reference is BAD. */
-
-#define GET_AI(ai, afd, addr) \
-do { \
- /* external reference: pai, error, and label free */ \
- (ai) = get_ai(pai, (afd), (addr)); \
- if ((ai) == NULL) { \
- error = EAI_MEMORY; \
- goto free; \
- } \
-} while (/*CONSTCOND*/0)
-
-#define GET_PORT(ai, serv) \
-do { \
- /* external reference: error and label free */ \
- error = get_port((ai), (serv), 0); \
- if (error != 0) \
- goto free; \
-} while (/*CONSTCOND*/0)
-
-#define GET_CANONNAME(ai, str) \
-do { \
- /* external reference: pai, error and label free */ \
- error = get_canonname(pai, (ai), (str)); \
- if (error != 0) \
- goto free; \
-} while (/*CONSTCOND*/0)
-
-#define ERR(err) \
-do { \
- /* external reference: error, and label bad */ \
- error = (err); \
- goto bad; \
- /*NOTREACHED*/ \
-} while (/*CONSTCOND*/0)
-
-#define MATCH_FAMILY(x, y, w) \
- ((x) == (y) || (/*CONSTCOND*/(w) && ((x) == PF_UNSPEC || (y) == PF_UNSPEC)))
-#define MATCH(x, y, w) \
- ((x) == (y) || (/*CONSTCOND*/(w) && ((x) == ANY || (y) == ANY)))
-
-char *
-gai_strerror(ecode)
- int ecode;
-{
- if (ecode < 0 || ecode > EAI_MAX)
- ecode = EAI_MAX;
- return ai_errlist[ecode];
-}
-
-void
-freeaddrinfo(ai)
- struct addrinfo *ai;
-{
- struct addrinfo *next;
-
- do {
- next = ai->ai_next;
- if (ai->ai_canonname)
- free(ai->ai_canonname);
- /* no need to free(ai->ai_addr) */
- free(ai);
- ai = next;
- } while (ai);
-}
-
-static int
-str_isnumber(p)
- const char *p;
-{
- char *ep;
-
- if (*p == '\0')
- return NO;
- ep = NULL;
- (void)strtoul(p, &ep, 10);
- if (ep && *ep == '\0')
- return YES;
- else
- return NO;
-}
-
-int
-getaddrinfo(hostname, servname, hints, res)
- const char *hostname, *servname;
- const struct addrinfo *hints;
- struct addrinfo **res;
-{
- struct addrinfo sentinel;
- struct addrinfo *cur;
- int error = 0;
- struct addrinfo ai;
- struct addrinfo ai0;
- struct addrinfo *pai;
- const struct explore *ex;
-
- memset(&sentinel, 0, sizeof(sentinel));
- cur = &sentinel;
- pai = &ai;
- pai->ai_flags = 0;
- pai->ai_family = PF_UNSPEC;
- pai->ai_socktype = ANY;
- pai->ai_protocol = ANY;
- pai->ai_addrlen = 0;
- pai->ai_canonname = NULL;
- pai->ai_addr = NULL;
- pai->ai_next = NULL;
-
- if (hostname == NULL && servname == NULL)
- return EAI_NONAME;
- if (hints) {
- /* error check for hints */
- if (hints->ai_addrlen || hints->ai_canonname ||
- hints->ai_addr || hints->ai_next)
- ERR(EAI_BADHINTS); /* xxx */
- if (hints->ai_flags & ~AI_MASK)
- ERR(EAI_BADFLAGS);
- switch (hints->ai_family) {
- case PF_UNSPEC:
- case PF_INET:
-#ifdef INET6
- case PF_INET6:
-#endif
- break;
- default:
- ERR(EAI_FAMILY);
- }
- memcpy(pai, hints, sizeof(*pai));
-
- /*
- * if both socktype/protocol are specified, check if they
- * are meaningful combination.
- */
- if (pai->ai_socktype != ANY && pai->ai_protocol != ANY) {
- for (ex = explore; ex->e_af >= 0; ex++) {
- if (pai->ai_family != ex->e_af)
- continue;
- if (ex->e_socktype == ANY)
- continue;
- if (ex->e_protocol == ANY)
- continue;
- if (pai->ai_socktype == ex->e_socktype
- && pai->ai_protocol != ex->e_protocol) {
- ERR(EAI_BADHINTS);
- }
- }
- }
- }
-
- /*
- * post-2553: AI_ALL and AI_V4MAPPED are effective only against
- * AF_INET6 query. They needs to be ignored if specified in other
- * occassions.
- */
- switch (pai->ai_flags & (AI_ALL | AI_V4MAPPED)) {
- case AI_V4MAPPED:
- case AI_ALL | AI_V4MAPPED:
- if (pai->ai_family != AF_INET6)
- pai->ai_flags &= ~(AI_ALL | AI_V4MAPPED);
- break;
- case AI_ALL:
-#if 1
- /* illegal */
- ERR(EAI_BADFLAGS);
-#else
- pai->ai_flags &= ~(AI_ALL | AI_V4MAPPED);
-#endif
- break;
- }
-
- /*
- * check for special cases. (1) numeric servname is disallowed if
- * socktype/protocol are left unspecified. (2) servname is disallowed
- * for raw and other inet{,6} sockets.
- */
- if (MATCH_FAMILY(pai->ai_family, PF_INET, 1)
-#ifdef PF_INET6
- || MATCH_FAMILY(pai->ai_family, PF_INET6, 1)
-#endif
- ) {
- ai0 = *pai; /* backup *pai */
-
- if (pai->ai_family == PF_UNSPEC) {
-#ifdef PF_INET6
- pai->ai_family = PF_INET6;
-#else
- pai->ai_family = PF_INET;
-#endif
- }
- error = get_portmatch(pai, servname);
- if (error)
- ERR(error);
-
- *pai = ai0;
- }
-
- ai0 = *pai;
-
- /* NULL hostname, or numeric hostname */
- for (ex = explore; ex->e_af >= 0; ex++) {
- *pai = ai0;
-
- /* PF_UNSPEC entries are prepared for DNS queries only */
- if (ex->e_af == PF_UNSPEC)
- continue;
-
- if (!MATCH_FAMILY(pai->ai_family, ex->e_af, WILD_AF(ex)))
- continue;
- if (!MATCH(pai->ai_socktype, ex->e_socktype, WILD_SOCKTYPE(ex)))
- continue;
- if (!MATCH(pai->ai_protocol, ex->e_protocol, WILD_PROTOCOL(ex)))
- continue;
-
- if (pai->ai_family == PF_UNSPEC)
- pai->ai_family = ex->e_af;
- if (pai->ai_socktype == ANY && ex->e_socktype != ANY)
- pai->ai_socktype = ex->e_socktype;
- if (pai->ai_protocol == ANY && ex->e_protocol != ANY)
- pai->ai_protocol = ex->e_protocol;
-
- if (hostname == NULL)
- error = explore_null(pai, servname, &cur->ai_next);
- else
- error = explore_numeric_scope(pai, hostname, servname, &cur->ai_next);
-
- if (error)
- goto free;
-
- while (cur && cur->ai_next)
- cur = cur->ai_next;
- }
-
- /*
- * XXX
- * If numreic representation of AF1 can be interpreted as FQDN
- * representation of AF2, we need to think again about the code below.
- */
- if (sentinel.ai_next)
- goto good;
-
- if (pai->ai_flags & AI_NUMERICHOST)
- ERR(EAI_NONAME);
- if (hostname == NULL)
- ERR(EAI_NODATA);
-
- if ((pai->ai_flags & AI_ADDRCONFIG) != 0 && !addrconfig(&ai0))
- ERR(EAI_FAIL);
-
- /*
- * hostname as alphabetical name.
- * we would like to prefer AF_INET6 than AF_INET, so we'll make a
- * outer loop by AFs.
- */
- for (ex = explore; ex->e_af >= 0; ex++) {
- *pai = ai0;
-
- /* require exact match for family field */
- if (pai->ai_family != ex->e_af)
- continue;
-
- if (!MATCH(pai->ai_socktype, ex->e_socktype,
- WILD_SOCKTYPE(ex))) {
- continue;
- }
- if (!MATCH(pai->ai_protocol, ex->e_protocol,
- WILD_PROTOCOL(ex))) {
- continue;
- }
-
- if (pai->ai_socktype == ANY && ex->e_socktype != ANY)
- pai->ai_socktype = ex->e_socktype;
- if (pai->ai_protocol == ANY && ex->e_protocol != ANY)
- pai->ai_protocol = ex->e_protocol;
-
- error = explore_fqdn(pai, hostname, servname,
- &cur->ai_next);
-
- while (cur && cur->ai_next)
- cur = cur->ai_next;
- }
-
- /* XXX */
- if (sentinel.ai_next)
- error = 0;
-
- if (error)
- goto free;
- if (error == 0) {
- if (sentinel.ai_next) {
- good:
- *res = sentinel.ai_next;
- return SUCCESS;
- } else
- error = EAI_FAIL;
- }
- free:
- bad:
- if (sentinel.ai_next)
- freeaddrinfo(sentinel.ai_next);
- *res = NULL;
- return error;
-}
-
-/*
- * FQDN hostname, DNS lookup
- */
-static int
-explore_fqdn(pai, hostname, servname, res)
- const struct addrinfo *pai;
- const char *hostname;
- const char *servname;
- struct addrinfo **res;
-{
- struct addrinfo *result;
- struct addrinfo *cur;
- int error = 0;
- static const ns_dtab dtab[] = {
- NS_FILES_CB(_files_getaddrinfo, NULL)
- { NSSRC_DNS, _dns_getaddrinfo, NULL }, /* force -DHESIOD */
- NS_NIS_CB(_yp_getaddrinfo, NULL)
- { 0 }
- };
-
- result = NULL;
-
- /*
- * if the servname does not match socktype/protocol, ignore it.
- */
- if (get_portmatch(pai, servname) != 0)
- return 0;
-
- switch (nsdispatch(&result, dtab, NSDB_HOSTS, "getaddrinfo",
- default_dns_files, hostname, pai)) {
- case NS_TRYAGAIN:
- error = EAI_AGAIN;
- goto free;
- case NS_UNAVAIL:
- error = EAI_FAIL;
- goto free;
- case NS_NOTFOUND:
- error = EAI_NODATA;
- goto free;
- case NS_SUCCESS:
- error = 0;
- for (cur = result; cur; cur = cur->ai_next) {
- GET_PORT(cur, servname);
- /* canonname should be filled already */
- }
- break;
- }
-
- *res = result;
-
- return 0;
-
-free:
- if (result)
- freeaddrinfo(result);
- return error;
-}
-
-/*
- * hostname == NULL.
- * passive socket -> anyaddr (0.0.0.0 or ::)
- * non-passive socket -> localhost (127.0.0.1 or ::1)
- */
-static int
-explore_null(pai, servname, res)
- const struct addrinfo *pai;
- const char *servname;
- struct addrinfo **res;
-{
- int s;
- const struct afd *afd;
- struct addrinfo *cur;
- struct addrinfo sentinel;
- int error;
-
- *res = NULL;
- sentinel.ai_next = NULL;
- cur = &sentinel;
-
- /*
- * filter out AFs that are not supported by the kernel
- * XXX errno?
- */
- s = socket(pai->ai_family, SOCK_DGRAM, 0);
- if (s < 0) {
- if (errno != EMFILE)
- return 0;
- } else
- close(s);
-
- /*
- * if the servname does not match socktype/protocol, ignore it.
- */
- if (get_portmatch(pai, servname) != 0)
- return 0;
-
- afd = find_afd(pai->ai_family);
- if (afd == NULL)
- return 0;
-
- if (pai->ai_flags & AI_PASSIVE) {
- GET_AI(cur->ai_next, afd, afd->a_addrany);
- /* xxx meaningless?
- * GET_CANONNAME(cur->ai_next, "anyaddr");
- */
- GET_PORT(cur->ai_next, servname);
- } else {
- GET_AI(cur->ai_next, afd, afd->a_loopback);
- /* xxx meaningless?
- * GET_CANONNAME(cur->ai_next, "localhost");
- */
- GET_PORT(cur->ai_next, servname);
- }
- cur = cur->ai_next;
-
- *res = sentinel.ai_next;
- return 0;
-
-free:
- if (sentinel.ai_next)
- freeaddrinfo(sentinel.ai_next);
- return error;
-}
-
-/*
- * numeric hostname
- */
-static int
-explore_numeric(pai, hostname, servname, res)
- const struct addrinfo *pai;
- const char *hostname;
- const char *servname;
- struct addrinfo **res;
-{
- const struct afd *afd;
- struct addrinfo *cur;
- struct addrinfo sentinel;
- int error;
- char pton[PTON_MAX];
-
- *res = NULL;
- sentinel.ai_next = NULL;
- cur = &sentinel;
-
- /*
- * if the servname does not match socktype/protocol, ignore it.
- */
- if (get_portmatch(pai, servname) != 0)
- return 0;
-
- afd = find_afd(pai->ai_family);
- if (afd == NULL)
- return 0;
-
- switch (afd->a_af) {
-#if 1 /*X/Open spec*/
- case AF_INET:
- if (inet_aton(hostname, (struct in_addr *)pton) == 1) {
- if (pai->ai_family == afd->a_af ||
- pai->ai_family == PF_UNSPEC /*?*/) {
- GET_AI(cur->ai_next, afd, pton);
- GET_PORT(cur->ai_next, servname);
- while (cur && cur->ai_next)
- cur = cur->ai_next;
- } else
- ERR(EAI_FAMILY); /*xxx*/
- }
- break;
-#endif
- default:
- if (inet_pton(afd->a_af, hostname, pton) == 1) {
- if (pai->ai_family == afd->a_af ||
- pai->ai_family == PF_UNSPEC /*?*/) {
- GET_AI(cur->ai_next, afd, pton);
- GET_PORT(cur->ai_next, servname);
- while (cur && cur->ai_next)
- cur = cur->ai_next;
- } else
- ERR(EAI_FAMILY); /*xxx*/
- }
- break;
- }
-
- *res = sentinel.ai_next;
- return 0;
-
-free:
-bad:
- if (sentinel.ai_next)
- freeaddrinfo(sentinel.ai_next);
- return error;
-}
-
-/*
- * numeric hostname with scope
- */
-static int
-explore_numeric_scope(pai, hostname, servname, res)
- const struct addrinfo *pai;
- const char *hostname;
- const char *servname;
- struct addrinfo **res;
-{
-#if !defined(SCOPE_DELIMITER) || !defined(INET6)
- return explore_numeric(pai, hostname, servname, res);
-#else
- const struct afd *afd;
- struct addrinfo *cur;
- int error;
- char *cp, *hostname2 = NULL, *scope, *addr;
- struct sockaddr_in6 *sin6;
-
- /*
- * if the servname does not match socktype/protocol, ignore it.
- */
- if (get_portmatch(pai, servname) != 0)
- return 0;
-
- afd = find_afd(pai->ai_family);
- if (afd == NULL)
- return 0;
-
- if (!afd->a_scoped)
- return explore_numeric(pai, hostname, servname, res);
-
- cp = strchr(hostname, SCOPE_DELIMITER);
- if (cp == NULL)
- return explore_numeric(pai, hostname, servname, res);
-
- /*
- * Handle special case of <scoped_address><delimiter><scope id>
- */
- hostname2 = strdup(hostname);
- if (hostname2 == NULL)
- return EAI_MEMORY;
- /* terminate at the delimiter */
- hostname2[cp - hostname] = '\0';
- addr = hostname2;
- scope = cp + 1;
-
- error = explore_numeric(pai, addr, servname, res);
- if (error == 0) {
- int scopeid;
-
- for (cur = *res; cur; cur = cur->ai_next) {
- if (cur->ai_family != AF_INET6)
- continue;
- sin6 = (struct sockaddr_in6 *)(void *)cur->ai_addr;
- if ((scopeid = ip6_str2scopeid(scope, sin6)) == -1) {
- free(hostname2);
- return(EAI_NODATA); /* XXX: is return OK? */
- }
- sin6->sin6_scope_id = scopeid;
- }
- }
-
- free(hostname2);
-
- return error;
-#endif
-}
-
-static int
-get_canonname(pai, ai, str)
- const struct addrinfo *pai;
- struct addrinfo *ai;
- const char *str;
-{
- if ((pai->ai_flags & AI_CANONNAME) != 0) {
- ai->ai_canonname = (char *)malloc(strlen(str) + 1);
- if (ai->ai_canonname == NULL)
- return EAI_MEMORY;
- strcpy(ai->ai_canonname, str);
- }
- return 0;
-}
-
-static struct addrinfo *
-get_ai(pai, afd, addr)
- const struct addrinfo *pai;
- const struct afd *afd;
- const char *addr;
-{
- char *p;
- struct addrinfo *ai;
-#ifdef FAITH
- struct in6_addr faith_prefix;
- char *fp_str;
- int translate = 0;
-#endif
-
-#ifdef FAITH
- /*
- * Transfrom an IPv4 addr into a special IPv6 addr format for
- * IPv6->IPv4 translation gateway. (only TCP is supported now)
- *
- * +-----------------------------------+------------+
- * | faith prefix part (12 bytes) | embedded |
- * | | IPv4 addr part (4 bytes)
- * +-----------------------------------+------------+
- *
- * faith prefix part is specified as ascii IPv6 addr format
- * in environmental variable GAI.
- * For FAITH to work correctly, routing to faith prefix must be
- * setup toward a machine where a FAITH daemon operates.
- * Also, the machine must enable some mechanizm
- * (e.g. faith interface hack) to divert those packet with
- * faith prefixed destination addr to user-land FAITH daemon.
- */
- fp_str = getenv("GAI");
- if (fp_str && inet_pton(AF_INET6, fp_str, &faith_prefix) == 1 &&
- afd->a_af == AF_INET && pai->ai_socktype == SOCK_STREAM) {
- u_int32_t v4a;
- u_int8_t v4a_top;
-
- memcpy(&v4a, addr, sizeof v4a);
- v4a_top = v4a >> IN_CLASSA_NSHIFT;
- if (!IN_MULTICAST(v4a) && !IN_EXPERIMENTAL(v4a) &&
- v4a_top != 0 && v4a != IN_LOOPBACKNET) {
- afd = &afdl[N_INET6];
- memcpy(&faith_prefix.s6_addr[12], addr,
- sizeof(struct in_addr));
- translate = 1;
- }
- }
-#endif
-
- ai = (struct addrinfo *)malloc(sizeof(struct addrinfo)
- + (afd->a_socklen));
- if (ai == NULL)
- return NULL;
-
- memcpy(ai, pai, sizeof(struct addrinfo));
- ai->ai_addr = (struct sockaddr *)(void *)(ai + 1);
- memset(ai->ai_addr, 0, (size_t)afd->a_socklen);
- ai->ai_addrlen = afd->a_socklen;
- ai->ai_addr->sa_family = ai->ai_family = afd->a_af;
- p = (char *)(void *)(ai->ai_addr);
-#ifdef FAITH
- if (translate == 1)
- memcpy(p + afd->a_off, &faith_prefix, (size_t)afd->a_addrlen);
- else
-#endif
- memcpy(p + afd->a_off, addr, (size_t)afd->a_addrlen);
- return ai;
-}
-
-static int
-get_portmatch(ai, servname)
- const struct addrinfo *ai;
- const char *servname;
-{
-
- /* get_port does not touch first argument. when matchonly == 1. */
- /* LINTED const cast */
- return get_port((struct addrinfo *)ai, servname, 1);
-}
-
-static int
-get_port(ai, servname, matchonly)
- struct addrinfo *ai;
- const char *servname;
- int matchonly;
-{
- const char *proto;
- struct servent *sp;
- int port;
- int allownumeric;
-
- if (servname == NULL)
- return 0;
- switch (ai->ai_family) {
- case AF_INET:
-#ifdef AF_INET6
- case AF_INET6:
-#endif
- break;
- default:
- return 0;
- }
-
- switch (ai->ai_socktype) {
- case SOCK_RAW:
- return EAI_SERVICE;
- case SOCK_DGRAM:
- case SOCK_STREAM:
- allownumeric = 1;
- break;
- case ANY:
- allownumeric = 0;
- break;
- default:
- return EAI_SOCKTYPE;
- }
-
- if (str_isnumber(servname)) {
- if (!allownumeric)
- return EAI_SERVICE;
- port = htons(atoi(servname));
- if (port < 0 || port > 65535)
- return EAI_SERVICE;
- } else {
- switch (ai->ai_socktype) {
- case SOCK_DGRAM:
- proto = "udp";
- break;
- case SOCK_STREAM:
- proto = "tcp";
- break;
- default:
- proto = NULL;
- break;
- }
-
- if ((sp = getservbyname(servname, proto)) == NULL)
- return EAI_SERVICE;
- port = sp->s_port;
- }
-
- if (!matchonly) {
- switch (ai->ai_family) {
- case AF_INET:
- ((struct sockaddr_in *)(void *)
- ai->ai_addr)->sin_port = port;
- break;
-#ifdef INET6
- case AF_INET6:
- ((struct sockaddr_in6 *)(void *)
- ai->ai_addr)->sin6_port = port;
- break;
-#endif
- }
- }
-
- return 0;
-}
-
-static const struct afd *
-find_afd(af)
- int af;
-{
- const struct afd *afd;
-
- if (af == PF_UNSPEC)
- return NULL;
- for (afd = afdl; afd->a_af; afd++) {
- if (afd->a_af == af)
- return afd;
- }
- return NULL;
-}
-
-/*
- * post-2553: AI_ADDRCONFIG check. if we use getipnodeby* as backend, backend
- * will take care of it.
- * the semantics of AI_ADDRCONFIG is not defined well. we are not sure
- * if the code is right or not.
- *
- * XXX PF_UNSPEC -> PF_INET6 + PF_INET mapping needs to be in sync with
- * _dns_getaddrinfo.
- */
-static int
-addrconfig(pai)
- struct addrinfo *pai;
-{
- int s, af;
-
- /*
- * TODO:
- * Note that implementation dependent test for address
- * configuration should be done everytime called
- * (or apropriate interval),
- * because addresses will be dynamically assigned or deleted.
- */
- af = pai->ai_family;
- if (af == AF_UNSPEC) {
- if ((s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
- af = AF_INET;
- else {
- close(s);
- if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
- af = AF_INET6;
- else
- close(s);
- }
- }
- if (af != AF_UNSPEC) {
- if ((s = socket(af, SOCK_DGRAM, 0)) < 0)
- return 0;
- close(s);
- }
- pai->ai_family = af;
- return 1;
-}
-
-#ifdef INET6
-/* convert a string to a scope identifier. XXX: IPv6 specific */
-static int
-ip6_str2scopeid(scope, sin6)
- char *scope;
- struct sockaddr_in6 *sin6;
-{
- int scopeid;
- struct in6_addr *a6 = &sin6->sin6_addr;
- char *ep;
-
- /* empty scopeid portion is invalid */
- if (*scope == '\0')
- return -1;
-
- if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6)) {
- /*
- * We currently assume a one-to-one mapping between links
- * and interfaces, so we simply use interface indices for
- * like-local scopes.
- */
- scopeid = if_nametoindex(scope);
- if (scopeid == 0)
- goto trynumeric;
- return(scopeid);
- }
-
- /* still unclear about literal, allow numeric only - placeholder */
- if (IN6_IS_ADDR_SITELOCAL(a6) || IN6_IS_ADDR_MC_SITELOCAL(a6))
- goto trynumeric;
- if (IN6_IS_ADDR_MC_ORGLOCAL(a6))
- goto trynumeric;
- else
- goto trynumeric; /* global */
-
- /* try to convert to a numeric id as a last resort */
- trynumeric:
- scopeid = (int)strtoul(scope, &ep, 10);
- if (*ep == '\0')
- return scopeid;
- else
- return -1;
-}
-#endif
-
-#ifdef DEBUG
-static const char AskedForGot[] =
- "gethostby*.getanswer: asked for \"%s\", got \"%s\"";
-#endif
-static FILE *hostf = NULL;
-
-static struct addrinfo *
-getanswer(answer, anslen, qname, qtype, pai)
- const querybuf *answer;
- int anslen;
- const char *qname;
- int qtype;
- const struct addrinfo *pai;
-{
- struct addrinfo sentinel, *cur;
- struct addrinfo ai;
- const struct afd *afd;
- char *canonname;
- const HEADER *hp;
- const u_char *cp;
- int n;
- const u_char *eom;
- char *bp;
- int type, class, buflen, ancount, qdcount;
- int haveanswer, had_error;
- char tbuf[MAXDNAME];
- int (*name_ok)(const char *);
- char hostbuf[8*1024];
-
- memset(&sentinel, 0, sizeof(sentinel));
- cur = &sentinel;
-
- canonname = NULL;
- eom = answer->buf + anslen;
- switch (qtype) {
- case T_A:
- case T_AAAA:
- case T_ANY: /*use T_ANY only for T_A/T_AAAA lookup*/
- name_ok = res_hnok;
- break;
- default:
- return (NULL); /* XXX should be abort(); */
- }
- /*
- * find first satisfactory answer
- */
- hp = &answer->hdr;
- ancount = ntohs(hp->ancount);
- qdcount = ntohs(hp->qdcount);
- bp = hostbuf;
- buflen = sizeof hostbuf;
- cp = answer->buf + HFIXEDSZ;
- if (qdcount != 1) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !(*name_ok)(bp)) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- cp += n + QFIXEDSZ;
- if (qtype == T_A || qtype == T_AAAA || qtype == T_ANY) {
- /* res_send() has already verified that the query name is the
- * same as the one we sent; this just gets the expanded name
- * (i.e., with the succeeding search-domain tacked on).
- */
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- canonname = bp;
- bp += n;
- buflen -= n;
- /* The qname can be abbreviated, but h_name is now absolute. */
- qname = canonname;
- }
- haveanswer = 0;
- had_error = 0;
- while (ancount-- > 0 && cp < eom && !had_error) {
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !(*name_ok)(bp)) {
- had_error++;
- continue;
- }
- cp += n; /* name */
- type = _getshort(cp);
- cp += INT16SZ; /* type */
- class = _getshort(cp);
- cp += INT16SZ + INT32SZ; /* class, TTL */
- n = _getshort(cp);
- cp += INT16SZ; /* len */
- if (class != C_IN) {
- /* XXX - debug? syslog? */
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- if ((qtype == T_A || qtype == T_AAAA || qtype == T_ANY) &&
- type == T_CNAME) {
- n = dn_expand(answer->buf, eom, cp, tbuf, sizeof tbuf);
- if ((n < 0) || !(*name_ok)(tbuf)) {
- had_error++;
- continue;
- }
- cp += n;
- /* Get canonical name. */
- n = strlen(tbuf) + 1; /* for the \0 */
- if (n > buflen || n >= MAXHOSTNAMELEN) {
- had_error++;
- continue;
- }
- strcpy(bp, tbuf);
- canonname = bp;
- bp += n;
- buflen -= n;
- continue;
- }
- if (qtype == T_ANY) {
- if (!(type == T_A || type == T_AAAA)) {
- cp += n;
- continue;
- }
- } else if (type != qtype) {
-#ifdef DEBUG
- if (type != T_KEY && type != T_SIG)
- syslog(LOG_NOTICE|LOG_AUTH,
- "gethostby*.getanswer: asked for \"%s %s %s\", got type \"%s\"",
- qname, p_class(C_IN), p_type(qtype),
- p_type(type));
-#endif
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- switch (type) {
- case T_A:
- case T_AAAA:
- if (strcasecmp(canonname, bp) != 0) {
-#ifdef DEBUG
- syslog(LOG_NOTICE|LOG_AUTH,
- AskedForGot, canonname, bp);
-#endif
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- if (type == T_A && n != INADDRSZ) {
- cp += n;
- continue;
- }
- if (type == T_AAAA && n != IN6ADDRSZ) {
- cp += n;
- continue;
- }
-#ifdef FILTER_V4MAPPED
- if (type == T_AAAA) {
- struct in6_addr in6;
- memcpy(&in6, cp, sizeof(in6));
- if (IN6_IS_ADDR_V4MAPPED(&in6)) {
- cp += n;
- continue;
- }
- }
-#endif
- if (!haveanswer) {
- int nn;
-
- canonname = bp;
- nn = strlen(bp) + 1; /* for the \0 */
- bp += nn;
- buflen -= nn;
- }
-
- /* don't overwrite pai */
- ai = *pai;
- ai.ai_family = (type == T_A) ? AF_INET : AF_INET6;
- afd = find_afd(ai.ai_family);
- if (afd == NULL) {
- cp += n;
- continue;
- }
- cur->ai_next = get_ai(&ai, afd, (const char *)cp);
- if (cur->ai_next == NULL)
- had_error++;
- while (cur && cur->ai_next)
- cur = cur->ai_next;
- cp += n;
- break;
- default:
- abort();
- }
- if (!had_error)
- haveanswer++;
- }
- if (haveanswer) {
- if (!canonname)
- (void)get_canonname(pai, sentinel.ai_next, qname);
- else
- (void)get_canonname(pai, sentinel.ai_next, canonname);
- h_errno = NETDB_SUCCESS;
- return sentinel.ai_next;
- }
-
- h_errno = NO_RECOVERY;
- return NULL;
-}
-
-/*ARGSUSED*/
-static int
-_dns_getaddrinfo(rv, cb_data, ap)
- void *rv;
- void *cb_data;
- va_list ap;
-{
- struct addrinfo *ai;
- querybuf buf, buf2;
- const char *name;
- const struct addrinfo *pai;
- struct addrinfo sentinel, *cur;
- struct res_target q, q2;
-
- name = va_arg(ap, char *);
- pai = va_arg(ap, const struct addrinfo *);
-
- memset(&q, 0, sizeof(q2));
- memset(&q2, 0, sizeof(q2));
- memset(&sentinel, 0, sizeof(sentinel));
- cur = &sentinel;
-
- switch (pai->ai_family) {
- case AF_UNSPEC:
- /* prefer IPv6 */
- q.qclass = C_IN;
- q.qtype = T_AAAA;
- q.answer = buf.buf;
- q.anslen = sizeof(buf);
- q.next = &q2;
- q2.qclass = C_IN;
- q2.qtype = T_A;
- q2.answer = buf2.buf;
- q2.anslen = sizeof(buf2);
- break;
- case AF_INET:
- q.qclass = C_IN;
- q.qtype = T_A;
- q.answer = buf.buf;
- q.anslen = sizeof(buf);
- break;
- case AF_INET6:
- q.qclass = C_IN;
- q.qtype = T_AAAA;
- q.answer = buf.buf;
- q.anslen = sizeof(buf);
- break;
- default:
- return NS_UNAVAIL;
- }
- if (res_searchN(name, &q) < 0)
- return NS_NOTFOUND;
- ai = getanswer(&buf, q.n, q.name, q.qtype, pai);
- if (ai) {
- cur->ai_next = ai;
- while (cur && cur->ai_next)
- cur = cur->ai_next;
- }
- if (q.next) {
- ai = getanswer(&buf2, q2.n, q2.name, q2.qtype, pai);
- if (ai)
- cur->ai_next = ai;
- }
- if (sentinel.ai_next == NULL)
- switch (h_errno) {
- case HOST_NOT_FOUND:
- return NS_NOTFOUND;
- case TRY_AGAIN:
- return NS_TRYAGAIN;
- default:
- return NS_UNAVAIL;
- }
- *((struct addrinfo **)rv) = sentinel.ai_next;
- return NS_SUCCESS;
-}
-
-static void
-_sethtent()
-{
- if (!hostf)
- hostf = fopen(_PATH_HOSTS, "r" );
- else
- rewind(hostf);
-}
-
-static void
-_endhtent()
-{
- if (hostf) {
- (void) fclose(hostf);
- hostf = NULL;
- }
-}
-
-static struct addrinfo *
-_gethtent(name, pai)
- const char *name;
- const struct addrinfo *pai;
-{
- char *p;
- char *cp, *tname, *cname;
- struct addrinfo hints, *res0, *res;
- int error;
- const char *addr;
- char hostbuf[8*1024];
-
- if (!hostf && !(hostf = fopen(_PATH_HOSTS, "r" )))
- return (NULL);
- again:
- if (!(p = fgets(hostbuf, sizeof hostbuf, hostf)))
- return (NULL);
- if (*p == '#')
- goto again;
- if (!(cp = strpbrk(p, "#\n")))
- goto again;
- *cp = '\0';
- if (!(cp = strpbrk(p, " \t")))
- goto again;
- *cp++ = '\0';
- addr = p;
- cname = NULL;
- /* if this is not something we're looking for, skip it. */
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- tname = cp;
- if (cname == NULL)
- cname = cp;
- if ((cp = strpbrk(cp, " \t")) != NULL)
- *cp++ = '\0';
- if (strcasecmp(name, tname) == 0)
- goto found;
- }
- goto again;
-
-found:
- hints = *pai;
- hints.ai_flags = AI_NUMERICHOST;
- error = getaddrinfo(addr, NULL, &hints, &res0);
- if (error)
- goto again;
-#ifdef FILTER_V4MAPPED
- /* XXX should check all items in the chain */
- if (res0->ai_family == AF_INET6 &&
- IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)res0->ai_addr)->sin6_addr)) {
- freeaddrinfo(res0);
- goto again;
- }
-#endif
- for (res = res0; res; res = res->ai_next) {
- /* cover it up */
- res->ai_flags = pai->ai_flags;
-
- if (pai->ai_flags & AI_CANONNAME) {
- if (get_canonname(pai, res, cname) != 0) {
- freeaddrinfo(res0);
- goto again;
- }
- }
- }
- return res0;
-}
-
-/*ARGSUSED*/
-static int
-_files_getaddrinfo(rv, cb_data, ap)
- void *rv;
- void *cb_data;
- va_list ap;
-{
- const char *name;
- const struct addrinfo *pai;
- struct addrinfo sentinel, *cur;
- struct addrinfo *p;
-
- name = va_arg(ap, char *);
- pai = va_arg(ap, struct addrinfo *);
-
- memset(&sentinel, 0, sizeof(sentinel));
- cur = &sentinel;
-
- _sethtent();
- while ((p = _gethtent(name, pai)) != NULL) {
- cur->ai_next = p;
- while (cur && cur->ai_next)
- cur = cur->ai_next;
- }
- _endhtent();
-
- *((struct addrinfo **)rv) = sentinel.ai_next;
- if (sentinel.ai_next == NULL)
- return NS_NOTFOUND;
- return NS_SUCCESS;
-}
-
-#ifdef YP
-static char *__ypdomain;
-
-/*ARGSUSED*/
-static struct addrinfo *
-_yphostent(line, pai)
- char *line;
- const struct addrinfo *pai;
-{
- struct addrinfo sentinel, *cur;
- struct addrinfo hints, *res, *res0;
- int error;
- char *p = line;
- const char *addr, *canonname;
- char *nextline;
- char *cp;
-
- addr = canonname = NULL;
-
- memset(&sentinel, 0, sizeof(sentinel));
- cur = &sentinel;
-
-nextline:
- /* terminate line */
- cp = strchr(p, '\n');
- if (cp) {
- *cp++ = '\0';
- nextline = cp;
- } else
- nextline = NULL;
-
- cp = strpbrk(p, " \t");
- if (cp == NULL) {
- if (canonname == NULL)
- return (NULL);
- else
- goto done;
- }
- *cp++ = '\0';
-
- addr = p;
-
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (!canonname)
- canonname = cp;
- if ((cp = strpbrk(cp, " \t")) != NULL)
- *cp++ = '\0';
- }
-
- hints = *pai;
- hints.ai_flags = AI_NUMERICHOST;
- error = getaddrinfo(addr, NULL, &hints, &res0);
- if (error == 0) {
- for (res = res0; res; res = res->ai_next) {
- /* cover it up */
- res->ai_flags = pai->ai_flags;
-
- if (pai->ai_flags & AI_CANONNAME)
- (void)get_canonname(pai, res, canonname);
- }
- } else
- res0 = NULL;
- if (res0) {
- cur->ai_next = res0;
- while (cur && cur->ai_next)
- cur = cur->ai_next;
- }
-
- if (nextline) {
- p = nextline;
- goto nextline;
- }
-
-done:
- return sentinel.ai_next;
-}
-
-/*ARGSUSED*/
-static int
-_yp_getaddrinfo(rv, cb_data, ap)
- void *rv;
- void *cb_data;
- va_list ap;
-{
- struct addrinfo sentinel, *cur;
- struct addrinfo *ai = NULL;
- static char *__ypcurrent;
- int __ypcurrentlen, r;
- const char *name;
- const struct addrinfo *pai;
-
- name = va_arg(ap, char *);
- pai = va_arg(ap, const struct addrinfo *);
-
- memset(&sentinel, 0, sizeof(sentinel));
- cur = &sentinel;
-
- if (!__ypdomain) {
- if (_yp_check(&__ypdomain) == 0)
- return NS_UNAVAIL;
- }
- if (__ypcurrent)
- free(__ypcurrent);
- __ypcurrent = NULL;
-
- /* hosts.byname is only for IPv4 (Solaris8) */
- if (pai->ai_family == PF_UNSPEC || pai->ai_family == PF_INET) {
- r = yp_match(__ypdomain, "hosts.byname", name,
- (int)strlen(name), &__ypcurrent, &__ypcurrentlen);
- if (r == 0) {
- struct addrinfo ai4;
-
- ai4 = *pai;
- ai4.ai_family = AF_INET;
- ai = _yphostent(__ypcurrent, &ai4);
- if (ai) {
- cur->ai_next = ai;
- while (cur && cur->ai_next)
- cur = cur->ai_next;
- }
- }
- }
-
- /* ipnodes.byname can hold both IPv4/v6 */
- r = yp_match(__ypdomain, "ipnodes.byname", name,
- (int)strlen(name), &__ypcurrent, &__ypcurrentlen);
- if (r == 0) {
- ai = _yphostent(__ypcurrent, pai);
- if (ai) {
- cur->ai_next = ai;
- while (cur && cur->ai_next)
- cur = cur->ai_next;
- }
- }
-
- if (sentinel.ai_next == NULL) {
- h_errno = HOST_NOT_FOUND;
- return NS_NOTFOUND;
- }
- *((struct addrinfo **)rv) = sentinel.ai_next;
- return NS_SUCCESS;
-}
-#endif
-
-/* resolver logic */
-
-extern const char *__hostalias(const char *);
-extern int h_errno;
-
-/*
- * Formulate a normal query, send, and await answer.
- * Returned answer is placed in supplied buffer "answer".
- * Perform preliminary check of answer, returning success only
- * if no error is indicated and the answer count is nonzero.
- * Return the size of the response on success, -1 on error.
- * Error number is left in h_errno.
- *
- * Caller must parse answer and determine whether it answers the question.
- */
-static int
-res_queryN(name, target)
- const char *name; /* domain name */
- struct res_target *target;
-{
- u_char buf[MAXPACKET];
- HEADER *hp;
- int n;
- struct res_target *t;
- int rcode;
- int ancount;
-
- rcode = NOERROR;
- ancount = 0;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-
- for (t = target; t; t = t->next) {
- int class, type;
- u_char *answer;
- int anslen;
-
- hp = (HEADER *)(void *)t->answer;
- hp->rcode = NOERROR; /* default */
-
- /* make it easier... */
- class = t->qclass;
- type = t->qtype;
- answer = t->answer;
- anslen = t->anslen;
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_query(%s, %d, %d)\n", name, class, type);
-#endif
-
- n = res_mkquery(QUERY, name, class, type, NULL, 0, NULL,
- buf, sizeof(buf));
- if (n > 0 && (_res.options & RES_USE_EDNS0) != 0)
- n = res_opt(n, buf, sizeof(buf), anslen);
- if (n <= 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_query: mkquery failed\n");
-#endif
- h_errno = NO_RECOVERY;
- return (n);
- }
- n = res_send(buf, n, answer, anslen);
-#if 0
- if (n < 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_query: send error\n");
-#endif
- h_errno = TRY_AGAIN;
- return (n);
- }
-#endif
-
- if (n < 0 || hp->rcode != NOERROR || ntohs(hp->ancount) == 0) {
- rcode = hp->rcode; /* record most recent error */
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; rcode = %d, ancount=%d\n", hp->rcode,
- ntohs(hp->ancount));
-#endif
- continue;
- }
-
- ancount += ntohs(hp->ancount);
-
- t->n = n;
- }
-
- if (ancount == 0) {
- switch (rcode) {
- case NXDOMAIN:
- h_errno = HOST_NOT_FOUND;
- break;
- case SERVFAIL:
- h_errno = TRY_AGAIN;
- break;
- case NOERROR:
- h_errno = NO_DATA;
- break;
- case FORMERR:
- case NOTIMP:
- case REFUSED:
- default:
- h_errno = NO_RECOVERY;
- break;
- }
- return (-1);
- }
- return (ancount);
-}
-
-/*
- * Formulate a normal query, send, and retrieve answer in supplied buffer.
- * Return the size of the response on success, -1 on error.
- * If enabled, implement search rules until answer or unrecoverable failure
- * is detected. Error code, if any, is left in h_errno.
- */
-static int
-res_searchN(name, target)
- const char *name; /* domain name */
- struct res_target *target;
-{
- const char *cp, * const *domain;
- HEADER *hp = (HEADER *)(void *)target->answer; /*XXX*/
- u_int dots;
- int trailing_dot, ret, saved_herrno;
- int got_nodata = 0, got_servfail = 0, tried_as_is = 0;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-
- errno = 0;
- h_errno = HOST_NOT_FOUND; /* default, if we never query */
- dots = 0;
- for (cp = name; *cp; cp++)
- dots += (*cp == '.');
- trailing_dot = 0;
- if (cp > name && *--cp == '.')
- trailing_dot++;
-
- /*
- * if there aren't any dots, it could be a user-level alias
- */
- if (!dots && (cp = __hostalias(name)) != NULL)
- return (res_queryN(cp, target));
-
- /*
- * If there are dots in the name already, let's just give it a try
- * 'as is'. The threshold can be set with the "ndots" option.
- */
- saved_herrno = -1;
- if (dots >= _res.ndots) {
- ret = res_querydomainN(name, NULL, target);
- if (ret > 0)
- return (ret);
- saved_herrno = h_errno;
- tried_as_is++;
- }
-
- /*
- * We do at least one level of search if
- * - there is no dot and RES_DEFNAME is set, or
- * - there is at least one dot, there is no trailing dot,
- * and RES_DNSRCH is set.
- */
- if ((!dots && (_res.options & RES_DEFNAMES)) ||
- (dots && !trailing_dot && (_res.options & RES_DNSRCH))) {
- int done = 0;
-
- for (domain = (const char * const *)_res.dnsrch;
- *domain && !done;
- domain++) {
-
- ret = res_querydomainN(name, *domain, target);
- if (ret > 0)
- return (ret);
-
- /*
- * If no server present, give up.
- * If name isn't found in this domain,
- * keep trying higher domains in the search list
- * (if that's enabled).
- * On a NO_DATA error, keep trying, otherwise
- * a wildcard entry of another type could keep us
- * from finding this entry higher in the domain.
- * If we get some other error (negative answer or
- * server failure), then stop searching up,
- * but try the input name below in case it's
- * fully-qualified.
- */
- if (errno == ECONNREFUSED) {
- h_errno = TRY_AGAIN;
- return (-1);
- }
-
- switch (h_errno) {
- case NO_DATA:
- got_nodata++;
- /* FALLTHROUGH */
- case HOST_NOT_FOUND:
- /* keep trying */
- break;
- case TRY_AGAIN:
- if (hp->rcode == SERVFAIL) {
- /* try next search element, if any */
- got_servfail++;
- break;
- }
- /* FALLTHROUGH */
- default:
- /* anything else implies that we're done */
- done++;
- }
- /*
- * if we got here for some reason other than DNSRCH,
- * we only wanted one iteration of the loop, so stop.
- */
- if (!(_res.options & RES_DNSRCH))
- done++;
- }
- }
-
- /*
- * if we have not already tried the name "as is", do that now.
- * note that we do this regardless of how many dots were in the
- * name or whether it ends with a dot.
- */
- if (!tried_as_is && (dots || !(_res.options & RES_NOTLDQUERY))) {
- ret = res_querydomainN(name, NULL, target);
- if (ret > 0)
- return (ret);
- }
-
- /*
- * if we got here, we didn't satisfy the search.
- * if we did an initial full query, return that query's h_errno
- * (note that we wouldn't be here if that query had succeeded).
- * else if we ever got a nodata, send that back as the reason.
- * else send back meaningless h_errno, that being the one from
- * the last DNSRCH we did.
- */
- if (saved_herrno != -1)
- h_errno = saved_herrno;
- else if (got_nodata)
- h_errno = NO_DATA;
- else if (got_servfail)
- h_errno = TRY_AGAIN;
- return (-1);
-}
-
-/*
- * Perform a call on res_query on the concatenation of name and domain,
- * removing a trailing dot from name if domain is NULL.
- */
-static int
-res_querydomainN(name, domain, target)
- const char *name, *domain;
- struct res_target *target;
-{
- char nbuf[MAXDNAME];
- const char *longname = nbuf;
- size_t n, d;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_querydomain(%s, %s)\n",
- name, domain?domain:"<Nil>");
-#endif
- if (domain == NULL) {
- /*
- * Check for trailing '.';
- * copy without '.' if present.
- */
- n = strlen(name);
- if (n >= MAXDNAME) {
- h_errno = NO_RECOVERY;
- return (-1);
- }
- if (n > 0 && name[--n] == '.') {
- strncpy(nbuf, name, n);
- nbuf[n] = '\0';
- } else
- longname = name;
- } else {
- n = strlen(name);
- d = strlen(domain);
- if (n + d + 1 >= MAXDNAME) {
- h_errno = NO_RECOVERY;
- return (-1);
- }
- sprintf(nbuf, "%s.%s", name, domain);
- }
- return (res_queryN(longname, target));
-}
diff --git a/newlib/libc/sys/linux/net/gethostbydns.c b/newlib/libc/sys/linux/net/gethostbydns.c
deleted file mode 100644
index 9c80539f2..000000000
--- a/newlib/libc/sys/linux/net/gethostbydns.c
+++ /dev/null
@@ -1,815 +0,0 @@
-/*
- * ++Copyright++ 1985, 1988, 1993
- * -
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-static char fromrcsid[] = "From: Id: gethnamaddr.c,v 8.23 1998/04/07 04:59:46 vixie Exp $";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-
-#include <sys/types.h>
-#include <stdlib.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <ctype.h>
-#include <errno.h>
-#include <syslog.h>
-#include <stdarg.h>
-#include <nsswitch.h>
-
-#include "res_config.h"
-
-#define SPRINTF(x) ((size_t)sprintf x)
-
-static const char AskedForGot[] =
- "gethostby*.gethostanswer: asked for \"%s\", got \"%s\"";
-
-#ifdef RESOLVSORT
-static void addrsort(char **, int);
-#endif
-
-u_int32_t _getlong(const u_char *src);
-u_int16_t _getshort(const u_char *src);
-
-#ifdef DEBUG
-static void dbgprintf(char *, int);
-#endif
-
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
-
-typedef union {
- HEADER hdr;
- u_char buf[MAXPACKET];
-} querybuf;
-
-typedef union {
- int32_t al;
- char ac;
-} align;
-
-extern int h_errno;
-int _dns_ttl_;
-
-#ifdef DEBUG
-static void
-dbgprintf(msg, num)
- char *msg;
- int num;
-{
- if (_res.options & RES_DEBUG) {
- int save = errno;
-
- printf(msg, num);
- errno = save;
- }
-}
-#else
-# define dbgprintf(msg, num) /*nada*/
-#endif
-
-#define BOUNDED_INCR(x) \
- do { \
- cp += x; \
- if (cp > eom) { \
- *herr = NO_RECOVERY; \
- return (NULL); \
- } \
- } while (0)
-
-#define BOUNDS_CHECK(ptr, count) \
- do { \
- if ((ptr) + (count) > eom) { \
- *herr = NO_RECOVERY; \
- return (NULL); \
- } \
- } while (0)
-
-static struct hostent *
-gethostanswer(answer, anslen, qname, qtype, host, hostbuf, hostbuflen, herr)
- const querybuf *answer;
- int anslen;
- const char *qname;
- int qtype;
- struct hostent *host;
- char *hostbuf;
- int hostbuflen;
- int *herr;
-{
- const HEADER *hp;
- const u_char *cp;
- int n;
- const u_char *eom, *erdata;
- char *bp, **ap, **hap;
- int type, class, buflen, ancount, qdcount;
- int haveanswer, had_error;
- int toobig = 0;
- char tbuf[MAXDNAME];
- const char *tname;
- int (*name_ok)(const char *);
-
- tname = qname;
- host->h_name = NULL;
- eom = answer->buf + anslen;
- switch (qtype) {
- case T_A:
- case T_AAAA:
- name_ok = res_hnok;
- break;
- case T_PTR:
- name_ok = res_dnok;
- break;
- default:
- *herr = NO_RECOVERY;
- return (NULL); /* XXX should be abort(); */
- }
- /*
- * find first satisfactory answer
- */
- hp = &answer->hdr;
- ancount = ntohs(hp->ancount);
- qdcount = ntohs(hp->qdcount);
- bp = hostbuf;
- buflen = hostbuflen;
- cp = answer->buf;
- BOUNDED_INCR(HFIXEDSZ);
- if (qdcount != 1) {
- *herr = NO_RECOVERY;
- return (NULL);
- }
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !(*name_ok)(bp)) {
- *herr = NO_RECOVERY;
- return (NULL);
- }
- BOUNDED_INCR(n + QFIXEDSZ);
- if (qtype == T_A || qtype == T_AAAA) {
- /* res_send() has already verified that the query name is the
- * same as the one we sent; this just gets the expanded name
- * (i.e., with the succeeding search-domain tacked on).
- */
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- *herr = NO_RECOVERY;
- return (NULL);
- }
- host->h_name = bp;
- bp += n;
- buflen -= n;
- /* The qname can be abbreviated, but h_name is now absolute. */
- qname = host->h_name;
- }
- ap = host->__host_aliases;
- *ap = NULL;
- host->h_aliases = host->__host_aliases;
- hap = host->__host_addrs;
- *hap = NULL;
- host->h_addr_list = host->__host_addrs;
- haveanswer = 0;
- had_error = 0;
- _dns_ttl_ = -1;
- while (ancount-- > 0 && cp < eom && !had_error) {
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !(*name_ok)(bp)) {
- had_error++;
- continue;
- }
- cp += n; /* name */
- BOUNDS_CHECK(cp, 3 * INT16SZ + INT32SZ);
- type = _getshort(cp);
- cp += INT16SZ; /* type */
- class = _getshort(cp);
- cp += INT16SZ; /* class */
- if (qtype == T_A && type == T_A)
- _dns_ttl_ = _getlong(cp);
- cp += INT32SZ; /* TTL */
- n = _getshort(cp);
- cp += INT16SZ; /* len */
- BOUNDS_CHECK(cp, n);
- erdata = cp + n;
- if (class != C_IN) {
- /* XXX - debug? syslog? */
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- if ((qtype == T_A || qtype == T_AAAA) && type == T_CNAME) {
- if (ap >= &host->__host_aliases[MAXALIASES-1])
- continue;
- n = dn_expand(answer->buf, eom, cp, tbuf, sizeof tbuf);
- if ((n < 0) || !(*name_ok)(tbuf)) {
- had_error++;
- continue;
- }
- cp += n;
- if (cp != erdata) {
- *herr = NO_RECOVERY;
- return (NULL);
- }
- /* Store alias. */
- *ap++ = bp;
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- had_error++;
- continue;
- }
- bp += n;
- buflen -= n;
- /* Get canonical name. */
- n = strlen(tbuf) + 1; /* for the \0 */
- if (n > buflen || n >= MAXHOSTNAMELEN) {
- had_error++;
- continue;
- }
- strcpy(bp, tbuf);
- host->h_name = bp;
- bp += n;
- buflen -= n;
- continue;
- }
- if (qtype == T_PTR && type == T_CNAME) {
- n = dn_expand(answer->buf, eom, cp, tbuf, sizeof tbuf);
- if (n < 0 || !res_dnok(tbuf)) {
- had_error++;
- continue;
- }
- cp += n;
- if (cp != erdata) {
- *herr = NO_RECOVERY;
- return (NULL);
- }
- /* Get canonical name. */
- n = strlen(tbuf) + 1; /* for the \0 */
- if (n > buflen || n >= MAXHOSTNAMELEN) {
- had_error++;
- continue;
- }
- strcpy(bp, tbuf);
- tname = bp;
- bp += n;
- buflen -= n;
- continue;
- }
- if (type != qtype) {
- if (type != T_SIG)
- syslog(LOG_NOTICE|LOG_AUTH,
- "gethostby*.gethostanswer: asked for \"%s %s %s\", got type \"%s\"",
- qname, p_class(C_IN), p_type(qtype),
- p_type(type));
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- switch (type) {
- case T_PTR:
- if (strcasecmp(tname, bp) != 0) {
- syslog(LOG_NOTICE|LOG_AUTH,
- AskedForGot, qname, bp);
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !res_hnok(bp)) {
- had_error++;
- break;
- }
-#if MULTI_PTRS_ARE_ALIASES
- cp += n;
- if (cp != erdata) {
- *herr = NO_RECOVERY;
- return (NULL);
- }
- if (!haveanswer)
- host->h_name = bp;
- else if (ap < &host->__host_aliases[MAXALIASES-1])
- *ap++ = bp;
- else
- n = -1;
- if (n != -1) {
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- had_error++;
- break;
- }
- bp += n;
- buflen -= n;
- }
- break;
-#else
- host->h_name = bp;
- if (_res.options & RES_USE_INET6) {
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- had_error++;
- break;
- }
- bp += n;
- buflen -= n;
- _map_v4v6_hostent(host, &bp, &buflen);
- }
- *herr = NETDB_SUCCESS;
- return host;
-#endif
- case T_A:
- case T_AAAA:
- if (strcasecmp(host->h_name, bp) != 0) {
- syslog(LOG_NOTICE|LOG_AUTH,
- AskedForGot, host->h_name, bp);
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- if (n != host->h_length) {
- cp += n;
- continue;
- }
- if (!haveanswer) {
- int nn;
-
- host->h_name = bp;
- nn = strlen(bp) + 1; /* for the \0 */
- bp += nn;
- buflen -= nn;
- }
-
- bp += sizeof(align) - ((u_long)bp % sizeof(align));
-
- if (bp + n >= &hostbuf[hostbuflen]) {
- dbgprintf("size (%d) too big\n", n);
- had_error++;
- continue;
- }
- if (hap >= &host->__host_addrs[MAXADDRS-1]) {
- if (!toobig++)
- dbgprintf("Too many addresses (%d)\n",
- MAXADDRS);
- cp += n;
- continue;
- }
- bcopy(cp, *hap++ = bp, n);
- bp += n;
- buflen -= n;
- cp += n;
- if (cp != erdata) {
- *herr = NO_RECOVERY;
- return (NULL);
- }
- break;
- default:
- dbgprintf("Impossible condition (type=%d)\n", type);
- *herr = NO_RECOVERY;
- return (NULL);
- /* BIND has abort() here, too risky on bad data */
- }
- if (!had_error)
- haveanswer++;
- }
- if (haveanswer) {
- *ap = NULL;
- *hap = NULL;
-# if defined(RESOLVSORT)
- /*
- * Note: we sort even if host can take only one address
- * in its return structures - should give it the "best"
- * address in that case, not some random one
- */
- if (_res.nsort && haveanswer > 1 && qtype == T_A)
- addrsort(host->__host_addrs, haveanswer);
-# endif /*RESOLVSORT*/
- if (!host->h_name) {
- n = strlen(qname) + 1; /* for the \0 */
- if (n > buflen || n >= MAXHOSTNAMELEN)
- goto no_recovery;
- strcpy(bp, qname);
- host->h_name = bp;
- bp += n;
- buflen -= n;
- }
- if (_res.options & RES_USE_INET6)
- _map_v4v6_hostent(host, &bp, &buflen);
- *herr = NETDB_SUCCESS;
- return host;
- }
- no_recovery:
- *herr = NO_RECOVERY;
- return (NULL);
-}
-
-struct hostent *
-__dns_getanswer(answer, anslen, qname, qtype, host, hostbuf, hostbuflen, herr)
- const char *answer;
- int anslen;
- const char *qname;
- int qtype;
- struct hostent *host;
- char *hostbuf;
- int hostbuflen;
- int *herr;
-{
- switch(qtype) {
- case T_AAAA:
- host->h_addrtype = AF_INET6;
- host->h_length = IN6ADDRSZ;
- break;
- case T_A:
- default:
- host->h_addrtype = AF_INET;
- host->h_length = INADDRSZ;
- break;
- }
-
- return(gethostanswer((const querybuf *)answer, anslen, qname, qtype, host, hostbuf, hostbuflen, herr));
-}
-
-int
-_dns_gethostbyname(void *rval, void *cb_data, va_list ap)
-{
- const char *name;
- int af;
- querybuf buf;
- const char *cp;
- char *bp;
- int n, size, type, len;
- struct hostent *resultbuf;
- char *hostbuf;
- int buflen;
- int *herr;
-
- name = va_arg(ap, const char *);
- af = va_arg(ap, int);
- resultbuf = va_arg(ap, struct hostent *);
- hostbuf = va_arg(ap, char *);
- buflen = va_arg(ap, int);
- herr = va_arg(ap, int *);
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- *herr = NETDB_INTERNAL;
- return NS_UNAVAIL;
- }
-
- switch (af) {
- case AF_INET:
- size = INADDRSZ;
- type = T_A;
- break;
- case AF_INET6:
- size = IN6ADDRSZ;
- type = T_AAAA;
- break;
- default:
- *herr = NETDB_INTERNAL;
- errno = EAFNOSUPPORT;
- return NS_UNAVAIL;
- }
-
- resultbuf->h_addrtype = af;
- resultbuf->h_length = size;
-
- /*
- * if there aren't any dots, it could be a user-level alias.
- * this is also done in res_query() since we are not the only
- * function that looks up host names.
- */
- if (!strchr(name, '.') && (cp = __hostalias(name)))
- name = cp;
-
- /*
- * disallow names consisting only of digits/dots, unless
- * they end in a dot.
- */
- if (isdigit((unsigned char)name[0]))
- for (cp = name;; ++cp) {
- if (!*cp) {
- if (*--cp == '.')
- break;
- /*
- * All-numeric, no dot at the end.
- * Fake up a hostent as if we'd actually
- * done a lookup.
- */
- if (inet_pton(af, name, resultbuf->__host_addr) <= 0) {
- *herr = HOST_NOT_FOUND;
- return NS_NOTFOUND;
- }
- strncpy(hostbuf, name, MAXDNAME);
- hostbuf[MAXDNAME] = '\0';
- bp = hostbuf + MAXDNAME;
- len = buflen - MAXDNAME;
- resultbuf->h_name = hostbuf;
- resultbuf->h_aliases = resultbuf->__host_aliases;
- resultbuf->__host_aliases[0] = NULL;
- resultbuf->__host_addrs[0] = (char *)resultbuf->__host_addr;
- resultbuf->__host_addrs[1] = NULL;
- resultbuf->h_addr_list = resultbuf->__host_addrs;
- if (_res.options & RES_USE_INET6)
- _map_v4v6_hostent(resultbuf, &bp, &len);
- *herr = NETDB_SUCCESS;
- *(struct hostent **)rval = resultbuf;
- return NS_SUCCESS;
- }
- if (!isdigit((unsigned char)*cp) && *cp != '.')
- break;
- }
- if ((isxdigit((unsigned char)name[0]) && strchr(name, ':') != NULL) ||
- name[0] == ':')
- for (cp = name;; ++cp) {
- if (!*cp) {
- if (*--cp == '.')
- break;
- /*
- * All-IPv6-legal, no dot at the end.
- * Fake up a hostent as if we'd actually
- * done a lookup.
- */
- if (inet_pton(af, name, resultbuf->__host_addr) <= 0) {
- *herr = HOST_NOT_FOUND;
- return NS_NOTFOUND;
- }
- strncpy(hostbuf, name, MAXDNAME);
- hostbuf[MAXDNAME] = '\0';
- bp = hostbuf + MAXDNAME;
- len = buflen - MAXDNAME;
- resultbuf->h_name = hostbuf;
- resultbuf->h_aliases = resultbuf->__host_aliases;
- resultbuf->__host_aliases[0] = NULL;
- resultbuf->__host_addrs[0] = (char *)resultbuf->__host_addr;
- resultbuf->__host_addrs[1] = NULL;
- resultbuf->h_addr_list = resultbuf->__host_addrs;
- *herr = NETDB_SUCCESS;
- *(struct hostent **)rval = resultbuf;
- return NS_SUCCESS;
- }
- if (!isxdigit((unsigned char)*cp) && *cp != ':' && *cp != '.')
- break;
- }
-
- if ((n = res_search(name, C_IN, type, buf.buf, sizeof(buf))) < 0) {
- dbgprintf("res_search failed (%d)\n", n);
- return NS_UNAVAIL;
- }
- *(struct hostent **)rval = gethostanswer(&buf, n, name, type, resultbuf, hostbuf, buflen, herr);
- return (*(struct hostent **)rval != NULL) ? NS_SUCCESS : NS_NOTFOUND;
-}
-
-int
-_dns_gethostbyaddr(void *rval, void *cb_data, va_list ap)
-{
- const char *addr; /* XXX should have been def'd as u_char! */
- int len, af;
- const u_char *uaddr;
- static const u_char mapped[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0xff,0xff };
- static const u_char tunnelled[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0,0 };
- int n, size;
- querybuf buf;
- struct hostent *hp;
- char qbuf[MAXDNAME+1], *qp;
-#ifdef SUNSECURITY
- struct hostent *rhp;
- char **haddr;
- u_long old_options;
- char hname2[MAXDNAME+1];
-#endif /*SUNSECURITY*/
- struct hostent *resultbuf;
- char *hostbuf;
- int buflen;
- int *herr;
-
- addr = va_arg(ap, const char *);
- uaddr = (const u_char *)addr;
- len = va_arg(ap, int);
- af = va_arg(ap, int);
- resultbuf = va_arg(ap, struct hostent *);
- hostbuf = va_arg(ap, char *);
- buflen = va_arg(ap, int);
- herr = va_arg(ap, int *);
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- *herr = NETDB_INTERNAL;
- return NS_UNAVAIL;
- }
- if (af == AF_INET6 && len == IN6ADDRSZ &&
- (!memcmp(uaddr, mapped, sizeof mapped) ||
- !memcmp(uaddr, tunnelled, sizeof tunnelled))) {
- /* Unmap. */
- addr += sizeof mapped;
- uaddr += sizeof mapped;
- af = AF_INET;
- len = INADDRSZ;
- }
- switch (af) {
- case AF_INET:
- size = INADDRSZ;
- break;
- case AF_INET6:
- size = IN6ADDRSZ;
- break;
- default:
- errno = EAFNOSUPPORT;
- *herr = NETDB_INTERNAL;
- return NS_UNAVAIL;
- }
- if (size != len) {
- errno = EINVAL;
- *herr = NETDB_INTERNAL;
- return NS_UNAVAIL;
- }
- switch (af) {
- case AF_INET:
- (void) sprintf(qbuf, "%u.%u.%u.%u.in-addr.arpa",
- (uaddr[3] & 0xff),
- (uaddr[2] & 0xff),
- (uaddr[1] & 0xff),
- (uaddr[0] & 0xff));
- break;
- case AF_INET6:
- qp = qbuf;
- for (n = IN6ADDRSZ - 1; n >= 0; n--) {
- qp += SPRINTF((qp, "%x.%x.",
- uaddr[n] & 0xf,
- (uaddr[n] >> 4) & 0xf));
- }
- strcpy(qp, "ip6.int");
- break;
- default:
- abort();
- }
- n = res_query(qbuf, C_IN, T_PTR, (u_char *)buf.buf, sizeof buf.buf);
- if (n < 0) {
- dbgprintf("res_query failed (%d)\n", n);
- return NS_UNAVAIL;
- }
- if (n > sizeof buf.buf) {
- dbgprintf("static buffer is too small (%d)\n", n);
- return NS_UNAVAIL;
- }
- if (!(hp = gethostanswer(&buf, n, qbuf, T_PTR, resultbuf, hostbuf, buflen, herr)))
- return NS_NOTFOUND; /* *herr was set by gethostanswer() */
-#ifdef SUNSECURITY
- if (af == AF_INET) {
- /*
- * turn off search as the name should be absolute,
- * 'localhost' should be matched by defnames
- */
- strncpy(hname2, hp->h_name, MAXDNAME);
- hname2[MAXDNAME] = '\0';
- old_options = _res.options;
- _res.options &= ~RES_DNSRCH;
- _res.options |= RES_DEFNAMES;
- if (!(rhp = gethostbyname(hname2))) {
- syslog(LOG_NOTICE|LOG_AUTH,
- "gethostbyaddr: No A record for %s (verifying [%s])",
- hname2, inet_ntoa(*((struct in_addr *)addr)));
- _res.options = old_options;
- *herr = HOST_NOT_FOUND;
- return NS_NOTFOUND;
- }
- _res.options = old_options;
- for (haddr = rhp->h_addr_list; *haddr; haddr++)
- if (!memcmp(*haddr, addr, INADDRSZ))
- break;
- if (!*haddr) {
- syslog(LOG_NOTICE|LOG_AUTH,
- "gethostbyaddr: A record of %s != PTR record [%s]",
- hname2, inet_ntoa(*((struct in_addr *)addr)));
- *herr = HOST_NOT_FOUND;
- return NS_NOTFOUND;
- }
- }
-#endif /*SUNSECURITY*/
- hp->h_addrtype = af;
- hp->h_length = len;
- bcopy(addr, resultbuf->__host_addr, len);
- resultbuf->__host_addrs[0] = (char *)resultbuf->__host_addr;
- resultbuf->__host_addrs[1] = NULL;
- if (af == AF_INET && (_res.options & RES_USE_INET6)) {
- _map_v4v6_address((char*)resultbuf->__host_addr, (char*)resultbuf->__host_addr);
- hp->h_addrtype = AF_INET6;
- hp->h_length = IN6ADDRSZ;
- }
- *herr = NETDB_SUCCESS;
- *(struct hostent **)rval = hp;
- return (hp != NULL) ? NS_SUCCESS : NS_NOTFOUND;
-}
-
-#ifdef RESOLVSORT
-static void
-addrsort(ap, num)
- char **ap;
- int num;
-{
- int i, j;
- char **p;
- short aval[MAXADDRS];
- int needsort = 0;
-
- p = ap;
- for (i = 0; i < num; i++, p++) {
- for (j = 0 ; (unsigned)j < _res.nsort; j++)
- if (_res.sort_list[j].addr.s_addr ==
- (((struct in_addr *)(*p))->s_addr & _res.sort_list[j].mask))
- break;
- aval[i] = j;
- if (needsort == 0 && i > 0 && j < aval[i-1])
- needsort = i;
- }
- if (!needsort)
- return;
-
- while (needsort < num) {
- for (j = needsort - 1; j >= 0; j--) {
- if (aval[j] > aval[j+1]) {
- char *hp;
-
- i = aval[j];
- aval[j] = aval[j+1];
- aval[j+1] = i;
-
- hp = ap[j];
- ap[j] = ap[j+1];
- ap[j+1] = hp;
-
- } else
- break;
- }
- needsort++;
- }
-}
-#endif
-void
-_sethostdnsent(stayopen)
- int stayopen;
-{
- if ((_res.options & RES_INIT) == 0 && res_init() == -1)
- return;
- if (stayopen)
- _res.options |= RES_STAYOPEN | RES_USEVC;
-}
-
-void
-_endhostdnsent()
-{
- _res.options &= ~(RES_STAYOPEN | RES_USEVC);
- res_close();
-}
diff --git a/newlib/libc/sys/linux/net/gethostbyht.c b/newlib/libc/sys/linux/net/gethostbyht.c
deleted file mode 100644
index 4a15293dd..000000000
--- a/newlib/libc/sys/linux/net/gethostbyht.c
+++ /dev/null
@@ -1,285 +0,0 @@
-/*-
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <stdarg.h>
-#include <nsswitch.h>
-#include <arpa/nameser.h> /* XXX */
-#include <resolv.h> /* XXX */
-#include <dirent.h>
-#include <stdlib.h>
-#include <errno.h>
-
-static FILE *hostf = NULL;
-static int stayopen = 0;
-__LOCK_INIT(static, host_lock);
-
-void
-_sethosthtent_r(int f, FILE **hostfile, int *hstayopen)
-{
- if (!*hostfile)
- *hostfile = fopen(_PATH_HOSTS, "r" );
- else
- rewind(*hostfile);
- *hstayopen = f;
-}
-
-void
-_endhosthtent_r(FILE **hostfile, int *hstayopen)
-{
- if (*hostfile && !*hstayopen) {
- (void) fclose(*hostfile);
- *hostfile = NULL;
- }
-}
-
-void
-_sethosthtent(f)
- int f;
-{
- _sethosthtent_r(f, &hostf, &stayopen);
-}
-
-void
-_endhosthtent()
-{
- _endhosthtent_r(&hostf, &stayopen);
-}
-
-struct hostent *
-gethostent()
-{
- static struct hostent hp;
- static char buffer[BUFSIZ+1];
- static int len = BUFSIZ;
- static int herr;
-
-#ifdef HAVE_DD_LOCK
- __lock_acquire(host_lock);
-#endif
- gethostent_r(&hp, buffer, len, &herr, &hostf);
-#ifdef HAVE_DD_LOCK
- __lock_release(host_lock);
-#endif
- return &hp;
-}
-
-int
-gethostent_r(struct hostent *hp, char *buffer, int buflen, int *herr, FILE **hostfile)
-{
- char *p;
- char *cp, **q;
- int af, len;
-
- if (!*hostfile && !(*hostfile = fopen(_PATH_HOSTS, "r" ))) {
- *herr = NETDB_INTERNAL;
- return -1;
- }
- again:
- if (!(p = fgets(buffer, buflen, *hostfile))) {
- *herr = HOST_NOT_FOUND;
- return -1;
- }
- if (*p == '#')
- goto again;
- if (!(cp = strpbrk(p, "#\n")))
- goto again;
- *cp = '\0';
- if (!(cp = strpbrk(p, " \t")))
- goto again;
- *cp++ = '\0';
-
- hp->h_addr_list = hp->__host_addrs;
- hp->__host_addrs[0] = (char *)hp->__host_addr;
-
- if (inet_pton(AF_INET6, p, hp->h_addr_list[0]) > 0) {
- af = AF_INET6;
- len = IN6ADDRSZ;
- } else if (inet_pton(AF_INET, p, hp->h_addr_list[0]) > 0) {
- if (_res.options & RES_USE_INET6) {
- _map_v4v6_address(hp->h_addr_list[0], hp->h_addr_list[0]);
- af = AF_INET6;
- len = IN6ADDRSZ;
- } else {
- af = AF_INET;
- len = INADDRSZ;
- }
- } else {
- goto again;
- }
-
-
- hp->h_addr_list[1] = NULL;
- hp->h_addr = hp->__host_addrs[0];
- hp->h_length = len;
- hp->h_addrtype = af;
-
- while (*cp == ' ' || *cp == '\t')
- cp++;
- hp->h_name = cp;
- q = hp->h_aliases = hp->__host_aliases;
- if ((cp = strpbrk(cp, " \t")) != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &hp->h_aliases[MAXALIASES - 1])
- *q++ = cp;
- if ((cp = strpbrk(cp, " \t")) != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
-
- *herr = NETDB_SUCCESS;
- return 0;
-}
-
-int
-_ht_gethostbyname(void *rval, void *cb_data, va_list ap)
-{
- char **cp;
- const char *name;
- int af;
- struct hostent *resultbuf;
- char *buf;
- int buflen;
- int *herr;
- FILE *hostfile = NULL;
- int stayopen;
- int p;
-
- name = va_arg(ap, const char *);
- af = va_arg(ap, int);
- resultbuf = va_arg(ap, struct hostent *);
- buf = va_arg(ap, char *);
- buflen = va_arg(ap, int);
- herr = va_arg(ap, int *);
-
- sethostent_r(0, &hostfile, &stayopen);
- while ((p = gethostent_r(resultbuf, buf, buflen, herr, &hostfile)) != -1) {
- if (resultbuf->h_addrtype != af)
- continue;
- if (strcasecmp(resultbuf->h_name, name) == 0)
- break;
- for (cp = resultbuf->h_aliases; *cp != 0; cp++)
- if (strcasecmp(*cp, name) == 0)
- goto found;
- }
-found:
- endhostent_r(&hostfile, &stayopen);
-
- if (p == -1)
- {
- *(struct hostent **)rval = NULL;
- return NS_NOTFOUND;
- }
- else
- {
- *(struct hostent **)rval = resultbuf;
- return NS_SUCCESS;
- }
-}
-
-int
-_ht_gethostbyaddr(void *rval, void *cb_data, va_list ap)
-{
- const char *addr;
- int len, af;
- struct hostent *resultbuf;
- char *buf;
- int buflen;
- int *herr;
- FILE *hostfile = NULL;
- int stayopen;
- int p;
-
- addr = va_arg(ap, const char *);
- len = va_arg(ap, int);
- af = va_arg(ap, int);
- resultbuf = va_arg(ap, struct hostent *);
- buf = va_arg(ap, char *);
- buflen = va_arg(ap, int);
- herr = va_arg(ap, int *);
-
- sethostent_r(0, &hostfile, &stayopen);
- while ((p = gethostent_r(resultbuf, buf, buflen, herr, &hostfile)) != -1)
- if (resultbuf->h_addrtype == af && !memcmp(resultbuf->h_addr, addr, len))
- break;
- endhostent_r(&hostfile, &stayopen);
-
- if (p == -1)
- {
- *(struct hostent **)rval = NULL;
- return NS_NOTFOUND;
- }
- else
- {
- *(struct hostent **)rval = resultbuf;
- return NS_SUCCESS;
- }
-}
diff --git a/newlib/libc/sys/linux/net/gethostbyname.3 b/newlib/libc/sys/linux/net/gethostbyname.3
deleted file mode 100644
index 51ed2f864..000000000
--- a/newlib/libc/sys/linux/net/gethostbyname.3
+++ /dev/null
@@ -1,380 +0,0 @@
-.\" Copyright (c) 1983, 1987, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95
-.\" $FreeBSD: src/lib/libc/net/gethostbyname.3,v 1.26 2002/01/14 16:59:00 ru Exp $
-.\"
-.Dd May 25, 1995
-.Dt GETHOSTBYNAME 3
-.Os
-.Sh NAME
-.Nm gethostbyname ,
-.Nm gethostbyname2 ,
-.Nm gethostbyaddr ,
-.Nm gethostent ,
-.Nm sethostent ,
-.Nm endhostent ,
-.Nm herror ,
-.Nm hstrerror
-.Nd get network host entry
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In netdb.h
-.Vt extern int h_errno ;
-.Ft struct hostent *
-.Fn gethostbyname "const char *name"
-.Ft struct hostent *
-.Fn gethostbyname2 "const char *name" "int af"
-.Ft struct hostent *
-.Fn gethostbyaddr "const char *addr" "int len" "int type"
-.Ft struct hostent *
-.Fn gethostent void
-.Ft void
-.Fn sethostent "int stayopen"
-.Ft void
-.Fn endhostent void
-.Ft void
-.Fn herror "const char *string"
-.Ft const char *
-.Fn hstrerror "int err"
-.Sh DESCRIPTION
-.Bf -symbolic
-The
-.Xr getaddrinfo 3
-and
-.Xr getnameinfo 3
-functions are preferred over the
-.Fn gethostbyname ,
-.Fn gethostbyname2 ,
-and
-.Fn gethostbyaddr
-functions.
-.Ef
-.Pp
-The
-.Fn gethostbyname ,
-.Fn gethostbyname2
-and
-.Fn gethostbyaddr
-functions
-each return a pointer to an object with the
-following structure describing an internet host
-referenced by name or by address, respectively.
-.Pp
-The
-.Fa name
-parameter passed to
-.Fn gethostbyname
-or
-.Fn gethostbyname2
-should point to a
-.Dv NUL Ns -terminated
-hostname.
-The
-.Fa addr
-parameter passed to
-.Fn gethostbyaddr
-should point to an address which is
-.Fa len
-bytes long,
-in binary form
-(i.e. not an IP address in human readable
-.Tn ASCII
-form).
-The
-.Fa type
-parameter specifies the address family
-(e.g.\&
-.Dv AF_INET , AF_INET6 ,
-etc.) of this address.
-.Pp
-The structure returned contains either the information obtained from the name
-server,
-.Xr named 8 ,
-broken-out fields from a line in
-.Pa /etc/hosts ,
-or database entries supplied by the
-.Xr yp 8
-system.
-The order of the lookups is controlled by the
-.Sq hosts
-entry in
-.Xr nsswitch.conf 5 .
-.Bd -literal
-struct hostent {
- char *h_name; /* official name of host */
- char **h_aliases; /* alias list */
- int h_addrtype; /* host address type */
- int h_length; /* length of address */
- char **h_addr_list; /* list of addresses from name server */
-};
-#define h_addr h_addr_list[0] /* address, for backward compatibility */
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width h_addr_list
-.It Va h_name
-Official name of the host.
-.It Va h_aliases
-A
-.Dv NULL Ns -terminated
-array of alternate names for the host.
-.It Va h_addrtype
-The type of address being returned; usually
-.Dv AF_INET .
-.It Va h_length
-The length, in bytes, of the address.
-.It Va h_addr_list
-A
-.Dv NULL Ns -terminated
-array of network addresses for the host.
-Host addresses are returned in network byte order.
-.It Va h_addr
-The first address in
-.Va h_addr_list ;
-this is for backward compatibility.
-.El
-.Pp
-When using the nameserver,
-.Fn gethostbyname
-and
-.Fn gethostbyname2
-will search for the named host in the current domain and its parents
-unless the name ends in a dot.
-If the name contains no dot, and if the environment variable
-.Dq Ev HOSTALIASES
-contains the name of an alias file, the alias file will first be searched
-for an alias matching the input name.
-See
-.Xr hostname 7
-for the domain search procedure and the alias file format.
-.Pp
-The
-.Fn gethostbyname2
-function is an evolution of
-.Fn gethostbyname
-which is intended to allow lookups in address families other than
-.Dv AF_INET ,
-for example
-.Dv AF_INET6 .
-.Pp
-The
-.Fn sethostent
-function
-may be used to request the use of a connected
-.Tn TCP
-socket for queries.
-If the
-.Fa stayopen
-flag is non-zero,
-this sets the option to send all queries to the name server using
-.Tn TCP
-and to retain the connection after each call to
-.Fn gethostbyname ,
-.Fn gethostbyname2
-or
-.Fn gethostbyaddr .
-Otherwise, queries are performed using
-.Tn UDP
-datagrams.
-.Pp
-The
-.Fn endhostent
-function
-closes the
-.Tn TCP
-connection.
-.Pp
-The
-.Fn herror
-function writes a message to the diagnostic output consisting of the
-string parameter
-.Fa s ,
-the constant string
-.Qq Li ":\ " ,
-and a message corresponding to the value of
-.Va h_errno .
-.Pp
-The
-.Fn hstrerror
-function returns a string which is the message text corresponding to the
-value of the
-.Fa err
-parameter.
-.Sh FILES
-.Bl -tag -width /etc/nsswitch.conf -compact
-.It Pa /etc/hosts
-.It Pa /etc/nsswitch.conf
-.It Pa /etc/resolv.conf
-.El
-.Sh EXAMPLES
-Print out the hostname associated with a specific IP address:
-.Bd -literal -offset indent
-const char *ipstr = "127.0.0.1";
-struct in_addr ip;
-struct hostent *hp;
-
-if (!inet_aton(ipstr, &ip))
- errx(1, "can't parse IP address %s", ipstr);
-
-if ((hp = gethostbyaddr((const char *)&ip,
- sizeof ip, AF_INET)) == NULL)
- errx(1, "no name associated with %s", ipstr);
-
-printf("name associated with %s is %s\en", ipstr, hp->h_name);
-.Ed
-.Sh DIAGNOSTICS
-Error return status from
-.Fn gethostbyname ,
-.Fn gethostbyname2
-and
-.Fn gethostbyaddr
-is indicated by return of a
-.Dv NULL
-pointer.
-The external integer
-.Va h_errno
-may then be checked to see whether this is a temporary failure
-or an invalid or unknown host.
-The routine
-.Fn herror
-can be used to print an error message describing the failure.
-If its argument
-.Fa string
-is
-.Pf non- Dv NULL ,
-it is printed, followed by a colon and a space.
-The error message is printed with a trailing newline.
-.Pp
-The variable
-.Va h_errno
-can have the following values:
-.Bl -tag -width HOST_NOT_FOUND
-.It Dv HOST_NOT_FOUND
-No such host is known.
-.It Dv TRY_AGAIN
-This is usually a temporary error
-and means that the local server did not receive
-a response from an authoritative server.
-A retry at some later time may succeed.
-.It Dv NO_RECOVERY
-Some unexpected server failure was encountered.
-This is a non-recoverable error.
-.It Dv NO_DATA
-The requested name is valid but does not have an IP address;
-this is not a temporary error.
-This means that the name is known to the name server but there is no address
-associated with this name.
-Another type of request to the name server using this domain name
-will result in an answer;
-for example, a mail-forwarder may be registered for this domain.
-.El
-.Sh SEE ALSO
-.Xr getaddrinfo 3 ,
-.Xr getnameinfo 3 ,
-.Xr inet_aton 3 ,
-.Xr resolver 3 ,
-.Xr hosts 5 ,
-.Xr hostname 7 ,
-.Xr named 8
-.Sh CAVEAT
-The
-.Fn gethostent
-function
-is defined, and
-.Fn sethostent
-and
-.Fn endhostent
-are redefined,
-when
-.Xr libc 3
-is built to use only the routines to lookup in
-.Pa /etc/hosts
-and not the name server.
-.Pp
-The
-.Fn gethostent
-function
-reads the next line of
-.Pa /etc/hosts ,
-opening the file if necessary.
-.Pp
-The
-.Fn sethostent
-function
-opens and/or rewinds the file
-.Pa /etc/hosts .
-If the
-.Fa stayopen
-argument is non-zero,
-the file will not be closed after each call to
-.Fn gethostbyname ,
-.Fn gethostbyname2
-or
-.Fn gethostbyaddr .
-.Pp
-The
-.Fn endhostent
-function
-closes the file.
-.Sh HISTORY
-The
-.Fn herror
-function appeared in
-.Bx 4.3 .
-The
-.Fn endhostent ,
-.Fn gethostbyaddr ,
-.Fn gethostbyname ,
-.Fn gethostent ,
-and
-.Fn sethostent
-functions appeared in
-.Bx 4.2 .
-The
-.Fn gethostbyname2
-function first appeared in
-.Tn BIND
-version 4.9.4.
-.Sh BUGS
-These functions use static data storage;
-if the data is needed for future use, it should be
-copied before any subsequent calls overwrite it.
-Only the Internet
-address format is currently understood.
-.Pp
-.Fn gethostbyname2
-cannot perform
-.Dv AF_INET6
-lookups over NIS.
-.Xr getaddrinfo 3
-must be used instead.
diff --git a/newlib/libc/sys/linux/net/gethostbynis.c b/newlib/libc/sys/linux/net/gethostbynis.c
deleted file mode 100644
index 917e9409d..000000000
--- a/newlib/libc/sys/linux/net/gethostbynis.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * 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 CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <sys/types.h>
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <stdarg.h>
-#include <nsswitch.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-#ifdef YP
-static char *host_aliases[MAXALIASES];
-static char hostaddr[MAXADDRS];
-static char *host_addrs[2];
-
-static struct hostent *
-_gethostbynis(name, map, af)
- const char *name;
- char *map;
- int af;
-{
- char *cp, **q;
- char *result;
- int resultlen,size;
- static struct hostent h;
- static char *domain = (char *)NULL;
- static char ypbuf[YPMAXRECORD + 2];
-
- switch(af) {
- case AF_INET:
- size = NS_INADDRSZ;
- break;
- default:
- case AF_INET6:
- size = NS_IN6ADDRSZ;
- errno = EAFNOSUPPORT;
- h_errno = NETDB_INTERNAL;
- return NULL;
- }
-
- if (domain == (char *)NULL)
- if (yp_get_default_domain (&domain)) {
- h_errno = NETDB_INTERNAL;
- return ((struct hostent *)NULL);
- }
-
- if (yp_match(domain, map, name, strlen(name), &result, &resultlen)) {
- h_errno = HOST_NOT_FOUND;
- return ((struct hostent *)NULL);
- }
-
- /* avoid potential memory leak */
- bcopy((char *)result, (char *)&ypbuf, resultlen);
- ypbuf[resultlen] = '\0';
- free(result);
- result = (char *)&ypbuf;
-
- if ((cp = index(result, '\n')))
- *cp = '\0';
-
- cp = strpbrk(result, " \t");
- *cp++ = '\0';
- h.h_addr_list = host_addrs;
- h.h_addr = hostaddr;
- *((u_long *)h.h_addr) = inet_addr(result);
- h.h_length = size;
- h.h_addrtype = AF_INET;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- h.h_name = cp;
- q = h.h_aliases = host_aliases;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &host_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&h);
-}
-
-static struct hostent *
-_gethostbynis_r(name, map, af, hp, buffer, buflen, herr)
- const char *name;
- char *map;
- int af;
- struct hostent *hp;
- char *buffer;
- int buflen;
- int *herr;
-{
- char *cp, **q;
- char *result;
- int resultlen,size;
- char *domain = (char *)NULL;
-
- switch(af) {
- case AF_INET:
- size = NS_INADDRSZ;
- break;
- default:
- case AF_INET6:
- size = NS_IN6ADDRSZ;
- errno = EAFNOSUPPORT;
- *herr = NETDB_INTERNAL;
- return NULL;
- }
-
- if (domain == (char *)NULL)
- if (yp_get_default_domain (&domain)) {
- *herr = NETDB_INTERNAL;
- return ((struct hostent *)NULL);
- }
-
- if (yp_match(domain, map, name, strlen(name), &result, &resultlen)) {
- *herr = HOST_NOT_FOUND;
- return ((struct hostent *)NULL);
- }
-
- /* avoid potential memory leak */
- bcopy((char *)result, buffer, resultlen);
- buffer[resultlen] = '\0';
- free(result);
- result = buffer;
-
- if ((cp = index(result, '\n')))
- *cp = '\0';
-
- cp = strpbrk(result, " \t");
- *cp++ = '\0';
- *((u_long *)hp->__host_addrs[0]) = inet_addr(result);
- hp->__host_addrs[1] = NULL;
- hp->h_addr_list = hp->__host_addrs;
- hp->h_addr = hp->__host_addrs[0];
- hp->h_length = size;
- hp->h_addrtype = AF_INET;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- hp->h_name = cp;
- q = hp->__host_aliases;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &hp->__host_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- hp->h_aliases = hp->__host_aliases;
- *q = NULL;
- return (&hp);
-}
-#endif /* YP */
-
-/* XXX _gethostbynisname/_gethostbynisaddr only used by getaddrinfo */
-struct hostent *
-_gethostbynisname(const char *name, int af)
-{
-#ifdef YP
- return _gethostbynis(name, "hosts.byname", af);
-#else
- return NULL;
-#endif
-}
-
-struct hostent *
-_gethostbynisaddr(const char *addr, int len, int af)
-{
-#ifdef YP
- return _gethostbynis(inet_ntoa(*(struct in_addr *)addr),
- "hosts.byaddr", af);
-#else
- return NULL;
-#endif
-}
-
-
-int
-_nis_gethostbyname(void *rval, void *cb_data, va_list ap)
-{
-#ifdef YP
- const char *name;
- int af;
- struct hostent *resultbuf;
- char *buf;
- int buflen;
- int *herr;
-
- name = va_arg(ap, const char *);
- af = va_arg(ap, int);
- resultbuf = va_arg(ap, struct hostent *);
- buf = va_arg(ap, char *);
- buflen = va_arg(ap, int);
- herr = va_arg(ap, int *);
-
- *(struct hostent **)rval = _gethostbynis_r(name, "hosts.byname", af, resultbuf, buf, buflen, herr);
-
- return (*(struct hostent **)rval != NULL) ? NS_SUCCESS : NS_NOTFOUND;
-#else
- return NS_UNAVAIL;
-#endif
-}
-
-int
-_nis_gethostbyaddr(void *rval, void *cb_data, va_list ap)
-{
-#ifdef YP
- const char *addr;
- int len;
- int af;
- struct hostent *resultbuf;
- char *buf;
- int buflen;
- int *herr;
-
- addr = va_arg(ap, const char *);
- len = va_arg(ap, int);
- af = va_arg(ap, int);
- resultbuf = va_arg(ap, struct hostent *);
- buf = va_arg(ap, char *);
- buflen = va_arg(ap, int);
- herr = va_arg(ap, int *);
-
- *(struct hostent **)rval = _gethostbynis_r(inet_ntoa(*(struct in_addr *)addr),"hosts.byaddr", af);
- return (*(struct hostent **)rval != NULL) ? NS_SUCCESS : NS_NOTFOUND;
-#else
- return NS_UNAVAIL;
-#endif
-}
diff --git a/newlib/libc/sys/linux/net/gethostnamadr.c b/newlib/libc/sys/linux/net/gethostnamadr.c
deleted file mode 100644
index de1efd8ed..000000000
--- a/newlib/libc/sys/linux/net/gethostnamadr.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * 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 CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <sys/types.h>
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <stdarg.h>
-#include <nsswitch.h>
-#include <arpa/nameser.h> /* XXX hack for _res */
-#include <resolv.h> /* XXX hack for _res */
-#include <dirent.h>
-
-extern int _ht_gethostbyname(void *, void *, va_list);
-extern int _dns_gethostbyname(void *, void *, va_list);
-extern int _nis_gethostbyname(void *, void *, va_list);
-extern int _ht_gethostbyaddr(void *, void *, va_list);
-extern int _dns_gethostbyaddr(void *, void *, va_list);
-extern int _nis_gethostbyaddr(void *, void *, va_list);
-
-/* Host lookup order if nsswitch.conf is broken or nonexistant */
-static const ns_src default_src[] = {
- { NSSRC_FILES, NS_SUCCESS },
- { NSSRC_DNS, NS_SUCCESS },
- { 0 }
-};
-
-__LOCK_INIT(static, name_lock);
-__LOCK_INIT(static, addr_lock);
-
-struct hostent *
-gethostbyname(const char *name)
-{
- struct hostent *hp = NULL;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- if (_res.options & RES_USE_INET6) { /* XXX */
- hp = gethostbyname2(name, AF_INET6); /* XXX */
- if (hp) /* XXX */
- return (hp); /* XXX */
- } /* XXX */
- return (gethostbyname2(name, AF_INET));
-}
-
-struct hostent *
-gethostbyname2(const char *name, int type)
-{
- static struct hostent host, *hp;
- static char hostbuf[BUFSIZ];
- static int herr;
- int rval;
-
- static const ns_dtab dtab[] = {
- NS_FILES_CB(_ht_gethostbyname, NULL)
- { NSSRC_DNS, _dns_gethostbyname, NULL },
- NS_NIS_CB(_nis_gethostbyname, NULL) /* force -DHESIOD */
- { 0 }
- };
-
-#ifdef HAVE_DD_LOCK
- __lock_acquire(name_lock);
-#endif
- rval = nsdispatch((void *)&hp, dtab, NSDB_HOSTS, "gethostbyname",
- default_src, name, type, &host, hostbuf, BUFSIZ, &herr);
-
-#ifdef HAVE_DD_LOCK
- __lock_release(name_lock);
-#endif
- if (rval != NS_SUCCESS)
- return NULL;
- else
- return hp;
-}
-
-int
-__gethostbyname_r(const char *name, struct hostent *result,
- void *buffer, int buflen, struct hostent **hp, int *herr)
-{
- int rval;
- int type;
-
- static const ns_dtab dtab[] = {
- NS_FILES_CB(_ht_gethostbyname, NULL)
- { NSSRC_DNS, _dns_gethostbyname, NULL },
- NS_NIS_CB(_nis_gethostbyname, NULL) /* force -DHESIOD */
- { 0 }
- };
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return HOST_NOT_FOUND;
- }
-
- if (_res.options & RES_USE_INET6)
- type = AF_INET6;
- else
- type = AF_INET;
-
- rval = nsdispatch((void *)hp, dtab, NSDB_HOSTS, "gethostbyname",
- default_src, name, type, result, buffer, buflen, herr);
-
- if (rval != NS_SUCCESS)
- return rval;
- else
- return 0;
-}
-
-struct hostent *
-gethostbyaddr(const char *addr, int len, int type)
-{
- static struct hostent host, *hp;
- static char hostbuf[BUFSIZ];
- static int herr;
- int rval;
-
- static const ns_dtab dtab[] = {
- NS_FILES_CB(_ht_gethostbyaddr, NULL)
- { NSSRC_DNS, _dns_gethostbyaddr, NULL },
- NS_NIS_CB(_nis_gethostbyaddr, NULL) /* force -DHESIOD */
- { 0 }
- };
-
-#ifdef HAVE_DD_LOCK
- __lock_acquire(addr_lock);
-#endif
- rval = nsdispatch((void *)&hp, dtab, NSDB_HOSTS, "gethostbyaddr",
- default_src, addr, len, type, &host, hostbuf, BUFSIZ, &herr);
-
-#ifdef HAVE_DD_LOCK
- __lock_release(addr_lock);
-#endif
- if (rval != NS_SUCCESS)
- return NULL;
- else
- return hp;
-}
-
-int
-__gethostbyaddr_r (const char *addr, int len, int type,
- struct hostent *result, void *buffer, int buflen,
- struct hostent **hp, int *herr)
-{
- int rval;
-
- static const ns_dtab dtab[] = {
- NS_FILES_CB(_ht_gethostbyaddr, NULL)
- { NSSRC_DNS, _dns_gethostbyaddr, NULL },
- NS_NIS_CB(_nis_gethostbyaddr, NULL) /* force -DHESIOD */
- { 0 }
- };
-
- rval = nsdispatch((void *)hp, dtab, NSDB_HOSTS, "gethostbyaddr",
- default_src, addr, len, type, result, buffer, buflen, herr);
-
- if(rval != NS_SUCCESS)
- return rval;
- else
- return 0;
-}
-
-void
-sethostent(stayopen)
- int stayopen;
-{
- _sethosthtent(stayopen);
- _sethostdnsent(stayopen);
-}
-
-void
-endhostent()
-{
- _endhosthtent();
- _endhostdnsent();
-}
-
-void
-sethostent_r(int f, FILE **hostfile, int *stayopen)
-{
- _sethosthtent_r(f, hostfile, stayopen);
- _sethostdnsent(f);
-}
-
-void
-endhostent_r(FILE **hostfile, int *stayopen)
-{
- _endhosthtent_r(hostfile, stayopen);
- _endhostdnsent();
-}
diff --git a/newlib/libc/sys/linux/net/getifaddrs.3 b/newlib/libc/sys/linux/net/getifaddrs.3
deleted file mode 100644
index 47e50049d..000000000
--- a/newlib/libc/sys/linux/net/getifaddrs.3
+++ /dev/null
@@ -1,164 +0,0 @@
-.\" $FreeBSD: src/lib/libc/net/getifaddrs.3,v 1.6 2001/10/01 16:08:55 ru Exp $
-.\" $KAME: getifaddrs.3,v 1.4 2000/05/17 14:13:14 itojun Exp $
-.\" BSDI getifaddrs.3,v 2.5 2000/02/23 14:51:59 dab Exp
-.\"
-.\" Copyright (c) 1995, 1999
-.\" Berkeley Software Design, 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.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``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 Berkeley Software Design, Inc. 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.
-.Dd October 12, 1995
-.Dt GETIFADDRS 3
-.Os
-.Sh NAME
-.Nm getifaddrs
-.Nd get interface addresses
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/socket.h
-.In ifaddrs.h
-.Ft int
-.Fn getifaddrs "struct ifaddrs **ifap"
-.Ft void
-.Fn freeifaddrs "struct ifaddrs *ifp"
-.Sh DESCRIPTION
-The
-.Fn getifaddrs
-function stores a reference to a linked list of the network interfaces
-on the local machine in the memory referenced by
-.Fa ifap .
-The list consists of
-.Nm ifaddrs
-structures, as defined in the include file
-.Aq Pa ifaddrs.h .
-The
-.Nm ifaddrs
-structure contains at least the following entries:
-.Bd -literal
- struct ifaddrs *ifa_next; /* Pointer to next struct */
- char *ifa_name; /* Interface name */
- u_int ifa_flags; /* Interface flags */
- struct sockaddr *ifa_addr; /* Interface address */
- struct sockaddr *ifa_netmask; /* Interface netmask */
- struct sockaddr *ifa_broadaddr; /* Interface broadcast address */
- struct sockaddr *ifa_dstaddr; /* P2P interface destination */
- void *ifa_data; /* Address specific data */
-.Ed
-.Pp
-The
-.Li ifa_next
-field contains a pointer to the next structure on the list.
-This field is
-.Dv NULL
-in last structure on the list.
-.Pp
-The
-.Li ifa_name
-field contains the interface name.
-.Pp
-The
-.Li ifa_flags
-field contains the interface flags, as set by
-.Xr ifconfig 8
-utility.
-.Pp
-The
-.Li ifa_addr
-field references either the address of the interface or the link level
-address of the interface, if one exists, otherwise it is NULL.
-(The
-.Li sa_family
-field of the
-.Li ifa_addr
-field should be consulted to determine the format of the
-.Li ifa_addr
-address.)
-.Pp
-The
-.Li ifa_netmask
-field references the netmask associated with
-.Li ifa_addr ,
-if one is set, otherwise it is NULL.
-.Pp
-The
-.Li ifa_broadaddr
-field,
-which should only be referenced for non-P2P interfaces,
-references the broadcast address associated with
-.Li ifa_addr ,
-if one exists, otherwise it is NULL.
-.Pp
-The
-.Li ifa_dstaddr
-field references the destination address on a P2P interface,
-if one exists, otherwise it is NULL.
-.Pp
-The
-.Li ifa_data
-field references address family specific data. For
-.Dv AF_LINK
-addresses it contains a pointer to the
-.Fa struct if_data
-(as defined in include file
-.Aq Pa net/if.h )
-which contains various interface attributes and statistics.
-For all other address families, it contains a pointer to the
-.Fa struct ifa_data
-(as defined in include file
-.Aq Pa net/if.h )
-which contains per-address interface statistics.
-.Pp
-The data returned by
-.Fn getifaddrs
-is dynamically allocated and should be freed using
-.Fn freeifaddrs
-when no longer needed.
-.Sh RETURN VALUES
-.Rv -std getifaddrs
-.Sh ERRORS
-The
-.Fn getifaddrs
-may fail and set
-.Va errno
-for any of the errors specified for the library routines
-.Xr ioctl 2 ,
-.Xr socket 2 ,
-.Xr malloc 3
-or
-.Xr sysctl 3 .
-.Sh BUGS
-If both
-.Aq Pa net/if.h
-and
-.Aq Pa ifaddrs.h
-are being included,
-.Aq Pa net/if.h
-.Em must
-be included before
-.Aq Pa ifaddrs.h .
-.Sh SEE ALSO
-.Xr ioctl 2 ,
-.Xr socket 2 ,
-.Xr sysctl 3 ,
-.Xr networking 4 ,
-.Xr ifconfig 8
-.Sh HISTORY
-The
-.Nm
-implementation first appeared in BSDi
-.Bsx .
diff --git a/newlib/libc/sys/linux/net/getifaddrs.c b/newlib/libc/sys/linux/net/getifaddrs.c
deleted file mode 100644
index fdb8c9b9d..000000000
--- a/newlib/libc/sys/linux/net/getifaddrs.c
+++ /dev/null
@@ -1,401 +0,0 @@
-/* $KAME: getifaddrs.c,v 1.9 2001/08/20 02:31:20 itojun Exp $ */
-
-/*
- * Copyright (c) 1995, 1999
- * Berkeley Software Design, 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.
- *
- * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``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 Berkeley Software Design, Inc. 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.
- *
- * BSDI getifaddrs.c,v 2.12 2000/02/23 14:51:59 dab Exp
- */
-/*
- * NOTE: SIOCGIFCONF case is not LP64 friendly. it also does not perform
- * try-and-error for region size.
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <sys/types.h>
-#include <sys/sockio.h>
-#include <unistd.h>
-
-#include "namespace.h"
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#ifdef NET_RT_IFLIST
-#include <sys/param.h>
-#include <net/route.h>
-#include <sys/sysctl.h>
-#include <net/if_dl.h>
-#endif
-
-#include <ifaddrs.h>
-#include <stdlib.h>
-#include <string.h>
-#include "un-namespace.h"
-
-#if !defined(AF_LINK)
-#define SA_LEN(sa) sizeof(struct sockaddr)
-#endif
-
-#if !defined(SA_LEN)
-#define SA_LEN(sa) sizeof(struct sockaddr)
-#endif
-
-#define SALIGN (sizeof(long) - 1)
-#define SA_RLEN(sa) (sizeof(struct sockaddr) ? ((sizeof(struct sockaddr) + SALIGN) & ~SALIGN) : (SALIGN + 1))
-
-#ifndef ALIGNBYTES
-/*
- * On systems with a routing socket, ALIGNBYTES should match the value
- * that the kernel uses when building the messages.
- */
-#define ALIGNBYTES XXX
-#endif
-#ifndef ALIGN
-#define ALIGN(p) (((u_long)(p) + ALIGNBYTES) &~ ALIGNBYTES)
-#endif
-
-#if _BSDI_VERSION >= 199701
-#define HAVE_IFM_DATA
-#endif
-
-#if _BSDI_VERSION >= 199802
-/* ifam_data is very specific to recent versions of bsdi */
-#define HAVE_IFAM_DATA
-#endif
-
-#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
-#define HAVE_IFM_DATA
-#endif
-
-int
-getifaddrs(struct ifaddrs **pif)
-{
- int icnt = 1;
- int dcnt = 0;
- int ncnt = 0;
-#ifdef NET_RT_IFLIST
- int mib[6];
- size_t needed;
- char *buf;
- char *next;
- struct ifaddrs *cif = 0;
- char *p, *p0;
- struct rt_msghdr *rtm;
- struct if_msghdr *ifm;
- struct ifa_msghdr *ifam;
- struct sockaddr_dl *dl;
- struct sockaddr *sa;
- struct ifaddrs *ifa, *ift;
- u_short idx = 0;
-#else /* NET_RT_IFLIST */
- struct ifaddrs *ifa, *ift;
- char buf[1024];
- int m, sock;
- struct ifconf ifc;
- struct ifreq *ifr;
- struct ifreq *lifr;
-#endif /* NET_RT_IFLIST */
- int i;
- size_t len, alen;
- char *data;
- char *names;
-
-#ifdef NET_RT_IFLIST
- mib[0] = CTL_NET;
- mib[1] = PF_ROUTE;
- mib[2] = 0; /* protocol */
- mib[3] = 0; /* wildcard address family */
- mib[4] = NET_RT_IFLIST;
- mib[5] = 0; /* no flags */
- if (__sysctl(mib, 6, NULL, &needed, NULL, 0) < 0)
- return (-1);
- if ((buf = malloc(needed)) == NULL)
- return (-1);
- if (__sysctl(mib, 6, buf, &needed, NULL, 0) < 0) {
- free(buf);
- return (-1);
- }
-
- for (next = buf; next < buf + needed; next += rtm->rtm_msglen) {
- rtm = (struct rt_msghdr *)(void *)next;
- if (rtm->rtm_version != RTM_VERSION)
- continue;
- switch (rtm->rtm_type) {
- case RTM_IFINFO:
- ifm = (struct if_msghdr *)(void *)rtm;
- if (ifm->ifm_addrs & RTA_IFP) {
- idx = ifm->ifm_index;
- ++icnt;
- dl = (struct sockaddr_dl *)(void *)(ifm + 1);
- dcnt += SA_RLEN((struct sockaddr *)(void*)dl) +
- ALIGNBYTES;
-#ifdef HAVE_IFM_DATA
- dcnt += sizeof(ifm->ifm_data);
-#endif /* HAVE_IFM_DATA */
- ncnt += dl->sdl_nlen + 1;
- } else
- idx = 0;
- break;
-
- case RTM_NEWADDR:
- ifam = (struct ifa_msghdr *)(void *)rtm;
- if (idx && ifam->ifam_index != idx)
- abort(); /* this cannot happen */
-
-#define RTA_MASKS (RTA_NETMASK | RTA_IFA | RTA_BRD)
- if (idx == 0 || (ifam->ifam_addrs & RTA_MASKS) == 0)
- break;
- p = (char *)(void *)(ifam + 1);
- ++icnt;
-#ifdef HAVE_IFAM_DATA
- dcnt += sizeof(ifam->ifam_data) + ALIGNBYTES;
-#endif /* HAVE_IFAM_DATA */
- /* Scan to look for length of address */
- alen = 0;
- for (p0 = p, i = 0; i < RTAX_MAX; i++) {
- if ((RTA_MASKS & ifam->ifam_addrs & (1 << i))
- == 0)
- continue;
- sa = (struct sockaddr *)(void *)p;
- len = SA_RLEN(sa);
- if (i == RTAX_IFA) {
- alen = len;
- break;
- }
- p += len;
- }
- for (p = p0, i = 0; i < RTAX_MAX; i++) {
- if ((RTA_MASKS & ifam->ifam_addrs & (1 << i))
- == 0)
- continue;
- sa = (struct sockaddr *)(void *)p;
- len = SA_RLEN(sa);
- if (i == RTAX_NETMASK && SA_LEN(sa) == 0)
- dcnt += alen;
- else
- dcnt += len;
- p += len;
- }
- break;
- }
- }
-#else /* NET_RT_IFLIST */
- ifc.ifc_buf = buf;
- ifc.ifc_len = sizeof(buf);
-
- if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0)
- return (-1);
- i = ioctl(sock, SIOCGIFCONF, (char *)&ifc);
- close(sock);
- if (i < 0)
- return (-1);
-
- ifr = ifc.ifc_req;
- lifr = (struct ifreq *)&ifc.ifc_buf[ifc.ifc_len];
-
- while (ifr < lifr) {
- struct sockaddr *sa;
-
- sa = &ifr->ifr_addr;
- ++icnt;
- dcnt += SA_RLEN(sa);
- ncnt += sizeof(ifr->ifr_name) + 1;
-
- if (SA_LEN(sa) < sizeof(*sa))
- ifr = (struct ifreq *)(((char *)sa) + sizeof(*sa));
- else
- ifr = (struct ifreq *)(((char *)sa) + SA_LEN(sa));
- }
-#endif /* NET_RT_IFLIST */
-
- if (icnt + dcnt + ncnt == 1) {
- *pif = NULL;
- free(buf);
- return (0);
- }
- data = malloc(sizeof(struct ifaddrs) * icnt + dcnt + ncnt);
- if (data == NULL) {
- free(buf);
- return(-1);
- }
-
- ifa = (struct ifaddrs *)(void *)data;
- data += sizeof(struct ifaddrs) * icnt;
- names = data + dcnt;
-
- memset(ifa, 0, sizeof(struct ifaddrs) * icnt);
- ift = ifa;
-
-#ifdef NET_RT_IFLIST
- idx = 0;
- for (next = buf; next < buf + needed; next += rtm->rtm_msglen) {
- rtm = (struct rt_msghdr *)(void *)next;
- if (rtm->rtm_version != RTM_VERSION)
- continue;
- switch (rtm->rtm_type) {
- case RTM_IFINFO:
- ifm = (struct if_msghdr *)(void *)rtm;
- if (ifm->ifm_addrs & RTA_IFP) {
- idx = ifm->ifm_index;
- dl = (struct sockaddr_dl *)(void *)(ifm + 1);
-
- cif = ift;
- ift->ifa_name = names;
- ift->ifa_flags = (int)ifm->ifm_flags;
- memcpy(names, dl->sdl_data,
- (size_t)dl->sdl_nlen);
- names[dl->sdl_nlen] = 0;
- names += dl->sdl_nlen + 1;
-
- ift->ifa_addr = (struct sockaddr *)(void *)data;
- memcpy(data, dl,
- (size_t)SA_LEN((struct sockaddr *)
- (void *)dl));
- data += SA_RLEN((struct sockaddr *)(void *)dl);
-
-#ifdef HAVE_IFM_DATA
- /* ifm_data needs to be aligned */
- ift->ifa_data = data = (void *)ALIGN(data);
- memcpy(data, &ifm->ifm_data, sizeof(ifm->ifm_data));
- data += sizeof(ifm->ifm_data);
-#else /* HAVE_IFM_DATA */
- ift->ifa_data = NULL;
-#endif /* HAVE_IFM_DATA */
-
- ift = (ift->ifa_next = ift + 1);
- } else
- idx = 0;
- break;
-
- case RTM_NEWADDR:
- ifam = (struct ifa_msghdr *)(void *)rtm;
- if (idx && ifam->ifam_index != idx)
- abort(); /* this cannot happen */
-
- if (idx == 0 || (ifam->ifam_addrs & RTA_MASKS) == 0)
- break;
- ift->ifa_name = cif->ifa_name;
- ift->ifa_flags = cif->ifa_flags;
- ift->ifa_data = NULL;
- p = (char *)(void *)(ifam + 1);
- /* Scan to look for length of address */
- alen = 0;
- for (p0 = p, i = 0; i < RTAX_MAX; i++) {
- if ((RTA_MASKS & ifam->ifam_addrs & (1 << i))
- == 0)
- continue;
- sa = (struct sockaddr *)(void *)p;
- len = SA_RLEN(sa);
- if (i == RTAX_IFA) {
- alen = len;
- break;
- }
- p += len;
- }
- for (p = p0, i = 0; i < RTAX_MAX; i++) {
- if ((RTA_MASKS & ifam->ifam_addrs & (1 << i))
- == 0)
- continue;
- sa = (struct sockaddr *)(void *)p;
- len = SA_RLEN(sa);
- switch (i) {
- case RTAX_IFA:
- ift->ifa_addr =
- (struct sockaddr *)(void *)data;
- memcpy(data, p, len);
- data += len;
- break;
-
- case RTAX_NETMASK:
- ift->ifa_netmask =
- (struct sockaddr *)(void *)data;
- if (SA_LEN(sa) == 0) {
- memset(data, 0, alen);
- data += alen;
- break;
- }
- memcpy(data, p, len);
- data += len;
- break;
-
- case RTAX_BRD:
- ift->ifa_broadaddr =
- (struct sockaddr *)(void *)data;
- memcpy(data, p, len);
- data += len;
- break;
- }
- p += len;
- }
-
-#ifdef HAVE_IFAM_DATA
- /* ifam_data needs to be aligned */
- ift->ifa_data = data = (void *)ALIGN(data);
- memcpy(data, &ifam->ifam_data, sizeof(ifam->ifam_data));
- data += sizeof(ifam->ifam_data);
-#endif /* HAVE_IFAM_DATA */
-
- ift = (ift->ifa_next = ift + 1);
- break;
- }
- }
-
- free(buf);
-#else /* NET_RT_IFLIST */
- ifr = ifc.ifc_req;
- lifr = (struct ifreq *)&ifc.ifc_buf[ifc.ifc_len];
-
- while (ifr < lifr) {
- struct sockaddr *sa;
-
- ift->ifa_name = names;
- names[sizeof(ifr->ifr_name)] = 0;
- strncpy(names, ifr->ifr_name, sizeof(ifr->ifr_name));
- while (*names++)
- ;
-
- ift->ifa_addr = (struct sockaddr *)data;
- sa = &ifr->ifr_addr;
- memcpy(data, sa, SA_LEN(sa));
- data += SA_RLEN(sa);
-
- ifr = (struct ifreq *)(((char *)sa) + SA_LEN(sa));
- ift = (ift->ifa_next = ift + 1);
- }
-#endif /* NET_RT_IFLIST */
- if (--ift >= ifa) {
- ift->ifa_next = NULL;
- *pif = ifa;
- } else {
- *pif = NULL;
- free(ifa);
- }
- return (0);
-}
-
-void
-freeifaddrs(struct ifaddrs *ifp)
-{
-
- free(ifp);
-}
diff --git a/newlib/libc/sys/linux/net/getipnodebyname.3 b/newlib/libc/sys/linux/net/getipnodebyname.3
deleted file mode 100644
index 5b8ea1ecb..000000000
--- a/newlib/libc/sys/linux/net/getipnodebyname.3
+++ /dev/null
@@ -1,461 +0,0 @@
-.\" $FreeBSD: src/lib/libc/net/getipnodebyname.3,v 1.8 2001/10/01 16:08:55 ru Exp $
-.\" $KAME: getipnodebyname.3,v 1.6 2000/08/09 21:16:17 itojun Exp $
-.\"
-.\" Copyright (c) 1983, 1987, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95
-.\"
-.Dd May 25, 1995
-.Dt GETIPNODEBYNAME 3
-.Os
-.\"
-.Sh NAME
-.Nm getipnodebyname ,
-.Nm getipnodebyaddr ,
-.Nm freehostent
-.Nd nodename-to-address and address-to-nodename translation
-.\"
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/socket.h
-.In netdb.h
-.Ft "struct hostent *"
-.Fn getipnodebyname "const char *name" "int af" "int flags" "int *error_num"
-.Ft "struct hostent *"
-.Fn getipnodebyaddr "const void *src" "size_t len" "int af" "int *error_num"
-.Ft void
-.Fn freehostent "struct hostent *ptr"
-.\"
-.Sh DESCRIPTION
-.Fn getipnodebyname
-and
-.Fn getipnodebyaddr
-functions are very similar to
-.Xr gethostbyname 3 ,
-.Xr gethostbyname2 3
-and
-.Xr gethostbyaddr 3 .
-The functions cover all the functionalities provided by the older ones,
-and provide better interface to programmers.
-The functions require additional arguments,
-.Ar af ,
-and
-.Ar flags ,
-for specifying address family and operation mode.
-The additional arguments allow programmer to get address for a nodename,
-for specific address family
-(such as
-.Dv AF_INET
-or
-.Dv AF_INET6 ) .
-The functions also require an additional pointer argument,
-.Ar error_num
-to return the appropriate error code,
-to support thread safe error code returns.
-.Pp
-The type and usage of the return value,
-.Li "struct hostent"
-is described in
-.Xr gethostbyname 3 .
-.Pp
-For
-.Fn getipnodebyname ,
-the
-.Ar name
-argument can be either a node name or a numeric address
-string
-(i.e., a dotted-decimal IPv4 address or an IPv6 hex address).
-The
-.Ar af
-argument specifies the address family, either
-.Dv AF_INET
-or
-.Dv AF_INET6 .
-The
-.Ar flags
-argument specifies the types of addresses that are searched for,
-and the types of addresses that are returned.
-We note that a special flags value of
-.Dv AI_DEFAULT
-(defined below)
-should handle most applications.
-That is, porting simple applications to use IPv6 replaces the call
-.Bd -literal -offset
- hptr = gethostbyname(name);
-.Ed
-.Pp
-with
-.Bd -literal -offset
- hptr = getipnodebyname(name, AF_INET6, AI_DEFAULT, &error_num);
-.Ed
-.Pp
-Applications desiring finer control over the types of addresses
-searched for and returned, can specify other combinations of the
-.Ar flags
-argument.
-.Pp
-A
-.Ar flags
-of
-.Li 0
-implies a strict interpretation of the
-.Ar af
-argument:
-.Bl -bullet
-.It
-If
-.Ar flags
-is 0 and
-.Ar af
-is
-.Dv AF_INET ,
-then the caller wants only IPv4 addresses.
-A query is made for
-.Li A
-records.
-If successful, the IPv4 addresses are returned and the
-.Li h_length
-member of the
-.Li hostent
-structure will be 4, else the function returns a
-.Dv NULL
-pointer.
-.It
-If
-.Ar flags
-is 0 and if
-.Ar af
-is
-.Li AF_INET6 ,
-then the caller wants only IPv6 addresses.
-A query is made for
-.Li AAAA
-records.
-If successful, the IPv6 addresses are returned and the
-.Li h_length
-member of the
-.Li hostent
-structure will be 16, else the function returns a
-.Dv NULL
-pointer.
-.El
-.Pp
-Other constants can be logically-ORed into the
-.Ar flags
-argument, to modify the behavior of the function.
-.Bl -bullet
-.It
-If the
-.Dv AI_V4MAPPED
-flag is specified along with an
-.Ar af
-of
-.Dv AF_INET6 ,
-then the caller will accept IPv4-mapped IPv6 addresses.
-That is, if no
-.Li AAAA
-records are found then a query is made for
-.Li A
-records and any found are returned as IPv4-mapped IPv6 addresses
-.Li ( h_length
-will be 16).
-The
-.Dv AI_V4MAPPED
-flag is ignored unless
-.Ar af
-equals
-.Dv AF_INET6 .
-.It
-The
-.Dv AI_V4MAPPED_CFG
-flag is exact same as the
-.Dv AI_V4MAPPED
-flag only if the kernel supports IPv4-mapped IPv6 address.
-.It
-If the
-.Dv AI_ALL
-flag is used in conjunction with the
-.Dv AI_V4MAPPED
-flag, and only used with the IPv6 address family.
-When
-.Dv AI_ALL
-is logically or'd with
-.Dv AI_V4MAPPED
-flag then the caller wants all addresses: IPv6 and IPv4-mapped IPv6.
-A query is first made for
-.Li AAAA
-records and if successful, the
-IPv6 addresses are returned. Another query is then made for
-.Li A
-records and any found are returned as IPv4-mapped IPv6 addresses.
-.Li h_length
-will be 16. Only if both queries fail does the function
-return a
-.Dv NULL
-pointer. This flag is ignored unless af equals
-AF_INET6. If both
-.Dv AI_ALL
-and
-.Dv AI_V4MAPPED
-are specified,
-.Dv AI_ALL
-takes precedence.
-.It
-The
-.Dv AI_ADDRCONFIG
-flag specifies that a query for
-.Li AAAA
-records
-should occur only if the node has at least one IPv6 source
-address configured and a query for
-.Li A
-records should occur only if the node has at least one IPv4 source address
-configured.
-.Pp
-For example, if the node has no IPv6 source addresses configured,
-and
-.Ar af
-equals AF_INET6, and the node name being looked up has both
-.Li AAAA
-and
-.Li A
-records, then:
-(a) if only
-.Dv AI_ADDRCONFIG
-is
-specified, the function returns a
-.Dv NULL
-pointer;
-(b) if
-.Dv AI_ADDRCONFIG
-|
-.Dv AI_V4MAPPED
-is specified, the
-.Li A
-records are returned as IPv4-mapped IPv6 addresses;
-.El
-.Pp
-The special flags value of
-.Dv AI_DEFAULT
-is defined as
-.Bd -literal -offset
- #define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG)
-.Ed
-.Pp
-We noted that the
-.Fn getipnodebyname
-function must allow the
-.Ar name
-argument to be either a node name or a literal address string
-(i.e., a dotted-decimal IPv4 address or an IPv6 hex address).
-This saves applications from having to call
-.Xr inet_pton 3
-to handle literal address strings.
-When the
-.Ar name
-argument is a literal address string,
-the
-.Ar flags
-argument is always ignored.
-.Pp
-There are four scenarios based on the type of literal address string
-and the value of the
-.Ar af
-argument.
-The two simple cases are when
-.Ar name
-is a dotted-decimal IPv4 address and
-.Ar af
-equals
-.Dv AF_INET ,
-or when
-.Ar name
-is an IPv6 hex address and
-.Ar af
-equals
-.Dv AF_INET6 .
-The members of the
-returned hostent structure are:
-.Li h_name
-points to a copy of the
-.Ar name
-argument,
-.Li h_aliases
-is a
-.Dv NULL
-pointer,
-.Li h_addrtype
-is a copy of the
-.Ar af
-argument,
-.Li h_length
-is either 4
-(for
-.Dv AF_INET )
-or 16
-(for
-.Dv AF_INET6 ) ,
-.Li h_addr_list[0]
-is a pointer to the 4-byte or 16-byte binary address,
-and
-.Li h_addr_list[1]
-is a
-.Dv NULL
-pointer.
-.Pp
-When
-.Ar name
-is a dotted-decimal IPv4 address and
-.Ar af
-equals
-.Dv AF_INET6 ,
-and
-.Dv AI_V4MAPPED
-is specified,
-an IPv4-mapped IPv6 address is returned:
-.Li h_name
-points to an IPv6 hex address containing the IPv4-mapped IPv6 address,
-.Li h_aliases
-is a
-.Dv NULL
-pointer,
-.Li h_addrtype
-is
-.Dv AF_INET6 ,
-.Li h_length
-is 16,
-.Li h_addr_list[0]
-is a pointer to the 16-byte binary address, and
-.Li h_addr_list[1]
-is a
-.Dv NULL
-pointer.
-.Pp
-It is an error when
-.Ar name
-is an IPv6 hex address and
-.Ar af
-equals
-.Dv AF_INET .
-The function's return value is a
-.Dv NULL
-pointer and the value pointed to by
-.Ar error_num
-equals
-.Dv HOST_NOT_FOUND .
-.Pp
-.Fn getipnodebyaddr
-takes almost the same argument as
-.Xr gethostbyaddr 3 ,
-but adds a pointer to return an error number.
-Additionally it takes care of IPv4-mapped IPv6 addresses,
-and IPv4-compatible IPv6 addresses.
-.Pp
-.Fn getipnodebyname
-and
-.Fn getipnodebyaddr
-dynamically allocate the structure to be returned to the caller.
-.Fn freehostent
-reclaims memory region allocated and returned by
-.Fn getipnodebyname
-or
-.Fn getipnodebyaddr .
-.\"
-.Sh FILES
-.Bl -tag -width /etc/nsswitch.conf -compact
-.It Pa /etc/hosts
-.It Pa /etc/nsswitch.conf
-.It Pa /etc/resolv.conf
-.El
-.\"
-.Sh DIAGNOSTICS
-.Fn getipnodebyname
-and
-.Fn getipnodebyaddr
-returns
-.Dv NULL
-on errors.
-The integer values pointed to by
-.Ar error_num
-may then be checked to see whether this is a temporary failure
-or an invalid or unknown host.
-The meanings of each error code are described in
-.Xr gethostbyname 3 .
-.\"
-.Sh SEE ALSO
-.Xr gethostbyaddr 3 ,
-.Xr gethostbyname 3 ,
-.Xr hosts 5 ,
-.Xr nsswitch.conf 5 ,
-.Xr services 5 ,
-.Xr hostname 7 ,
-.Xr named 8
-.Pp
-.Rs
-.%A R. Gilligan
-.%A S. Thomson
-.%A J. Bound
-.%A W. Stevens
-.%T Basic Socket Interface Extensions for IPv6
-.%R RFC2553
-.%D March 1999
-.Re
-.\"
-.Sh HISTORY
-The implementation first appeared in KAME advanced networking kit.
-.\"
-.Sh STANDARDS
-.Fn getipnodebyname
-and
-.Fn getipnodebyaddr
-are documented in
-.Dq Basic Socket Interface Extensions for IPv6
-(RFC2553).
-.\"
-.Sh BUGS
-.Fn getipnodebyname
-and
-.Fn getipnodebyaddr
-do not handle scoped IPv6 address properly.
-If you use these functions,
-your program will not be able to handle scoped IPv6 addresses.
-For IPv6 address manipulation,
-.Fn getaddrinfo 3
-and
-.Fn getnameinfo 3
-are recommended.
-.Pp
-The current implementation is not thread-safe.
-.Pp
-The text was shamelessly copied from RFC2553.
diff --git a/newlib/libc/sys/linux/net/getnameinfo.3 b/newlib/libc/sys/linux/net/getnameinfo.3
deleted file mode 100644
index d7afa2f40..000000000
--- a/newlib/libc/sys/linux/net/getnameinfo.3
+++ /dev/null
@@ -1,311 +0,0 @@
-.\" $FreeBSD: src/lib/libc/net/getnameinfo.3,v 1.11 2001/10/01 16:08:55 ru Exp $
-.\" $KAME: getnameinfo.3,v 1.17 2000/08/09 21:16:17 itojun Exp $
-.\"
-.\" Copyright (c) 1983, 1987, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95
-.\"
-.Dd May 25, 1995
-.Dt GETNAMEINFO 3
-.Os
-.\"
-.Sh NAME
-.Nm getnameinfo
-.Nd address-to-nodename translation in protocol-independent manner
-.\"
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/socket.h
-.In netdb.h
-.Ft int
-.Fn getnameinfo "const struct sockaddr *sa" "socklen_t salen" \
-"char *host" "size_t hostlen" "char *serv" "size_t servlen" "int flags"
-.\"
-.Sh DESCRIPTION
-The
-.Fn getnameinfo
-function is defined for protocol-independent address-to-nodename translation.
-Its functionality is a reverse conversion of
-.Xr getaddrinfo 3 ,
-and implements similar functionality with
-.Xr gethostbyaddr 3
-and
-.Xr getservbyport 3
-in more sophisticated manner.
-.Pp
-This function looks up an IP address and port number provided by the
-caller in the DNS and system-specific database, and returns text
-strings for both in buffers provided by the caller.
-The function indicates successful completion by a zero return value;
-a non-zero return value indicates failure.
-.Pp
-The first argument,
-.Fa sa ,
-points to either a
-.Li sockaddr_in
-structure (for IPv4) or a
-.Li sockaddr_in6
-structure (for IPv6) that holds the IP address and port number.
-The
-.Fa salen
-argument gives the length of the
-.Li sockaddr_in
-or
-.Li sockaddr_in6
-structure.
-.Pp
-The function returns the nodename associated with the IP address in
-the buffer pointed to by the
-.Fa host
-argument.
-The caller provides the size of this buffer via the
-.Fa hostlen
-argument.
-The service name associated with the port number is returned in the buffer
-pointed to by
-.Fa serv ,
-and the
-.Fa servlen
-argument gives the length of this buffer.
-The caller specifies not to return either string by providing a zero
-value for the
-.Fa hostlen
-or
-.Fa servlen
-arguments.
-Otherwise, the caller must provide buffers large enough to hold the
-nodename and the service name, including the terminating null characters.
-.Pp
-Unfortunately most systems do not provide constants that specify the
-maximum size of either a fully-qualified domain name or a service name.
-Therefore to aid the application in allocating buffers for these two
-returned strings the following constants are defined in
-.Aq Pa netdb.h :
-.Bd -literal -offset
-#define NI_MAXHOST 1025
-#define NI_MAXSERV 32
-.Ed
-.Pp
-The first value is actually defined as the constant
-.Dv MAXDNAME
-in recent versions of BIND's
-.Aq Pa arpa/nameser.h
-header
-(older versions of BIND define this constant to be 256)
-and the second is a guess based on the services listed in the current
-Assigned Numbers RFC.
-.Pp
-The final argument is a
-.Fa flag
-that changes the default actions of this function.
-By default the fully-qualified domain name (FQDN) for the host is
-looked up in the DNS and returned.
-If the flag bit
-.Dv NI_NOFQDN
-is set, only the nodename portion of the FQDN is returned for local hosts.
-.Pp
-If the
-.Fa flag
-bit
-.Dv NI_NUMERICHOST
-is set, or if the host's name cannot be located in the DNS,
-the numeric form of the host's address is returned instead of its name
-(e.g., by calling
-.Fn inet_ntop
-instead of
-.Fn getnodebyaddr ) .
-If the
-.Fa flag
-bit
-.Dv NI_NAMEREQD
-is set, an error is returned if the host's name cannot be located in the DNS.
-.Pp
-If the flag bit
-.Dv NI_NUMERICSERV
-is set, the numeric form of the service address is returned
-(e.g., its port number)
-instead of its name.
-The two
-.Dv NI_NUMERICxxx
-flags are required to support the
-.Fl n
-flag that many commands provide.
-.Pp
-A fifth flag bit,
-.Dv NI_DGRAM ,
-specifies that the service is a datagram service, and causes
-.Fn getservbyport
-to be called with a second argument of
-.Dq udp
-instead of its default of
-.Dq tcp .
-This is required for the few ports (512-514)
-that have different services for UDP and TCP.
-.Pp
-These
-.Dv NI_xxx
-flags are defined in
-.Aq Pa netdb.h .
-.\"
-.Sh EXTENSION
-The implementation allows experimental numeric IPv6 address notation with
-scope identifier.
-IPv6 link-local address will appear as string like
-.Dq Li fe80::1%ne0 ,
-if
-.Dv NI_WITHSCOPEID
-bit is enabled in
-.Ar flags
-argument.
-Refer to
-.Xr getaddrinfo 3
-for the notation.
-.\"
-.Sh EXAMPLES
-The following code tries to get numeric hostname, and service name,
-for given socket address.
-Observe that there is no hardcoded reference to particular address family.
-.Bd -literal -offset indent
-struct sockaddr *sa; /* input */
-char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV];
-
-if (getnameinfo(sa, sa->sa_len, hbuf, sizeof(hbuf), sbuf,
- sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV)) {
- errx(1, "could not get numeric hostname");
- /*NOTREACHED*/
-}
-printf("host=%s, serv=%s\\n", hbuf, sbuf);
-.Ed
-.Pp
-The following version checks if the socket address has reverse address mapping.
-.Bd -literal -offset indent
-struct sockaddr *sa; /* input */
-char hbuf[NI_MAXHOST];
-
-if (getnameinfo(sa, sa->sa_len, hbuf, sizeof(hbuf), NULL, 0,
- NI_NAMEREQD)) {
- errx(1, "could not resolve hostname");
- /*NOTREACHED*/
-}
-printf("host=%s\\n", hbuf);
-.Ed
-.\"
-.Sh FILES
-.Bl -tag -width /etc/nsswitch.conf -compact
-.It Pa /etc/hosts
-.It Pa /etc/nsswitch.conf
-.It Pa /etc/resolv.conf
-.El
-.\"
-.Sh DIAGNOSTICS
-The function indicates successful completion by a zero return value;
-a non-zero return value indicates failure.
-Error codes are as below:
-.Bl -tag -width Er
-.It Bq Er EAI_AGAIN
-The name could not be resolved at this time.
-Future attempts may succeed.
-.It Bq Er EAI_BADFLAGS
-The flags had an invalid value.
-.It Bq Er EAI_FAIL
-A non-recoverable error occurred.
-.It Bq Er EAI_FAMILY
-The address family was not recognized or the address length was invalid
-for the specified family.
-.It Bq Er EAI_MEMORY
-There was a memory allocation failure.
-.It Bq Er EAI_NONAME
-The name does not resolve for the supplied parameters.
-.Dv NI_NAMEREQD
-is set and the host's name cannot be located,
-or both nodename and servname were null.
-.It Bq Er EAI_SYSTEM
-A system error occurred.
-The error code can be found in errno.
-.El
-.\"
-.Sh SEE ALSO
-.Xr getaddrinfo 3 ,
-.Xr gethostbyaddr 3 ,
-.Xr getservbyport 3 ,
-.Xr hosts 5 ,
-.Xr services 5 ,
-.Xr hostname 7 ,
-.Xr named 8
-.Pp
-.Rs
-.%A R. Gilligan
-.%A S. Thomson
-.%A J. Bound
-.%A W. Stevens
-.%T Basic Socket Interface Extensions for IPv6
-.%R RFC2553
-.%D March 1999
-.Re
-.Rs
-.%A Tatsuya Jinmei
-.%A Atsushi Onoe
-.%T "An Extension of Format for IPv6 Scoped Addresses"
-.%R internet draft
-.%N draft-ietf-ipngwg-scopedaddr-format-02.txt
-.%O work in progress material
-.Re
-.Rs
-.%A Craig Metz
-.%T Protocol Independence Using the Sockets API
-.%B "Proceedings of the freenix track: 2000 USENIX annual technical conference"
-.%D June 2000
-.Re
-.\"
-.Sh HISTORY
-The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit.
-.\"
-.Sh STANDARDS
-The
-.Fn getaddrinfo
-function is defined in
-.St -p1003.1g-2000 ,
-and documented in
-.Dq Basic Socket Interface Extensions for IPv6
-(RFC2553).
-.\"
-.Sh BUGS
-The current implementation is not thread-safe.
-.Pp
-The text was shamelessly copied from RFC2553.
-.Pp
-The type of the 2nd argument should be
-.Li socklen_t
-for RFC2553 conformance.
-The current code is based on pre-RFC2553 specification.
diff --git a/newlib/libc/sys/linux/net/getnameinfo.c b/newlib/libc/sys/linux/net/getnameinfo.c
deleted file mode 100644
index e2f9631c1..000000000
--- a/newlib/libc/sys/linux/net/getnameinfo.c
+++ /dev/null
@@ -1,372 +0,0 @@
-/* $KAME: getnameinfo.c,v 1.45 2000/09/25 22:43:56 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-
-/*
- * Issues to be discussed:
- * - Thread safe-ness must be checked
- * - RFC2553 says that we should raise error on short buffer. X/Open says
- * we need to truncate the result. We obey RFC2553 (and X/Open should be
- * modified). ipngwg rough consensus seems to follow RFC2553.
- * - What is "local" in NI_FQDN?
- * - NI_NAMEREQD and NI_NUMERICHOST conflict with each other.
- * - (KAME extension) NI_WITHSCOPEID when called with global address,
- * and sin6_scope_id filled
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/endian.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <string.h>
-#include <stddef.h>
-#include <errno.h>
-
-#define SUCCESS 0
-#define ANY 0
-#define YES 1
-#define NO 0
-
-static struct afd {
- int a_af;
- int a_addrlen;
- int a_socklen;
- int a_off;
-} afdl [] = {
-#ifdef INET6
- {PF_INET6, sizeof(struct in6_addr), sizeof(struct sockaddr_in6),
- offsetof(struct sockaddr_in6, sin6_addr)},
-#endif
- {PF_INET, sizeof(struct in_addr), sizeof(struct sockaddr_in),
- offsetof(struct sockaddr_in, sin_addr)},
- {0, 0, 0},
-};
-
-struct sockinet {
- u_char si_len;
- u_char si_family;
- u_short si_port;
-};
-
-#ifdef INET6
-static int ip6_parsenumeric(const struct sockaddr *, const char *, char *,
- size_t, int);
-static int ip6_sa2str(const struct sockaddr_in6 *, char *, size_t, int);
-#endif
-
-/* 2553bis: use EAI_xx for getnameinfo */
-#define ENI_NOSOCKET EAI_FAIL /*XXX*/
-#define ENI_NOSERVNAME EAI_NONAME
-#define ENI_NOHOSTNAME EAI_NONAME
-#define ENI_MEMORY EAI_MEMORY
-#define ENI_SYSTEM EAI_SYSTEM
-#define ENI_FAMILY EAI_FAMILY
-#define ENI_SALEN EAI_FAMILY
-
-int
-getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
- const struct sockaddr *sa;
- socklen_t salen;
- char *host;
- size_t hostlen;
- char *serv;
- size_t servlen;
- int flags;
-{
- struct afd *afd;
- struct servent *sp;
- struct hostent *hp;
- u_short port;
- int family, i;
- const char *addr;
- u_int32_t v4a;
- int h_error;
- char numserv[512];
- char numaddr[512];
-
- if (sa == NULL)
- return ENI_NOSOCKET;
-
- family = sa->sa_family;
- for (i = 0; afdl[i].a_af; i++)
- if (afdl[i].a_af == family) {
- afd = &afdl[i];
- goto found;
- }
- return ENI_FAMILY;
-
- found:
- if (salen != afd->a_socklen)
- return ENI_SALEN;
-
- /* network byte order */
- port = ((const struct sockinet *)sa)->si_port;
- addr = (const char *)sa + afd->a_off;
-
- if (serv == NULL || servlen == 0) {
- /*
- * do nothing in this case.
- * in case you are wondering if "&&" is more correct than
- * "||" here: RFC2553 says that serv == NULL OR servlen == 0
- * means that the caller does not want the result.
- */
- } else {
- if (flags & NI_NUMERICSERV)
- sp = NULL;
- else {
- sp = getservbyport(port,
- (flags & NI_DGRAM) ? "udp" : "tcp");
- }
- if (sp) {
- if (strlen(sp->s_name) + 1 > servlen)
- return ENI_MEMORY;
- strcpy(serv, sp->s_name);
- } else {
- snprintf(numserv, sizeof(numserv), "%d", ntohs(port));
- if (strlen(numserv) + 1 > servlen)
- return ENI_MEMORY;
- strcpy(serv, numserv);
- }
- }
-
- switch (sa->sa_family) {
- case AF_INET:
- v4a = (u_int32_t)
- ntohl(((const struct sockaddr_in *)sa)->sin_addr.s_addr);
- if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
- flags |= NI_NUMERICHOST;
- v4a >>= IN_CLASSA_NSHIFT;
- if (v4a == 0)
- flags |= NI_NUMERICHOST;
- break;
-#ifdef INET6
- case AF_INET6:
- {
- const struct sockaddr_in6 *sin6;
- sin6 = (const struct sockaddr_in6 *)sa;
- switch (sin6->sin6_addr.s6_addr[0]) {
- case 0x00:
- if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr))
- ;
- else if (IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr))
- ;
- else
- flags |= NI_NUMERICHOST;
- break;
- default:
- if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) {
- flags |= NI_NUMERICHOST;
- }
- else if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr))
- flags |= NI_NUMERICHOST;
- break;
- }
- }
- break;
-#endif
- }
- if (host == NULL || hostlen == 0) {
- /*
- * do nothing in this case.
- * in case you are wondering if "&&" is more correct than
- * "||" here: RFC2553 says that host == NULL OR hostlen == 0
- * means that the caller does not want the result.
- */
- } else if (flags & NI_NUMERICHOST) {
- int numaddrlen;
-
- /* NUMERICHOST and NAMEREQD conflicts with each other */
- if (flags & NI_NAMEREQD)
- return ENI_NOHOSTNAME;
-
- switch(afd->a_af) {
-#ifdef INET6
- case AF_INET6:
- {
- int error;
-
- if ((error = ip6_parsenumeric(sa, addr, host,
- hostlen, flags)) != 0)
- return(error);
- break;
- }
-#endif
- default:
- if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))
- == NULL)
- return ENI_SYSTEM;
- numaddrlen = strlen(numaddr);
- if (numaddrlen + 1 > hostlen) /* don't forget terminator */
- return ENI_MEMORY;
- strcpy(host, numaddr);
- break;
- }
- } else {
- hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error);
-
- if (hp) {
-#if 0
- /*
- * commented out, since "for local host" is not
- * implemented here - see RFC2553 p30
- */
- if (flags & NI_NOFQDN) {
- char *p;
- p = strchr(hp->h_name, '.');
- if (p)
- *p = '\0';
- }
-#endif
- if (strlen(hp->h_name) + 1 > hostlen) {
- freehostent(hp);
- return ENI_MEMORY;
- }
- strcpy(host, hp->h_name);
- freehostent(hp);
- } else {
- if (flags & NI_NAMEREQD)
- return ENI_NOHOSTNAME;
- switch(afd->a_af) {
-#ifdef INET6
- case AF_INET6:
- {
- int error;
-
- if ((error = ip6_parsenumeric(sa, addr, host,
- hostlen,
- flags)) != 0)
- return(error);
- break;
- }
-#endif
- default:
- if (inet_ntop(afd->a_af, addr, host,
- hostlen) == NULL)
- return ENI_SYSTEM;
- break;
- }
- }
- }
- return SUCCESS;
-}
-
-#ifdef INET6
-static int
-ip6_parsenumeric(sa, addr, host, hostlen, flags)
- const struct sockaddr *sa;
- const char *addr;
- char *host;
- size_t hostlen;
- int flags;
-{
- int numaddrlen;
- char numaddr[512];
-
- if (inet_ntop(AF_INET6, addr, numaddr, sizeof(numaddr))
- == NULL)
- return ENI_SYSTEM;
-
- numaddrlen = strlen(numaddr);
- if (numaddrlen + 1 > hostlen) /* don't forget terminator */
- return ENI_MEMORY;
- strcpy(host, numaddr);
-
-#ifdef NI_WITHSCOPEID
- if (
-#ifdef DONT_OPAQUE_SCOPEID
- (IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)addr) ||
- IN6_IS_ADDR_MULTICAST((struct in6_addr *)addr)) &&
-#endif
- ((const struct sockaddr_in6 *)sa)->sin6_scope_id) {
-#ifndef ALWAYS_WITHSCOPE
- if (flags & NI_WITHSCOPEID)
-#endif /* !ALWAYS_WITHSCOPE */
- {
- char scopebuf[MAXHOSTNAMELEN];
- int scopelen;
-
- /* ip6_sa2str never fails */
- scopelen = ip6_sa2str((const struct sockaddr_in6 *)sa,
- scopebuf, sizeof(scopebuf),
- flags);
- if (scopelen + 1 + numaddrlen + 1 > hostlen)
- return ENI_MEMORY;
- /*
- * construct <numeric-addr><delim><scopeid>
- */
- memcpy(host + numaddrlen + 1, scopebuf,
- scopelen);
- host[numaddrlen] = SCOPE_DELIMITER;
- host[numaddrlen + 1 + scopelen] = '\0';
- }
- }
-#endif /* NI_WITHSCOPEID */
-
- return 0;
-}
-
-/* ARGSUSED */
-static int
-ip6_sa2str(sa6, buf, bufsiz, flags)
- const struct sockaddr_in6 *sa6;
- char *buf;
- size_t bufsiz;
- int flags;
-{
- unsigned int ifindex = (unsigned int)sa6->sin6_scope_id;
- const struct in6_addr *a6 = &sa6->sin6_addr;
-
-#ifdef NI_NUMERICSCOPE
- if (flags & NI_NUMERICSCOPE) {
- return(snprintf(buf, bufsiz, "%d", sa6->sin6_scope_id));
- }
-#endif
-
- /* if_indextoname() does not take buffer size. not a good api... */
- if ((IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6)) &&
- bufsiz >= IF_NAMESIZE) {
- char *p = if_indextoname(ifindex, buf);
- if (p) {
- return(strlen(p));
- }
- }
-
- /* last resort */
- return(snprintf(buf, bufsiz, "%u", sa6->sin6_scope_id));
-}
-#endif /* INET6 */
diff --git a/newlib/libc/sys/linux/net/getnetbydns.c b/newlib/libc/sys/linux/net/getnetbydns.c
deleted file mode 100644
index 2cc4fce54..000000000
--- a/newlib/libc/sys/linux/net/getnetbydns.c
+++ /dev/null
@@ -1,327 +0,0 @@
-/*-
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-/* Portions Copyright (c) 1993 Carlos Leandro and Rui Salgueiro
- * Dep. Matematica Universidade de Coimbra, Portugal, Europe
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <sys/types.h>
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <ctype.h>
-#include <string.h>
-#include <unistd.h>
-#include <syslog.h>
-#include <stdarg.h>
-#include <nsswitch.h>
-
-#include "res_config.h"
-
-extern int h_errno;
-
-#define BYADDR 0
-#define BYNAME 1
-#define MAXALIASES 35
-
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
-
-typedef union {
- HEADER hdr;
- u_char buf[MAXPACKET];
-} querybuf;
-
-typedef union {
- long al;
- char ac;
-} align;
-
-static struct netent *
-getnetanswer(answer, anslen, net_i)
- querybuf *answer;
- int anslen;
- int net_i;
-{
-
- HEADER *hp;
- u_char *cp;
- int n;
- u_char *eom;
- int type, class, buflen, ancount, qdcount, haveanswer, i, nchar;
- char aux1[MAXHOSTNAMELEN], aux2[MAXHOSTNAMELEN], ans[MAXHOSTNAMELEN];
- char *in, *st, *pauxt, *bp, **ap;
- char *paux1 = &aux1[0], *paux2 = &aux2[0], flag = 0;
-static struct netent net_entry;
-static char *net_aliases[MAXALIASES], netbuf[PACKETSZ];
-
- /*
- * find first satisfactory answer
- *
- * answer --> +------------+ ( MESSAGE )
- * | Header |
- * +------------+
- * | Question | the question for the name server
- * +------------+
- * | Answer | RRs answering the question
- * +------------+
- * | Authority | RRs pointing toward an authority
- * | Additional | RRs holding additional information
- * +------------+
- */
- eom = answer->buf + anslen;
- hp = &answer->hdr;
- ancount = ntohs(hp->ancount); /* #/records in the answer section */
- qdcount = ntohs(hp->qdcount); /* #/entries in the question section */
- bp = netbuf;
- buflen = sizeof(netbuf);
- cp = answer->buf + HFIXEDSZ;
- if (!qdcount) {
- if (hp->aa)
- h_errno = HOST_NOT_FOUND;
- else
- h_errno = TRY_AGAIN;
- return (NULL);
- }
- while (qdcount-- > 0)
- cp += __dn_skipname(cp, eom) + QFIXEDSZ;
- ap = net_aliases;
- *ap = NULL;
- net_entry.n_aliases = net_aliases;
- haveanswer = 0;
- while (--ancount >= 0 && cp < eom) {
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !res_dnok(bp))
- break;
- cp += n;
- ans[0] = '\0';
- (void)strncpy(&ans[0], bp, sizeof(ans) - 1);
- ans[sizeof(ans) - 1] = '\0';
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- cp += INT32SZ; /* TTL */
- GETSHORT(n, cp);
- if (class == C_IN && type == T_PTR) {
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !res_hnok(bp)) {
- cp += n;
- return (NULL);
- }
- cp += n;
- *ap++ = bp;
- bp += strlen(bp) + 1;
- net_entry.n_addrtype =
- (class == C_IN) ? AF_INET : AF_UNSPEC;
- haveanswer++;
- }
- }
- if (haveanswer) {
- *ap = NULL;
- switch (net_i) {
- case BYADDR:
- net_entry.n_name = *net_entry.n_aliases;
- net_entry.n_net = 0L;
- break;
- case BYNAME:
- in = *net_entry.n_aliases;
- net_entry.n_name = &ans[0];
- aux2[0] = '\0';
- for (i = 0; i < 4; i++) {
- for (st = in, nchar = 0;
- *st != '.';
- st++, nchar++)
- ;
- if (nchar != 1 || *in != '0' || flag) {
- flag = 1;
- (void)strncpy(paux1,
- (i==0) ? in : in-1,
- (i==0) ?nchar : nchar+1);
- paux1[(i==0) ? nchar : nchar+1] = '\0';
- pauxt = paux2;
- paux2 = strcat(paux1, paux2);
- paux1 = pauxt;
- }
- in = ++st;
- }
- net_entry.n_net = inet_network(paux2);
- break;
- }
- net_entry.n_aliases++;
- return (&net_entry);
- }
- h_errno = TRY_AGAIN;
- return (NULL);
-}
-
-int
-_dns_getnetbyaddr(void *rval, void *cb_data, va_list ap)
-{
- unsigned long net;
- int net_type;
- unsigned int netbr[4];
- int nn, anslen;
- querybuf buf;
- char qbuf[MAXDNAME];
- unsigned long net2;
- struct netent *net_entry;
-
- net = va_arg(ap, unsigned long);
- net_type = va_arg(ap, int);
-
- *(struct netent **)rval = NULL;
-
- if (net_type != AF_INET)
- return NS_UNAVAIL;
-
- for (nn = 4, net2 = net; net2; net2 >>= 8)
- netbr[--nn] = net2 & 0xff;
- switch (nn) {
- case 3: /* Class A */
- sprintf(qbuf, "0.0.0.%u.in-addr.arpa", netbr[3]);
- break;
- case 2: /* Class B */
- sprintf(qbuf, "0.0.%u.%u.in-addr.arpa", netbr[3], netbr[2]);
- break;
- case 1: /* Class C */
- sprintf(qbuf, "0.%u.%u.%u.in-addr.arpa", netbr[3], netbr[2],
- netbr[1]);
- break;
- case 0: /* Class D - E */
- sprintf(qbuf, "%u.%u.%u.%u.in-addr.arpa", netbr[3], netbr[2],
- netbr[1], netbr[0]);
- break;
- }
- anslen = res_query(qbuf, C_IN, T_PTR, (u_char *)&buf, sizeof(buf));
- if (anslen < 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf("res_query failed\n");
-#endif
- return NS_UNAVAIL;
- }
- net_entry = getnetanswer(&buf, anslen, BYADDR);
- if (net_entry) {
- unsigned u_net = net; /* maybe net should be unsigned ? */
-
- /* Strip trailing zeros */
- while ((u_net & 0xff) == 0 && u_net != 0)
- u_net >>= 8;
- net_entry->n_net = u_net;
- *(struct netent **)rval = net_entry;
- return NS_SUCCESS;
- }
- return NS_NOTFOUND;
-}
-
-int
-_dns_getnetbyname(void *rval, void *cb_data, va_list ap)
-{
- const char *net;
- int anslen;
- querybuf buf;
- char qbuf[MAXDNAME];
-
- net = va_arg(ap, const char *);
-
- *(struct netent**)rval = NULL;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return NS_UNAVAIL;
- }
- strncpy(qbuf, net, sizeof(qbuf) - 1);
- qbuf[sizeof(qbuf) - 1] = '\0';
- anslen = res_search(qbuf, C_IN, T_PTR, (u_char *)&buf, sizeof(buf));
- if (anslen < 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf("res_query failed\n");
-#endif
- return NS_UNAVAIL;
- }
- *(struct netent**)rval = getnetanswer(&buf, anslen, BYNAME);
- return (*(struct netent**)rval != NULL) ? NS_SUCCESS : NS_NOTFOUND;
-}
-
-void
-_setnetdnsent(stayopen)
- int stayopen;
-{
- if (stayopen)
- _res.options |= RES_STAYOPEN | RES_USEVC;
-}
-
-void
-_endnetdnsent()
-{
- _res.options &= ~(RES_STAYOPEN | RES_USEVC);
- res_close();
-}
diff --git a/newlib/libc/sys/linux/net/getnetbyht.c b/newlib/libc/sys/linux/net/getnetbyht.c
deleted file mode 100644
index 8e4a16f1c..000000000
--- a/newlib/libc/sys/linux/net/getnetbyht.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/* Portions Copyright (c) 1993 Carlos Leandro and Rui Salgueiro
- * Dep. Matematica Universidade de Coimbra, Portugal, Europe
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * from getnetent.c 1.1 (Coimbra) 93/06/02
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getnetent.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: getnetent.c,v 8.4 1997/06/01 20:34:37 vixie Exp";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <nsswitch.h>
-
-#define MAXALIASES 35
-
-static FILE *netf;
-static char line[BUFSIZ+1];
-static struct netent net;
-static char *net_aliases[MAXALIASES];
-static int _net_stayopen;
-
-void
-_setnethtent(f)
- int f;
-{
-
- if (netf == NULL)
- netf = fopen(_PATH_NETWORKS, "r" );
- else
- rewind(netf);
- _net_stayopen |= f;
-}
-
-void
-_endnethtent()
-{
-
- if (netf) {
- fclose(netf);
- netf = NULL;
- }
- _net_stayopen = 0;
-}
-
-struct netent *
-getnetent()
-{
- char *p;
- char *cp, **q;
-
- if (netf == NULL && (netf = fopen(_PATH_NETWORKS, "r" )) == NULL)
- return (NULL);
-again:
- p = fgets(line, sizeof line, netf);
- if (p == NULL)
- return (NULL);
- if (*p == '#')
- goto again;
- cp = strpbrk(p, "#\n");
- if (cp == NULL)
- goto again;
- *cp = '\0';
- net.n_name = p;
- cp = strpbrk(p, " \t");
- if (cp == NULL)
- goto again;
- *cp++ = '\0';
- while (*cp == ' ' || *cp == '\t')
- cp++;
- p = strpbrk(cp, " \t");
- if (p != NULL)
- *p++ = '\0';
- net.n_net = inet_network(cp);
- net.n_addrtype = AF_INET;
- q = net.n_aliases = net_aliases;
- if (p != NULL)
- cp = p;
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &net_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&net);
-}
-
-int
-_ht_getnetbyname(void *rval, void *cb_data, va_list ap)
-{
- const char *name;
- struct netent *p;
- char **cp;
-
- name = va_arg(ap, const char *);
-
- setnetent(_net_stayopen);
- while ( (p = getnetent()) ) {
- if (strcasecmp(p->n_name, name) == 0)
- break;
- for (cp = p->n_aliases; *cp != 0; cp++)
- if (strcasecmp(*cp, name) == 0)
- goto found;
- }
-found:
- if (!_net_stayopen)
- endnetent();
- *(struct netent **)rval = p;
- return (p != NULL) ? NS_SUCCESS : NS_NOTFOUND;
-}
-
-int
-_ht_getnetbyaddr(void *rval, void *cb_data, va_list ap)
-{
- unsigned long net;
- int type;
- struct netent *p;
-
- net = va_arg(ap, unsigned long);
- type = va_arg(ap, int);
-
- setnetent(_net_stayopen);
- while ( (p = getnetent()) )
- if (p->n_addrtype == type && p->n_net == net)
- break;
- if (!_net_stayopen)
- endnetent();
- *(struct netent **)rval = p;
- return (p != NULL) ? NS_SUCCESS : NS_NOTFOUND;
-}
diff --git a/newlib/libc/sys/linux/net/getnetbynis.c b/newlib/libc/sys/linux/net/getnetbynis.c
deleted file mode 100644
index 6d222e60f..000000000
--- a/newlib/libc/sys/linux/net/getnetbynis.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * 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 CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <sys/types.h>
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <stdarg.h>
-#include <nsswitch.h>
-#include <arpa/nameser.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-#define MAXALIASES 35
-#define MAXADDRS 35
-
-#ifdef YP
-static char *host_aliases[MAXALIASES];
-
-static struct netent *
-_getnetbynis(const char *name, char *map, int af)
-{
- char *cp, **q;
- static char *result;
- int resultlen;
- static struct netent h;
- static char *domain = (char *)NULL;
- static char ypbuf[YPMAXRECORD + 2];
-
- switch(af) {
- case AF_INET:
- break;
- default:
- case AF_INET6:
- errno = EAFNOSUPPORT;
- return NULL;
- }
-
- if (domain == (char *)NULL)
- if (yp_get_default_domain (&domain))
- return (NULL);
-
- if (yp_match(domain, map, name, strlen(name), &result, &resultlen))
- return (NULL);
-
- bcopy((char *)result, (char *)&ypbuf, resultlen);
- ypbuf[resultlen] = '\0';
- free(result);
- result = (char *)&ypbuf;
-
- if ((cp = index(result, '\n')))
- *cp = '\0';
-
- cp = strpbrk(result, " \t");
- *cp++ = '\0';
- h.n_name = result;
-
- while (*cp == ' ' || *cp == '\t')
- cp++;
-
- h.n_net = inet_network(cp);
- h.n_addrtype = AF_INET;
-
- q = h.n_aliases = host_aliases;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &host_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&h);
-}
-#endif /* YP */
-
-int
-_nis_getnetbyname(void *rval, void *cb_data, va_list ap)
-{
-#ifdef YP
- const char *name;
-
- name = va_arg(ap, const char *);
-
- *(struct netent **)rval = _getnetbynis(name, "networks.byname", AF_INET);
- return (*(struct netent **)rval != NULL) ? NS_SUCCESS : NS_NOTFOUND;
-#else
- return NS_UNAVAIL;
-#endif
-
-}
-
-int
-_nis_getnetbyaddr(void *rval, void *cb_data, va_list ap)
-{
-#ifdef YP
- unsigned long addr;
- int af;
- char *str, *cp;
- unsigned long net2;
- int nn;
- unsigned int netbr[4];
- char buf[MAXDNAME];
-
- addr = va_arg(ap, unsigned long);
- af = va_arg(ap, int);
-
- *(struct netent **)rval = NULL;
-
- if (af != AF_INET) {
- errno = EAFNOSUPPORT;
- return NS_UNAVAIL;
- }
-
- for (nn = 4, net2 = addr; net2; net2 >>= 8) {
- netbr[--nn] = net2 & 0xff;
- }
-
- switch (nn) {
- case 3: /* Class A */
- sprintf(buf, "%u", netbr[3]);
- break;
- case 2: /* Class B */
- sprintf(buf, "%u.%u", netbr[2], netbr[3]);
- break;
- case 1: /* Class C */
- sprintf(buf, "%u.%u.%u", netbr[1], netbr[2], netbr[3]);
- break;
- case 0: /* Class D - E */
- sprintf(buf, "%u.%u.%u.%u", netbr[0], netbr[1],
- netbr[2], netbr[3]);
- break;
- }
-
- str = (char *)&buf;
- cp = str + (strlen(str) - 2);
-
- while(!strcmp(cp, ".0")) {
- *cp = '\0';
- cp = str + (strlen(str) - 2);
- }
-
- *(struct netent **)rval = _getnetbynis(str, "networks.byaddr", af);
- return (*(struct netent**)rval != NULL) ? NS_SUCCESS : NS_NOTFOUND;
-#else
- return NS_UNAVAIL;
-#endif /* YP */
-}
diff --git a/newlib/libc/sys/linux/net/getnetent.3 b/newlib/libc/sys/linux/net/getnetent.3
deleted file mode 100644
index 6801e9707..000000000
--- a/newlib/libc/sys/linux/net/getnetent.3
+++ /dev/null
@@ -1,172 +0,0 @@
-.\" Copyright (c) 1983, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getnetent.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/net/getnetent.3,v 1.17 2002/01/14 16:59:01 ru Exp $
-.\"
-.Dd June 4, 1993
-.Dt GETNETENT 3
-.Os
-.Sh NAME
-.Nm getnetent ,
-.Nm getnetbyaddr ,
-.Nm getnetbyname ,
-.Nm setnetent ,
-.Nm endnetent
-.Nd get network entry
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In netdb.h
-.Ft struct netent *
-.Fn getnetent void
-.Ft struct netent *
-.Fn getnetbyname "const char *name"
-.Ft struct netent *
-.Fn getnetbyaddr "unsigned long net" "int type"
-.Ft void
-.Fn setnetent "int stayopen"
-.Ft void
-.Fn endnetent void
-.Sh DESCRIPTION
-The
-.Fn getnetent ,
-.Fn getnetbyname ,
-and
-.Fn getnetbyaddr
-functions
-each return a pointer to an object with the
-following structure describing an internet network.
-This structure contains either the information obtained
-from the nameserver,
-.Xr named 8 ,
-broken-out fields of a line in the network data base
-.Pa /etc/networks ,
-or entries supplied by the
-.Xr yp 8
-system. The order of the lookups is controlled by the
-`networks' entry in
-.Xr nsswitch.conf 5 .
-.Pp
-.Bd -literal -offset indent
-struct netent {
- char *n_name; /* official name of net */
- char **n_aliases; /* alias list */
- int n_addrtype; /* net number type */
- unsigned long n_net; /* net number */
-};
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width n_addrtype
-.It Fa n_name
-The official name of the network.
-.It Fa n_aliases
-A zero terminated list of alternate names for the network.
-.It Fa n_addrtype
-The type of the network number returned; currently only AF_INET.
-.It Fa n_net
-The network number. Network numbers are returned in machine byte
-order.
-.El
-.Pp
-The
-.Fn getnetent
-function
-reads the next line of the file, opening the file if necessary.
-.Pp
-The
-.Fn setnetent
-function
-opens and rewinds the file. If the
-.Fa stayopen
-flag is non-zero,
-the net data base will not be closed after each call to
-.Fn getnetbyname
-or
-.Fn getnetbyaddr .
-.Pp
-The
-.Fn endnetent
-function
-closes the file.
-.Pp
-The
-.Fn getnetbyname
-function
-and
-.Fn getnetbyaddr
-sequentially search from the beginning
-of the file until a matching
-net name or
-net address and type is found,
-or until
-.Dv EOF
-is encountered.
-The
-.Fa type
-must be
-.Dv AF_INET .
-Network numbers are supplied in host order.
-.Sh FILES
-.Bl -tag -width /etc/nsswitch.conf -compact
-.It Pa /etc/networks
-.It Pa /etc/nsswitch.conf
-.It Pa /etc/resolv.conf
-.El
-.Sh DIAGNOSTICS
-Null pointer
-(0) returned on
-.Dv EOF
-or error.
-.Sh SEE ALSO
-.Xr networks 5
-.Pp
-.%T RFC 1101
-.Sh HISTORY
-The
-.Fn getnetent ,
-.Fn getnetbyaddr ,
-.Fn getnetbyname ,
-.Fn setnetent ,
-and
-.Fn endnetent
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-The data space used by
-these functions is static; if future use requires the data, it should be
-copied before any subsequent calls to these functions overwrite it.
-Only Internet network
-numbers are currently understood.
-Expecting network numbers to fit
-in no more than 32 bits is probably
-naive.
diff --git a/newlib/libc/sys/linux/net/getnetnamadr.c b/newlib/libc/sys/linux/net/getnetnamadr.c
deleted file mode 100644
index 180ab14e2..000000000
--- a/newlib/libc/sys/linux/net/getnetnamadr.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * 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 CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <sys/types.h>
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <stdarg.h>
-#include <nsswitch.h>
-
-extern int _ht_getnetbyname(void *, void *, va_list);
-extern int _dns_getnetbyname(void *, void *, va_list);
-extern int _nis_getnetbyname(void *, void *, va_list);
-extern int _ht_getnetbyaddr(void *, void *, va_list);
-extern int _dns_getnetbyaddr(void *, void *, va_list);
-extern int _nis_getnetbyaddr(void *, void *, va_list);
-
-/* Network lookup order if nsswitch.conf is broken or nonexistant */
-static const ns_src default_src[] = {
- { NSSRC_FILES, NS_SUCCESS },
- { NSSRC_DNS, NS_SUCCESS },
- { 0 }
-};
-
-struct netent *
-getnetbyname(const char *name)
-{
- struct netent *hp = 0;
- int rval;
-
-
- static const ns_dtab dtab[] = {
- NS_FILES_CB(_ht_getnetbyname, NULL)
- { NSSRC_DNS, _dns_getnetbyname, NULL },
- NS_NIS_CB(_nis_getnetbyname, NULL) /* force -DHESIOD */
- { 0 }
- };
-
- rval = nsdispatch((void *)&hp, dtab, NSDB_NETWORKS, "getnetbyname",
- default_src, name);
-
- if (rval != NS_SUCCESS)
- return NULL;
- else
- return hp;
-}
-
-struct netent *
-getnetbyaddr(u_long addr, int af)
-{
- struct netent *hp = 0;
- int rval;
-
- static const ns_dtab dtab[] = {
- NS_FILES_CB(_ht_getnetbyaddr, NULL)
- { NSSRC_DNS, _dns_getnetbyaddr, NULL },
- NS_NIS_CB(_nis_getnetbyaddr, NULL) /* force -DHESIOD */
- { 0 }
- };
-
- rval = nsdispatch((void *)&hp, dtab, NSDB_NETWORKS, "getnetbyaddr",
- default_src, addr, af);
-
- if (rval != NS_SUCCESS)
- return NULL;
- else
- return hp;
-}
-
-void
-setnetent(stayopen)
- int stayopen;
-{
- _setnethtent(stayopen);
- _setnetdnsent(stayopen);
-}
-
-void
-endnetent()
-{
- _endnethtent();
- _endnetdnsent();
-}
diff --git a/newlib/libc/sys/linux/net/getproto.c b/newlib/libc/sys/linux/net/getproto.c
deleted file mode 100644
index 937c30732..000000000
--- a/newlib/libc/sys/linux/net/getproto.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getproto.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <netdb.h>
-
-extern int _proto_stayopen;
-
-struct protoent *
-getprotobynumber(proto)
- int proto;
-{
- struct protoent *p;
-
- setprotoent(_proto_stayopen);
- while ( (p = getprotoent()) )
- if (p->p_proto == proto)
- break;
- if (!_proto_stayopen)
- endprotoent();
- return (p);
-}
diff --git a/newlib/libc/sys/linux/net/getprotoent.3 b/newlib/libc/sys/linux/net/getprotoent.3
deleted file mode 100644
index 18b56541b..000000000
--- a/newlib/libc/sys/linux/net/getprotoent.3
+++ /dev/null
@@ -1,149 +0,0 @@
-.\" Copyright (c) 1983, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getprotoent.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/net/getprotoent.3,v 1.8 2001/10/01 16:08:55 ru Exp $
-.\"
-.Dd June 4, 1993
-.Dt GETPROTOENT 3
-.Os
-.Sh NAME
-.Nm getprotoent ,
-.Nm getprotobynumber ,
-.Nm getprotobyname ,
-.Nm setprotoent ,
-.Nm endprotoent
-.Nd get protocol entry
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In netdb.h
-.Ft struct protoent *
-.Fn getprotoent void
-.Ft struct protoent *
-.Fn getprotobyname "const char *name"
-.Ft struct protoent *
-.Fn getprotobynumber "int proto"
-.Ft void
-.Fn setprotoent "int stayopen"
-.Ft void
-.Fn endprotoent void
-.Sh DESCRIPTION
-The
-.Fn getprotoent ,
-.Fn getprotobyname ,
-and
-.Fn getprotobynumber
-functions
-each return a pointer to an object with the
-following structure
-containing the broken-out
-fields of a line in the network protocol data base,
-.Pa /etc/protocols .
-.Bd -literal -offset indent
-.Pp
-struct protoent {
- char *p_name; /* official name of protocol */
- char **p_aliases; /* alias list */
- int p_proto; /* protocol number */
-};
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width p_aliases
-.It Fa p_name
-The official name of the protocol.
-.It Fa p_aliases
-A zero terminated list of alternate names for the protocol.
-.It Fa p_proto
-The protocol number.
-.El
-.Pp
-The
-.Fn getprotoent
-function
-reads the next line of the file, opening the file if necessary.
-.Pp
-The
-.Fn setprotoent
-function
-opens and rewinds the file. If the
-.Fa stayopen
-flag is non-zero,
-the net data base will not be closed after each call to
-.Fn getprotobyname
-or
-.Fn getprotobynumber .
-.Pp
-The
-.Fn endprotoent
-function
-closes the file.
-.Pp
-The
-.Fn getprotobyname
-function
-and
-.Fn getprotobynumber
-sequentially search from the beginning
-of the file until a matching
-protocol name or
-protocol number is found,
-or until
-.Dv EOF
-is encountered.
-.Sh RETURN VALUES
-Null pointer
-(0) returned on
-.Dv EOF
-or error.
-.Sh FILES
-.Bl -tag -width /etc/protocols -compact
-.It Pa /etc/protocols
-.El
-.Sh SEE ALSO
-.Xr protocols 5
-.Sh HISTORY
-The
-.Fn getprotoent ,
-.Fn getprotobynumber ,
-.Fn getprotobyname ,
-.Fn setprotoent ,
-and
-.Fn endprotoent
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-These functions use a static data space;
-if the data is needed for future use, it should be
-copied before any subsequent calls overwrite it.
-Only the Internet
-protocols are currently understood.
diff --git a/newlib/libc/sys/linux/net/getprotoent.c b/newlib/libc/sys/linux/net/getprotoent.c
deleted file mode 100644
index 422eeacea..000000000
--- a/newlib/libc/sys/linux/net/getprotoent.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getprotoent.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define MAXALIASES 35
-
-static FILE *protof = NULL;
-static char line[BUFSIZ+1];
-static struct protoent proto;
-static char *proto_aliases[MAXALIASES];
-int _proto_stayopen;
-
-void
-setprotoent(f)
- int f;
-{
- if (protof == NULL)
- protof = fopen(_PATH_PROTOCOLS, "r" );
- else
- rewind(protof);
- _proto_stayopen |= f;
-}
-
-void
-endprotoent()
-{
- if (protof) {
- fclose(protof);
- protof = NULL;
- }
- _proto_stayopen = 0;
-}
-
-struct protoent *
-getprotoent()
-{
- char *p;
- char *cp, **q;
-
- if (protof == NULL && (protof = fopen(_PATH_PROTOCOLS, "r" )) == NULL)
- return (NULL);
-again:
- if ((p = fgets(line, BUFSIZ, protof)) == NULL)
- return (NULL);
- if (*p == '#')
- goto again;
- cp = strpbrk(p, "#\n");
- if (cp == NULL)
- goto again;
- *cp = '\0';
- proto.p_name = p;
- cp = strpbrk(p, " \t");
- if (cp == NULL)
- goto again;
- *cp++ = '\0';
- while (*cp == ' ' || *cp == '\t')
- cp++;
- p = strpbrk(cp, " \t");
- if (p != NULL)
- *p++ = '\0';
- proto.p_proto = atoi(cp);
- q = proto.p_aliases = proto_aliases;
- if (p != NULL) {
- cp = p;
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &proto_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- }
- *q = NULL;
- return (&proto);
-}
diff --git a/newlib/libc/sys/linux/net/getprotoname.c b/newlib/libc/sys/linux/net/getprotoname.c
deleted file mode 100644
index f25883fe8..000000000
--- a/newlib/libc/sys/linux/net/getprotoname.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getprotoname.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <netdb.h>
-#include <string.h>
-
-extern int _proto_stayopen;
-
-struct protoent *
-getprotobyname(name)
- const char *name;
-{
- struct protoent *p;
- char **cp;
-
- setprotoent(_proto_stayopen);
- while ( (p = getprotoent()) ) {
- if (strcmp(p->p_name, name) == 0)
- break;
- for (cp = p->p_aliases; *cp != 0; cp++)
- if (strcmp(*cp, name) == 0)
- goto found;
- }
-found:
- if (!_proto_stayopen)
- endprotoent();
- return (p);
-}
diff --git a/newlib/libc/sys/linux/net/getservbyname.c b/newlib/libc/sys/linux/net/getservbyname.c
deleted file mode 100644
index ced03d617..000000000
--- a/newlib/libc/sys/linux/net/getservbyname.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getservbyname.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <netdb.h>
-#include <string.h>
-
-extern int _serv_stayopen;
-
-struct servent *
-getservbyname(name, proto)
- const char *name, *proto;
-{
- struct servent *p;
- char **cp;
-
-#ifdef YP
- extern char *___getservbyname_yp;
- extern char *___getservbyproto_yp;
-
- ___getservbyname_yp = (char *)name;
- ___getservbyproto_yp = (char *)proto;
-#endif
-
- setservent(_serv_stayopen);
- while ( (p = getservent()) ) {
- if (strcmp(name, p->s_name) == 0)
- goto gotname;
- for (cp = p->s_aliases; *cp; cp++)
- if (strcmp(name, *cp) == 0)
- goto gotname;
- continue;
-gotname:
- if (proto == 0 || strcmp(p->s_proto, proto) == 0)
- break;
- }
- if (!_serv_stayopen)
- endservent();
-
-#ifdef YP
- ___getservbyname_yp = NULL;
- ___getservbyproto_yp = NULL;
-#endif
-
- return (p);
-}
diff --git a/newlib/libc/sys/linux/net/getservbyport.c b/newlib/libc/sys/linux/net/getservbyport.c
deleted file mode 100644
index 88b684da4..000000000
--- a/newlib/libc/sys/linux/net/getservbyport.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getservbyport.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <netdb.h>
-#include <string.h>
-
-extern int _serv_stayopen;
-
-struct servent *
-getservbyport(port, proto)
- int port;
- const char *proto;
-{
- struct servent *p;
-
-#ifdef YP
- extern int ___getservbyport_yp;
- extern char *___getservbyproto_yp;
-
- ___getservbyport_yp = port;
- ___getservbyproto_yp = (char *)proto;
-#endif
-
- setservent(_serv_stayopen);
- while ( (p = getservent()) ) {
- if (p->s_port != port)
- continue;
- if (proto == 0 || strcmp(p->s_proto, proto) == 0)
- break;
- }
- if (!_serv_stayopen)
- endservent();
-
-#ifdef YP
- ___getservbyport_yp = 0;
- ___getservbyproto_yp = NULL;
-#endif
-
- return (p);
-}
diff --git a/newlib/libc/sys/linux/net/getservent.3 b/newlib/libc/sys/linux/net/getservent.3
deleted file mode 100644
index 3d398bdb1..000000000
--- a/newlib/libc/sys/linux/net/getservent.3
+++ /dev/null
@@ -1,158 +0,0 @@
-.\" Copyright (c) 1983, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)getservent.3 8.3 (Berkeley) 1/12/94
-.\" $FreeBSD: src/lib/libc/net/getservent.3,v 1.12 2001/10/01 16:08:55 ru Exp $
-.\"
-.Dd July 9, 1995
-.Dt GETSERVENT 3
-.Os
-.Sh NAME
-.Nm getservent ,
-.Nm getservbyport ,
-.Nm getservbyname ,
-.Nm setservent ,
-.Nm endservent
-.Nd get service entry
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In netdb.h
-.Ft struct servent *
-.Fn getservent
-.Ft struct servent *
-.Fn getservbyname "const char *name" "const char *proto"
-.Ft struct servent *
-.Fn getservbyport "int port" "const char *proto"
-.Ft void
-.Fn setservent "int stayopen"
-.Ft void
-.Fn endservent void
-.Sh DESCRIPTION
-The
-.Fn getservent ,
-.Fn getservbyname ,
-and
-.Fn getservbyport
-functions
-each return a pointer to an object with the
-following structure
-containing the broken-out
-fields of a line in the network services data base,
-.Pa /etc/services .
-.Bd -literal -offset indent
-struct servent {
- char *s_name; /* official name of service */
- char **s_aliases; /* alias list */
- int s_port; /* port service resides at */
- char *s_proto; /* protocol to use */
-};
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width s_aliases
-.It Fa s_name
-The official name of the service.
-.It Fa s_aliases
-A zero terminated list of alternate names for the service.
-.It Fa s_port
-The port number at which the service resides.
-Port numbers are returned in network byte order.
-.It Fa s_proto
-The name of the protocol to use when contacting the
-service.
-.El
-.Pp
-The
-.Fn getservent
-function
-reads the next line of the file, opening the file if necessary.
-.Pp
-The
-.Fn setservent
-function
-opens and rewinds the file. If the
-.Fa stayopen
-flag is non-zero,
-the net data base will not be closed after each call to
-.Fn getservbyname
-or
-.Fn getservbyport .
-.Pp
-The
-.Fn endservent
-function
-closes the file.
-.Pp
-The
-.Fn getservbyname
-and
-.Fn getservbyport
-functions
-sequentially search from the beginning
-of the file until a matching
-protocol name or
-port number (which must be specified in
-network byte order) is found,
-or until
-.Dv EOF
-is encountered.
-If a protocol name is also supplied (non-
-.Dv NULL ) ,
-searches must also match the protocol.
-.Sh FILES
-.Bl -tag -width /etc/services -compact
-.It Pa /etc/services
-.El
-.Sh DIAGNOSTICS
-Null pointer
-(0) returned on
-.Dv EOF
-or error.
-.Sh SEE ALSO
-.Xr getprotoent 3 ,
-.Xr services 5
-.Sh HISTORY
-The
-.Fn getservent ,
-.Fn getservbyport ,
-.Fn getservbyname ,
-.Fn setservent ,
-and
-.Fn endservent
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-These functions use static data storage;
-if the data is needed for future use, it should be
-copied before any subsequent calls overwrite it.
-Expecting port numbers to fit in a 32 bit
-quantity is probably naive.
diff --git a/newlib/libc/sys/linux/net/getservent.c b/newlib/libc/sys/linux/net/getservent.c
deleted file mode 100644
index 1c26df75c..000000000
--- a/newlib/libc/sys/linux/net/getservent.c
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getservent.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/endian.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-static int serv_stepping_yp = 0;
-extern int _yp_check( char ** );
-#endif
-
-
-#define MAXALIASES 35
-
-static FILE *servf = NULL;
-static char line[BUFSIZ+1];
-static struct servent serv;
-static char *serv_aliases[MAXALIASES];
-int _serv_stayopen;
-
-#ifdef YP
-char *___getservbyname_yp = NULL;
-char *___getservbyproto_yp = NULL;
-int ___getservbyport_yp = 0;
-static char *yp_domain = NULL;
-
-static int
-_getservbyport_yp(line)
- char *line;
-{
- char *result;
- int resultlen;
- char buf[YPMAXRECORD + 2];
- int rv;
-
- snprintf(buf, sizeof(buf), "%d/%s", ntohs(___getservbyport_yp),
- ___getservbyproto_yp);
-
- ___getservbyport_yp = 0;
- ___getservbyproto_yp = NULL;
-
- if(!yp_domain) {
- if(yp_get_default_domain(&yp_domain))
- return (0);
- }
-
- /*
- * We have to be a little flexible here. Ideally you're supposed
- * to have both a services.byname and a services.byport map, but
- * some systems have only services.byname. FreeBSD cheats a little
- * by putting the services.byport information in the same map as
- * services.byname so that either case will work. We allow for both
- * possibilities here: if there is no services.byport map, we try
- * services.byname instead.
- */
- if ((rv = yp_match(yp_domain, "services.byport", buf, strlen(buf),
- &result, &resultlen))) {
- if (rv == YPERR_MAP) {
- if (yp_match(yp_domain, "services.byname", buf,
- strlen(buf), &result, &resultlen))
- return(0);
- } else
- return(0);
- }
-
- /* getservent() expects lines terminated with \n -- make it happy */
- snprintf(line, BUFSIZ, "%.*s\n", resultlen, result);
-
- free(result);
- return(1);
-}
-
-static int
-_getservbyname_yp(line)
- char *line;
-{
- char *result;
- int resultlen;
- char buf[YPMAXRECORD + 2];
-
- if(!yp_domain) {
- if(yp_get_default_domain(&yp_domain))
- return (0);
- }
-
- snprintf(buf, sizeof(buf), "%s/%s", ___getservbyname_yp,
- ___getservbyproto_yp);
-
- ___getservbyname_yp = 0;
- ___getservbyproto_yp = NULL;
-
- if (yp_match(yp_domain, "services.byname", buf, strlen(buf),
- &result, &resultlen)) {
- return(0);
- }
-
- /* getservent() expects lines terminated with \n -- make it happy */
- snprintf(line, BUFSIZ, "%.*s\n", resultlen, result);
-
- free(result);
- return(1);
-}
-
-static int
-_getservent_yp(line)
- char *line;
-{
- static char *key = NULL;
- static int keylen;
- char *lastkey, *result;
- int resultlen;
- int rv;
-
- if(!yp_domain) {
- if(yp_get_default_domain(&yp_domain))
- return (0);
- }
-
- if (!serv_stepping_yp) {
- if (key)
- free(key);
- if ((rv = yp_first(yp_domain, "services.byname", &key, &keylen,
- &result, &resultlen))) {
- serv_stepping_yp = 0;
- return(0);
- }
- serv_stepping_yp = 1;
- } else {
- lastkey = key;
- rv = yp_next(yp_domain, "services.byname", key, keylen, &key,
- &keylen, &result, &resultlen);
- free(lastkey);
- if (rv) {
- serv_stepping_yp = 0;
- return (0);
- }
- }
-
- /* getservent() expects lines terminated with \n -- make it happy */
- snprintf(line, BUFSIZ, "%.*s\n", resultlen, result);
-
- free(result);
-
- return(1);
-}
-#endif
-
-void
-setservent(f)
- int f;
-{
- if (servf == NULL)
- servf = fopen(_PATH_SERVICES, "r" );
- else
- rewind(servf);
- _serv_stayopen |= f;
-}
-
-void
-endservent()
-{
- if (servf) {
- fclose(servf);
- servf = NULL;
- }
- _serv_stayopen = 0;
-}
-
-struct servent *
-getservent()
-{
- char *p;
- char *cp, **q;
-
-#ifdef YP
- if (serv_stepping_yp && _getservent_yp(line)) {
- p = (char *)&line;
- goto unpack;
- }
-tryagain:
-#endif
- if (servf == NULL && (servf = fopen(_PATH_SERVICES, "r" )) == NULL)
- return (NULL);
-again:
- if ((p = fgets(line, BUFSIZ, servf)) == NULL)
- return (NULL);
-#ifdef YP
- if (*p == '+' && _yp_check(NULL)) {
- if (___getservbyname_yp != NULL) {
- if (!_getservbyname_yp(line))
- goto tryagain;
- }
- else if (___getservbyport_yp != 0) {
- if (!_getservbyport_yp(line))
- goto tryagain;
- }
- else if (!_getservent_yp(line))
- goto tryagain;
- }
-unpack:
-#endif
- if (*p == '#')
- goto again;
- cp = strpbrk(p, "#\n");
- if (cp == NULL)
- goto again;
- *cp = '\0';
- serv.s_name = p;
- p = strpbrk(p, " \t");
- if (p == NULL)
- goto again;
- *p++ = '\0';
- while (*p == ' ' || *p == '\t')
- p++;
- cp = strpbrk(p, ",/");
- if (cp == NULL)
- goto again;
- *cp++ = '\0';
- serv.s_port = htons((u_short)atoi(p));
- serv.s_proto = cp;
- q = serv.s_aliases = serv_aliases;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &serv_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&serv);
-}
diff --git a/newlib/libc/sys/linux/net/herror.c b/newlib/libc/sys/linux/net/herror.c
deleted file mode 100644
index 0edec9890..000000000
--- a/newlib/libc/sys/linux/net/herror.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)herror.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include "namespace.h"
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <netdb.h>
-#include <string.h>
-#include <unistd.h>
-#include "un-namespace.h"
-
-const char *h_errlist[] = {
- "Resolver Error 0 (no error)",
- "Unknown host", /* 1 HOST_NOT_FOUND */
- "Host name lookup failure", /* 2 TRY_AGAIN */
- "Unknown server error", /* 3 NO_RECOVERY */
- "No address associated with name", /* 4 NO_ADDRESS */
-};
-int h_nerr = { sizeof h_errlist / sizeof h_errlist[0] };
-
-int h_errno;
-
-/*
- * herror --
- * print the error indicated by the h_errno value.
- */
-void
-herror(s)
- const char *s;
-{
- char *ptr;
- if (s && *s) {
- write(STDERR_FILENO, s, strlen(s));
- write(STDERR_FILENO, ": ", 2);
- }
- ptr = (char *)hstrerror(h_errno);
- write(STDERR_FILENO, ptr, strlen(ptr));
- write(STDERR_FILENO, "\n", 1);
-}
-
-const char *
-hstrerror(err)
- int err;
-{
- if (err < 0)
- return ("Resolver internal error");
- else if (err < h_nerr)
- return (h_errlist[err]);
- return ("Unknown resolver error");
-}
diff --git a/newlib/libc/sys/linux/net/hesiod.3 b/newlib/libc/sys/linux/net/hesiod.3
deleted file mode 100644
index 8de1f9247..000000000
--- a/newlib/libc/sys/linux/net/hesiod.3
+++ /dev/null
@@ -1,159 +0,0 @@
-.\" $NetBSD: hesiod.3,v 1.1 1999/01/25 03:43:04 lukem Exp $
-.\" $FreeBSD: src/lib/libc/net/hesiod.3,v 1.3 2001/10/01 16:08:55 ru Exp $
-.\"
-.\" from: #Id: hesiod.3,v 1.9.2.1 1997/01/03 21:02:23 ghudson Exp #
-.\"
-.\" Copyright 1988, 1996 by the Massachusetts Institute of Technology.
-.\"
-.\" Permission to use, copy, modify, and distribute this
-.\" software and its documentation for any purpose and without
-.\" fee is hereby granted, provided that the above copyright
-.\" notice appear in all copies and that both that copyright
-.\" notice and this permission notice appear in supporting
-.\" documentation, and that the name of M.I.T. not be used in
-.\" advertising or publicity pertaining to distribution of the
-.\" software without specific, written prior permission.
-.\" M.I.T. makes no representations about the suitability of
-.\" this software for any purpose. It is provided "as is"
-.\" without express or implied warranty.
-.\"
-.Dd November 30, 1996
-.Dt HESIOD 3
-.Os
-.Sh NAME
-.Nm hesiod ,
-.Nm hesiod_init ,
-.Nm hesiod_resolve ,
-.Nm hesiod_free_list ,
-.Nm hesiod_to_bind ,
-.Nm hesiod_end
-.Nd Hesiod name server interface library
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In hesiod.h
-.Ft int
-.Fn hesiod_init "void **context"
-.Ft char **
-.Fn hesiod_resolve "void *context" "const char *name" "const char *type"
-.Ft void
-.Fn hesiod_free_list "void *context" "char **list"
-.Ft char *
-.Fn hesiod_to_bind "void *context" "const char *name" "const char *type"
-.Ft void
-.Fn hesiod_end "void *context"
-.Sh DESCRIPTION
-This family of functions allows you to perform lookups of Hesiod
-information, which is stored as text records in the Domain Name
-Service.
-To perform lookups, you must first initialize a
-.Fa context ,
-an opaque object which stores information used internally by the
-library between calls.
-.Fn hesiod_init
-initializes a context, storing a pointer to the context in the
-location pointed to by the
-.Fa context
-argument.
-.Fn hesiod_end
-frees the resources used by a context.
-.Pp
-.Fn hesiod_resolve
-is the primary interface to the library.
-If successful, it returns a
-list of one or more strings giving the records matching
-.Fa name
-and
-.Fa type .
-The last element of the list is followed by a
-.Dv NULL
-pointer.
-It is the
-caller's responsibility to call
-.Fn hesiod_free_list
-to free the resources used by the returned list.
-.Pp
-.Fn hesiod_to_bind
-converts
-.Fa name
-and
-.Fa type
-into the DNS name used by
-.Fn hesiod_resolve .
-It is the caller's responsibility to free the returned string using
-.Fn free .
-.Sh RETURN VALUES
-.Rv -std hesiod_init
-On failure,
-.Fn hesiod_resolve
-and
-.Fn hesiod_to_bind
-return
-.Dv NULL
-and set the global variable
-.Va errno
-to indicate the error.
-.Sh ENVIRONMENT
-.Bl -tag -width HESIOD_CONFIG
-.It Ev HES_DOMAIN
-If the environment variable
-.Ev HES_DOMAIN
-is set, it will override the domain in the Hesiod configuration file.
-.It Ev HESIOD_CONFIG
-If the environment variable
-.Ev HESIOD_CONFIG
-is set, it specifies the location of the Hesiod configuration file.
-.El
-.Sh SEE ALSO
-.Xr hesiod.conf 5 ,
-.Xr named 8
-.Rs
-.%T "Hesiod - Project Athena Technical Plan -- Name Service"
-.Re
-.Sh ERRORS
-Hesiod calls may fail because of:
-.Bl -tag -width Er
-.It Bq Er ENOMEM
-Insufficient memory was available to carry out the requested
-operation.
-.It Bq Er ENOEXEC
-.Fn hesiod_init
-failed because the Hesiod configuration file was invalid.
-.It Bq Er ECONNREFUSED
-.Fn hesiod_resolve
-failed because no name server could be contacted to answer the query.
-.It Bq Er EMSGSIZE
-.Fn hesiod_resolve
-or
-.Fn hesiod_to_bind
-failed because the query or response was too big to fit into the
-packet buffers.
-.It Bq Er ENOENT
-.Fn hesiod_resolve
-failed because the name server had no text records matching
-.Fa name
-and
-.Fa type ,
-or
-.Fn hesiod_to_bind
-failed because the
-.Fa name
-argument had a domain extension which could not be resolved with type
-.Dq rhs\-extension
-in the local Hesiod domain.
-.El
-.Sh AUTHORS
-.An Steve Dyer ,
-IBM/Project Athena
-.An Greg Hudson ,
-MIT Team Athena
-.Pp
-Copyright 1987, 1988, 1995, 1996 by the Massachusetts Institute of Technology.
-.Sh BUGS
-The strings corresponding to the
-.Va errno
-values set by the Hesiod functions are not particularly indicative of
-what went wrong, especially for
-.Er ENOEXEC
-and
-.Er ENOENT .
diff --git a/newlib/libc/sys/linux/net/hesiod.c b/newlib/libc/sys/linux/net/hesiod.c
deleted file mode 100644
index 909c09440..000000000
--- a/newlib/libc/sys/linux/net/hesiod.c
+++ /dev/null
@@ -1,600 +0,0 @@
-/* $NetBSD: hesiod.c,v 1.9 1999/02/11 06:16:38 simonb Exp $ */
-
-/* Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/* Copyright 1996 by the Massachusetts Institute of Technology.
- *
- * Permission to use, copy, modify, and distribute this
- * software and its documentation for any purpose and without
- * fee is hereby granted, provided that the above copyright
- * notice appear in all copies and that both that copyright
- * notice and this permission notice appear in supporting
- * documentation, and that the name of M.I.T. not be used in
- * advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- * M.I.T. makes no representations about the suitability of
- * this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- */
-
-/* This file is part of the hesiod library. It implements the core
- * portion of the hesiod resolver.
- *
- * This file is loosely based on an interim version of hesiod.c from
- * the BIND IRS library, which was in turn based on an earlier version
- * of this file. Extensive changes have been made on each step of the
- * path.
- *
- * This implementation is not truly thread-safe at the moment because
- * it uses res_send() and accesses _res.
- */
-
-#include <sys/cdefs.h>
-
-#if 0
-static char *orig_rcsid = "$NetBSD: hesiod.c,v 1.9 1999/02/11 06:16:38 simonb Exp $";
-#endif
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/endian.h>
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <hesiod.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-struct hesiod_p {
- char *lhs; /* normally ".ns" */
- char *rhs; /* AKA the default hesiod domain */
- int classes[2]; /* The class search order. */
-};
-
-#define MAX_HESRESP 1024
-
-static int read_config_file(struct hesiod_p *, const char *);
-static char **get_txt_records(int, const char *);
-static int init_context(void);
-static void translate_errors(void);
-
-
-/*
- * hesiod_init --
- * initialize a hesiod_p.
- */
-int
-hesiod_init(context)
- void **context;
-{
- struct hesiod_p *ctx;
- const char *p, *configname;
-
- ctx = malloc(sizeof(struct hesiod_p));
- if (ctx) {
- *context = ctx;
- if (!issetugid())
- configname = getenv("HESIOD_CONFIG");
- else
- configname = NULL;
- if (!configname)
- configname = _PATH_HESIOD_CONF;
- if (read_config_file(ctx, configname) >= 0) {
- /*
- * The default rhs can be overridden by an
- * environment variable.
- */
- if (!issetugid())
- p = getenv("HES_DOMAIN");
- else
- p = NULL;
- if (p) {
- if (ctx->rhs)
- free(ctx->rhs);
- ctx->rhs = malloc(strlen(p) + 2);
- if (ctx->rhs) {
- *ctx->rhs = '.';
- strcpy(ctx->rhs + 1,
- (*p == '.') ? p + 1 : p);
- return 0;
- } else
- errno = ENOMEM;
- } else
- return 0;
- }
- } else
- errno = ENOMEM;
-
- if (ctx->lhs)
- free(ctx->lhs);
- if (ctx->rhs)
- free(ctx->rhs);
- if (ctx)
- free(ctx);
- return -1;
-}
-
-/*
- * hesiod_end --
- * Deallocates the hesiod_p.
- */
-void
-hesiod_end(context)
- void *context;
-{
- struct hesiod_p *ctx = (struct hesiod_p *) context;
-
- free(ctx->rhs);
- if (ctx->lhs)
- free(ctx->lhs);
- free(ctx);
-}
-
-/*
- * hesiod_to_bind --
- * takes a hesiod (name, type) and returns a DNS
- * name which is to be resolved.
- */
-char *
-hesiod_to_bind(void *context, const char *name, const char *type)
-{
- struct hesiod_p *ctx = (struct hesiod_p *) context;
- char bindname[MAXDNAME], *p, *ret, **rhs_list = NULL;
- const char *rhs;
- int len;
- size_t bindnamelen;
-
- if (strlcpy(bindname, name, sizeof(bindname)) >= sizeof(bindname)) {
- errno = EMSGSIZE;
- return NULL;
- }
-
- /*
- * Find the right right hand side to use, possibly
- * truncating bindname.
- */
- p = strchr(bindname, '@');
- if (p) {
- *p++ = 0;
- if (strchr(p, '.'))
- rhs = name + (p - bindname);
- else {
- rhs_list = hesiod_resolve(context, p, "rhs-extension");
- if (rhs_list)
- rhs = *rhs_list;
- else {
- errno = ENOENT;
- return NULL;
- }
- }
- } else
- rhs = ctx->rhs;
-
- /* See if we have enough room. */
- len = strlen(bindname) + 1 + strlen(type);
- if (ctx->lhs)
- len += strlen(ctx->lhs) + ((ctx->lhs[0] != '.') ? 1 : 0);
- len += strlen(rhs) + ((rhs[0] != '.') ? 1 : 0);
- if (len > sizeof(bindname) - 1) {
- if (rhs_list)
- hesiod_free_list(context, rhs_list);
- errno = EMSGSIZE;
- return NULL;
- }
- /* Put together the rest of the domain. */
- strcat(bindname, ".");
- strcat(bindname, type);
- /* Only append lhs if it isn't empty. */
- if (ctx->lhs && ctx->lhs[0] != '\0' ) {
- if (ctx->lhs[0] != '.')
- strcat(bindname, ".");
- strcat(bindname, ctx->lhs);
- }
- if (rhs[0] != '.')
- strcat(bindname, ".");
- strcat(bindname, rhs);
-
- /* rhs_list is no longer needed, since we're done with rhs. */
- if (rhs_list)
- hesiod_free_list(context, rhs_list);
-
- /* Make a copy of the result and return it to the caller. */
- bindnamelen = strlen (bindname) + 1;
- ret = malloc (bindnamelen);
- if (!ret)
- errno = ENOMEM;
- else
- memcpy (ret, bindname, bindnamelen);
- return ret;
-}
-
-/*
- * hesiod_resolve --
- * Given a hesiod name and type, return an array of strings returned
- * by the resolver.
- */
-char **
-hesiod_resolve(context, name, type)
- void *context;
- const char *name;
- const char *type;
-{
- struct hesiod_p *ctx = (struct hesiod_p *) context;
- char *bindname, **retvec;
-
- bindname = hesiod_to_bind(context, name, type);
- if (!bindname)
- return NULL;
-
- retvec = get_txt_records(ctx->classes[0], bindname);
- if (retvec == NULL && errno == ENOENT && ctx->classes[1])
- retvec = get_txt_records(ctx->classes[1], bindname);
-
- free(bindname);
- return retvec;
-}
-
-/*ARGSUSED*/
-void
-hesiod_free_list(context, list)
- void *context;
- char **list;
-{
- char **p;
-
- if (list == NULL)
- return;
- for (p = list; *p; p++)
- free(*p);
- free(list);
-}
-
-
-/* read_config_file --
- * Parse the /etc/hesiod.conf file. Returns 0 on success,
- * -1 on failure. On failure, it might leave values in ctx->lhs
- * or ctx->rhs which need to be freed by the caller.
- */
-static int
-read_config_file(ctx, filename)
- struct hesiod_p *ctx;
- const char *filename;
-{
- char *key, *data, *p, **which;
- char buf[MAXDNAME + 7];
- int n;
- FILE *fp;
-
- /* Set default query classes. */
- ctx->classes[0] = C_IN;
- ctx->classes[1] = C_HS;
-
- /* Try to open the configuration file. */
- fp = fopen(filename, "r");
- if (!fp) {
- size_t len;
- /* Use compiled in default domain names. */
- len = strlen (DEF_LHS) + 1;
- ctx->lhs = malloc (len);
- if (ctx->lhs) {
- memcpy (ctx->lhs, DEF_LHS, len);
- len = strlen (DEF_RHS) + 1;
- ctx->rhs = malloc (len);
- if (ctx->rhs)
- memcpy (ctx->rhs, DEF_RHS, len);
- }
- if (ctx->lhs && ctx->rhs)
- return 0;
- else {
- errno = ENOMEM;
- return -1;
- }
- }
- ctx->lhs = NULL;
- ctx->rhs = NULL;
- while (fgets(buf, sizeof(buf), fp) != NULL) {
- p = buf;
- if (*p == '#' || *p == '\n' || *p == '\r')
- continue;
- while (*p == ' ' || *p == '\t')
- p++;
- key = p;
- while (*p != ' ' && *p != '\t' && *p != '=')
- p++;
- *p++ = 0;
-
- while (isspace(*p) || *p == '=')
- p++;
- data = p;
- while (!isspace(*p))
- p++;
- *p = 0;
-
- if (strcasecmp(key, "lhs") == 0 ||
- strcasecmp(key, "rhs") == 0) {
- size_t len;
- which = (strcasecmp(key, "lhs") == 0)
- ? &ctx->lhs : &ctx->rhs;
- len = strlen (data) + 1;
- *which = malloc (len);
- if (!*which) {
- errno = ENOMEM;
- return -1;
- }
- else
- memcpy (*which, data, len);
- } else {
- if (strcasecmp(key, "classes") == 0) {
- n = 0;
- while (*data && n < 2) {
- p = data;
- while (*p && *p != ',')
- p++;
- if (*p)
- *p++ = 0;
- if (strcasecmp(data, "IN") == 0)
- ctx->classes[n++] = C_IN;
- else
- if (strcasecmp(data, "HS") == 0)
- ctx->classes[n++] =
- C_HS;
- data = p;
- }
- while (n < 2)
- ctx->classes[n++] = 0;
- }
- }
- }
- fclose(fp);
-
- if (!ctx->rhs || ctx->classes[0] == 0 ||
- ctx->classes[0] == ctx->classes[1]) {
- errno = ENOEXEC;
- return -1;
- }
- return 0;
-}
-
-/*
- * get_txt_records --
- * Given a DNS class and a DNS name, do a lookup for TXT records, and
- * return a list of them.
- */
-static char **
-get_txt_records(qclass, name)
- int qclass;
- const char *name;
-{
- HEADER *hp;
- unsigned char qbuf[PACKETSZ], abuf[MAX_HESRESP], *p, *eom, *eor;
- char *dst, **list;
- int ancount, qdcount, i, j, n, skip, type, class, len;
-
- /* Make sure the resolver is initialized. */
- if ((_res.options & RES_INIT) == 0 && res_init() == -1)
- return NULL;
-
- /* Construct the query. */
- n = res_mkquery(QUERY, name, qclass, T_TXT, NULL, 0,
- NULL, qbuf, PACKETSZ);
- if (n < 0)
- return NULL;
-
- /* Send the query. */
- n = res_send(qbuf, n, abuf, MAX_HESRESP);
- if (n < 0) {
- errno = ECONNREFUSED;
- return NULL;
- }
- /* Parse the header of the result. */
- hp = (HEADER *) (void *) abuf;
- ancount = ntohs(hp->ancount);
- qdcount = ntohs(hp->qdcount);
- p = abuf + sizeof(HEADER);
- eom = abuf + n;
-
- /*
- * Skip questions, trying to get to the answer section
- * which follows.
- */
- for (i = 0; i < qdcount; i++) {
- skip = dn_skipname(p, eom);
- if (skip < 0 || p + skip + QFIXEDSZ > eom) {
- errno = EMSGSIZE;
- return NULL;
- }
- p += skip + QFIXEDSZ;
- }
-
- /* Allocate space for the text record answers. */
- list = malloc((ancount + 1) * sizeof(char *));
- if (!list) {
- errno = ENOMEM;
- return NULL;
- }
- /* Parse the answers. */
- j = 0;
- for (i = 0; i < ancount; i++) {
- /* Parse the header of this answer. */
- skip = dn_skipname(p, eom);
- if (skip < 0 || p + skip + 10 > eom)
- break;
- type = p[skip + 0] << 8 | p[skip + 1];
- class = p[skip + 2] << 8 | p[skip + 3];
- len = p[skip + 8] << 8 | p[skip + 9];
- p += skip + 10;
- if (p + len > eom) {
- errno = EMSGSIZE;
- break;
- }
- /* Skip entries of the wrong class and type. */
- if (class != qclass || type != T_TXT) {
- p += len;
- continue;
- }
- /* Allocate space for this answer. */
- list[j] = malloc((size_t)len);
- if (!list[j]) {
- errno = ENOMEM;
- break;
- }
- dst = list[j++];
-
- /* Copy answer data into the allocated area. */
- eor = p + len;
- while (p < eor) {
- n = (unsigned char) *p++;
- if (p + n > eor) {
- errno = EMSGSIZE;
- break;
- }
- memcpy(dst, p, (size_t)n);
- p += n;
- dst += n;
- }
- if (p < eor) {
- errno = EMSGSIZE;
- break;
- }
- *dst = 0;
- }
-
- /*
- * If we didn't terminate the loop normally, something
- * went wrong.
- */
- if (i < ancount) {
- for (i = 0; i < j; i++)
- free(list[i]);
- free(list);
- return NULL;
- }
- if (j == 0) {
- errno = ENOENT;
- free(list);
- return NULL;
- }
- list[j] = NULL;
- return list;
-}
-
- /*
- * COMPATIBILITY FUNCTIONS
- */
-
-static int inited = 0;
-static void *context;
-static int errval = HES_ER_UNINIT;
-
-int
-hes_init()
-{
- init_context();
- return errval;
-}
-
-char *
-hes_to_bind(name, type)
- const char *name;
- const char *type;
-{
- static char *bindname;
- if (init_context() < 0)
- return NULL;
- if (bindname)
- free(bindname);
- bindname = hesiod_to_bind(context, name, type);
- if (!bindname)
- translate_errors();
- return bindname;
-}
-
-char **
-hes_resolve(name, type)
- const char *name;
- const char *type;
-{
- static char **list;
-
- if (init_context() < 0)
- return NULL;
-
- /*
- * In the old Hesiod interface, the caller was responsible for
- * freeing the returned strings but not the vector of strings itself.
- */
- if (list)
- free(list);
-
- list = hesiod_resolve(context, name, type);
- if (!list)
- translate_errors();
- return list;
-}
-
-int
-hes_error()
-{
- return errval;
-}
-
-void
-hes_free(hp)
- char **hp;
-{
- hesiod_free_list(context, hp);
-}
-
-static int
-init_context()
-{
- if (!inited) {
- inited = 1;
- if (hesiod_init(&context) < 0) {
- errval = HES_ER_CONFIG;
- return -1;
- }
- errval = HES_ER_OK;
- }
- return 0;
-}
-
-static void
-translate_errors()
-{
- switch (errno) {
- case ENOENT:
- errval = HES_ER_NOTFOUND;
- break;
- case ECONNREFUSED:
- case EMSGSIZE:
- errval = HES_ER_NET;
- break;
- case ENOMEM:
- default:
- /* Not a good match, but the best we can do. */
- errval = HES_ER_CONFIG;
- break;
- }
-}
diff --git a/newlib/libc/sys/linux/net/if_indextoname.3 b/newlib/libc/sys/linux/net/if_indextoname.3
deleted file mode 100644
index 4b5bff5aa..000000000
--- a/newlib/libc/sys/linux/net/if_indextoname.3
+++ /dev/null
@@ -1,142 +0,0 @@
-.\" Copyright (c) 1983, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)rcmd.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/net/if_indextoname.3,v 1.7 2001/10/01 16:08:55 ru Exp $
-.\"
-.Dd May 21, 1998
-.Dt IF_NAMETOINDEX 3
-.Os
-.Sh NAME
-.Nm if_nametoindex ,
-.Nm if_indextoname ,
-.Nm if_nameindex ,
-.Nm if_freenameindex
-.Nd convert interface index to name, and vice versa
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/socket.h
-.In net/if.h
-.Ft "unsigned int"
-.Fn if_nametoindex "const char *ifname"
-.Ft "char *"
-.Fn if_indextoname "unsigned int ifindex" "char *ifname"
-.Ft "struct if_nameindex *"
-.Fn if_nameindex "void"
-.Ft "void"
-.Fn if_freenameindex "struct if_nameindex *ptr"
-.Sh DESCRIPTION
-The functions map interface index to readable interface name
-(such as
-.Dq Li lo0 ) ,
-and vice versa.
-.Pp
-.Fn if_nametoindex
-converts readable interface name to interface index
-.Pp positive integer value .
-If the specified interface does not exist, 0 will be returned.
-.Pp
-.Fn if_indextoname
-converts interface index to readable interface name.
-The
-.Fa ifname
-argument must point to a buffer of at least
-.Dv IF_NAMESIZE
-bytes into which the interface name corresponding to the specified index is
-returned.
-.Dv ( IF_NAMESIZE
-is also defined in
-.Aq Pa net/if.h
-and its value includes a terminating null byte at the end of the
-interface name.)
-This pointer is also the return value of the function.
-If there is no interface corresponding to the specified index,
-.Dv NULL
-is returned.
-.Pp
-.Fn if_nameindex
-returns an array of
-.Fa if_nameindex
-structures.
-.Fa if_nametoindex
-is also defined in
-.Aq Pa net/if.h ,
-and is as follows:
-.Bd -literal -offset
-struct if_nameindex {
- unsigned int if_index; /* 1, 2, ... */
- char *if_name; /* null terminated name: "le0", ... */
-};
-.Ed
-.Pp
-The end of the array of structures is indicated by a structure with
-an
-.Fa if_index
-of 0 and an
-.Fa if_name
-of
-.Dv NULL .
-The function returns a
-.Dv NULL
-pointer upon an error.
-The memory used for this array of structures along with the interface
-names pointed to by the
-.Fa if_name
-members is obtained dynamically.
-This memory is freed by the
-.Fn if_freenameindex
-function.
-.Pp
-.Fn if_freenameindex
-takes a pointer that was returned by
-.Fn if_nameindex
-as argument
-.Pq Fa ptr ,
-and it reclaims the region allocated.
-.Sh DIAGNOSTICS
-.Fn if_nametoindex
-returns 0 on error, positive integer on success.
-.Fn if_indextoname
-and
-.Fn if_nameindex
-return
-.Dv NULL
-on errors.
-.Sh SEE ALSO
-R. Gilligan, S. Thomson, J. Bound, and W. Stevens,
-``Basic Socket Interface Extensions for IPv6,'' RFC2553, March 1999.
-.Sh HISTORY
-The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit.
-.Sh STANDARDS
-These functions are defined in ``Basic Socket Interface Extensions for IPv6''
-(RFC2533).
diff --git a/newlib/libc/sys/linux/net/ifname.c b/newlib/libc/sys/linux/net/ifname.c
deleted file mode 100644
index b7975bc2b..000000000
--- a/newlib/libc/sys/linux/net/ifname.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/* $KAME: ifname.c,v 1.4 2001/08/20 02:32:40 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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>
-#include <sys/types.h>
-#include <sys/types.h>
-
-/*
- * TODO:
- * - prototype defs into arpa/inet.h, not net/if.h (bsd-api-new-02)
- */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <sys/sysctl.h>
-#include <net/if.h>
-#include <net/route.h>
-#include <net/if_dl.h>
-
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define ROUNDUP(a) \
- ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
-#define ADVANCE(x, n)
-
-static unsigned int
-if_onametoindex(ifname)
- const char *ifname;
-{
- struct if_nameindex *iff = if_nameindex(), *ifx;
- int ret;
-
- if (iff == NULL) return 0;
- ifx = iff;
- while (ifx->if_name != NULL) {
- if (strcmp(ifx->if_name, ifname) == 0) {
- ret = ifx->if_index;
- if_freenameindex(iff);
- return ret;
- }
- ifx++;
- }
- if_freenameindex(iff);
- errno = ENXIO;
- return 0;
-}
-
-unsigned int
-if_nametoindex(ifname)
- const char *ifname;
-{
- int s;
- struct ifreq ifr;
-
- s = socket(AF_INET, SOCK_DGRAM, 0);
- if (s == -1)
- return (0);
- strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
- if (ioctl(s, SIOCGIFINDEX, &ifr) == -1) {
- close (s);
- return (if_onametoindex(ifname));
- }
- close(s);
- return (ifr.ifr_index);
-}
-
-char *
-if_indextoname(ifindex, ifname)
- unsigned int ifindex;
- char *ifname; /* at least IF_NAMESIZE */
-{
- struct if_nameindex *iff = if_nameindex(), *ifx;
- char *cp, *dp;
-
- if (iff == NULL) return NULL;
- ifx = iff;
- while (ifx->if_index != 0) {
- if (ifx->if_index == ifindex) {
- cp = ifname;
- dp = ifx->if_name;
- while ((*cp++ = *dp++)) ;
- if_freenameindex(iff);
- return (ifname);
- }
- ifx++;
- }
- if_freenameindex(iff);
- errno = ENXIO;
- return NULL;
-}
-
-struct if_nameindex *
-if_nameindex()
-{
- size_t needed;
- int mib[6], i, ifn = 0, off = 0, hlen;
- char *buf = NULL, *lim, *next, *cp, *ifbuf = NULL;
- struct rt_msghdr *rtm;
- struct if_msghdr *ifm;
- struct sockaddr *sa;
- struct if_nameindex *ret = NULL;
- static int ifxs = 64; /* initial upper limit */
- struct _ifx {
- int if_index;
- int if_off;
- } *ifx = NULL;
-
- mib[0] = CTL_NET;
- mib[1] = PF_ROUTE;
- mib[2] = 0; /* protocol */
- mib[3] = 0; /* wildcard address family */
- mib[4] = 0;
- mib[5] = 0; /* no flags */
- if (__sysctl(mib, 6, NULL, &needed, NULL, 0) < 0)
- return NULL;
- if ((buf = malloc(needed)) == NULL) {
- errno = ENOMEM;
- goto end;
- }
- /* XXX: we may have allocated too much than necessary */
- if ((ifbuf = malloc(needed)) == NULL) {
- errno = ENOMEM;
- goto end;
- }
- if ((ifx = (struct _ifx *)malloc(sizeof(*ifx) * ifxs)) == NULL) {
- errno = ENOMEM;
- goto end;
- }
- if (__sysctl(mib, 6, buf, &needed, NULL, 0) < 0) {
- /* sysctl has set errno */
- goto end;
- }
- lim = buf + needed;
- for (next = buf; next < lim; next += rtm->rtm_msglen) {
- rtm = (struct rt_msghdr *)next;
- if (rtm->rtm_version != RTM_VERSION) {
- errno = EPROTONOSUPPORT;
- goto end;
- }
- switch (rtm->rtm_type) {
- case RTM_IFINFO:
- ifm = (struct if_msghdr *)rtm;
- ifx[ifn].if_index = ifm->ifm_index;
- ifx[ifn].if_off = off;
- cp = (char *)(ifm + 1);
- for (i = 1; i; i <<= 1) {
- if (i & ifm->ifm_addrs) {
- sa = (struct sockaddr *)cp;
- ADVANCE(cp, sa);
- }
- }
- if (++ifn == ifxs) {
- /* we need more memory */
- struct _ifx *newifx;
-
- ifxs *= 2;
- if ((newifx = (struct _ifx *)malloc(sizeof(*newifx) * ifxs)) == NULL) {
- errno = ENOMEM;
- goto end;
- }
-
- /* copy and free old data */
- memcpy(newifx, ifx, (sizeof(*ifx) * ifxs) / 2);
- free(ifx);
- ifx = newifx;
- }
- }
- }
- hlen = sizeof(struct if_nameindex) * (ifn + 1);
- if ((cp = (char *)malloc(hlen + off)) == NULL) {
- errno = ENOMEM;
- goto end;
- }
- bcopy(ifbuf, cp + hlen, off);
- ret = (struct if_nameindex *)cp;
- for (i = 0; i < ifn; i++) {
- ret[i].if_index = ifx[i].if_index;
- ret[i].if_name = cp + hlen + ifx[i].if_off;
- }
- ret[ifn].if_index = 0;
- ret[ifn].if_name = NULL;
-
- end:
- if (buf) free(buf);
- if (ifbuf) free(ifbuf);
- if (ifx) free(ifx);
-
- return ret;
-}
-
-void if_freenameindex(ptr)
- struct if_nameindex *ptr;
-{
- free(ptr);
-}
diff --git a/newlib/libc/sys/linux/net/inet.3 b/newlib/libc/sys/linux/net/inet.3
deleted file mode 100644
index 7a6fcf370..000000000
--- a/newlib/libc/sys/linux/net/inet.3
+++ /dev/null
@@ -1,271 +0,0 @@
-.\" Copyright (c) 1983, 1990, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)inet.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/net/inet.3,v 1.22 2001/12/01 03:43:01 mike Exp $
-.\"
-.Dd June 17, 1996
-.Dt INET 3
-.Os
-.Sh NAME
-.Nm inet_aton ,
-.Nm inet_addr ,
-.Nm inet_network ,
-.Nm inet_ntoa ,
-.Nm inet_ntop ,
-.Nm inet_pton ,
-.Nm inet_makeaddr ,
-.Nm inet_lnaof ,
-.Nm inet_netof
-.Nd Internet address manipulation routines
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/socket.h
-.In netinet/in.h
-.In arpa/inet.h
-.Ft int
-.Fn inet_aton "const char *cp" "struct in_addr *pin"
-.Ft in_addr_t
-.Fn inet_addr "const char *cp"
-.Ft in_addr_t
-.Fn inet_network "const char *cp"
-.Ft char *
-.Fn inet_ntoa "struct in_addr in"
-.Ft const char *
-.Fn inet_ntop "int af" "const void *src" "char *dst" "socklen_t size"
-.Ft int
-.Fn inet_pton "int af" "const char *src" "void *dst"
-.Ft struct in_addr
-.Fn inet_makeaddr "in_addr_t net" "in_addr_t lna"
-.Ft in_addr_t
-.Fn inet_lnaof "struct in_addr in"
-.Ft in_addr_t
-.Fn inet_netof "struct in_addr in"
-.Sh DESCRIPTION
-The routines
-.Fn inet_aton ,
-.Fn inet_addr
-and
-.Fn inet_network
-interpret character strings representing
-numbers expressed in the Internet standard
-.Ql .\&
-notation.
-.Pp
-The
-.Fn inet_pton
-function converts a presentation format address (that is, printable form
-as held in a character string) to network format (usually a
-.Ft struct in_addr
-or some other internal binary representation, in network byte order).
-It returns 1 if the address was valid for the specified address family, or
-0 if the address wasn't parseable in the specified address family, or -1
-if some system error occurred (in which case
-.Va errno
-will have been set).
-This function is presently valid for
-.Dv AF_INET
-and
-.Dv AF_INET6 .
-.Pp
-The
-.Fn inet_aton
-routine interprets the specified character string as an Internet address,
-placing the address into the structure provided.
-It returns 1 if the string was successfully interpreted,
-or 0 if the string is invalid.
-The
-.Fn inet_addr
-and
-.Fn inet_network
-functions return numbers suitable for use
-as Internet addresses and Internet network
-numbers, respectively.
-.Pp
-The function
-.Fn inet_ntop
-converts an address from network format (usually a
-.Ft struct in_addr
-or some other binary form, in network byte order) to presentation format
-(suitable for external display purposes).
-It returns NULL if a system error occurs (in which case,
-.Va errno
-will have been set), or it returns a pointer to the destination string.
-This function is presently valid for
-.Dv AF_INET
-and
-.Dv AF_INET6 .
-.Pp
-The routine
-.Fn inet_ntoa
-takes an Internet address and returns an
-.Tn ASCII
-string representing the address in
-.Ql .\&
-notation. The routine
-.Fn inet_makeaddr
-takes an Internet network number and a local
-network address and constructs an Internet address
-from it. The routines
-.Fn inet_netof
-and
-.Fn inet_lnaof
-break apart Internet host addresses, returning
-the network number and local network address part,
-respectively.
-.Pp
-All Internet addresses are returned in network
-order (bytes ordered from left to right).
-All network numbers and local address parts are
-returned as machine byte order integer values.
-.Sh INTERNET ADDRESSES
-Values specified using the
-.Ql .\&
-notation take one
-of the following forms:
-.Bd -literal -offset indent
-a.b.c.d
-a.b.c
-a.b
-a
-.Ed
-.Pp
-When four parts are specified, each is interpreted
-as a byte of data and assigned, from left to right,
-to the four bytes of an Internet address. Note
-that when an Internet address is viewed as a 32-bit
-integer quantity on the
-.Tn VAX
-the bytes referred to
-above appear as
-.Dq Li d.c.b.a .
-That is,
-.Tn VAX
-bytes are
-ordered from right to left.
-.Pp
-When a three part address is specified, the last
-part is interpreted as a 16-bit quantity and placed
-in the right-most two bytes of the network address.
-This makes the three part address format convenient
-for specifying Class B network addresses as
-.Dq Li 128.net.host .
-.Pp
-When a two part address is supplied, the last part
-is interpreted as a 24-bit quantity and placed in
-the right most three bytes of the network address.
-This makes the two part address format convenient
-for specifying Class A network addresses as
-.Dq Li net.host .
-.Pp
-When only one part is given, the value is stored
-directly in the network address without any byte
-rearrangement.
-.Pp
-All numbers supplied as
-.Dq parts
-in a
-.Ql .\&
-notation
-may be decimal, octal, or hexadecimal, as specified
-in the C language (i.e., a leading 0x or 0X implies
-hexadecimal; otherwise, a leading 0 implies octal;
-otherwise, the number is interpreted as decimal).
-.Pp
-The
-.Fn inet_aton
-and
-.Fn inet_ntoa
-functions are semi-deprecated in favor of the
-.Xr addr2ascii 3
-family. However, since those functions are not yet widely implemented,
-portable programs cannot rely on their presence and will continue
-to use the
-.Xr inet 3
-functions for some time.
-.Sh DIAGNOSTICS
-The constant
-.Dv INADDR_NONE
-is returned by
-.Fn inet_addr
-and
-.Fn inet_network
-for malformed requests.
-.Sh SEE ALSO
-.Xr addr2ascii 3 ,
-.Xr byteorder 3 ,
-.Xr gethostbyname 3 ,
-.Xr getnetent 3 ,
-.Xr inet_net 3 ,
-.Xr hosts 5 ,
-.Xr networks 5
-.Rs
-.%R RFC
-.%N 2373
-.%D July 1998
-.%T "IP Version 6 Addressing Architecture"
-.Re
-.Sh STANDARDS
-The
-.Fn inet_ntop
-and
-.Fn inet_pton
-functions conform to
-.St -xns5.2 .
-Note that
-.Fn inet_pton
-does not accept 1-, 2-, or 3-part dotted addresses; all four parts
-must be specified and are interpreted only as decimal values.
-This is a narrower input set than that accepted by
-.Fn inet_aton .
-.Sh HISTORY
-These
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-The value
-.Dv INADDR_NONE
-(0xffffffff) is a valid broadcast address, but
-.Fn inet_addr
-cannot return that value without indicating failure.
-The newer
-.Fn inet_aton
-function does not share this problem.
-The problem of host byte ordering versus network byte ordering is
-confusing.
-The string returned by
-.Fn inet_ntoa
-resides in a static memory area.
-.Pp
-Inet_addr should return a
-.Fa struct in_addr .
diff --git a/newlib/libc/sys/linux/net/inet6_option_space.3 b/newlib/libc/sys/linux/net/inet6_option_space.3
deleted file mode 100644
index 328c70f48..000000000
--- a/newlib/libc/sys/linux/net/inet6_option_space.3
+++ /dev/null
@@ -1,445 +0,0 @@
-.\" Copyright (c) 1983, 1987, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $Id$
-.\" $FreeBSD: src/lib/libc/net/inet6_option_space.3,v 1.8 2001/10/01 16:08:55 ru Exp $
-.\"
-.Dd December 10, 1999
-.Dt INET6_OPTION_SPACE 3
-.Os
-.\"
-.Sh NAME
-.Nm inet6_option_space ,
-.Nm inet6_option_init ,
-.Nm inet6_option_append ,
-.Nm inet6_option_alloc ,
-.Nm inet6_option_next ,
-.Nm inet6_option_find
-.Nd IPv6 Hop-by-Hop and Destination Options manipulation
-.\"
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In netinet/in.h
-.Ft "int"
-.Fn inet6_option_space "int nbytes"
-.Ft "int"
-.Fn inet6_option_init "void *bp" "struct cmsghdr **cmsgp" "int type"
-.Ft "int"
-.Fn inet6_option_append "struct cmsghdr *cmsg" "const u_int8_t *typep" "int multx" "int plusy"
-.Ft "u_int8_t *"
-.Fn inet6_option_alloc "struct cmsghdr *cmsg" "int datalen" "int multx" "int plusy"
-.Ft "int"
-.Fn inet6_option_next "const struct cmsghdr *cmsg" "u_int8_t **tptrp"
-.Ft "int"
-.Fn inet6_option_find "const struct cmsghdr *cmsg" "u_int8_t **tptrp" "int type"
-.\"
-.Sh DESCRIPTION
-.\"
-Building and parsing the Hop-by-Hop and Destination options is
-complicated due to alignment constranints, padding and
-ancillary data manipulation.
-RFC2292 defines a set of functions to help the application.
-The function prototypes for
-these functions are all in the
-.Aq Li netinet/in.h
-header.
-.\"
-.Ss inet6_option_space
-.Fn inet6_option_space
-returns the number of bytes required to hold an option when it is stored as
-ancillary data, including the
-.Li cmsghdr
-structure at the beginning,
-and any padding at the end
-(to make its size a multiple of 8 bytes).
-The argument is the size of the structure defining the option,
-which must include any pad bytes at the beginning
-(the value
-.Li y
-in the alignment term
-.Dq Li "xn + y" ) ,
-the type byte, the length byte, and the option data.
-.Pp
-Note: If multiple options are stored in a single ancillary data
-object, which is the recommended technique, this function
-overestimates the amount of space required by the size of
-.Li N-1
-.Li cmsghdr
-structures,
-where
-.Li N
-is the number of options to be stored in the object.
-This is of little consequence, since it is assumed that most
-Hop-by-Hop option headers and Destination option headers carry only
-one option
-(appendix B of [RFC-2460]).
-.\"
-.Ss inet6_option_init
-.Fn inet6_option_init
-is called once per ancillary data object that will
-contain either Hop-by-Hop or Destination options.
-It returns
-.Li 0
-on success or
-.Li -1
-on an error.
-.Pp
-.Fa bp
-is a pointer to previously allocated space that will contain the
-ancillary data object.
-It must be large enough to contain all the
-individual options to be added by later calls to
-.Fn inet6_option_append
-and
-.Fn inet6_option_alloc .
-.Pp
-.Fa cmsgp
-is a pointer to a pointer to a
-.Li cmsghdr
-structure.
-.Fa *cmsgp
-is initialized by this function to point to the
-.Li cmsghdr
-structure constructed by this function in the buffer pointed to by
-.Fa bp .
-.Pp
-.Fa type
-is either
-.Dv IPV6_HOPOPTS
-or
-.Dv IPV6_DSTOPTS .
-This
-.Fa type
-is stored in the
-.Li cmsg_type
-member of the
-.Li cmsghdr
-structure pointed to by
-.Fa *cmsgp .
-.\"
-.Ss inet6_option_append
-This function appends a Hop-by-Hop option or a Destination option
-into an ancillary data object that has been initialized by
-.Fn inet6_option_init .
-This function returns
-.Li 0
-if it succeeds or
-.Li -1
-on an error.
-.Pp
-.Fa cmsg
-is a pointer to the
-.Li cmsghdr
-structure that must have been
-initialized by
-.Fn inet6_option_init .
-.Pp
-.Fa typep
-is a pointer to the 8-bit option type.
-It is assumed that this
-field is immediately followed by the 8-bit option data length field,
-which is then followed immediately by the option data.
-The caller
-initializes these three fields
-(the type-length-value, or TLV)
-before calling this function.
-.Pp
-The option type must have a value from
-.Li 2
-to
-.Li 255 ,
-inclusive.
-.Li ( 0
-and
-.Li 1
-are reserved for the
-.Li Pad1
-and
-.Li PadN
-options, respectively.)
-.Pp
-The option data length must have a value between
-.Li 0
-and
-.Li 255 ,
-inclusive, and is the length of the option data that follows.
-.Pp
-.Fa multx
-is the value
-.Li x
-in the alignment term
-.Dq Li xn + y .
-It must have a value of
-.Li 1 ,
-.Li 2 ,
-.Li 4 ,
-or
-.Li 8 .
-.Pp
-.Fa plusy
-is the value
-.Li y
-in the alignment term
-.Dq Li xn + y .
-It must have a value between
-.Li 0
-and
-.Li 7 ,
-inclusive.
-.\"
-.Ss inet6_option_alloc
-This function appends a Hop-by-Hop option or a Destination option
-into an ancillary data object that has been initialized by
-.Fn inet6_option_init .
-This function returns a pointer to the 8-bit
-option type field that starts the option on success, or
-.Dv NULL
-on an error.
-.Pp
-The difference between this function and
-.Fn inet6_option_append
-is that the latter copies the contents of a previously built option into
-the ancillary data object while the current function returns a
-pointer to the space in the data object where the option's TLV must
-then be built by the caller.
-.Pp
-.Fa cmsg
-is a pointer to the
-.Li cmsghdr
-structure that must have been
-initialized by
-.Fn inet6_option_init .
-.Pp
-.Fa datalen
-is the value of the option data length byte for this option.
-This value is required as an argument to allow the function to
-determine if padding must be appended at the end of the option.
-(The
-.Fn inet6_option_append
-function does not need a data length argument
-since the option data length must already be stored by the caller.)
-.Pp
-.Fa multx
-is the value
-.Li x
-in the alignment term
-.Dq Li xn + y .
-It must have a value of
-.Li 1 ,
-.Li 2 ,
-.Li 4 ,
-or
-.Li 8 .
-.Pp
-.Fa plusy
-is the value
-.Li y
-in the alignment term
-.Dq Li xn + y .
-It must have a value between
-.Li 0
-and
-.Li 7 ,
-inclusive.
-.\"
-.Ss inet6_option_next
-This function processes the next Hop-by-Hop option or Destination
-option in an ancillary data object.
-If another option remains to be
-processed, the return value of the function is
-.Li 0
-and
-.Fa *tptrp
-points to
-the 8-bit option type field
-(which is followed by the 8-bit option
-data length, followed by the option data).
-If no more options remain
-to be processed, the return value is
-.Li -1
-and
-.Fa *tptrp
-is
-.Dv NULL .
-If an error occurs, the return value is
-.Li -1
-and
-.Fa *tptrp
-is not
-.Dv NULL .
-.Pp
-.Fa cmsg
-is a pointer to
-.Li cmsghdr
-structure of which
-.Li cmsg_level
-equals
-.Dv IPPROTO_IPV6
-and
-.Li cmsg_type
-equals either
-.Dv IPV6_HOPOPTS
-or
-.Dv IPV6_DSTOPTS .
-.Pp
-.Fa tptrp
-is a pointer to a pointer to an 8-bit byte and
-.Fa *tptrp
-is used
-by the function to remember its place in the ancillary data object
-each time the function is called.
-The first time this function is
-called for a given ancillary data object,
-.Fa *tptrp
-must be set to
-.Dv NULL .
-.Pp
-Each time this function returns success,
-.Fa *tptrp
-points to the 8-bit
-option type field for the next option to be processed.
-.\"
-.Ss inet6_option_find
-This function is similar to the previously described
-.Fn inet6_option_next
-function, except this function lets the caller
-specify the option type to be searched for, instead of always
-returning the next option in the ancillary data object.
-.Fa cmsg
-is a
-pointer to
-.Li cmsghdr
-structure of which
-.Li cmsg_level
-equals
-.Dv IPPROTO_IPV6
-and
-.Li cmsg_type
-equals either
-.Dv IPV6_HOPOPTS
-or
-.Dv IPV6_DSTOPTS .
-.Pp
-.Fa tptrp
-is a pointer to a pointer to an 8-bit byte and
-.Fa *tptrp
-is used
-by the function to remember its place in the ancillary data object
-each time the function is called.
-The first time this function is
-called for a given ancillary data object,
-.Fa *tptrp
-must be set to
-.Dv NULL .
-.Pa
-This function starts searching for an option of the specified type
-beginning after the value of
-.Fa *tptrp .
-If an option of the specified
-type is located, this function returns
-.Li 0
-and
-.Fa *tptrp
-points to the 8-
-bit option type field for the option of the specified type.
-If an
-option of the specified type is not located, the return value is
-.Li -1
-and
-.Fa *tptrp
-is
-.Dv NULL .
-If an error occurs, the return value is
-.Li -1
-and
-.Fa *tptrp
-is not
-.Dv NULL .
-.\"
-.Sh DIAGNOSTICS
-.Fn inet6_option_init
-and
-.Fn inet6_option_append
-return
-.Li 0
-on success or
-.Li -1
-on an error.
-.Pp
-.Fn inet6_option_alloc
-returns
-.Dv NULL
-on an error.
-.Pp
-On errors,
-.Fn inet6_option_next
-and
-.Fn inet6_option_find
-return
-.Li -1
-setting
-.Fa *tptrp
-to non
-.Dv NULL
-value.
-.\"
-.Sh EXAMPLES
-RFC2292 gives comprehensive examples in chapter 6.
-.\"
-.Sh SEE ALSO
-.Rs
-.%A W. Stevens
-.%A M. Thomas
-.%T "Advanced Sockets API for IPv6"
-.%N RFC2292
-.%D February 1998
-.Re
-.Rs
-.%A S. Deering
-.%A R. Hinden
-.%T "Internet Protocol, Version 6 (IPv6) Specification"
-.%N RFC2460
-.%D December 1998
-.Re
-.\"
-.Sh HISTORY
-The implementation first appeared in KAME advanced networking kit.
-.\"
-.Sh STANDARDS
-The functions
-are documented in
-.Dq Advanced Sockets API for IPv6
-(RFC2292).
-.\"
-.Sh BUGS
-The text was shamelessly copied from RFC2292.
diff --git a/newlib/libc/sys/linux/net/inet6_rthdr_space.3 b/newlib/libc/sys/linux/net/inet6_rthdr_space.3
deleted file mode 100644
index d2c575dca..000000000
--- a/newlib/libc/sys/linux/net/inet6_rthdr_space.3
+++ /dev/null
@@ -1,323 +0,0 @@
-.\" Copyright (c) 1983, 1987, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $Id$
-.\" $FreeBSD: src/lib/libc/net/inet6_rthdr_space.3,v 1.8 2001/10/01 16:08:55 ru Exp $
-.\"
-.Dd December 10, 1999
-.Dt INET6_RTHDR_SPACE 3
-.Os
-.\"
-.Sh NAME
-.Nm inet6_rthdr_space ,
-.Nm inet6_rthdr_init ,
-.Nm inet6_rthdr_add ,
-.Nm inet6_rthdr_lasthop ,
-.Nm inet6_rthdr_reverse ,
-.Nm inet6_rthdr_segments ,
-.Nm inet6_rthdr_getaddr ,
-.Nm inet6_rthdr_getflags
-.Nd IPv6 Routing Header Options manipulation
-.\"
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In netinet/in.h
-.Ft size_t
-.Fn inet6_rthdr_space "int type" "int segments"
-.Ft "struct cmsghdr *"
-.Fn inet6_rthdr_init "void *bp" "int type"
-.Ft int
-.Fn inet6_rthdr_add "struct cmsghdr *cmsg" "const struct in6_addr *addr" "unsigned int flags"
-.Ft int
-.Fn inet6_rthdr_lasthop "struct cmsghdr *cmsg" "unsigned int flags"
-.Ft int
-.Fn inet6_rthdr_reverse "const struct cmsghdr *in" "struct cmsghdr *out"
-.Ft int
-.Fn inet6_rthdr_segments "const struct cmsghdr *cmsg"
-.Ft "struct in6_addr *"
-.Fn inet6_rthdr_getaddr "struct cmsghdr *cmsg" "int index"
-.Ft int
-.Fn inet6_rthdr_getflags "const struct cmsghdr *cmsg" "int index"
-.\"
-.Sh DESCRIPTION
-RFC2292 IPv6 advanced API defines eight
-functions that the application calls to build and examine a Routing
-header. Four functions build a Routing header:
-.Bl -hang
-.It Fn inet6_rthdr_space
-return #bytes required for ancillary data
-.It Fn inet6_rthdr_init
-initialize ancillary data for Routing header
-.It Fn inet6_rthdr_add
-add IPv6 address & flags to Routing header
-.It Fn inet6_rthdr_lasthop
-specify the flags for the final hop
-.El
-.Pp
-Four functions deal with a returned Routing header:
-.Bl -hang
-.It Fn inet6_rthdr_reverse
-reverse a Routing header
-.It Fn inet6_rthdr_segments
-return #segments in a Routing header
-.It Fn inet6_rthdr_getaddr
-fetch one address from a Routing header
-.It Fn inet6_rthdr_getflags
-fetch one flag from a Routing header
-.El
-.Pp
-The function prototypes for these functions are all in the
-.Aq Li netinet/in.h
-header.
-.\"
-.Ss inet6_rthdr_space
-This function returns the number of bytes required to hold a Routing
-header of the specified
-.Fa type
-containing the specified number of
-.Fa segments
-(addresses).
-For an IPv6 Type 0 Routing header, the number
-of segments must be between 1 and 23, inclusive. The return value
-includes the size of the cmsghdr structure that precedes the Routing
-header, and any required padding.
-.Pp
-If the return value is 0, then either the type of the Routing header
-is not supported by this implementation or the number of segments is
-invalid for this type of Routing header.
-.Pp
-Note: This function returns the size but does not allocate the space
-required for the ancillary data.
-This allows an application to
-allocate a larger buffer, if other ancillary data objects are
-desired, since all the ancillary data objects must be specified to
-.Xr sendmsg 2
-as a single
-.Li msg_control
-buffer.
-.\"
-.Ss inet6_rthdr_init
-This function initializes the buffer pointed to by
-.Fa bp
-to contain a
-.Li cmsghdr
-structure followed by a Routing header of the specified
-.Fa type .
-The
-.Li cmsg_len
-member of the
-.Li cmsghdr
-structure is initialized to the
-size of the structure plus the amount of space required by the
-Routing header.
-The
-.Li cmsg_level
-and
-.Li cmsg_type
-members are also initialized as required.
-.Pp
-The caller must allocate the buffer and its size can be determined by
-calling
-.Fn inet6_rthdr_space .
-.Pp
-Upon success the return value is the pointer to the
-.Li cmsghdr
-structure, and this is then used as the first argument to the next
-two functions.
-Upon an error the return value is
-.Dv NULL .
-.\"
-.Ss inet6_rthdr_add
-This function adds the address pointed to by
-.Fa addr
-to the end of the
-Routing header being constructed and sets the type of this hop to the
-value of
-.Fa flags .
-For an IPv6 Type 0 Routing header,
-.Fa flags
-must be
-either
-.Dv IPV6_RTHDR_LOOSE
-or
-.Dv IPV6_RTHDR_STRICT .
-.Pp
-If successful, the
-.Li cmsg_len
-member of the
-.Li cmsghdr
-structure is
-updated to account for the new address in the Routing header and the
-return value of the function is 0.
-Upon an error the return value of
-the function is -1.
-.\"
-.Ss inet6_rthdr_lasthop
-This function specifies the Strict/Loose flag for the final hop of a
-Routing header.
-For an IPv6 Type 0 Routing header,
-.Fa flags
-must be either
-.Dv IPV6_RTHDR_LOOSE
-or
-.Dv IPV6_RTHDR_STRICT .
-.Pp
-The return value of the function is 0 upon success, or -1 upon an error.
-.Pp
-Notice that a Routing header specifying
-.Li N
-intermediate nodes requires
-.Li N+1
-Strict/Loose flags.
-This requires
-.Li N
-calls to
-.Fn inet6_rthdr_add
-followed by one call to
-.Fn inet6_rthdr_lasthop .
-.\"
-.Ss inet6_rthdr_reverse
-This function is not yet implemented.
-When implemented, this should behave as follows.
-.Pp
-This function takes a Routing header that was received as ancillary
-data
-(pointed to by the first argument,
-.Fa in )
-and writes a new Routing
-header that sends datagrams along the reverse of that route.
-Both
-arguments are allowed to point to the same buffer
-(that is, the reversal can occur in place).
-.Pp
-The return value of the function is 0 on success, or -1 upon an
-error.
-.\"
-.Ss inet6_rthdr_segments
-This function returns the number of segments
-(addresses)
-contained in
-the Routing header described by
-.Fa cmsg .
-On success the return value is
-between 1 and 23, inclusive.
-The return value of the function is -1 upon an error.
-.\"
-.Ss inet6_rthdr_getaddr
-This function returns a pointer to the IPv6 address specified by
-.Fa index
-(which must have a value between 1 and the value returned by
-.Fn inet6_rthdr_segments )
-in the Routing header described by
-.Fa cmsg .
-An
-application should first call
-.Fn inet6_rthdr_segments
-to obtain the number of segments in the Routing header.
-.Pp
-Upon an error the return value of the function is
-.Dv NULL .
-.\"
-.Ss inet6_rthdr_getflags
-This function returns the flags value specified by
-.Fa index
-(which must
-have a value between 0 and the value returned by
-.Fn inet6_rthdr_segments )
-in the Routing header described by
-.Fa cmsg .
-For an IPv6 Type 0 Routing header the return value will be either
-.Dv IPV6_RTHDR_LOOSE
-or
-.Dv IPV6_RTHDR_STRICT .
-.Pp
-Upon an error the return value of the function is -1.
-.Pp
-Note: Addresses are indexed starting at 1, and flags starting at 0,
-to maintain consistency with the terminology and figures in RFC2460.
-.\"
-.Sh DIAGNOSTICS
-.Fn inet6_rthdr_space
-returns 0 on errors.
-.Pp
-.Fn inet6_rthdr_add ,
-.Fn inet6_rthdr_lasthop
-and
-.Fn inet6_rthdr_reverse
-return 0 on success, and returns -1 on error.
-.Pp
-.Fn inet6_rthdr_init
-and
-.Fn inet6_rthdr_getaddr
-return
-.Dv NULL
-on error.
-.Pp
-.Fn inet6_rthdr_segments
-and
-.Fn inet6_rthdr_getflags
-return -1 on error.
-.\"
-.Sh EXAMPLES
-RFC2292 gives comprehensive examples in chapter 8.
-.\"
-.Sh SEE ALSO
-.Rs
-.%A W. Stevens
-.%A M. Thomas
-.%T "Advanced Sockets API for IPv6"
-.%N RFC2292
-.%D February 1998
-.Re
-.Rs
-.%A S. Deering
-.%A R. Hinden
-.%T "Internet Protocol, Version 6 (IPv6) Specification"
-.%N RFC2460
-.%D December 1998
-.Re
-.\"
-.Sh HISTORY
-The implementation first appeared in KAME advanced networking kit.
-.\"
-.Sh STANDARDS
-The functions
-are documented in
-.Dq Advanced Sockets API for IPv6
-(RFC2292).
-.\"
-.Sh BUGS
-The text was shamelessly copied from RFC2292.
-.Pp
-.Fn inet6_rthdr_reverse
-is not implemented yet.
diff --git a/newlib/libc/sys/linux/net/inet_addr.c b/newlib/libc/sys/linux/net/inet_addr.c
deleted file mode 100644
index 874ca80e6..000000000
--- a/newlib/libc/sys/linux/net/inet_addr.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/* $KAME: inet_addr.c,v 1.5 2001/08/20 02:32:40 itojun Exp $ */
-
-/*
- * ++Copyright++ 1983, 1990, 1993
- * -
- * Copyright (c) 1983, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/endian.h>
-
-#include <sys/param.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-
-/*
- * ASCII internet address interpretation routine.
- * The value returned is in network order.
- */
-in_addr_t /* XXX should be struct in_addr :( */
-inet_addr(cp)
- const char *cp;
-{
- struct in_addr val;
-
- if (inet_aton(cp, &val))
- return (val.s_addr);
- return (INADDR_NONE);
-}
-
-/*
- * Check whether "cp" is a valid ASCII representation
- * of an Internet address and convert to a binary address.
- * Returns 1 if the address is valid, 0 if not.
- * This replaces inet_addr, the return value from which
- * cannot distinguish between failure and a local broadcast address.
- */
-int
-inet_aton(cp, addr)
- const char *cp;
- struct in_addr *addr;
-{
- u_long parts[4];
- in_addr_t val;
- char *c;
- char *endptr;
- int gotend, n;
-
- c = (char *)cp;
- n = 0;
- /*
- * Run through the string, grabbing numbers until
- * the end of the string, or some error
- */
- gotend = 0;
- while (!gotend) {
- errno = 0;
- val = strtoul(c, &endptr, 0);
-
- if (errno == ERANGE) /* Fail completely if it overflowed. */
- return (0);
-
- /*
- * If the whole string is invalid, endptr will equal
- * c.. this way we can make sure someone hasn't
- * gone '.12' or something which would get past
- * the next check.
- */
- if (endptr == c)
- return (0);
- parts[n] = val;
- c = endptr;
-
- /* Check the next character past the previous number's end */
- switch (*c) {
- case '.' :
- /* Make sure we only do 3 dots .. */
- if (n == 3) /* Whoops. Quit. */
- return (0);
- n++;
- c++;
- break;
-
- case '\0':
- gotend = 1;
- break;
-
- default:
- if (isspace((unsigned char)*c)) {
- gotend = 1;
- break;
- } else
- return (0); /* Invalid character, so fail */
- }
-
- }
-
- /*
- * Concoct the address according to
- * the number of parts specified.
- */
-
- switch (n) {
- case 0: /* a -- 32 bits */
- /*
- * Nothing is necessary here. Overflow checking was
- * already done in strtoul().
- */
- break;
- case 1: /* a.b -- 8.24 bits */
- if (val > 0xffffff || parts[0] > 0xff)
- return (0);
- val |= parts[0] << 24;
- break;
-
- case 2: /* a.b.c -- 8.8.16 bits */
- if (val > 0xffff || parts[0] > 0xff || parts[1] > 0xff)
- return (0);
- val |= (parts[0] << 24) | (parts[1] << 16);
- break;
-
- case 3: /* a.b.c.d -- 8.8.8.8 bits */
- if (val > 0xff || parts[0] > 0xff || parts[1] > 0xff ||
- parts[2] > 0xff)
- return (0);
- val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
- break;
- }
-
- if (addr != NULL)
- addr->s_addr = htonl(val);
- return (1);
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <arpa/inet.h>.
- */
-#undef inet_addr
-__weak_reference(__inet_addr, inet_addr);
-#undef inet_aton
-__weak_reference(__inet_aton, inet_aton);
diff --git a/newlib/libc/sys/linux/net/inet_lnaof.c b/newlib/libc/sys/linux/net/inet_lnaof.c
deleted file mode 100644
index c6c999dd1..000000000
--- a/newlib/libc/sys/linux/net/inet_lnaof.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_lnaof.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/endian.h>
-
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*
- * Return the local network address portion of an
- * internet address; handles class a/b/c network
- * number formats.
- */
-in_addr_t
-inet_lnaof(in)
- struct in_addr in;
-{
- in_addr_t i = ntohl(in.s_addr);
-
- if (IN_CLASSA(i))
- return ((i)&IN_CLASSA_HOST);
- else if (IN_CLASSB(i))
- return ((i)&IN_CLASSB_HOST);
- else
- return ((i)&IN_CLASSC_HOST);
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <arpa/inet.h>.
- */
-#undef inet_lnaof
-__weak_reference(__inet_lnaof, inet_lnaof);
diff --git a/newlib/libc/sys/linux/net/inet_makeaddr.c b/newlib/libc/sys/linux/net/inet_makeaddr.c
deleted file mode 100644
index 339b2d5a7..000000000
--- a/newlib/libc/sys/linux/net/inet_makeaddr.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_makeaddr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/endian.h>
-
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*
- * Formulate an Internet address from network + host. Used in
- * building addresses stored in the ifnet structure.
- */
-struct in_addr
-inet_makeaddr(net, host)
- in_addr_t net, host;
-{
- in_addr_t addr;
-
- if (net < 128)
- addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
- else if (net < 65536)
- addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
- else if (net < 16777216L)
- addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
- else
- addr = net | host;
- addr = htonl(addr);
- return (*(struct in_addr *)&addr);
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <arpa/inet.h>.
- */
-#undef inet_makeaddr
-__weak_reference(__inet_makeaddr, inet_makeaddr);
diff --git a/newlib/libc/sys/linux/net/inet_net.3 b/newlib/libc/sys/linux/net/inet_net.3
deleted file mode 100644
index 1d43bcc1d..000000000
--- a/newlib/libc/sys/linux/net/inet_net.3
+++ /dev/null
@@ -1,157 +0,0 @@
-.\" $NetBSD: inet_net.3,v 1.4 1999/03/22 19:44:52 garbled Exp $
-.\"
-.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" This code is derived from software contributed to The NetBSD Foundation
-.\" by Luke Mewburn.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the 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
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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: src/lib/libc/net/inet_net.3,v 1.1 2001/08/31 10:54:44 ru Exp $
-.\"
-.Dd June 18, 1997
-.Dt INET_NET 3
-.Os
-.Sh NAME
-.Nm inet_net_ntop ,
-.Nm inet_net_pton
-.Nd Internet network number manipulation routines
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/socket.h
-.In netinet/in.h
-.In arpa/inet.h
-.Ft char *
-.Fn inet_net_ntop "int af" "const void *src" "int bits" "char *dst" "size_t size"
-.Ft int
-.Fn inet_net_pton "int af" "const char *src" "void *dst" "size_t size"
-.Sh DESCRIPTION
-The
-.Fn inet_net_ntop
-function converts an Internet network number from network format (usually a
-.Vt "struct in_addr"
-or some other binary form, in network byte order) to CIDR presentation format
-(suitable for external display purposes).
-.Fa bits
-is the number of bits in
-.Fa src
-that are the network number.
-It returns
-.Dv NULL
-if a system error occurs (in which case,
-.Va errno
-will have been set), or it returns a pointer to the destination string.
-.Pp
-The
-.Fn inet_net_pton
-function converts a presentation format Internet network number (that is,
-printable form as held in a character string) to network format (usually a
-.Vt "struct in_addr"
-or some other internal binary representation, in network byte order).
-It returns the number of bits (either computed based on the class, or
-specified with /CIDR), or \-1 if a failure occurred
-(in which case
-.Va errno
-will have been set.
-It will be set to
-.Er ENOENT
-if the Internet network number was not valid).
-.Pp
-The only value for
-.Fa af
-currently supported is
-.Dv AF_INET .
-.Fa size
-is the size of the result buffer
-.Fa dst .
-.Pp
-.Sh NETWORK NUMBERS (IP VERSION 4)
-Internet network numbers may be specified in one of the following forms:
-.Bd -literal -offset indent
-a.b.c.d/bits
-a.b.c.d
-a.b.c
-a.b
-a
-.Ed
-.Pp
-When four parts are specified, each is interpreted
-as a byte of data and assigned, from left to right,
-to the four bytes of an Internet network number.
-Note
-that when an Internet network number is viewed as a 32-bit
-integer quantity on a system that uses little-endian
-byte order (such as the
-.Tn Intel 386 , 486 ,
-and
-.Tn Pentium
-processors) the bytes referred to above appear as
-.Dq Li d.c.b.a .
-That is, little-endian bytes are ordered from right to left.
-.Pp
-When a three part number is specified, the last
-part is interpreted as a 16-bit quantity and placed
-in the rightmost two bytes of the Internet network number.
-This makes the three part number format convenient
-for specifying Class B network numbers as
-.Dq Li 128.net.host .
-.Pp
-When a two part number is supplied, the last part
-is interpreted as a 24-bit quantity and placed in
-the rightmost three bytes of the Internet network number.
-This makes the two part number format convenient
-for specifying Class A network numbers as
-.Dq Li net.host .
-.Pp
-When only one part is given, the value is stored
-directly in the Internet network number without any byte
-rearrangement.
-.Pp
-All numbers supplied as
-.Dq parts
-in a
-.Ql \&.
-notation
-may be decimal, octal, or hexadecimal, as specified
-in the C language (i.e., a leading 0x or 0X implies
-hexadecimal; otherwise, a leading 0 implies octal;
-otherwise, the number is interpreted as decimal).
-.Sh SEE ALSO
-.Xr byteorder 3 ,
-.Xr inet 3 ,
-.Xr networks 5
-.Sh HISTORY
-The
-.Fn inet_net_ntop
-and
-.Fn inet_net_pton
-functions appeared in BIND 4.9.4.
diff --git a/newlib/libc/sys/linux/net/inet_net_ntop.c b/newlib/libc/sys/linux/net/inet_net_ntop.c
deleted file mode 100644
index caa99f0ec..000000000
--- a/newlib/libc/sys/linux/net/inet_net_ntop.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char orig_rcsid[] = "From Id: inet_net_ntop.c,v 8.2 1996/08/08 06:54:44 vixie Exp";
-#endif
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
-static char * inet_net_ntop_ipv4(const u_char *src, int bits, char *dst,
- size_t size);
-
-/*
- * char *
- * inet_net_ntop(af, src, bits, dst, size)
- * convert network number from network to presentation format.
- * generates CIDR style result always.
- * return:
- * pointer to dst, or NULL if an error occurred (check errno).
- * author:
- * Paul Vixie (ISC), July 1996
- */
-char *
-inet_net_ntop(af, src, bits, dst, size)
- int af;
- const void *src;
- int bits;
- char *dst;
- size_t size;
-{
- switch (af) {
- case AF_INET:
- return (inet_net_ntop_ipv4(src, bits, dst, size));
- default:
- errno = EAFNOSUPPORT;
- return (NULL);
- }
-}
-
-/*
- * static char *
- * inet_net_ntop_ipv4(src, bits, dst, size)
- * convert IPv4 network number from network to presentation format.
- * generates CIDR style result always.
- * return:
- * pointer to dst, or NULL if an error occurred (check errno).
- * note:
- * network byte order assumed. this means 192.5.5.240/28 has
- * 0x11110000 in its fourth octet.
- * author:
- * Paul Vixie (ISC), July 1996
- */
-static char *
-inet_net_ntop_ipv4(src, bits, dst, size)
- const u_char *src;
- int bits;
- char *dst;
- size_t size;
-{
- char *odst = dst;
- char *t;
- u_int m;
- int b;
-
- if (bits < 0 || bits > 32) {
- errno = EINVAL;
- return (NULL);
- }
- if (bits == 0) {
- if (size < sizeof "0")
- goto emsgsize;
- *dst++ = '0';
- *dst = '\0';
- }
-
- /* Format whole octets. */
- for (b = bits / 8; b > 0; b--) {
- if (size < sizeof "255.")
- goto emsgsize;
- t = dst;
- dst += SPRINTF((dst, "%u", *src++));
- if (b > 1) {
- *dst++ = '.';
- *dst = '\0';
- }
- size -= (size_t)(dst - t);
- }
-
- /* Format partial octet. */
- b = bits % 8;
- if (b > 0) {
- if (size < sizeof ".255")
- goto emsgsize;
- t = dst;
- if (dst != odst)
- *dst++ = '.';
- m = ((1 << b) - 1) << (8 - b);
- dst += SPRINTF((dst, "%u", *src & m));
- size -= (size_t)(dst - t);
- }
-
- /* Format CIDR /width. */
- if (size < sizeof "/32")
- goto emsgsize;
- dst += SPRINTF((dst, "/%u", bits));
- return (odst);
-
- emsgsize:
- errno = EMSGSIZE;
- return (NULL);
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <arpa/inet.h>.
- */
-#undef inet_net_ntop
-__weak_reference(__inet_net_ntop, inet_net_ntop);
diff --git a/newlib/libc/sys/linux/net/inet_net_pton.c b/newlib/libc/sys/linux/net/inet_net_pton.c
deleted file mode 100644
index 9386d0517..000000000
--- a/newlib/libc/sys/linux/net/inet_net_pton.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char orig_rcsid[] = "From Id: inet_net_pton.c,v 1.8 1996/11/21 10:28:12 vixie Exp $";
-#endif
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
-static int inet_net_pton_ipv4(const char *src, u_char *dst, size_t size);
-
-/*
- * static int
- * inet_net_pton(af, src, dst, size)
- * convert network number from presentation to network format.
- * accepts hex octets, hex strings, decimal octets, and /CIDR.
- * "size" is in bytes and describes "dst".
- * return:
- * number of bits, either imputed classfully or specified with /CIDR,
- * or -1 if some failure occurred (check errno). ENOENT means it was
- * not a valid network specification.
- * author:
- * Paul Vixie (ISC), June 1996
- */
-int
-inet_net_pton(af, src, dst, size)
- int af;
- const char *src;
- void *dst;
- size_t size;
-{
- switch (af) {
- case AF_INET:
- return (inet_net_pton_ipv4(src, dst, size));
- default:
- errno = EAFNOSUPPORT;
- return (-1);
- }
-}
-
-/*
- * static int
- * inet_net_pton_ipv4(src, dst, size)
- * convert IPv4 network number from presentation to network format.
- * accepts hex octets, hex strings, decimal octets, and /CIDR.
- * "size" is in bytes and describes "dst".
- * return:
- * number of bits, either imputed classfully or specified with /CIDR,
- * or -1 if some failure occurred (check errno). ENOENT means it was
- * not an IPv4 network specification.
- * note:
- * network byte order assumed. this means 192.5.5.240/28 has
- * 0x11110000 in its fourth octet.
- * author:
- * Paul Vixie (ISC), June 1996
- */
-static int
-inet_net_pton_ipv4(src, dst, size)
- const char *src;
- u_char *dst;
- size_t size;
-{
- static const char
- xdigits[] = "0123456789abcdef",
- digits[] = "0123456789";
- int n, ch, tmp, dirty, bits;
- const u_char *odst = dst;
-
- ch = *src++;
- if (ch == '0' && (src[0] == 'x' || src[0] == 'X')
- && isascii(src[1]) && isxdigit(src[1])) {
- /* Hexadecimal: Eat nybble string. */
- if (size <= 0)
- goto emsgsize;
- *dst = 0, dirty = 0;
- src++; /* skip x or X. */
- while ((ch = *src++) != '\0' &&
- isascii(ch) && isxdigit(ch)) {
- if (isupper(ch))
- ch = tolower(ch);
- n = strchr(xdigits, ch) - xdigits;
- assert(n >= 0 && n <= 15);
- *dst |= n;
- if (!dirty++)
- *dst <<= 4;
- else if (size-- > 0)
- *++dst = 0, dirty = 0;
- else
- goto emsgsize;
- }
- if (dirty)
- size--;
- } else if (isascii(ch) && isdigit(ch)) {
- /* Decimal: eat dotted digit string. */
- for (;;) {
- tmp = 0;
- do {
- n = strchr(digits, ch) - digits;
- assert(n >= 0 && n <= 9);
- tmp *= 10;
- tmp += n;
- if (tmp > 255)
- goto enoent;
- } while ((ch = *src++) != '\0' &&
- isascii(ch) && isdigit(ch));
- if (size-- <= 0)
- goto emsgsize;
- *dst++ = (u_char) tmp;
- if (ch == '\0' || ch == '/')
- break;
- if (ch != '.')
- goto enoent;
- ch = *src++;
- if (!isascii(ch) || !isdigit(ch))
- goto enoent;
- }
- } else
- goto enoent;
-
- bits = -1;
- if (ch == '/' && isascii(src[0]) && isdigit(src[0]) && dst > odst) {
- /* CIDR width specifier. Nothing can follow it. */
- ch = *src++; /* Skip over the /. */
- bits = 0;
- do {
- n = strchr(digits, ch) - digits;
- assert(n >= 0 && n <= 9);
- bits *= 10;
- bits += n;
- } while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
- if (ch != '\0')
- goto enoent;
- if (bits > 32)
- goto emsgsize;
- }
-
- /* Firey death and destruction unless we prefetched EOS. */
- if (ch != '\0')
- goto enoent;
-
- /* If nothing was written to the destination, we found no address. */
- if (dst == odst)
- goto enoent;
- /* If no CIDR spec was given, infer width from net class. */
- if (bits == -1) {
- if (*odst >= 240) /* Class E */
- bits = 32;
- else if (*odst >= 224) /* Class D */
- bits = 4;
- else if (*odst >= 192) /* Class C */
- bits = 24;
- else if (*odst >= 128) /* Class B */
- bits = 16;
- else /* Class A */
- bits = 8;
- /* If imputed mask is narrower than specified octets, widen. */
- if (bits >= 8 && bits < ((dst - odst) * 8))
- bits = (dst - odst) * 8;
- }
- /* Extend network to cover the actual mask. */
- while (bits > ((dst - odst) * 8)) {
- if (size-- <= 0)
- goto emsgsize;
- *dst++ = '\0';
- }
- return (bits);
-
- enoent:
- errno = ENOENT;
- return (-1);
-
- emsgsize:
- errno = EMSGSIZE;
- return (-1);
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <arpa/inet.h>.
- */
-#undef inet_net_pton
-__weak_reference(__inet_net_pton, inet_net_pton);
diff --git a/newlib/libc/sys/linux/net/inet_neta.c b/newlib/libc/sys/linux/net/inet_neta.c
deleted file mode 100644
index c45578348..000000000
--- a/newlib/libc/sys/linux/net/inet_neta.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char orig_rcsid[] = "From Id: inet_neta.c,v 8.2 1996/08/08 06:54:44 vixie Exp";
-#endif
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
-/*
- * char *
- * inet_neta(src, dst, size)
- * format a in_addr_t network number into presentation format.
- * return:
- * pointer to dst, or NULL if an error occurred (check errno).
- * note:
- * format of ``src'' is as for inet_network().
- * author:
- * Paul Vixie (ISC), July 1996
- */
-char *
-inet_neta(src, dst, size)
- in_addr_t src;
- char *dst;
- size_t size;
-{
- char *odst = dst;
- char *tp;
-
- while (src & 0xffffffff) {
- u_char b = (src & 0xff000000) >> 24;
-
- src <<= 8;
- if (b) {
- if (size < sizeof "255.")
- goto emsgsize;
- tp = dst;
- dst += SPRINTF((dst, "%u", b));
- if (src != 0L) {
- *dst++ = '.';
- *dst = '\0';
- }
- size -= (size_t)(dst - tp);
- }
- }
- if (dst == odst) {
- if (size < sizeof "0.0.0.0")
- goto emsgsize;
- strcpy(dst, "0.0.0.0");
- }
- return (odst);
-
- emsgsize:
- errno = EMSGSIZE;
- return (NULL);
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <arpa/inet.h>.
- */
-#undef inet_neta
-__weak_reference(__inet_neta, inet_neta);
diff --git a/newlib/libc/sys/linux/net/inet_netof.c b/newlib/libc/sys/linux/net/inet_netof.c
deleted file mode 100644
index e2e84d340..000000000
--- a/newlib/libc/sys/linux/net/inet_netof.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_netof.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/endian.h>
-
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*
- * Return the network number from an internet
- * address; handles class a/b/c network #'s.
- */
-in_addr_t
-inet_netof(in)
- struct in_addr in;
-{
- in_addr_t i = ntohl(in.s_addr);
-
- if (IN_CLASSA(i))
- return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT);
- else if (IN_CLASSB(i))
- return (((i)&IN_CLASSB_NET) >> IN_CLASSB_NSHIFT);
- else
- return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT);
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <arpa/inet.h>.
- */
-#undef inet_netof
-__weak_reference(__inet_netof, inet_netof);
diff --git a/newlib/libc/sys/linux/net/inet_network.c b/newlib/libc/sys/linux/net/inet_network.c
deleted file mode 100644
index caf1d7869..000000000
--- a/newlib/libc/sys/linux/net/inet_network.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <ctype.h>
-
-/*
- * Internet network address interpretation routine.
- * The library routines call this routine to interpret
- * network numbers.
- */
-in_addr_t
-inet_network(cp)
- const char *cp;
-{
- in_addr_t val, base, n;
- char c;
- in_addr_t parts[4], *pp = parts;
- int i;
-
-again:
- val = 0; base = 10;
- if (*cp == '0')
- base = 8, cp++;
- if (*cp == 'x' || *cp == 'X')
- base = 16, cp++;
- while ((c = *cp) != 0) {
- if (isdigit((unsigned char)c)) {
- val = (val * base) + (c - '0');
- cp++;
- continue;
- }
- if (base == 16 && isxdigit((unsigned char)c)) {
- val = (val << 4) + (c + 10 - (islower((unsigned char)c) ? 'a' : 'A'));
- cp++;
- continue;
- }
- break;
- }
- if (*cp == '.') {
- if (pp >= parts + 3)
- return (INADDR_NONE);
- *pp++ = val, cp++;
- goto again;
- }
- if (*cp && !isspace((unsigned char)*cp))
- return (INADDR_NONE);
- *pp++ = val;
- n = pp - parts;
- for (val = 0, i = 0; i < n; i++) {
- val <<= 8;
- val |= parts[i] & 0xff;
- }
- return (val);
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <arpa/inet.h>.
- */
-#undef inet_network
-__weak_reference(__inet_network, inet_network);
diff --git a/newlib/libc/sys/linux/net/inet_ntoa.c b/newlib/libc/sys/linux/net/inet_ntoa.c
deleted file mode 100644
index dedc4768d..000000000
--- a/newlib/libc/sys/linux/net/inet_ntoa.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_ntoa.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <stdio.h>
-#include <string.h>
-
-/*
- * Convert network-format internet address
- * to base 256 d.d.d.d representation.
- */
-char *
-inet_ntoa(in)
- struct in_addr in;
-{
- static char ret[18];
-
- strcpy(ret, "[inet_ntoa error]");
- (void) inet_ntop(AF_INET, &in, ret, sizeof ret);
- return (ret);
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <arpa/inet.h>.
- */
-#undef inet_ntoa
-__weak_reference(__inet_ntoa, inet_ntoa);
diff --git a/newlib/libc/sys/linux/net/inet_ntop.c b/newlib/libc/sys/linux/net/inet_ntop.c
deleted file mode 100644
index 31746e456..000000000
--- a/newlib/libc/sys/linux/net/inet_ntop.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/* Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#define SPRINTF(x) ((socklen_t)sprintf x)
-
-/*
- * WARNING: Don't even consider trying to compile this on a system where
- * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
- */
-
-static const char *inet_ntop4(const u_char *src, char *dst, socklen_t size);
-static const char *inet_ntop6(const u_char *src, char *dst, socklen_t size);
-
-/* char *
- * inet_ntop(af, src, dst, size)
- * convert a network format address to presentation format.
- * return:
- * pointer to presentation format address (`dst'), or NULL (see errno).
- * author:
- * Paul Vixie, 1996.
- */
-const char *
-inet_ntop(af, src, dst, size)
- int af;
- const void *src;
- char *dst;
- socklen_t size;
-{
- switch (af) {
- case AF_INET:
- return (inet_ntop4(src, dst, size));
- case AF_INET6:
- return (inet_ntop6(src, dst, size));
- default:
- errno = EAFNOSUPPORT;
- return (NULL);
- }
- /* NOTREACHED */
-}
-
-/* const char *
- * inet_ntop4(src, dst, size)
- * format an IPv4 address, more or less like inet_ntoa()
- * return:
- * `dst' (as a const)
- * notes:
- * (1) uses no statics
- * (2) takes a u_char* not an in_addr as input
- * author:
- * Paul Vixie, 1996.
- */
-static const char *
-inet_ntop4(src, dst, size)
- const u_char *src;
- char *dst;
- socklen_t size;
-{
- static const char fmt[] = "%u.%u.%u.%u";
- char tmp[sizeof "255.255.255.255"];
-
- if (SPRINTF((tmp, fmt, src[0], src[1], src[2], src[3])) > size) {
- errno = ENOSPC;
- return (NULL);
- }
- strcpy(dst, tmp);
- return (dst);
-}
-
-/* const char *
- * inet_ntop6(src, dst, size)
- * convert IPv6 binary address into presentation (printable) format
- * author:
- * Paul Vixie, 1996.
- */
-static const char *
-inet_ntop6(src, dst, size)
- const u_char *src;
- char *dst;
- socklen_t size;
-{
- /*
- * Note that int32_t and int16_t need only be "at least" large enough
- * to contain a value of the specified size. On some systems, like
- * Crays, there is no such thing as an integer variable with 16 bits.
- * Keep this in mind if you think this function should have been coded
- * to use pointer overlays. All the world's not a VAX.
- */
- char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
- struct { int base, len; } best, cur;
- u_int words[NS_IN6ADDRSZ / NS_INT16SZ];
- int i;
-
- /*
- * Preprocess:
- * Copy the input (bytewise) array into a wordwise array.
- * Find the longest run of 0x00's in src[] for :: shorthanding.
- */
- memset(words, '\0', sizeof words);
- for (i = 0; i < NS_IN6ADDRSZ; i++)
- words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
- best.base = -1;
- cur.base = -1;
- for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
- if (words[i] == 0) {
- if (cur.base == -1)
- cur.base = i, cur.len = 1;
- else
- cur.len++;
- } else {
- if (cur.base != -1) {
- if (best.base == -1 || cur.len > best.len)
- best = cur;
- cur.base = -1;
- }
- }
- }
- if (cur.base != -1) {
- if (best.base == -1 || cur.len > best.len)
- best = cur;
- }
- if (best.base != -1 && best.len < 2)
- best.base = -1;
-
- /*
- * Format the result.
- */
- tp = tmp;
- for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
- /* Are we inside the best run of 0x00's? */
- if (best.base != -1 && i >= best.base &&
- i < (best.base + best.len)) {
- if (i == best.base)
- *tp++ = ':';
- continue;
- }
- /* Are we following an initial run of 0x00s or any real hex? */
- if (i != 0)
- *tp++ = ':';
- /* Is this address an encapsulated IPv4? */
- if (i == 6 && best.base == 0 &&
- (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
- if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
- return (NULL);
- tp += strlen(tp);
- break;
- }
- tp += SPRINTF((tp, "%x", words[i]));
- }
- /* Was it a trailing run of 0x00's? */
- if (best.base != -1 && (best.base + best.len) ==
- (NS_IN6ADDRSZ / NS_INT16SZ))
- *tp++ = ':';
- *tp++ = '\0';
-
- /*
- * Check for overflow, copy, and we're done.
- */
- if ((socklen_t)(tp - tmp) > size) {
- errno = ENOSPC;
- return (NULL);
- }
- strcpy(dst, tmp);
- return (dst);
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <arpa/inet.h>.
- */
-#undef inet_ntop
-__weak_reference(__inet_ntop, inet_ntop);
diff --git a/newlib/libc/sys/linux/net/inet_pton.c b/newlib/libc/sys/linux/net/inet_pton.c
deleted file mode 100644
index eeabbb481..000000000
--- a/newlib/libc/sys/linux/net/inet_pton.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/* $KAME: inet_pton.c,v 1.5 2001/08/20 02:32:40 itojun Exp $ */
-
-/* Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <string.h>
-#include <errno.h>
-
-/*
- * WARNING: Don't even consider trying to compile this on a system where
- * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
- */
-
-static int inet_pton4(const char *src, u_char *dst);
-static int inet_pton6(const char *src, u_char *dst);
-
-/* int
- * inet_pton(af, src, dst)
- * convert from presentation format (which usually means ASCII printable)
- * to network format (which is usually some kind of binary format).
- * return:
- * 1 if the address was valid for the specified address family
- * 0 if the address wasn't valid (`dst' is untouched in this case)
- * -1 if some other error occurred (`dst' is untouched in this case, too)
- * author:
- * Paul Vixie, 1996.
- */
-int
-inet_pton(af, src, dst)
- int af;
- const char *src;
- void *dst;
-{
- switch (af) {
- case AF_INET:
- return (inet_pton4(src, dst));
- case AF_INET6:
- return (inet_pton6(src, dst));
- default:
- errno = EAFNOSUPPORT;
- return (-1);
- }
- /* NOTREACHED */
-}
-
-/* int
- * inet_pton4(src, dst)
- * like inet_aton() but without all the hexadecimal and shorthand.
- * return:
- * 1 if `src' is a valid dotted quad, else 0.
- * notice:
- * does not touch `dst' unless it's returning 1.
- * author:
- * Paul Vixie, 1996.
- */
-static int
-inet_pton4(src, dst)
- const char *src;
- u_char *dst;
-{
- static const char digits[] = "0123456789";
- int saw_digit, octets, ch;
- u_char tmp[NS_INADDRSZ], *tp;
-
- saw_digit = 0;
- octets = 0;
- *(tp = tmp) = 0;
- while ((ch = *src++) != '\0') {
- const char *pch;
-
- if ((pch = strchr(digits, ch)) != NULL) {
- u_int new = *tp * 10 + (pch - digits);
-
- if (new > 255)
- return (0);
- *tp = new;
- if (! saw_digit) {
- if (++octets > 4)
- return (0);
- saw_digit = 1;
- }
- } else if (ch == '.' && saw_digit) {
- if (octets == 4)
- return (0);
- *++tp = 0;
- saw_digit = 0;
- } else
- return (0);
- }
- if (octets < 4)
- return (0);
-
- memcpy(dst, tmp, NS_INADDRSZ);
- return (1);
-}
-
-/* int
- * inet_pton6(src, dst)
- * convert presentation level address to network order binary form.
- * return:
- * 1 if `src' is a valid [RFC1884 2.2] address, else 0.
- * notice:
- * (1) does not touch `dst' unless it's returning 1.
- * (2) :: in a full address is silently ignored.
- * credit:
- * inspired by Mark Andrews.
- * author:
- * Paul Vixie, 1996.
- */
-static int
-inet_pton6(src, dst)
- const char *src;
- u_char *dst;
-{
- static const char xdigits_l[] = "0123456789abcdef",
- xdigits_u[] = "0123456789ABCDEF";
- u_char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
- const char *xdigits, *curtok;
- int ch, saw_xdigit;
- u_int val;
-
- memset((tp = tmp), '\0', NS_IN6ADDRSZ);
- endp = tp + NS_IN6ADDRSZ;
- colonp = NULL;
- /* Leading :: requires some special handling. */
- if (*src == ':')
- if (*++src != ':')
- return (0);
- curtok = src;
- saw_xdigit = 0;
- val = 0;
- while ((ch = *src++) != '\0') {
- const char *pch;
-
- if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL)
- pch = strchr((xdigits = xdigits_u), ch);
- if (pch != NULL) {
- val <<= 4;
- val |= (pch - xdigits);
- if (val > 0xffff)
- return (0);
- saw_xdigit = 1;
- continue;
- }
- if (ch == ':') {
- curtok = src;
- if (!saw_xdigit) {
- if (colonp)
- return (0);
- colonp = tp;
- continue;
- }
- if (tp + NS_INT16SZ > endp)
- return (0);
- *tp++ = (u_char) (val >> 8) & 0xff;
- *tp++ = (u_char) val & 0xff;
- saw_xdigit = 0;
- val = 0;
- continue;
- }
- if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) &&
- inet_pton4(curtok, tp) > 0) {
- tp += NS_INADDRSZ;
- saw_xdigit = 0;
- break; /* '\0' was seen by inet_pton4(). */
- }
- return (0);
- }
- if (saw_xdigit) {
- if (tp + NS_INT16SZ > endp)
- return (0);
- *tp++ = (u_char) (val >> 8) & 0xff;
- *tp++ = (u_char) val & 0xff;
- }
- if (colonp != NULL) {
- /*
- * Since some memmove()'s erroneously fail to handle
- * overlapping regions, we'll do the shift by hand.
- */
- const int n = tp - colonp;
- int i;
-
- for (i = 1; i <= n; i++) {
- endp[- i] = colonp[n - i];
- colonp[n - i] = 0;
- }
- tp = endp;
- }
- if (tp != endp)
- return (0);
- memcpy(dst, tmp, NS_IN6ADDRSZ);
- return (1);
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <arpa/inet.h>.
- */
-#undef inet_pton
-__weak_reference(__inet_pton, inet_pton);
diff --git a/newlib/libc/sys/linux/net/innetgr-stub.c b/newlib/libc/sys/linux/net/innetgr-stub.c
deleted file mode 100644
index 690d82e14..000000000
--- a/newlib/libc/sys/linux/net/innetgr-stub.c
+++ /dev/null
@@ -1,7 +0,0 @@
-int
-innetgr(const char *netgroup, const char *host, const char *user,
- const char *domain)
-{
- return 0;
-}
-
diff --git a/newlib/libc/sys/linux/net/ip6opt.c b/newlib/libc/sys/linux/net/ip6opt.c
deleted file mode 100644
index f3f51d507..000000000
--- a/newlib/libc/sys/linux/net/ip6opt.c
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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>
-#include <sys/types.h>
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <netinet/ip6.h>
-
-#include <string.h>
-#include <stdio.h>
-
-static int ip6optlen(u_int8_t *opt, u_int8_t *lim);
-static void inet6_insert_padopt(u_char *p, int len);
-
-/*
- * This function returns the number of bytes required to hold an option
- * when it is stored as ancillary data, including the cmsghdr structure
- * at the beginning, and any padding at the end (to make its size a
- * multiple of 8 bytes). The argument is the size of the structure
- * defining the option, which must include any pad bytes at the
- * beginning (the value y in the alignment term "xn + y"), the type
- * byte, the length byte, and the option data.
- */
-int
-inet6_option_space(nbytes)
- int nbytes;
-{
- nbytes += 2; /* we need space for nxt-hdr and length fields */
- return(CMSG_SPACE((nbytes + 7) & ~7));
-}
-
-/*
- * This function is called once per ancillary data object that will
- * contain either Hop-by-Hop or Destination options. It returns 0 on
- * success or -1 on an error.
- */
-int
-inet6_option_init(bp, cmsgp, type)
- void *bp;
- struct cmsghdr **cmsgp;
- int type;
-{
- struct cmsghdr *ch = (struct cmsghdr *)bp;
-
- /* argument validation */
- if (type != IPV6_HOPOPTS && type != IPV6_DSTOPTS)
- return(-1);
-
- ch->cmsg_level = IPPROTO_IPV6;
- ch->cmsg_type = type;
- ch->cmsg_len = CMSG_LEN(0);
-
- *cmsgp = ch;
- return(0);
-}
-
-/*
- * This function appends a Hop-by-Hop option or a Destination option
- * into an ancillary data object that has been initialized by
- * inet6_option_init(). This function returns 0 if it succeeds or -1 on
- * an error.
- * multx is the value x in the alignment term "xn + y" described
- * earlier. It must have a value of 1, 2, 4, or 8.
- * plusy is the value y in the alignment term "xn + y" described
- * earlier. It must have a value between 0 and 7, inclusive.
- */
-int
-inet6_option_append(cmsg, typep, multx, plusy)
- struct cmsghdr *cmsg;
- const u_int8_t *typep;
- int multx;
- int plusy;
-{
- int padlen, optlen, off;
- u_char *bp = (u_char *)cmsg + cmsg->cmsg_len;
- struct ip6_ext *eh = (struct ip6_ext *)CMSG_DATA(cmsg);
-
- /* argument validation */
- if (multx != 1 && multx != 2 && multx != 4 && multx != 8)
- return(-1);
- if (plusy < 0 || plusy > 7)
- return(-1);
- if (typep[0] > 255)
- return(-1);
-
- /*
- * If this is the first option, allocate space for the
- * first 2 bytes(for next header and length fields) of
- * the option header.
- */
- if (bp == (u_char *)eh) {
- bp += 2;
- cmsg->cmsg_len += 2;
- }
-
- /* calculate pad length before the option. */
- off = bp - (u_char *)eh;
- padlen = (((off % multx) + (multx - 1)) & ~(multx - 1)) -
- (off % multx);
- padlen += plusy;
- /* insert padding */
- inet6_insert_padopt(bp, padlen);
- cmsg->cmsg_len += padlen;
- bp += padlen;
-
- /* copy the option */
- if (typep[0] == IP6OPT_PAD1)
- optlen = 1;
- else
- optlen = typep[1] + 2;
- memcpy(bp, typep, optlen);
- bp += optlen;
- cmsg->cmsg_len += optlen;
-
- /* calculate pad length after the option and insert the padding */
- off = bp - (u_char *)eh;
- padlen = ((off + 7) & ~7) - off;
- inet6_insert_padopt(bp, padlen);
- bp += padlen;
- cmsg->cmsg_len += padlen;
-
- /* update the length field of the ip6 option header */
- eh->ip6e_len = ((bp - (u_char *)eh) >> 3) - 1;
-
- return(0);
-}
-
-/*
- * This function appends a Hop-by-Hop option or a Destination option
- * into an ancillary data object that has been initialized by
- * inet6_option_init(). This function returns a pointer to the 8-bit
- * option type field that starts the option on success, or NULL on an
- * error.
- * The difference between this function and inet6_option_append() is
- * that the latter copies the contents of a previously built option into
- * the ancillary data object while the current function returns a
- * pointer to the space in the data object where the option's TLV must
- * then be built by the caller.
- *
- */
-u_int8_t *
-inet6_option_alloc(cmsg, datalen, multx, plusy)
- struct cmsghdr *cmsg;
- int datalen;
- int multx;
- int plusy;
-{
- int padlen, off;
- u_int8_t *bp = (u_char *)cmsg + cmsg->cmsg_len;
- u_int8_t *retval;
- struct ip6_ext *eh = (struct ip6_ext *)CMSG_DATA(cmsg);
-
- /* argument validation */
- if (multx != 1 && multx != 2 && multx != 4 && multx != 8)
- return(NULL);
- if (plusy < 0 || plusy > 7)
- return(NULL);
-
- /*
- * If this is the first option, allocate space for the
- * first 2 bytes(for next header and length fields) of
- * the option header.
- */
- if (bp == (u_char *)eh) {
- bp += 2;
- cmsg->cmsg_len += 2;
- }
-
- /* calculate pad length before the option. */
- off = bp - (u_char *)eh;
- padlen = (((off % multx) + (multx - 1)) & ~(multx - 1)) -
- (off % multx);
- padlen += plusy;
- /* insert padding */
- inet6_insert_padopt(bp, padlen);
- cmsg->cmsg_len += padlen;
- bp += padlen;
-
- /* keep space to store specified length of data */
- retval = bp;
- bp += datalen;
- cmsg->cmsg_len += datalen;
-
- /* calculate pad length after the option and insert the padding */
- off = bp - (u_char *)eh;
- padlen = ((off + 7) & ~7) - off;
- inet6_insert_padopt(bp, padlen);
- bp += padlen;
- cmsg->cmsg_len += padlen;
-
- /* update the length field of the ip6 option header */
- eh->ip6e_len = ((bp - (u_char *)eh) >> 3) - 1;
-
- return(retval);
-}
-
-/*
- * This function processes the next Hop-by-Hop option or Destination
- * option in an ancillary data object. If another option remains to be
- * processed, the return value of the function is 0 and *tptrp points to
- * the 8-bit option type field (which is followed by the 8-bit option
- * data length, followed by the option data). If no more options remain
- * to be processed, the return value is -1 and *tptrp is NULL. If an
- * error occurs, the return value is -1 and *tptrp is not NULL.
- * (RFC 2292, 6.3.5)
- */
-int
-inet6_option_next(cmsg, tptrp)
- const struct cmsghdr *cmsg;
- u_int8_t **tptrp;
-{
- struct ip6_ext *ip6e;
- int hdrlen, optlen;
- u_int8_t *lim;
-
- if (cmsg->cmsg_level != IPPROTO_IPV6 ||
- (cmsg->cmsg_type != IPV6_HOPOPTS &&
- cmsg->cmsg_type != IPV6_DSTOPTS))
- return(-1);
-
- /* message length validation */
- if (cmsg->cmsg_len < CMSG_SPACE(sizeof(struct ip6_ext)))
- return(-1);
- ip6e = (struct ip6_ext *)CMSG_DATA(cmsg);
- hdrlen = (ip6e->ip6e_len + 1) << 3;
- if (cmsg->cmsg_len < CMSG_SPACE(hdrlen))
- return(-1);
-
- /*
- * If the caller does not specify the starting point,
- * simply return the 1st option.
- * Otherwise, search the option list for the next option.
- */
- lim = (u_int8_t *)ip6e + hdrlen;
- if (*tptrp == NULL)
- *tptrp = (u_int8_t *)(ip6e + 1);
- else {
- if ((optlen = ip6optlen(*tptrp, lim)) == 0)
- return(-1);
-
- *tptrp = *tptrp + optlen;
- }
- if (*tptrp >= lim) { /* there is no option */
- *tptrp = NULL;
- return(-1);
- }
- /*
- * Finally, checks if the next option is safely stored in the
- * cmsg data.
- */
- if (ip6optlen(*tptrp, lim) == 0)
- return(-1);
- else
- return(0);
-}
-
-/*
- * This function is similar to the inet6_option_next() function,
- * except this function lets the caller specify the option type to be
- * searched for, instead of always returning the next option in the
- * ancillary data object.
- * Note: RFC 2292 says the type of tptrp is u_int8_t *, but we think
- * it's a typo. The variable should be type of u_int8_t **.
- */
-int
-inet6_option_find(cmsg, tptrp, type)
- const struct cmsghdr *cmsg;
- u_int8_t **tptrp;
- int type;
-{
- struct ip6_ext *ip6e;
- int hdrlen, optlen;
- u_int8_t *optp, *lim;
-
- if (cmsg->cmsg_level != IPPROTO_IPV6 ||
- (cmsg->cmsg_type != IPV6_HOPOPTS &&
- cmsg->cmsg_type != IPV6_DSTOPTS))
- return(-1);
-
- /* message length validation */
- if (cmsg->cmsg_len < CMSG_SPACE(sizeof(struct ip6_ext)))
- return(-1);
- ip6e = (struct ip6_ext *)CMSG_DATA(cmsg);
- hdrlen = (ip6e->ip6e_len + 1) << 3;
- if (cmsg->cmsg_len < CMSG_SPACE(hdrlen))
- return(-1);
-
- /*
- * If the caller does not specify the starting point,
- * search from the beginning of the option list.
- * Otherwise, search from *the next option* of the specified point.
- */
- lim = (u_int8_t *)ip6e + hdrlen;
- if (*tptrp == NULL)
- *tptrp = (u_int8_t *)(ip6e + 1);
- else {
- if ((optlen = ip6optlen(*tptrp, lim)) == 0)
- return(-1);
-
- *tptrp = *tptrp + optlen;
- }
- for (optp = *tptrp; optp < lim; optp += optlen) {
- if (*optp == type) {
- *tptrp = optp;
- return(0);
- }
- if ((optlen = ip6optlen(optp, lim)) == 0)
- return(-1);
- }
-
- /* search failed */
- *tptrp = NULL;
- return(-1);
-}
-
-/*
- * Calculate the length of a given IPv6 option. Also checks
- * if the option is safely stored in user's buffer according to the
- * calculated length and the limitation of the buffer.
- */
-static int
-ip6optlen(opt, lim)
- u_int8_t *opt, *lim;
-{
- int optlen;
-
- if (*opt == IP6OPT_PAD1)
- optlen = 1;
- else {
- /* is there enough space to store type and len? */
- if (opt + 2 > lim)
- return(0);
- optlen = *(opt + 1) + 2;
- }
- if (opt + optlen <= lim)
- return(optlen);
-
- return(0);
-}
-
-static void
-inet6_insert_padopt(u_char *p, int len)
-{
- switch(len) {
- case 0:
- return;
- case 1:
- p[0] = IP6OPT_PAD1;
- return;
- default:
- p[0] = IP6OPT_PADN;
- p[1] = len - 2;
- memset(&p[2], 0, len - 2);
- return;
- }
-}
diff --git a/newlib/libc/sys/linux/net/iso_addr.3 b/newlib/libc/sys/linux/net/iso_addr.3
deleted file mode 100644
index dc843c315..000000000
--- a/newlib/libc/sys/linux/net/iso_addr.3
+++ /dev/null
@@ -1,113 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)iso_addr.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/net/iso_addr.3,v 1.7 2001/10/01 16:08:56 ru Exp $
-.\"
-.Dd June 4, 1993
-.Dt ISO_ADDR 3
-.Os
-.Sh NAME
-.Nm iso_addr ,
-.Nm iso_ntoa
-.Nd "elementary network address conversion routines for Open System Interconnection
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In netiso/iso.h
-.Ft struct iso_addr *
-.Fn iso_addr "char *cp"
-.Ft char *
-.Fn iso_ntoa "struct iso_addr *isoa"
-.Sh DESCRIPTION
-The routine
-.Fn iso_addr
-interprets character strings representing
-.Tn OSI
-addresses, returning binary information suitable
-for use in system calls.
-The routine
-.Fn iso_ntoa
-takes
-.Tn OSI
-addresses and returns
-.Tn ASCII
-strings representing NSAPs (network service
-access points) in a
-notation inverse to that accepted by
-.Fn iso_addr .
-.Pp
-Unfortunately, no universal standard exists for representing
-.Tn OSI
-network addresses.
-.Pp
-The format employed by
-.Fn iso_addr
-is a sequence of hexadecimal
-.Dq digits
-(optionally separated by periods),
-of the form:
-.Bd -ragged -offset indent
-<hex digits>.<hex digits>.<hex digits>
-.Ed
-.Pp
-Each pair of hexadecimal digits represents a byte
-with the leading digit indicating the higher-ordered bits.
-A period following an even number of bytes has no
-effect (but may be used to increase legibility).
-A period following an odd number of bytes has the
-effect of causing the byte of address being translated
-to have its higher order bits filled with zeros.
-.Sh RETURN VALUES
-.Fn iso_ntoa
-always returns a null terminated string.
-.Fn iso_addr
-always returns a pointer to a struct iso_addr.
-(See
-.Sx BUGS . )
-.Sh SEE ALSO
-.Xr iso 4
-.Sh HISTORY
-The
-.Fn iso_addr
-and
-.Fn iso_ntoa
-functions appeared in
-.Bx 4.3 Reno .
-.Sh BUGS
-The returned values
-reside in a static memory area.
-.Pp
-The function
-.Fn iso_addr
-should diagnose improperly formed input, and there should be an unambiguous
-way to recognize this.
diff --git a/newlib/libc/sys/linux/net/iso_addr.c b/newlib/libc/sys/linux/net/iso_addr.c
deleted file mode 100644
index e943122f8..000000000
--- a/newlib/libc/sys/linux/net/iso_addr.c
+++ /dev/null
@@ -1,119 +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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)iso_addr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <netiso/iso.h>
-#include <string.h>
-
-/* States*/
-#define VIRGIN 0
-#define GOTONE 1
-#define GOTTWO 2
-/* Inputs */
-#define DIGIT (4*0)
-#define END (4*1)
-#define DELIM (4*2)
-
-struct iso_addr *
-iso_addr(addr)
- const char *addr;
-{
- static struct iso_addr out_addr;
- char *cp = out_addr.isoa_genaddr;
- char *cplim = cp + sizeof(out_addr.isoa_genaddr);
- int byte = 0, state = VIRGIN, new;
-
- bzero((char *)&out_addr, sizeof(out_addr));
- do {
- if ((*addr >= '0') && (*addr <= '9')) {
- new = *addr - '0';
- } else if ((*addr >= 'a') && (*addr <= 'f')) {
- new = *addr - 'a' + 10;
- } else if ((*addr >= 'A') && (*addr <= 'F')) {
- new = *addr - 'A' + 10;
- } else if (*addr == 0)
- state |= END;
- else
- state |= DELIM;
- addr++;
- switch (state /* | INPUT */) {
- case GOTTWO | DIGIT:
- *cp++ = byte; /*FALLTHROUGH*/
- case VIRGIN | DIGIT:
- state = GOTONE; byte = new; continue;
- case GOTONE | DIGIT:
- state = GOTTWO; byte = new + (byte << 4); continue;
- default: /* | DELIM */
- state = VIRGIN; *cp++ = byte; byte = 0; continue;
- case GOTONE | END:
- case GOTTWO | END:
- *cp++ = byte; /* FALLTHROUGH */
- case VIRGIN | END:
- break;
- }
- break;
- } while (cp < cplim);
- out_addr.isoa_len = cp - out_addr.isoa_genaddr;
- return (&out_addr);
-}
-
-static char hexlist[] = "0123456789abcdef";
-
-char *
-iso_ntoa(isoa)
- const struct iso_addr *isoa;
-{
- static char tmpbuf[sizeof(isoa->isoa_genaddr)*3];
- const u_char *binary;
- char *cp;
- int i;
-
- binary = isoa->isoa_genaddr;
- cp = tmpbuf;
-
- for (i = 0; i < isoa->isoa_len; i++) {
- *cp++ = hexlist[*binary >> 4];
- *cp++ = hexlist[*binary++ & 0xf];
-
- if ((((i % 2) == 0) && ((i + 1) < isoa->isoa_len)))
- *cp++ = '.';
- }
- *cp = '\0';
- return tmpbuf;
-}
diff --git a/newlib/libc/sys/linux/net/issetugid-stub.c b/newlib/libc/sys/linux/net/issetugid-stub.c
deleted file mode 100644
index b3aac0b63..000000000
--- a/newlib/libc/sys/linux/net/issetugid-stub.c
+++ /dev/null
@@ -1,5 +0,0 @@
-int
-issetugid(void)
-{
- return 0;
-}
diff --git a/newlib/libc/sys/linux/net/linkaddr.3 b/newlib/libc/sys/linux/net/linkaddr.3
deleted file mode 100644
index 1d664630b..000000000
--- a/newlib/libc/sys/linux/net/linkaddr.3
+++ /dev/null
@@ -1,140 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Donn Seeley at BSDI.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)linkaddr.3 8.1 (Berkeley) 7/28/93
-.\" $FreeBSD: src/lib/libc/net/linkaddr.3,v 1.12 2001/10/01 16:08:56 ru Exp $
-.\"
-.Dd June 17, 1996
-.Dt LINK_ADDR 3
-.Os
-.Sh NAME
-.Nm link_addr ,
-.Nm link_ntoa
-.Nd elementary address specification routines for link level access
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/socket.h
-.In net/if_dl.h
-.Ft void
-.Fn link_addr "const char *addr" "struct sockaddr_dl *sdl"
-.Ft char *
-.Fn link_ntoa "const struct sockaddr_dl *sdl"
-.Sh DESCRIPTION
-The routine
-.Fn link_addr
-interprets character strings representing
-link-level addresses, returning binary information suitable
-for use in system calls.
-The routine
-.Fn link_ntoa
-takes
-a link-level
-address and returns an
-.Tn ASCII
-string representing some of the information present,
-including the link level address itself, and the interface name
-or number, if present.
-This facility is experimental and is
-still subject to change.
-.Pp
-For
-.Fn link_addr ,
-the string
-.Fa addr
-may contain
-an optional network interface identifier of the form
-.Dq "name unit-number" ,
-suitable for the first argument to
-.Xr ifconfig 8 ,
-followed in all cases by a colon and
-an interface address in the form of
-groups of hexadecimal digits
-separated by periods.
-Each group represents a byte of address;
-address bytes are filled left to right from
-low order bytes through high order bytes.
-.Pp
-.\" A regular expression may make this format clearer:
-.\" .Bd -literal -offset indent
-.\" ([a-z]+[0-9]+:)?[0-9a-f]+(\e.[0-9a-f]+)*
-.\" .Ed
-.\" .Pp
-Thus
-.Li le0:8.0.9.13.d.30
-represents an ethernet address
-to be transmitted on the first Lance ethernet interface.
-.Pp
-The direct use of these functions is deprecated in favor of the
-.Xr addr2ascii 3
-interface; however, portable programs cannot rely on the latter as it is
-not yet widely implemented.
-.Sh RETURN VALUES
-.Fn link_ntoa
-always returns a null terminated string.
-.Fn link_addr
-has no return value.
-(See
-.Sx BUGS . )
-.Sh SEE ALSO
-.Xr addr2ascii 3
-.\" .Xr iso 4
-.Sh HISTORY
-The
-.Fn link_addr
-and
-.Fn link_ntoa
-functions appeared in
-.Bx 4.3 Reno .
-.Sh BUGS
-The returned values for link_ntoa
-reside in a static memory area.
-.Pp
-The function
-.Fn link_addr
-should diagnose improperly formed input, and there should be an unambiguous
-way to recognize this.
-.Pp
-If the
-.Va sdl_len
-field of the link socket address
-.Fa sdl
-is 0,
-.Fn link_ntoa
-will not insert a colon before the interface address bytes.
-If this translated address is given to
-.Fn link_addr
-without inserting an initial colon,
-the latter will not interpret it correctly.
diff --git a/newlib/libc/sys/linux/net/linkaddr.c b/newlib/libc/sys/linux/net/linkaddr.c
deleted file mode 100644
index deeaa09ea..000000000
--- a/newlib/libc/sys/linux/net/linkaddr.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)linkaddr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <net/if_dl.h>
-#include <string.h>
-
-/* States*/
-#define NAMING 0
-#define GOTONE 1
-#define GOTTWO 2
-#define RESET 3
-/* Inputs */
-#define DIGIT (4*0)
-#define END (4*1)
-#define DELIM (4*2)
-#define LETTER (4*3)
-
-void
-link_addr(addr, sdl)
- const char *addr;
- struct sockaddr_dl *sdl;
-{
- char *cp = sdl->sdl_data;
- char *cplim = sdl->sdl_len + (char *)sdl;
- int byte = 0, state = NAMING, new = 0;
-
- bzero((char *)&sdl->sdl_family, sdl->sdl_len - 1);
- sdl->sdl_family = AF_INET;
- do {
- state &= ~LETTER;
- if ((*addr >= '0') && (*addr <= '9')) {
- new = *addr - '0';
- } else if ((*addr >= 'a') && (*addr <= 'f')) {
- new = *addr - 'a' + 10;
- } else if ((*addr >= 'A') && (*addr <= 'F')) {
- new = *addr - 'A' + 10;
- } else if (*addr == 0) {
- state |= END;
- } else if (state == NAMING &&
- (((*addr >= 'A') && (*addr <= 'Z')) ||
- ((*addr >= 'a') && (*addr <= 'z'))))
- state |= LETTER;
- else
- state |= DELIM;
- addr++;
- switch (state /* | INPUT */) {
- case NAMING | DIGIT:
- case NAMING | LETTER:
- *cp++ = addr[-1];
- continue;
- case NAMING | DELIM:
- state = RESET;
- sdl->sdl_nlen = cp - sdl->sdl_data;
- continue;
- case GOTTWO | DIGIT:
- *cp++ = byte;
- /* FALLTHROUGH */
- case RESET | DIGIT:
- state = GOTONE;
- byte = new;
- continue;
- case GOTONE | DIGIT:
- state = GOTTWO;
- byte = new + (byte << 4);
- continue;
- default: /* | DELIM */
- state = RESET;
- *cp++ = byte;
- byte = 0;
- continue;
- case GOTONE | END:
- case GOTTWO | END:
- *cp++ = byte;
- /* FALLTHROUGH */
- case RESET | END:
- break;
- }
- break;
- } while (cp < cplim);
- sdl->sdl_alen = cp - LLADDR(sdl);
- new = cp - (char *)sdl;
- if (new > sizeof(*sdl))
- sdl->sdl_len = new;
- return;
-}
-
-static char hexlist[] = "0123456789abcdef";
-
-char *
-link_ntoa(sdl)
- const struct sockaddr_dl *sdl;
-{
- static char obuf[64];
- char *out = obuf;
- int i;
- u_char *in = (u_char *)LLADDR(sdl);
- u_char *inlim = in + sdl->sdl_alen;
- int firsttime = 1;
-
- if (sdl->sdl_nlen) {
- bcopy(sdl->sdl_data, obuf, sdl->sdl_nlen);
- out += sdl->sdl_nlen;
- if (sdl->sdl_alen)
- *out++ = ':';
- }
- while (in < inlim) {
- if (firsttime)
- firsttime = 0;
- else
- *out++ = '.';
- i = *in++;
- if (i > 0xf) {
- out[1] = hexlist[i & 0xf];
- i >>= 4;
- out[0] = hexlist[i];
- out += 2;
- } else
- *out++ = hexlist[i];
- }
- *out = 0;
- return (obuf);
-}
diff --git a/newlib/libc/sys/linux/net/map_v4v6.c b/newlib/libc/sys/linux/net/map_v4v6.c
deleted file mode 100644
index f746a8088..000000000
--- a/newlib/libc/sys/linux/net/map_v4v6.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * ++Copyright++ 1985, 1988, 1993
- * -
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <ctype.h>
-#include <syslog.h>
-
-typedef union {
- int32_t al;
- char ac;
-} align;
-
-void
-_map_v4v6_address(src, dst)
- const char *src;
- char *dst;
-{
- u_char *p = (u_char *)dst;
- char tmp[INADDRSZ];
- int i;
-
- /* Stash a temporary copy so our caller can update in place. */
- bcopy(src, tmp, INADDRSZ);
- /* Mark this ipv6 addr as a mapped ipv4. */
- for (i = 0; i < 10; i++)
- *p++ = 0x00;
- *p++ = 0xff;
- *p++ = 0xff;
- /* Retrieve the saved copy and we're done. */
- bcopy(tmp, (void*)p, INADDRSZ);
-}
-
-void
-_map_v4v6_hostent(hp, bpp, lenp)
- struct hostent *hp;
- char **bpp;
- int *lenp;
-{
- char **ap;
-
- if (hp->h_addrtype != AF_INET || hp->h_length != INADDRSZ)
- return;
- hp->h_addrtype = AF_INET6;
- hp->h_length = IN6ADDRSZ;
- for (ap = hp->h_addr_list; *ap; ap++) {
- int i = sizeof(align) - ((u_long)*bpp % sizeof(align));
-
- if (*lenp < (i + IN6ADDRSZ)) {
- /* Out of memory. Truncate address list here. XXX */
- *ap = NULL;
- return;
- }
- *bpp += i;
- *lenp -= i;
- _map_v4v6_address(*ap, *bpp);
- *ap = *bpp;
- *bpp += IN6ADDRSZ;
- *lenp -= IN6ADDRSZ;
- }
-}
diff --git a/newlib/libc/sys/linux/net/name6.c b/newlib/libc/sys/linux/net/name6.c
deleted file mode 100644
index 80037e8f9..000000000
--- a/newlib/libc/sys/linux/net/name6.c
+++ /dev/null
@@ -1,1812 +0,0 @@
-/* $KAME: name6.c,v 1.25 2000/06/26 16:44:40 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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.
- */
-/*
- * ++Copyright++ 1985, 1988, 1993
- * -
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- * -
- * --Copyright--
- */
-
-/*
- * Atsushi Onoe <onoe@sm.sony.co.jp>
- */
-
-/*
- * TODO for thread safe
- * use mutex for _hostconf, _hostconf_init.
- * rewrite resolvers to be thread safe
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/endian.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "namespace.h"
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <sys/queue.h>
-#include <netinet/in.h>
-
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <errno.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <nsswitch.h>
-#include <unistd.h>
-#include "un-namespace.h"
-
-#ifndef _PATH_HOSTS
-#define _PATH_HOSTS "/etc/hosts"
-#endif
-
-#ifndef MAXALIASES
-#define MAXALIASES 35
-#endif
-#ifndef MAXADDRS
-#define MAXADDRS 2
-#endif
-#ifndef MAXDNAME
-#define MAXDNAME 1025
-#endif
-
-#ifdef INET6
-#define ADDRLEN(af) ((af) == AF_INET6 ? sizeof(struct in6_addr) : \
- sizeof(struct in_addr))
-#else
-#define ADDRLEN(af) sizeof(struct in_addr)
-#endif
-
-#define MAPADDR(ab, ina) \
-do { \
- memcpy(&(ab)->map_inaddr, ina, sizeof(struct in_addr)); \
- memset((ab)->map_zero, 0, sizeof((ab)->map_zero)); \
- memset((ab)->map_one, 0xff, sizeof((ab)->map_one)); \
-} while (0)
-#define MAPADDRENABLED(flags) \
- (((flags) & AI_V4MAPPED) || \
- (((flags) & AI_V4MAPPED_CFG) && _mapped_addr_enabled()))
-
-union inx_addr {
- struct in_addr in_addr;
-#ifdef INET6
- struct in6_addr in6_addr;
-#endif
- struct {
- u_char mau_zero[10];
- u_char mau_one[2];
- struct in_addr mau_inaddr;
- } map_addr_un;
-#define map_zero map_addr_un.mau_zero
-#define map_one map_addr_un.mau_one
-#define map_inaddr map_addr_un.mau_inaddr
-};
-
-u_int16_t _getshort(const u_char *src);
-
-static struct hostent *_hpcopy(struct hostent *hp, int *errp);
-static struct hostent *_hpaddr(int af, const char *name, void *addr, int *errp);
-static struct hostent *_hpmerge(struct hostent *hp1, struct hostent *hp2, int *errp);
-#ifdef INET6
-static struct hostent *_hpmapv6(struct hostent *hp, int *errp);
-#endif
-static struct hostent *_hpsort(struct hostent *hp);
-static struct hostent *_ghbyname(const char *name, int af, int flags, int *errp);
-static char *_hgetword(char **pp);
-static int _mapped_addr_enabled(void);
-
-static FILE *_files_open(int *errp);
-static int _files_ghbyname(void *, void *, va_list);
-static int _files_ghbyaddr(void *, void *, va_list);
-#if 0 // keep gcc happy
-static void _files_shent(int stayopen);
-static void _files_ehent(void);
-#endif
-#ifdef YP
-static int _nis_ghbyname(void *, void *, va_list);
-static int _nis_ghbyaddr(void *, void *, va_list);
-#endif
-static int _dns_ghbyname(void *, void *, va_list);
-static int _dns_ghbyaddr(void *, void *, va_list);
-#if 0 // keep gcc happy
-static void _dns_shent(int stayopen);
-static void _dns_ehent(void);
-#endif
-
-#ifdef ICMPNL
-static int _icmp_ghbyaddr(void *, void *, va_list);
-#endif /* ICMPNL */
-
-/* Host lookup order if nsswitch.conf is broken or nonexistant */
-static const ns_src default_src[] = {
- { NSSRC_FILES, NS_SUCCESS },
- { NSSRC_DNS, NS_SUCCESS },
-#ifdef ICMPNL
-#define NSSRC_ICMP "icmp"
- { NSSRC_ICMP, NS_SUCCESS },
-#endif
- { 0 }
-};
-
-/*
- * Check if kernel supports mapped address.
- * implementation dependent
- */
-#ifdef __KAME__
-#include <sys/sysctl.h>
-#endif /* __KAME__ */
-
-static int
-_mapped_addr_enabled(void)
-{
- /* implementation dependent check */
-#if defined(__KAME__) && defined(IPV6CTL_MAPPED_ADDR)
- int mib[4];
- size_t len;
- int val;
-
- mib[0] = CTL_NET;
- mib[1] = PF_INET6;
- mib[2] = IPPROTO_IPV6;
- mib[3] = IPV6CTL_MAPPED_ADDR;
- len = sizeof(val);
- if (__sysctl(mib, 4, &val, &len, 0, 0) == 0 && val != 0)
- return 1;
-#endif /* __KAME__ && IPV6CTL_MAPPED_ADDR */
- return 0;
-}
-
-/*
- * Functions defined in RFC2553
- * getipnodebyname, getipnodebyaddr, freehostent
- */
-
-static struct hostent *
-_ghbyname(const char *name, int af, int flags, int *errp)
-{
- struct hostent *hp;
- int rval;
-
- static const ns_dtab dtab[] = {
- NS_FILES_CB(_files_ghbyname, NULL)
- { NSSRC_DNS, _dns_ghbyname, NULL },
- NS_NIS_CB(_nis_ghbyname, NULL)
- { 0 }
- };
-
- if (flags & AI_ADDRCONFIG) {
- int s;
-
- /*
- * TODO:
- * Note that implementation dependent test for address
- * configuration should be done everytime called
- * (or apropriate interval),
- * because addresses will be dynamically assigned or deleted.
- */
- if (af == AF_UNSPEC) {
- if ((s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
- af = AF_INET;
- else {
- close(s);
- if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
- af = AF_INET6;
- else
- close(s);
- }
-
- }
- if (af != AF_UNSPEC) {
- if ((s = socket(af, SOCK_DGRAM, 0)) < 0)
- return NULL;
- close(s);
- }
- }
-
- rval = nsdispatch(&hp, dtab, NSDB_HOSTS, "ghbyname", default_src,
- name, af, errp);
- return (rval == NS_SUCCESS) ? hp : NULL;
-}
-
-/* getipnodebyname() internal routine for multiple query(PF_UNSPEC) support. */
-struct hostent *
-_getipnodebyname_multi(const char *name, int af, int flags, int *errp)
-{
- struct hostent *hp;
- union inx_addr addrbuf;
-
- /* XXX: PF_UNSPEC is only supposed to be passed from getaddrinfo() */
- if (af != AF_INET
-#ifdef INET6
- && af != AF_INET6
-#endif
- && af != PF_UNSPEC
- )
- {
- *errp = NO_RECOVERY;
- return NULL;
- }
-
-#ifdef INET6
- /* special case for literal address */
- if (inet_pton(AF_INET6, name, &addrbuf) == 1) {
- if (af != AF_INET6) {
- *errp = HOST_NOT_FOUND;
- return NULL;
- }
- return _hpaddr(af, name, &addrbuf, errp);
- }
-#endif
- if (inet_aton(name, (struct in_addr *)&addrbuf) == 1) {
- if (af != AF_INET) {
- if (MAPADDRENABLED(flags)) {
- MAPADDR(&addrbuf, &addrbuf.in_addr);
- } else {
- *errp = HOST_NOT_FOUND;
- return NULL;
- }
- }
- return _hpaddr(af, name, &addrbuf, errp);
- }
-
- *errp = HOST_NOT_FOUND;
- hp = _ghbyname(name, af, flags, errp);
-
-#ifdef INET6
- if (af == AF_INET6
- && ((flags & AI_ALL) || hp == NULL)
- && (MAPADDRENABLED(flags))) {
- struct hostent *hp2 = _ghbyname(name, AF_INET, flags, errp);
- if (hp == NULL)
- hp = _hpmapv6(hp2, errp);
- else {
- if (hp2 && strcmp(hp->h_name, hp2->h_name) != 0) {
- freehostent(hp2);
- hp2 = NULL;
- }
- hp = _hpmerge(hp, hp2, errp);
- }
- }
-#endif
- return _hpsort(hp);
-}
-
-struct hostent *
-getipnodebyname(const char *name, int af, int flags, int *errp)
-{
- if (af != AF_INET
-#ifdef INET6
- && af != AF_INET6
-#endif
- )
- {
- *errp = NO_RECOVERY;
- return NULL;
- }
- return(_getipnodebyname_multi(name, af ,flags, errp));
-}
-
-struct hostent *
-getipnodebyaddr(const void *src, size_t len, int af, int *errp)
-{
- struct hostent *hp;
- int rval;
-#ifdef INET6
- struct in6_addr addrbuf;
-#else
- struct in_addr addrbuf;
-#endif
-
- static const ns_dtab dtab[] = {
- NS_FILES_CB(_files_ghbyaddr, NULL)
- { NSSRC_DNS, _dns_ghbyaddr, NULL },
- NS_NIS_CB(_nis_ghbyaddr, NULL)
-#ifdef ICMPNL
- { NSSRC_ICMP, _icmp_ghbyaddr, NULL },
-#endif
- { 0 }
- };
-
- *errp = HOST_NOT_FOUND;
-
- switch (af) {
- case AF_INET:
- if (len != sizeof(struct in_addr)) {
- *errp = NO_RECOVERY;
- return NULL;
- }
- if ((long)src & ~(sizeof(struct in_addr) - 1)) {
- memcpy(&addrbuf, src, len);
- src = &addrbuf;
- }
- if (((struct in_addr *)src)->s_addr == 0)
- return NULL;
- break;
-#ifdef INET6
- case AF_INET6:
- if (len != sizeof(struct in6_addr)) {
- *errp = NO_RECOVERY;
- return NULL;
- }
- if ((long)src & ~(sizeof(struct in6_addr) / 2 - 1)) { /*XXX*/
- memcpy(&addrbuf, src, len);
- src = &addrbuf;
- }
- if (IN6_IS_ADDR_UNSPECIFIED((struct in6_addr *)src))
- return NULL;
- if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)src)
- || IN6_IS_ADDR_V4COMPAT((struct in6_addr *)src)) {
- src = (char *)src +
- (sizeof(struct in6_addr) - sizeof(struct in_addr));
- af = AF_INET;
- len = sizeof(struct in_addr);
- }
- break;
-#endif
- default:
- *errp = NO_RECOVERY;
- return NULL;
- }
-
- rval = nsdispatch(&hp, dtab, NSDB_HOSTS, "ghbyaddr", default_src,
- src, len, af, errp);
- return (rval == NS_SUCCESS) ? hp : NULL;
-}
-
-void
-freehostent(struct hostent *ptr)
-{
- free(ptr);
-}
-
-#if 0
-
-/* XXX: should be deprecated */
-struct hostent *
-getnodebyname(const char *name, int af, int flags)
-{
- return getipnodebyname(name, af, flags, &h_errno);
-}
-
-#ifdef __warn_references
-__warn_references(getnodebyname,
- "warning: getnodebyname() deprecated, "
- "should use getaddrinfo() or getipnodebyname()");
-#endif
-
-struct hostent *
-getnodebyaddr(const void *src, size_t len, int af)
-{
- return getipnodebyaddr(src, len, af, &h_errno);
-}
-
-#ifdef __warn_references
-__warn_references(getnodebyaddr,
- "warning: getnodebyaddr() deprecated, "
- "should use getnameinfo() or getipnodebyaddr()");
-#endif
-
-#endif
-
-/*
- * Private utility functions
- */
-
-/*
- * _hpcopy: allocate and copy hostent structure
- */
-static struct hostent *
-_hpcopy(struct hostent *hp, int *errp)
-{
- struct hostent *nhp;
- char *cp, **pp;
- int size, addrsize;
- int nalias = 0, naddr = 0;
- int al_off;
- int i;
-
- if (hp == NULL)
- return hp;
-
- /* count size to be allocated */
- size = sizeof(struct hostent);
- if (hp->h_name != NULL)
- size += strlen(hp->h_name) + 1;
- if ((pp = hp->h_aliases) != NULL) {
- for (i = 0; *pp != NULL; i++, pp++) {
- if (**pp != '\0') {
- size += strlen(*pp) + 1;
- nalias++;
- }
- }
- }
- /* adjust alignment */
-#ifdef ALIGN
- size = ALIGN(size);
-#endif
- al_off = size;
- size += sizeof(char *) * (nalias + 1);
-#ifdef ALIGN
- addrsize = ALIGN(hp->h_length);
-#else
- addrsize = hp->h_length;
-#endif
-
- if ((pp = hp->h_addr_list) != NULL) {
- while (*pp++ != NULL)
- naddr++;
- }
- size += addrsize * naddr;
- size += sizeof(char *) * (naddr + 1);
-
- /* copy */
- if ((nhp = (struct hostent *)malloc(size)) == NULL) {
- *errp = TRY_AGAIN;
- return NULL;
- }
- cp = (char *)&nhp[1];
- if (hp->h_name != NULL) {
- nhp->h_name = cp;
- strcpy(cp, hp->h_name);
- cp += strlen(cp) + 1;
- } else
- nhp->h_name = NULL;
- nhp->h_aliases = (char **)((char *)nhp + al_off);
- if ((pp = hp->h_aliases) != NULL) {
- for (i = 0; *pp != NULL; pp++) {
- if (**pp != '\0') {
- nhp->h_aliases[i++] = cp;
- strcpy(cp, *pp);
- cp += strlen(cp) + 1;
- }
- }
- }
- nhp->h_aliases[nalias] = NULL;
- cp = (char *)&nhp->h_aliases[nalias + 1];
- nhp->h_addrtype = hp->h_addrtype;
- nhp->h_length = hp->h_length;
- nhp->h_addr_list = (char **)cp;
- if ((pp = hp->h_addr_list) != NULL) {
- cp = (char *)&nhp->h_addr_list[naddr + 1];
- for (i = 0; *pp != NULL; pp++) {
- nhp->h_addr_list[i++] = cp;
- memcpy(cp, *pp, hp->h_length);
- cp += addrsize;
- }
- }
- nhp->h_addr_list[naddr] = NULL;
- return nhp;
-}
-
-/*
- * _hpaddr: construct hostent structure with one address
- */
-static struct hostent *
-_hpaddr(int af, const char *name, void *addr, int *errp)
-{
- struct hostent *hp, hpbuf;
- char *addrs[2];
-
- hp = &hpbuf;
- hp->h_name = (char *)name;
- hp->h_aliases = NULL;
- hp->h_addrtype = af;
- hp->h_length = ADDRLEN(af);
- hp->h_addr_list = addrs;
- addrs[0] = (char *)addr;
- addrs[1] = NULL;
- return _hpcopy(hp, errp);
-}
-
-/*
- * _hpmerge: merge 2 hostent structure, arguments will be freed
- */
-static struct hostent *
-_hpmerge(struct hostent *hp1, struct hostent *hp2, int *errp)
-{
- int i, j;
- int naddr, nalias;
- char **pp;
- struct hostent *hp, hpbuf;
- char *aliases[MAXALIASES + 1], *addrs[MAXADDRS + 1];
- union inx_addr addrbuf[MAXADDRS];
-
- if (hp1 == NULL)
- return hp2;
- if (hp2 == NULL)
- return hp1;
-
-#define HP(i) (i == 1 ? hp1 : hp2)
- hp = &hpbuf;
- hp->h_name = (hp1->h_name != NULL ? hp1->h_name : hp2->h_name);
- hp->h_aliases = aliases;
- nalias = 0;
- for (i = 1; i <= 2; i++) {
- if ((pp = HP(i)->h_aliases) == NULL)
- continue;
- for (; nalias < MAXALIASES && *pp != NULL; pp++) {
- /* check duplicates */
- for (j = 0; j < nalias; j++)
- if (strcasecmp(*pp, aliases[j]) == 0)
- break;
- if (j == nalias)
- aliases[nalias++] = *pp;
- }
- }
- aliases[nalias] = NULL;
-#ifdef INET6
- if (hp1->h_length != hp2->h_length) {
- hp->h_addrtype = AF_INET6;
- hp->h_length = sizeof(struct in6_addr);
- } else {
-#endif
- hp->h_addrtype = hp1->h_addrtype;
- hp->h_length = hp1->h_length;
-#ifdef INET6
- }
-#endif
- hp->h_addr_list = addrs;
- naddr = 0;
- for (i = 1; i <= 2; i++) {
- if ((pp = HP(i)->h_addr_list) == NULL)
- continue;
- if (HP(i)->h_length == hp->h_length) {
- while (naddr < MAXADDRS && *pp != NULL)
- addrs[naddr++] = *pp++;
- } else {
- /* copy IPv4 addr as mapped IPv6 addr */
- while (naddr < MAXADDRS && *pp != NULL) {
- MAPADDR(&addrbuf[naddr], *pp++);
- addrs[naddr] = (char *)&addrbuf[naddr];
- naddr++;
- }
- }
- }
- addrs[naddr] = NULL;
- hp = _hpcopy(hp, errp);
- freehostent(hp1);
- freehostent(hp2);
- return hp;
-}
-
-/*
- * _hpmapv6: convert IPv4 hostent into IPv4-mapped IPv6 addresses
- */
-#ifdef INET6
-static struct hostent *
-_hpmapv6(struct hostent *hp, int *errp)
-{
- struct hostent *hp6;
-
- if (hp == NULL)
- return NULL;
- if (hp->h_addrtype == AF_INET6)
- return hp;
-
- /* make dummy hostent to convert IPv6 address */
- if ((hp6 = (struct hostent *)malloc(sizeof(struct hostent))) == NULL) {
- *errp = TRY_AGAIN;
- return NULL;
- }
- hp6->h_name = NULL;
- hp6->h_aliases = NULL;
- hp6->h_addrtype = AF_INET6;
- hp6->h_length = sizeof(struct in6_addr);
- hp6->h_addr_list = NULL;
- return _hpmerge(hp6, hp, errp);
-}
-#endif
-
-/*
- * _hpsort: sort address by sortlist
- */
-static struct hostent *
-_hpsort(struct hostent *hp)
-{
- int i, j, n;
- u_char *ap, *sp, *mp, **pp;
- char t;
- char order[MAXADDRS];
- int nsort = _res.nsort;
-
- if (hp == NULL || hp->h_addr_list[1] == NULL || nsort == 0)
- return hp;
- for (i = 0; (ap = (u_char *)hp->h_addr_list[i]); i++) {
- for (j = 0; j < nsort; j++) {
-#ifdef INET6
- if (_res_ext.sort_list[j].af != hp->h_addrtype)
- continue;
- sp = (u_char *)&_res_ext.sort_list[j].addr;
- mp = (u_char *)&_res_ext.sort_list[j].mask;
-#else
- sp = (u_char *)&_res.sort_list[j].addr;
- mp = (u_char *)&_res.sort_list[j].mask;
-#endif
- for (n = 0; n < hp->h_length; n++) {
- if ((ap[n] & mp[n]) != sp[n])
- break;
- }
- if (n == hp->h_length)
- break;
- }
- order[i] = j;
- }
- n = i;
- pp = (u_char **)hp->h_addr_list;
- for (i = 0; i < n - 1; i++) {
- for (j = i + 1; j < n; j++) {
- if (order[i] > order[j]) {
- ap = pp[i];
- pp[i] = pp[j];
- pp[j] = ap;
- t = order[i];
- order[i] = order[j];
- order[j] = t;
- }
- }
- }
- return hp;
-}
-
-static char *
-_hgetword(char **pp)
-{
- char c, *p, *ret;
- const char *sp;
- static const char sep[] = "# \t\n";
-
- ret = NULL;
- for (p = *pp; (c = *p) != '\0'; p++) {
- for (sp = sep; *sp != '\0'; sp++) {
- if (c == *sp)
- break;
- }
- if (c == '#')
- p[1] = '\0'; /* ignore rest of line */
- if (ret == NULL) {
- if (*sp == '\0')
- ret = p;
- } else {
- if (*sp != '\0') {
- *p++ = '\0';
- break;
- }
- }
- }
- *pp = p;
- if (ret == NULL || *ret == '\0')
- return NULL;
- return ret;
-}
-
-/*
- * FILES (/etc/hosts)
- */
-
-static FILE *
-_files_open(int *errp)
-{
- FILE *fp;
- fp = fopen(_PATH_HOSTS, "r");
- if (fp == NULL)
- *errp = NO_RECOVERY;
- return fp;
-}
-
-static int
-_files_ghbyname(void *rval, void *cb_data, va_list ap)
-{
- const char *name;
- int af;
- int *errp;
- int match, nalias;
- char *p, *line, *addrstr, *cname;
- FILE *fp;
- struct hostent *rethp, *hp, hpbuf;
- char *aliases[MAXALIASES + 1], *addrs[2];
- union inx_addr addrbuf;
- char buf[BUFSIZ];
- int af0;
-
- name = va_arg(ap, const char *);
- af = va_arg(ap, int);
- errp = va_arg(ap, int *);
-
- *(struct hostent **)rval = NULL;
-
- if ((fp = _files_open(errp)) == NULL)
- return NS_UNAVAIL;
- rethp = hp = NULL;
-
- af0 = af;
- while (fgets(buf, sizeof(buf), fp)) {
- line = buf;
- if ((addrstr = _hgetword(&line)) == NULL
- || (cname = _hgetword(&line)) == NULL)
- continue;
- match = (strcasecmp(cname, name) == 0);
- nalias = 0;
- while ((p = _hgetword(&line)) != NULL) {
- if (!match)
- match = (strcasecmp(p, name) == 0);
- if (nalias < MAXALIASES)
- aliases[nalias++] = p;
- }
- if (!match)
- continue;
- switch (af0) {
- case AF_INET:
- if (inet_aton(addrstr, (struct in_addr *)&addrbuf)
- != 1) {
- *errp = NO_DATA; /* name found */
- continue;
- }
- af = af0;
- break;
-#ifdef INET6
- case AF_INET6:
- if (inet_pton(af, addrstr, &addrbuf) != 1) {
- *errp = NO_DATA; /* name found */
- continue;
- }
- af = af0;
- break;
-#endif
- case AF_UNSPEC:
- if (inet_aton(addrstr, (struct in_addr *)&addrbuf)
- == 1) {
- af = AF_INET;
- break;
- }
-#ifdef INET6
- if (inet_pton(AF_INET6, addrstr, &addrbuf) == 1) {
- af = AF_INET6;
- break;
- }
-#endif
- *errp = NO_DATA; /* name found */
- continue;
- /* NOTREACHED */
- }
- hp = &hpbuf;
- hp->h_name = cname;
- hp->h_aliases = aliases;
- aliases[nalias] = NULL;
- hp->h_addrtype = af;
- hp->h_length = ADDRLEN(af);
- hp->h_addr_list = addrs;
- addrs[0] = (char *)&addrbuf;
- addrs[1] = NULL;
- hp = _hpcopy(hp, errp);
- rethp = _hpmerge(rethp, hp, errp);
- }
- fclose(fp);
- *(struct hostent **)rval = rethp;
- return (rethp != NULL) ? NS_SUCCESS : NS_NOTFOUND;
-}
-
-static int
-_files_ghbyaddr(void *rval, void *cb_data, va_list ap)
-{
- const void *addr;
- int addrlen;
- int af;
- int *errp;
- int nalias;
- char *p, *line;
- FILE *fp;
- struct hostent *hp, hpbuf;
- char *aliases[MAXALIASES + 1], *addrs[2];
- union inx_addr addrbuf;
- char buf[BUFSIZ];
-
- addr = va_arg(ap, const void *);
- addrlen = va_arg(ap, int);
- af = va_arg(ap, int);
- errp = va_arg(ap, int *);
-
- *(struct hostent**)rval = NULL;
-
- if ((fp = _files_open(errp)) == NULL)
- return NS_UNAVAIL;
- hp = NULL;
- while (fgets(buf, sizeof(buf), fp)) {
- line = buf;
- if ((p = _hgetword(&line)) == NULL
- || (af == AF_INET
- ? inet_aton(p, (struct in_addr *)&addrbuf)
- : inet_pton(af, p, &addrbuf)) != 1
- || memcmp(addr, &addrbuf, addrlen) != 0
- || (p = _hgetword(&line)) == NULL)
- continue;
- hp = &hpbuf;
- hp->h_name = p;
- hp->h_aliases = aliases;
- nalias = 0;
- while ((p = _hgetword(&line)) != NULL) {
- if (nalias < MAXALIASES)
- aliases[nalias++] = p;
- }
- aliases[nalias] = NULL;
- hp->h_addrtype = af;
- hp->h_length = addrlen;
- hp->h_addr_list = addrs;
- addrs[0] = (char *)&addrbuf;
- addrs[1] = NULL;
- hp = _hpcopy(hp, errp);
- break;
- }
- fclose(fp);
- *(struct hostent **)rval = hp;
- return (hp != NULL) ? NS_SUCCESS : NS_NOTFOUND;
-}
-
-#ifdef YP
-/*
- * NIS
- *
- * XXX actually a hack, these are INET4 specific.
- */
-static int
-_nis_ghbyname(void *rval, void *cb_data, va_list ap)
-{
- const char *name;
- int af;
- int *errp;
- struct hostent *hp = NULL;
-
- name = va_arg(ap, const char *);
- af = va_arg(ap, int);
- errp = va_arg(ap, int *);
-
- if (af == AF_UNSPEC)
- af = AF_INET;
- if (af == AF_INET) {
- hp = _gethostbynisname(name, af);
- if (hp != NULL)
- hp = _hpcopy(hp, errp);
- }
-
- *(struct hostent **)rval = hp;
- return (hp != NULL) ? NS_SUCCESS : NS_NOTFOUND;
-
-}
-
-static int
-_nis_ghbyaddr(void *rval, void *cb_data, va_list ap)
-{
- const void *addr;
- int addrlen;
- int af;
- int *errp;
- struct hostent *hp = NULL;
-
- addr = va_arg(ap, const void *);
- addrlen = va_arg(ap, int);
- af = va_arg(ap, int);
-
- if (af == AF_INET) {
- hp = _gethostbynisaddr(addr, addrlen, af);
- if (hp != NULL)
- hp = _hpcopy(hp, errp);
- }
- *(struct hostent **)rval = hp;
- return (hp != NULL) ? NS_SUCCESS : NS_NOTFOUND;
-}
-#endif
-typedef struct __res_type_list res_type_list;
-
-struct __res_type_list {
- res_type_list * rtl_entry;
- int rtl_type;
-};
-
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
-
-typedef union {
- HEADER hdr;
- u_char buf[MAXPACKET];
-} querybuf;
-
-static struct hostent *getanswer(const querybuf *, int, const char *, int,
- struct hostent *, int *);
-
-/*
- * we don't need to take care about sorting, nor IPv4 mapped address here.
- */
-static struct hostent *
-getanswer(answer, anslen, qname, qtype, template, errp)
- const querybuf *answer;
- int anslen;
- const char *qname;
- int qtype;
- struct hostent *template;
- int *errp;
-{
- const HEADER *hp;
- const u_char *cp;
- int n;
- const u_char *eom, *erdata;
- char *bp, **ap, **hap;
- int type, class, buflen, ancount, qdcount;
- int haveanswer, had_error;
- char tbuf[MAXDNAME];
- const char *tname;
- int (*name_ok)(const char *);
- static char *h_addr_ptrs[MAXADDRS + 1];
- static char *host_aliases[MAXALIASES];
- static char hostbuf[8*1024];
-
-#define BOUNDED_INCR(x) \
- do { \
- cp += x; \
- if (cp > eom) { \
- *errp = NO_RECOVERY; \
- return (NULL); \
- } \
- } while (0)
-
-#define BOUNDS_CHECK(ptr, count) \
- do { \
- if ((ptr) + (count) > eom) { \
- *errp = NO_RECOVERY; \
- return (NULL); \
- } \
- } while (0)
-
-/* XXX do {} while (0) cannot be put here */
-#define DNS_ASSERT(x) \
- { \
- if (!(x)) { \
- cp += n; \
- continue; \
- } \
- }
-
-/* XXX do {} while (0) cannot be put here */
-#define DNS_FATAL(x) \
- { \
- if (!(x)) { \
- had_error++; \
- continue; \
- } \
- }
-
- tname = qname;
- template->h_name = NULL;
- eom = answer->buf + anslen;
- switch (qtype) {
- case T_A:
- case T_AAAA:
- name_ok = res_hnok;
- break;
- case T_PTR:
- name_ok = res_dnok;
- break;
- default:
- return (NULL); /* XXX should be abort(); */
- }
- /*
- * find first satisfactory answer
- */
- hp = &answer->hdr;
- ancount = ntohs(hp->ancount);
- qdcount = ntohs(hp->qdcount);
- bp = hostbuf;
- buflen = sizeof hostbuf;
- cp = answer->buf;
- BOUNDED_INCR(HFIXEDSZ);
- if (qdcount != 1) {
- *errp = NO_RECOVERY;
- return (NULL);
- }
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !(*name_ok)(bp)) {
- *errp = NO_RECOVERY;
- return (NULL);
- }
- BOUNDED_INCR(n + QFIXEDSZ);
- if (qtype == T_A || qtype == T_AAAA) {
- /* res_send() has already verified that the query name is the
- * same as the one we sent; this just gets the expanded name
- * (i.e., with the succeeding search-domain tacked on).
- */
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- *errp = NO_RECOVERY;
- return (NULL);
- }
- template->h_name = bp;
- bp += n;
- buflen -= n;
- /* The qname can be abbreviated, but h_name is now absolute. */
- qname = template->h_name;
- }
- ap = host_aliases;
- *ap = NULL;
- template->h_aliases = host_aliases;
- hap = h_addr_ptrs;
- *hap = NULL;
- template->h_addr_list = h_addr_ptrs;
- haveanswer = 0;
- had_error = 0;
- while (ancount-- > 0 && cp < eom && !had_error) {
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- DNS_FATAL(n >= 0);
- DNS_FATAL((*name_ok)(bp));
- cp += n; /* name */
- BOUNDS_CHECK(cp, 3 * INT16SZ + INT32SZ);
- type = _getshort(cp);
- cp += INT16SZ; /* type */
- class = _getshort(cp);
- cp += INT16SZ + INT32SZ; /* class, TTL */
- n = _getshort(cp);
- cp += INT16SZ; /* len */
- BOUNDS_CHECK(cp, n);
- erdata = cp + n;
- DNS_ASSERT(class == C_IN);
- if ((qtype == T_A || qtype == T_AAAA) && type == T_CNAME) {
- if (ap >= &host_aliases[MAXALIASES-1])
- continue;
- n = dn_expand(answer->buf, eom, cp, tbuf, sizeof tbuf);
- DNS_FATAL(n >= 0);
- DNS_FATAL((*name_ok)(tbuf));
- cp += n;
- if (cp != erdata) {
- *errp = NO_RECOVERY;
- return (NULL);
- }
- /* Store alias. */
- *ap++ = bp;
- n = strlen(bp) + 1; /* for the \0 */
- DNS_FATAL(n < MAXHOSTNAMELEN);
- bp += n;
- buflen -= n;
- /* Get canonical name. */
- n = strlen(tbuf) + 1; /* for the \0 */
- DNS_FATAL(n <= buflen);
- DNS_FATAL(n < MAXHOSTNAMELEN);
- strcpy(bp, tbuf);
- template->h_name = bp;
- bp += n;
- buflen -= n;
- continue;
- }
- if (qtype == T_PTR && type == T_CNAME) {
- n = dn_expand(answer->buf, eom, cp, tbuf, sizeof tbuf);
- if (n < 0 || !res_dnok(tbuf)) {
- had_error++;
- continue;
- }
- cp += n;
- if (cp != erdata) {
- *errp = NO_RECOVERY;
- return (NULL);
- }
- /* Get canonical name. */
- n = strlen(tbuf) + 1; /* for the \0 */
- if (n > buflen || n >= MAXHOSTNAMELEN) {
- had_error++;
- continue;
- }
- strcpy(bp, tbuf);
- tname = bp;
- bp += n;
- buflen -= n;
- continue;
- }
- DNS_ASSERT(type == qtype);
- switch (type) {
- case T_PTR:
- DNS_ASSERT(strcasecmp(tname, bp) == 0);
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- DNS_FATAL(n >= 0);
- DNS_FATAL(res_hnok(bp));
-#if MULTI_PTRS_ARE_ALIASES
- cp += n;
- if (cp != erdata) {
- *errp = NO_RECOVERY;
- return (NULL);
- }
- if (!haveanswer)
- template->h_name = bp;
- else if (ap < &host_aliases[MAXALIASES-1])
- *ap++ = bp;
- else
- n = -1;
- if (n != -1) {
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- had_error++;
- break;
- }
- bp += n;
- buflen -= n;
- }
- break;
-#else
- template->h_name = bp;
- *errp = NETDB_SUCCESS;
- return (template);
-#endif
- case T_A:
- case T_AAAA:
- DNS_ASSERT(strcasecmp(template->h_name, bp) == 0);
- DNS_ASSERT(n == template->h_length);
- if (!haveanswer) {
- int nn;
-
- template->h_name = bp;
- nn = strlen(bp) + 1; /* for the \0 */
- bp += nn;
- buflen -= nn;
- }
-#ifdef ALIGN
- bp = (char *)ALIGN(bp);
-#else
- bp = (char *)(bp);
-#endif
-
- DNS_FATAL(bp + n < &hostbuf[sizeof hostbuf]);
- DNS_ASSERT(hap < &h_addr_ptrs[MAXADDRS-1]);
-#ifdef FILTER_V4MAPPED
- if (type == T_AAAA) {
- struct in6_addr in6;
- memcpy(&in6, cp, sizeof(in6));
- DNS_ASSERT(IN6_IS_ADDR_V4MAPPED(&in6) == 0);
- }
-#endif
- bcopy(cp, *hap++ = bp, n);
- bp += n;
- buflen -= n;
- cp += n;
- if (cp != erdata) {
- *errp = NO_RECOVERY;
- return (NULL);
- }
- break;
- default:
- abort();
- }
- if (!had_error)
- haveanswer++;
- }
- if (haveanswer) {
- *ap = NULL;
- *hap = NULL;
- if (!template->h_name) {
- n = strlen(qname) + 1; /* for the \0 */
- if (n > buflen || n >= MAXHOSTNAMELEN)
- goto no_recovery;
- strcpy(bp, qname);
- template->h_name = bp;
- bp += n;
- buflen -= n;
- }
- *errp = NETDB_SUCCESS;
- return (template);
- }
- no_recovery:
- *errp = NO_RECOVERY;
- return (NULL);
-
-#undef BOUNDED_INCR
-#undef BOUNDS_CHECK
-#undef DNS_ASSERT
-#undef DNS_FATAL
-}
-
-/* res_search() variant with multiple query support. */
-static struct hostent *
-_res_search_multi(name, rtl, errp)
- const char *name; /* domain name */
- struct __res_type_list *rtl; /* list of query types */
- int *errp;
-{
- const char *cp, * const *domain;
- struct hostent *hp0 = NULL, *hp;
- struct hostent hpbuf;
- u_int dots;
- int trailing_dot, ret, saved_herrno;
- int got_nodata = 0, got_servfail = 0, tried_as_is = 0;
- struct __res_type_list *rtl0 = rtl;
- querybuf buf;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- *errp = NETDB_INTERNAL;
- return (NULL);
- }
- dots = 0;
- for (cp = name; *cp; cp++)
- dots += (*cp == '.');
- trailing_dot = 0;
- if (cp > name && *--cp == '.')
- trailing_dot++;
-
- /* If there aren't any dots, it could be a user-level alias */
- if (!dots && (cp = hostalias(name)) != NULL) {
- for(rtl = rtl0; rtl != NULL;
- rtl = rtl->rtl_entry) {
- ret = res_query(cp, C_IN, rtl->rtl_type, buf.buf,
- sizeof(buf.buf));
- if (ret > 0) {
- hpbuf.h_addrtype = (rtl->rtl_type == T_AAAA)
- ? AF_INET6 : AF_INET;
- hpbuf.h_length = ADDRLEN(hpbuf.h_addrtype);
- hp = getanswer(&buf, ret, name, rtl->rtl_type,
- &hpbuf, errp);
- if (!hp)
- continue;
- hp = _hpcopy(&hpbuf, errp);
- hp0 = _hpmerge(hp0, hp, errp);
- }
- }
- return (hp0);
- }
-
- /*
- * If there are dots in the name already, let's just give it a try
- * 'as is'. The threshold can be set with the "ndots" option.
- */
- saved_herrno = -1;
- if (dots >= _res.ndots) {
- for(rtl = rtl0; rtl != NULL;
- rtl = rtl->rtl_entry) {
- ret = res_querydomain(name, NULL, C_IN, rtl->rtl_type,
- buf.buf, sizeof(buf.buf));
- if (ret > 0) {
- hpbuf.h_addrtype = (rtl->rtl_type == T_AAAA)
- ? AF_INET6 : AF_INET;
- hpbuf.h_length = ADDRLEN(hpbuf.h_addrtype);
- hp = getanswer(&buf, ret, name, rtl->rtl_type,
- &hpbuf, errp);
- if (!hp)
- continue;
- hp = _hpcopy(&hpbuf, errp);
- hp0 = _hpmerge(hp0, hp, errp);
- }
- }
- if (hp0 != NULL)
- return (hp0);
- saved_herrno = *errp;
- tried_as_is++;
- }
-
- /*
- * We do at least one level of search if
- * - there is no dot and RES_DEFNAME is set, or
- * - there is at least one dot, there is no trailing dot,
- * and RES_DNSRCH is set.
- */
- if ((!dots && (_res.options & RES_DEFNAMES)) ||
- (dots && !trailing_dot && (_res.options & RES_DNSRCH))) {
- int done = 0;
-
- for (domain = (const char * const *)_res.dnsrch;
- *domain && !done;
- domain++) {
-
- for(rtl = rtl0; rtl != NULL;
- rtl = rtl->rtl_entry) {
- ret = res_querydomain(name, *domain, C_IN,
- rtl->rtl_type,
- buf.buf, sizeof(buf.buf));
- if (ret > 0) {
- hpbuf.h_addrtype = (rtl->rtl_type == T_AAAA)
- ? AF_INET6 : AF_INET;
- hpbuf.h_length = ADDRLEN(hpbuf.h_addrtype);
- hp = getanswer(&buf, ret, name,
- rtl->rtl_type, &hpbuf, errp);
- if (!hp)
- continue;
- hp = _hpcopy(&hpbuf, errp);
- hp0 = _hpmerge(hp0, hp, errp);
- }
- }
- if (hp0 != NULL)
- return (hp0);
-
- /*
- * If no server present, give up.
- * If name isn't found in this domain,
- * keep trying higher domains in the search list
- * (if that's enabled).
- * On a NO_DATA error, keep trying, otherwise
- * a wildcard entry of another type could keep us
- * from finding this entry higher in the domain.
- * If we get some other error (negative answer or
- * server failure), then stop searching up,
- * but try the input name below in case it's
- * fully-qualified.
- */
- if (errno == ECONNREFUSED) {
- *errp = TRY_AGAIN;
- return (NULL);
- }
-
- switch (*errp) {
- case NO_DATA:
- got_nodata++;
- /* FALLTHROUGH */
- case HOST_NOT_FOUND:
- /* keep trying */
- break;
- case TRY_AGAIN:
- if (buf.hdr.rcode == SERVFAIL) {
- /* try next search element, if any */
- got_servfail++;
- break;
- }
- /* FALLTHROUGH */
- default:
- /* anything else implies that we're done */
- done++;
- }
-
- /* if we got here for some reason other than DNSRCH,
- * we only wanted one iteration of the loop, so stop.
- */
- if (!(_res.options & RES_DNSRCH))
- done++;
- }
- }
-
- /*
- * If we have not already tried the name "as is", do that now.
- * note that we do this regardless of how many dots were in the
- * name or whether it ends with a dot unless NOTLDQUERY is set.
- */
- if (!tried_as_is && (dots || !(_res.options & RES_NOTLDQUERY))) {
- for(rtl = rtl0; rtl != NULL;
- rtl = rtl->rtl_entry) {
- ret = res_querydomain(name, NULL, C_IN, rtl->rtl_type,
- buf.buf, sizeof(buf.buf));
- if (ret > 0) {
- hpbuf.h_addrtype = (rtl->rtl_type == T_AAAA)
- ? AF_INET6 : AF_INET;
- hpbuf.h_length = ADDRLEN(hpbuf.h_addrtype);
- hp = getanswer(&buf, ret, name, rtl->rtl_type,
- &hpbuf, errp);
- if (!hp)
- continue;
- hp = _hpcopy(&hpbuf, errp);
- hp0 = _hpmerge(hp0, hp, errp);
- }
- }
- if (hp0 != NULL)
- return (hp0);
- }
-
- /* if we got here, we didn't satisfy the search.
- * if we did an initial full query, return that query's h_errno
- * (note that we wouldn't be here if that query had succeeded).
- * else if we ever got a nodata, send that back as the reason.
- * else send back meaningless h_errno, that being the one from
- * the last DNSRCH we did.
- */
- if (saved_herrno != -1)
- *errp = saved_herrno;
- else if (got_nodata)
- *errp = NO_DATA;
- else if (got_servfail)
- *errp = TRY_AGAIN;
- return (NULL);
-}
-
-static int
-_dns_ghbyname(void *rval, void *cb_data, va_list ap)
-{
- const char *name;
- int af;
- int *errp;
- res_type_list *rtl, rtl4;
-#ifdef INET6
- res_type_list rtl6;
-#endif
-
- name = va_arg(ap, const char *);
- af = va_arg(ap, int);
- errp = va_arg(ap, int *);
-
-#ifdef INET6
- switch (af) {
- case AF_UNSPEC:
- &rtl4->rtl_entry = NULL; rtl4.rtl_type = T_A;
- &rtl6->rtl_entry = &rtl4; rtl6.rtl_type = T_AAAA;
- rtl = &rtl6;
- break;
- case AF_INET6:
- &rtl6->rtl_entry = NULL; rtl6.rtl_type = T_AAAA;
- rtl = &rtl6;
- break;
- case AF_INET:
- &rtl4->rtl_entry = NULL; rtl4.rtl_type = T_A;
- rtl = &rtl4;
- break;
- }
-#else
- (&rtl4)->rtl_entry = NULL;
- rtl4.rtl_type = T_A;
- rtl = &rtl4;
-#endif
- *(struct hostent **)rval = _res_search_multi(name, rtl, errp);
- return (*(struct hostent **)rval != NULL) ? NS_SUCCESS : NS_NOTFOUND;
-}
-
-static int
-_dns_ghbyaddr(void *rval, void *cb_data, va_list ap)
-{
- const void *addr;
- int addrlen;
- int af;
- int *errp;
- int n;
- struct hostent *hp;
- u_char c, *cp;
- char *bp;
- struct hostent hbuf;
- int na;
-#ifdef INET6
- static const char hex[] = "0123456789abcdef";
-#endif
- querybuf buf;
- char qbuf[MAXDNAME+1];
- char *hlist[2];
-
- addr = va_arg(ap, const void *);
- addrlen = va_arg(ap, int);
- af = va_arg(ap, int);
- errp = va_arg(ap, int *);
-
- *(struct hostent **)rval = NULL;
-
-#ifdef INET6
- /* XXX */
- if (af == AF_INET6 && IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)addr))
- return NS_NOTFOUND;
-#endif
-
- if ((_res.options & RES_INIT) == 0) {
- if (res_init() < 0) {
- *errp = h_errno;
- return NS_UNAVAIL;
- }
- }
- memset(&hbuf, 0, sizeof(hbuf));
- hbuf.h_name = NULL;
- hbuf.h_addrtype = af;
- hbuf.h_length = addrlen;
- na = 0;
-
- /* XXX assumes that MAXDNAME is big enough */
- n = 0;
- bp = qbuf;
- cp = (u_char *)addr+addrlen-1;
- switch (af) {
-#ifdef INET6
- case AF_INET6:
- for (; n < addrlen; n++, cp--) {
- c = *cp;
- *bp++ = hex[c & 0xf];
- *bp++ = '.';
- *bp++ = hex[c >> 4];
- *bp++ = '.';
- }
- strcpy(bp, "ip6.int");
- break;
-#endif
- default:
- for (; n < addrlen; n++, cp--) {
- c = *cp;
- if (c >= 100)
- *bp++ = '0' + c / 100;
- if (c >= 10)
- *bp++ = '0' + (c % 100) / 10;
- *bp++ = '0' + c % 10;
- *bp++ = '.';
- }
- strcpy(bp, "in-addr.arpa");
- break;
- }
-
- n = res_query(qbuf, C_IN, T_PTR, buf.buf, sizeof buf.buf);
- if (n < 0) {
- *errp = h_errno;
- return NS_UNAVAIL;
- }
- hp = getanswer(&buf, n, qbuf, T_PTR, &hbuf, errp);
- if (!hp)
- return NS_NOTFOUND;
- hbuf.h_addrtype = af;
- hbuf.h_length = addrlen;
- hbuf.h_addr_list = hlist;
- hlist[0] = (char *)addr;
- hlist[1] = NULL;
- *(struct hostent **)rval = _hpcopy(&hbuf, errp);
- return NS_SUCCESS;
-}
-
-#if 0 // keep gcc happy
-static void
-_dns_shent(int stayopen)
-{
- if ((_res.options & RES_INIT) == 0) {
- if (res_init() < 0)
- return;
- }
- if (stayopen)
- _res.options |= RES_STAYOPEN | RES_USEVC;
-}
-
-static void
-_dns_ehent(void)
-{
- _res.options &= ~(RES_STAYOPEN | RES_USEVC);
- res_close();
-}
-#endif
-
-#ifdef ICMPNL
-
-/*
- * experimental:
- * draft-ietf-ipngwg-icmp-namelookups-02.txt
- * ifindex is assumed to be encoded in addr.
- */
-#include <sys/uio.h>
-#include <netinet/ip6.h>
-#include <netinet/icmp6.h>
-
-struct _icmp_host_cache {
- struct _icmp_host_cache *hc_next;
- int hc_ifindex;
- struct in6_addr hc_addr;
- char *hc_name;
-};
-
-static char *
-_icmp_fqdn_query(const struct in6_addr *addr, int ifindex)
-{
- int s;
- struct icmp6_filter filter;
- struct msghdr msg;
- struct cmsghdr *cmsg;
- struct in6_pktinfo *pkt;
- char cbuf[256];
- char buf[1024];
- int cc;
- struct icmp6_fqdn_query *fq;
- struct icmp6_fqdn_reply *fr;
- struct _icmp_host_cache *hc;
- struct sockaddr_in6 sin6;
- struct iovec iov;
- fd_set s_fds, fds;
- struct timeval tout;
- int len;
- char *name;
- static int pid;
- static struct _icmp_host_cache *hc_head;
-
- for (hc = hc_head; hc; hc = hc->hc_next) {
- if (hc->hc_ifindex == ifindex
- && IN6_ARE_ADDR_EQUAL(&hc->hc_addr, addr))
- return hc->hc_name;
- }
-
- if (pid == 0)
- pid = getpid();
-
- ICMP6_FILTER_SETBLOCKALL(&filter);
- ICMP6_FILTER_SETPASS(ICMP6_FQDN_REPLY, &filter);
-
- FD_ZERO(&s_fds);
- tout.tv_sec = 0;
- tout.tv_usec = 200000; /*XXX: 200ms*/
-
- fq = (struct icmp6_fqdn_query *)buf;
- fq->icmp6_fqdn_type = ICMP6_FQDN_QUERY;
- fq->icmp6_fqdn_code = 0;
- fq->icmp6_fqdn_cksum = 0;
- fq->icmp6_fqdn_id = (u_short)pid;
- fq->icmp6_fqdn_unused = 0;
- fq->icmp6_fqdn_cookie[0] = 0;
- fq->icmp6_fqdn_cookie[1] = 0;
-
- memset(&sin6, 0, sizeof(sin6));
- sin6.sin6_family = AF_INET6;
- sin6.sin6_addr = *addr;
-
- memset(&msg, 0, sizeof(msg));
- msg.msg_name = (caddr_t)&sin6;
- msg.msg_namelen = sizeof(sin6);
- msg.msg_iov = &iov;
- msg.msg_iovlen = 1;
- msg.msg_control = NULL;
- msg.msg_controllen = 0;
- iov.iov_base = (caddr_t)buf;
- iov.iov_len = sizeof(struct icmp6_fqdn_query);
-
- if (ifindex) {
- msg.msg_control = cbuf;
- msg.msg_controllen = sizeof(cbuf);
- cmsg = CMSG_FIRSTHDR(&msg);
- cmsg->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo));
- cmsg->cmsg_level = IPPROTO_IPV6;
- cmsg->cmsg_type = IPV6_PKTINFO;
- pkt = (struct in6_pktinfo *)&cmsg[1];
- memset(&pkt->ipi6_addr, 0, sizeof(struct in6_addr));
- pkt->ipi6_ifindex = ifindex;
- cmsg = CMSG_NXTHDR(&msg, cmsg);
- msg.msg_controllen = (char *)cmsg - cbuf;
- }
-
- if ((s = socket(PF_INET6, SOCK_RAW, IPPROTO_ICMPV6)) < 0)
- return NULL;
- (void)setsockopt(s, IPPROTO_ICMPV6, ICMP6_FILTER,
- (char *)&filter, sizeof(filter));
- cc = _sendmsg(s, &msg, 0);
- if (cc < 0) {
- close(s);
- return NULL;
- }
- FD_SET(s, &s_fds);
- for (;;) {
- fds = s_fds;
- if (select(s + 1, &fds, NULL, NULL, &tout) <= 0) {
- close(s);
- return NULL;
- }
- len = sizeof(sin6);
- cc = _recvfrom(s, buf, sizeof(buf), 0,
- (struct sockaddr *)&sin6, &len);
- if (cc <= 0) {
- close(s);
- return NULL;
- }
- if (cc < sizeof(struct ip6_hdr) + sizeof(struct icmp6_hdr))
- continue;
- if (!IN6_ARE_ADDR_EQUAL(addr, &sin6.sin6_addr))
- continue;
- fr = (struct icmp6_fqdn_reply *)(buf + sizeof(struct ip6_hdr));
- if (fr->icmp6_fqdn_type == ICMP6_FQDN_REPLY)
- break;
- }
- close(s);
- if (fr->icmp6_fqdn_cookie[1] != 0) {
- /* rfc1788 type */
- name = buf + sizeof(struct ip6_hdr) + sizeof(struct icmp6_hdr) + 4;
- len = (buf + cc) - name;
- } else {
- len = fr->icmp6_fqdn_namelen;
- name = fr->icmp6_fqdn_name;
- }
- if (len <= 0)
- return NULL;
- name[len] = 0;
-
- if ((hc = (struct _icmp_host_cache *)malloc(sizeof(*hc))) == NULL)
- return NULL;
- /* XXX: limit number of cached entries */
- hc->hc_ifindex = ifindex;
- hc->hc_addr = *addr;
- hc->hc_name = strdup(name);
- hc->hc_next = hc_head;
- hc_head = hc;
- return hc->hc_name;
-}
-
-static struct hostent *
-_icmp_ghbyaddr(const void *addr, int addrlen, int af, int *errp)
-{
- char *hname;
- int ifindex;
- struct in6_addr addr6;
-
- if (af != AF_INET6) {
- /*
- * Note: rfc1788 defines Who Are You for IPv4,
- * but no one implements it.
- */
- return NULL;
- }
-
- memcpy(&addr6, addr, addrlen);
- ifindex = (addr6.s6_addr[2] << 8) | addr6.s6_addr[3];
- addr6.s6_addr[2] = addr6.s6_addr[3] = 0;
-
- if (!IN6_IS_ADDR_LINKLOCAL(&addr6))
- return NULL; /*XXX*/
-
- if ((hname = _icmp_fqdn_query(&addr6, ifindex)) == NULL)
- return NULL;
- return _hpaddr(af, hname, &addr6, errp);
-}
-#endif /* ICMPNL */
diff --git a/newlib/libc/sys/linux/net/namespace.h b/newlib/libc/sys/linux/net/namespace.h
deleted file mode 100644
index 291aad580..000000000
--- a/newlib/libc/sys/linux/net/namespace.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2001 Daniel Eischen <deischen@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 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.
- *
- * $FreeBSD: src/lib/libc/include/namespace.h,v 1.9 2002/03/29 22:43:42 markm Exp $
- */
-
-#ifndef _NAMESPACE_H_
-#define _NAMESPACE_H_
-
-/*
- * Adjust names so that headers declare "hidden" names.
- */
-
-/*
- * ISO C (C90) section. Most names in libc aren't in ISO C, so they
- * should be here. Most aren't here...
- */
-#define err _err
-#define warn _warn
-
-/*
- * Prototypes for syscalls/functions that need to be overridden
- * in libc_r/libpthread.
- */
-#define accept _accept
-#define __acl_aclcheck_fd ___acl_aclcheck_fd
-#define __acl_delete_fd ___acl_delete_fd
-#define __acl_get_fd ___acl_get_fd
-#define __acl_set_fd ___acl_set_fd
-#define bind _bind
-#define __cap_get_fd ___cap_get_fd
-#define __cap_set_fd ___cap_set_fd
-#define close _close
-#define connect _connect
-#define dup _dup
-#define dup2 _dup2
-#define execve _execve
-#define fcntl _fcntl
-/*#define flock _flock */
-#define fstat _fstat
-#define fstatfs _fstatfs
-#define fsync _fsync
-#define getdirentries _getdirentries
-#define getlogin _getlogin
-#define getpeername _getpeername
-#define getprogname _getprogname
-#define getsockname _getsockname
-#define getsockopt _getsockopt
-#define ioctl _ioctl
-#define listen _listen
-#define nanosleep _nanosleep
-#define open _open
-#define poll _poll
-#define pthread_cond_signal _pthread_cond_signal
-#define pthread_cond_wait _pthread_cond_wait
-#define pthread_cond_init _pthread_cond_init
-#define pthread_exit _pthread_exit
-#define pthread_getspecific _pthread_getspecific
-#define pthread_key_create _pthread_key_create
-#define pthread_key_delete _pthread_key_delete
-#define pthread_main_np _pthread_main_np
-#define pthread_mutex_destroy _pthread_mutex_destroy
-#define pthread_mutex_init _pthread_mutex_init
-#define pthread_mutex_lock _pthread_mutex_lock
-#define pthread_mutex_trylock _pthread_mutex_trylock
-#define pthread_mutex_unlock _pthread_mutex_unlock
-#define pthread_mutexattr_init _pthread_mutexattr_init
-#define pthread_mutexattr_destroy _pthread_mutexattr_destroy
-#define pthread_mutexattr_settype _pthread_mutexattr_settype
-#define pthread_once _pthread_once
-#define pthread_rwlock_init _pthread_rwlock_init
-#define pthread_rwlock_rdlock _pthread_rwlock_rdlock
-#define pthread_rwlock_wrlock _pthread_rwlock_wrlock
-#define pthread_rwlock_unlock _pthread_rwlock_unlock
-#define pthread_self _pthread_self
-#define pthread_setspecific _pthread_setspecific
-#define pthread_sigmask _pthread_sigmask
-#define read _read
-#define readv _readv
-#define recvfrom _recvfrom
-#define recvmsg _recvmsg
-#define select _select
-#define sendmsg _sendmsg
-#define sendto _sendto
-#define setsockopt _setsockopt
-/*#define sigaction _sigaction*/
-#define sigprocmask _sigprocmask
-#define sigsuspend _sigsuspend
-#define socket _socket
-#define socketpair _socketpair
-#define wait4 _wait4
-#define write _write
-#define writev _writev
-
-
-/*
- * Other hidden syscalls/functions that libc_r needs to override
- * but are not used internally by libc.
- *
- * XXX - When modifying libc to use one of the following, remove
- * the prototype from below and place it in the list above.
- */
-#if 0
-#define creat _creat
-#define fchflags _fchflags
-#define fchmod _fchmod
-#define fpathconf _fpathconf
-#define msync _msync
-#define nfssvc _nfssvc
-#define pause _pause
-#define pthread_rwlock_destroy _pthread_rwlock_destroy
-#define pthread_rwlock_tryrdlock _pthread_rwlock_tryrdlock
-#define pthread_rwlock_trywrlock _pthread_rwlock_trywrlock
-#define pthread_rwlockattr_init _pthread_rwlockattr_init
-#define pthread_rwlockattr_destroy _pthread_rwlockattr_destroy
-#define sched_yield _sched_yield
-#define sendfile _sendfile
-#define shutdown _shutdown
-#define sigaltstack _sigaltstack
-#define sigpending _sigpending
-#define sigreturn _sigreturn
-#define sigsetmask _sigsetmask
-#define sleep _sleep
-#define system _system
-#define tcdrain _tcdrain
-#define wait _wait
-#define waitpid _waitpid
-#endif
-
-#endif /* _NAMESPACE_H_ */
diff --git a/newlib/libc/sys/linux/net/ns.3 b/newlib/libc/sys/linux/net/ns.3
deleted file mode 100644
index be8d155c3..000000000
--- a/newlib/libc/sys/linux/net/ns.3
+++ /dev/null
@@ -1,133 +0,0 @@
-.\" Copyright (c) 1986, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ns.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/net/ns.3,v 1.10 2001/10/01 16:08:56 ru Exp $
-.\"
-.Dd June 4, 1993
-.Dt NS 3
-.Os
-.Sh NAME
-.Nm ns_addr ,
-.Nm ns_ntoa
-.Nd Xerox
-.Tn NS Ns (tm)
-address conversion routines
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In netns/ns.h
-.Ft struct ns_addr
-.Fn ns_addr "char *cp"
-.Ft char *
-.Fn ns_ntoa "struct ns_addr ns"
-.Sh DESCRIPTION
-The routine
-.Fn ns_addr
-interprets character strings representing
-.Tn XNS
-addresses, returning binary information suitable
-for use in system calls.
-The routine
-.Fn ns_ntoa
-takes
-.Tn XNS
-addresses and returns
-.Tn ASCII
-strings representing the address in a
-notation in common use in the Xerox Development Environment:
-.Bd -ragged -offset indent
-<network number>.<host number>.<port number>
-.Ed
-.Pp
-Trailing zero fields are suppressed, and each number is printed in hexadecimal,
-in a format suitable for input to
-.Fn ns_addr .
-Any fields lacking super-decimal digits will have a
-trailing
-.Ql H
-appended.
-.Pp
-Unfortunately, no universal standard exists for representing
-.Tn XNS
-addresses.
-An effort has been made to insure that
-.Fn ns_addr
-be compatible with most formats in common use.
-It will first separate an address into 1 to 3 fields using a single delimiter
-chosen from
-period
-.Ql \&. ,
-colon
-.Ql \&:
-or pound-sign
-.Ql \&# .
-Each field is then examined for byte separators (colon or period).
-If there are byte separators, each subfield separated is taken to be
-a small hexadecimal number, and the entirety is taken as a network-byte-ordered
-quantity to be zero extended in the high-network-order bytes.
-Next, the field is inspected for hyphens, in which case
-the field is assumed to be a number in decimal notation
-with hyphens separating the millenia.
-Next, the field is assumed to be a number:
-It is interpreted
-as hexadecimal if there is a leading
-.Ql 0x
-(as in C),
-a trailing
-.Ql H
-(as in Mesa), or there are any super-decimal digits present.
-It is interpreted as octal is there is a leading
-.Ql 0
-and there are no super-octal digits.
-Otherwise, it is converted as a decimal number.
-.Sh RETURN VALUES
-None. (See
-.Sx BUGS . )
-.Sh SEE ALSO
-.Xr hosts 5 ,
-.Xr networks 5
-.Sh HISTORY
-The
-.Fn ns_addr
-and
-.Fn ns_toa
-functions appeared in
-.Bx 4.3 .
-.Sh BUGS
-The string returned by
-.Fn ns_ntoa
-resides in a static memory area.
-The function
-.Fn ns_addr
-should diagnose improperly formed input, and there should be an unambiguous
-way to recognize this.
diff --git a/newlib/libc/sys/linux/net/ns_addr.c b/newlib/libc/sys/linux/net/ns_addr.c
deleted file mode 100644
index a86cf31b7..000000000
--- a/newlib/libc/sys/linux/net/ns_addr.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (c) 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * J.Q. Johnson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ns_addr.c 8.1 (Berkeley) 6/7/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/param.h>
-#include <arpa/inet.h>
-#include <netns/ns.h>
-#include <stdio.h>
-#include <string.h>
-
-static struct ns_addr addr, zero_addr;
-
-static void Field(), cvtbase();
-
-struct ns_addr
-ns_addr(name)
- const char *name;
-{
- char separator;
- char *hostname, *socketname, *cp;
- char buf[50];
-
- (void)strncpy(buf, name, sizeof(buf) - 1);
- buf[sizeof(buf) - 1] = '\0';
-
- /*
- * First, figure out what he intends as a field separtor.
- * Despite the way this routine is written, the preferred
- * form 2-272.AA001234H.01777, i.e. XDE standard.
- * Great efforts are made to insure backward compatibility.
- */
- if ((hostname = strchr(buf, '#')) != NULL)
- separator = '#';
- else {
- hostname = strchr(buf, '.');
- if ((cp = strchr(buf, ':')) &&
- ((hostname && cp < hostname) || (hostname == 0))) {
- hostname = cp;
- separator = ':';
- } else
- separator = '.';
- }
- if (hostname)
- *hostname++ = 0;
-
- addr = zero_addr;
- Field(buf, addr.x_net.c_net, 4);
- if (hostname == 0)
- return (addr); /* No separator means net only */
-
- socketname = strchr(hostname, separator);
- if (socketname) {
- *socketname++ = 0;
- Field(socketname, (u_char *)&addr.x_port, 2);
- }
-
- Field(hostname, addr.x_host.c_host, 6);
-
- return (addr);
-}
-
-static void
-Field(buf, out, len)
- char *buf;
- u_char *out;
- int len;
-{
- char *bp = buf;
- int i, ibase, base16 = 0, base10 = 0, clen = 0;
- int hb[6], *hp;
-
- /*
- * first try 2-273#2-852-151-014#socket
- */
- if ((*buf != '-') &&
- (1 < (i = sscanf(buf, "%d-%d-%d-%d-%d",
- &hb[0], &hb[1], &hb[2], &hb[3], &hb[4])))) {
- cvtbase(1000L, 256, hb, i, out, len);
- return;
- }
- /*
- * try form 8E1#0.0.AA.0.5E.E6#socket
- */
- if (1 < (i = sscanf(buf,"%x.%x.%x.%x.%x.%x",
- &hb[0], &hb[1], &hb[2], &hb[3], &hb[4], &hb[5]))) {
- cvtbase(256L, 256, hb, i, out, len);
- return;
- }
- /*
- * try form 8E1#0:0:AA:0:5E:E6#socket
- */
- if (1 < (i = sscanf(buf,"%x:%x:%x:%x:%x:%x",
- &hb[0], &hb[1], &hb[2], &hb[3], &hb[4], &hb[5]))) {
- cvtbase(256L, 256, hb, i, out, len);
- return;
- }
- /*
- * This is REALLY stretching it but there was a
- * comma notation separting shorts -- definitely non standard
- */
- if (1 < (i = sscanf(buf,"%x,%x,%x",
- &hb[0], &hb[1], &hb[2]))) {
- hb[0] = htons(hb[0]); hb[1] = htons(hb[1]);
- hb[2] = htons(hb[2]);
- cvtbase(65536L, 256, hb, i, out, len);
- return;
- }
-
- /* Need to decide if base 10, 16 or 8 */
- while (*bp) switch (*bp++) {
-
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '-':
- break;
-
- case '8': case '9':
- base10 = 1;
- break;
-
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- base16 = 1;
- break;
-
- case 'x': case 'X':
- *--bp = '0';
- base16 = 1;
- break;
-
- case 'h': case 'H':
- base16 = 1;
- /* fall into */
-
- default:
- *--bp = 0; /* Ends Loop */
- }
- if (base16) {
- ibase = 4096;
- } else if (base10 == 0 && *buf == '0') {
- ibase = 512;
- } else {
- base10 = 1;
- ibase = 1000;
- }
-
- for (bp = buf; *bp++; ) clen++;
- if (clen == 0) clen++;
- if (clen > 18) clen = 18;
- i = ((clen - 1) / 3) + 1;
- bp = clen + buf - 3;
- hp = hb + i - 1;
-
- while (hp > hb) {
- if (base16)
- (void)sscanf(bp, "%3x", hp);
- else if (base10)
- (void)sscanf(bp, "%3d", hp);
- else
- (void)sscanf(bp, "%3o", hp);
-
- bp[0] = 0;
- hp--;
- bp -= 3;
- }
- if (base16)
- (void)sscanf(buf, "%3x", hp);
- else if (base10)
- (void)sscanf(buf, "%3d", hp);
- else
- (void)sscanf(buf, "%3o", hp);
-
- cvtbase((long)ibase, 256, hb, i, out, len);
-}
-
-static void
-cvtbase(oldbase,newbase,input,inlen,result,reslen)
- long oldbase;
- int newbase;
- int input[];
- int inlen;
- unsigned char result[];
- int reslen;
-{
- int d, e;
- long sum;
-
- e = 1;
- while (e > 0 && reslen > 0) {
- d = 0; e = 0; sum = 0;
- /* long division: input=input/newbase */
- while (d < inlen) {
- sum = sum*oldbase + (long) input[d];
- e += (sum > 0);
- input[d++] = sum / newbase;
- sum %= newbase;
- }
- result[--reslen] = sum; /* accumulate remainder */
- }
- for (d=0; d < reslen; d++)
- result[d] = 0;
-}
diff --git a/newlib/libc/sys/linux/net/ns_name.c b/newlib/libc/sys/linux/net/ns_name.c
deleted file mode 100644
index 609df14f5..000000000
--- a/newlib/libc/sys/linux/net/ns_name.c
+++ /dev/null
@@ -1,592 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-
-#include <errno.h>
-#include <resolv.h>
-#include <string.h>
-
-/* Data. */
-
-static char digits[] = "0123456789";
-
-/* Forward. */
-
-static int special(int);
-static int printable(int);
-static int dn_find(const u_char *, const u_char *,
- const u_char * const *,
- const u_char * const *);
-
-/* Public. */
-
-/*
- * ns_name_ntop(src, dst, dstsiz)
- * Convert an encoded domain name to printable ascii as per RFC1035.
- * return:
- * Number of bytes written to buffer, or -1 (with errno set)
- * notes:
- * The root is returned as "."
- * All other domains are returned in non absolute form
- */
-int
-ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) {
- const u_char *cp;
- char *dn, *eom;
- u_char c;
- u_int n;
-
- cp = src;
- dn = dst;
- eom = dst + dstsiz;
-
- while ((n = *cp++) != 0) {
- if ((n & NS_CMPRSFLGS) != 0) {
- /* Some kind of compression pointer. */
- errno = EMSGSIZE;
- return (-1);
- }
- if (dn != dst) {
- if (dn >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = '.';
- }
- if (dn + n >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- for ((void)NULL; n > 0; n--) {
- c = *cp++;
- if (special(c)) {
- if (dn + 1 >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = '\\';
- *dn++ = (char)c;
- } else if (!printable(c)) {
- if (dn + 3 >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = '\\';
- *dn++ = digits[c / 100];
- *dn++ = digits[(c % 100) / 10];
- *dn++ = digits[c % 10];
- } else {
- if (dn >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = (char)c;
- }
- }
- }
- if (dn == dst) {
- if (dn >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = '.';
- }
- if (dn >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dn++ = '\0';
- return (dn - dst);
-}
-
-/*
- * ns_name_pton(src, dst, dstsiz)
- * Convert a ascii string into an encoded domain name as per RFC1035.
- * return:
- * -1 if it fails
- * 1 if string was fully qualified
- * 0 is string was not fully qualified
- * notes:
- * Enforces label and domain length limits.
- */
-
-int
-ns_name_pton(const char *src, u_char *dst, size_t dstsiz) {
- u_char *label, *bp, *eom;
- int c, n, escaped;
- char *cp;
-
- escaped = 0;
- bp = dst;
- eom = dst + dstsiz;
- label = bp++;
-
- while ((c = *src++) != 0) {
- if (escaped) {
- if ((cp = strchr(digits, c)) != NULL) {
- n = (cp - digits) * 100;
- if ((c = *src++) == 0 ||
- (cp = strchr(digits, c)) == NULL) {
- errno = EMSGSIZE;
- return (-1);
- }
- n += (cp - digits) * 10;
- if ((c = *src++) == 0 ||
- (cp = strchr(digits, c)) == NULL) {
- errno = EMSGSIZE;
- return (-1);
- }
- n += (cp - digits);
- if (n > 255) {
- errno = EMSGSIZE;
- return (-1);
- }
- c = n;
- }
- escaped = 0;
- } else if (c == '\\') {
- escaped = 1;
- continue;
- } else if (c == '.') {
- c = (bp - label - 1);
- if ((c & NS_CMPRSFLGS) != 0) { /* Label too big. */
- errno = EMSGSIZE;
- return (-1);
- }
- if (label >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *label = c;
- /* Fully qualified ? */
- if (*src == '\0') {
- if (c != 0) {
- if (bp >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *bp++ = '\0';
- }
- if ((bp - dst) > MAXCDNAME) {
- errno = EMSGSIZE;
- return (-1);
- }
- return (1);
- }
- if (c == 0) {
- errno = EMSGSIZE;
- return (-1);
- }
- label = bp++;
- continue;
- }
- if (bp >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *bp++ = (u_char)c;
- }
- c = (bp - label - 1);
- if ((c & NS_CMPRSFLGS) != 0) { /* Label too big. */
- errno = EMSGSIZE;
- return (-1);
- }
- if (label >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *label = c;
- if (c != 0) {
- if (bp >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *bp++ = 0;
- }
- if ((bp - dst) > MAXCDNAME) { /* src too big */
- errno = EMSGSIZE;
- return (-1);
- }
- return (0);
-}
-
-/*
- * ns_name_unpack(msg, eom, src, dst, dstsiz)
- * Unpack a domain name from a message, source may be compressed.
- * return:
- * -1 if it fails, or consumed octets if it succeeds.
- */
-int
-ns_name_unpack(const u_char *msg, const u_char *eom, const u_char *src,
- u_char *dst, size_t dstsiz)
-{
- const u_char *srcp, *dstlim;
- u_char *dstp;
- int n, len, checked;
-
- len = -1;
- checked = 0;
- dstp = dst;
- srcp = src;
- dstlim = dst + dstsiz;
- if (srcp < msg || srcp >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- /* Fetch next label in domain name. */
- while ((n = *srcp++) != 0) {
- /* Check for indirection. */
- switch (n & NS_CMPRSFLGS) {
- case 0:
- /* Limit checks. */
- if (dstp + n + 1 >= dstlim || srcp + n >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- checked += n + 1;
- *dstp++ = n;
- memcpy(dstp, srcp, n);
- dstp += n;
- srcp += n;
- break;
-
- case NS_CMPRSFLGS:
- if (srcp >= eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- if (len < 0)
- len = srcp - src + 1;
- srcp = msg + (((n & 0x3f) << 8) | (*srcp & 0xff));
- if (srcp < msg || srcp >= eom) { /* Out of range. */
- errno = EMSGSIZE;
- return (-1);
- }
- checked += 2;
- /*
- * Check for loops in the compressed name;
- * if we've looked at the whole message,
- * there must be a loop.
- */
- if (checked >= eom - msg) {
- errno = EMSGSIZE;
- return (-1);
- }
- break;
-
- default:
- errno = EMSGSIZE;
- return (-1); /* flag error */
- }
- }
- *dstp = '\0';
- if (len < 0)
- len = srcp - src;
- return (len);
-}
-
-/*
- * ns_name_pack(src, dst, dstsiz, dnptrs, lastdnptr)
- * Pack domain name 'domain' into 'comp_dn'.
- * return:
- * Size of the compressed name, or -1.
- * notes:
- * 'dnptrs' is an array of pointers to previous compressed names.
- * dnptrs[0] is a pointer to the beginning of the message. The array
- * ends with NULL.
- * 'lastdnptr' is a pointer to the end of the array pointed to
- * by 'dnptrs'.
- * Side effects:
- * The list of pointers in dnptrs is updated for labels inserted into
- * the message as we compress the name. If 'dnptr' is NULL, we don't
- * try to compress names. If 'lastdnptr' is NULL, we don't update the
- * list.
- */
-int
-ns_name_pack(const u_char *src, u_char *dst, int dstsiz,
- const u_char **dnptrs, const u_char **lastdnptr)
-{
- u_char *dstp;
- const u_char **cpp, **lpp, *eob, *msg;
- const u_char *srcp;
- int n, l;
-
- srcp = src;
- dstp = dst;
- eob = dstp + dstsiz;
- lpp = cpp = NULL;
- if (dnptrs != NULL) {
- if ((msg = *dnptrs++) != NULL) {
- for (cpp = dnptrs; *cpp != NULL; cpp++)
- (void)NULL;
- lpp = cpp; /* end of list to search */
- }
- } else
- msg = NULL;
-
- /* make sure the domain we are about to add is legal */
- l = 0;
- do {
- n = *srcp;
- if ((n & NS_CMPRSFLGS) != 0) {
- errno = EMSGSIZE;
- return (-1);
- }
- l += n + 1;
- if (l > MAXCDNAME) {
- errno = EMSGSIZE;
- return (-1);
- }
- srcp += n + 1;
- } while (n != 0);
-
- srcp = src;
- do {
- /* Look to see if we can use pointers. */
- n = *srcp;
- if (n != 0 && msg != NULL) {
- l = dn_find(srcp, msg, (const u_char * const *)dnptrs,
- (const u_char * const *)lpp);
- if (l >= 0) {
- if (dstp + 1 >= eob) {
- errno = EMSGSIZE;
- return (-1);
- }
- *dstp++ = (l >> 8) | NS_CMPRSFLGS;
- *dstp++ = l % 256;
- return (dstp - dst);
- }
- /* Not found, save it. */
- if (lastdnptr != NULL && cpp < lastdnptr - 1 &&
- (dstp - msg) < 0x4000) {
- *cpp++ = dstp;
- *cpp = NULL;
- }
- }
- /* copy label to buffer */
- if (n & NS_CMPRSFLGS) { /* Should not happen. */
- errno = EMSGSIZE;
- return (-1);
- }
- if (dstp + 1 + n >= eob) {
- errno = EMSGSIZE;
- return (-1);
- }
- memcpy(dstp, srcp, n + 1);
- srcp += n + 1;
- dstp += n + 1;
- } while (n != 0);
-
- if (dstp > eob) {
- if (msg != NULL)
- *lpp = NULL;
- errno = EMSGSIZE;
- return (-1);
- }
- return (dstp - dst);
-}
-
-/*
- * ns_name_uncompress(msg, eom, src, dst, dstsiz)
- * Expand compressed domain name to presentation format.
- * return:
- * Number of bytes read out of `src', or -1 (with errno set).
- * note:
- * Root domain returns as "." not "".
- */
-int
-ns_name_uncompress(const u_char *msg, const u_char *eom, const u_char *src,
- char *dst, size_t dstsiz)
-{
- u_char tmp[NS_MAXCDNAME];
- int n;
-
- if ((n = ns_name_unpack(msg, eom, src, tmp, sizeof tmp)) == -1)
- return (-1);
- if (ns_name_ntop(tmp, dst, dstsiz) == -1)
- return (-1);
- return (n);
-}
-
-/*
- * ns_name_compress(src, dst, dstsiz, dnptrs, lastdnptr)
- * Compress a domain name into wire format, using compression pointers.
- * return:
- * Number of bytes consumed in `dst' or -1 (with errno set).
- * notes:
- * 'dnptrs' is an array of pointers to previous compressed names.
- * dnptrs[0] is a pointer to the beginning of the message.
- * The list ends with NULL. 'lastdnptr' is a pointer to the end of the
- * array pointed to by 'dnptrs'. Side effect is to update the list of
- * pointers for labels inserted into the message as we compress the name.
- * If 'dnptr' is NULL, we don't try to compress names. If 'lastdnptr'
- * is NULL, we don't update the list.
- */
-int
-ns_name_compress(const char *src, u_char *dst, size_t dstsiz,
- const u_char **dnptrs, const u_char **lastdnptr)
-{
- u_char tmp[NS_MAXCDNAME];
-
- if (ns_name_pton(src, tmp, sizeof tmp) == -1)
- return (-1);
- return (ns_name_pack(tmp, dst, dstsiz, dnptrs, lastdnptr));
-}
-
-/*
- * ns_name_skip(ptrptr, eom)
- * Advance *ptrptr to skip over the compressed name it points at.
- * return:
- * 0 on success, -1 (with errno set) on failure.
- */
-int
-ns_name_skip(const u_char **ptrptr, const u_char *eom) {
- const u_char *cp;
- u_int n;
-
- cp = *ptrptr;
- while (cp < eom && (n = *cp++) != 0) {
- /* Check for indirection. */
- switch (n & NS_CMPRSFLGS) {
- case 0: /* normal case, n == len */
- cp += n;
- continue;
- case NS_CMPRSFLGS: /* indirection */
- cp++;
- break;
- default: /* illegal type */
- errno = EMSGSIZE;
- return (-1);
- }
- break;
- }
- if (cp > eom) {
- errno = EMSGSIZE;
- return (-1);
- }
- *ptrptr = cp;
- return (0);
-}
-
-/* Private. */
-
-/*
- * special(ch)
- * Thinking in noninternationalized USASCII (per the DNS spec),
- * is this characted special ("in need of quoting") ?
- * return:
- * boolean.
- */
-static int
-special(int ch) {
- switch (ch) {
- case 0x22: /* '"' */
- case 0x2E: /* '.' */
- case 0x3B: /* ';' */
- case 0x5C: /* '\\' */
- /* Special modifiers in zone files. */
- case 0x40: /* '@' */
- case 0x24: /* '$' */
- return (1);
- default:
- return (0);
- }
-}
-
-/*
- * printable(ch)
- * Thinking in noninternationalized USASCII (per the DNS spec),
- * is this character visible and not a space when printed ?
- * return:
- * boolean.
- */
-static int
-printable(int ch) {
- return (ch > 0x20 && ch < 0x7f);
-}
-
-/*
- * Thinking in noninternationalized USASCII (per the DNS spec),
- * convert this character to lower case if it's upper case.
- */
-static int
-mklower(int ch) {
- if (ch >= 0x41 && ch <= 0x5A)
- return (ch + 0x20);
- return (ch);
-}
-
-/*
- * dn_find(domain, msg, dnptrs, lastdnptr)
- * Search for the counted-label name in an array of compressed names.
- * return:
- * offset from msg if found, or -1.
- * notes:
- * dnptrs is the pointer to the first name on the list,
- * not the pointer to the start of the message.
- */
-static int
-dn_find(const u_char *domain, const u_char *msg,
- const u_char * const *dnptrs,
- const u_char * const *lastdnptr)
-{
- const u_char *dn, *cp, *sp;
- const u_char * const *cpp;
- u_int n;
-
- for (cpp = dnptrs; cpp < lastdnptr; cpp++) {
- dn = domain;
- sp = cp = *cpp;
- while ((n = *cp++) != 0) {
- /*
- * check for indirection
- */
- switch (n & NS_CMPRSFLGS) {
- case 0: /* normal case, n == len */
- if (n != *dn++)
- goto next;
- for ((void)NULL; n > 0; n--)
- if (mklower(*dn++) != mklower(*cp++))
- goto next;
- /* Is next root for both ? */
- if (*dn == '\0' && *cp == '\0')
- return (sp - msg);
- if (*dn)
- continue;
- goto next;
-
- case NS_CMPRSFLGS: /* indirection */
- cp = msg + (((n & 0x3f) << 8) | *cp);
- break;
-
- default: /* illegal type */
- errno = EMSGSIZE;
- return (-1);
- }
- }
- next: ;
- }
- errno = ENOENT;
- return (-1);
-}
diff --git a/newlib/libc/sys/linux/net/ns_netint.c b/newlib/libc/sys/linux/net/ns_netint.c
deleted file mode 100644
index 18c9cccd6..000000000
--- a/newlib/libc/sys/linux/net/ns_netint.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-/* Import. */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-
-u_int
-ns_get16(const u_char *src) {
- u_int dst;
-
- NS_GET16(dst, src);
- return (dst);
-}
-
-u_long
-ns_get32(const u_char *src) {
- u_long dst;
-
- NS_GET32(dst, src);
- return (dst);
-}
-
-void
-ns_put16(u_int src, u_char *dst) {
- NS_PUT16(src, dst);
-}
-
-void
-ns_put32(u_long src, u_char *dst) {
- NS_PUT32(src, dst);
-}
diff --git a/newlib/libc/sys/linux/net/ns_ntoa.c b/newlib/libc/sys/linux/net/ns_ntoa.c
deleted file mode 100644
index b6a6c4c22..000000000
--- a/newlib/libc/sys/linux/net/ns_ntoa.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ns_ntoa.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/endian.h>
-
-#include <sys/param.h>
-#include <arpa/inet.h>
-#include <netns/ns.h>
-#include <stdio.h>
-
-static char *spectHex(char *p0);
-
-char *
-ns_ntoa(addr)
- struct ns_addr addr;
-{
- static char obuf[40];
- union { union ns_net net_e; u_long long_e; } net;
- u_short port = htons(addr.x_port);
- char *cp;
- char *cp2;
- u_char *up = addr.x_host.c_host;
- u_char *uplim = up + 6;
-
- net.net_e = addr.x_net;
- sprintf(obuf, "%lx", (u_long)ntohl(net.long_e));
- cp = spectHex(obuf);
- cp2 = cp + 1;
- while (*up==0 && up < uplim) up++;
- if (up == uplim) {
- if (port) {
- sprintf(cp, ".0");
- cp += 2;
- }
- } else {
- sprintf(cp, ".%x", *up++);
- while (up < uplim) {
- while (*cp) cp++;
- sprintf(cp, "%02x", *up++);
- }
- cp = spectHex(cp2);
- }
- if (port) {
- sprintf(cp, ".%x", port);
- spectHex(cp + 1);
- }
- return (obuf);
-}
-
-static char *
-spectHex(p0)
- char *p0;
-{
- int ok = 0;
- int nonzero = 0;
- char *p = p0;
- for (; *p; p++) switch (*p) {
-
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- *p += ('A' - 'a');
- /* fall into . . . */
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- ok = 1;
- case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- nonzero = 1;
- }
- if (nonzero && !ok) { *p++ = 'H'; *p = 0; }
- return (p);
-}
diff --git a/newlib/libc/sys/linux/net/ns_parse.c b/newlib/libc/sys/linux/net/ns_parse.c
deleted file mode 100644
index 38a684b87..000000000
--- a/newlib/libc/sys/linux/net/ns_parse.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-
-#include <errno.h>
-#include <resolv.h>
-#include <string.h>
-
-/* These need to be in the same order as the nres.h:ns_flag enum. */
-struct _ns_flagdata _ns_flagdata[16] = {
- { 0x8000, 15 }, /* qr. */
- { 0x7800, 11 }, /* opcode. */
- { 0x0400, 10 }, /* aa. */
- { 0x0200, 9 }, /* tc. */
- { 0x0100, 8 }, /* rd. */
- { 0x0080, 7 }, /* ra. */
- { 0x0040, 6 }, /* z. */
- { 0x0020, 5 }, /* ad. */
- { 0x0010, 4 }, /* cd. */
- { 0x000f, 0 }, /* rcode. */
- { 0x0000, 0 }, /* expansion (1/6). */
- { 0x0000, 0 }, /* expansion (2/6). */
- { 0x0000, 0 }, /* expansion (3/6). */
- { 0x0000, 0 }, /* expansion (4/6). */
- { 0x0000, 0 }, /* expansion (5/6). */
- { 0x0000, 0 }, /* expansion (6/6). */
-};
-
-static int
-skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) {
- const u_char *optr = ptr;
-
- for ((void)NULL; count > 0; count--) {
- int b, rdlength;
-
- b = dn_skipname(ptr, eom);
- if (b < 0)
- goto emsgsize;
- ptr += b/*Name*/ + NS_INT16SZ/*Type*/ + NS_INT16SZ/*Class*/;
- if (section != ns_s_qd) {
- if (ptr + NS_INT32SZ > eom)
- goto emsgsize;
- ptr += NS_INT32SZ/*TTL*/;
- if (ptr + NS_INT16SZ > eom)
- goto emsgsize;
- NS_GET16(rdlength, ptr);
- ptr += rdlength/*RData*/;
- }
- }
- if (ptr > eom)
- goto emsgsize;
- return (ptr - optr);
- emsgsize:
- errno = EMSGSIZE;
- return (-1);
-}
-
-int
-ns_initparse(const u_char *msg, int msglen, ns_msg *handle) {
- const u_char *eom = msg + msglen;
- int i;
-
- memset(handle, 0x5e, sizeof *handle);
- handle->_msg = msg;
- handle->_eom = eom;
- if (msg + NS_INT16SZ > eom)
- goto emsgsize;
- NS_GET16(handle->_id, msg);
- if (msg + NS_INT16SZ > eom)
- goto emsgsize;
- NS_GET16(handle->_flags, msg);
- for (i = 0; i < ns_s_max; i++) {
- if (msg + NS_INT16SZ > eom)
- goto emsgsize;
- NS_GET16(handle->_counts[i], msg);
- }
- for (i = 0; i < ns_s_max; i++)
- if (handle->_counts[i] == 0)
- handle->_sections[i] = NULL;
- else {
- int b = skiprr(msg, eom, (ns_sect)i,
- handle->_counts[i]);
-
- if (b < 0)
- return (-1);
- handle->_sections[i] = msg;
- msg += b;
- }
- if (msg != eom)
- goto emsgsize;
- handle->_sect = ns_s_max;
- handle->_rrnum = -1;
- handle->_ptr = NULL;
- return (0);
- emsgsize:
- errno = EMSGSIZE;
- return (-1);
-}
-
-int
-ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) {
- int b;
-
- /* Make section right. */
- if (section < 0 || section >= ns_s_max)
- goto enodev;
- if ((int)section != (int)handle->_sect) {
- handle->_sect = section;
- handle->_rrnum = 0;
- handle->_ptr = handle->_sections[(int)section];
- }
-
- /* Make rrnum right. */
- if (rrnum == -1)
- rrnum = handle->_rrnum;
- if (rrnum < 0 || rrnum >= handle->_counts[(int)section])
- goto enodev;
- if (rrnum < handle->_rrnum) {
- handle->_rrnum = 0;
- handle->_ptr = handle->_sections[(int)section];
- }
-
- b = skiprr(handle->_msg, handle->_eom, section,
- rrnum - handle->_rrnum);
- if (b < 0)
- return (-1);
- handle->_ptr += b;
- handle->_rrnum = rrnum;
-
- /* Do the parse. */
- b = dn_expand(handle->_msg, handle->_eom,
- handle->_ptr, rr->name, NS_MAXDNAME);
- if (b < 0)
- return (-1);
- handle->_ptr += b;
- if (handle->_ptr + NS_INT16SZ > handle->_eom)
- goto emsgsize;
- NS_GET16(rr->type, handle->_ptr);
- if (handle->_ptr + NS_INT16SZ > handle->_eom)
- goto emsgsize;
- NS_GET16(rr->rr_class, handle->_ptr);
- if (section == ns_s_qd) {
- rr->ttl = 0;
- rr->rdlength = 0;
- rr->rdata = NULL;
- } else {
- if (handle->_ptr + NS_INT32SZ > handle->_eom)
- goto emsgsize;
- NS_GET32(rr->ttl, handle->_ptr);
- if (handle->_ptr + NS_INT16SZ > handle->_eom)
- goto emsgsize;
- NS_GET16(rr->rdlength, handle->_ptr);
- if (handle->_ptr + rr->rdlength > handle->_eom)
- goto emsgsize;
- rr->rdata = handle->_ptr;
- handle->_ptr += rr->rdlength;
- }
- handle->_rrnum++;
-
- /* All done. */
- return (0);
- enodev:
- errno = ENODEV;
- return (-1);
- emsgsize:
- errno = EMSGSIZE;
- return (-1);
-}
diff --git a/newlib/libc/sys/linux/net/ns_print.c b/newlib/libc/sys/linux/net/ns_print.c
deleted file mode 100644
index 7cce6d7aa..000000000
--- a/newlib/libc/sys/linux/net/ns_print.c
+++ /dev/null
@@ -1,744 +0,0 @@
-/*
- * Copyright (c) 1996, 1998 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-/* Import. */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <arpa/inet.h>
-
-#include <assert.h>
-#include <errno.h>
-#include <resolv.h>
-#include <string.h>
-#include <ctype.h>
-
-#define SPRINTF(x) ((size_t)sprintf x)
-
-/* Forward. */
-
-static size_t prune_origin(const char *name, const char *origin);
-static int charstr(const u_char *rdata, const u_char *edata,
- char **buf, size_t *buflen);
-static int addname(const u_char *msg, size_t msglen,
- const u_char **p, const char *origin,
- char **buf, size_t *buflen);
-static void addlen(size_t len, char **buf, size_t *buflen);
-static int addstr(const char *src, size_t len,
- char **buf, size_t *buflen);
-static int addtab(size_t len, size_t target, int spaced,
- char **buf, size_t *buflen);
-
-/* Macros. */
-
-#define T(x) \
- do { \
- if ((x) < 0) \
- return (-1); \
- } while (0)
-
-/* Public. */
-
-/*
- * int
- * ns_sprintrr(handle, rr, name_ctx, origin, buf, buflen)
- * Convert an RR to presentation format.
- * return:
- * Number of characters written to buf, or -1 (check errno).
- */
-int
-ns_sprintrr(const ns_msg *handle, const ns_rr *rr,
- const char *name_ctx, const char *origin,
- char *buf, size_t buflen)
-{
- int n;
-
- n = ns_sprintrrf(ns_msg_base(*handle), ns_msg_size(*handle),
- ns_rr_name(*rr), ns_rr_class(*rr), ns_rr_type(*rr),
- ns_rr_ttl(*rr), ns_rr_rdata(*rr), ns_rr_rdlen(*rr),
- name_ctx, origin, buf, buflen);
- return (n);
-}
-
-/*
- * int
- * ns_sprintrrf(msg, msglen, name, class, type, ttl, rdata, rdlen,
- * name_ctx, origin, buf, buflen)
- * Convert the fields of an RR into presentation format.
- * return:
- * Number of characters written to buf, or -1 (check errno).
- */
-int
-ns_sprintrrf(const u_char *msg, size_t msglen,
- const char *name, ns_class class, ns_type type,
- u_long ttl, const u_char *rdata, size_t rdlen,
- const char *name_ctx, const char *origin,
- char *buf, size_t buflen)
-{
- const char *obuf = buf;
- const u_char *edata = rdata + rdlen;
- int spaced = 0;
-
- const char *comment;
- char tmp[100];
- int len, x;
-
- /*
- * Owner.
- */
- if (name_ctx != NULL && strcasecmp(name_ctx, name) == 0) {
- T(addstr("\t\t\t", 3, &buf, &buflen));
- } else {
- len = prune_origin(name, origin);
- if (len == 0) {
- T(addstr("@\t\t\t", 4, &buf, &buflen));
- } else {
- T(addstr(name, len, &buf, &buflen));
- /* Origin not used and no trailing dot? */
- if ((!origin || !origin[0] || name[len] == '\0') &&
- name[len - 1] != '.') {
- T(addstr(".", 1, &buf, &buflen));
- len++;
- }
- T(spaced = addtab(len, 24, spaced, &buf, &buflen));
- }
- }
-
- /*
- * TTL, Class, Type.
- */
- T(x = ns_format_ttl(ttl, buf, buflen));
- addlen(x, &buf, &buflen);
- len = SPRINTF((tmp, " %s %s", p_class(class), p_type(type)));
- T(addstr(tmp, len, &buf, &buflen));
- T(spaced = addtab(x + len, 16, spaced, &buf, &buflen));
-
- /*
- * RData.
- */
- switch (type) {
- case ns_t_a:
- if (rdlen != NS_INADDRSZ)
- goto formerr;
- (void) inet_ntop(AF_INET, rdata, buf, buflen);
- addlen(strlen(buf), &buf, &buflen);
- break;
-
- case ns_t_cname:
- case ns_t_mb:
- case ns_t_mg:
- case ns_t_mr:
- case ns_t_ns:
- case ns_t_ptr:
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- break;
-
- case ns_t_hinfo:
- case ns_t_isdn:
- /* First word. */
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Second word. */
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- break;
-
- case ns_t_soa: {
- u_long t;
-
- /* Server name. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Administrator name. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- T(addstr(" (\n", 3, &buf, &buflen));
- spaced = 0;
-
- if ((edata - rdata) != 5*NS_INT32SZ)
- goto formerr;
-
- /* Serial number. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- len = SPRINTF((tmp, "%lu", t));
- T(addstr(tmp, len, &buf, &buflen));
- T(spaced = addtab(len, 16, spaced, &buf, &buflen));
- T(addstr("; serial\n", 9, &buf, &buflen));
- spaced = 0;
-
- /* Refresh interval. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- T(len = ns_format_ttl(t, buf, buflen));
- addlen(len, &buf, &buflen);
- T(spaced = addtab(len, 16, spaced, &buf, &buflen));
- T(addstr("; refresh\n", 10, &buf, &buflen));
- spaced = 0;
-
- /* Retry interval. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- T(len = ns_format_ttl(t, buf, buflen));
- addlen(len, &buf, &buflen);
- T(spaced = addtab(len, 16, spaced, &buf, &buflen));
- T(addstr("; retry\n", 8, &buf, &buflen));
- spaced = 0;
-
- /* Expiry. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- T(len = ns_format_ttl(t, buf, buflen));
- addlen(len, &buf, &buflen);
- T(spaced = addtab(len, 16, spaced, &buf, &buflen));
- T(addstr("; expiry\n", 9, &buf, &buflen));
- spaced = 0;
-
- /* Minimum TTL. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- T(addstr("\t\t\t\t\t", 5, &buf, &buflen));
- T(len = ns_format_ttl(t, buf, buflen));
- addlen(len, &buf, &buflen);
- T(addstr(" )", 2, &buf, &buflen));
- T(spaced = addtab(len, 16, spaced, &buf, &buflen));
- T(addstr("; minimum\n", 10, &buf, &buflen));
-
- break;
- }
-
- case ns_t_mx:
- case ns_t_afsdb:
- case ns_t_rt: {
- u_int t;
-
- if (rdlen < NS_INT16SZ)
- goto formerr;
-
- /* Priority. */
- t = ns_get16(rdata);
- rdata += NS_INT16SZ;
- len = SPRINTF((tmp, "%u ", t));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Target. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
-
- break;
- }
-
- case ns_t_px: {
- u_int t;
-
- if (rdlen < NS_INT16SZ)
- goto formerr;
-
- /* Priority. */
- t = ns_get16(rdata);
- rdata += NS_INT16SZ;
- len = SPRINTF((tmp, "%u ", t));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Name1. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Name2. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
-
- break;
- }
-
- case ns_t_x25:
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- break;
-
- case ns_t_txt:
- while (rdata < edata) {
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- if (rdata < edata)
- T(addstr(" ", 1, &buf, &buflen));
- }
- break;
-
- case ns_t_nsap: {
- char t[255*3];
-
- (void) inet_nsap_ntoa(rdlen, rdata, t);
- T(addstr(t, strlen(t), &buf, &buflen));
- break;
- }
-
- case ns_t_aaaa:
- if (rdlen != NS_IN6ADDRSZ)
- goto formerr;
- (void) inet_ntop(AF_INET6, rdata, buf, buflen);
- addlen(strlen(buf), &buf, &buflen);
- break;
-
- case ns_t_loc: {
- char t[255];
-
- /* XXX protocol format checking? */
- (void) loc_ntoa(rdata, t);
- T(addstr(t, strlen(t), &buf, &buflen));
- break;
- }
-
- case ns_t_naptr: {
- u_int order, preference;
- char t[50];
-
- if (rdlen < 2*NS_INT16SZ)
- goto formerr;
-
- /* Order, Precedence. */
- order = ns_get16(rdata); rdata += NS_INT16SZ;
- preference = ns_get16(rdata); rdata += NS_INT16SZ;
- len = SPRINTF((t, "%u %u ", order, preference));
- T(addstr(t, len, &buf, &buflen));
-
- /* Flags. */
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Service. */
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len == 0)
- goto formerr;
- rdata += len;
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Regexp. */
- T(len = charstr(rdata, edata, &buf, &buflen));
- if (len < 0)
- return (-1);
- if (len == 0)
- goto formerr;
- rdata += len;
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Server. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- break;
- }
-
- case ns_t_srv: {
- u_int priority, weight, port;
- char t[50];
-
- if (rdlen < NS_INT16SZ*3)
- goto formerr;
-
- /* Priority, Weight, Port. */
- priority = ns_get16(rdata); rdata += NS_INT16SZ;
- weight = ns_get16(rdata); rdata += NS_INT16SZ;
- port = ns_get16(rdata); rdata += NS_INT16SZ;
- len = SPRINTF((t, "%u %u %u ", priority, weight, port));
- T(addstr(t, len, &buf, &buflen));
-
- /* Server. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- break;
- }
-
- case ns_t_minfo:
- case ns_t_rp:
- /* Name1. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
- T(addstr(" ", 1, &buf, &buflen));
-
- /* Name2. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
-
- break;
-
- case ns_t_wks: {
- int n, lcnt;
-
- if (rdlen < NS_INT32SZ + 1)
- goto formerr;
-
- /* Address. */
- (void) inet_ntop(AF_INET, rdata, buf, buflen);
- addlen(strlen(buf), &buf, &buflen);
- rdata += NS_INADDRSZ;
-
- /* Protocol. */
- len = SPRINTF((tmp, " %u ( ", *rdata));
- T(addstr(tmp, len, &buf, &buflen));
- rdata += NS_INT8SZ;
-
- /* Bit map. */
- n = 0;
- lcnt = 0;
- while (rdata < edata) {
- u_int c = *rdata++;
- do {
- if (c & 0200) {
- if (lcnt == 0) {
- T(addstr("\n\t\t\t\t", 5,
- &buf, &buflen));
- lcnt = 10;
- spaced = 0;
- }
- len = SPRINTF((tmp, "%d ", n));
- T(addstr(tmp, len, &buf, &buflen));
- lcnt--;
- }
- c <<= 1;
- } while (++n & 07);
- }
- T(addstr(")", 1, &buf, &buflen));
-
- break;
- }
-
- case ns_t_key: {
- char base64_key[NS_MD5RSA_MAX_BASE64];
- u_int keyflags, protocol, algorithm;
- const char *leader;
- int n;
-
- if (rdlen < NS_INT16SZ + NS_INT8SZ + NS_INT8SZ)
- goto formerr;
-
- /* Key flags, Protocol, Algorithm. */
- keyflags = ns_get16(rdata); rdata += NS_INT16SZ;
- protocol = *rdata++;
- algorithm = *rdata++;
- len = SPRINTF((tmp, "0x%04x %u %u",
- keyflags, protocol, algorithm));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Public key data. */
- len = b64_ntop(rdata, edata - rdata,
- base64_key, sizeof base64_key);
- if (len < 0)
- goto formerr;
- if (len > 15) {
- T(addstr(" (", 2, &buf, &buflen));
- leader = "\n\t\t";
- spaced = 0;
- } else
- leader = " ";
- for (n = 0; n < len; n += 48) {
- T(addstr(leader, strlen(leader), &buf, &buflen));
- T(addstr(base64_key + n, MIN(len - n, 48),
- &buf, &buflen));
- }
- if (len > 15)
- T(addstr(" )", 2, &buf, &buflen));
-
- break;
- }
-
- case ns_t_sig: {
- char base64_key[NS_MD5RSA_MAX_BASE64];
- u_int type, algorithm, labels, footprint;
- const char *leader;
- u_long t;
- int n;
-
- if (rdlen < 22)
- goto formerr;
-
- /* Type covered, Algorithm, Label count, Original TTL. */
- type = ns_get16(rdata); rdata += NS_INT16SZ;
- algorithm = *rdata++;
- labels = *rdata++;
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- len = SPRINTF((tmp, " %s %d %lu ",
- p_type(type), algorithm, t));
- T(addstr(tmp, len, &buf, &buflen));
- if (labels != (u_int)dn_count_labels(name))
- goto formerr;
-
- /* Signature expiry. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- len = SPRINTF((tmp, "%s ", p_secstodate(t)));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Time signed. */
- t = ns_get32(rdata); rdata += NS_INT32SZ;
- len = SPRINTF((tmp, "%s ", p_secstodate(t)));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Signature Footprint. */
- footprint = ns_get16(rdata); rdata += NS_INT16SZ;
- len = SPRINTF((tmp, "%u ", footprint));
- T(addstr(tmp, len, &buf, &buflen));
-
- /* Signer's name. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
-
- /* Signature. */
- len = b64_ntop(rdata, edata - rdata,
- base64_key, sizeof base64_key);
- if (len > 15) {
- T(addstr(" (", 2, &buf, &buflen));
- leader = "\n\t\t";
- spaced = 0;
- } else
- leader = " ";
- if (len < 0)
- goto formerr;
- for (n = 0; n < len; n += 48) {
- T(addstr(leader, strlen(leader), &buf, &buflen));
- T(addstr(base64_key + n, MIN(len - n, 48),
- &buf, &buflen));
- }
- if (len > 15)
- T(addstr(" )", 2, &buf, &buflen));
-
- break;
- }
-
- case ns_t_nxt: {
- int n, c;
-
- /* Next domain name. */
- T(addname(msg, msglen, &rdata, origin, &buf, &buflen));
-
- /* Type bit map. */
- n = edata - rdata;
- for (c = 0; c < n*8; c++)
- if (NS_NXT_BIT_ISSET(c, rdata)) {
- len = SPRINTF((tmp, " %s", p_type(c)));
- T(addstr(tmp, len, &buf, &buflen));
- }
- break;
- }
-
- default:
- comment = "unknown RR type";
- goto hexify;
- }
- return (buf - obuf);
- formerr:
- comment = "RR format error";
- hexify: {
- int n, m;
- char *p;
-
- len = SPRINTF((tmp, "\\#(\t\t; %s", comment));
- T(addstr(tmp, len, &buf, &buflen));
- while (rdata < edata) {
- p = tmp;
- p += SPRINTF((p, "\n\t"));
- spaced = 0;
- n = MIN(16, edata - rdata);
- for (m = 0; m < n; m++)
- p += SPRINTF((p, "%02x ", rdata[m]));
- T(addstr(tmp, p - tmp, &buf, &buflen));
- if (n < 16) {
- T(addstr(")", 1, &buf, &buflen));
- T(addtab(p - tmp + 1, 48, spaced, &buf, &buflen));
- }
- p = tmp;
- p += SPRINTF((p, "; "));
- for (m = 0; m < n; m++)
- *p++ = (isascii(rdata[m]) && isprint(rdata[m]))
- ? rdata[m]
- : '.';
- T(addstr(tmp, p - tmp, &buf, &buflen));
- rdata += n;
- }
- return (buf - obuf);
- }
-}
-
-/* Private. */
-
-/*
- * size_t
- * prune_origin(name, origin)
- * Find out if the name is at or under the current origin.
- * return:
- * Number of characters in name before start of origin,
- * or length of name if origin does not match.
- * notes:
- * This function should share code with samedomain().
- */
-static size_t
-prune_origin(const char *name, const char *origin) {
- const char *oname = name;
-
- while (*name != '\0') {
- if (origin != NULL && strcasecmp(name, origin) == 0)
- return (name - oname - (name > oname));
- while (*name != '\0') {
- if (*name == '\\') {
- name++;
- /* XXX need to handle \nnn form. */
- if (*name == '\0')
- break;
- } else if (*name == '.') {
- name++;
- break;
- }
- name++;
- }
- }
- return (name - oname);
-}
-
-/*
- * int
- * charstr(rdata, edata, buf, buflen)
- * Format a <character-string> into the presentation buffer.
- * return:
- * Number of rdata octets consumed
- * 0 for protocol format error
- * -1 for output buffer error
- * side effects:
- * buffer is advanced on success.
- */
-static int
-charstr(const u_char *rdata, const u_char *edata, char **buf, size_t *buflen) {
- const u_char *odata = rdata;
- size_t save_buflen = *buflen;
- char *save_buf = *buf;
-
- if (addstr("\"", 1, buf, buflen) < 0)
- goto enospc;
- if (rdata < edata) {
- int n = *rdata;
-
- if (rdata + 1 + n <= edata) {
- rdata++;
- while (n-- > 0) {
- if (strchr("\n\"\\", *rdata) != NULL)
- if (addstr("\\", 1, buf, buflen) < 0)
- goto enospc;
- if (addstr((const char *)rdata, 1,
- buf, buflen) < 0)
- goto enospc;
- rdata++;
- }
- }
- }
- if (addstr("\"", 1, buf, buflen) < 0)
- goto enospc;
- return (rdata - odata);
- enospc:
- errno = ENOSPC;
- *buf = save_buf;
- *buflen = save_buflen;
- return (-1);
-}
-
-static int
-addname(const u_char *msg, size_t msglen,
- const u_char **pp, const char *origin,
- char **buf, size_t *buflen)
-{
- size_t newlen, save_buflen = *buflen;
- char *save_buf = *buf;
- int n;
-
- n = dn_expand(msg, msg + msglen, *pp, *buf, *buflen);
- if (n < 0)
- goto enospc; /* Guess. */
- newlen = prune_origin(*buf, origin);
- if ((origin == NULL || origin[0] == '\0' || (*buf)[newlen] == '\0') &&
- (newlen == 0 || (*buf)[newlen - 1] != '.')) {
- /* No trailing dot. */
- if (newlen + 2 > *buflen)
- goto enospc; /* No room for ".\0". */
- (*buf)[newlen++] = '.';
- (*buf)[newlen] = '\0';
- }
- if (newlen == 0) {
- /* Use "@" instead of name. */
- if (newlen + 2 > *buflen)
- goto enospc; /* No room for "@\0". */
- (*buf)[newlen++] = '@';
- (*buf)[newlen] = '\0';
- }
- *pp += n;
- addlen(newlen, buf, buflen);
- **buf = '\0';
- return (newlen);
- enospc:
- errno = ENOSPC;
- *buf = save_buf;
- *buflen = save_buflen;
- return (-1);
-}
-
-static void
-addlen(size_t len, char **buf, size_t *buflen) {
- assert(len <= *buflen);
- *buf += len;
- *buflen -= len;
-}
-
-static int
-addstr(const char *src, size_t len, char **buf, size_t *buflen) {
- if (len > *buflen) {
- errno = ENOSPC;
- return (-1);
- }
- memcpy(*buf, src, len);
- addlen(len, buf, buflen);
- **buf = '\0';
- return (0);
-}
-
-static int
-addtab(size_t len, size_t target, int spaced, char **buf, size_t *buflen) {
- size_t save_buflen = *buflen;
- char *save_buf = *buf;
- int t;
-
- if (spaced || len >= target - 1) {
- T(addstr(" ", 2, buf, buflen));
- spaced = 1;
- } else {
- for (t = (target - len - 1) / 8; t >= 0; t--)
- if (addstr("\t", 1, buf, buflen) < 0) {
- *buflen = save_buflen;
- *buf = save_buf;
- return (-1);
- }
- spaced = 0;
- }
- return (spaced);
-}
diff --git a/newlib/libc/sys/linux/net/ns_ttl.c b/newlib/libc/sys/linux/net/ns_ttl.c
deleted file mode 100644
index 63dbefb59..000000000
--- a/newlib/libc/sys/linux/net/ns_ttl.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-/* Import. */
-
-#include <arpa/nameser.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#define SPRINTF(x) ((size_t)sprintf x)
-
-/* Forward. */
-
-static int fmt1(int t, char s, char **buf, size_t *buflen);
-
-/* Macros. */
-
-#define T(x) if ((x) < 0) return (-1); else (void)NULL
-
-/* Public. */
-
-int
-ns_format_ttl(u_long src, char *dst, size_t dstlen) {
- char *odst = dst;
- int secs, mins, hours, days, weeks, x;
- char *p;
-
- secs = src % 60; src /= 60;
- mins = src % 60; src /= 60;
- hours = src % 24; src /= 24;
- days = src % 7; src /= 7;
- weeks = src; src = 0;
-
- x = 0;
- if (weeks) {
- T(fmt1(weeks, 'W', &dst, &dstlen));
- x++;
- }
- if (days) {
- T(fmt1(days, 'D', &dst, &dstlen));
- x++;
- }
- if (hours) {
- T(fmt1(hours, 'H', &dst, &dstlen));
- x++;
- }
- if (mins) {
- T(fmt1(mins, 'M', &dst, &dstlen));
- x++;
- }
- if (secs || !(weeks || days || hours || mins)) {
- T(fmt1(secs, 'S', &dst, &dstlen));
- x++;
- }
-
- if (x > 1) {
- int ch;
-
- for (p = odst; (ch = *p) != '\0'; p++)
- if (isascii(ch) && isupper(ch))
- *p = tolower(ch);
- }
-
- return (dst - odst);
-}
-
-int
-ns_parse_ttl(const char *src, u_long *dst) {
- u_long ttl, tmp;
- int ch, digits, dirty;
-
- ttl = 0;
- tmp = 0;
- digits = 0;
- dirty = 0;
- while ((ch = *src++) != '\0') {
- if (!isascii(ch) || !isprint(ch))
- goto einval;
- if (isdigit(ch)) {
- tmp *= 10;
- tmp += (ch - '0');
- digits++;
- continue;
- }
- if (digits == 0)
- goto einval;
- if (islower(ch))
- ch = toupper(ch);
- switch (ch) {
- case 'W': tmp *= 7;
- case 'D': tmp *= 24;
- case 'H': tmp *= 60;
- case 'M': tmp *= 60;
- case 'S': break;
- default: goto einval;
- }
- ttl += tmp;
- tmp = 0;
- digits = 0;
- dirty = 1;
- }
- if (digits > 0) {
- if (dirty)
- goto einval;
- else
- ttl += tmp;
- }
- *dst = ttl;
- return (0);
-
- einval:
- errno = EINVAL;
- return (-1);
-}
-
-/* Private. */
-
-static int
-fmt1(int t, char s, char **buf, size_t *buflen) {
- char tmp[50];
- size_t len;
-
- len = SPRINTF((tmp, "%d%c", t, s));
- if (len + 1 > *buflen)
- return (-1);
- strcpy(*buf, tmp);
- *buf += len;
- *buflen -= len;
- return (0);
-}
diff --git a/newlib/libc/sys/linux/net/nsap_addr.c b/newlib/libc/sys/linux/net/nsap_addr.c
deleted file mode 100644
index b6651488b..000000000
--- a/newlib/libc/sys/linux/net/nsap_addr.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 1996, 1998 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <resolv.h>
-
-static char
-xtob(c)
- int c;
-{
- return (c - (((c >= '0') && (c <= '9')) ? '0' : '7'));
-}
-
-u_int
-inet_nsap_addr(ascii, binary, maxlen)
- const char *ascii;
- u_char *binary;
- int maxlen;
-{
- u_char c, nib;
- u_int len = 0;
-
- while ((c = *ascii++) != '\0' && len < (u_int)maxlen) {
- if (c == '.' || c == '+' || c == '/')
- continue;
- if (!isascii(c))
- return (0);
- if (islower(c))
- c = toupper(c);
- if (isxdigit(c)) {
- nib = xtob(c);
- c = *ascii++;
- if (c != '\0') {
- c = toupper(c);
- if (isxdigit(c)) {
- *binary++ = (nib << 4) | xtob(c);
- len++;
- } else
- return (0);
- }
- else
- return (0);
- }
- else
- return (0);
- }
- return (len);
-}
-
-char *
-inet_nsap_ntoa(binlen, binary, ascii)
- int binlen;
- const u_char *binary;
- char *ascii;
-{
- int nib;
- int i;
- static char tmpbuf[255*3];
- char *start;
-
- if (ascii)
- start = ascii;
- else {
- ascii = tmpbuf;
- start = tmpbuf;
- }
-
- if (binlen > 255)
- binlen = 255;
-
- for (i = 0; i < binlen; i++) {
- nib = *binary >> 4;
- *ascii++ = nib + (nib < 10 ? '0' : '7');
- nib = *binary++ & 0x0f;
- *ascii++ = nib + (nib < 10 ? '0' : '7');
- if (((i % 2) == 0 && (i + 1) < binlen))
- *ascii++ = '.';
- }
- *ascii = '\0';
- return (start);
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <arpa/inet.h>.
- */
-#undef inet_nsap_addr
-__weak_reference(__inet_nsap_addr, inet_nsap_addr);
-#undef inet_nsap_ntoa
-__weak_reference(__inet_nsap_ntoa, inet_nsap_ntoa);
diff --git a/newlib/libc/sys/linux/net/nsdispatch.3 b/newlib/libc/sys/linux/net/nsdispatch.3
deleted file mode 100644
index 708f97cba..000000000
--- a/newlib/libc/sys/linux/net/nsdispatch.3
+++ /dev/null
@@ -1,231 +0,0 @@
-.\" $NetBSD: nsdispatch.3,v 1.8 1999/03/22 19:44:53 garbled Exp $
-.\" $FreeBSD: src/lib/libc/net/nsdispatch.3,v 1.5 2001/10/01 16:08:56 ru Exp $
-.\"
-.\" Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" This code is derived from software contributed to The NetBSD Foundation
-.\" by Luke Mewburn.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the 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
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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.
-.\"
-.Dd January 19, 1999
-.Dt NSDISPATCH 3
-.Os
-.Sh NAME
-.Nm nsdispatch
-.Nd name-service switch dispatcher routine
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In nsswitch.h
-.Ft int
-.Fo nsdispatch
-.Fa "void *retval"
-.Fa "const ns_dtab dtab[]"
-.Fa "const char *database"
-.Fa "const char *method"
-.Fa "const ns_src defaults[]"
-.Fa "..."
-.Fc
-.Sh DESCRIPTION
-The
-.Fn nsdispatch
-function invokes the callback functions specified in
-.Va dtab
-in the order given in
-.Pa /etc/nsswitch.conf
-for the database
-.Va database
-until a successful entry is found.
-.Pp
-.Va retval
-is passed to each callback function to modify as necessary
-(to pass back to the caller of
-.Fn nsdispatch )
-.Pp
-.Va dtab
-is an array of
-.Va ns_dtab
-structures, which have the following format:
-.Bd -literal -offset indent
-typedef struct {
- const char *src;
- int (*cb)(void *retval, void *cb_data, va_list ap);
- void *cb_data;
-} ns_dtab;
-.Ed
-.Pp
-.Bd -ragged -offset indent
-For each source type that is implemented, an entry with
-.Va src
-set to the name of the source,
-.Va cb
-defined as a function which handles that source, and
-.Va cb_data
-is used to pass arbritrary data to the callback function.
-The last entry in
-.Va dtab
-should contain
-.Dv NULL
-values for
-.Va src ,
-.Va cb ,
-and
-.Va cb_data .
-.Ed
-.Pp
-.Va method
-is usually the name of the function calling
-.Fn nsdispatch .
-When dynamic loading is supported, a symbol constructed from
-.Va database ,
-the current source, and
-.Va method
-will be used as the name to invoke the dynamically loaded function.
-.Pp
-.Va defaults
-contains a list of default sources to try in the case of
-a missing or corrupt
-.Xr nsswitch.conf 5 ,
-or if there isn't a relevant entry for
-.Va database .
-It is an array of
-.Va ns_src
-structures, which have the following format:
-.Bd -literal -offset indent
-typedef struct {
- const char *src;
- u_int32_t flags;
-} ns_src;
-.Ed
-.Pp
-.Bd -ragged -offset indent
-For each default source type, an entry with
-.Va src
-set to the name of the source, and
-.Va flags
-set to the relevant flags
-(usually
-.Dv NS_SUCCESS ;
-refer to
-.Sx Callback return values
-for more information).
-The last entry in
-.Va defaults
-should have
-.Va src
-set to
-.Dv NULL
-and
-.Va flags
-set to 0.
-.Pp
-For convenience, a global variable defined as:
-.Dl extern const ns_src __nsdefaultsrc[];
-exists which contains a single default entry for
-.Sq files
-for use by callers which don't require complicated default rules.
-.Ed
-.Pp
-.Sq Va ...
-are optional extra arguments, which
-are passed to the appropriate callback function as a variable argument
-list of the type
-.Va va_list .
-.Ss Valid source types
-Whilst there is support for arbitrary sources, the following
-#defines for commonly implementated sources are available:
-.Bl -column NS_COMPAT COMPAT -offset indent
-.It Sy "#define value"
-.It "NSSRC_FILES ""files"""
-.It "NSSRC_DNS ""dns"""
-.It "NSSRC_NIS ""nis"""
-.It "NSSRC_COMPAT ""compat"""
-.El
-.Pp
-Refer to
-.Xr nsswitch.conf 5
-for a complete description of what each source type is.
-.Pp
-.Ss Callback return values
-The callback functions should return one of the following values
-depending upon status of the lookup:
-.Bl -column NS_NOTFOUND -offset indent
-.It Sy "Return value Status code"
-.It "NS_SUCCESS success"
-.It "NS_NOTFOUND notfound"
-.It "NS_UNAVAIL unavail"
-.It "NS_TRYAGAIN tryagain"
-.El
-.Pp
-Refer to
-.Xr nsswitch.conf 5
-for a complete description of what each status code is.
-.Pp
-.Nm
-returns the value of the callback that caused the dispatcher to finish,
-or NS_NOTFOUND otherwise.
-.Sh SEE ALSO
-.Xr hesiod 3 ,
-.Xr stdarg 3 ,
-.Xr ypclnt 3 ,
-.Xr nsswitch.conf 5
-.Sh HISTORY
-The
-.Nm
-routines first appeared in
-.Fx 4.1 .
-They were imported from the
-.Nx
-Project,
-where they appeared first in
-.Nx 1.4 .
-.Sh AUTHORS
-Luke Mewburn
-.Aq lukem@netbsd.org
-wrote this freely distributable name-service switch implementation,
-using ideas from the
-.Tn ULTRIX
-.Xr svc.conf 5
-and
-.Tn Solaris
-.Xr nsswitch.conf 4
-manual pages.
-.Sh BUGS
-The
-.Nm
-routines are not thread safe.
-This will be rectified in the future.
-.Pp
-Currently there is no support for dynamically loadable dispatcher callback
-functions.
-It is anticipated that this will be added in the future in the back-end
-without requiring changes to code that invokes
-.Fn nsdispatch .
diff --git a/newlib/libc/sys/linux/net/nsdispatch.c b/newlib/libc/sys/linux/net/nsdispatch.c
deleted file mode 100644
index ea5fc6d4b..000000000
--- a/newlib/libc/sys/linux/net/nsdispatch.c
+++ /dev/null
@@ -1,266 +0,0 @@
-/* $NetBSD: nsdispatch.c,v 1.9 1999/01/25 00:16:17 lukem Exp $ */
-
-/*-
- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Luke Mewburn.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the 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
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <fcntl.h>
-#define _NS_PRIVATE
-#include <nsswitch.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-/*
- * default sourcelist: `files'
- */
-const ns_src __nsdefaultsrc[] = {
- { NSSRC_FILES, NS_SUCCESS },
- { 0 },
-};
-
-
-static int _nsmapsize = 0;
-static ns_dbt *_nsmap = NULL;
-
-/*
- * size of dynamic array chunk for _nsmap and _nsmap[x].srclist
- */
-#define NSELEMSPERCHUNK 8
-
-
-int _nscmp(const void *, const void *);
-
-
-int
-_nscmp(a, b)
- const void *a;
- const void *b;
-{
- return (strcasecmp(((const ns_dbt *)a)->name,
- ((const ns_dbt *)b)->name));
-}
-
-
-void
-_nsdbtaddsrc(dbt, src)
- ns_dbt *dbt;
- const ns_src *src;
-{
- if ((dbt->srclistsize % NSELEMSPERCHUNK) == 0) {
- dbt->srclist = (ns_src *)realloc(dbt->srclist,
- (dbt->srclistsize + NSELEMSPERCHUNK) * sizeof(ns_src));
- if (dbt->srclist == NULL)
- printf("nsdispatch: memory allocation failure\n");
- }
- memmove(&dbt->srclist[dbt->srclistsize++], src, sizeof(ns_src));
-}
-
-
-void
-_nsdbtdump(dbt)
- const ns_dbt *dbt;
-{
- int i;
-
- printf("%s (%d source%s):", dbt->name, dbt->srclistsize,
- dbt->srclistsize == 1 ? "" : "s");
- for (i = 0; i < dbt->srclistsize; i++) {
- printf(" %s", dbt->srclist[i].name);
- if (!(dbt->srclist[i].flags &
- (NS_UNAVAIL|NS_NOTFOUND|NS_TRYAGAIN)) &&
- (dbt->srclist[i].flags & NS_SUCCESS))
- continue;
- printf(" [");
- if (!(dbt->srclist[i].flags & NS_SUCCESS))
- printf(" SUCCESS=continue");
- if (dbt->srclist[i].flags & NS_UNAVAIL)
- printf(" UNAVAIL=return");
- if (dbt->srclist[i].flags & NS_NOTFOUND)
- printf(" NOTFOUND=return");
- if (dbt->srclist[i].flags & NS_TRYAGAIN)
- printf(" TRYAGAIN=return");
- printf(" ]");
- }
- printf("\n");
-}
-
-
-const ns_dbt *
-_nsdbtget(name)
- const char *name;
-{
- static time_t confmod;
-
- struct stat statbuf;
- ns_dbt dbt;
-
- extern FILE *_nsyyin;
- extern int _nsyyparse(void);
-
- dbt.name = name;
-
- if (confmod) {
- if (stat(_PATH_NS_CONF, &statbuf) == -1)
- return (NULL);
- if (confmod < statbuf.st_mtime) {
- int i, j;
-
- for (i = 0; i < _nsmapsize; i++) {
- for (j = 0; j < _nsmap[i].srclistsize; j++) {
- if (_nsmap[i].srclist[j].name != NULL) {
- /*LINTED const cast*/
- free((void *)
- _nsmap[i].srclist[j].name);
- }
- }
- if (_nsmap[i].srclist)
- free(_nsmap[i].srclist);
- if (_nsmap[i].name) {
- /*LINTED const cast*/
- free((void *)_nsmap[i].name);
- }
- }
- if (_nsmap)
- free(_nsmap);
- _nsmap = NULL;
- _nsmapsize = 0;
- confmod = 0;
- }
- }
- if (!confmod) {
- if (stat(_PATH_NS_CONF, &statbuf) == -1)
- return (NULL);
- _nsyyin = fopen(_PATH_NS_CONF, "r");
- if (_nsyyin == NULL)
- return (NULL);
- _nsyyparse();
- (void)fclose(_nsyyin);
- qsort(_nsmap, (size_t)_nsmapsize, sizeof(ns_dbt), _nscmp);
- confmod = statbuf.st_mtime;
- }
- return (bsearch(&dbt, _nsmap, (size_t)_nsmapsize, sizeof(ns_dbt),
- _nscmp));
-}
-
-
-void
-_nsdbtput(dbt)
- const ns_dbt *dbt;
-{
- int i;
-
- for (i = 0; i < _nsmapsize; i++) {
- if (_nscmp(dbt, &_nsmap[i]) == 0) {
- /* overwrite existing entry */
- if (_nsmap[i].srclist != NULL)
- free(_nsmap[i].srclist);
- memmove(&_nsmap[i], dbt, sizeof(ns_dbt));
- return;
- }
- }
-
- if ((_nsmapsize % NSELEMSPERCHUNK) == 0) {
- _nsmap = (ns_dbt *)realloc(_nsmap,
- (_nsmapsize + NSELEMSPERCHUNK) * sizeof(ns_dbt));
- if (_nsmap == NULL)
- printf("nsdispatch: memory allocation failure\n");
- }
- memmove(&_nsmap[_nsmapsize++], dbt, sizeof(ns_dbt));
-}
-
-
-int
-#if __STDC__
-nsdispatch(void *retval, const ns_dtab disp_tab[], const char *database,
- const char *method, const ns_src defaults[], ...)
-#else
-nsdispatch(retval, disp_tab, database, method, defaults, va_alist)
- void *retval;
- const ns_dtab disp_tab[];
- const char *database;
- const char *method;
- const ns_src defaults[];
- va_dcl
-#endif
-{
- va_list ap;
- int i, curdisp, result;
- const ns_dbt *dbt;
- const ns_src *srclist;
- int srclistsize;
-
- dbt = _nsdbtget(database);
- if (dbt != NULL) {
- srclist = dbt->srclist;
- srclistsize = dbt->srclistsize;
- } else {
- srclist = defaults;
- srclistsize = 0;
- while (srclist[srclistsize].name != NULL)
- srclistsize++;
- }
- result = 0;
-
- for (i = 0; i < srclistsize; i++) {
- for (curdisp = 0; disp_tab[curdisp].src != NULL; curdisp++)
- if (strcasecmp(disp_tab[curdisp].src,
- srclist[i].name) == 0)
- break;
- result = 0;
- if (disp_tab[curdisp].callback) {
-#if __STDC__
- va_start(ap, defaults);
-#else
- va_start(ap);
-#endif
- result = disp_tab[curdisp].callback(retval,
- disp_tab[curdisp].cb_data, ap);
- va_end(ap);
- if (result & srclist[i].flags) {
- break;
- }
- }
- }
- return (result ? result : NS_NOTFOUND);
-}
diff --git a/newlib/libc/sys/linux/net/nslexer.c b/newlib/libc/sys/linux/net/nslexer.c
deleted file mode 100644
index 3f6ba4dcd..000000000
--- a/newlib/libc/sys/linux/net/nslexer.c
+++ /dev/null
@@ -1,1712 +0,0 @@
-#define yy_create_buffer _nsyy_create_buffer
-#define yy_delete_buffer _nsyy_delete_buffer
-#define yy_scan_buffer _nsyy_scan_buffer
-#define yy_scan_string _nsyy_scan_string
-#define yy_scan_bytes _nsyy_scan_bytes
-#define yy_flex_debug _nsyy_flex_debug
-#define yy_init_buffer _nsyy_init_buffer
-#define yy_flush_buffer _nsyy_flush_buffer
-#define yy_load_buffer_state _nsyy_load_buffer_state
-#define yy_switch_to_buffer _nsyy_switch_to_buffer
-#define yyin _nsyyin
-#define yyleng _nsyyleng
-#define yylex _nsyylex
-#define yyout _nsyyout
-#define yyrestart _nsyyrestart
-#define yytext _nsyytext
-#define yylineno _nsyylineno
-#define yywrap _nsyywrap
-
-/* A lexical scanner generated by flex */
-
-/* Scanner skeleton version:
- * $Header$
- */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-
-#include <stdio.h>
-#include <unistd.h>
-
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include <stdlib.h>
-
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif /* __STDC__ */
-#endif /* ! __cplusplus */
-
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition. This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state. The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define YY_BUF_SIZE 1024
-
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
-extern int yyleng;
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator). This
- * avoids problems with code like:
- *
- * if ( condition_holds )
- * yyless( 5 );
- * else
- * do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- *yy_cp = yy_hold_char; \
- YY_RESTORE_YY_MORE_OFFSET \
- yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \
- } \
- while ( 0 )
-
-#define unput(c) yyunput( c, yytext_ptr )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
-
-
-struct yy_buffer_state
- {
- FILE *yy_input_file;
-
- char *yy_ch_buf; /* input buffer */
- char *yy_buf_pos; /* current position in input buffer */
-
- /* Size of input buffer in bytes, not including room for EOB
- * characters.
- */
- yy_size_t yy_buf_size;
-
- /* Number of characters read into yy_ch_buf, not including EOB
- * characters.
- */
- int yy_n_chars;
-
- /* Whether we "own" the buffer - i.e., we know we created it,
- * and can realloc() it to grow it, and should free() it to
- * delete it.
- */
- int yy_is_our_buffer;
-
- /* Whether this is an "interactive" input source; if so, and
- * if we're using stdio for input, then we want to use getc()
- * instead of fread(), to make sure we stop fetching input after
- * each newline.
- */
- int yy_is_interactive;
-
- /* Whether we're considered to be at the beginning of a line.
- * If so, '^' rules will be active on the next match, otherwise
- * not.
- */
- int yy_at_bol;
-
- /* Whether to try to fill the input buffer when we reach the
- * end of it.
- */
- int yy_fill_buffer;
-
- int yy_buffer_status;
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
- /* When an EOF's been seen but there's still some text to process
- * then we mark the buffer as YY_EOF_PENDING, to indicate that we
- * shouldn't try reading from the input source any more. We might
- * still have a bunch of tokens to match, though, because of
- * possible backing-up.
- *
- * When we actually see the EOF, we change the status to "new"
- * (via yyrestart()), so that the user can continue scanning by
- * just pointing yyin at a new input file.
- */
-#define YY_BUFFER_EOF_PENDING 2
- };
-
-static YY_BUFFER_STATE yy_current_buffer = 0;
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
-#define YY_CURRENT_BUFFER yy_current_buffer
-
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-
-
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1; /* whether we need to initialize */
-static int yy_start = 0; /* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin. A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart YY_PROTO(( FILE *input_file ));
-
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
-
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( void * ));
-
-#define yy_new_buffer yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
- { \
- if ( ! yy_current_buffer ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_is_interactive = is_interactive; \
- }
-
-#define yy_set_bol(at_bol) \
- { \
- if ( ! yy_current_buffer ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_at_bol = at_bol; \
- }
-
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
-
-#define YY_USES_REJECT
-typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-typedef int yy_state_type;
-extern int yylineno;
-int yylineno = 1;
-extern char *yytext;
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
- yytext_ptr = yy_bp; \
- yyleng = (int) (yy_cp - yy_bp); \
- yy_hold_char = *yy_cp; \
- *yy_cp = '\0'; \
- yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 13
-#define YY_END_OF_BUFFER 14
-static yyconst short int yy_acclist[83] =
- { 0,
- 14, 12, 13, 1, 12, 13, 4, 13, 2, 12,
- 13, 11, 12, 13, 11, 12, 13, 11, 12, 13,
- 11, 12, 13, 11, 12, 13, 11, 12, 13, 11,
- 12, 13, 12, 13, 1, 2, 11, 11, 11, 11,
- 11, 11, 11, 3, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 9, 11, 11, 11, 11, 11,
- 11, 5, 11, 11, 6, 11, 10, 11, 7, 11,
- 8, 11
- } ;
-
-static yyconst short int yy_accept[60] =
- { 0,
- 1, 1, 1, 2, 4, 7, 9, 12, 15, 18,
- 21, 24, 27, 30, 33, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, 61, 62, 63, 64, 65, 67, 68, 69, 70,
- 71, 72, 74, 75, 77, 79, 81, 83, 83
- } ;
-
-static yyconst int yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 1, 1, 4, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 1, 1, 1,
- 1, 1, 1, 1, 6, 7, 8, 9, 10, 11,
- 12, 7, 13, 7, 7, 14, 7, 15, 16, 7,
- 7, 17, 18, 19, 20, 21, 7, 7, 22, 7,
- 1, 23, 1, 1, 5, 1, 6, 7, 8, 9,
-
- 10, 11, 12, 7, 13, 7, 7, 14, 7, 15,
- 16, 7, 7, 17, 18, 19, 20, 21, 7, 7,
- 22, 7, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1
- } ;
-
-static yyconst int yy_meta[24] =
- { 0,
- 1, 1, 2, 1, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 1
- } ;
-
-static yyconst short int yy_base[61] =
- { 0,
- 0, 0, 68, 69, 65, 69, 0, 0, 50, 49,
- 54, 43, 45, 46, 57, 57, 0, 0, 43, 38,
- 37, 47, 32, 47, 69, 33, 40, 30, 41, 42,
- 26, 33, 29, 27, 33, 30, 35, 25, 19, 23,
- 19, 30, 22, 14, 18, 0, 14, 18, 16, 19,
- 19, 0, 12, 0, 0, 0, 0, 69, 23, 22
- } ;
-
-static yyconst short int yy_def[61] =
- { 0,
- 58, 1, 58, 58, 58, 58, 59, 60, 60, 60,
- 60, 60, 60, 60, 58, 58, 59, 60, 60, 60,
- 60, 60, 60, 60, 58, 60, 60, 60, 60, 60,
- 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
- 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
- 60, 60, 60, 60, 60, 60, 60, 0, 58, 58
- } ;
-
-static yyconst short int yy_nxt[93] =
- { 0,
- 4, 5, 6, 7, 4, 8, 8, 9, 8, 8,
- 8, 8, 8, 8, 10, 8, 11, 12, 13, 14,
- 8, 8, 15, 17, 18, 17, 57, 56, 55, 54,
- 53, 52, 51, 50, 49, 48, 47, 46, 45, 44,
- 43, 42, 41, 40, 39, 38, 37, 36, 35, 34,
- 33, 32, 31, 30, 29, 28, 27, 26, 16, 25,
- 24, 23, 22, 21, 20, 19, 16, 58, 3, 58,
- 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
- 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
- 58, 58
-
- } ;
-
-static yyconst short int yy_chk[93] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 59, 60, 59, 53, 51, 50, 49,
- 48, 47, 45, 44, 43, 42, 41, 40, 39, 38,
- 37, 36, 35, 34, 33, 32, 31, 30, 29, 28,
- 27, 26, 24, 23, 22, 21, 20, 19, 16, 15,
- 14, 13, 12, 11, 10, 9, 5, 3, 58, 58,
- 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
- 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
- 58, 58
-
- } ;
-
-static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
-static char *yy_full_match;
-static int yy_lp;
-#define REJECT \
-{ \
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
-yy_cp = yy_full_match; /* restore poss. backed-over text */ \
-++yy_lp; \
-goto find_rule; \
-}
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "nslexer.l"
-#define INITIAL 0
-#line 2 "nslexer.l"
-/* $NetBSD: nslexer.l,v 1.3 1999/01/25 00:16:17 lukem Exp $ */
-
-/*-
- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Luke Mewburn.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the 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
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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 <stdio.h>
-#include <sys/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid =
- "$FreeBSD: src/lib/libc/net/nslexer.l,v 1.3 2001/11/11 02:48:09 bde Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <ctype.h>
-#define _NS_PRIVATE
-#include <nsswitch.h>
-#include <string.h>
-
-#include "nsparser.h"
-
-#define YY_NO_UNPUT
-
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
-#else
-extern int yywrap YY_PROTO(( void ));
-#endif
-#endif
-
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
-
-#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
-#endif
-
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines. This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
- if ( yy_current_buffer->yy_is_interactive ) \
- { \
- int c = '*', n; \
- for ( n = 0; n < max_size && \
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
- buf[n] = (char) c; \
- if ( c == '\n' ) \
- buf[n++] = (char) c; \
- if ( c == EOF && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- result = n; \
- } \
- else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
- && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" );
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL int yylex YY_PROTO(( void ))
-#endif
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
- YY_USER_ACTION
-
-YY_DECL
- {
- register yy_state_type yy_current_state;
- register char *yy_cp = NULL, *yy_bp = NULL;
- register int yy_act;
-
-#line 65 "nslexer.l"
-
-
-
- if ( yy_init )
- {
- yy_init = 0;
-
-#ifdef YY_USER_INIT
- YY_USER_INIT;
-#endif
-
- if ( ! yy_start )
- yy_start = 1; /* first start state */
-
- if ( ! yyin )
- yyin = stdin;
-
- if ( ! yyout )
- yyout = stdout;
-
- if ( ! yy_current_buffer )
- yy_current_buffer =
- yy_create_buffer( yyin, YY_BUF_SIZE );
-
- yy_load_buffer_state();
- }
-
- while ( 1 ) /* loops until end-of-file is reached */
- {
- yy_cp = yy_c_buf_p;
-
- /* Support of yytext. */
- *yy_cp = yy_hold_char;
-
- /* yy_bp points to the position in yy_ch_buf of the start of
- * the current run.
- */
- yy_bp = yy_cp;
-
- yy_current_state = yy_start;
- yy_state_ptr = yy_state_buf;
- *yy_state_ptr++ = yy_current_state;
-yy_match:
- do
- {
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 59 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- *yy_state_ptr++ = yy_current_state;
- ++yy_cp;
- }
- while ( yy_base[yy_current_state] != 69 );
-
-yy_find_action:
- yy_current_state = *--yy_state_ptr;
- yy_lp = yy_accept[yy_current_state];
-find_rule: /* we branch to this label when backing up */
- for ( ; ; ) /* until we find what rule we matched */
- {
- if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
- {
- yy_act = yy_acclist[yy_lp];
- {
- yy_full_match = yy_cp;
- break;
- }
- }
- --yy_cp;
- yy_current_state = *--yy_state_ptr;
- yy_lp = yy_accept[yy_current_state];
- }
-
- YY_DO_BEFORE_ACTION;
-
- if ( yy_act != YY_END_OF_BUFFER )
- {
- int yyl;
- for ( yyl = 0; yyl < yyleng; ++yyl )
- if ( yytext[yyl] == '\n' )
- ++yylineno;
- }
-
-do_action: /* This label is used only to access EOF actions. */
-
-
- switch ( yy_act )
- { /* beginning of action switch */
-case 1:
-YY_RULE_SETUP
-#line 67 "nslexer.l"
-; /* skip whitespace */
- YY_BREAK
-case 2:
-YY_RULE_SETUP
-#line 69 "nslexer.l"
-; /* skip comments */
- YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 71 "nslexer.l"
-; /* allow continuation */
- YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 73 "nslexer.l"
-return NL;
- YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 75 "nslexer.l"
-return SUCCESS;
- YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 76 "nslexer.l"
-return UNAVAIL;
- YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 77 "nslexer.l"
-return NOTFOUND;
- YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 78 "nslexer.l"
-return TRYAGAIN;
- YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 80 "nslexer.l"
-return RETURN;
- YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 81 "nslexer.l"
-return CONTINUE;
- YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 83 "nslexer.l"
-{
- char *p;
- int i;
- size_t len;
-
- len = strlen (yytext) + 1;
- if ((p = malloc (len)) == NULL)
- printf("nsdispatch: memory allocation failure\n");
- else
- memcpy (p, yytext, len);
-
- for (i = 0; i < strlen(p); i++) {
- if (isupper((unsigned char)p[i]))
- p[i] = tolower((unsigned char)p[i]);
- }
- _nsyylval.str = p;
- return STRING;
- }
- YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 99 "nslexer.l"
-return yytext[0];
- YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 101 "nslexer.l"
-ECHO;
- YY_BREAK
- case YY_STATE_EOF(INITIAL):
- yyterminate();
-
- case YY_END_OF_BUFFER:
- {
- /* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
-
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = yy_hold_char;
- YY_RESTORE_YY_MORE_OFFSET
-
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
- {
- /* We're scanning a new file or input source. It's
- * possible that this happened because the user
- * just pointed yyin at a new source and called
- * yylex(). If so, then we have to assure
- * consistency between yy_current_buffer and our
- * globals. Here is the right place to do so, because
- * this is the first action (other than possibly a
- * back-up) that will match for the new input source.
- */
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yy_current_buffer->yy_input_file = yyin;
- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
- }
-
- /* Note that here we test for yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * end-of-buffer state). Contrast this with the test
- * in input().
- */
- if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
- { /* This was really a NUL. */
- yy_state_type yy_next_state;
-
- yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state();
-
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
- */
-
- yy_next_state = yy_try_NUL_trans( yy_current_state );
-
- yy_bp = yytext_ptr + YY_MORE_ADJ;
-
- if ( yy_next_state )
- {
- /* Consume the NUL. */
- yy_cp = ++yy_c_buf_p;
- yy_current_state = yy_next_state;
- goto yy_match;
- }
-
- else
- {
- yy_cp = yy_c_buf_p;
- goto yy_find_action;
- }
- }
-
- else switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_END_OF_FILE:
- {
- yy_did_buffer_switch_on_eof = 0;
-
- if ( yywrap() )
- {
- /* Note: because we've taken care in
- * yy_get_next_buffer() to have set up
- * yytext, we can now set up
- * yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * YY_NULL, it'll still work - another
- * YY_NULL will get returned.
- */
- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
-
- yy_act = YY_STATE_EOF(YY_START);
- goto do_action;
- }
-
- else
- {
- if ( ! yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
- }
- break;
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p =
- yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state();
-
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
- goto yy_match;
-
- case EOB_ACT_LAST_MATCH:
- yy_c_buf_p =
- &yy_current_buffer->yy_ch_buf[yy_n_chars];
-
- yy_current_state = yy_get_previous_state();
-
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
- goto yy_find_action;
- }
- break;
- }
-
- default:
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
- } /* end of scanning one token */
- } /* end of yylex */
-
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- * EOB_ACT_LAST_MATCH -
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- * EOB_ACT_END_OF_FILE - end of file
- */
-
-static int yy_get_next_buffer()
- {
- register char *dest = yy_current_buffer->yy_ch_buf;
- register char *source = yytext_ptr;
- register int number_to_move, i;
- int ret_val;
-
- if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
-
- if ( yy_current_buffer->yy_fill_buffer == 0 )
- { /* Don't try to fill the buffer, so this is an EOF. */
- if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
- {
- /* We matched a single character, the EOB, so
- * treat this as a final EOF.
- */
- return EOB_ACT_END_OF_FILE;
- }
-
- else
- {
- /* We matched some text prior to the EOB, first
- * process it.
- */
- return EOB_ACT_LAST_MATCH;
- }
- }
-
- /* Try to read more data. */
-
- /* First move last chars to start of buffer. */
- number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
-
- for ( i = 0; i < number_to_move; ++i )
- *(dest++) = *(source++);
-
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
- /* don't do the read, it's not guaranteed to return an EOF,
- * just force an EOF
- */
- yy_current_buffer->yy_n_chars = yy_n_chars = 0;
-
- else
- {
- int num_to_read =
- yy_current_buffer->yy_buf_size - number_to_move - 1;
-
- while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
- YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
-
- /* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = yy_current_buffer;
-
- int yy_c_buf_p_offset =
- (int) (yy_c_buf_p - b->yy_ch_buf);
-
- if ( b->yy_is_our_buffer )
- {
- int new_size = b->yy_buf_size * 2;
-
- if ( new_size <= 0 )
- b->yy_buf_size += b->yy_buf_size / 8;
- else
- b->yy_buf_size *= 2;
-
- b->yy_ch_buf = (char *)
- /* Include room in for 2 EOB chars. */
- yy_flex_realloc( (void *) b->yy_ch_buf,
- b->yy_buf_size + 2 );
- }
- else
- /* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
-
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR(
- "fatal error - scanner input buffer overflow" );
-
- yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
- num_to_read = yy_current_buffer->yy_buf_size -
- number_to_move - 1;
-#endif
- }
-
- if ( num_to_read > YY_READ_BUF_SIZE )
- num_to_read = YY_READ_BUF_SIZE;
-
- /* Read in more data. */
- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
- yy_n_chars, num_to_read );
-
- yy_current_buffer->yy_n_chars = yy_n_chars;
- }
-
- if ( yy_n_chars == 0 )
- {
- if ( number_to_move == YY_MORE_ADJ )
- {
- ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
- }
-
- else
- {
- ret_val = EOB_ACT_LAST_MATCH;
- yy_current_buffer->yy_buffer_status =
- YY_BUFFER_EOF_PENDING;
- }
- }
-
- else
- ret_val = EOB_ACT_CONTINUE_SCAN;
-
- yy_n_chars += number_to_move;
- yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
- yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
- yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
-
- return ret_val;
- }
-
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-static yy_state_type yy_get_previous_state()
- {
- register yy_state_type yy_current_state;
- register char *yy_cp;
-
- yy_current_state = yy_start;
- yy_state_ptr = yy_state_buf;
- *yy_state_ptr++ = yy_current_state;
-
- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
- {
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 59 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- *yy_state_ptr++ = yy_current_state;
- }
-
- return yy_current_state;
- }
-
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- * next_state = yy_try_NUL_trans( current_state );
- */
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
- {
- register int yy_is_jam;
-
- register YY_CHAR yy_c = 1;
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 59 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 58);
- if ( ! yy_is_jam )
- *yy_state_ptr++ = yy_current_state;
-
- return yy_is_jam ? 0 : yy_current_state;
- }
-
-
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
- {
- register char *yy_cp = yy_c_buf_p;
-
- /* undo effects of setting up yytext */
- *yy_cp = yy_hold_char;
-
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
- /* +2 for EOB chars. */
- register int number_to_move = yy_n_chars + 2;
- register char *dest = &yy_current_buffer->yy_ch_buf[
- yy_current_buffer->yy_buf_size + 2];
- register char *source =
- &yy_current_buffer->yy_ch_buf[number_to_move];
-
- while ( source > yy_current_buffer->yy_ch_buf )
- *--dest = *--source;
-
- yy_cp += (int) (dest - source);
- yy_bp += (int) (dest - source);
- yy_current_buffer->yy_n_chars =
- yy_n_chars = yy_current_buffer->yy_buf_size;
-
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
-
- *--yy_cp = (char) c;
-
- if ( c == '\n' )
- --yylineno;
-
- yytext_ptr = yy_bp;
- yy_hold_char = *yy_cp;
- yy_c_buf_p = yy_cp;
- }
-#endif /* ifndef YY_NO_UNPUT */
-
-
-#ifdef __cplusplus
-static int yyinput()
-#else
-static int input()
-#endif
- {
- int c;
-
- *yy_c_buf_p = yy_hold_char;
-
- if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
- {
- /* yy_c_buf_p now points to the character we want to return.
- * If this occurs *before* the EOB characters, then it's a
- * valid NUL; if not, then we've hit the end of the buffer.
- */
- if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
- /* This was really a NUL. */
- *yy_c_buf_p = '\0';
-
- else
- { /* need more input */
- int offset = yy_c_buf_p - yytext_ptr;
- ++yy_c_buf_p;
-
- switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_LAST_MATCH:
- /* This happens because yy_g_n_b()
- * sees that we've accumulated a
- * token and flags that we need to
- * try matching the token before
- * proceeding. But for input(),
- * there's no matching to consider.
- * So convert the EOB_ACT_LAST_MATCH
- * to EOB_ACT_END_OF_FILE.
- */
-
- /* Reset buffer status. */
- yyrestart( yyin );
-
- /* fall through */
-
- case EOB_ACT_END_OF_FILE:
- {
- if ( yywrap() )
- return EOF;
-
- if ( ! yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
-#ifdef __cplusplus
- return yyinput();
-#else
- return input();
-#endif
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p = yytext_ptr + offset;
- break;
- }
- }
- }
-
- c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
- *yy_c_buf_p = '\0'; /* preserve yytext */
- yy_hold_char = *++yy_c_buf_p;
-
- if ( c == '\n' )
- ++yylineno;
-
- return c;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
- {
- if ( ! yy_current_buffer )
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
- yy_init_buffer( yy_current_buffer, input_file );
- yy_load_buffer_state();
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
- {
- if ( yy_current_buffer == new_buffer )
- return;
-
- if ( yy_current_buffer )
- {
- /* Flush out information for old buffer. */
- *yy_c_buf_p = yy_hold_char;
- yy_current_buffer->yy_buf_pos = yy_c_buf_p;
- yy_current_buffer->yy_n_chars = yy_n_chars;
- }
-
- yy_current_buffer = new_buffer;
- yy_load_buffer_state();
-
- /* We don't actually know whether we did this switch during
- * EOF (yywrap()) processing, but the only time this flag
- * is looked at is after yywrap() is called, so it's safe
- * to go ahead and always set it.
- */
- yy_did_buffer_switch_on_eof = 1;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
- {
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
- yyin = yy_current_buffer->yy_input_file;
- yy_hold_char = *yy_c_buf_p;
- }
-
-
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
- {
- YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
- b->yy_buf_size = size;
-
- /* yy_ch_buf has to be 2 characters longer than the size given because
- * we need to put in 2 end-of-buffer characters.
- */
- b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
- b->yy_is_our_buffer = 1;
-
- yy_init_buffer( b, file );
-
- return b;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
- {
- if ( ! b )
- return;
-
- if ( b == yy_current_buffer )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
-
- if ( b->yy_is_our_buffer )
- yy_flex_free( (void *) b->yy_ch_buf );
-
- yy_flex_free( (void *) b );
- }
-
-
-
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
-
- {
- yy_flush_buffer( b );
-
- b->yy_input_file = file;
- b->yy_fill_buffer = 1;
-
-#if YY_ALWAYS_INTERACTIVE
- b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
- b->yy_is_interactive = 0;
-#else
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-
- {
- if ( ! b )
- return;
-
- b->yy_n_chars = 0;
-
- /* We always need two end-of-buffer characters. The first causes
- * a transition to the end-of-buffer state. The second causes
- * a jam in that state.
- */
- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
- b->yy_buf_pos = &b->yy_ch_buf[0];
-
- b->yy_at_bol = 1;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- if ( b == yy_current_buffer )
- yy_load_buffer_state();
- }
-
-
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
- {
- YY_BUFFER_STATE b;
-
- if ( size < 2 ||
- base[size-2] != YY_END_OF_BUFFER_CHAR ||
- base[size-1] != YY_END_OF_BUFFER_CHAR )
- /* They forgot to leave room for the EOB's. */
- return 0;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
- b->yy_buf_pos = b->yy_ch_buf = base;
- b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
- b->yy_n_chars = b->yy_buf_size;
- b->yy_is_interactive = 0;
- b->yy_at_bol = 1;
- b->yy_fill_buffer = 0;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- yy_switch_to_buffer( b );
-
- return b;
- }
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
- {
- int len;
- for ( len = 0; yy_str[len]; ++len )
- ;
-
- return yy_scan_bytes( yy_str, len );
- }
-#endif
-
-
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
- {
- YY_BUFFER_STATE b;
- char *buf;
- yy_size_t n;
- int i;
-
- /* Get memory for full buffer, including space for trailing EOB's. */
- n = len + 2;
- buf = (char *) yy_flex_alloc( n );
- if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
- for ( i = 0; i < len; ++i )
- buf[i] = bytes[i];
-
- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
-
- b = yy_scan_buffer( buf, n );
- if ( ! b )
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
- /* It's okay to grow etc. this buffer, and we should throw it
- * away when we're done.
- */
- b->yy_is_our_buffer = 1;
-
- return b;
- }
-#endif
-
-
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
- {
- if ( yy_start_stack_ptr >= yy_start_stack_depth )
- {
- yy_size_t new_size;
-
- yy_start_stack_depth += YY_START_STACK_INCR;
- new_size = yy_start_stack_depth * sizeof( int );
-
- if ( ! yy_start_stack )
- yy_start_stack = (int *) yy_flex_alloc( new_size );
-
- else
- yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, new_size );
-
- if ( ! yy_start_stack )
- YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
- }
-
- yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
- BEGIN(new_state);
- }
-#endif
-
-
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
- {
- if ( --yy_start_stack_ptr < 0 )
- YY_FATAL_ERROR( "start-condition stack underflow" );
-
- BEGIN(yy_start_stack[yy_start_stack_ptr]);
- }
-#endif
-
-
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
- {
- return yy_start_stack[yy_start_stack_ptr - 1];
- }
-#endif
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
-#else
-static void yy_fatal_error( msg )
-char msg[];
-#endif
- {
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
- }
-
-
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- yytext[yyleng] = yy_hold_char; \
- yy_c_buf_p = yytext + n; \
- yy_hold_char = *yy_c_buf_p; \
- *yy_c_buf_p = '\0'; \
- yyleng = n; \
- } \
- while ( 0 )
-
-
-/* Internal utility routines. */
-
-#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
- {
- register int i;
- for ( i = 0; i < n; ++i )
- s1[i] = s2[i];
- }
-#endif
-
-#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
- {
- register int n;
- for ( n = 0; s[n]; ++n )
- ;
-
- return n;
- }
-#endif
-
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
- {
- return (void *) malloc( size );
- }
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
- {
- /* The cast to (char *) in the following accommodates both
- * implementations that use char* generic pointers, and those
- * that use void* generic pointers. It works with the latter
- * because both ANSI C and C++ allow castless assignment from
- * any pointer type to void*, and deal with argument conversions
- * as though doing an assignment.
- */
- return (void *) realloc( (char *) ptr, size );
- }
-
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
- {
- free( ptr );
- }
-
-#if YY_MAIN
-int main()
- {
- yylex();
- return 0;
- }
-#endif
-#line 101 "nslexer.l"
-
-
-#undef _nsyywrap
-int
-_nsyywrap()
-{
- return 1;
-} /* _nsyywrap */
-
-void
-_nsyyerror(msg)
- const char *msg;
-{
-
- printf("Error in nslexer\n");
-} /* _nsyyerror */
diff --git a/newlib/libc/sys/linux/net/nslexer.l b/newlib/libc/sys/linux/net/nslexer.l
deleted file mode 100644
index 0b66b6c66..000000000
--- a/newlib/libc/sys/linux/net/nslexer.l
+++ /dev/null
@@ -1,114 +0,0 @@
-%{
-/* $NetBSD: nslexer.l,v 1.3 1999/01/25 00:16:17 lukem Exp $ */
-
-/*-
- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Luke Mewburn.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the 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
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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 <stdio.h>
-#include <sys/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid =
- "$FreeBSD: src/lib/libc/net/nslexer.l,v 1.3 2001/11/11 02:48:09 bde Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <ctype.h>
-#define _NS_PRIVATE
-#include <nsswitch.h>
-#include <string.h>
-
-#include "nsparser.h"
-
-#define YY_NO_UNPUT
-
-%}
-
-%option yylineno
-
-BLANK [ \t]
-CR \n
-STRING [a-zA-Z][a-zA-Z0-9_]*
-
-%%
-
-{BLANK}+ ; /* skip whitespace */
-
-#.* ; /* skip comments */
-
-\\{CR} ; /* allow continuation */
-
-{CR} return NL;
-
-[sS][uU][cC][cC][eE][sS][sS] return SUCCESS;
-[uU][nN][aA][vV][aA][iI][lL] return UNAVAIL;
-[nN][oO][tT][fF][oO][uU][nN][dD] return NOTFOUND;
-[tT][rR][yY][aA][gG][aA][iI][nN] return TRYAGAIN;
-
-[rR][eE][tT][uU][rR][nN] return RETURN;
-[cC][oO][nN][tT][iI][nN][uU][eE] return CONTINUE;
-
-{STRING} {
- char *p;
- int i;
-
- if ((p = strdup(yytext)) == NULL)
- printf("nsdispatch: memory allocation failure\n");
-
- for (i = 0; i < strlen(p); i++) {
- if (isupper((unsigned char)p[i]))
- p[i] = tolower((unsigned char)p[i]);
- }
- _nsyylval.str = p;
- return STRING;
- }
-
-. return yytext[0];
-
-%%
-
-#undef _nsyywrap
-int
-_nsyywrap()
-{
- return 1;
-} /* _nsyywrap */
-
-void
-_nsyyerror(msg)
- const char *msg;
-{
-
- printf("Error in nslexer\n");
-} /* _nsyyerror */
diff --git a/newlib/libc/sys/linux/net/nsparser.c b/newlib/libc/sys/linux/net/nsparser.c
deleted file mode 100644
index b4701aed1..000000000
--- a/newlib/libc/sys/linux/net/nsparser.c
+++ /dev/null
@@ -1,541 +0,0 @@
-#ifndef lint
-static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
-#endif
-#define YYBYACC 1
-#define YYMAJOR 1
-#define YYMINOR 9
-#define yyclearin (yychar=(-1))
-#define yyerrok (yyerrflag=0)
-#define YYRECOVERING (yyerrflag!=0)
-#define yyparse _nsyyparse
-#define yylex _nsyylex
-#define yyerror _nsyyerror
-#define yychar _nsyychar
-#define yyval _nsyyval
-#define yylval _nsyylval
-#define yydebug _nsyydebug
-#define yynerrs _nsyynerrs
-#define yyerrflag _nsyyerrflag
-#define yyss _nsyyss
-#define yyssp _nsyyssp
-#define yyvs _nsyyvs
-#define yyvsp _nsyyvsp
-#define yylhs _nsyylhs
-#define yylen _nsyylen
-#define yydefred _nsyydefred
-#define yydgoto _nsyydgoto
-#define yysindex _nsyysindex
-#define yyrindex _nsyyrindex
-#define yygindex _nsyygindex
-#define yytable _nsyytable
-#define yycheck _nsyycheck
-#define yyname _nsyyname
-#define yyrule _nsyyrule
-#define YYPREFIX "_nsyy"
-#line 2 "nsparser.y"
-/* $NetBSD: nsparser.y,v 1.3 1999/01/25 00:16:18 lukem Exp $ */
-
-/*-
- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Luke Mewburn.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the 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
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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>
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid =
- "$FreeBSD: src/lib/libc/net/nsparser.y,v 1.3 2002/03/21 22:47:17 obrien Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#define _NS_PRIVATE
-#include <nsswitch.h>
-#include <stdio.h>
-#include <string.h>
-
-
-static void _nsaddsrctomap(const char *);
-
-static ns_dbt curdbt;
-static ns_src cursrc;
-#line 59 "nsparser.y"
-typedef union {
- char *str;
- int mapval;
-} YYSTYPE;
-#line 97 "y.tab.c"
-#define NL 257
-#define SUCCESS 258
-#define UNAVAIL 259
-#define NOTFOUND 260
-#define TRYAGAIN 261
-#define RETURN 262
-#define CONTINUE 263
-#define STRING 264
-#define YYERRCODE 256
-short _nsyylhs[] = { -1,
- 0, 0, 3, 3, 4, 4, 4, 4, 5, 6,
- 6, 7, 9, 7, 8, 8, 10, 1, 1, 1,
- 1, 2, 2,
-};
-short _nsyylen[] = { 2,
- 0, 1, 1, 2, 1, 3, 4, 2, 1, 1,
- 2, 1, 0, 5, 1, 2, 3, 1, 1, 1,
- 1, 1, 1,
-};
-short _nsyydefred[] = { 0,
- 0, 5, 9, 0, 0, 3, 0, 8, 4, 0,
- 6, 0, 0, 10, 13, 7, 11, 0, 18, 19,
- 20, 21, 0, 0, 15, 0, 14, 16, 22, 23,
- 17,
-};
-short _nsyydgoto[] = { 4,
- 23, 31, 5, 6, 7, 13, 14, 24, 18, 25,
-};
-short _nsyysindex[] = { -255,
- -249, 0, 0, 0, -255, 0, -41, 0, 0, -254,
- 0, -73, -253, 0, 0, 0, 0, -245, 0, 0,
- 0, 0, -42, -93, 0, -256, 0, 0, 0, 0,
- 0,
-};
-short _nsyyrindex[] = { 20,
- 0, 0, 0, 0, 21, 0, 0, 0, 0, 0,
- 0, -252, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0,
-};
-short _nsyygindex[] = { 0,
- 0, 0, 0, 17, 0, 0, 10, 0, 0, 1,
-};
-#define YYTABLESIZE 168
-short _nsyytable[] = { 27,
- 1, 2, 11, 16, 12, 29, 30, 8, 3, 12,
- 12, 12, 19, 20, 21, 22, 10, 15, 26, 1,
- 2, 9, 17, 0, 28, 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, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 19, 20, 21, 22,
-};
-short _nsyycheck[] = { 93,
- 256, 257, 257, 257, 257, 262, 263, 257, 264, 264,
- 264, 264, 258, 259, 260, 261, 58, 91, 61, 0,
- 0, 5, 13, -1, 24, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 258, 259, 260, 261,
-};
-#define YYFINAL 4
-#ifndef YYDEBUG
-#define YYDEBUG 0
-#endif
-#define YYMAXTOKEN 264
-#if YYDEBUG
-char *_nsyyname[] = {
-"end-of-file",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,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,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,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,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,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,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,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,"NL","SUCCESS",
-"UNAVAIL","NOTFOUND","TRYAGAIN","RETURN","CONTINUE","STRING",
-};
-char *_nsyyrule[] = {
-"$accept : File",
-"File :",
-"File : Lines",
-"Lines : Entry",
-"Lines : Lines Entry",
-"Entry : NL",
-"Entry : Database ':' NL",
-"Entry : Database ':' Srclist NL",
-"Entry : error NL",
-"Database : STRING",
-"Srclist : Item",
-"Srclist : Srclist Item",
-"Item : STRING",
-"$$1 :",
-"Item : STRING '[' $$1 Criteria ']'",
-"Criteria : Criterion",
-"Criteria : Criteria Criterion",
-"Criterion : Status '=' Action",
-"Status : SUCCESS",
-"Status : UNAVAIL",
-"Status : NOTFOUND",
-"Status : TRYAGAIN",
-"Action : RETURN",
-"Action : CONTINUE",
-};
-#endif
-#ifdef YYSTACKSIZE
-#undef YYMAXDEPTH
-#define YYMAXDEPTH YYSTACKSIZE
-#else
-#ifdef YYMAXDEPTH
-#define YYSTACKSIZE YYMAXDEPTH
-#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
-#endif
-#endif
-int yydebug;
-int yynerrs;
-int yyerrflag;
-int yychar;
-short *yyssp;
-YYSTYPE *yyvsp;
-YYSTYPE yyval;
-YYSTYPE yylval;
-short yyss[YYSTACKSIZE];
-YYSTYPE yyvs[YYSTACKSIZE];
-#define yystacksize YYSTACKSIZE
-#line 150 "nsparser.y"
-
-static void
-_nsaddsrctomap(elem)
- const char *elem;
-{
- int i, lineno;
- extern int _nsyylineno;
- extern char * _nsyytext;
-
- lineno = _nsyylineno - (*_nsyytext == '\n' ? 1 : 0);
- if (curdbt.srclistsize > 0) {
- if ((strcasecmp(elem, NSSRC_COMPAT) == 0) ||
- (strcasecmp(curdbt.srclist[0].name, NSSRC_COMPAT) == 0)) {
- /* XXX: syslog the following */
- printf("line %d 'compat' used with other sources",
- lineno);
- return;
- }
- }
- for (i = 0; i < curdbt.srclistsize; i++) {
- if (strcasecmp(curdbt.srclist[i].name, elem) == 0) {
- /* XXX: syslog the following */
- printf("%s line %d: duplicate source '%s'",
- lineno, elem);
- return;
- }
- }
- cursrc.name = elem;
- _nsdbtaddsrc(&curdbt, &cursrc);
-}
-#line 276 "y.tab.c"
-#define YYABORT goto yyabort
-#define YYREJECT goto yyabort
-#define YYACCEPT goto yyaccept
-#define YYERROR goto yyerrlab
-int
-yyparse()
-{
- register int yym, yyn, yystate;
-#if YYDEBUG
- register char *yys;
- extern char *getenv();
-
- if (yys = getenv("YYDEBUG"))
- {
- yyn = *yys;
- if (yyn >= '0' && yyn <= '9')
- yydebug = yyn - '0';
- }
-#endif
-
- yynerrs = 0;
- yyerrflag = 0;
- yychar = (-1);
-
- yyssp = yyss;
- yyvsp = yyvs;
- *yyssp = yystate = 0;
-
-yyloop:
- if (yyn = yydefred[yystate]) goto yyreduce;
- if (yychar < 0)
- {
- if ((yychar = yylex()) < 0) yychar = 0;
-#if YYDEBUG
- if (yydebug)
- {
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
- printf("%sdebug: state %d, reading %d (%s)\n",
- YYPREFIX, yystate, yychar, yys);
- }
-#endif
- }
- if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
- {
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: state %d, shifting to state %d\n",
- YYPREFIX, yystate, yytable[yyn]);
-#endif
- if (yyssp >= yyss + yystacksize - 1)
- {
- goto yyoverflow;
- }
- *++yyssp = yystate = yytable[yyn];
- *++yyvsp = yylval;
- yychar = (-1);
- if (yyerrflag > 0) --yyerrflag;
- goto yyloop;
- }
- if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
- {
- yyn = yytable[yyn];
- goto yyreduce;
- }
- if (yyerrflag) goto yyinrecovery;
-#ifdef lint
- goto yynewerror;
-#endif
-yynewerror:
- yyerror("syntax error");
-#ifdef lint
- goto yyerrlab;
-#endif
-yyerrlab:
- ++yynerrs;
-yyinrecovery:
- if (yyerrflag < 3)
- {
- yyerrflag = 3;
- for (;;)
- {
- if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
- {
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: state %d, error recovery shifting\
- to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
-#endif
- if (yyssp >= yyss + yystacksize - 1)
- {
- goto yyoverflow;
- }
- *++yyssp = yystate = yytable[yyn];
- *++yyvsp = yylval;
- goto yyloop;
- }
- else
- {
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: error recovery discarding state %d\n",
- YYPREFIX, *yyssp);
-#endif
- if (yyssp <= yyss) goto yyabort;
- --yyssp;
- --yyvsp;
- }
- }
- }
- else
- {
- if (yychar == 0) goto yyabort;
-#if YYDEBUG
- if (yydebug)
- {
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
- printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
- YYPREFIX, yystate, yychar, yys);
- }
-#endif
- yychar = (-1);
- goto yyloop;
- }
-yyreduce:
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: state %d, reducing by rule %d (%s)\n",
- YYPREFIX, yystate, yyn, yyrule[yyn]);
-#endif
- yym = yylen[yyn];
- yyval = yyvsp[1-yym];
- switch (yyn)
- {
-case 7:
-#line 87 "nsparser.y"
-{
- _nsdbtput(&curdbt);
- }
-break;
-case 8:
-#line 91 "nsparser.y"
-{
- yyerrok;
- }
-break;
-case 9:
-#line 98 "nsparser.y"
-{
- curdbt.name = yylval.str;
- curdbt.srclist = NULL;
- curdbt.srclistsize = 0;
- }
-break;
-case 12:
-#line 112 "nsparser.y"
-{
- cursrc.flags = NS_SUCCESS;
- _nsaddsrctomap(yyvsp[0].str);
- }
-break;
-case 13:
-#line 116 "nsparser.y"
-{ cursrc.flags = NS_SUCCESS; }
-break;
-case 14:
-#line 117 "nsparser.y"
-{
- _nsaddsrctomap(yyvsp[-4].str);
- }
-break;
-case 17:
-#line 129 "nsparser.y"
-{
- if (yyvsp[0].mapval) /* if action == RETURN set RETURN bit */
- cursrc.flags |= yyvsp[-2].mapval;
- else /* else unset it */
- cursrc.flags &= ~yyvsp[-2].mapval;
- }
-break;
-case 18:
-#line 138 "nsparser.y"
-{ yyval.mapval = NS_SUCCESS; }
-break;
-case 19:
-#line 139 "nsparser.y"
-{ yyval.mapval = NS_UNAVAIL; }
-break;
-case 20:
-#line 140 "nsparser.y"
-{ yyval.mapval = NS_NOTFOUND; }
-break;
-case 21:
-#line 141 "nsparser.y"
-{ yyval.mapval = NS_TRYAGAIN; }
-break;
-case 22:
-#line 145 "nsparser.y"
-{ yyval.mapval = 1L; }
-break;
-case 23:
-#line 146 "nsparser.y"
-{ yyval.mapval = 0L; }
-break;
-#line 487 "y.tab.c"
- }
- yyssp -= yym;
- yystate = *yyssp;
- yyvsp -= yym;
- yym = yylhs[yyn];
- if (yystate == 0 && yym == 0)
- {
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: after reduction, shifting from state 0 to\
- state %d\n", YYPREFIX, YYFINAL);
-#endif
- yystate = YYFINAL;
- *++yyssp = YYFINAL;
- *++yyvsp = yyval;
- if (yychar < 0)
- {
- if ((yychar = yylex()) < 0) yychar = 0;
-#if YYDEBUG
- if (yydebug)
- {
- yys = 0;
- if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
- if (!yys) yys = "illegal-symbol";
- printf("%sdebug: state %d, reading %d (%s)\n",
- YYPREFIX, YYFINAL, yychar, yys);
- }
-#endif
- }
- if (yychar == 0) goto yyaccept;
- goto yyloop;
- }
- if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
- yystate = yytable[yyn];
- else
- yystate = yydgoto[yym];
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: after reduction, shifting from state %d \
-to state %d\n", YYPREFIX, *yyssp, yystate);
-#endif
- if (yyssp >= yyss + yystacksize - 1)
- {
- goto yyoverflow;
- }
- *++yyssp = yystate;
- *++yyvsp = yyval;
- goto yyloop;
-yyoverflow:
- yyerror("yacc stack overflow");
-yyabort:
- return (1);
-yyaccept:
- return (0);
-}
diff --git a/newlib/libc/sys/linux/net/nsparser.h b/newlib/libc/sys/linux/net/nsparser.h
deleted file mode 100644
index 6a6fae0be..000000000
--- a/newlib/libc/sys/linux/net/nsparser.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#define NL 257
-#define SUCCESS 258
-#define UNAVAIL 259
-#define NOTFOUND 260
-#define TRYAGAIN 261
-#define RETURN 262
-#define CONTINUE 263
-#define STRING 264
-typedef union {
- char *str;
- int mapval;
-} YYSTYPE;
-extern YYSTYPE _nsyylval;
diff --git a/newlib/libc/sys/linux/net/nsparser.y b/newlib/libc/sys/linux/net/nsparser.y
deleted file mode 100644
index 42f63a8a5..000000000
--- a/newlib/libc/sys/linux/net/nsparser.y
+++ /dev/null
@@ -1,178 +0,0 @@
-%{
-/* $NetBSD: nsparser.y,v 1.3 1999/01/25 00:16:18 lukem Exp $ */
-
-/*-
- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Luke Mewburn.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the 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
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 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>
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid =
- "$FreeBSD: src/lib/libc/net/nsparser.y,v 1.3 2002/03/21 22:47:17 obrien Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#define _NS_PRIVATE
-#include <nsswitch.h>
-#include <stdio.h>
-#include <string.h>
-
-
-static void _nsaddsrctomap(const char *);
-
-static ns_dbt curdbt;
-static ns_src cursrc;
-%}
-
-%union {
- char *str;
- int mapval;
-}
-
-%token NL
-%token SUCCESS UNAVAIL NOTFOUND TRYAGAIN
-%token RETURN CONTINUE
-%token <str> STRING
-
-%type <mapval> Status Action
-
-%%
-
-File
- : /* empty */
- | Lines
- ;
-
-Lines
- : Entry
- | Lines Entry
- ;
-
-Entry
- : NL
- | Database ':' NL
- | Database ':' Srclist NL
- {
- _nsdbtput(&curdbt);
- }
- | error NL
- {
- yyerrok;
- }
- ;
-
-Database
- : STRING
- {
- curdbt.name = yylval.str;
- curdbt.srclist = NULL;
- curdbt.srclistsize = 0;
- }
- ;
-
-Srclist
- : Item
- | Srclist Item
- ;
-
-Item
- : STRING
- {
- cursrc.flags = NS_SUCCESS;
- _nsaddsrctomap($1);
- }
- | STRING '[' { cursrc.flags = NS_SUCCESS; } Criteria ']'
- {
- _nsaddsrctomap($1);
- }
- ;
-
-Criteria
- : Criterion
- | Criteria Criterion
- ;
-
-Criterion
- : Status '=' Action
- {
- if ($3) /* if action == RETURN set RETURN bit */
- cursrc.flags |= $1;
- else /* else unset it */
- cursrc.flags &= ~$1;
- }
- ;
-
-Status
- : SUCCESS { $$ = NS_SUCCESS; }
- | UNAVAIL { $$ = NS_UNAVAIL; }
- | NOTFOUND { $$ = NS_NOTFOUND; }
- | TRYAGAIN { $$ = NS_TRYAGAIN; }
- ;
-
-Action
- : RETURN { $$ = 1L; }
- | CONTINUE { $$ = 0L; }
- ;
-
-%%
-
-static void
-_nsaddsrctomap(elem)
- const char *elem;
-{
- int i, lineno;
- extern int _nsyylineno;
- extern char * _nsyytext;
-
- lineno = _nsyylineno - (*_nsyytext == '\n' ? 1 : 0);
- if (curdbt.srclistsize > 0) {
- if ((strcasecmp(elem, NSSRC_COMPAT) == 0) ||
- (strcasecmp(curdbt.srclist[0].name, NSSRC_COMPAT) == 0)) {
- /* XXX: syslog the following */
- printf("line %d 'compat' used with other sources",
- lineno);
- return;
- }
- }
- for (i = 0; i < curdbt.srclistsize; i++) {
- if (strcasecmp(curdbt.srclist[i].name, elem) == 0) {
- /* XXX: syslog the following */
- printf("%s line %d: duplicate source '%s'",
- lineno, elem);
- return;
- }
- }
- cursrc.name = elem;
- _nsdbtaddsrc(&curdbt, &cursrc);
-}
diff --git a/newlib/libc/sys/linux/net/rcmd.3 b/newlib/libc/sys/linux/net/rcmd.3
deleted file mode 100644
index 9479a237d..000000000
--- a/newlib/libc/sys/linux/net/rcmd.3
+++ /dev/null
@@ -1,298 +0,0 @@
-.\" Copyright (c) 1983, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)rcmd.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/net/rcmd.3,v 1.20 2001/10/01 16:08:56 ru Exp $
-.\"
-.Dd March 3, 2000
-.Dt RCMD 3
-.Os
-.Sh NAME
-.Nm rcmd ,
-.Nm rresvport ,
-.Nm iruserok ,
-.Nm ruserok ,
-.Nm rcmd_af ,
-.Nm rresvport_af ,
-.Nm iruserok_sa
-.Nd routines for returning a stream to a remote command
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In unistd.h
-.Ft int
-.Fn rcmd "char **ahost" "int inport" "const char *locuser" "const char *remuser" "const char *cmd" "int *fd2p"
-.Ft int
-.Fn rresvport "int *port"
-.Ft int
-.Fn iruserok "u_long raddr" "int superuser" "const char *ruser" "const char *luser"
-.Ft int
-.Fn ruserok "const char *rhost" "int superuser" "const char *ruser" "const char *luser"
-.Ft int
-.Fn rcmd_af "char **ahost" "int inport" "const char *locuser" "const char *remuser" "const char *cmd" "int *fd2p" "int af"
-.Ft int
-.Fn rresvport_af "int *port" "int af"
-.Ft int
-.Fn iruserok_sa "const void *addr" "int addrlen" "int superuser" "const char *ruser" "const char *luser"
-.Sh DESCRIPTION
-The
-.Fn rcmd
-function
-is used by the super-user to execute a command on
-a remote machine using an authentication scheme based
-on reserved port numbers.
-The
-.Fn rresvport
-function
-returns a descriptor to a socket
-with an address in the privileged port space.
-The
-.Fn ruserok
-function
-is used by servers
-to authenticate clients requesting service with
-.Fn rcmd .
-All three functions are present in the same file and are used
-by the
-.Xr rshd 8
-server (among others).
-.Pp
-The
-.Fn rcmd
-function
-looks up the host
-.Fa *ahost
-using
-.Xr gethostbyname 3 ,
-returning -1 if the host does not exist.
-Otherwise
-.Fa *ahost
-is set to the standard name of the host
-and a connection is established to a server
-residing at the well-known Internet port
-.Fa inport .
-.Pp
-If the connection succeeds,
-a socket in the Internet domain of type
-.Dv SOCK_STREAM
-is returned to the caller, and given to the remote
-command as
-.Em stdin
-and
-.Em stdout .
-If
-.Fa fd2p
-is non-zero, then an auxiliary channel to a control
-process will be set up, and a descriptor for it will be placed
-in
-.Fa *fd2p .
-The control process will return diagnostic
-output from the command (unit 2) on this channel, and will also
-accept bytes on this channel as being
-.Tn UNIX
-signal numbers, to be
-forwarded to the process group of the command.
-If
-.Fa fd2p
-is 0, then the
-.Em stderr
-(unit 2 of the remote
-command) will be made the same as the
-.Em stdout
-and no
-provision is made for sending arbitrary signals to the remote process,
-although you may be able to get its attention by using out-of-band data.
-.Pp
-The protocol is described in detail in
-.Xr rshd 8 .
-.Pp
-The
-.Fn rresvport
-function is used to obtain a socket to which an address with a Privileged
-Internet port is bound.
-This socket is suitable for use by
-.Fn rcmd
-and several other functions.
-Privileged Internet ports are those in the range 0 to 1023.
-Only the super-user is allowed to bind an address of this sort
-to a socket.
-.Pp
-The
-.Fn iruserok
-and
-.Fn ruserok
-functions take a remote host's IP address or name, as returned by the
-.Xr gethostbyname 3
-routines, two user names and a flag indicating whether the local user's
-name is that of the super-user.
-Then, if the user is
-.Em NOT
-the super-user, it checks the
-.Pa /etc/hosts.equiv
-file.
-If that lookup is not done, or is unsuccessful, the
-.Pa .rhosts
-in the local user's home directory is checked to see if the request for
-service is allowed.
-.Pp
-If this file does not exist, is not a regular file, is owned by anyone
-other than the user or the super-user, or is writable by anyone other
-than the owner, the check automatically fails.
-Zero is returned if the machine name is listed in the
-.Dq Pa hosts.equiv
-file, or the host and remote user name are found in the
-.Dq Pa .rhosts
-file; otherwise
-.Fn iruserok
-and
-.Fn ruserok
-return -1.
-If the local domain (as obtained from
-.Xr gethostname 3 )
-is the same as the remote domain, only the machine name need be specified.
-.Pp
-The
-.Fn iruserok
-function is strongly preferred for security reasons.
-It requires trusting the local DNS at most, while the
-.Fn ruserok
-function requires trusting the entire DNS, which can be spoofed.
-.Pp
-The functions with an
-.Dq Li _af
-or
-.Dq Li _sa
-suffix, i.e.,
-.Fn rcmd_af ,
-.Fn rresvport_af
-and
-.Fn iruserok_sa ,
-work the same as the corresponding functions without a
-suffix, except that they are capable of handling both IPv6 and IPv4 ports.
-.Pp
-The
-.Dq Li _af
-suffix means that the function has an additional
-.Fa af
-argument which is used to specify the address family,
-(see below).
-The
-.Fa af
-argument extension is implemented for functions
-that have no binary address argument.
-Instead, the
-.Fa af
-argument specifies which address family is desired.
-.Pp
-The
-.Dq Li _sa
-suffix means that the function has general socket address and
-length arguments.
-As the socket address is a protocol independent data structure,
-IPv4 and IPv6 socket address can be passed as desired.
-The
-.Fa sa
-argument extension is implemented for functions
-that pass a protocol dependent binary address argument.
-The argument needs to be replaced with a more general address structure
-to support multiple address families in a general way.
-.Pp
-The functions with neither an
-.Dq Li _af
-suffix nor an
-.Dq Li _sa
-suffix work for IPv4 only, except for
-.Fn ruserok
-which can handle both IPv6 and IPv4.
-To switch the address family, the
-.Fa af
-argument must be filled with
-.Dv AF_INET ,
-or
-.Dv AF_INET6 .
-For
-.Fn rcmd_af ,
-.Dv PF_UNSPEC
-is also allowed.
-.Sh DIAGNOSTICS
-The
-.Fn rcmd
-function
-returns a valid socket descriptor on success.
-It returns -1 on error and prints a diagnostic message
-on the standard error.
-.Pp
-The
-.Fn rresvport
-function
-returns a valid, bound socket descriptor on success.
-It returns -1 on error with the global value
-.Va errno
-set according to the reason for failure.
-The error code
-.Er EAGAIN
-is overloaded to mean ``All network ports in use.''
-.Sh SEE ALSO
-.Xr rlogin 1 ,
-.Xr rsh 1 ,
-.Xr intro 2 ,
-.Xr rexec 3 ,
-.Xr rexecd 8 ,
-.Xr rlogind 8 ,
-.Xr rshd 8
-.Pp
-.Rs
-.%A W. Stevens
-.%A M. Thomas
-.%T "Advanced Socket API for IPv6"
-.%O RFC2292
-.Re
-.Rs
-.%A W. Stevens
-.%A M. Thomas
-.%A E. Nordmark
-.%T "Advanced Socket API for IPv6"
-.%O draft-ietf-ipngwg-rfc2292bis-01.txt
-.Re
-.Sh HISTORY
-Most of these
-functions appeared in
-.Bx 4.2 .
-.Fn rresvport_af
-appeared in RFC2292, and was implemented by the WIDE project
-for the Hydrangea IPv6 protocol stack kit.
-.Fn rcmd_af
-appeared in draft-ietf-ipngwg-rfc2292bis-01.txt,
-and was implemented in the WIDE/KAME IPv6 protocol stack kit.
-.Fn iruserok_sa
-appeared in discussion on the IETF ipngwg mailing list,
-and was implemented in
-.Fx 4.0 .
diff --git a/newlib/libc/sys/linux/net/rcmd.c b/newlib/libc/sys/linux/net/rcmd.c
deleted file mode 100644
index 708b69d1b..000000000
--- a/newlib/libc/sys/linux/net/rcmd.c
+++ /dev/null
@@ -1,779 +0,0 @@
-/*
- * Copyright (c) 1983, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <time.h>
-#include <sys/select.h>
-
-#include "namespace.h"
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <signal.h>
-#include <fcntl.h>
-#include <netdb.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <errno.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-#include <arpa/nameser.h>
-#include "un-namespace.h"
-
-/* wrapper for KAME-special getnameinfo() */
-#ifndef NI_WITHSCOPEID
-#define NI_WITHSCOPEID 0
-#endif
-
-extern int innetgr( const char *, const char *, const char *, const char * );
-extern int rcmdsh(char **ahost, int rport, const char *locuser, const char *remuser, const char *cmd, const char *rshprog);
-int rresvport_af(int *alport, int family);
-
-#define max(a, b) ((a > b) ? a : b)
-
-int __ivaliduser(FILE *, u_int32_t, const char *, const char *);
-int __ivaliduser_af(FILE *,const void *, const char *, const char *, int, int);
-int __ivaliduser_sa(FILE *, const struct sockaddr *, socklen_t, const char *,
- const char *);
-static int __icheckhost(const struct sockaddr *, socklen_t, const char *);
-
-char paddr[NI_MAXHOST];
-
-int
-rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af)
- char **ahost;
- u_short rport;
- const char *locuser, *remuser, *cmd;
- int *fd2p;
- int af;
-{
- struct addrinfo hints, *res, *ai;
- struct sockaddr_storage from;
- fd_set reads;
- sigset_t oldmask, newmask;
- pid_t pid;
- int s, aport, lport, timo, error;
- char c, *p;
- int refused, nres;
- char num[8];
- static char canonnamebuf[MAXDNAME]; /* is it proper here? */
-
- /* call rcmdsh() with specified remote shell if appropriate. */
- if (!issetugid() && (p = getenv("RSH"))) {
- struct servent *sp = getservbyname("shell", "tcp");
-
- if (sp && sp->s_port == rport)
- return (rcmdsh(ahost, rport, locuser, remuser,
- cmd, p));
- }
-
- /* use rsh(1) if non-root and remote port is shell. */
- if (geteuid()) {
- struct servent *sp = getservbyname("shell", "tcp");
-
- if (sp && sp->s_port == rport)
- return (rcmdsh(ahost, rport, locuser, remuser,
- cmd, NULL));
- }
-
- pid = getpid();
-
- memset(&hints, 0, sizeof(hints));
- hints.ai_flags = AI_CANONNAME;
- hints.ai_family = af;
- hints.ai_socktype = SOCK_STREAM;
- hints.ai_protocol = 0;
- (void)snprintf(num, sizeof(num), "%d", ntohs(rport));
- error = getaddrinfo(*ahost, num, &hints, &res);
- if (error) {
- fprintf(stderr, "rcmd: getaddrinfo: %s\n",
- gai_strerror(error));
- if (error == EAI_SYSTEM)
- fprintf(stderr, "rcmd: getaddrinfo: %s\n",
- strerror(errno));
- return (-1);
- }
-
- if (res->ai_canonname
- && strlen(res->ai_canonname) + 1 < sizeof(canonnamebuf)) {
- strncpy(canonnamebuf, res->ai_canonname, sizeof(canonnamebuf));
- *ahost = canonnamebuf;
- }
- nres = 0;
- for (ai = res; ai; ai = ai->ai_next)
- nres++;
- ai = res;
- refused = 0;
- sigemptyset(&newmask);
- sigaddset(&newmask, SIGURG);
- sigprocmask(SIG_BLOCK, (const sigset_t *)&newmask, &oldmask);
- for (timo = 1, lport = IPPORT_RESERVED - 1;;) {
- s = rresvport_af(&lport, ai->ai_family);
- if (s < 0) {
- if (errno != EAGAIN && ai->ai_next) {
- ai = ai->ai_next;
- continue;
- }
- if (errno == EAGAIN)
- (void)fprintf(stderr,
- "rcmd: socket: All ports in use\n");
- else
- (void)fprintf(stderr, "rcmd: socket: %s\n",
- strerror(errno));
- freeaddrinfo(res);
- sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask,
- NULL);
- return (-1);
- }
- fcntl(s, F_SETOWN, pid);
- if (connect(s, ai->ai_addr, ai->ai_addrlen) >= 0)
- break;
- (void)close(s);
- if (errno == EADDRINUSE) {
- lport--;
- continue;
- }
- if (errno == ECONNREFUSED)
- refused = 1;
- if (ai->ai_next == NULL && (!refused || timo > 16)) {
- (void)fprintf(stderr, "%s: %s\n",
- *ahost, strerror(errno));
- freeaddrinfo(res);
- sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask,
- NULL);
- return (-1);
- }
- if (nres > 1) {
- int oerrno = errno;
-
- getnameinfo(ai->ai_addr, ai->ai_addrlen,
- paddr, sizeof(paddr),
- NULL, 0,
- NI_NUMERICHOST|NI_WITHSCOPEID);
- (void)fprintf(stderr, "connect to address %s: ",
- paddr);
- errno = oerrno;
- perror(0);
- }
- if ((ai = ai->ai_next) == NULL) {
- /* refused && timo <= 16 */
- struct timespec time_to_sleep, time_remaining;
-
- time_to_sleep.tv_sec = timo;
- time_to_sleep.tv_nsec = 0;
- (void)nanosleep(&time_to_sleep, &time_remaining);
- timo *= 2;
- ai = res;
- refused = 0;
- }
- if (nres > 1) {
- getnameinfo(ai->ai_addr, ai->ai_addrlen,
- paddr, sizeof(paddr),
- NULL, 0,
- NI_NUMERICHOST|NI_WITHSCOPEID);
- fprintf(stderr, "Trying %s...\n", paddr);
- }
- }
- lport--;
- if (fd2p == 0) {
- write(s, "", 1);
- lport = 0;
- } else {
- char num[8];
- int s2 = rresvport_af(&lport, ai->ai_family), s3;
- int len = ai->ai_addrlen;
- int nfds;
-
- if (s2 < 0)
- goto bad;
- listen(s2, 1);
- (void)snprintf(num, sizeof(num), "%d", lport);
- if (write(s, num, strlen(num)+1) != strlen(num)+1) {
- (void)fprintf(stderr,
- "rcmd: write (setting up stderr): %s\n",
- strerror(errno));
- (void)close(s2);
- goto bad;
- }
- nfds = max(s, s2)+1;
- if(nfds > FD_SETSIZE) {
- fprintf(stderr, "rcmd: too many files\n");
- (void)close(s2);
- goto bad;
- }
-again:
- FD_ZERO(&reads);
- FD_SET(s, &reads);
- FD_SET(s2, &reads);
- errno = 0;
- if (select(nfds, &reads, 0, 0, 0) < 1 || !FD_ISSET(s2, &reads)){
- if (errno != 0)
- (void)fprintf(stderr,
- "rcmd: select (setting up stderr): %s\n",
- strerror(errno));
- else
- (void)fprintf(stderr,
- "select: protocol failure in circuit setup\n");
- (void)close(s2);
- goto bad;
- }
- s3 = accept(s2, (struct sockaddr *)&from, &len);
- switch (from.ss_family) {
- case AF_INET:
- aport = ntohs(((struct sockaddr_in *)&from)->sin_port);
- break;
-#ifdef INET6
- case AF_INET6:
- aport = ntohs(((struct sockaddr_in6 *)&from)->sin6_port);
- break;
-#endif
- default:
- aport = 0; /* error */
- break;
- }
- /*
- * XXX careful for ftp bounce attacks. If discovered, shut them
- * down and check for the real auxiliary channel to connect.
- */
- if (aport == 20) {
- close(s3);
- goto again;
- }
- (void)close(s2);
- if (s3 < 0) {
- (void)fprintf(stderr,
- "rcmd: accept: %s\n", strerror(errno));
- lport = 0;
- goto bad;
- }
- *fd2p = s3;
- if (aport >= IPPORT_RESERVED || aport < IPPORT_RESERVED / 2) {
- (void)fprintf(stderr,
- "socket: protocol failure in circuit setup.\n");
- goto bad2;
- }
- }
- (void)write(s, locuser, strlen(locuser)+1);
- (void)write(s, remuser, strlen(remuser)+1);
- (void)write(s, cmd, strlen(cmd)+1);
- if (read(s, &c, 1) != 1) {
- (void)fprintf(stderr,
- "rcmd: %s: %s\n", *ahost, strerror(errno));
- goto bad2;
- }
- if (c != 0) {
- while (read(s, &c, 1) == 1) {
- (void)write(STDERR_FILENO, &c, 1);
- if (c == '\n')
- break;
- }
- goto bad2;
- }
- sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask, NULL);
- freeaddrinfo(res);
- return (s);
-bad2:
- if (lport)
- (void)close(*fd2p);
-bad:
- (void)close(s);
- sigprocmask(SIG_SETMASK, (const sigset_t *)&oldmask, NULL);
- freeaddrinfo(res);
- return (-1);
-}
-
-int
-rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
- char **ahost;
- u_short rport;
- const char *locuser, *remuser, *cmd;
- int *fd2p;
-{
- return rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, AF_INET);
-}
-
-int
-rresvport(port)
- int *port;
-{
- return rresvport_af(port, AF_INET);
-}
-
-int
-rresvport_af(alport, family)
- int *alport, family;
-{
- int s;
- struct sockaddr_storage ss;
- u_short *sport;
-
- memset(&ss, 0, sizeof(ss));
- ss.ss_family = family;
- switch (family) {
- case AF_INET:
- sport = &((struct sockaddr_in *)&ss)->sin_port;
- ((struct sockaddr_in *)&ss)->sin_addr.s_addr = INADDR_ANY;
- break;
-#ifdef INET6
- case AF_INET6:
- sport = &((struct sockaddr_in6 *)&ss)->sin6_port;
- ((struct sockaddr_in6 *)&ss)->sin6_addr = in6addr_any;
- break;
-#endif
- default:
- errno = EAFNOSUPPORT;
- return -1;
- }
-
- s = socket(ss.ss_family, SOCK_STREAM, 0);
- if (s < 0)
- return (-1);
-#if 0 /* compat_exact_traditional_rresvport_semantics */
- sin.sin_port = htons((u_short)*alport);
- if (_bind(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0)
- return (s);
- if (errno != EADDRINUSE) {
- (void)close(s);
- return (-1);
- }
-#endif
- *sport = 0;
- if (bindresvport_sa(s, (struct sockaddr *)&ss) == -1) {
- (void)close(s);
- return (-1);
- }
- *alport = (int)ntohs(*sport);
- return (s);
-}
-
-int __check_rhosts_file = 1;
-char *__rcmd_errstr;
-
-int
-ruserok(rhost, superuser, ruser, luser)
- const char *rhost, *ruser, *luser;
- int superuser;
-{
- struct addrinfo hints, *res, *r;
- int error;
-
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = PF_UNSPEC;
- hints.ai_socktype = SOCK_DGRAM; /*dummy*/
- error = getaddrinfo(rhost, "0", &hints, &res);
- if (error)
- return (-1);
-
- for (r = res; r; r = r->ai_next) {
- if (iruserok_sa(r->ai_addr, r->ai_addrlen, superuser, ruser,
- luser) == 0) {
- freeaddrinfo(res);
- return (0);
- }
- }
- freeaddrinfo(res);
- return (-1);
-}
-
-/*
- * New .rhosts strategy: We are passed an ip address. We spin through
- * hosts.equiv and .rhosts looking for a match. When the .rhosts only
- * has ip addresses, we don't have to trust a nameserver. When it
- * contains hostnames, we spin through the list of addresses the nameserver
- * gives us and look for a match.
- *
- * Returns 0 if ok, -1 if not ok.
- */
-int
-iruserok(raddr, superuser, ruser, luser)
- unsigned long raddr;
- int superuser;
- const char *ruser, *luser;
-{
- struct sockaddr_in sin;
- int sin_len;
-
- memset(&sin, 0, sizeof(sin));
- sin.sin_family = AF_INET;
- sin_len = sizeof(struct sockaddr_in);
- memcpy(&sin.sin_addr, &raddr, sizeof(sin.sin_addr));
- return iruserok_sa((struct sockaddr *)&sin, sin_len, superuser,
- ruser, luser);
-}
-
-/*
- * AF independent extension of iruserok.
- *
- * Returns 0 if ok, -1 if not ok.
- */
-int
-iruserok_sa(ra, rlen, superuser, ruser, luser)
- const void *ra;
- int rlen;
- int superuser;
- const char *ruser, *luser;
-{
- char *cp;
- struct stat sbuf;
- struct passwd *pwd;
- FILE *hostf;
- uid_t uid;
- int first;
- char pbuf[MAXPATHLEN];
- const struct sockaddr *raddr;
- struct sockaddr_storage ss;
-
- /* avoid alignment issue */
- if (rlen > sizeof(ss))
- return(-1);
- memcpy(&ss, ra, rlen);
- raddr = (struct sockaddr *)&ss;
-
- first = 1;
- hostf = superuser ? NULL : fopen(_PATH_HEQUIV, "r");
-again:
- if (hostf) {
- if (__ivaliduser_sa(hostf, raddr, rlen, luser, ruser) == 0) {
- (void)fclose(hostf);
- return (0);
- }
- (void)fclose(hostf);
- }
- if (first == 1 && (__check_rhosts_file || superuser)) {
- first = 0;
- if ((pwd = getpwnam(luser)) == NULL)
- return (-1);
- (void)strcpy(pbuf, pwd->pw_dir);
- (void)strcat(pbuf, "/.rhosts");
-
- /*
- * Change effective uid while opening .rhosts. If root and
- * reading an NFS mounted file system, can't read files that
- * are protected read/write owner only.
- */
- uid = geteuid();
- (void)seteuid(pwd->pw_uid);
- hostf = fopen(pbuf, "r");
- (void)seteuid(uid);
-
- if (hostf == NULL)
- return (-1);
- /*
- * If not a regular file, or is owned by someone other than
- * user or root or if writeable by anyone but the owner, quit.
- */
- cp = NULL;
- if (lstat(pbuf, &sbuf) < 0)
- cp = ".rhosts lstat failed";
- else if (!S_ISREG(sbuf.st_mode))
- cp = ".rhosts not regular file";
- else if (fstat(fileno(hostf), &sbuf) < 0)
- cp = ".rhosts fstat failed";
- else if (sbuf.st_uid && sbuf.st_uid != pwd->pw_uid)
- cp = "bad .rhosts owner";
- else if (sbuf.st_mode & (S_IWGRP|S_IWOTH))
- cp = ".rhosts writeable by other than owner";
- /* If there were any problems, quit. */
- if (cp) {
- __rcmd_errstr = cp;
- (void)fclose(hostf);
- return (-1);
- }
- goto again;
- }
- return (-1);
-}
-
-/*
- * XXX
- * Don't make static, used by lpd(8).
- *
- * Returns 0 if ok, -1 if not ok.
- */
-int
-__ivaliduser(hostf, raddr, luser, ruser)
- FILE *hostf;
- u_int32_t raddr;
- const char *luser, *ruser;
-{
- struct sockaddr_in sin;
- int sin_len;
-
- memset(&sin, 0, sizeof(sin));
- sin.sin_family = AF_INET;
- sin_len = sizeof(struct sockaddr_in);
- memcpy(&sin.sin_addr, &raddr, sizeof(sin.sin_addr));
- return __ivaliduser_sa(hostf, (struct sockaddr *)&sin, sin_len,
- luser, ruser);
-}
-
-/*
- * Returns 0 if ok, -1 if not ok.
- *
- * XXX obsolete API.
- */
-int
-__ivaliduser_af(hostf, raddr, luser, ruser, af, len)
- FILE *hostf;
- const void *raddr;
- const char *luser, *ruser;
- int af, len;
-{
- struct sockaddr *sa = NULL;
- struct sockaddr_in *sin = NULL;
-#ifdef INET6
- struct sockaddr_in6 *sin6 = NULL;
-#endif
- struct sockaddr_storage ss;
-
- memset(&ss, 0, sizeof(ss));
- switch (af) {
- case AF_INET:
- if (len != sizeof(sin->sin_addr))
- return -1;
- sin = (struct sockaddr_in *)&ss;
- sin->sin_family = AF_INET;
- memcpy(&sin->sin_addr, raddr, sizeof(sin->sin_addr));
- break;
-#ifdef INET6
- case AF_INET6:
- if (len != sizeof(sin6->sin6_addr))
- return -1;
- /* you will lose scope info */
- sin6 = (struct sockaddr_in6 *)&ss;
- sin6->sin6_family = AF_INET6;
- memcpy(&sin6->sin6_addr, raddr, sizeof(sin6->sin6_addr));
- break;
-#endif
- default:
- return -1;
- }
-
- sa = (struct sockaddr *)&ss;
- return __ivaliduser_sa(hostf, sa, 0, luser, ruser);
-}
-
-int
-__ivaliduser_sa(hostf, raddr, salen, luser, ruser)
- FILE *hostf;
- const struct sockaddr *raddr;
- socklen_t salen;
- const char *luser, *ruser;
-{
- char *user, *p;
- int ch;
- char buf[MAXHOSTNAMELEN + 128]; /* host + login */
- char hname[MAXHOSTNAMELEN];
- /* Presumed guilty until proven innocent. */
- int userok = 0, hostok = 0;
-#ifdef YP
- char *ypdomain;
-
- if (yp_get_default_domain(&ypdomain))
- ypdomain = NULL;
-#else
-#define ypdomain NULL
-#endif
- /* We need to get the damn hostname back for netgroup matching. */
- if (getnameinfo(raddr, salen, hname, sizeof(hname), NULL, 0,
- NI_NAMEREQD) != 0)
- return (-1);
-
- while (fgets(buf, sizeof(buf), hostf)) {
- p = buf;
- /* Skip lines that are too long. */
- if (strchr(p, '\n') == NULL) {
- while ((ch = getc(hostf)) != '\n' && ch != EOF);
- continue;
- }
- if (*p == '\n' || *p == '#') {
- /* comment... */
- continue;
- }
- while (*p != '\n' && *p != ' ' && *p != '\t' && *p != '\0') {
- *p = isupper((unsigned char)*p) ? tolower((unsigned char)*p) : *p;
- p++;
- }
- if (*p == ' ' || *p == '\t') {
- *p++ = '\0';
- while (*p == ' ' || *p == '\t')
- p++;
- user = p;
- while (*p != '\n' && *p != ' ' &&
- *p != '\t' && *p != '\0')
- p++;
- } else
- user = p;
- *p = '\0';
- /*
- * Do +/- and +@/-@ checking. This looks really nasty,
- * but it matches SunOS's behavior so far as I can tell.
- */
- switch(buf[0]) {
- case '+':
- if (!buf[1]) { /* '+' matches all hosts */
- hostok = 1;
- break;
- }
- if (buf[1] == '@') /* match a host by netgroup */
- hostok = innetgr((char *)&buf[2],
- (char *)&hname, NULL, ypdomain);
- else /* match a host by addr */
- hostok = __icheckhost(raddr, salen,
- (char *)&buf[1]);
- break;
- case '-': /* reject '-' hosts and all their users */
- if (buf[1] == '@') {
- if (innetgr((char *)&buf[2],
- (char *)&hname, NULL, ypdomain))
- return(-1);
- } else {
- if (__icheckhost(raddr, salen,
- (char *)&buf[1]))
- return(-1);
- }
- break;
- default: /* if no '+' or '-', do a simple match */
- hostok = __icheckhost(raddr, salen, buf);
- break;
- }
- switch(*user) {
- case '+':
- if (!*(user+1)) { /* '+' matches all users */
- userok = 1;
- break;
- }
- if (*(user+1) == '@') /* match a user by netgroup */
- userok = innetgr(user+2, NULL, ruser, ypdomain);
- else /* match a user by direct specification */
- userok = !(strcmp(ruser, user+1));
- break;
- case '-': /* if we matched a hostname, */
- if (hostok) { /* check for user field rejections */
- if (!*(user+1))
- return(-1);
- if (*(user+1) == '@') {
- if (innetgr(user+2, NULL,
- ruser, ypdomain))
- return(-1);
- } else {
- if (!strcmp(ruser, user+1))
- return(-1);
- }
- }
- break;
- default: /* no rejections: try to match the user */
- if (hostok)
- userok = !(strcmp(ruser,*user ? user : luser));
- break;
- }
- if (hostok && userok)
- return(0);
- }
- return (-1);
-}
-
-/*
- * Returns "true" if match, 0 if no match.
- *
- * NI_WITHSCOPEID is useful for comparing sin6_scope_id portion
- * if af == AF_INET6.
- */
-static int
-__icheckhost(raddr, salen, lhost)
- const struct sockaddr *raddr;
- socklen_t salen;
- const char *lhost;
-{
- struct sockaddr_in sin;
- struct sockaddr_in6 *sin6;
- struct addrinfo hints, *res, *r;
- int error;
- char h1[NI_MAXHOST], h2[NI_MAXHOST];
-
- if (raddr->sa_family == AF_INET6) {
- sin6 = (struct sockaddr_in6 *)raddr;
- if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
- memset(&sin, 0, sizeof(sin));
- sin.sin_family = AF_INET;
- memcpy(&sin.sin_addr, &sin6->sin6_addr.s6_addr[12],
- sizeof(sin.sin_addr));
- raddr = (struct sockaddr *)&sin;
- salen = sizeof(struct sockaddr_in);
- }
- }
-
- h1[0] = '\0';
- if (getnameinfo(raddr, salen, h1, sizeof(h1), NULL, 0,
- NI_NUMERICHOST | NI_WITHSCOPEID) != 0)
- return (0);
-
- /* Resolve laddr into sockaddr */
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = raddr->sa_family;
- hints.ai_socktype = SOCK_DGRAM; /*XXX dummy*/
- res = NULL;
- error = getaddrinfo(lhost, "0", &hints, &res);
- if (error)
- return (0);
-
- for (r = res; r ; r = r->ai_next) {
- h2[0] = '\0';
- if (getnameinfo(r->ai_addr, r->ai_addrlen, h2, sizeof(h2),
- NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID) != 0)
- continue;
- if (strcmp(h1, h2) == 0) {
- freeaddrinfo(res);
- return (1);
- }
- }
-
- /* No match. */
- freeaddrinfo(res);
- return (0);
-}
diff --git a/newlib/libc/sys/linux/net/rcmdsh.3 b/newlib/libc/sys/linux/net/rcmdsh.3
deleted file mode 100644
index 43e6a8daa..000000000
--- a/newlib/libc/sys/linux/net/rcmdsh.3
+++ /dev/null
@@ -1,116 +0,0 @@
-.\" $OpenBSD: rcmdsh.3,v 1.6 1999/07/05 04:41:00 aaron Exp $
-.\"
-.\" Copyright (c) 1983, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $FreeBSD: src/lib/libc/net/rcmdsh.3,v 1.2 2001/11/09 15:19:25 ru Exp $
-.\"
-.Dd September 1, 1996
-.Dt RCMDSH 3
-.Os
-.Sh NAME
-.Nm rcmdsh
-.Nd return a stream to a remote command without superuser
-.Sh SYNOPSIS
-.In unistd.h
-.Ft int
-.Fo rcmdsh
-.Fa "char **ahost"
-.Fa "int inport"
-.Fa "const char *locuser"
-.Fa "const char *remuser"
-.Fa "const char *cmd"
-.Fa "const char *rshprog"
-.Fc
-.Sh DESCRIPTION
-The
-.Fn rcmdsh
-function
-is used by normal users to execute a command on
-a remote machine using an authentication scheme based
-on reserved port numbers using
-.Xr rshd 8
-or the value of
-.Fa rshprog
-(if
-.No non- Ns Dv NULL ) .
-.Pp
-The
-.Fn rcmdsh
-function
-looks up the host
-.Fa *ahost
-using
-.Xr gethostbyname 3 ,
-returning \-1 if the host does not exist.
-Otherwise
-.Fa *ahost
-is set to the standard name of the host
-and a connection is established to a server
-residing at the well-known Internet port
-.Dq Li shell/tcp
-(or whatever port is used by
-.Fa rshprog ) .
-The parameter
-.Fa inport
-is ignored; it is only included to provide an interface similar to
-.Xr rcmd 3 .
-.Pp
-If the connection succeeds,
-a socket in the
-.Ux
-domain of type
-.Dv SOCK_STREAM
-is returned to the caller, and given to the remote
-command as stdin, stdout, and stderr.
-.Sh RETURN VALUES
-The
-.Fn rcmdsh
-function
-returns a valid socket descriptor on success.
-Otherwise, \-1 is returned
-and a diagnostic message is printed on the standard error.
-.Sh SEE ALSO
-.Xr rsh 1 ,
-.Xr socketpair 2 ,
-.Xr rcmd 3 ,
-.Xr rshd 8
-.Sh BUGS
-If
-.Xr rsh 1
-encounters an error, a file descriptor is still returned instead of \-1.
-.Sh HISTORY
-The
-.Fn rcmdsh
-function first appeared in
-.Ox 2.0 ,
-and made its way into
-.Fx 5.0 .
diff --git a/newlib/libc/sys/linux/net/rcmdsh.c b/newlib/libc/sys/linux/net/rcmdsh.c
deleted file mode 100644
index 741814c11..000000000
--- a/newlib/libc/sys/linux/net/rcmdsh.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/* $OpenBSD: rcmdsh.c,v 1.5 1998/04/25 16:23:58 millert Exp $ */
-
-/*
- * Copyright (c) 2001, MagniComp
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the MagniComp nor the names of its contributors may
- * be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * This is an rcmd() replacement originally by
- * Chris Siebenmann <cks@utcc.utoronto.ca>.
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/endian.h>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/wait.h>
-
-#include <errno.h>
-#include <netdb.h>
-#include <paths.h>
-#include <pwd.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-#ifndef _PATH_RSH
-#define _PATH_RSH "/usr/bin/rsh"
-#endif
-
-/*
- * This is a replacement rcmd() function that uses the rsh(1)
- * program in place of a direct rcmd(3) function call so as to
- * avoid having to be root. Note that rport is ignored.
- */
-int
-rcmdsh(ahost, rport, locuser, remuser, cmd, rshprog)
- char **ahost;
- int rport;
- const char *locuser, *remuser, *cmd, *rshprog;
-{
- struct addrinfo hints, *res;
- int cpid, sp[2], error;
- char *p;
- struct passwd *pw;
- char num[8];
- static char hbuf[NI_MAXHOST];
-
- /* What rsh/shell to use. */
- if (rshprog == NULL)
- rshprog = _PATH_RSH;
-
- /* locuser must exist on this host. */
- if ((pw = getpwnam(locuser)) == NULL) {
- (void)fprintf(stderr, "rcmdsh: unknown user: %s\n", locuser);
- return (-1);
- }
-
- /* Validate remote hostname. */
- if (strcmp(*ahost, "localhost") != 0) {
- memset(&hints, 0, sizeof(hints));
- hints.ai_flags = AI_CANONNAME;
- hints.ai_family = PF_UNSPEC;
- hints.ai_socktype = SOCK_STREAM;
- (void)snprintf(num, sizeof(num), "%d", ntohs(rport));
- error = getaddrinfo(*ahost, num, &hints, &res);
- if (error) {
- fprintf(stderr, "rcmdsh: getaddrinfo: %s\n",
- gai_strerror(error));
- return (-1);
- }
- if (res->ai_canonname) {
- strncpy(hbuf, res->ai_canonname, sizeof(hbuf) - 1);
- hbuf[sizeof(hbuf) - 1] = '\0';
- *ahost = hbuf;
- }
- freeaddrinfo(res);
- }
-
- /* Get a socketpair we'll use for stdin and stdout. */
- if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, sp) == -1) {
- perror("rcmdsh: socketpair");
- return (-1);
- }
-
- cpid = fork();
- if (cpid == -1) {
- perror("rcmdsh: fork failed");
- return (-1);
- } else if (cpid == 0) {
- /*
- * Child. We use sp[1] to be stdin/stdout, and close sp[0].
- */
- (void)close(sp[0]);
- if (dup2(sp[1], 0) == -1 || dup2(0, 1) == -1) {
- perror("rcmdsh: dup2 failed");
- _exit(255);
- }
- /* Fork again to lose parent. */
- cpid = fork();
- if (cpid == -1) {
- perror("rcmdsh: fork to lose parent failed");
- _exit(255);
- }
- if (cpid > 0)
- _exit(0);
-
- /* In grandchild here. Become local user for rshprog. */
- if (setuid(pw->pw_uid) == -1) {
- (void)fprintf(stderr, "rcmdsh: setuid(%u): %s\n",
- pw->pw_uid, strerror(errno));
- _exit(255);
- }
-
- /*
- * If remote host is "localhost" and local and remote users
- * are the same, avoid running remote shell for efficiency.
- */
- if (strcmp(*ahost, "localhost") == 0 &&
- strcmp(locuser, remuser) == 0) {
- if (pw->pw_shell[0] == '\0')
- rshprog = _PATH_BSHELL;
- else
- rshprog = pw->pw_shell;
- p = strrchr(rshprog, '/');
- execlp(rshprog, p ? p + 1 : rshprog, "-c", cmd,
- (char *)NULL);
- } else {
- p = strrchr(rshprog, '/');
- execlp(rshprog, p ? p + 1 : rshprog, *ahost, "-l",
- remuser, cmd, (char *)NULL);
- }
- (void)fprintf(stderr, "rcmdsh: execlp %s failed: %s\n",
- rshprog, strerror(errno));
- _exit(255);
- } else {
- /* Parent. close sp[1], return sp[0]. */
- (void)close(sp[1]);
- /* Reap child. */
- (void)wait(NULL);
- return (sp[0]);
- }
- /* NOTREACHED */
-}
diff --git a/newlib/libc/sys/linux/net/recv.c b/newlib/libc/sys/linux/net/recv.c
deleted file mode 100644
index 43e537bbb..000000000
--- a/newlib/libc/sys/linux/net/recv.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)recv.c 8.2 (Berkeley) 2/21/94";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include "namespace.h"
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <stddef.h>
-#include "un-namespace.h"
-
-ssize_t
-recv(s, buf, len, flags)
- int s, flags;
- size_t len;
- void *buf;
-{
- return (recvfrom(s, buf, len, flags, NULL, 0));
-}
diff --git a/newlib/libc/sys/linux/net/res_comp.c b/newlib/libc/sys/linux/net/res_comp.c
deleted file mode 100644
index 12ea02c6d..000000000
--- a/newlib/libc/sys/linux/net/res_comp.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: res_comp.c,v 8.11 1997/05/21 19:31:04 halley Exp $";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-#define BIND_4_COMPAT
-
-/*
- * Expand compressed domain name 'comp_dn' to full domain name.
- * 'msg' is a pointer to the begining of the message,
- * 'eomorig' points to the first location after the message,
- * 'exp_dn' is a pointer to a buffer of size 'length' for the result.
- * Return size of compressed name or -1 if there was an error.
- */
-int
-dn_expand(const u_char *msg, const u_char *eom, const u_char *src,
- char *dst, int dstsiz)
-{
- int n = ns_name_uncompress(msg, eom, src, dst, (size_t)dstsiz);
-
- if (n > 0 && dst[0] == '.')
- dst[0] = '\0';
- return (n);
-}
-
-/*
- * Pack domain name 'exp_dn' in presentation form into 'comp_dn'.
- * Return the size of the compressed name or -1.
- * 'length' is the size of the array pointed to by 'comp_dn'.
- */
-int
-dn_comp(const char *src, u_char *dst, int dstsiz,
- u_char **dnptrs, u_char **lastdnptr)
-{
- return (ns_name_compress(src, dst, (size_t)dstsiz,
- (const u_char **)dnptrs,
- (const u_char **)lastdnptr));
-}
-
-/*
- * Skip over a compressed domain name. Return the size or -1.
- */
-int
-dn_skipname(const u_char *ptr, const u_char *eom) {
- const u_char *saveptr = ptr;
-
- if (ns_name_skip(&ptr, eom) == -1)
- return (-1);
- return (ptr - saveptr);
-}
-
-/*
- * Verify that a domain name uses an acceptable character set.
- */
-
-/*
- * Note the conspicuous absence of ctype macros in these definitions. On
- * non-ASCII hosts, we can't depend on string literals or ctype macros to
- * tell us anything about network-format data. The rest of the BIND system
- * is not careful about this, but for some reason, we're doing it right here.
- */
-#define PERIOD 0x2e
-#define hyphenchar(c) ((c) == 0x2d)
-#define bslashchar(c) ((c) == 0x5c)
-#define periodchar(c) ((c) == PERIOD)
-#define asterchar(c) ((c) == 0x2a)
-#define alphachar(c) (((c) >= 0x41 && (c) <= 0x5a) \
- || ((c) >= 0x61 && (c) <= 0x7a))
-#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)
-
-#define borderchar(c) (alphachar(c) || digitchar(c))
-#define middlechar(c) (borderchar(c) || hyphenchar(c))
-#define domainchar(c) ((c) > 0x20 && (c) < 0x7f)
-
-int
-res_hnok(dn)
- const char *dn;
-{
- int ppch = '\0', pch = PERIOD, ch = *dn++;
-
- while (ch != '\0') {
- int nch = *dn++;
-
- if (periodchar(ch)) {
- (void)NULL;
- } else if (periodchar(pch)) {
- if (!borderchar(ch))
- return (0);
- } else if (periodchar(nch) || nch == '\0') {
- if (!borderchar(ch))
- return (0);
- } else {
- if (!middlechar(ch))
- return (0);
- }
- ppch = pch, pch = ch, ch = nch;
- }
- return (1);
-}
-
-/*
- * hostname-like (A, MX, WKS) owners can have "*" as their first label
- * but must otherwise be as a host name.
- */
-int
-res_ownok(dn)
- const char *dn;
-{
- if (asterchar(dn[0])) {
- if (periodchar(dn[1]))
- return (res_hnok(dn+2));
- if (dn[1] == '\0')
- return (1);
- }
- return (res_hnok(dn));
-}
-
-/*
- * SOA RNAMEs and RP RNAMEs can have any printable character in their first
- * label, but the rest of the name has to look like a host name.
- */
-int
-res_mailok(dn)
- const char *dn;
-{
- int ch, escaped = 0;
-
- /* "." is a valid missing representation */
- if (*dn == '\0')
- return (1);
-
- /* otherwise <label>.<hostname> */
- while ((ch = *dn++) != '\0') {
- if (!domainchar(ch))
- return (0);
- if (!escaped && periodchar(ch))
- break;
- if (escaped)
- escaped = 0;
- else if (bslashchar(ch))
- escaped = 1;
- }
- if (periodchar(ch))
- return (res_hnok(dn));
- return (0);
-}
-
-/*
- * This function is quite liberal, since RFC 1034's character sets are only
- * recommendations.
- */
-int
-res_dnok(dn)
- const char *dn;
-{
- int ch;
-
- while ((ch = *dn++) != '\0')
- if (!domainchar(ch))
- return (0);
- return (1);
-}
-
-#ifdef BIND_4_COMPAT
-/*
- * This module must export the following externally-visible symbols:
- * ___putlong
- * ___putshort
- * __getlong
- * __getshort
- * Note that one _ comes from C and the others come from us.
- */
-void __putlong(u_int32_t src, u_char *dst) { ns_put32(src, dst); }
-void __putshort(u_int16_t src, u_char *dst) { ns_put16(src, dst); }
-u_int32_t _getlong(const u_char *src) { return (ns_get32(src)); }
-u_int16_t _getshort(const u_char *src) { return (ns_get16(src)); }
-#endif /*BIND_4_COMPAT*/
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <resolv.h>.
- */
-#undef dn_comp
-__weak_reference(__dn_comp, dn_comp);
-#undef dn_expand
-__weak_reference(__dn_expand, dn_expand);
diff --git a/newlib/libc/sys/linux/net/res_config.h b/newlib/libc/sys/linux/net/res_config.h
deleted file mode 100644
index b7deb38f9..000000000
--- a/newlib/libc/sys/linux/net/res_config.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* $FreeBSD: src/lib/libc/net/res_config.h,v 1.8 2002/03/22 23:41:54 obrien Exp $ */
-
-#define DEBUG 1 /* enable debugging code (needed for dig) */
-#define RESOLVSORT /* allow sorting of addresses in gethostbyname */
-#define RFC1535 /* comply with RFC1535 (STRONGLY reccomended by vixie)*/
-#undef USELOOPBACK /* res_init() bind to localhost */
-#undef SUNSECURITY /* verify gethostbyaddr() calls - WE DONT NEED IT */
-#define MULTI_PTRS_ARE_ALIASES 1 /* fold multiple PTR records into aliases */
-#define CHECK_SRVR_ADDR 1 /* confirm that the server requested sent the reply */
-#define BIND_UPDATE 1 /* update support */
diff --git a/newlib/libc/sys/linux/net/res_data.c b/newlib/libc/sys/linux/net/res_data.c
deleted file mode 100644
index 7db548078..000000000
--- a/newlib/libc/sys/linux/net/res_data.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1995,1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "res_config.h"
-
-const char *_res_opcodes[] = {
- "QUERY",
- "IQUERY",
- "CQUERYM",
- "CQUERYU", /* experimental */
- "NOTIFY", /* experimental */
- "UPDATE",
- "6",
- "7",
- "8",
- "9",
- "10",
- "11",
- "12",
- "13",
- "ZONEINIT",
- "ZONEREF",
-};
-
-const char *_res_resultcodes[] = {
- "NOERROR",
- "FORMERR",
- "SERVFAIL",
- "NXDOMAIN",
- "NOTIMP",
- "REFUSED",
- "YXDOMAIN",
- "YXRRSET",
- "NXRRSET",
- "NOTAUTH",
- "ZONEERR",
- "11",
- "12",
- "13",
- "14",
- "NOCHANGE",
-};
-
-#ifdef BIND_UPDATE
-const char *_res_sectioncodes[] = {
- "ZONE",
- "PREREQUISITES",
- "UPDATE",
- "ADDITIONAL",
-};
-#endif
diff --git a/newlib/libc/sys/linux/net/res_debug.c b/newlib/libc/sys/linux/net/res_debug.c
deleted file mode 100644
index 786f633f4..000000000
--- a/newlib/libc/sys/linux/net/res_debug.c
+++ /dev/null
@@ -1,1003 +0,0 @@
-/*
- * Copyright (c) 1985
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1995 by International Business Machines, Inc.
- *
- * International Business Machines, Inc. (hereinafter called IBM) grants
- * permission under its copyrights to use, copy, modify, and distribute this
- * Software with or without fee, provided that the above copyright notice and
- * all paragraphs of this notice appear in all copies, and that the name of IBM
- * not be used in connection with the marketing of any product incorporating
- * the Software or modifications thereof, without specific, written prior
- * permission.
- *
- * To the extent it has a right to do so, IBM grants an immunity from suit
- * under its patents, if any, for the use, sale or manufacture of products to
- * the extent that such products are used for performing Domain Name System
- * dynamic updates in TCP/IP networks by means of the Software. No immunity is
- * granted for any product per se or for any other function of any product.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
- * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
- * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <math.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#define SPRINTF(x) sprintf x
-
-extern const char *_res_opcodes[];
-extern const char *_res_resultcodes[];
-extern const char *_res_sectioncodes[];
-
-/*
- * Print the current options.
- */
-void
-fp_resstat(struct __res_state *statp, FILE *file) {
- u_long mask;
-
- fprintf(file, ";; res options:");
- if (!statp)
- statp = &_res;
- for (mask = 1; mask != 0; mask <<= 1)
- if (statp->options & mask)
- fprintf(file, " %s", p_option(mask));
- putc('\n', file);
-}
-
-static void
-do_section(ns_msg *handle, ns_sect section, int pflag, FILE *file) {
- int n, sflag, rrnum;
- char buf[2048]; /* XXX need to malloc */
- ns_opcode opcode;
- ns_rr rr;
-
- /*
- * Print answer records.
- */
- sflag = (_res.pfcode & pflag);
- if (_res.pfcode && !sflag)
- return;
-
- opcode = ns_msg_getflag(*handle, ns_f_opcode);
- rrnum = 0;
- for (;;) {
- if (ns_parserr(handle, section, rrnum, &rr)) {
- if (errno != ENODEV)
- fprintf(file, ";; ns_parserr: %s\n",
- strerror(errno));
- else if (rrnum > 0 && sflag != 0 &&
- (_res.pfcode & RES_PRF_HEAD1))
- putc('\n', file);
- return;
- }
- if (rrnum == 0 && sflag != 0 && (_res.pfcode & RES_PRF_HEAD1))
- fprintf(file, ";; %s SECTION:\n",
- p_section(section, opcode));
- if (section == ns_s_qd)
- fprintf(file, ";;\t%s, type = %s, class = %s\n",
- ns_rr_name(rr),
- p_type(ns_rr_type(rr)),
- p_class(ns_rr_class(rr)));
- else {
- n = ns_sprintrr(handle, &rr, NULL, NULL,
- buf, sizeof buf);
- if (n < 0) {
- fprintf(file, ";; ns_sprintrr: %s\n",
- strerror(errno));
- return;
- }
- fputs(buf, file);
- fputc('\n', file);
- }
- rrnum++;
- }
-}
-
-void
-p_query(const u_char *msg) {
- fp_query(msg, stdout);
-}
-
-void
-fp_query(const u_char *msg, FILE *file) {
- fp_nquery(msg, PACKETSZ, file);
-}
-
-/*
- * Print the contents of a query.
- * This is intended to be primarily a debugging routine.
- */
-void
-fp_nquery(const u_char *msg, int len, FILE *file) {
- ns_msg handle;
- int qdcount, ancount, nscount, arcount;
- u_int opcode, rcode, id;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1)
- return;
-
- if (ns_initparse(msg, len, &handle) < 0) {
- fprintf(file, ";; ns_initparse: %s\n", strerror(errno));
- return;
- }
- opcode = ns_msg_getflag(handle, ns_f_opcode);
- rcode = ns_msg_getflag(handle, ns_f_rcode);
- id = ns_msg_id(handle);
- qdcount = ns_msg_count(handle, ns_s_qd);
- ancount = ns_msg_count(handle, ns_s_an);
- nscount = ns_msg_count(handle, ns_s_ns);
- arcount = ns_msg_count(handle, ns_s_ar);
-
- /*
- * Print header fields.
- */
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX) || rcode)
- fprintf(file,
- ";; ->>HEADER<<- opcode: %s, status: %s, id: %d\n",
- _res_opcodes[opcode], _res_resultcodes[rcode], id);
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX))
- putc(';', file);
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEAD2)) {
- fprintf(file, "; flags:");
- if (ns_msg_getflag(handle, ns_f_qr))
- fprintf(file, " qr");
- if (ns_msg_getflag(handle, ns_f_aa))
- fprintf(file, " aa");
- if (ns_msg_getflag(handle, ns_f_tc))
- fprintf(file, " tc");
- if (ns_msg_getflag(handle, ns_f_rd))
- fprintf(file, " rd");
- if (ns_msg_getflag(handle, ns_f_ra))
- fprintf(file, " ra");
- if (ns_msg_getflag(handle, ns_f_z))
- fprintf(file, " ??");
- if (ns_msg_getflag(handle, ns_f_ad))
- fprintf(file, " ad");
- if (ns_msg_getflag(handle, ns_f_cd))
- fprintf(file, " cd");
- }
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEAD1)) {
- fprintf(file, "; %s: %d",
- p_section(ns_s_qd, opcode), qdcount);
- fprintf(file, ", %s: %d",
- p_section(ns_s_an, opcode), ancount);
- fprintf(file, ", %s: %d",
- p_section(ns_s_ns, opcode), nscount);
- fprintf(file, ", %s: %d",
- p_section(ns_s_ar, opcode), arcount);
- }
- if ((!_res.pfcode) || (_res.pfcode &
- (RES_PRF_HEADX | RES_PRF_HEAD2 | RES_PRF_HEAD1))) {
- putc('\n',file);
- }
- /*
- * Print the various sections.
- */
- do_section(&handle, ns_s_qd, RES_PRF_QUES, file);
- do_section(&handle, ns_s_an, RES_PRF_ANS, file);
- do_section(&handle, ns_s_ns, RES_PRF_AUTH, file);
- do_section(&handle, ns_s_ar, RES_PRF_ADD, file);
- if (qdcount == 0 && ancount == 0 &&
- nscount == 0 && arcount == 0)
- putc('\n', file);
-}
-
-const u_char *
-p_cdnname(const u_char *cp, const u_char *msg, int len, FILE *file) {
- char name[MAXDNAME];
- int n;
-
- if ((n = dn_expand(msg, msg + len, cp, name, sizeof name)) < 0)
- return (NULL);
- if (name[0] == '\0')
- putc('.', file);
- else
- fputs(name, file);
- return (cp + n);
-}
-
-const u_char *
-p_cdname(const u_char *cp, const u_char *msg, FILE *file) {
- return (p_cdnname(cp, msg, PACKETSZ, file));
-}
-
-/* Return a fully-qualified domain name from a compressed name (with
- length supplied). */
-
-const u_char *
-p_fqnname(cp, msg, msglen, name, namelen)
- const u_char *cp, *msg;
- int msglen;
- char *name;
- int namelen;
-{
- int n, newlen;
-
- if ((n = dn_expand(msg, cp + msglen, cp, name, namelen)) < 0)
- return (NULL);
- newlen = strlen(name);
- if (newlen == 0 || name[newlen - 1] != '.') {
- if (newlen + 1 >= namelen) /* Lack space for final dot */
- return (NULL);
- else
- strcpy(name + newlen, ".");
- }
- return (cp + n);
-}
-
-/* XXX: the rest of these functions need to become length-limited, too. */
-
-const u_char *
-p_fqname(const u_char *cp, const u_char *msg, FILE *file) {
- char name[MAXDNAME];
- const u_char *n;
-
- n = p_fqnname(cp, msg, MAXCDNAME, name, sizeof name);
- if (n == NULL)
- return (NULL);
- fputs(name, file);
- return (n);
-}
-
-/*
- * Names of RR classes and qclasses. Classes and qclasses are the same, except
- * that C_ANY is a qclass but not a class. (You can ask for records of class
- * C_ANY, but you can't have any records of that class in the database.)
- */
-const struct res_sym __p_class_syms[] = {
- {C_IN, "IN"},
- {C_CHAOS, "CHAOS"},
- {C_HS, "HS"},
- {C_HS, "HESIOD"},
- {C_ANY, "ANY"},
- {C_NONE, "NONE"},
- {C_IN, (char *)0}
-};
-
-/*
- * Names of message sections.
- */
-const struct res_sym __p_default_section_syms[] = {
- {ns_s_qd, "QUERY"},
- {ns_s_an, "ANSWER"},
- {ns_s_ns, "AUTHORITY"},
- {ns_s_ar, "ADDITIONAL"},
- {0, (char *)0}
-};
-
-const struct res_sym __p_update_section_syms[] = {
- {S_ZONE, "ZONE"},
- {S_PREREQ, "PREREQUISITE"},
- {S_UPDATE, "UPDATE"},
- {S_ADDT, "ADDITIONAL"},
- {0, (char *)0}
-};
-
-/*
- * Names of RR types and qtypes. Types and qtypes are the same, except
- * that T_ANY is a qtype but not a type. (You can ask for records of type
- * T_ANY, but you can't have any records of that type in the database.)
- */
-const struct res_sym __p_type_syms[] = {
- {T_A, "A", "address"},
- {T_NS, "NS", "name server"},
- {T_MD, "MD", "mail destination (deprecated)"},
- {T_MF, "MF", "mail forwarder (deprecated)"},
- {T_CNAME, "CNAME", "canonical name"},
- {T_SOA, "SOA", "start of authority"},
- {T_MB, "MB", "mailbox"},
- {T_MG, "MG", "mail group member"},
- {T_MR, "MR", "mail rename"},
- {T_NULL, "NULL", "null"},
- {T_WKS, "WKS", "well-known service (deprecated)"},
- {T_PTR, "PTR", "domain name pointer"},
- {T_HINFO, "HINFO", "host information"},
- {T_MINFO, "MINFO", "mailbox information"},
- {T_MX, "MX", "mail exchanger"},
- {T_TXT, "TXT", "text"},
- {T_RP, "RP", "responsible person"},
- {T_AFSDB, "AFSDB", "DCE or AFS server"},
- {T_X25, "X25", "X25 address"},
- {T_ISDN, "ISDN", "ISDN address"},
- {T_RT, "RT", "router"},
- {T_NSAP, "NSAP", "nsap address"},
- {T_NSAP_PTR, "NSAP_PTR", "domain name pointer"},
- {T_SIG, "SIG", "signature"},
- {T_KEY, "KEY", "key"},
- {T_PX, "PX", "mapping information"},
- {T_GPOS, "GPOS", "geographical position (withdrawn)"},
- {T_AAAA, "AAAA", "IPv6 address"},
- {T_LOC, "LOC", "location"},
- {T_NXT, "NXT", "next valid name (unimplemented)"},
- {T_EID, "EID", "endpoint identifier (unimplemented)"},
- {T_NIMLOC, "NIMLOC", "NIMROD locator (unimplemented)"},
- {T_SRV, "SRV", "server selection"},
- {T_ATMA, "ATMA", "ATM address (unimplemented)"},
- {T_IXFR, "IXFR", "incremental zone transfer"},
- {T_AXFR, "AXFR", "zone transfer"},
- {T_MAILB, "MAILB", "mailbox-related data (deprecated)"},
- {T_MAILA, "MAILA", "mail agent (deprecated)"},
- {T_NAPTR, "NAPTR", "URN Naming Authority"},
- {T_ANY, "ANY", "\"any\""},
- {0, NULL, NULL}
-};
-
-int
-sym_ston(const struct res_sym *syms, const char *name, int *success) {
- for ((void)NULL; syms->name != 0; syms++) {
- if (strcasecmp (name, syms->name) == 0) {
- if (success)
- *success = 1;
- return (syms->number);
- }
- }
- if (success)
- *success = 0;
- return (syms->number); /* The default value. */
-}
-
-const char *
-sym_ntos(const struct res_sym *syms, int number, int *success) {
- static char unname[20];
-
- for ((void)NULL; syms->name != 0; syms++) {
- if (number == syms->number) {
- if (success)
- *success = 1;
- return (syms->name);
- }
- }
-
- sprintf(unname, "%d", number);
- if (success)
- *success = 0;
- return (unname);
-}
-
-const char *
-sym_ntop(const struct res_sym *syms, int number, int *success) {
- static char unname[20];
-
- for ((void)NULL; syms->name != 0; syms++) {
- if (number == syms->number) {
- if (success)
- *success = 1;
- return (syms->humanname);
- }
- }
- sprintf(unname, "%d", number);
- if (success)
- *success = 0;
- return (unname);
-}
-
-/*
- * Return a string for the type.
- */
-const char *
-p_type(int type) {
- return (sym_ntos(__p_type_syms, type, (int *)0));
-}
-
-/*
- * Return a string for the type.
- */
-const char *
-p_section(int section, int opcode) {
- const struct res_sym *symbols;
-
- switch (opcode) {
- case ns_o_update:
- symbols = __p_update_section_syms;
- break;
- default:
- symbols = __p_default_section_syms;
- break;
- }
- return (sym_ntos(symbols, section, (int *)0));
-}
-
-/*
- * Return a mnemonic for class.
- */
-const char *
-p_class(int class) {
- return (sym_ntos(__p_class_syms, class, (int *)0));
-}
-
-/*
- * Return a mnemonic for an option
- */
-const char *
-p_option(u_long option) {
- static char nbuf[40];
-
- switch (option) {
- case RES_INIT: return "init";
- case RES_DEBUG: return "debug";
- case RES_AAONLY: return "aaonly(unimpl)";
- case RES_USEVC: return "usevc";
- case RES_PRIMARY: return "primry(unimpl)";
- case RES_IGNTC: return "igntc";
- case RES_RECURSE: return "recurs";
- case RES_DEFNAMES: return "defnam";
- case RES_STAYOPEN: return "styopn";
- case RES_DNSRCH: return "dnsrch";
- case RES_INSECURE1: return "insecure1";
- case RES_INSECURE2: return "insecure2";
- case RES_NOALIASES: return "noaliases";
- case RES_USE_INET6: return "inet6";
- case RES_NOTLDQUERY: return "no-tld-query";
- case RES_USE_EDNS0: return "edns0";
- default: sprintf(nbuf, "?0x%lx?", (u_long)option);
- return (nbuf);
- }
-}
-
-/*
- * Return a mnemonic for a time to live.
- */
-const char *
-p_time(u_int32_t value) {
- static char nbuf[40];
-
- if (ns_format_ttl(value, nbuf, sizeof nbuf) < 0)
- sprintf(nbuf, "%u", value);
- return (nbuf);
-}
-
-
-/*
- * routines to convert between on-the-wire RR format and zone file format.
- * Does not contain conversion to/from decimal degrees; divide or multiply
- * by 60*60*1000 for that.
- */
-
-static unsigned int poweroften[10] = {1, 10, 100, 1000, 10000, 100000,
- 1000000,10000000,100000000,1000000000};
-
-/* takes an XeY precision/size value, returns a string representation. */
-static const char *
-precsize_ntoa(prec)
- u_int8_t prec;
-{
- static char retbuf[sizeof "90000000.00"];
- unsigned long val;
- int mantissa, exponent;
-
- mantissa = (int)((prec >> 4) & 0x0f) % 10;
- exponent = (int)((prec >> 0) & 0x0f) % 10;
-
- val = mantissa * poweroften[exponent];
-
- (void) sprintf(retbuf, "%ld.%.2ld", val/100, val%100);
- return (retbuf);
-}
-
-/* converts ascii size/precision X * 10**Y(cm) to 0xXY. moves pointer. */
-static u_int8_t
-precsize_aton(strptr)
- char **strptr;
-{
- unsigned int mval = 0, cmval = 0;
- u_int8_t retval = 0;
- char *cp;
- int exponent;
- int mantissa;
-
- cp = *strptr;
-
- while (isdigit((unsigned char)*cp))
- mval = mval * 10 + (*cp++ - '0');
-
- if (*cp == '.') { /* centimeters */
- cp++;
- if (isdigit((unsigned char)*cp)) {
- cmval = (*cp++ - '0') * 10;
- if (isdigit((unsigned char)*cp)) {
- cmval += (*cp++ - '0');
- }
- }
- }
- cmval = (mval * 100) + cmval;
-
- for (exponent = 0; exponent < 9; exponent++)
- if (cmval < poweroften[exponent+1])
- break;
-
- mantissa = cmval / poweroften[exponent];
- if (mantissa > 9)
- mantissa = 9;
-
- retval = (mantissa << 4) | exponent;
-
- *strptr = cp;
-
- return (retval);
-}
-
-/* converts ascii lat/lon to unsigned encoded 32-bit number. moves pointer. */
-static u_int32_t
-latlon2ul(latlonstrptr,which)
- char **latlonstrptr;
- int *which;
-{
- char *cp;
- u_int32_t retval;
- int deg = 0, min = 0, secs = 0, secsfrac = 0;
-
- cp = *latlonstrptr;
-
- while (isdigit((unsigned char)*cp))
- deg = deg * 10 + (*cp++ - '0');
-
- while (isspace((unsigned char)*cp))
- cp++;
-
- if (!(isdigit((unsigned char)*cp)))
- goto fndhemi;
-
- while (isdigit((unsigned char)*cp))
- min = min * 10 + (*cp++ - '0');
-
- while (isspace((unsigned char)*cp))
- cp++;
-
- if (!(isdigit((unsigned char)*cp)))
- goto fndhemi;
-
- while (isdigit((unsigned char)*cp))
- secs = secs * 10 + (*cp++ - '0');
-
- if (*cp == '.') { /* decimal seconds */
- cp++;
- if (isdigit((unsigned char)*cp)) {
- secsfrac = (*cp++ - '0') * 100;
- if (isdigit((unsigned char)*cp)) {
- secsfrac += (*cp++ - '0') * 10;
- if (isdigit((unsigned char)*cp)) {
- secsfrac += (*cp++ - '0');
- }
- }
- }
- }
-
- while (!isspace((unsigned char)*cp)) /* if any trailing garbage */
- cp++;
-
- while (isspace((unsigned char)*cp))
- cp++;
-
- fndhemi:
- switch (*cp) {
- case 'N': case 'n':
- case 'E': case 'e':
- retval = ((unsigned)1<<31)
- + (((((deg * 60) + min) * 60) + secs) * 1000)
- + secsfrac;
- break;
- case 'S': case 's':
- case 'W': case 'w':
- retval = ((unsigned)1<<31)
- - (((((deg * 60) + min) * 60) + secs) * 1000)
- - secsfrac;
- break;
- default:
- retval = 0; /* invalid value -- indicates error */
- break;
- }
-
- switch (*cp) {
- case 'N': case 'n':
- case 'S': case 's':
- *which = 1; /* latitude */
- break;
- case 'E': case 'e':
- case 'W': case 'w':
- *which = 2; /* longitude */
- break;
- default:
- *which = 0; /* error */
- break;
- }
-
- cp++; /* skip the hemisphere */
-
- while (!isspace((unsigned char)*cp)) /* if any trailing garbage */
- cp++;
-
- while (isspace((unsigned char)*cp)) /* move to next field */
- cp++;
-
- *latlonstrptr = cp;
-
- return (retval);
-}
-
-/* converts a zone file representation in a string to an RDATA on-the-wire
- * representation. */
-int
-loc_aton(ascii, binary)
- const char *ascii;
- u_char *binary;
-{
- const char *cp, *maxcp;
- u_char *bcp;
-
- u_int32_t latit = 0, longit = 0, alt = 0;
- u_int32_t lltemp1 = 0, lltemp2 = 0;
- int altmeters = 0, altfrac = 0, altsign = 1;
- u_int8_t hp = 0x16; /* default = 1e6 cm = 10000.00m = 10km */
- u_int8_t vp = 0x13; /* default = 1e3 cm = 10.00m */
- u_int8_t siz = 0x12; /* default = 1e2 cm = 1.00m */
- int which1 = 0, which2 = 0;
-
- cp = ascii;
- maxcp = cp + strlen(ascii);
-
- lltemp1 = latlon2ul(&cp, &which1);
-
- lltemp2 = latlon2ul(&cp, &which2);
-
- switch (which1 + which2) {
- case 3: /* 1 + 2, the only valid combination */
- if ((which1 == 1) && (which2 == 2)) { /* normal case */
- latit = lltemp1;
- longit = lltemp2;
- } else if ((which1 == 2) && (which2 == 1)) { /* reversed */
- longit = lltemp1;
- latit = lltemp2;
- } else { /* some kind of brokenness */
- return (0);
- }
- break;
- default: /* we didn't get one of each */
- return (0);
- }
-
- /* altitude */
- if (*cp == '-') {
- altsign = -1;
- cp++;
- }
-
- if (*cp == '+')
- cp++;
-
- while (isdigit((unsigned char)*cp))
- altmeters = altmeters * 10 + (*cp++ - '0');
-
- if (*cp == '.') { /* decimal meters */
- cp++;
- if (isdigit((unsigned char)*cp)) {
- altfrac = (*cp++ - '0') * 10;
- if (isdigit((unsigned char)*cp)) {
- altfrac += (*cp++ - '0');
- }
- }
- }
-
- alt = (10000000 + (altsign * (altmeters * 100 + altfrac)));
-
- while (!isspace((unsigned char)*cp) && (cp < maxcp)) /* if trailing garbage or m */
- cp++;
-
- while (isspace((unsigned char)*cp) && (cp < maxcp))
- cp++;
-
- if (cp >= maxcp)
- goto defaults;
-
- siz = precsize_aton(&cp);
-
- while (!isspace((unsigned char)*cp) && (cp < maxcp)) /* if trailing garbage or m */
- cp++;
-
- while (isspace((unsigned char)*cp) && (cp < maxcp))
- cp++;
-
- if (cp >= maxcp)
- goto defaults;
-
- hp = precsize_aton(&cp);
-
- while (!isspace((unsigned char)*cp) && (cp < maxcp)) /* if trailing garbage or m */
- cp++;
-
- while (isspace((unsigned char)*cp) && (cp < maxcp))
- cp++;
-
- if (cp >= maxcp)
- goto defaults;
-
- vp = precsize_aton(&cp);
-
- defaults:
-
- bcp = binary;
- *bcp++ = (u_int8_t) 0; /* version byte */
- *bcp++ = siz;
- *bcp++ = hp;
- *bcp++ = vp;
- PUTLONG(latit,bcp);
- PUTLONG(longit,bcp);
- PUTLONG(alt,bcp);
-
- return (16); /* size of RR in octets */
-}
-
-/* takes an on-the-wire LOC RR and formats it in a human readable format. */
-const char *
-loc_ntoa(binary, ascii)
- const u_char *binary;
- char *ascii;
-{
- static char *error = "?";
- const u_char *cp = binary;
-
- int latdeg, latmin, latsec, latsecfrac;
- int longdeg, longmin, longsec, longsecfrac;
- char northsouth, eastwest;
- int altmeters, altfrac, altsign;
-
- const u_int32_t referencealt = 100000 * 100;
-
- int32_t latval, longval, altval;
- u_int32_t templ;
- u_int8_t sizeval, hpval, vpval, versionval;
-
- char *sizestr, *hpstr, *vpstr;
-
- size_t len;
-
- versionval = *cp++;
-
- if (versionval) {
- (void) sprintf(ascii, "; error: unknown LOC RR version");
- return (ascii);
- }
-
- sizeval = *cp++;
-
- hpval = *cp++;
- vpval = *cp++;
-
- GETLONG(templ, cp);
- latval = (templ - ((unsigned)1<<31));
-
- GETLONG(templ, cp);
- longval = (templ - ((unsigned)1<<31));
-
- GETLONG(templ, cp);
- if (templ < referencealt) { /* below WGS 84 spheroid */
- altval = referencealt - templ;
- altsign = -1;
- } else {
- altval = templ - referencealt;
- altsign = 1;
- }
-
- if (latval < 0) {
- northsouth = 'S';
- latval = -latval;
- } else
- northsouth = 'N';
-
- latsecfrac = latval % 1000;
- latval = latval / 1000;
- latsec = latval % 60;
- latval = latval / 60;
- latmin = latval % 60;
- latval = latval / 60;
- latdeg = latval;
-
- if (longval < 0) {
- eastwest = 'W';
- longval = -longval;
- } else
- eastwest = 'E';
-
- longsecfrac = longval % 1000;
- longval = longval / 1000;
- longsec = longval % 60;
- longval = longval / 60;
- longmin = longval % 60;
- longval = longval / 60;
- longdeg = longval;
-
- altfrac = altval % 100;
- altmeters = (altval / 100) * altsign;
-
- len = strlen (precsize_ntoa(sizeval)) + 1;
- if ((sizestr = malloc(len)) == NULL)
- sizestr = error;
- else
- memcpy (sizestr, precsize_ntoa(sizeval), len);
- len = strlen (precsize_ntoa(hpval)) + 1;
- if ((hpstr = malloc (len)) == NULL)
- hpstr = error;
- else
- memcpy (hpstr, precsize_ntoa(hpval), len);
- len = strlen (precsize_ntoa(vpval)) + 1;
- if ((vpstr = malloc (len)) == NULL)
- vpstr = error;
- else
- memcpy (vpstr, precsize_ntoa(vpval), len);
-
- sprintf(ascii,
- "%d %.2d %.2d.%.3d %c %d %.2d %.2d.%.3d %c %d.%.2dm %sm %sm %sm",
- latdeg, latmin, latsec, latsecfrac, northsouth,
- longdeg, longmin, longsec, longsecfrac, eastwest,
- altmeters, altfrac, sizestr, hpstr, vpstr);
-
- if (sizestr != error)
- free(sizestr);
- if (hpstr != error)
- free(hpstr);
- if (vpstr != error)
- free(vpstr);
-
- return (ascii);
-}
-
-
-/* Return the number of DNS hierarchy levels in the name. */
-int
-dn_count_labels(const char *name) {
- int i, len, count;
-
- len = strlen(name);
- for (i = 0, count = 0; i < len; i++) {
- /* XXX need to check for \. or use named's nlabels(). */
- if (name[i] == '.')
- count++;
- }
-
- /* don't count initial wildcard */
- if (name[0] == '*')
- if (count)
- count--;
-
- /* don't count the null label for root. */
- /* if terminating '.' not found, must adjust */
- /* count to include last label */
- if (len > 0 && name[len-1] != '.')
- count++;
- return (count);
-}
-
-
-/*
- * Make dates expressed in seconds-since-Jan-1-1970 easy to read.
- * SIG records are required to be printed like this, by the Secure DNS RFC.
- */
-char *
-p_secstodate (u_long secs) {
- static char output[15]; /* YYYYMMDDHHMMSS and null */
- time_t clock = secs;
- struct tm *time;
-
- time = gmtime(&clock);
- time->tm_year += 1900;
- time->tm_mon += 1;
- sprintf(output, "%04d%02d%02d%02d%02d%02d",
- time->tm_year, time->tm_mon, time->tm_mday,
- time->tm_hour, time->tm_min, time->tm_sec);
- return (output);
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <resolv.h>.
- */
-#undef fp_resstat
-__weak_reference(__fp_resstat, fp_resstat);
-#undef p_query
-__weak_reference(__p_query, p_query);
-#undef p_fqnname
-__weak_reference(__p_fqnname, p_fqnname);
-#undef sym_ston
-__weak_reference(__sym_ston, sym_ston);
-#undef sym_ntos
-__weak_reference(__sym_ntos, sym_ntos);
-#undef sym_ntop
-__weak_reference(__sym_ntop, sym_ntop);
-#undef dn_count_labels
-__weak_reference(__dn_count_labels, dn_count_labels);
-#undef p_secstodate
-__weak_reference(__p_secstodate, p_secstodate);
diff --git a/newlib/libc/sys/linux/net/res_init.c b/newlib/libc/sys/linux/net/res_init.c
deleted file mode 100644
index 21f2696cd..000000000
--- a/newlib/libc/sys/linux/net/res_init.c
+++ /dev/null
@@ -1,585 +0,0 @@
-/*
- * Copyright (c) 1985, 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
-static char orig_rcsid[] = "From: Id: res_init.c,v 8.7 1996/11/18 09:10:04 vixie Exp $";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/endian.h>
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <netdb.h>
-
-#include "res_config.h"
-
-static void res_setoptions(char *, char *);
-
-#ifdef RESOLVSORT
-static const char sort_mask[] = "/&";
-#define ISSORTMASK(ch) (strchr(sort_mask, ch) != NULL)
-static u_int32_t net_mask(struct in_addr);
-#endif
-
-#if !defined(isascii) /* XXX - could be a function */
-# define isascii(c) (!(c & 0200))
-#endif
-
-/*
- * Resolver state default settings.
- */
-
-struct __res_state _res
-# if defined(__BIND_RES_TEXT)
- = { RES_TIMEOUT, } /* Motorola, et al. */
-# endif
- ;
-
-struct __res_state_ext _res_ext;
-
-/*
- * Set up default settings. If the configuration file exist, the values
- * there will have precedence. Otherwise, the server address is set to
- * INADDR_ANY and the default domain name comes from the gethostname().
- *
- * An interrim version of this code (BIND 4.9, pre-4.4BSD) used 127.0.0.1
- * rather than INADDR_ANY ("0.0.0.0") as the default name server address
- * since it was noted that INADDR_ANY actually meant ``the first interface
- * you "ifconfig"'d at boot time'' and if this was a SLIP or PPP interface,
- * it had to be "up" in order for you to reach your own name server. It
- * was later decided that since the recommended practice is to always
- * install local static routes through 127.0.0.1 for all your network
- * interfaces, that we could solve this problem without a code change.
- *
- * The configuration file should always be used, since it is the only way
- * to specify a default domain. If you are running a server on your local
- * machine, you should say "nameserver 0.0.0.0" or "nameserver 127.0.0.1"
- * in the configuration file.
- *
- * Return 0 if completes successfully, -1 on error
- */
-int
-res_init()
-{
- FILE *fp;
- char *cp, **pp;
- int n;
- char buf[MAXDNAME];
- int nserv = 0; /* number of nameserver records read from file */
- int haveenv = 0;
- int havesearch = 0;
-#ifdef RESOLVSORT
- int nsort = 0;
- char *net;
-#endif
-#ifndef RFC1535
- int dots;
-#endif
- int sin_len;
-
- /*
- * These three fields used to be statically initialized. This made
- * it hard to use this code in a shared library. It is necessary,
- * now that we're doing dynamic initialization here, that we preserve
- * the old semantics: if an application modifies one of these three
- * fields of _res before res_init() is called, res_init() will not
- * alter them. Of course, if an application is setting them to
- * _zero_ before calling res_init(), hoping to override what used
- * to be the static default, we can't detect it and unexpected results
- * will follow. Zero for any of these fields would make no sense,
- * so one can safely assume that the applications were already getting
- * unexpected results.
- *
- * _res.options is tricky since some apps were known to diddle the bits
- * before res_init() was first called. We can't replicate that semantic
- * with dynamic initialization (they may have turned bits off that are
- * set in RES_DEFAULT). Our solution is to declare such applications
- * "broken". They could fool us by setting RES_INIT but none do (yet).
- */
- if (!_res.retrans)
- _res.retrans = RES_TIMEOUT;
- if (!_res.retry)
- _res.retry = 4;
- if (!(_res.options & RES_INIT))
- _res.options = RES_DEFAULT;
-
- /*
- * This one used to initialize implicitly to zero, so unless the app
- * has set it to something in particular, we can randomize it now.
- */
- if (!_res.id)
- _res.id = res_randomid();
-
-#ifdef USELOOPBACK
- _res.nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
-#else
- _res.nsaddr.sin_addr.s_addr = INADDR_ANY;
-#endif
- _res.nsaddr.sin_family = AF_INET;
- _res.nsaddr.sin_port = htons(NAMESERVER_PORT);
- sin_len = sizeof(struct sockaddr_in);
- if (sizeof(_res_ext.nsaddr) >= sin_len)
- memcpy(&_res_ext.nsaddr, &_res.nsaddr, sin_len);
- _res.nscount = 1;
- _res.ndots = 1;
- _res.pfcode = 0;
-
- /* Allow user to override the local domain definition */
- if (issetugid() == 0 && (cp = getenv("LOCALDOMAIN")) != NULL) {
- (void)strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1);
- _res.defdname[sizeof(_res.defdname) - 1] = '\0';
- haveenv++;
-
- /*
- * Set search list to be blank-separated strings
- * from rest of env value. Permits users of LOCALDOMAIN
- * to still have a search list, and anyone to set the
- * one that they want to use as an individual (even more
- * important now that the rfc1535 stuff restricts searches)
- */
- cp = _res.defdname;
- pp = _res.dnsrch;
- *pp++ = cp;
- for (n = 0; *cp && pp < _res.dnsrch + MAXDNSRCH; cp++) {
- if (*cp == '\n') /* silly backwards compat */
- break;
- else if (*cp == ' ' || *cp == '\t') {
- *cp = 0;
- n = 1;
- } else if (n) {
- *pp++ = cp;
- n = 0;
- havesearch = 1;
- }
- }
- /* null terminate last domain if there are excess */
- while (*cp != '\0' && *cp != ' ' && *cp != '\t' && *cp != '\n')
- cp++;
- *cp = '\0';
- *pp++ = 0;
- }
-
-#define MATCH(line, name) \
- (!strncmp(line, name, sizeof(name) - 1) && \
- (line[sizeof(name) - 1] == ' ' || \
- line[sizeof(name) - 1] == '\t'))
-
- if ((fp = fopen(_PATH_RESCONF, "r")) != NULL) {
- /* read the config file */
- while (fgets(buf, sizeof(buf), fp) != NULL) {
- /* skip comments */
- if (*buf == ';' || *buf == '#')
- continue;
- /* read default domain name */
- if (MATCH(buf, "domain")) {
- if (haveenv) /* skip if have from environ */
- continue;
- cp = buf + sizeof("domain") - 1;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if ((*cp == '\0') || (*cp == '\n'))
- continue;
- strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1);
- _res.defdname[sizeof(_res.defdname) - 1] = '\0';
- if ((cp = strpbrk(_res.defdname, " \t\n")) != NULL)
- *cp = '\0';
- havesearch = 0;
- continue;
- }
- /* set search list */
- if (MATCH(buf, "search")) {
- if (haveenv) /* skip if have from environ */
- continue;
- cp = buf + sizeof("search") - 1;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if ((*cp == '\0') || (*cp == '\n'))
- continue;
- strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1);
- _res.defdname[sizeof(_res.defdname) - 1] = '\0';
- if ((cp = strchr(_res.defdname, '\n')) != NULL)
- *cp = '\0';
- /*
- * Set search list to be blank-separated strings
- * on rest of line.
- */
- cp = _res.defdname;
- pp = _res.dnsrch;
- *pp++ = cp;
- for (n = 0; *cp && pp < _res.dnsrch + MAXDNSRCH; cp++) {
- if (*cp == ' ' || *cp == '\t') {
- *cp = 0;
- n = 1;
- } else if (n) {
- *pp++ = cp;
- n = 0;
- }
- }
- /* null terminate last domain if there are excess */
- while (*cp != '\0' && *cp != ' ' && *cp != '\t')
- cp++;
- *cp = '\0';
- *pp++ = 0;
- havesearch = 1;
- continue;
- }
- /* read nameservers to query */
- if (MATCH(buf, "nameserver") && nserv < MAXNS) {
- char *q;
- struct addrinfo hints, *res;
- char pbuf[NI_MAXSERV];
-
- cp = buf + sizeof("nameserver") - 1;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if ((*cp == '\0') || (*cp == '\n'))
- continue;
- for (q = cp; *q; q++) {
- if (isspace(*q)) {
- *q = '\0';
- break;
- }
- }
- memset(&hints, 0, sizeof(hints));
- hints.ai_flags = AI_NUMERICHOST;
- hints.ai_socktype = SOCK_DGRAM;
- snprintf(pbuf, sizeof(pbuf), "%d", NAMESERVER_PORT);
- if (getaddrinfo(cp, pbuf, &hints, &res) == 0 &&
- res->ai_next == NULL) {
- if (res->ai_addrlen <= sizeof(_res_ext.nsaddr_list[nserv])) {
- memcpy(&_res_ext.nsaddr_list[nserv], res->ai_addr,
- res->ai_addrlen);
- } else {
- memset(&_res_ext.nsaddr_list[nserv], 0,
- sizeof(_res_ext.nsaddr_list[nserv]));
- }
- if (res->ai_addrlen <= sizeof(_res.nsaddr_list[nserv])) {
- memcpy(&_res.nsaddr_list[nserv], res->ai_addr,
- res->ai_addrlen);
- } else {
- memset(&_res.nsaddr_list[nserv], 0,
- sizeof(_res.nsaddr_list[nserv]));
- }
- nserv++;
- }
- if (res)
- freeaddrinfo(res);
- continue;
- }
-#ifdef RESOLVSORT
- if (MATCH(buf, "sortlist")) {
- struct in_addr a;
- struct in6_addr a6;
- int m, i;
- u_char *u;
-
- cp = buf + sizeof("sortlist") - 1;
- while (nsort < MAXRESOLVSORT) {
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if (*cp == '\0' || *cp == '\n' || *cp == ';')
- break;
- net = cp;
- while (*cp && !ISSORTMASK(*cp) && *cp != ';' &&
- isascii(*cp) && !isspace(*cp))
- cp++;
- n = *cp;
- *cp = 0;
- if (inet_aton(net, &a)) {
- _res.sort_list[nsort].addr = a;
- if (ISSORTMASK(n)) {
- *cp++ = n;
- net = cp;
- while (*cp && *cp != ';' &&
- isascii(*cp) && !isspace(*cp))
- cp++;
- n = *cp;
- *cp = 0;
- if (inet_aton(net, &a)) {
- _res.sort_list[nsort].mask = a.s_addr;
- } else {
- _res.sort_list[nsort].mask =
- net_mask(_res.sort_list[nsort].addr);
- }
- } else {
- _res.sort_list[nsort].mask =
- net_mask(_res.sort_list[nsort].addr);
- }
- _res_ext.sort_list[nsort].af = AF_INET;
- _res_ext.sort_list[nsort].addr.ina =
- _res.sort_list[nsort].addr;
- _res_ext.sort_list[nsort].mask.ina.s_addr =
- _res.sort_list[nsort].mask;
- nsort++;
- }
- else if (inet_pton(AF_INET6, net, &a6) == 1) {
-
- _res_ext.sort_list[nsort].af = AF_INET6;
- _res_ext.sort_list[nsort].addr.in6a = a6;
- u = (u_char *)&_res_ext.sort_list[nsort].mask.in6a;
- *cp++ = n;
- net = cp;
- while (*cp && *cp != ';' &&
- isascii(*cp) && !isspace(*cp))
- cp++;
- m = n;
- n = *cp;
- *cp = 0;
- switch (m) {
- case '/':
- m = atoi(net);
- break;
- case '&':
- if (inet_pton(AF_INET6, net, u) == 1) {
- m = -1;
- break;
- }
- /*FALLTHROUGH*/
- default:
- m = sizeof(struct in6_addr) * NBBY;
- break;
- }
- if (m >= 0) {
- for (i = 0; i < sizeof(struct in6_addr); i++) {
- if (m <= 0) {
- *u = 0;
- } else {
- m -= NBBY;
- *u = (u_char)~0;
- if (m < 0)
- *u <<= -m;
- }
- u++;
- }
- }
- _res.sort_list[nsort].addr.s_addr =
- (u_int32_t)0xffffffff;
- _res.sort_list[nsort].mask = (u_int32_t)0xffffffff;
- nsort++;
- }
- *cp = n;
- }
- continue;
- }
-#endif
- if (MATCH(buf, "options")) {
- res_setoptions(buf + sizeof("options") - 1, "conf");
- continue;
- }
- }
- if (nserv > 1)
- _res.nscount = nserv;
-#ifdef RESOLVSORT
- _res.nsort = nsort;
-#endif
- (void) fclose(fp);
- }
- if (_res.defdname[0] == 0 &&
- gethostname(buf, sizeof(_res.defdname) - 1) == 0 &&
- (cp = strchr(buf, '.')) != NULL)
- strcpy(_res.defdname, cp + 1);
-
- /* find components of local domain that might be searched */
- if (havesearch == 0) {
- pp = _res.dnsrch;
- *pp++ = _res.defdname;
- *pp = NULL;
-
-#ifndef RFC1535
- dots = 0;
- for (cp = _res.defdname; *cp; cp++)
- dots += (*cp == '.');
-
- cp = _res.defdname;
- while (pp < _res.dnsrch + MAXDFLSRCH) {
- if (dots < LOCALDOMAINPARTS)
- break;
- cp = strchr(cp, '.') + 1; /* we know there is one */
- *pp++ = cp;
- dots--;
- }
- *pp = NULL;
-#ifdef DEBUG
- if (_res.options & RES_DEBUG) {
- printf(";; res_init()... default dnsrch list:\n");
- for (pp = _res.dnsrch; *pp; pp++)
- printf(";;\t%s\n", *pp);
- printf(";;\t..END..\n");
- }
-#endif
-#endif /* !RFC1535 */
- }
-
- if (issetugid())
- _res.options |= RES_NOALIASES;
- else if ((cp = getenv("RES_OPTIONS")) != NULL)
- res_setoptions(cp, "env");
- _res.options |= RES_INIT;
- return (0);
-}
-
-static void
-res_setoptions(options, source)
- char *options, *source;
-{
- char *cp = options;
- int i;
-
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_setoptions(\"%s\", \"%s\")...\n",
- options, source);
-#endif
- while (*cp) {
- /* skip leading and inner runs of spaces */
- while (*cp == ' ' || *cp == '\t')
- cp++;
- /* search for and process individual options */
- if (!strncmp(cp, "ndots:", sizeof("ndots:") - 1)) {
- i = atoi(cp + sizeof("ndots:") - 1);
- if (i <= RES_MAXNDOTS)
- _res.ndots = i;
- else
- _res.ndots = RES_MAXNDOTS;
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";;\tndots=%d\n", _res.ndots);
-#endif
- } else if (!strncmp(cp, "debug", sizeof("debug") - 1)) {
-#ifdef DEBUG
- if (!(_res.options & RES_DEBUG)) {
- printf(";; res_setoptions(\"%s\", \"%s\")..\n",
- options, source);
- _res.options |= RES_DEBUG;
- }
- printf(";;\tdebug\n");
-#endif
- } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) {
- _res.options |= RES_USE_INET6;
- } else if (!strncmp(cp, "insecure1", sizeof("insecure1") - 1)) {
- _res.options |= RES_INSECURE1;
- } else if (!strncmp(cp, "insecure2", sizeof("insecure2") - 1)) {
- _res.options |= RES_INSECURE2;
- } else if (!strncmp(cp, "no_tld_query", sizeof("no_tld_query") - 1)) {
- _res.options |= RES_NOTLDQUERY;
- } else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) {
- _res.options |= RES_USE_EDNS0;
- } else {
- /* XXX - print a warning here? */
- }
- /* skip to next run of spaces */
- while (*cp && *cp != ' ' && *cp != '\t')
- cp++;
- }
-}
-
-#ifdef RESOLVSORT
-/* XXX - should really support CIDR which means explicit masks always. */
-static u_int32_t
-net_mask(in) /* XXX - should really use system's version of this */
- struct in_addr in;
-{
- u_int32_t i = ntohl(in.s_addr);
-
- if (IN_CLASSA(i))
- return (htonl(IN_CLASSA_NET));
- else if (IN_CLASSB(i))
- return (htonl(IN_CLASSB_NET));
- return (htonl(IN_CLASSC_NET));
-}
-#endif
-
-u_int
-res_randomid()
-{
- struct timeval now;
-
- gettimeofday(&now, NULL);
- return (0xffff & (now.tv_sec ^ now.tv_usec ^ getpid()));
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <resolv.h>.
- */
-#undef res_init
-__weak_reference(__res_init, res_init);
diff --git a/newlib/libc/sys/linux/net/res_mkquery.c b/newlib/libc/sys/linux/net/res_mkquery.c
deleted file mode 100644
index 0c6cca9c4..000000000
--- a/newlib/libc/sys/linux/net/res_mkquery.c
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: res_mkquery.c,v 8.9 1997/04/24 22:22:36 vixie Exp $";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/endian.h>
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "res_config.h"
-
-/*
- * Form all types of queries.
- * Returns the size of the result or -1.
- */
-int
-res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen)
- int op; /* opcode of query */
- const char *dname; /* domain name */
- int class, type; /* class and type of query */
- const u_char *data; /* resource record data */
- int datalen; /* length of data */
- const u_char *newrr_in; /* new rr for modify or append */
- u_char *buf; /* buffer to put query */
- int buflen; /* size of buffer */
-{
- HEADER *hp;
- u_char *cp;
- int n;
- u_char *dnptrs[20], **dpp, **lastdnptr;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_mkquery(%d, %s, %d, %d)\n",
- op, dname, class, type);
-#endif
- /*
- * Initialize header fields.
- */
- if ((buf == NULL) || (buflen < HFIXEDSZ))
- return (-1);
- memset(buf, 0, HFIXEDSZ);
- hp = (HEADER *) buf;
- hp->id = htons(++_res.id);
- hp->opcode = op;
- hp->rd = (_res.options & RES_RECURSE) != 0;
- hp->rcode = NOERROR;
- cp = buf + HFIXEDSZ;
- buflen -= HFIXEDSZ;
- dpp = dnptrs;
- *dpp++ = buf;
- *dpp++ = NULL;
- lastdnptr = dnptrs + sizeof dnptrs / sizeof dnptrs[0];
- /*
- * perform opcode specific processing
- */
- switch (op) {
- case QUERY: /*FALLTHROUGH*/
- case NS_NOTIFY_OP:
- if ((buflen -= QFIXEDSZ) < 0)
- return (-1);
- if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
- return (-1);
- cp += n;
- buflen -= n;
- __putshort(type, cp);
- cp += INT16SZ;
- __putshort(class, cp);
- cp += INT16SZ;
- hp->qdcount = htons(1);
- if (op == QUERY || data == NULL)
- break;
- /*
- * Make an additional record for completion domain.
- */
- buflen -= RRFIXEDSZ;
- n = dn_comp((char *)data, cp, buflen, dnptrs, lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- buflen -= n;
- __putshort(T_NULL, cp);
- cp += INT16SZ;
- __putshort(class, cp);
- cp += INT16SZ;
- __putlong(0, cp);
- cp += INT32SZ;
- __putshort(0, cp);
- cp += INT16SZ;
- hp->arcount = htons(1);
- break;
-
- case IQUERY:
- /*
- * Initialize answer section
- */
- if (buflen < 1 + RRFIXEDSZ + datalen)
- return (-1);
- *cp++ = '\0'; /* no domain name */
- __putshort(type, cp);
- cp += INT16SZ;
- __putshort(class, cp);
- cp += INT16SZ;
- __putlong(0, cp);
- cp += INT32SZ;
- __putshort(datalen, cp);
- cp += INT16SZ;
- if (datalen) {
- memcpy(cp, data, datalen);
- cp += datalen;
- }
- hp->ancount = htons(1);
- break;
-
- default:
- return (-1);
- }
- return (cp - buf);
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <resolv.h>.
- */
-#undef res_mkquery
-__weak_reference(__res_mkquery, res_mkquery);
-
-/* attach OPT pseudo-RR, as documented in RFC2671 (EDNS0). */
-int
-res_opt(n0, buf, buflen, anslen)
- int n0;
- u_char *buf; /* buffer to put query */
- int buflen; /* size of buffer */
- int anslen; /* answer buffer length */
-{
- HEADER *hp;
- u_char *cp;
-
- hp = (HEADER *) buf;
- cp = buf + n0;
- buflen -= n0;
-
- if (buflen < 1 + RRFIXEDSZ)
- return -1;
-
- *cp++ = 0; /* "." */
- buflen--;
-
- __putshort(T_OPT, cp); /* TYPE */
- cp += INT16SZ;
- __putshort(anslen & 0xffff, cp); /* CLASS = UDP payload size */
- cp += INT16SZ;
- *cp++ = NOERROR; /* extended RCODE */
- *cp++ = 0; /* EDNS version */
- __putshort(0, cp); /* MBZ */
- cp += INT16SZ;
- __putshort(0, cp); /* RDLEN */
- cp += INT16SZ;
- hp->arcount = htons(ntohs(hp->arcount) + 1);
- buflen -= RRFIXEDSZ;
-
- return cp - buf;
-}
diff --git a/newlib/libc/sys/linux/net/res_mkupdate.c b/newlib/libc/sys/linux/net/res_mkupdate.c
deleted file mode 100644
index 4e21fe8cf..000000000
--- a/newlib/libc/sys/linux/net/res_mkupdate.c
+++ /dev/null
@@ -1,412 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Based on the Dynamic DNS reference implementation by Viraj Bais
- * <viraj_bais@ccm.fm.intel.com>
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/endian.h>
-
-#include <sys/types.h>
-#include <sys/param.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <arpa/inet.h>
-
-#include <limits.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-
-#include "res_config.h"
-
-static int getnum_str(u_char **, u_char *);
-static int getword_str(char *, int, u_char **, u_char *);
-
-#define ShrinkBuffer(x) if ((buflen -= x) < 0) return (-2);
-
-/*
- * Form update packets.
- * Returns the size of the resulting packet if no error
- * On error,
- * returns -1 if error in reading a word/number in rdata
- * portion for update packets
- * -2 if length of buffer passed is insufficient
- * -3 if zone section is not the first section in
- * the linked list, or section order has a problem
- * -4 on a number overflow
- * -5 unknown operation or no records
- */
-int
-res_mkupdate(ns_updrec *rrecp_in, u_char *buf, int buflen) {
- ns_updrec *rrecp_start = rrecp_in;
- HEADER *hp;
- u_char *cp, *sp1, *sp2, *startp, *endp;
- int n, i, soanum, multiline;
- ns_updrec *rrecp;
- struct in_addr ina;
- char buf2[MAXDNAME];
- int section, numrrs = 0, counts[ns_s_max];
- u_int16_t rtype, rclass;
- u_int32_t n1, rttl;
- u_char *dnptrs[20], **dpp, **lastdnptr;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-
- /*
- * Initialize header fields.
- */
- if ((buf == NULL) || (buflen < HFIXEDSZ))
- return (-1);
- memset(buf, 0, HFIXEDSZ);
- hp = (HEADER *) buf;
- hp->id = htons(++_res.id);
- hp->opcode = ns_o_update;
- hp->rcode = NOERROR;
- sp1 = buf + 2*INT16SZ; /* save pointer to zocount */
- cp = buf + HFIXEDSZ;
- buflen -= HFIXEDSZ;
- dpp = dnptrs;
- *dpp++ = buf;
- *dpp++ = NULL;
- lastdnptr = dnptrs + sizeof dnptrs / sizeof dnptrs[0];
-
- if (rrecp_start == NULL)
- return (-5);
- else if (rrecp_start->r_section != S_ZONE)
- return (-3);
-
- memset(counts, 0, sizeof counts);
- for (rrecp = rrecp_start; rrecp; rrecp = rrecp->r_grpnext) {
- numrrs++;
- section = rrecp->r_section;
- if (section < 0 || section >= ns_s_max)
- return (-1);
- counts[section]++;
- for (i = section + 1; i < ns_s_max; i++)
- if (counts[i])
- return (-3);
- rtype = rrecp->r_type;
- rclass = rrecp->r_class;
- rttl = rrecp->r_ttl;
- /* overload class and type */
- if (section == S_PREREQ) {
- rttl = 0;
- switch (rrecp->r_opcode) {
- case YXDOMAIN:
- rclass = C_ANY;
- rtype = T_ANY;
- rrecp->r_size = 0;
- break;
- case NXDOMAIN:
- rclass = C_NONE;
- rtype = T_ANY;
- rrecp->r_size = 0;
- break;
- case NXRRSET:
- rclass = C_NONE;
- rrecp->r_size = 0;
- break;
- case YXRRSET:
- if (rrecp->r_size == 0)
- rclass = C_ANY;
- break;
- default:
- fprintf(stderr,
- "res_mkupdate: incorrect opcode: %d\n",
- rrecp->r_opcode);
- fflush(stderr);
- return (-1);
- }
- } else if (section == S_UPDATE) {
- switch (rrecp->r_opcode) {
- case DELETE:
- rclass = rrecp->r_size == 0 ? C_ANY : C_NONE;
- break;
- case ADD:
- break;
- default:
- fprintf(stderr,
- "res_mkupdate: incorrect opcode: %d\n",
- rrecp->r_opcode);
- fflush(stderr);
- return (-1);
- }
- }
-
- /*
- * XXX appending default domain to owner name is omitted,
- * fqdn must be provided
- */
- if ((n = dn_comp(rrecp->r_dname, cp, buflen, dnptrs,
- lastdnptr)) < 0)
- return (-1);
- cp += n;
- ShrinkBuffer(n + 2*INT16SZ);
- PUTSHORT(rtype, cp);
- PUTSHORT(rclass, cp);
- if (section == S_ZONE) {
- if (numrrs != 1 || rrecp->r_type != T_SOA)
- return (-3);
- continue;
- }
- ShrinkBuffer(INT32SZ + INT16SZ);
- PUTLONG(rttl, cp);
- sp2 = cp; /* save pointer to length byte */
- cp += INT16SZ;
- if (rrecp->r_size == 0) {
- if (section == S_UPDATE && rclass != C_ANY)
- return (-1);
- else {
- PUTSHORT(0, sp2);
- continue;
- }
- }
- startp = rrecp->r_data;
- endp = startp + rrecp->r_size - 1;
- /* XXX this should be done centrally. */
- switch (rrecp->r_type) {
- case T_A:
- if (!getword_str(buf2, sizeof buf2, &startp, endp))
- return (-1);
- if (!inet_aton(buf2, &ina))
- return (-1);
- n1 = ntohl(ina.s_addr);
- ShrinkBuffer(INT32SZ);
- PUTLONG(n1, cp);
- break;
- case T_CNAME:
- case T_MB:
- case T_MG:
- case T_MR:
- case T_NS:
- case T_PTR:
- if (!getword_str(buf2, sizeof buf2, &startp, endp))
- return (-1);
- n = dn_comp(buf2, cp, buflen, dnptrs, lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- ShrinkBuffer(n);
- break;
- case T_MINFO:
- case T_SOA:
- case T_RP:
- for (i = 0; i < 2; i++) {
- if (!getword_str(buf2, sizeof buf2, &startp,
- endp))
- return (-1);
- n = dn_comp(buf2, cp, buflen,
- dnptrs, lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- ShrinkBuffer(n);
- }
- if (rrecp->r_type == T_SOA) {
- ShrinkBuffer(5 * INT32SZ);
- while (isspace(*startp) || !*startp)
- startp++;
- if (*startp == '(') {
- multiline = 1;
- startp++;
- } else
- multiline = 0;
- /* serial, refresh, retry, expire, minimum */
- for (i = 0; i < 5; i++) {
- soanum = getnum_str(&startp, endp);
- if (soanum < 0)
- return (-1);
- PUTLONG(soanum, cp);
- }
- if (multiline) {
- while (isspace(*startp) || !*startp)
- startp++;
- if (*startp != ')')
- return (-1);
- }
- }
- break;
- case T_MX:
- case T_AFSDB:
- case T_RT:
- n = getnum_str(&startp, endp);
- if (n < 0)
- return (-1);
- PUTSHORT(n, cp);
- ShrinkBuffer(INT16SZ);
- if (!getword_str(buf2, sizeof buf2, &startp, endp))
- return (-1);
- n = dn_comp(buf2, cp, buflen, dnptrs, lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- ShrinkBuffer(n);
- break;
- case T_PX:
- n = getnum_str(&startp, endp);
- if (n < 0)
- return (-1);
- PUTSHORT(n, cp);
- ShrinkBuffer(INT16SZ);
- for (i = 0; i < 2; i++) {
- if (!getword_str(buf2, sizeof buf2, &startp,
- endp))
- return (-1);
- n = dn_comp(buf2, cp, buflen, dnptrs,
- lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- ShrinkBuffer(n);
- }
- break;
- case T_WKS:
- case T_HINFO:
- case T_TXT:
- case T_X25:
- case T_ISDN:
- case T_NSAP:
- case T_LOC:
- /* XXX - more fine tuning needed here */
- ShrinkBuffer(rrecp->r_size);
- memcpy(cp, rrecp->r_data, rrecp->r_size);
- cp += rrecp->r_size;
- break;
- default:
- return (-1);
- } /*switch*/
- n = (u_int16_t)((cp - sp2) - INT16SZ);
- PUTSHORT(n, sp2);
- } /*for*/
-
- hp->qdcount = htons(counts[0]);
- hp->ancount = htons(counts[1]);
- hp->nscount = htons(counts[2]);
- hp->arcount = htons(counts[3]);
- return (cp - buf);
-}
-
-/*
- * Get a whitespace delimited word from a string (not file)
- * into buf. modify the start pointer to point after the
- * word in the string.
- */
-static int
-getword_str(char *buf, int size, u_char **startpp, u_char *endp) {
- char *cp;
- int c;
-
- for (cp = buf; *startpp <= endp; ) {
- c = **startpp;
- if (isspace(c) || c == '\0') {
- if (cp != buf) /* trailing whitespace */
- break;
- else { /* leading whitespace */
- (*startpp)++;
- continue;
- }
- }
- (*startpp)++;
- if (cp >= buf+size-1)
- break;
- *cp++ = (u_char)c;
- }
- *cp = '\0';
- return (cp != buf);
-}
-
-/*
- * Get a whitespace delimited number from a string (not file) into buf
- * update the start pointer to point after the number in the string.
- */
-static int
-getnum_str(u_char **startpp, u_char *endp) {
- int c, n;
- int seendigit = 0;
- int m = 0;
-
- for (n = 0; *startpp <= endp; ) {
- c = **startpp;
- if (isspace(c) || c == '\0') {
- if (seendigit) /* trailing whitespace */
- break;
- else { /* leading whitespace */
- (*startpp)++;
- continue;
- }
- }
- if (c == ';') {
- while ((*startpp <= endp) &&
- ((c = **startpp) != '\n'))
- (*startpp)++;
- if (seendigit)
- break;
- continue;
- }
- if (!isdigit(c)) {
- if (c == ')' && seendigit) {
- (*startpp)--;
- break;
- }
- return (-1);
- }
- (*startpp)++;
- n = n * 10 + (c - '0');
- seendigit = 1;
- }
- return (n + m);
-}
-
-/*
- * Allocate a resource record buffer & save rr info.
- */
-ns_updrec *
-res_mkupdrec(int section, const char *dname,
- u_int class, u_int type, u_long ttl) {
- ns_updrec *rrecp = (ns_updrec *)calloc(1, sizeof(ns_updrec));
-
- if (!rrecp || !(rrecp->r_dname = strdup(dname)))
- return (NULL);
- rrecp->r_class = class;
- rrecp->r_type = type;
- rrecp->r_ttl = ttl;
- rrecp->r_section = section;
- return (rrecp);
-}
-
-/*
- * Free a resource record buffer created by res_mkupdrec.
- */
-void
-res_freeupdrec(ns_updrec *rrecp) {
- /* Note: freeing r_dp is the caller's responsibility. */
- if (rrecp->r_dname != NULL)
- free(rrecp->r_dname);
- free(rrecp);
-}
diff --git a/newlib/libc/sys/linux/net/res_query.c b/newlib/libc/sys/linux/net/res_query.c
deleted file mode 100644
index ee6775d99..000000000
--- a/newlib/libc/sys/linux/net/res_query.c
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid = "From: Id: res_query.c,v 8.14 1997/06/09 17:47:05 halley Exp $";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <errno.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "res_config.h"
-
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
-
-/*
- * Formulate a normal query, send, and await answer.
- * Returned answer is placed in supplied buffer "answer".
- * Perform preliminary check of answer, returning success only
- * if no error is indicated and the answer count is nonzero.
- * Return the size of the response on success, -1 on error.
- * Error number is left in h_errno.
- *
- * Caller must parse answer and determine whether it answers the question.
- */
-int
-res_query(name, class, type, answer, anslen)
- const char *name; /* domain name */
- int class, type; /* class and type of query */
- u_char *answer; /* buffer to put answer */
- int anslen; /* size of answer buffer */
-{
- u_char buf[MAXPACKET];
- HEADER *hp = (HEADER *) answer;
- int n;
-
- hp->rcode = NOERROR; /* default */
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_query(%s, %d, %d)\n", name, class, type);
-#endif
-
- n = res_mkquery(QUERY, name, class, type, NULL, 0, NULL,
- buf, sizeof(buf));
- if (n > 0 && (_res.options & RES_USE_EDNS0) != 0)
- n = res_opt(n, buf, sizeof(buf), anslen);
- if (n <= 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_query: mkquery failed\n");
-#endif
- h_errno = NO_RECOVERY;
- return (n);
- }
- n = res_send(buf, n, answer, anslen);
- if (n < 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_query: send error\n");
-#endif
- h_errno = TRY_AGAIN;
- return (n);
- }
-
- if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; rcode = %d, ancount=%d\n", hp->rcode,
- ntohs(hp->ancount));
-#endif
- switch (hp->rcode) {
- case NXDOMAIN:
- h_errno = HOST_NOT_FOUND;
- break;
- case SERVFAIL:
- h_errno = TRY_AGAIN;
- break;
- case NOERROR:
- h_errno = NO_DATA;
- break;
- case FORMERR:
- case NOTIMP:
- case REFUSED:
- default:
- h_errno = NO_RECOVERY;
- break;
- }
- return (-1);
- }
- return (n);
-}
-
-/*
- * Formulate a normal query, send, and retrieve answer in supplied buffer.
- * Return the size of the response on success, -1 on error.
- * If enabled, implement search rules until answer or unrecoverable failure
- * is detected. Error code, if any, is left in h_errno.
- */
-int
-res_search(name, class, type, answer, anslen)
- const char *name; /* domain name */
- int class, type; /* class and type of query */
- u_char *answer; /* buffer to put answer */
- int anslen; /* size of answer */
-{
- const char *cp, * const *domain;
- HEADER *hp = (HEADER *) answer;
- u_int dots;
- int trailing_dot, ret, saved_herrno;
- int got_nodata = 0, got_servfail = 0, tried_as_is = 0;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
- errno = 0;
- h_errno = HOST_NOT_FOUND; /* default, if we never query */
- dots = 0;
- for (cp = name; *cp; cp++)
- dots += (*cp == '.');
- trailing_dot = 0;
- if (cp > name && *--cp == '.')
- trailing_dot++;
-
- /* If there aren't any dots, it could be a user-level alias */
- if (!dots && (cp = hostalias(name)) != NULL)
- return (res_query(cp, class, type, answer, anslen));
-
- /*
- * If there are dots in the name already, let's just give it a try
- * 'as is'. The threshold can be set with the "ndots" option.
- */
- saved_herrno = -1;
- if (dots >= _res.ndots) {
- ret = res_querydomain(name, NULL, class, type, answer, anslen);
- if (ret > 0)
- return (ret);
- saved_herrno = h_errno;
- tried_as_is++;
- }
-
- /*
- * We do at least one level of search if
- * - there is no dot and RES_DEFNAME is set, or
- * - there is at least one dot, there is no trailing dot,
- * and RES_DNSRCH is set.
- */
- if ((!dots && (_res.options & RES_DEFNAMES)) ||
- (dots && !trailing_dot && (_res.options & RES_DNSRCH))) {
- int done = 0;
-
- for (domain = (const char * const *)_res.dnsrch;
- *domain && !done;
- domain++) {
-
- ret = res_querydomain(name, *domain, class, type,
- answer, anslen);
- if (ret > 0)
- return (ret);
-
- /*
- * If no server present, give up.
- * If name isn't found in this domain,
- * keep trying higher domains in the search list
- * (if that's enabled).
- * On a NO_DATA error, keep trying, otherwise
- * a wildcard entry of another type could keep us
- * from finding this entry higher in the domain.
- * If we get some other error (negative answer or
- * server failure), then stop searching up,
- * but try the input name below in case it's
- * fully-qualified.
- */
- if (errno == ECONNREFUSED) {
- h_errno = TRY_AGAIN;
- return (-1);
- }
-
- switch (h_errno) {
- case NO_DATA:
- got_nodata++;
- /* FALLTHROUGH */
- case HOST_NOT_FOUND:
- /* keep trying */
- break;
- case TRY_AGAIN:
- if (hp->rcode == SERVFAIL) {
- /* try next search element, if any */
- got_servfail++;
- break;
- }
- /* FALLTHROUGH */
- default:
- /* anything else implies that we're done */
- done++;
- }
-
- /* if we got here for some reason other than DNSRCH,
- * we only wanted one iteration of the loop, so stop.
- */
- if (!(_res.options & RES_DNSRCH))
- done++;
- }
- }
-
- /*
- * If we have not already tried the name "as is", do that now.
- * note that we do this regardless of how many dots were in the
- * name or whether it ends with a dot unless NOTLDQUERY is set.
- */
- if (!tried_as_is && (dots || !(_res.options & RES_NOTLDQUERY))) {
- ret = res_querydomain(name, NULL, class, type, answer, anslen);
- if (ret > 0)
- return (ret);
- }
-
- /* if we got here, we didn't satisfy the search.
- * if we did an initial full query, return that query's h_errno
- * (note that we wouldn't be here if that query had succeeded).
- * else if we ever got a nodata, send that back as the reason.
- * else send back meaningless h_errno, that being the one from
- * the last DNSRCH we did.
- */
- if (saved_herrno != -1)
- h_errno = saved_herrno;
- else if (got_nodata)
- h_errno = NO_DATA;
- else if (got_servfail)
- h_errno = TRY_AGAIN;
- return (-1);
-}
-
-/*
- * Perform a call on res_query on the concatenation of name and domain,
- * removing a trailing dot from name if domain is NULL.
- */
-int
-res_querydomain(name, domain, class, type, answer, anslen)
- const char *name, *domain;
- int class, type; /* class and type of query */
- u_char *answer; /* buffer to put answer */
- int anslen; /* size of answer */
-{
- char nbuf[MAXDNAME];
- const char *longname = nbuf;
- int n, d;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_querydomain(%s, %s, %d, %d)\n",
- name, domain?domain:"<Nil>", class, type);
-#endif
- if (domain == NULL) {
- /*
- * Check for trailing '.';
- * copy without '.' if present.
- */
- n = strlen(name);
- if (n >= MAXDNAME) {
- h_errno = NO_RECOVERY;
- return (-1);
- }
- n--;
- if (n >= 0 && name[n] == '.') {
- strncpy(nbuf, name, n);
- nbuf[n] = '\0';
- } else
- longname = name;
- } else {
- n = strlen(name);
- d = strlen(domain);
- if (n + d + 1 >= MAXDNAME) {
- h_errno = NO_RECOVERY;
- return (-1);
- }
- sprintf(nbuf, "%s.%s", name, domain);
- }
- return (res_query(longname, class, type, answer, anslen));
-}
-
-const char *
-hostalias(name)
- const char *name;
-{
- char *cp1, *cp2;
- FILE *fp;
- char *file;
- char buf[BUFSIZ];
- static char abuf[MAXDNAME];
-
- if (_res.options & RES_NOALIASES)
- return (NULL);
- if (issetugid())
- return (NULL);
- file = getenv("HOSTALIASES");
- if (file == NULL || (fp = fopen(file, "r")) == NULL)
- return (NULL);
- setbuf(fp, NULL);
- buf[sizeof(buf) - 1] = '\0';
- while (fgets(buf, sizeof(buf), fp)) {
- for (cp1 = buf; *cp1 && !isspace((unsigned char)*cp1); ++cp1)
- ;
- if (!*cp1)
- break;
- *cp1 = '\0';
- if (!strcasecmp(buf, name)) {
- while (isspace((unsigned char)*++cp1))
- ;
- if (!*cp1)
- break;
- for (cp2 = cp1 + 1; *cp2 && !isspace((unsigned char)*cp2); ++cp2)
- ;
- abuf[sizeof(abuf) - 1] = *cp2 = '\0';
- strncpy(abuf, cp1, sizeof(abuf) - 1);
- fclose(fp);
- return (abuf);
- }
- }
- fclose(fp);
- return (NULL);
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <resolv.h>.
- */
-#undef res_query
-__weak_reference(__res_query, res_query);
-#undef res_search
-__weak_reference(__res_search, res_search);
-#undef res_querydomain
-__weak_reference(__res_querydomain, res_querydomain);
diff --git a/newlib/libc/sys/linux/net/res_send.c b/newlib/libc/sys/linux/net/res_send.c
deleted file mode 100644
index 153d2f5d9..000000000
--- a/newlib/libc/sys/linux/net/res_send.c
+++ /dev/null
@@ -1,954 +0,0 @@
-/*
- * Copyright (c) 1985, 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Portions Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: res_send.c,v 8.20 1998/04/06 23:27:51 halley Exp $";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/endian.h>
-
-/*
- * Send query to name server and wait for reply.
- */
-
-#include <sys/types.h>
-#include <sys/event.h>
-#include <sys/poll.h>
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
-
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <arpa/inet.h>
-
-#include <errno.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "res_config.h"
-
-static int s = -1; /* socket used for communications */
-static int connected = 0; /* is the socket connected */
-static int vc = 0; /* is the socket a virtual circuit? */
-static int af = 0; /* address family of socket */
-static res_send_qhook Qhook = NULL;
-static res_send_rhook Rhook = NULL;
-
-
-#define CAN_RECONNECT 1
-
-#ifndef DEBUG
-# define Dprint(cond, args) /*empty*/
-# define DprintQ(cond, args, query, size) /*empty*/
-# define Aerror(file, string, error, address) /*empty*/
-# define Perror(file, string, error) /*empty*/
-#else
-# define Dprint(cond, args) if (cond) {fprintf args;} else {}
-# define DprintQ(cond, args, query, size) if (cond) {\
- fprintf args;\
- __fp_nquery(query, size, stdout);\
- } else {}
-static char abuf[NI_MAXHOST];
-static char pbuf[NI_MAXSERV];
-static void Aerror(FILE *, char *, int, struct sockaddr *);
-static void Perror(FILE *, char *, int);
-
- static void
- Aerror(file, string, error, address)
- FILE *file;
- char *string;
- int error;
- struct sockaddr *address;
- {
- int save = errno;
-
- if (_res.options & RES_DEBUG) {
- if (getnameinfo(address, 0, abuf, sizeof(abuf),
- pbuf, sizeof(pbuf),
- NI_NUMERICHOST|NI_NUMERICSERV|NI_WITHSCOPEID) != 0) {
- strncpy(abuf, "?", sizeof(abuf));
- strncpy(pbuf, "?", sizeof(pbuf));
- }
- fprintf(file, "res_send: %s ([%s].%s): %s\n",
- string, abuf, pbuf, strerror(error));
- }
- errno = save;
- }
- static void
- Perror(file, string, error)
- FILE *file;
- char *string;
- int error;
- {
- int save = errno;
-
- if (_res.options & RES_DEBUG) {
- fprintf(file, "res_send: %s: %s\n",
- string, strerror(error));
- }
- errno = save;
- }
-#endif
-
-void
-res_send_setqhook(hook)
- res_send_qhook hook;
-{
-
- Qhook = hook;
-}
-
-void
-res_send_setrhook(hook)
- res_send_rhook hook;
-{
-
- Rhook = hook;
-}
-
-static struct sockaddr * get_nsaddr(size_t);
-
-/*
- * pick appropriate nsaddr_list for use. see res_init() for initialization.
- */
-static struct sockaddr *
-get_nsaddr(n)
- size_t n;
-{
-
- if (!_res.nsaddr_list[n].sin_family) {
- /*
- * - _res_ext.nsaddr_list[n] holds an address that is larger
- * than struct sockaddr, and
- * - user code did not update _res.nsaddr_list[n].
- */
- return (struct sockaddr *)&_res_ext.nsaddr_list[n];
- } else {
- /*
- * - user code updated _res.nsaddr_list[n], or
- * - _res.nsaddr_list[n] has the same content as
- * _res_ext.nsaddr_list[n].
- */
- return (struct sockaddr *)&_res.nsaddr_list[n];
- }
-}
-
-/* int
- * res_isourserver(ina)
- * looks up "ina" in _res.ns_addr_list[]
- * returns:
- * 0 : not found
- * >0 : found
- * author:
- * paul vixie, 29may94
- */
-int
-res_isourserver(inp)
- const struct sockaddr_in *inp;
-{
- const struct sockaddr_in6 *in6p = (const struct sockaddr_in6 *)inp;
- const struct sockaddr_in6 *srv6;
- const struct sockaddr_in *srv;
- int ns, ret;
-
- ret = 0;
- switch (inp->sin_family) {
- case AF_INET6:
- for (ns = 0; ns < _res.nscount; ns++) {
- srv6 = (struct sockaddr_in6 *)get_nsaddr(ns);
- if (srv6->sin6_family == in6p->sin6_family &&
- srv6->sin6_port == in6p->sin6_port &&
- srv6->sin6_scope_id == in6p->sin6_scope_id &&
- (IN6_IS_ADDR_UNSPECIFIED(&srv6->sin6_addr) ||
- IN6_ARE_ADDR_EQUAL(&srv6->sin6_addr,
- &in6p->sin6_addr))) {
- ret++;
- break;
- }
- }
- break;
- case AF_INET:
- for (ns = 0; ns < _res.nscount; ns++) {
- srv = (struct sockaddr_in *)get_nsaddr(ns);
- if (srv->sin_family == inp->sin_family &&
- srv->sin_port == inp->sin_port &&
- (srv->sin_addr.s_addr == INADDR_ANY ||
- srv->sin_addr.s_addr == inp->sin_addr.s_addr)) {
- ret++;
- break;
- }
- }
- break;
- }
- return (ret);
-}
-
-/* int
- * res_nameinquery(name, type, class, buf, eom)
- * look for (name,type,class) in the query section of packet (buf,eom)
- * requires:
- * buf + HFIXEDSZ <= eom
- * returns:
- * -1 : format error
- * 0 : not found
- * >0 : found
- * author:
- * paul vixie, 29may94
- */
-int
-res_nameinquery(name, type, class, buf, eom)
- const char *name;
- int type, class;
- const u_char *buf, *eom;
-{
- const u_char *cp = buf + HFIXEDSZ;
- int qdcount = ntohs(((HEADER*)buf)->qdcount);
-
- while (qdcount-- > 0) {
- char tname[MAXDNAME+1];
- int n, ttype, tclass;
-
- n = dn_expand(buf, eom, cp, tname, sizeof tname);
- if (n < 0)
- return (-1);
- cp += n;
- if (cp + 2 * INT16SZ > eom)
- return (-1);
- ttype = ns_get16(cp); cp += INT16SZ;
- tclass = ns_get16(cp); cp += INT16SZ;
- if (ttype == type &&
- tclass == class &&
- strcasecmp(tname, name) == 0)
- return (1);
- }
- return (0);
-}
-
-/* int
- * res_queriesmatch(buf1, eom1, buf2, eom2)
- * is there a 1:1 mapping of (name,type,class)
- * in (buf1,eom1) and (buf2,eom2)?
- * returns:
- * -1 : format error
- * 0 : not a 1:1 mapping
- * >0 : is a 1:1 mapping
- * author:
- * paul vixie, 29may94
- */
-int
-res_queriesmatch(buf1, eom1, buf2, eom2)
- const u_char *buf1, *eom1;
- const u_char *buf2, *eom2;
-{
- const u_char *cp = buf1 + HFIXEDSZ;
- int qdcount = ntohs(((HEADER*)buf1)->qdcount);
-
- if (buf1 + HFIXEDSZ > eom1 || buf2 + HFIXEDSZ > eom2)
- return (-1);
-
- /*
- * Only header section present in replies to
- * dynamic update packets.
- */
- if ( (((HEADER *)buf1)->opcode == ns_o_update) &&
- (((HEADER *)buf2)->opcode == ns_o_update) )
- return (1);
-
- if (qdcount != ntohs(((HEADER*)buf2)->qdcount))
- return (0);
- while (qdcount-- > 0) {
- char tname[MAXDNAME+1];
- int n, ttype, tclass;
-
- n = dn_expand(buf1, eom1, cp, tname, sizeof tname);
- if (n < 0)
- return (-1);
- cp += n;
- if (cp + 2 * INT16SZ > eom1)
- return (-1);
- ttype = ns_get16(cp); cp += INT16SZ;
- tclass = ns_get16(cp); cp += INT16SZ;
- if (!res_nameinquery(tname, ttype, tclass, buf2, eom2))
- return (0);
- }
- return (1);
-}
-
-int
-res_send(buf, buflen, ans, anssiz)
- const u_char *buf;
- int buflen;
- u_char *ans;
- int anssiz;
-{
- HEADER *hp = (HEADER *) buf;
- HEADER *anhp = (HEADER *) ans;
- int gotsomewhere, connreset, terrno, try, v_circuit, resplen, ns, n;
- int kq;
- u_int badns; /* XXX NSMAX can't exceed #/bits in this variable */
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- /* errno should have been set by res_init() in this case. */
- return (-1);
- }
- if (anssiz < HFIXEDSZ) {
- errno = EINVAL;
- return (-1);
- }
- DprintQ((_res.options & RES_DEBUG) || (_res.pfcode & RES_PRF_QUERY),
- (stdout, ";; res_send()\n"), buf, buflen);
- v_circuit = (_res.options & RES_USEVC) || buflen > PACKETSZ;
- gotsomewhere = 0;
- connreset = 0;
- terrno = ETIMEDOUT;
- badns = 0;
-
- /*
- * Send request, RETRY times, or until successful
- */
- for (try = 0; try < _res.retry; try++) {
- for (ns = 0; ns < _res.nscount; ns++) {
- struct sockaddr *nsap = get_nsaddr(ns);
- socklen_t salen;
-
- if (nsap->sa_family == AF_INET6)
- salen = sizeof(struct sockaddr_in6);
- else if (nsap->sa_family == AF_INET)
- salen = sizeof(struct sockaddr_in);
- else
- salen = 0; /*unknown, die on connect*/
-
- same_ns:
- if (badns & (1 << ns)) {
- res_close();
- goto next_ns;
- }
-
- if (Qhook) {
- int done = 0, loops = 0;
-
- do {
- res_sendhookact act;
-
- act = (*Qhook)((struct sockaddr_in **)&nsap,
- &buf, &buflen,
- ans, anssiz, &resplen);
- switch (act) {
- case res_goahead:
- done = 1;
- break;
- case res_nextns:
- res_close();
- goto next_ns;
- case res_done:
- close(kq);
- return (resplen);
- case res_modified:
- /* give the hook another try */
- if (++loops < 42) /*doug adams*/
- break;
- /*FALLTHROUGH*/
- case res_error:
- /*FALLTHROUGH*/
- default:
- close(kq);
- return (-1);
- }
- } while (!done);
- }
-
- Dprint((_res.options & RES_DEBUG) &&
- getnameinfo(nsap, salen, abuf, sizeof(abuf),
- NULL, 0, NI_NUMERICHOST | NI_WITHSCOPEID) == 0,
- (stdout, ";; Querying server (# %d) address = %s\n",
- ns + 1, abuf));
-
- if (v_circuit) {
- int truncated;
- u_short len;
- u_char *cp;
- ssize_t rc;
-
- /*
- * Use virtual circuit;
- * at most one attempt per server.
- */
- try = _res.retry;
- truncated = 0;
- if (s < 0 || !vc || hp->opcode == ns_o_update ||
- af != nsap->sa_family) {
- if (s >= 0)
- res_close();
-
- af = nsap->sa_family;
- s = socket(af, SOCK_STREAM, 0);
- if (s < 0) {
- terrno = errno;
- Perror(stderr, "socket(vc)", errno);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- errno = 0;
- if (connect(s, nsap, salen) < 0) {
- terrno = errno;
- Aerror(stderr, "connect/vc",
- errno, nsap);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- vc = 1;
- }
- /*
- * Send length & message
- */
- putshort((u_short)buflen, (u_char*)&len);
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 2
- {
- struct iovec iov[2];
- iov[0].iov_base = (caddr_t)&len;
- iov[0].iov_len = INT16SZ;
- iov[1].iov_base = (caddr_t)buf;
- iov[1].iov_len = buflen;
- rc = writev(s, iov, 2);
- }
-#else /* EL/IX level 1 */
- {
- char *tmpbuf;
- tmpbuf = malloc (INT16SZ + buflen);
- memcpy (tmpbuf, &len, INT16SZ);
- memcpy (tmpbuf + INT16SZ, buf, buflen);
- rc = write (s, tmpbuf, INT16SZ + buflen);
- }
-#endif /* EL/IX level 1 */
- if (rc != (INT16SZ + buflen)) {
- terrno = errno;
- Perror(stderr, "write failed", errno);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- /*
- * Receive length & response
- */
- read_len:
- cp = ans;
- len = INT16SZ;
- while ((n = read(s, (char *)cp, (int)len)) > 0) {
- cp += n;
- if ((len -= n) <= 0)
- break;
- }
- if (n <= 0) {
- terrno = errno;
- Perror(stderr, "read failed", errno);
- res_close();
- /*
- * A long running process might get its TCP
- * connection reset if the remote server was
- * restarted. Requery the server instead of
- * trying a new one. When there is only one
- * server, this means that a query might work
- * instead of failing. We only allow one reset
- * per query to prevent looping.
- */
- if (terrno == ECONNRESET && !connreset) {
- connreset = 1;
- res_close();
- goto same_ns;
- }
- res_close();
- goto next_ns;
- }
- resplen = ns_get16(ans);
- if (resplen > anssiz) {
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; response truncated\n")
- );
- truncated = 1;
- len = anssiz;
- } else
- len = resplen;
- if (len < HFIXEDSZ) {
- /*
- * Undersized message.
- */
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; undersized: %d\n", len));
- terrno = EMSGSIZE;
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- cp = ans;
- while (len != 0 &&
- (n = read(s, (char *)cp, (int)len)) > 0) {
- cp += n;
- len -= n;
- }
- if (n <= 0) {
- terrno = errno;
- Perror(stderr, "read(vc)", errno);
- res_close();
- goto next_ns;
- }
- if (truncated) {
- /*
- * Flush rest of answer
- * so connection stays in synch.
- */
- anhp->tc = 1;
- len = resplen - anssiz;
- while (len != 0) {
- char junk[PACKETSZ];
-
- n = (len > sizeof(junk)
- ? sizeof(junk)
- : len);
- if ((n = read(s, junk, n)) > 0)
- len -= n;
- else
- break;
- }
- }
- /*
- * The calling applicating has bailed out of
- * a previous call and failed to arrange to have
- * the circuit closed or the server has got
- * itself confused. Anyway drop the packet and
- * wait for the correct one.
- */
- if (hp->id != anhp->id) {
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; old answer (unexpected):\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto read_len;
- }
- } else {
- /*
- * Use datagrams.
- */
- struct pollfd pfd[1];
- int ptimeout;
- struct timespec ts;
- struct timeval timeout, ctv;
- struct sockaddr_storage from;
- int fromlen;
-
- if (s < 0 || vc || af != nsap->sa_family) {
- if (vc)
- res_close();
- af = nsap->sa_family;
- s = socket(af, SOCK_DGRAM, 0);
- if (s < 0) {
-#ifndef CAN_RECONNECT
- bad_dg_sock:
-#endif
- terrno = errno;
- Perror(stderr, "socket(dg)", errno);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- connected = 0;
- }
-#ifndef CANNOT_CONNECT_DGRAM
- /*
- * On a 4.3BSD+ machine (client and server,
- * actually), sending to a nameserver datagram
- * port with no nameserver will cause an
- * ICMP port unreachable message to be returned.
- * If our datagram socket is "connected" to the
- * server, we get an ECONNREFUSED error on the next
- * socket operation, and select returns if the
- * error message is received. We can thus detect
- * the absence of a nameserver without timing out.
- * If we have sent queries to at least two servers,
- * however, we don't want to remain connected,
- * as we wish to receive answers from the first
- * server to respond.
- *
- * When the option "insecure1" is specified, we'd
- * rather expect to see responses from an "unknown"
- * address. In order to let the kernel accept such
- * responses, do not connect the socket here.
- * XXX: or do we need an explicit option to disable
- * connecting?
- */
- if (!(_res.options & RES_INSECURE1) &&
- (_res.nscount == 1 || (try == 0 && ns == 0))) {
- /*
- * Connect only if we are sure we won't
- * receive a response from another server.
- */
- if (!connected) {
- if (connect(s, nsap, salen) < 0) {
- Aerror(stderr,
- "connect(dg)",
- errno, nsap);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- connected = 1;
- }
-
- if (send(s, (char*)buf, buflen, 0) != buflen) {
- Perror(stderr, "send", errno);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- } else {
- /*
- * Disconnect if we want to listen
- * for responses from more than one server.
- */
- if (connected) {
-#ifdef CAN_RECONNECT
- /* XXX: any errornous address */
- struct sockaddr_in no_addr;
-
- no_addr.sin_family = AF_INET;
- no_addr.sin_addr.s_addr = INADDR_ANY;
- no_addr.sin_port = 0;
- (void) connect(s,
- (struct sockaddr *)
- &no_addr,
- sizeof no_addr);
-#else
- int s1 = socket(af, SOCK_DGRAM,0);
- if (s1 < 0)
- goto bad_dg_sock;
- (void)_dup2(s1, s);
- (void)close(s1);
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; new DG socket\n"))
-#endif /* CAN_RECONNECT */
- connected = 0;
- errno = 0;
- }
-#endif /* !CANNOT_CONNECT_DGRAM */
- if (sendto(s, (char*)buf, buflen, 0,
- nsap, salen) != buflen) {
- Aerror(stderr, "sendto", errno, nsap);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
-#ifndef CANNOT_CONNECT_DGRAM
- }
-#endif /* !CANNOT_CONNECT_DGRAM */
-
- /*
- * Wait for reply
- */
-
- timeout.tv_sec = (_res.retrans << try);
- if (try > 0)
- timeout.tv_sec /= _res.nscount;
- if ((long) timeout.tv_sec <= 0)
- timeout.tv_sec = 1;
- timeout.tv_usec = 0;
- TIMEVAL_TO_TIMESPEC(&timeout, &ts);
- (void) gettimeofday(&ctv, NULL);
- timeradd(&timeout, &ctv, &timeout);
-
- /* Convert struct timespec in milliseconds. */
- ptimeout = timeout.tv_sec * 1000 + timeout.tv_usec / 1000;
- wait:
- pfd[0].fd = s;
- pfd[0].events = POLLIN;
- n = poll (pfd, 1, ptimeout);
-
- if (s < 0) {
- Perror(stderr, "s out-of-bounds", EMFILE);
- res_close();
- goto next_ns;
- }
-
- if (n < 0) {
- if (errno == EINTR) {
- (void) gettimeofday(&ctv, NULL);
- if (timercmp(&ctv, &timeout, <)) {
- timersub(&timeout, &ctv, &ctv);
- TIMEVAL_TO_TIMESPEC(&ctv, &ts);
- goto wait;
- }
- }
- Perror(stderr, "poll", errno);
- res_close();
- goto next_ns;
- }
-
- if (n == 0) {
- /*
- * timeout
- */
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; timeout\n"));
- gotsomewhere = 1;
- res_close();
- goto next_ns;
- }
- errno = 0;
- fromlen = sizeof(from);
- resplen = recvfrom(s, (char*)ans, anssiz, 0,
- (struct sockaddr *)&from, &fromlen);
- if (resplen <= 0) {
- Perror(stderr, "recvfrom", errno);
- res_close();
- goto next_ns;
- }
- gotsomewhere = 1;
- if (resplen < HFIXEDSZ) {
- /*
- * Undersized message.
- */
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; undersized: %d\n",
- resplen));
- terrno = EMSGSIZE;
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- if (hp->id != anhp->id) {
- /*
- * response from old query, ignore it.
- * XXX - potential security hazard could
- * be detected here.
- */
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; old answer:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto wait;
- }
-#ifdef CHECK_SRVR_ADDR
- if (!(_res.options & RES_INSECURE1) &&
- !res_isourserver((struct sockaddr_in *)&from)) {
- /*
- * response from wrong server? ignore it.
- * XXX - potential security hazard could
- * be detected here.
- */
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; not our server:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto wait;
- }
-#endif
- if (!(_res.options & RES_INSECURE2) &&
- !res_queriesmatch(buf, buf + buflen,
- ans, ans + anssiz)) {
- /*
- * response contains wrong query? ignore it.
- * XXX - potential security hazard could
- * be detected here.
- */
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; wrong query name:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto wait;
- }
- if (anhp->rcode == SERVFAIL ||
- anhp->rcode == NOTIMP ||
- anhp->rcode == REFUSED) {
- DprintQ(_res.options & RES_DEBUG,
- (stdout, "server rejected query:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- badns |= (1 << ns);
- res_close();
- /* don't retry if called from dig */
- if (!_res.pfcode)
- goto next_ns;
- }
- if (!(_res.options & RES_IGNTC) && anhp->tc) {
- /*
- * get rest of answer;
- * use TCP with same server.
- */
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; truncated answer\n"));
- v_circuit = 1;
- res_close();
- goto same_ns;
- }
- } /*if vc/dg*/
- Dprint((_res.options & RES_DEBUG) ||
- ((_res.pfcode & RES_PRF_REPLY) &&
- (_res.pfcode & RES_PRF_HEAD1)),
- (stdout, ";; got answer:\n"));
-#if 0
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ""),
- ans, (resplen>anssiz)?anssiz:resplen);
-#endif
- /*
- * If using virtual circuits, we assume that the first server
- * is preferred over the rest (i.e. it is on the local
- * machine) and only keep that one open.
- * If we have temporarily opened a virtual circuit,
- * or if we haven't been asked to keep a socket open,
- * close the socket.
- */
- if ((v_circuit && (!(_res.options & RES_USEVC) || ns != 0)) ||
- !(_res.options & RES_STAYOPEN)) {
- res_close();
- }
- if (Rhook) {
- int done = 0, loops = 0;
-
- do {
- res_sendhookact act;
-
- act = (*Rhook)((struct sockaddr_in *)nsap,
- buf, buflen,
- ans, anssiz, &resplen);
- switch (act) {
- case res_goahead:
- case res_done:
- done = 1;
- break;
- case res_nextns:
- res_close();
- goto next_ns;
- case res_modified:
- /* give the hook another try */
- if (++loops < 42) /*doug adams*/
- break;
- /*FALLTHROUGH*/
- case res_error:
- /*FALLTHROUGH*/
- default:
- close(kq);
- return (-1);
- }
- } while (!done);
-
- }
- close(kq);
- return (resplen);
- next_ns: ;
- } /*foreach ns*/
- } /*foreach retry*/
- res_close();
- close(kq);
- if (!v_circuit) {
- if (!gotsomewhere)
- errno = ECONNREFUSED; /* no nameservers found */
- else
- errno = ETIMEDOUT; /* no answer obtained */
- } else
- errno = terrno;
- return (-1);
-}
-
-/*
- * This routine is for closing the socket if a virtual circuit is used and
- * the program wants to close it. This provides support for endhostent()
- * which expects to close the socket.
- *
- * This routine is not expected to be user visible.
- */
-void
-res_close()
-{
- if (s >= 0) {
- (void)close(s);
- s = -1;
- connected = 0;
- vc = 0;
- af = 0;
- }
-}
-
-/*
- * Weak aliases for applications that use certain private entry points,
- * and fail to include <resolv.h>.
- */
-#undef res_close
-__weak_reference(__res_close, _res_close);
-#undef res_send
-__weak_reference(__res_send, res_send);
diff --git a/newlib/libc/sys/linux/net/res_update.c b/newlib/libc/sys/linux/net/res_update.c
deleted file mode 100644
index b427bf819..000000000
--- a/newlib/libc/sys/linux/net/res_update.c
+++ /dev/null
@@ -1,515 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-/*
- * Based on the Dynamic DNS reference implementation by Viraj Bais
- * <viraj_bais@ccm.fm.intel.com>
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <machine/endian.h>
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <limits.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-/*
- * Separate a linked list of records into groups so that all records
- * in a group will belong to a single zone on the nameserver.
- * Create a dynamic update packet for each zone and send it to the
- * nameservers for that zone, and await answer.
- * Abort if error occurs in updating any zone.
- * Return the number of zones updated on success, < 0 on error.
- *
- * On error, caller must deal with the unsynchronized zones
- * eg. an A record might have been successfully added to the forward
- * zone but the corresponding PTR record would be missing if error
- * was encountered while updating the reverse zone.
- */
-
-#define NSMAX 16
-
-struct ns1 {
- char nsname[MAXDNAME];
- struct in_addr nsaddr1;
-};
-
-struct zonegrp {
- char z_origin[MAXDNAME];
- int16_t z_class;
- char z_soardata[MAXDNAME + 5 * INT32SZ];
- struct ns1 z_ns[NSMAX];
- int z_nscount;
- ns_updrec * z_rr;
- struct zonegrp *z_next;
-};
-
-
-int
-res_update(ns_updrec *rrecp_in) {
- ns_updrec *rrecp, *tmprrecp;
- u_char buf[PACKETSZ], answer[PACKETSZ], packet[2*PACKETSZ];
- char name[MAXDNAME], zname[MAXDNAME], primary[MAXDNAME],
- mailaddr[MAXDNAME];
- u_char soardata[2*MAXCDNAME+5*INT32SZ];
- char *dname, *svdname, *cp1, *target;
- u_char *cp, *eom;
- HEADER *hp = (HEADER *) answer;
- struct zonegrp *zptr = NULL, *tmpzptr, *prevzptr, *zgrp_start = NULL;
- int i, j, k = 0, n, ancount, nscount, arcount, rcode, rdatasize,
- newgroup, done, myzone, seen_before, numzones = 0;
- u_int16_t dlen, class, qclass, type, qtype;
- u_int32_t ttl;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-
- for (rrecp = rrecp_in; rrecp; rrecp = rrecp->r_next) {
- dname = rrecp->r_dname;
- n = strlen(dname);
- if (dname[n-1] == '.')
- dname[n-1] = '\0';
- qtype = T_SOA;
- qclass = rrecp->r_class;
- done = 0;
- seen_before = 0;
-
- while (!done && dname) {
- if (qtype == T_SOA) {
- for (tmpzptr = zgrp_start;
- tmpzptr && !seen_before;
- tmpzptr = tmpzptr->z_next) {
- if (strcasecmp(dname,
- tmpzptr->z_origin) == 0 &&
- tmpzptr->z_class == qclass)
- seen_before++;
- for (tmprrecp = tmpzptr->z_rr;
- tmprrecp && !seen_before;
- tmprrecp = tmprrecp->r_grpnext)
- if (strcasecmp(dname, tmprrecp->r_dname) == 0
- && tmprrecp->r_class == qclass) {
- seen_before++;
- break;
- }
- if (seen_before) {
- /*
- * Append to the end of
- * current group.
- */
- for (tmprrecp = tmpzptr->z_rr;
- tmprrecp->r_grpnext;
- tmprrecp = tmprrecp->r_grpnext)
- (void)NULL;
- tmprrecp->r_grpnext = rrecp;
- rrecp->r_grpnext = NULL;
- done = 1;
- break;
- }
- }
- } else if (qtype == T_A) {
- for (tmpzptr = zgrp_start;
- tmpzptr && !done;
- tmpzptr = tmpzptr->z_next)
- for (i = 0; i < tmpzptr->z_nscount; i++)
- if (tmpzptr->z_class == qclass &&
- strcasecmp(tmpzptr->z_ns[i].nsname,
- dname) == 0 &&
- tmpzptr->z_ns[i].nsaddr1.s_addr != 0) {
- zptr->z_ns[k].nsaddr1.s_addr =
- tmpzptr->z_ns[i].nsaddr1.s_addr;
- done = 1;
- break;
- }
- }
- if (done)
- break;
- n = res_mkquery(QUERY, dname, qclass, qtype, NULL,
- 0, NULL, buf, sizeof buf);
- if (n <= 0) {
- fprintf(stderr, "res_update: mkquery failed\n");
- return (n);
- }
- n = res_send(buf, n, answer, sizeof answer);
- if (n < 0) {
- fprintf(stderr, "res_update: send error for %s\n",
- rrecp->r_dname);
- return (n);
- }
- if (n < HFIXEDSZ)
- return (-1);
- ancount = ntohs(hp->ancount);
- nscount = ntohs(hp->nscount);
- arcount = ntohs(hp->arcount);
- rcode = hp->rcode;
- cp = answer + HFIXEDSZ;
- eom = answer + n;
- /* skip the question section */
- n = dn_skipname(cp, eom);
- if (n < 0 || cp + n + 2 * INT16SZ > eom)
- return (-1);
- cp += n + 2 * INT16SZ;
-
- if (qtype == T_SOA) {
- if (ancount == 0 && nscount == 0 && arcount == 0) {
- /*
- * if (rcode == NOERROR) then the dname exists but
- * has no soa record associated with it.
- * if (rcode == NXDOMAIN) then the dname does not
- * exist and the server is replying out of NCACHE.
- * in either case, proceed with the next try
- */
- dname = strchr(dname, '.');
- if (dname != NULL)
- dname++;
- continue;
- } else if ((rcode == NOERROR || rcode == NXDOMAIN) &&
- ancount == 0 &&
- nscount == 1 && arcount == 0) {
- /*
- * name/data does not exist, soa record supplied in the
- * authority section
- */
- /* authority section must contain the soa record */
- if ((n = dn_expand(answer, eom, cp, zname,
- sizeof zname)) < 0)
- return (n);
- cp += n;
- if (cp + 2 * INT16SZ > eom)
- return (-1);
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- if (type != T_SOA || class != qclass) {
- fprintf(stderr, "unknown answer\n");
- return (-1);
- }
- myzone = 0;
- svdname = dname;
- while (dname)
- if (strcasecmp(dname, zname) == 0) {
- myzone = 1;
- break;
- } else if ((dname = strchr(dname, '.')) != NULL)
- dname++;
- if (!myzone) {
- dname = strchr(svdname, '.');
- if (dname != NULL)
- dname++;
- continue;
- }
- nscount = 0;
- /* fallthrough */
- } else if (rcode == NOERROR && ancount == 1) {
- /*
- * found the zone name
- * new servers will supply NS records for the zone
- * in authority section and A records for those
- * nameservers in the additional section
- * older servers have to be explicitly queried for
- * NS records for the zone
- */
- /* answer section must contain the soa record */
- if ((n = dn_expand(answer, eom, cp, zname,
- sizeof zname)) < 0)
- return (n);
- else
- cp += n;
- if (cp + 2 * INT16SZ > eom)
- return (-1);
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- if (type == T_CNAME) {
- dname = strchr(dname, '.');
- if (dname != NULL)
- dname++;
- continue;
- }
- if (strcasecmp(dname, zname) != 0 ||
- type != T_SOA ||
- class != rrecp->r_class) {
- fprintf(stderr, "unknown answer\n");
- return (-1);
- }
- /* FALLTHROUGH */
- } else {
- fprintf(stderr,
- "unknown response: ans=%d, auth=%d, add=%d, rcode=%d\n",
- ancount, nscount, arcount, hp->rcode);
- return (-1);
- }
- if (cp + INT32SZ + INT16SZ > eom)
- return (-1);
- /* continue processing the soa record */
- GETLONG(ttl, cp);
- GETSHORT(dlen, cp);
- if (cp + dlen > eom)
- return (-1);
- newgroup = 1;
- zptr = zgrp_start;
- prevzptr = NULL;
- while (zptr) {
- if (strcasecmp(zname, zptr->z_origin) == 0 &&
- type == T_SOA && class == qclass) {
- newgroup = 0;
- break;
- }
- prevzptr = zptr;
- zptr = zptr->z_next;
- }
- if (!newgroup) {
- for (tmprrecp = zptr->z_rr;
- tmprrecp->r_grpnext;
- tmprrecp = tmprrecp->r_grpnext)
- ;
- tmprrecp->r_grpnext = rrecp;
- rrecp->r_grpnext = NULL;
- done = 1;
- cp += dlen;
- break;
- } else {
- if ((n = dn_expand(answer, eom, cp, primary,
- sizeof primary)) < 0)
- return (n);
- cp += n;
- /*
- * We don't have to bounds check here because the
- * next use of 'cp' is in dn_expand().
- */
- cp1 = (char *)soardata;
- strcpy(cp1, primary);
- cp1 += strlen(cp1) + 1;
- if ((n = dn_expand(answer, eom, cp, mailaddr,
- sizeof mailaddr)) < 0)
- return (n);
- cp += n;
- strcpy(cp1, mailaddr);
- cp1 += strlen(cp1) + 1;
- if (cp + 5*INT32SZ > eom)
- return (-1);
- memcpy(cp1, cp, 5*INT32SZ);
- cp += 5*INT32SZ;
- cp1 += 5*INT32SZ;
- rdatasize = (u_char *)cp1 - soardata;
- zptr = calloc(1, sizeof(struct zonegrp));
- if (zptr == NULL)
- return (-1);
- if (zgrp_start == NULL)
- zgrp_start = zptr;
- else
- prevzptr->z_next = zptr;
- zptr->z_rr = rrecp;
- rrecp->r_grpnext = NULL;
- strcpy(zptr->z_origin, zname);
- zptr->z_class = class;
- memcpy(zptr->z_soardata, soardata, rdatasize);
- /* fallthrough to process NS and A records */
- }
- } else if (qtype == T_NS) {
- if (rcode == NOERROR && ancount > 0) {
- strcpy(zname, dname);
- for (zptr = zgrp_start; zptr; zptr = zptr->z_next) {
- if (strcasecmp(zname, zptr->z_origin) == 0)
- break;
- }
- if (zptr == NULL)
- /* should not happen */
- return (-1);
- if (nscount > 0) {
- /*
- * answer and authority sections contain
- * the same information, skip answer section
- */
- for (j = 0; j < ancount; j++) {
- n = dn_skipname(cp, eom);
- if (n < 0)
- return (-1);
- n += 2*INT16SZ + INT32SZ;
- if (cp + n + INT16SZ > eom)
- return (-1);
- cp += n;
- GETSHORT(dlen, cp);
- cp += dlen;
- }
- } else
- nscount = ancount;
- /* fallthrough to process NS and A records */
- } else {
- fprintf(stderr, "cannot determine nameservers for %s:\
-ans=%d, auth=%d, add=%d, rcode=%d\n",
- dname, ancount, nscount, arcount, hp->rcode);
- return (-1);
- }
- } else if (qtype == T_A) {
- if (rcode == NOERROR && ancount > 0) {
- arcount = ancount;
- ancount = nscount = 0;
- /* fallthrough to process A records */
- } else {
- fprintf(stderr, "cannot determine address for %s:\
-ans=%d, auth=%d, add=%d, rcode=%d\n",
- dname, ancount, nscount, arcount, hp->rcode);
- return (-1);
- }
- }
- /* process NS records for the zone */
- j = 0;
- for (i = 0; i < nscount; i++) {
- if ((n = dn_expand(answer, eom, cp, name,
- sizeof name)) < 0)
- return (n);
- cp += n;
- if (cp + 3 * INT16SZ + INT32SZ > eom)
- return (-1);
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- GETLONG(ttl, cp);
- GETSHORT(dlen, cp);
- if (cp + dlen > eom)
- return (-1);
- if (strcasecmp(name, zname) == 0 &&
- type == T_NS && class == qclass) {
- if ((n = dn_expand(answer, eom, cp,
- name, sizeof name)) < 0)
- return (n);
- target = zptr->z_ns[j++].nsname;
- strcpy(target, name);
- }
- cp += dlen;
- }
- if (zptr->z_nscount == 0)
- zptr->z_nscount = j;
- /* get addresses for the nameservers */
- for (i = 0; i < arcount; i++) {
- if ((n = dn_expand(answer, eom, cp, name,
- sizeof name)) < 0)
- return (n);
- cp += n;
- if (cp + 3 * INT16SZ + INT32SZ > eom)
- return (-1);
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- GETLONG(ttl, cp);
- GETSHORT(dlen, cp);
- if (cp + dlen > eom)
- return (-1);
- if (type == T_A && dlen == INT32SZ && class == qclass) {
- for (j = 0; j < zptr->z_nscount; j++)
- if (strcasecmp(name, zptr->z_ns[j].nsname) == 0) {
- memcpy(&zptr->z_ns[j].nsaddr1.s_addr, cp,
- INT32SZ);
- break;
- }
- }
- cp += dlen;
- }
- if (zptr->z_nscount == 0) {
- dname = zname;
- qtype = T_NS;
- continue;
- }
- done = 1;
- for (k = 0; k < zptr->z_nscount; k++)
- if (zptr->z_ns[k].nsaddr1.s_addr == 0) {
- done = 0;
- dname = zptr->z_ns[k].nsname;
- qtype = T_A;
- }
-
- } /* while */
- }
-
- _res.options |= RES_DEBUG;
- for (zptr = zgrp_start; zptr; zptr = zptr->z_next) {
-
- /* append zone section */
- rrecp = res_mkupdrec(ns_s_zn, zptr->z_origin,
- zptr->z_class, ns_t_soa, 0);
- if (rrecp == NULL) {
- fprintf(stderr, "saverrec error\n");
- fflush(stderr);
- return (-1);
- }
- rrecp->r_grpnext = zptr->z_rr;
- zptr->z_rr = rrecp;
-
- n = res_mkupdate(zptr->z_rr, packet, sizeof packet);
- if (n < 0) {
- fprintf(stderr, "res_mkupdate error\n");
- fflush(stderr);
- return (-1);
- } else
- fprintf(stdout, "res_mkupdate: packet size = %d\n", n);
-
- /*
- * Override the list of NS records from res_init() with
- * the authoritative nameservers for the zone being updated.
- * Sort primary to be the first in the list of nameservers.
- */
- for (i = 0; i < zptr->z_nscount; i++) {
- if (strcasecmp(zptr->z_ns[i].nsname,
- zptr->z_soardata) == 0) {
- struct in_addr tmpaddr;
-
- if (i != 0) {
- strcpy(zptr->z_ns[i].nsname,
- zptr->z_ns[0].nsname);
- strcpy(zptr->z_ns[0].nsname,
- zptr->z_soardata);
- tmpaddr = zptr->z_ns[i].nsaddr1;
- zptr->z_ns[i].nsaddr1 =
- zptr->z_ns[0].nsaddr1;
- zptr->z_ns[0].nsaddr1 = tmpaddr;
- }
- break;
- }
- }
- for (i = 0; i < MAXNS; i++) {
- _res.nsaddr_list[i].sin_addr = zptr->z_ns[i].nsaddr1;
- _res.nsaddr_list[i].sin_family = AF_INET;
- _res.nsaddr_list[i].sin_port = htons(NAMESERVER_PORT);
- }
- _res.nscount = (zptr->z_nscount < MAXNS) ?
- zptr->z_nscount : MAXNS;
- n = res_send(packet, n, answer, sizeof(answer));
- if (n < 0) {
- fprintf(stderr, "res_send: send error, n=%d\n", n);
- break;
- } else
- numzones++;
- }
-
- /* free malloc'ed memory */
- while(zgrp_start) {
- zptr = zgrp_start;
- zgrp_start = zgrp_start->z_next;
- res_freeupdrec(zptr->z_rr); /* Zone section we allocated. */
- free((char *)zptr);
- }
-
- return (numzones);
-}
diff --git a/newlib/libc/sys/linux/net/resolver.3 b/newlib/libc/sys/linux/net/resolver.3
deleted file mode 100644
index 141759855..000000000
--- a/newlib/libc/sys/linux/net/resolver.3
+++ /dev/null
@@ -1,422 +0,0 @@
-.\" Copyright (c) 1985, 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)resolver.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/net/resolver.3,v 1.21 2001/10/01 16:08:56 ru Exp $
-.\"
-.Dd June 4, 1993
-.Dt RESOLVER 3
-.Os
-.Sh NAME
-.Nm res_query ,
-.Nm res_search ,
-.Nm res_mkquery ,
-.Nm res_send ,
-.Nm res_init ,
-.Nm dn_comp ,
-.Nm dn_expand ,
-.Nm dn_skipname ,
-.Nm ns_get16 ,
-.Nm ns_get32 ,
-.Nm ns_put16 ,
-.Nm ns_put32
-.Nd resolver routines
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In netinet/in.h
-.In arpa/nameser.h
-.In resolv.h
-.Ft int
-.Fo res_query
-.Fa "const char *dname"
-.Fa "int class"
-.Fa "int type"
-.Fa "u_char *answer"
-.Fa "int anslen"
-.Fc
-.Ft int
-.Fo res_search
-.Fa "const char *dname"
-.Fa "int class"
-.Fa "int type"
-.Fa "u_char *answer"
-.Fa "int anslen"
-.Fc
-.Ft int
-.Fo res_mkquery
-.Fa "int op"
-.Fa "const char *dname"
-.Fa "int class"
-.Fa "int type"
-.Fa "const u_char *data"
-.Fa "int datalen"
-.Fa "const u_char *newrr_in"
-.Fa "u_char *buf"
-.Fa "int buflen"
-.Fc
-.Ft int
-.Fo res_send
-.Fa "const u_char *msg"
-.Fa "int msglen"
-.Fa "u_char *answer"
-.Fa "int anslen"
-.Fc
-.Ft int
-.Fn res_init
-.Ft int
-.Fo dn_comp
-.Fa "const char *exp_dn"
-.Fa "u_char *comp_dn"
-.Fa "int length"
-.Fa "u_char **dnptrs"
-.Fa "u_char **lastdnptr"
-.Fc
-.Ft int
-.Fo dn_expand
-.Fa "const u_char *msg"
-.Fa "const u_char *eomorig"
-.Fa "const u_char *comp_dn"
-.Fa "char *exp_dn"
-.Fa "int length"
-.Fc
-.Ft int
-.Fn dn_skipname "const u_char *comp_dn" "const u_char *eom"
-.Ft u_int
-.Fn ns_get16 "const u_char *src"
-.Ft u_long
-.Fn ns_get32 "const u_char *src"
-.Ft void
-.Fn ns_put16 "u_int src" "u_char *dst"
-.Ft void
-.Fn ns_put32 "u_long src" "u_char *dst"
-.Sh DESCRIPTION
-These routines are used for making, sending and interpreting
-query and reply messages with Internet domain name servers.
-.Pp
-Global configuration and state information that is used by the
-resolver routines is kept in the structure
-.Em _res .
-Most of the values have reasonable defaults and can be ignored.
-Options
-stored in
-.Em _res.options
-are defined in
-.Pa resolv.h
-and are as follows.
-Options are stored as a simple bit mask containing the bitwise ``or''
-of the options enabled.
-.Bl -tag -width RES_USE_INET6
-.It Dv RES_INIT
-True if the initial name server address and default domain name are
-initialized (i.e.,
-.Fn res_init
-has been called).
-.It Dv RES_DEBUG
-Print debugging messages.
-.It Dv RES_AAONLY
-Accept authoritative answers only.
-With this option,
-.Fn res_send
-should continue until it finds an authoritative answer or finds an error.
-Currently this is not implemented.
-.It Dv RES_USEVC
-Use
-.Tn TCP
-connections for queries instead of
-.Tn UDP
-datagrams.
-.It Dv RES_STAYOPEN
-Used with
-.Dv RES_USEVC
-to keep the
-.Tn TCP
-connection open between
-queries.
-This is useful only in programs that regularly do many queries.
-.Tn UDP
-should be the normal mode used.
-.It Dv RES_IGNTC
-Unused currently (ignore truncation errors, i.e., don't retry with
-.Tn TCP ) .
-.It Dv RES_RECURSE
-Set the recursion-desired bit in queries.
-This is the default.
-.Pf ( Fn res_send
-does not do iterative queries and expects the name server
-to handle recursion.)
-.It Dv RES_DEFNAMES
-If set,
-.Fn res_search
-will append the default domain name to single-component names
-(those that do not contain a dot).
-This option is enabled by default.
-.It Dv RES_DNSRCH
-If this option is set,
-.Fn res_search
-will search for host names in the current domain and in parent domains; see
-.Xr hostname 7 .
-This is used by the standard host lookup routine
-.Xr gethostbyname 3 .
-This option is enabled by default.
-.It Dv RES_NOALIASES
-This option turns off the user level aliasing feature controlled by the
-.Dq Ev HOSTALIASES
-environment variable. Network daemons should set this option.
-.It Dv RES_USE_INET6
-Enables support for IPv6-only applications.
-This causes IPv4 addresses to be returned as an IPv4 mapped address.
-For example,
-.Li 10.1.1.1
-will be returned as
-.Li ::ffff:10.1.1.1 .
-The option is meaningful with certain kernel configuration only.
-.It Dv RES_USE_EDNS0
-Enables support for OPT pseudo-RR for EDNS0 extension.
-With the option, resolver code will attach OPT pseudo-RR into DNS queries,
-to inform of our receive buffer size.
-The option will allow DNS servers to take advantage of non-default receive
-buffer size, and to send larger replies.
-DNS query packets with EDNS0 extension is not compatible with
-non-EDNS0 DNS servers.
-.El
-.Pp
-The
-.Fn res_init
-routine
-reads the configuration file (if any; see
-.Xr resolver 5 )
-to get the default domain name,
-search list and
-the Internet address of the local name server(s).
-If no server is configured, the host running
-the resolver is tried.
-The current domain name is defined by the hostname
-if not specified in the configuration file;
-it can be overridden by the environment variable
-.Ev LOCALDOMAIN .
-This environment variable may contain several blank-separated
-tokens if you wish to override the
-.Em "search list"
-on a per-process basis. This is similar to the
-.Em search
-command in the configuration file.
-Another environment variable
-.Dq Ev RES_OPTIONS
-can be set to
-override certain internal resolver options which are otherwise
-set by changing fields in the
-.Em _res
-structure or are inherited from the configuration file's
-.Em options
-command. The syntax of the
-.Dq Ev RES_OPTIONS
-environment variable is explained in
-.Xr resolver 5 .
-Initialization normally occurs on the first call
-to one of the following routines.
-.Pp
-The
-.Fn res_query
-function provides an interface to the server query mechanism.
-It constructs a query, sends it to the local server,
-awaits a response, and makes preliminary checks on the reply.
-The query requests information of the specified
-.Fa type
-and
-.Fa class
-for the specified fully-qualified domain name
-.Fa dname .
-The reply message is left in the
-.Fa answer
-buffer with length
-.Fa anslen
-supplied by the caller.
-.Pp
-The
-.Fn res_search
-routine makes a query and awaits a response like
-.Fn res_query ,
-but in addition, it implements the default and search rules
-controlled by the
-.Dv RES_DEFNAMES
-and
-.Dv RES_DNSRCH
-options.
-It returns the first successful reply.
-.Pp
-The remaining routines are lower-level routines used by
-.Fn res_query .
-The
-.Fn res_mkquery
-function
-constructs a standard query message and places it in
-.Fa buf .
-It returns the size of the query, or \-1 if the query is
-larger than
-.Fa buflen .
-The query type
-.Fa op
-is usually
-.Dv QUERY ,
-but can be any of the query types defined in
-.Aq Pa arpa/nameser.h .
-The domain name for the query is given by
-.Fa dname .
-.Fa Newrr
-is currently unused but is intended for making update messages.
-.Pp
-The
-.Fn res_send
-routine
-sends a pre-formatted query and returns an answer.
-It will call
-.Fn res_init
-if
-.Dv RES_INIT
-is not set, send the query to the local name server, and
-handle timeouts and retries.
-The length of the reply message is returned, or
-\-1 if there were errors.
-.Pp
-The
-.Fn dn_comp
-function
-compresses the domain name
-.Fa exp_dn
-and stores it in
-.Fa comp_dn .
-The size of the compressed name is returned or \-1 if there were errors.
-The size of the array pointed to by
-.Fa comp_dn
-is given by
-.Fa length .
-The compression uses
-an array of pointers
-.Fa dnptrs
-to previously-compressed names in the current message.
-The first pointer points to
-the beginning of the message and the list ends with
-.Dv NULL .
-The limit to the array is specified by
-.Fa lastdnptr .
-A side effect of
-.Fn dn_comp
-is to update the list of pointers for
-labels inserted into the message
-as the name is compressed.
-If
-.Em dnptr
-is
-.Dv NULL ,
-names are not compressed.
-If
-.Fa lastdnptr
-is
-.Dv NULL ,
-the list of labels is not updated.
-.Pp
-The
-.Fn dn_expand
-entry
-expands the compressed domain name
-.Fa comp_dn
-to a full domain name
-The compressed name is contained in a query or reply message;
-.Fa msg
-is a pointer to the beginning of the message.
-The uncompressed name is placed in the buffer indicated by
-.Fa exp_dn
-which is of size
-.Fa length .
-The size of compressed name is returned or \-1 if there was an error.
-.Pp
-The
-.Fn dn_skipname
-function skips over a compressed domain name, which starts at a location
-pointed to by
-.Fa comp_dn .
-The compressed name is contained in a query or reply message;
-.Fa eom
-is a pointer to the end of the message.
-The size of compressed name is returned or \-1 if there was
-an error.
-.Pp
-The
-.Fn ns_get16
-function gets a 16-bit quantity from a buffer pointed to by
-.Fa src .
-.Pp
-The
-.Fn ns_get32
-function gets a 32-bit quantity from a buffer pointed to by
-.Fa src .
-.Pp
-The
-.Fn ns_put16
-function puts a 16-bit quantity
-.Fa src
-to a buffer pointed to by
-.Fa dst .
-.Pp
-The
-.Fn ns_put32
-function puts a 32-bit quantity
-.Fa src
-to a buffer pointed to by
-.Fa dst .
-.Sh FILES
-.Bl -tag -width /etc/resolv.conf
-.It Pa /etc/resolv.conf
-The configuration file,
-see
-.Xr resolver 5 .
-.El
-.Sh SEE ALSO
-.Xr gethostbyname 3 ,
-.Xr resolver 5 ,
-.Xr hostname 7 ,
-.Xr named 8
-.Pp
-.%T RFC1032 ,
-.%T RFC1033 ,
-.%T RFC1034 ,
-.%T RFC1035 ,
-.%T RFC974
-.Rs
-.%T "Name Server Operations Guide for BIND"
-.Re
-.Sh HISTORY
-The
-.Nm
-function appeared in
-.Bx 4.3 .
diff --git a/newlib/libc/sys/linux/net/rthdr.c b/newlib/libc/sys/linux/net/rthdr.c
deleted file mode 100644
index e5f7814b1..000000000
--- a/newlib/libc/sys/linux/net/rthdr.c
+++ /dev/null
@@ -1,319 +0,0 @@
-/* $KAME: rthdr.c,v 1.8 2001/08/20 02:32:40 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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>
-#include <sys/types.h>
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <netinet/ip6.h>
-
-#include <string.h>
-#include <stdio.h>
-
-/* to define items, should talk with KAME guys first, for *BSD compatibility */
-
-#define IPV6_RTHDR_LOOSE 0 /* this hop need not be a neighbor. XXX old spec */
-#define IPV6_RTHDR_STRICT 1 /* this hop must be a neighbor. XXX old spec */
-#define IPV6_RTHDR_TYPE_0 0 /* IPv6 routing header type 0 */
-
-size_t
-inet6_rthdr_space(type, seg)
- int type, seg;
-{
- switch(type) {
- case IPV6_RTHDR_TYPE_0:
- if (seg < 1 || seg > 23)
- return(0);
- return(CMSG_SPACE(sizeof(struct in6_addr) * (seg - 1)
- + sizeof(struct ip6_rthdr0)));
- default:
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_space: unknown type(%d)\n", type);
-#endif
- return(0);
- }
-}
-
-struct cmsghdr *
-inet6_rthdr_init(bp, type)
- void *bp;
- int type;
-{
- struct cmsghdr *ch = (struct cmsghdr *)bp;
- struct ip6_rthdr *rthdr;
-
- rthdr = (struct ip6_rthdr *)CMSG_DATA(ch);
-
- ch->cmsg_level = IPPROTO_IPV6;
- ch->cmsg_type = IPV6_RTHDR;
-
- switch(type) {
- case IPV6_RTHDR_TYPE_0:
- ch->cmsg_len = CMSG_LEN(sizeof(struct ip6_rthdr0) - sizeof(struct in6_addr));
- bzero(rthdr, sizeof(struct ip6_rthdr0));
- rthdr->ip6r_type = IPV6_RTHDR_TYPE_0;
- return(ch);
- default:
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_init: unknown type(%d)\n", type);
-#endif
- return(NULL);
- }
-}
-
-int
-inet6_rthdr_add(cmsg, addr, flags)
- struct cmsghdr *cmsg;
- const struct in6_addr *addr;
- u_int flags;
-{
- struct ip6_rthdr *rthdr;
-
- rthdr = (struct ip6_rthdr *)CMSG_DATA(cmsg);
-
- switch(rthdr->ip6r_type) {
- case IPV6_RTHDR_TYPE_0:
- {
- struct ip6_rthdr0 *rt0 = (struct ip6_rthdr0 *)rthdr;
- if (flags != IPV6_RTHDR_LOOSE && flags != IPV6_RTHDR_STRICT) {
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_add: unsupported flag(%d)\n", flags);
-#endif
- return(-1);
- }
- if (rt0->ip6r0_segleft == 23) {
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_add: segment overflow\n");
-#endif
- return(-1);
- }
- if (flags == IPV6_RTHDR_STRICT) {
- int c, b;
- c = rt0->ip6r0_segleft / 8;
- b = rt0->ip6r0_segleft % 8;
- rt0->ip6r0_slmap[c] |= (1 << (7 - b));
- }
- rt0->ip6r0_segleft++;
- bcopy(addr, (caddr_t)rt0 + ((rt0->ip6r0_len + 1) << 3),
- sizeof(struct in6_addr));
- rt0->ip6r0_len += sizeof(struct in6_addr) >> 3;
- cmsg->cmsg_len = CMSG_LEN((rt0->ip6r0_len + 1) << 3);
- break;
- }
- default:
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_add: unknown type(%d)\n",
- rthdr->ip6r_type);
-#endif
- return(-1);
- }
-
- return(0);
-}
-
-int
-inet6_rthdr_lasthop(cmsg, flags)
- struct cmsghdr *cmsg;
- unsigned int flags;
-{
- struct ip6_rthdr *rthdr;
-
- rthdr = (struct ip6_rthdr *)CMSG_DATA(cmsg);
-
- switch(rthdr->ip6r_type) {
- case IPV6_RTHDR_TYPE_0:
- {
- struct ip6_rthdr0 *rt0 = (struct ip6_rthdr0 *)rthdr;
- if (flags != IPV6_RTHDR_LOOSE && flags != IPV6_RTHDR_STRICT) {
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_lasthop: unsupported flag(%d)\n", flags);
-#endif
- return(-1);
- }
- if (rt0->ip6r0_segleft > 23) {
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_add: segment overflow\n");
-#endif
- return(-1);
- }
- if (flags == IPV6_RTHDR_STRICT) {
- int c, b;
- c = rt0->ip6r0_segleft / 8;
- b = rt0->ip6r0_segleft % 8;
- rt0->ip6r0_slmap[c] |= (1 << (7 - b));
- }
- break;
- }
- default:
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_lasthop: unknown type(%d)\n",
- rthdr->ip6r_type);
-#endif
- return(-1);
- }
-
- return(0);
-}
-
-#if 0
-int
-inet6_rthdr_reverse(in, out)
- const struct cmsghdr *in;
- struct cmsghdr *out;
-{
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_reverse: not implemented yet\n");
-#endif
- return -1;
-}
-#endif
-
-int
-inet6_rthdr_segments(cmsg)
- const struct cmsghdr *cmsg;
-{
- struct ip6_rthdr *rthdr;
-
- rthdr = (struct ip6_rthdr *)CMSG_DATA(cmsg);
-
- switch(rthdr->ip6r_type) {
- case IPV6_RTHDR_TYPE_0:
- {
- struct ip6_rthdr0 *rt0 = (struct ip6_rthdr0 *)rthdr;
-
- if (rt0->ip6r0_len % 2 || 46 < rt0->ip6r0_len) {
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_segments: invalid size(%d)\n",
- rt0->ip6r0_len);
-#endif
- return -1;
- }
-
- return (rt0->ip6r0_len * 8) / sizeof(struct in6_addr);
- }
-
- default:
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_segments: unknown type(%d)\n",
- rthdr->ip6r_type);
-#endif
- return -1;
- }
-}
-
-struct in6_addr *
-inet6_rthdr_getaddr(cmsg, idx)
- struct cmsghdr *cmsg;
- int idx;
-{
- struct ip6_rthdr *rthdr;
-
- rthdr = (struct ip6_rthdr *)CMSG_DATA(cmsg);
-
- switch(rthdr->ip6r_type) {
- case IPV6_RTHDR_TYPE_0:
- {
- struct ip6_rthdr0 *rt0 = (struct ip6_rthdr0 *)rthdr;
- int naddr;
-
- if (rt0->ip6r0_len % 2 || 46 < rt0->ip6r0_len) {
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_getaddr: invalid size(%d)\n",
- rt0->ip6r0_len);
-#endif
- return NULL;
- }
- naddr = (rt0->ip6r0_len * 8) / sizeof(struct in6_addr);
- if (idx <= 0 || naddr < idx) {
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_getaddr: invalid idx(%d)\n", idx);
-#endif
- return NULL;
- }
- return &rt0->ip6r0_addr[idx - 1];
- }
-
- default:
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_getaddr: unknown type(%d)\n",
- rthdr->ip6r_type);
-#endif
- return NULL;
- }
-}
-
-int
-inet6_rthdr_getflags(cmsg, idx)
- const struct cmsghdr *cmsg;
- int idx;
-{
- struct ip6_rthdr *rthdr;
-
- rthdr = (struct ip6_rthdr *)CMSG_DATA(cmsg);
-
- switch(rthdr->ip6r_type) {
- case IPV6_RTHDR_TYPE_0:
- {
- struct ip6_rthdr0 *rt0 = (struct ip6_rthdr0 *)rthdr;
- int naddr;
-
- if (rt0->ip6r0_len % 2 || 46 < rt0->ip6r0_len) {
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_getflags: invalid size(%d)\n",
- rt0->ip6r0_len);
-#endif
- return -1;
- }
- naddr = (rt0->ip6r0_len * 8) / sizeof(struct in6_addr);
- if (idx < 0 || naddr < idx) {
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_getflags: invalid idx(%d)\n", idx);
-#endif
- return -1;
- }
- if (rt0->ip6r0_slmap[idx / 8] & (0x80 >> (idx % 8)))
- return IPV6_RTHDR_STRICT;
- else
- return IPV6_RTHDR_LOOSE;
- }
-
- default:
-#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_getflags: unknown type(%d)\n",
- rthdr->ip6r_type);
-#endif
- return -1;
- }
-}
diff --git a/newlib/libc/sys/linux/net/send.c b/newlib/libc/sys/linux/net/send.c
deleted file mode 100644
index 8ff65d015..000000000
--- a/newlib/libc/sys/linux/net/send.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)send.c 8.2 (Berkeley) 2/21/94";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include "namespace.h"
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <stddef.h>
-#include "un-namespace.h"
-
-ssize_t
-send(s, msg, len, flags)
- int s, flags;
- size_t len;
- const void *msg;
-{
- return (sendto(s, msg, len, flags, NULL, 0));
-}
diff --git a/newlib/libc/sys/linux/net/un-namespace.h b/newlib/libc/sys/linux/net/un-namespace.h
deleted file mode 100644
index 912109a0e..000000000
--- a/newlib/libc/sys/linux/net/un-namespace.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 2001 Daniel Eischen <deischen@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 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.
- *
- * $FreeBSD: src/lib/libc/include/un-namespace.h,v 1.7 2002/03/29 22:43:42 markm Exp $
- */
-
-#ifndef _UN_NAMESPACE_H_
-#define _UN_NAMESPACE_H_
-
-#undef accept
-#undef __acl_aclcheck_fd
-#undef __acl_delete_fd
-#undef __acl_get_fd
-#undef __acl_set_fd
-#undef bind
-#undef __cap_get_fd
-#undef __cap_set_fd
-#undef close
-#undef connect
-#undef dup
-#undef dup2
-#undef execve
-#undef fcntl
-#undef flock
-#undef fstat
-#undef fstatfs
-#undef fsync
-#undef getdirentries
-#undef getlogin
-#undef getpeername
-#undef getprogname
-#undef getsockname
-#undef getsockopt
-#undef ioctl
-#undef listen
-#undef nanosleep
-#undef open
-#undef pthread_getspecific
-#undef pthread_key_create
-#undef pthread_key_delete
-#undef pthread_mutex_destroy
-#undef pthread_mutex_init
-#undef pthread_mutex_lock
-#undef pthread_mutex_trylock
-#undef pthread_mutex_unlock
-#undef pthread_mutexattr_init
-#undef pthread_mutexattr_destroy
-#undef pthread_mutexattr_settype
-#undef pthread_once
-#undef pthread_self
-#undef pthread_setspecific
-#undef read
-#undef readv
-#undef recvfrom
-#undef recvmsg
-#undef select
-#undef sendmsg
-#undef sendto
-#undef setsockopt
-#undef sigaction
-#undef sigprocmask
-#undef sigsuspend
-#undef socket
-#undef socketpair
-#undef wait4
-#undef write
-#undef writev
-
-#if 0
-#undef creat
-#undef fchflags
-#undef fchmod
-#undef fpathconf
-#undef msync
-#undef nfssvc
-#undef pause
-#undef poll
-#undef pthread_rwlock_destroy
-#undef pthread_rwlock_init
-#undef pthread_rwlock_rdlock
-#undef pthread_rwlock_tryrdlock
-#undef pthread_rwlock_trywrlock
-#undef pthread_rwlock_unlock
-#undef pthread_rwlock_wrlock
-#undef pthread_rwlockattr_init
-#undef pthread_rwlockattr_destroy
-#undef sched_yield
-#undef sendfile
-#undef shutdown
-#undef sigaltstack
-#undef sigpending
-#undef sigreturn
-#undef sigsetmask
-#undef sleep
-#undef system
-#undef tcdrain
-#undef wait
-#undef waitpid
-#endif /* 0 */
-
-#ifdef _SIGNAL_H_
-int _sigaction(int, const struct sigaction *, struct sigaction *);
-#endif
-
-#ifdef _SYS_FCNTL_H_
-int _flock(int, int);
-#endif
-
-#undef err
-#undef warn
-
-#endif /* _UN_NAMESPACE_H_ */
diff --git a/newlib/libc/sys/linux/net/vars.c b/newlib/libc/sys/linux/net/vars.c
deleted file mode 100644
index c91a04bd1..000000000
--- a/newlib/libc/sys/linux/net/vars.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* $KAME: vars.c,v 1.2 2001/08/20 02:32:41 itojun Exp $ */
-
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 PROJECT 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 PROJECT 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>
-#include <sys/types.h>
-
-#include <sys/types.h>
-#include <netinet/in.h>
-
-/*
- * Definitions of some costant IPv6 addresses.
- */
-const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
-const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
-const struct in6_addr in6addr_nodelocal_allnodes = IN6ADDR_NODELOCAL_ALLNODES_INIT;
-const struct in6_addr in6addr_linklocal_allnodes = IN6ADDR_LINKLOCAL_ALLNODES_INIT;
-
diff --git a/newlib/libc/sys/linux/ntp_gettime.c b/newlib/libc/sys/linux/ntp_gettime.c
deleted file mode 100644
index 2bcabbc63..000000000
--- a/newlib/libc/sys/linux/ntp_gettime.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sys/timex.h>
-
-#ifndef MOD_OFFSET
-# define modes mode
-#endif
-
-int
-ntp_gettime (ntv)
- struct ntptimeval *ntv;
-{
- struct timex tntx;
- int result;
-
- tntx.modes = 0;
- result = __adjtimex (&tntx);
- ntv->time = tntx.time;
- ntv->maxerror = tntx.maxerror;
- ntv->esterror = tntx.esterror;
- return result;
-}
diff --git a/newlib/libc/sys/linux/pathconf.c b/newlib/libc/sys/linux/pathconf.c
deleted file mode 100644
index 796945971..000000000
--- a/newlib/libc/sys/linux/pathconf.c
+++ /dev/null
@@ -1,300 +0,0 @@
-/* Linux specific extensions to pathconf.
- Copyright (C) 1991,95,96,98,99,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Modified for newlib July 19, 2002 - Jeff Johnston */
-
-#include <errno.h>
-#include <stddef.h>
-#include <unistd.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/statvfs.h>
-#include <machine/weakalias.h>
-#include "linux_fsinfo.h"
-
-/* The Linux kernel header mentioned this as a kind of generic value. */
-#define LINUX_LINK_MAX 127
-
-static long int posix_pathconf (const char *path, int name);
-
-
-/* Get file-specific information about descriptor FD. */
-long int
-__pathconf (path, name)
- const char *path;
- int name;
-{
- if (name == _PC_LINK_MAX)
- {
- struct statfs fsbuf;
-
- /* Determine the filesystem type. */
- if (__statfs (path, &fsbuf) < 0)
- {
- if (errno == ENOSYS)
- /* not possible, return the default value. */
- return LINUX_LINK_MAX;
-
- /* Some error occured. */
- return -1;
- }
-
- switch (fsbuf.f_type)
- {
- case EXT2_SUPER_MAGIC:
- return EXT2_LINK_MAX;
-
- case MINIX_SUPER_MAGIC:
- case MINIX_SUPER_MAGIC2:
- return MINIX_LINK_MAX;
-
- case MINIX2_SUPER_MAGIC:
- case MINIX2_SUPER_MAGIC2:
- return MINIX2_LINK_MAX;
-
- case XENIX_SUPER_MAGIC:
- return XENIX_LINK_MAX;
-
- case SYSV4_SUPER_MAGIC:
- case SYSV2_SUPER_MAGIC:
- return SYSV_LINK_MAX;
-
- case COH_SUPER_MAGIC:
- return COH_LINK_MAX;
-
- case UFS_MAGIC:
- case UFS_CIGAM:
- return UFS_LINK_MAX;
-
- case REISERFS_SUPER_MAGIC:
- return REISERFS_LINK_MAX;
-
- default:
- return LINUX_LINK_MAX;
- }
- }
-
- return posix_pathconf (path, name);
-}
-
-/* Get file-specific information about PATH. */
-static long int
-posix_pathconf (const char *path, int name)
-{
- if (path[0] == '\0')
- {
- __set_errno (ENOENT);
- return -1;
- }
-
- switch (name)
- {
- default:
- __set_errno (EINVAL);
- return -1;
-
- case _PC_LINK_MAX:
-#ifdef LINK_MAX
- return LINK_MAX;
-#else
- return -1;
-#endif
-
- case _PC_MAX_CANON:
-#ifdef MAX_CANON
- return MAX_CANON;
-#else
- return -1;
-#endif
-
- case _PC_MAX_INPUT:
-#ifdef MAX_INPUT
- return MAX_INPUT;
-#else
- return -1;
-#endif
-
- case _PC_NAME_MAX:
-#ifdef NAME_MAX
- {
- struct statfs buf;
- int save_errno = errno;
-
- if (__statfs (path, &buf) < 0)
- {
- if (errno == ENOSYS)
- {
- errno = save_errno;
- return NAME_MAX;
- }
- return -1;
- }
- else
- {
-#ifdef _STATFS_F_NAMELEN
- return buf.f_namelen;
-#else
-# ifdef _STATFS_F_NAME_MAX
- return buf.f_name_max;
-# else
- return NAME_MAX;
-# endif
-#endif
- }
- }
-#else
- return -1;
-#endif
-
- case _PC_PATH_MAX:
-#ifdef PATH_MAX
- return PATH_MAX;
-#else
- return -1;
-#endif
-
- case _PC_PIPE_BUF:
-#ifdef PIPE_BUF
- return PIPE_BUF;
-#else
- return -1;
-#endif
-
- case _PC_CHOWN_RESTRICTED:
-#ifdef _POSIX_CHOWN_RESTRICTED
- return _POSIX_CHOWN_RESTRICTED;
-#else
- return -1;
-#endif
-
- case _PC_NO_TRUNC:
-#ifdef _POSIX_NO_TRUNC
- return _POSIX_NO_TRUNC;
-#else
- return -1;
-#endif
-
- case _PC_VDISABLE:
-#ifdef _POSIX_VDISABLE
- return _POSIX_VDISABLE;
-#else
- return -1;
-#endif
-
- case _PC_SYNC_IO:
-#ifdef _POSIX_SYNC_IO
- return _POSIX_SYNC_IO;
-#else
- return -1;
-#endif
-
- case _PC_ASYNC_IO:
-#ifdef _POSIX_ASYNC_IO
- {
- /* AIO is only allowed on regular files and block devices. */
- struct stat64 st;
-
- if (stat64 (path, &st) < 0
- || (! S_ISREG (st.st_mode) && ! S_ISBLK (st.st_mode)))
- return -1;
- else
- return 1;
- }
-#else
- return -1;
-#endif
-
- case _PC_PRIO_IO:
-#ifdef _POSIX_PRIO_IO
- return _POSIX_PRIO_IO;
-#else
- return -1;
-#endif
-
- case _PC_SOCK_MAXBUF:
-#ifdef SOCK_MAXBUF
- return SOCK_MAXBUF;
-#else
- return -1;
-#endif
-
- case _PC_FILESIZEBITS:
-#ifdef FILESIZEBITS
- return FILESIZEBITS;
-#else
- /* We let platforms with larger file sizes overwrite this value. */
- return 32;
-#endif
-
- case _PC_REC_INCR_XFER_SIZE:
- /* XXX It is not entirely clear what the limit is supposed to do.
- What is incremented? */
- return -1;
-
- case _PC_REC_MAX_XFER_SIZE:
- /* XXX It is not entirely clear what the limit is supposed to do.
- In general there is no top limit of the number of bytes which
- case be transported at once. */
- return -1;
-
- case _PC_REC_MIN_XFER_SIZE:
- {
- /* XXX It is not entirely clear what the limit is supposed to do.
- I assume this is the block size of the filesystem. */
- struct statvfs64 sv;
-
- if (__statvfs64 (path, &sv) < 0)
- return -1;
- return sv.f_bsize;
- }
-
- case _PC_REC_XFER_ALIGN:
- {
- /* XXX It is not entirely clear what the limit is supposed to do.
- I assume that the number should reflect the minimal block
- alignment. */
- struct statvfs64 sv;
-
- if (__statvfs64 (path, &sv) < 0)
- return -1;
- return sv.f_frsize;
- }
-
- case _PC_ALLOC_SIZE_MIN:
- {
- /* XXX It is not entirely clear what the limit is supposed to do.
- I assume that the number should reflect the minimal block
- alignment. */
- struct statvfs64 sv;
-
- if (__statvfs64 (path, &sv) < 0)
- return -1;
- return sv.f_frsize;
- }
-
- case _PC_SYMLINK_MAX:
- /* In general there are no limits. If a system has one it should
- overwrite this case. */
- return -1;
- }
-}
-
-weak_alias (__pathconf, pathconf)
diff --git a/newlib/libc/sys/linux/pread.c b/newlib/libc/sys/linux/pread.c
deleted file mode 100644
index ff8371e15..000000000
--- a/newlib/libc/sys/linux/pread.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Linux version of pread so we can have a weak_alias */
-
-#include <_ansi.h>
-#include <unistd.h>
-#include <reent.h>
-#include <machine/weakalias.h>
-
-ssize_t
-_DEFUN (_pread_r, (rptr, fd, buf, n, off),
- struct _reent *rptr _AND
- int fd _AND
- _PTR buf _AND
- size_t n _AND
- off_t off)
-{
- off_t cur_pos;
- _READ_WRITE_RETURN_TYPE num_read;
-
- if ((cur_pos = _lseek_r (rptr, fd, 0, SEEK_CUR)) == (off_t)-1)
- return -1;
-
- if (_lseek_r (rptr, fd, off, SEEK_SET) == (off_t)-1)
- return -1;
-
- num_read = _read_r (rptr, fd, buf, n);
-
- if (_lseek_r (rptr, fd, cur_pos, SEEK_SET) == (off_t)-1)
- return -1;
-
- return (ssize_t)num_read;
-}
-
-#ifndef _REENT_ONLY
-
-ssize_t
-_DEFUN (__libc_pread, (fd, buf, n, off),
- int fd _AND
- _PTR buf _AND
- size_t n _AND
- off_t off)
-{
- return _pread_r (_REENT, fd, buf, n, off);
-}
-weak_alias(__libc_pread,pread)
-
-#endif
diff --git a/newlib/libc/sys/linux/pread64.c b/newlib/libc/sys/linux/pread64.c
deleted file mode 100644
index c4bdca706..000000000
--- a/newlib/libc/sys/linux/pread64.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-FUNCTION
-<<pread64>>---read a large file from specified position
-
-INDEX
- pread64
-
-ANSI_SYNOPSIS
- #include <unistd.h>
- ssize_t pread64(int <[fd]>, void *<[buf]>, size_t <[n]>, loff_t <[off]>);
-
-TRAD_SYNOPSIS
- #include <unistd.h>
- ssize_t pread64(<[fd]>, <[buf]>, <[n]>, <[off]>)
- int <[fd]>;
- void *<[buf]>;
- size_t <[n]>;
- loff_t <[off]>;
-
-DESCRIPTION
-The <<pread64>> function is similar to <<pread>>. The only difference is
-that it operates on large files and so takes a 64-bit offset. Like <<pread>>>,
-the file position is unchanged by the function (i.e. the file position
-is the same before and after a call to <<pread>>).
-
-RETURNS
-<<pread64>> returns the number of bytes read or <<-1>> if failure occurred.
-
-PORTABILITY
-<<pread64>> is an EL/IX extension.
-
-Supporting OS subroutine required: <<read>>, <<lseek64>>.
-*/
-
-#include <_ansi.h>
-#include <unistd.h>
-#include <reent.h>
-#include <machine/weakalias.h>
-
-ssize_t
-_DEFUN (__libc_pread64, (fd, buf, n, off),
- int fd _AND
- _PTR buf _AND
- size_t n _AND
- loff_t off)
-{
- loff_t cur_pos;
- _READ_WRITE_RETURN_TYPE num_read;
-
- if ((cur_pos = lseek64 (fd, 0, SEEK_CUR)) == (loff_t)-1)
- return -1;
-
- if (lseek64 (fd, off, SEEK_SET) == (loff_t)-1)
- return -1;
-
- num_read = read (fd, buf, n);
-
- if (lseek64 (fd, cur_pos, SEEK_SET) == (loff_t)-1)
- return -1;
-
- return (ssize_t)num_read;
-}
-weak_alias(__libc_pread64,pread64);
-weak_alias(__libc_pread64,__pread64);
-
diff --git a/newlib/libc/sys/linux/process.c b/newlib/libc/sys/linux/process.c
deleted file mode 100644
index 160b80137..000000000
--- a/newlib/libc/sys/linux/process.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* libc/sys/linux/process.c - Process-related system calls */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#include <sys/unistd.h>
-#include <sys/wait.h>
-#include <machine/syscall.h>
-
-
-#define __NR__exit __NR_exit
-#define __NR__execve __NR_execve
-
-_syscall0(int,getpid)
-_syscall0(pid_t,getppid)
-
-weak_alias(__libc_getpid,__getpid);
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 3
-_syscall3(int,_execve,const char *,file,char * const *,argv,char * const *,envp)
-_syscall0(int,fork)
-#endif /* _ELIX_LEVEL >= 3 */
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 4
-_syscall0(pid_t,getpgrp)
-_syscall2(int,setpgid,pid_t,pid,pid_t,pgid)
-_syscall0(pid_t,setsid)
-
-/* Here we implement vfork in terms of fork, since
- * Linux's vfork system call is not reliable.
- */
-pid_t vfork(void)
-{
- pid_t pid;
-
- pid = fork();
-
- if(!pid)
- {
- /* In child. */
- return 0;
- }
- else
- {
- /* In parent. Wait for child to finish. */
- if (waitpid (pid, NULL, 0) < 0)
- return pid;
- }
-}
-#endif /* !_ELIX_LEVEL || _ELIX_LEVEL >= 4 */
-
-
-/* Although _exit is listed as level 3, we use it from level 1 interfaces */
-/* FIXME: get rid of noreturn warning */
-
-#define return for (;;)
-_syscall1(void,_exit,int,exitcode)
-#undef return
diff --git a/newlib/libc/sys/linux/prof-freq.c b/newlib/libc/sys/linux/prof-freq.c
deleted file mode 100644
index 829979bbb..000000000
--- a/newlib/libc/sys/linux/prof-freq.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Return frequency of ticks reported by profil. Generic version. */
-/*-
- * Copyright (c) 1983, 1992, 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.
- */
-
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <libc-internal.h>
-
-int
-__profile_frequency (void)
-{
- /*
- * Discover the tick frequency of the machine if something goes wrong,
- * we return 0, an impossible hertz.
- */
- struct itimerval tim;
-
- tim.it_interval.tv_sec = 0;
- tim.it_interval.tv_usec = 1;
- tim.it_value.tv_sec = 0;
- tim.it_value.tv_usec = 0;
- setitimer(ITIMER_REAL, &tim, 0);
- setitimer(ITIMER_REAL, 0, &tim);
- if (tim.it_interval.tv_usec < 2)
- return 0;
- return (1000000 / tim.it_interval.tv_usec);
-}
diff --git a/newlib/libc/sys/linux/profile.c b/newlib/libc/sys/linux/profile.c
deleted file mode 100644
index f36e2c753..000000000
--- a/newlib/libc/sys/linux/profile.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* libc/sys/linux/profile.c - profiling system call */
-
-#include <errno.h>
-#include <sys/types.h>
-#include <machine/syscall.h>
-
-#define __NR_profil 98
-
-int profil(u_short *buf, size_t bufsiz, size_t offset,
- u_int scale);
-
-_syscall4(int,profil,unsigned short *,buf,size_t,bufsiz,size_t,offset,unsigned int, scale)
diff --git a/newlib/libc/sys/linux/psignal.c b/newlib/libc/sys/linux/psignal.c
deleted file mode 100644
index f5fedc9fa..000000000
--- a/newlib/libc/sys/linux/psignal.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/* libc/sys/linux/psignal.c - print signal message to stderr */
-
-/* Copyright 2002, Red Hat Inc. */
-
-#include <stdio.h>
-#include <string.h>
-
-void
-psignal (int sig, const char *s)
-{
- if (s != NULL)
- fprintf (stderr, "%s: %s\n", s, strsignal (sig));
- else
- fprintf (stderr, "%s\n", strsignal (sig));
-}
diff --git a/newlib/libc/sys/linux/pvallocr.c b/newlib/libc/sys/linux/pvallocr.c
deleted file mode 100644
index 716ea0c12..000000000
--- a/newlib/libc/sys/linux/pvallocr.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdlib.h>
-
-void *
-_pvalloc_r (struct _reent *ptr, size_t bytes)
-{
- return pvalloc (bytes);
-}
diff --git a/newlib/libc/sys/linux/pwrite.c b/newlib/libc/sys/linux/pwrite.c
deleted file mode 100644
index 239463e59..000000000
--- a/newlib/libc/sys/linux/pwrite.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Linux version of pwrite so we can have a weak alias */
-
-#include <_ansi.h>
-#include <unistd.h>
-#include <reent.h>
-#include <machine/weakalias.h>
-
-ssize_t
-_DEFUN (_pwrite_r, (rptr, fd, buf, n, off),
- struct _reent *rptr _AND
- int fd _AND
- _CONST _PTR buf _AND
- size_t n _AND
- off_t off)
-{
- off_t cur_pos;
- _READ_WRITE_RETURN_TYPE num_written;
-
- if ((cur_pos = _lseek_r (rptr, fd, 0, SEEK_CUR)) == (off_t)-1)
- return -1;
-
- if (_lseek_r (rptr, fd, off, SEEK_SET) == (off_t)-1)
- return -1;
-
- num_written = _write_r (rptr, fd, buf, n);
-
- if (_lseek_r (rptr, fd, cur_pos, SEEK_SET) == (off_t)-1)
- return -1;
-
- return (ssize_t)num_written;
-}
-
-#ifndef _REENT_ONLY
-
-ssize_t
-_DEFUN (__libc_pwrite, (fd, buf, n, off),
- int fd _AND
- _CONST _PTR buf _AND
- size_t n _AND
- off_t off)
-{
- return _pwrite_r (_REENT, fd, buf, n, off);
-}
-weak_alias(__libc_pwrite,pwrite)
-
-#endif
diff --git a/newlib/libc/sys/linux/pwrite64.c b/newlib/libc/sys/linux/pwrite64.c
deleted file mode 100644
index f1d678493..000000000
--- a/newlib/libc/sys/linux/pwrite64.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-FUNCTION
-<<pwrite64>>---write a large file from specified position
-
-INDEX
- pwrite64
-
-ANSI_SYNOPSIS
- #include <unistd.h>
- ssize_t pwrite64(int <[fd]>, void *<[buf]>, size_t <[n]>, loff_t <[off]>);
-
-TRAD_SYNOPSIS
- #include <unistd.h>
- ssize_t pwrite64(<[fd]>, <[buf]>, <[n]>, <[off]>)
- int <[fd]>;
- void *<[buf]>;
- size_t <[n]>;
- loff_t <[off]>;
-
-DESCRIPTION
-The <<pwrite64>> function is similar to <<pwrite>>. The only difference is
-that it operates on large files and so takes a 64-bit offset. Like <<pwrite>>>,
-the file position is unchanged by the function (i.e. the file position
-is the same before and after a call to <<pwrite>>).
-
-RETURNS
-<<pwrite64>> returns the number of bytes written or <<-1>> if failure occurred.
-
-PORTABILITY
-<<pwrite64>> is an EL/IX extension.
-
-Supporting OS subroutine required: <<write>>, <<lseek64>>.
-*/
-
-#include <_ansi.h>
-#include <unistd.h>
-#include <reent.h>
-#include <machine/weakalias.h>
-
-ssize_t
-_DEFUN (__libc_pwrite64, (fd, buf, n, off),
- int fd _AND
- _PTR buf _AND
- size_t n _AND
- loff_t off)
-{
- loff_t cur_pos;
- _READ_WRITE_RETURN_TYPE num_written;
-
- if ((cur_pos = lseek64 (fd, 0, SEEK_CUR)) == (loff_t)-1)
- return -1;
-
- if (lseek64 (fd, off, SEEK_SET) == (loff_t)-1)
- return -1;
-
- num_written = write (fd, buf, n);
-
- if (lseek64 (fd, cur_pos, SEEK_SET) == (loff_t)-1)
- return -1;
-
- return (ssize_t)num_written;
-}
-weak_alias(__libc_pwrite64,pwrite64)
-
diff --git a/newlib/libc/sys/linux/raise.c b/newlib/libc/sys/linux/raise.c
deleted file mode 100644
index d69561be1..000000000
--- a/newlib/libc/sys/linux/raise.c
+++ /dev/null
@@ -1,3 +0,0 @@
-/* empty file so we override regular raise */
-
-
diff --git a/newlib/libc/sys/linux/readdir64.c b/newlib/libc/sys/linux/readdir64.c
deleted file mode 100644
index 78fe98e90..000000000
--- a/newlib/libc/sys/linux/readdir64.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/* Modified from newlib/libc/posix/readdir.c */
-
-#include <dirent.h>
-#include <machine/syscall.h>
-
-#define __NR___getdents64 __NR_getdents64
-
-static _syscall3(int,__getdents64,int,fd,struct dirent64 *,dirp,unsigned int,count)
-
-/*
- * get next entry in a directory.
- */
-struct dirent64 *
-__readdir64 (dirp)
-register DIR *dirp; {
- register struct dirent64 *dp;
-
-#ifdef HAVE_DD_LOCK
- __lock_acquire_recursive(dirp->dd_lock);
-#endif
-
- if (dirp->dd_fd == -1)
- return NULL;
-
- for (;;) {
- if (dirp->dd_loc == 0) {
- dirp->dd_size = __getdents64 (dirp->dd_fd,
- (void *)dirp->dd_buf,
- dirp->dd_len);
-
- if (dirp->dd_size <= 0) {
-#ifdef HAVE_DD_LOCK
- __lock_release_recursive(dirp->dd_lock);
-#endif
- return NULL;
- }
- }
- if (dirp->dd_loc >= dirp->dd_size) {
- dirp->dd_loc = 0;
- continue;
- }
- dp = (struct dirent64 *)(dirp->dd_buf + dirp->dd_loc);
- if ((int)dp & 03) { /* bogus pointer check */
-#ifdef HAVE_DD_LOCK
- __lock_release_recursive(dirp->dd_lock);
-#endif
- return NULL;
- }
- if (dp->d_reclen <= 0 ||
- dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc) {
-#ifdef HAVE_DD_LOCK
- __lock_release_recursive(dirp->dd_lock);
-#endif
- return NULL;
- }
- dirp->dd_loc += dp->d_reclen;
- if (dp->d_ino == 0)
- continue;
-#ifdef HAVE_DD_LOCK
- __lock_release_recursive(dirp->dd_lock);
-#endif
- return (dp);
- }
-}
diff --git a/newlib/libc/sys/linux/realloc.c b/newlib/libc/sys/linux/realloc.c
deleted file mode 100644
index 818e05a75..000000000
--- a/newlib/libc/sys/linux/realloc.c
+++ /dev/null
@@ -1 +0,0 @@
-/* dummy file to override one object in stdlib directory */
diff --git a/newlib/libc/sys/linux/reallocr.c b/newlib/libc/sys/linux/reallocr.c
deleted file mode 100644
index 873c1b0e5..000000000
--- a/newlib/libc/sys/linux/reallocr.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdlib.h>
-
-void *
-_realloc_r (struct _reent *ptr, void *old, size_t newlen)
-{
- return realloc (old, newlen);
-}
diff --git a/newlib/libc/sys/linux/realpath.c b/newlib/libc/sys/linux/realpath.c
deleted file mode 100644
index 8aa5eb445..000000000
--- a/newlib/libc/sys/linux/realpath.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* realpath.c - Return the canonicalized absolute pathname */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <limits.h>
-#include <errno.h>
-#include <sys/stat.h>
-
-
-/* FIXME: buffer overrun possible, loops forever on cyclic symlinks */
-
-
-/*
- * Canonical name: never ends with a slash
- */
-
-static int resolve_path(char *path,char *result,char *pos)
-{
- if (*path == '/') {
- *result = '/';
- pos = result+1;
- path++;
- }
- *pos = 0;
- if (!*path) return 0;
- while (1) {
- char *slash;
- struct stat st;
-
- slash = *path ? strchr(path,'/') : NULL;
- if (slash) *slash = 0;
- if (!path[0] || (path[0] == '.' &&
- (!path[1] || (path[1] == '.' && !path[2])))) {
- pos--;
- if (pos != result && path[0] && path[1])
- while (*--pos != '/');
- }
- else {
- strcpy(pos,path);
- if (lstat(result,&st) < 0) return -1;
- if (S_ISLNK(st.st_mode)) {
- char buf[PATH_MAX];
-
- if (readlink(result,buf,sizeof(buf)) < 0) return -1;
- *pos = 0;
- if (slash) {
- *slash = '/';
- strcat(buf,slash);
- }
- strcpy(path,buf);
- if (*path == '/') result[1] = 0;
- pos = strchr(result,0);
- continue;
- }
- pos = strchr(result,0);
- }
- if (slash) {
- *pos++ = '/';
- path = slash+1;
- }
- *pos = 0;
- if (!slash) break;
- }
- return 0;
-}
-
-
-char *realpath(const char *path,char *resolved_path)
-{
- char cwd[PATH_MAX];
- char *path_copy;
- int res;
-
- if (!*path) {
- errno = ENOENT; /* SUSv2 */
- return NULL;
- }
- if (!getcwd(cwd,sizeof(cwd))) return NULL;
- strcpy(resolved_path,"/");
- if (resolve_path(cwd,resolved_path,resolved_path)) return NULL;
- strcat(resolved_path,"/");
- path_copy = strdup(path);
- if (!path_copy) return NULL;
- res = resolve_path(path_copy,resolved_path,strchr(resolved_path,0));
- free(path_copy);
- if (res) return NULL;
- return resolved_path;
-}
diff --git a/newlib/libc/sys/linux/rename.c b/newlib/libc/sys/linux/rename.c
deleted file mode 100644
index d6bf4598e..000000000
--- a/newlib/libc/sys/linux/rename.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* libc/sys/linux/rename.c - rename a file */
-
-/* Copyright 2002, Red Hat Inc. */
-
-#include <stdio.h>
-#include <machine/syscall.h>
-
-_syscall2(int,rename,const char *,old,const char *,new)
-
diff --git a/newlib/libc/sys/linux/resource.c b/newlib/libc/sys/linux/resource.c
deleted file mode 100644
index 54a049da9..000000000
--- a/newlib/libc/sys/linux/resource.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* libc/sys/linux/resource.c - Process resource functions */
-
-/* Copyright 2002, Red Hat Inc. */
-
-#include <sys/resource.h>
-#include <machine/syscall.h>
-
-_syscall2(int,getrusage,int,who,struct rusage *,r_usage)
-_syscall2(int,getrlimit,int,resource,struct rlimit *,rlp)
-
-weak_alias(__libc_getrlimit,__getrlimit)
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 2
-_syscall2(int,setrlimit,int,resource,const struct rlimit *,rlp)
-weak_alias(__libc_setrlimit,__setrlimit)
-#endif
-
diff --git a/newlib/libc/sys/linux/scandir64.c b/newlib/libc/sys/linux/scandir64.c
deleted file mode 100644
index b21b42342..000000000
--- a/newlib/libc/sys/linux/scandir64.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)scandir.c 5.10 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Scan the directory dirname calling select to make a list of selected
- * directory entries then sort using qsort and compare routine dcomp.
- * Returns the number of entries and a pointer to a list of pointers to
- * struct dirent64 (through namelist). Returns -1 if there were any errors.
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/lock.h>
-
-extern struct dirent64 *__readdir64 (DIR *);
-
-/*
- * The DIRSIZ macro gives the minimum record length which will hold
- * the directory entry. This requires the amount of space in struct dirent64
- * without the d_name field, plus enough space for the name with a terminating
- * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary.
- */
-#undef DIRSIZ
-#ifdef _DIRENT_HAVE_D_NAMLEN
-#define DIRSIZ(dp) \
- ((sizeof (struct dirent64) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
-#else
-#define DIRSIZ(dp) \
- ((sizeof (struct dirent64) - (MAXNAMLEN+1)) + ((strlen((dp)->d_name)+1 + 3) &~ 3))
-#endif
-
-#ifndef __P
-#define __P(args) ()
-#endif
-
-int
-scandir64(dirname, namelist, select, dcomp)
- const char *dirname;
- struct dirent64 ***namelist;
- int (*select) __P((struct dirent64 *));
- int (*dcomp) __P((const void *, const void *));
-{
- register struct dirent64 *d, *p, **names;
- register size_t nitems;
- struct stat64 stb;
- long arraysz;
- DIR *dirp;
-
- if ((dirp = opendir(dirname)) == NULL)
- return(-1);
-#ifdef HAVE_DD_LOCK
- __lock_acquire_recursive(dirp->dd_lock);
-#endif
- if (fstat64(dirp->dd_fd, &stb) < 0) {
-#ifdef HAVE_DD_LOCK
- __lock_release_recursive(dirp->dd_lock);
-#endif
- return(-1);
- }
-
- /*
- * estimate the array size by taking the size of the directory file
- * and dividing it by a multiple of the minimum size entry.
- */
- arraysz = (stb.st_size / 24);
- names = (struct dirent64 **)malloc(arraysz * sizeof(struct dirent64 *));
- if (names == NULL) {
-#ifdef HAVE_DD_LOCK
- __lock_release_recursive(dirp->dd_lock);
-#endif
- return(-1);
- }
-
- nitems = 0;
- while ((d = __readdir64(dirp)) != NULL) {
- if (select != NULL && !(*select)(d))
- continue; /* just selected names */
- /*
- * Make a minimum size copy of the data
- */
- p = (struct dirent64 *)malloc(DIRSIZ(d));
- if (p == NULL) {
-#ifdef HAVE_DD_LOCK
- __lock_release_recursive(dirp->dd_lock);
-#endif
- return(-1);
- }
- p->d_ino = d->d_ino;
- p->d_reclen = d->d_reclen;
-#ifdef _DIRENT_HAVE_D_NAMLEN
- p->d_namlen = d->d_namlen;
- bcopy(d->d_name, p->d_name, p->d_namlen + 1);
-#else
- strcpy(p->d_name, d->d_name);
-#endif
- /*
- * Check to make sure the array has space left and
- * realloc the maximum size.
- */
- if (++nitems >= arraysz) {
- if (fstat64(dirp->dd_fd, &stb) < 0) {
-#ifdef HAVE_DD_LOCK
- __lock_release_recursive(dirp->dd_lock);
-#endif
- return(-1); /* just might have grown */
- }
- arraysz = stb.st_size / 12;
- names = (struct dirent64 **)realloc((char *)names,
- arraysz * sizeof(struct dirent64 *));
- if (names == NULL) {
-#ifdef HAVE_DD_LOCK
- __lock_release_recursive(dirp->dd_lock);
-#endif
- return(-1);
- }
- }
- names[nitems-1] = p;
- }
- closedir(dirp);
- if (nitems && dcomp != NULL)
- qsort(names, nitems, sizeof(struct dirent64 *), dcomp);
- *namelist = names;
-#ifdef HAVE_DD_LOCK
- __lock_release_recursive(dirp->dd_lock);
-#endif
- return(nitems);
-}
-
-/*
- * Alphabetic order comparison routine for those who want it.
- */
-int
-alphasort64(d1, d2)
- const struct dirent64 **d1;
- const struct dirent64 **d2;
-{
- return(strcmp((*d1)->d_name, (*d2)->d_name));
-}
-
diff --git a/newlib/libc/sys/linux/sched.c b/newlib/libc/sys/linux/sched.c
deleted file mode 100644
index 031b1b553..000000000
--- a/newlib/libc/sys/linux/sched.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* libc/sys/linux/sched.c - Process scheduling functions */
-
-/* Copyright 2002, Red Hat Inc. */
-
-#include <time.h>
-#include <sched.h>
-#include <machine/syscall.h>
-
-_syscall1(int,sched_get_priority_max,int,policy);
-_syscall1(int,sched_get_priority_min,int,policy);
-_syscall2(int,sched_rr_get_interval,pid_t,pid,struct timespec *,interval);
-_syscall0(int,sched_yield);
-
-weak_alias(__libc_sched_get_priority_max,__sched_get_priority_max);
-weak_alias(__libc_sched_get_priority_min,__sched_get_priority_min);
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 3
-_syscall2(int,sched_getparam,pid_t,pid,struct sched_param *,sched);
-_syscall1(int,sched_getscheduler,pid_t,pid);
-_syscall2(int,sched_setparam,pid_t,pid,const struct sched_param *,sched);
-_syscall3(int,sched_setscheduler,pid_t,pid,int,policy,const struct sched_param *,sched);
-weak_alias(__libc_sched_getparam,__sched_getparam);
-weak_alias(__libc_sched_getscheduler,__sched_getscheduler);
-weak_alias(__libc_sched_setscheduler,__sched_setscheduler);
-#endif /* !_ELIX_LEVEL || _ELIX_LEVEL >= 3 */
-
diff --git a/newlib/libc/sys/linux/select.c b/newlib/libc/sys/linux/select.c
deleted file mode 100644
index 882f54167..000000000
--- a/newlib/libc/sys/linux/select.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* libc/sys/linux/select.c - The select system calls */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <machine/syscall.h>
-
-
-static _syscall5(int,_newselect,int,n,fd_set *,readfds,fd_set *,writefds,fd_set *,exceptfds,struct timeval *,timeout)
-
-int select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- struct timeval *timeout)
-{
- return _newselect(n, readfds, writefds, exceptfds, timeout);
-}
diff --git a/newlib/libc/sys/linux/seteuid.c b/newlib/libc/sys/linux/seteuid.c
deleted file mode 100644
index c3fa384fd..000000000
--- a/newlib/libc/sys/linux/seteuid.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* Copyright 2002, Red Hat Inc. */
-
-#include <errno.h>
-#include <unistd.h>
-
-int
-seteuid (uid_t uid)
-{
- int result;
-
- if (uid == (uid_t) ~0)
- {
- errno = (EINVAL);
- return -1;
- }
-
- return setresuid (-1, uid, -1);
-}
diff --git a/newlib/libc/sys/linux/sethostid.c b/newlib/libc/sys/linux/sethostid.c
deleted file mode 100644
index eb71b74a1..000000000
--- a/newlib/libc/sys/linux/sethostid.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define SET_PROCEDURE 1
-#include "gethostid.c"
diff --git a/newlib/libc/sys/linux/sethostname.c b/newlib/libc/sys/linux/sethostname.c
deleted file mode 100644
index 669df3d74..000000000
--- a/newlib/libc/sys/linux/sethostname.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* libc/sys/linux/sethostname.c - Set host name */
-
-/* Copyright 2002, Red Hat Inc. */
-
-#include <unistd.h>
-#include <machine/syscall.h>
-
-_syscall2(int,sethostname,const char *,name,size_t,len);
diff --git a/newlib/libc/sys/linux/setrlimit64.c b/newlib/libc/sys/linux/setrlimit64.c
deleted file mode 100644
index d4b4bfce0..000000000
--- a/newlib/libc/sys/linux/setrlimit64.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 1991,1995,1996,1997,1998,2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <sys/resource.h>
-#include <sys/types.h>
-
-/* Set the soft and hard limits for RESOURCE to *RLIMITS.
- Only the super-user can increase hard limits.
- Return 0 if successful, -1 if not (and sets errno). */
-int
-setrlimit64 (resource, rlimits)
- enum __rlimit_resource resource;
- const struct rlimit64 *rlimits;
-{
- struct rlimit rlimits32;
-
- if (rlimits->rlim_cur >= RLIM_INFINITY)
- rlimits32.rlim_cur = RLIM_INFINITY;
- else
- rlimits32.rlim_cur = rlimits->rlim_cur;
- if (rlimits->rlim_max >= RLIM_INFINITY)
- rlimits32.rlim_max = RLIM_INFINITY;
- else
- rlimits32.rlim_max = rlimits->rlim_max;
-
- return __setrlimit (resource, &rlimits32);
-}
diff --git a/newlib/libc/sys/linux/shared.ld b/newlib/libc/sys/linux/shared.ld
deleted file mode 100644
index 0e696572b..000000000
--- a/newlib/libc/sys/linux/shared.ld
+++ /dev/null
@@ -1,15 +0,0 @@
-VERS_1.10 {
- global: *;
-};
-
-VERS_1.11 {
- global: *;
-};
-
-VERS_1.12 {
- global: *;
-};
-
-VERS_1.13 {
- global: *;
-};
diff --git a/newlib/libc/sys/linux/shm_open.c b/newlib/libc/sys/linux/shm_open.c
deleted file mode 100644
index cb92c3ae4..000000000
--- a/newlib/libc/sys/linux/shm_open.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* shm_open - open a shared memory file */
-
-/* Copyright 2002, Red Hat Inc. */
-
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <unistd.h>
-#include <string.h>
-#include <fcntl.h>
-#include <limits.h>
-
-int
-shm_open (const char *name, int oflag, mode_t mode)
-{
- int fd;
- char shm_name[PATH_MAX+20] = "/dev/shm/";
-
- /* skip opening slash */
- if (*name == '/')
- ++name;
-
- /* create special shared memory file name and leave enough space to
- cause a path/name error if name is too long */
- strlcpy (shm_name + 9, name, PATH_MAX + 10);
-
- fd = open (shm_name, oflag, mode);
-
- if (fd != -1)
- {
- /* once open we must add FD_CLOEXEC flag to file descriptor */
- int flags = fcntl (fd, F_GETFD, 0);
-
- if (flags >= 0)
- {
- flags |= FD_CLOEXEC;
- flags = fcntl (fd, F_SETFD, flags);
- }
-
- /* on failure, just close file and give up */
- if (flags == -1)
- {
- close (fd);
- fd = -1;
- }
- }
-
- return fd;
-}
diff --git a/newlib/libc/sys/linux/shm_unlink.c b/newlib/libc/sys/linux/shm_unlink.c
deleted file mode 100644
index cf259c627..000000000
--- a/newlib/libc/sys/linux/shm_unlink.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* shm_unlink - remove a shared memory file */
-
-/* Copyright 2002, Red Hat Inc. */
-
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <unistd.h>
-#include <string.h>
-#include <limits.h>
-
-int
-shm_unlink (const char *name)
-{
- int rc;
- char shm_name[PATH_MAX+20] = "/dev/shm/";
-
- /* skip opening slash */
- if (*name == '/')
- ++name;
-
- /* create special shared memory file name and leave enough space to
- cause a path/name error if name is too long */
- strlcpy (shm_name + 9, name, PATH_MAX + 10);
-
- rc = unlink (shm_name);
-
- return rc;
-}
diff --git a/newlib/libc/sys/linux/sig.c b/newlib/libc/sys/linux/sig.c
deleted file mode 100644
index 6e22873ee..000000000
--- a/newlib/libc/sys/linux/sig.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/* libc/sys/linux/signal.c - Signal handling functions */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#include <signal.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <machine/syscall.h>
-
-/* avoid name space pollution */
-#define __NR___sgetmask __NR_sgetmask
-#define __NR___ssetmask __NR_ssetmask
-#define __NR___rt_sigtimedwait __NR_rt_sigtimedwait
-#define __NR___rt_sigpending __NR_rt_sigpending
-#define __NR___rt_sigprocmask __NR_rt_sigprocmask
-#define __NR___rt_sigsuspend __NR_rt_sigsuspend
-
-_syscall2(int,kill,pid_t,pid,int,sig)
-_syscall2(__sighandler_t,signal,int,signum,__sighandler_t,handler)
-_syscall0(int,pause)
-_syscall1(unsigned int,alarm,unsigned int,seconds)
-
-static _syscall2(int,__rt_sigpending,sigset_t *,set,size_t,size)
-static _syscall4(int,__rt_sigprocmask,int,how,const sigset_t *,set,sigset_t *,oldset,size_t,size)
-static _syscall2(int,__rt_sigsuspend,const sigset_t *,mask,size_t,size)
-static _syscall4(int,__rt_sigtimedwait,const sigset_t *,set,siginfo_t *,info,struct timespec *,timeout,size_t,size)
-
-int __sigsuspend (const sigset_t *mask)
-{
- return __rt_sigsuspend(mask, NSIG/8);
-}
-weak_alias(__sigsuspend,sigsuspend)
-
-int sigmask(int signum) /* BSD */
-{
- return 1 << signum;
-}
-
-int __libc_raise(int sig)
-{
- return kill(getpid(),sig);
-}
-weak_alias(__libc_raise,raise)
-
-int __sigpending(sigset_t *set)
-{
- return __rt_sigpending(set, NSIG/8);
-}
-weak_alias(__sigpending,sigpending)
-
-int __sigprocmask (int how,const sigset_t *set,sigset_t *oldset)
-{
- return __rt_sigprocmask(how, set, oldset, NSIG/8);
-}
-weak_alias(__sigprocmask,sigprocmask)
-
-int sigtimedwait(const sigset_t *set, siginfo_t *info,
- struct timespec *timeout)
-{
- return __rt_sigtimedwait(set, info, timeout, NSIG/8);
-}
-
-int sigwaitinfo(const sigset_t *set, siginfo_t *info)
-{
- return __rt_sigtimedwait(set, info, NULL, NSIG/8);
-}
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 4
-
-static _syscall1(int,__ssetmask,int,newmask)
-static _syscall0(int,__sgetmask)
-
-int sigblock(int mask) /* BSD */
-{
- return __ssetmask(mask | __sgetmask());
-}
-
-int sigsetmask(int newmask) /* BSD */
-{
- return __ssetmask(newmask);
-}
-#endif
-
-const char *const sys_siglist[] = {
-#include "siglist.inc"
-};
diff --git a/newlib/libc/sys/linux/sigaction.c b/newlib/libc/sys/linux/sigaction.c
deleted file mode 100644
index 6ee3fa2cb..000000000
--- a/newlib/libc/sys/linux/sigaction.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Modified 05/30/02 by Jeff Johnston, Red Hat Inc. */
-
-#include <errno.h>
-#include <signal.h>
-#include <string.h>
-
-#include <machine/syscall.h>
-
-/* The difference here is that the sigaction structure used in the
- kernel is not the same as we use in the libc. Therefore we must
- translate it here. */
-#include <kernel_sigaction.h>
-
-#define __NR___rt_sigaction __NR_rt_sigaction
-
-static _syscall4(int,__rt_sigaction,int,sig,
- const struct kernel_sigaction *,act,
- struct kernel_sigaction *,oact,size_t,size);
-
-/* If ACT is not NULL, change the action for SIG to *ACT.
- If OACT is not NULL, put the old action for SIG in *OACT. */
-int
-__libc_sigaction (sig, act, oact)
- int sig;
- const struct sigaction *act;
- struct sigaction *oact;
-{
- int result;
- struct kernel_sigaction kact, koact;
- /* Save the current error value for later. We need not do this
- if we are guaranteed to have realtime signals. */
-
- if (act)
- {
- kact.k_sa_handler = act->sa_handler;
- memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t));
- kact.sa_flags = act->sa_flags;
- kact.sa_restorer = act->sa_restorer;
- }
-
- /* XXX The size argument hopefully will have to be changed to the
- real size of the user-level sigset_t. */
- result = __rt_sigaction (sig,
- act ? (&kact) : NULL,
- oact ? (&koact) : NULL, NSIG / 8);
-
- if (oact && result >= 0)
- {
- oact->sa_handler = koact.k_sa_handler;
- memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (sigset_t));
- oact->sa_flags = koact.sa_flags;
- oact->sa_restorer = koact.sa_restorer;
- }
-
- return result;
-}
-
-weak_alias (__libc_sigaction, __sigaction)
-weak_alias (__libc_sigaction, sigaction)
diff --git a/newlib/libc/sys/linux/siglongjmp.c b/newlib/libc/sys/linux/siglongjmp.c
deleted file mode 100644
index bc3c5b79e..000000000
--- a/newlib/libc/sys/linux/siglongjmp.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* libc/sys/linux/siglongjmp.c - siglongjmp function */
-
-/* Copyright 2002, Red Hat Inc. */
-
-
-#include <setjmp.h>
-#include <signal.h>
-#include <machine/weakalias.h>
-
-void
-__libc_siglongjmp (sigjmp_buf env, int val)
-{
- if (env.__is_mask_saved)
- sigprocmask (SIG_SETMASK, &env.__saved_mask, NULL);
-
- __libc_longjmp (env.__buf, val);
-}
-weak_alias(__libc_siglongjmp,siglongjmp);
diff --git a/newlib/libc/sys/linux/signal.c b/newlib/libc/sys/linux/signal.c
deleted file mode 100644
index b43cd778c..000000000
--- a/newlib/libc/sys/linux/signal.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* BSD-like signal function.
- Copyright (C) 1991, 1992, 1996, 1997, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <signal.h>
-#include <machine/weakalias.h>
-
-sigset_t _sigintr; /* Set by siginterrupt. */
-
-/* Set the handler for the signal SIG to HANDLER,
- returning the old handler, or SIG_ERR on error. */
-__sighandler_t
-__bsd_signal (sig, handler)
- int sig;
- __sighandler_t handler;
-{
- struct sigaction act, oact;
-
- /* Check signal extents to protect __sigismember. */
- if (handler == SIG_ERR || sig < 1 || sig >= NSIG)
- {
- errno = (EINVAL);
- return SIG_ERR;
- }
-
- act.sa_handler = handler;
- if (sigemptyset (&act.sa_mask) < 0
- || sigaddset (&act.sa_mask, sig) < 0)
- return SIG_ERR;
- act.sa_flags = sigismember (&_sigintr, sig) ? 0 : SA_RESTART;
- if (sigaction (sig, &act, &oact) < 0)
- return SIG_ERR;
-
- return oact.sa_handler;
-}
-weak_alias (__bsd_signal, bsd_signal)
-weak_alias (__bsd_signal, signal)
-weak_alias (__bsd_signal, ssignal)
diff --git a/newlib/libc/sys/linux/sigqueue.c b/newlib/libc/sys/linux/sigqueue.c
deleted file mode 100644
index 60c4fed20..000000000
--- a/newlib/libc/sys/linux/sigqueue.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Modified for newlib by Jeff Johnston, May 30, 2002 */
-
-#include <errno.h>
-#include <signal.h>
-#include <unistd.h>
-#include <string.h>
-
-#include <machine/syscall.h>
-
-#define __NR___rt_sigqueueinfo __NR_rt_sigqueueinfo
-
-extern uid_t __getuid();
-extern pid_t __getpid();
-
-static _syscall3(int,__rt_sigqueueinfo,int,pid,int,sig,siginfo_t *,info)
-
-/* Return any pending signal or wait for one for the given time. */
-int
-__sigqueue (pid, sig, val)
- pid_t pid;
- int sig;
- const union sigval val;
-{
- siginfo_t info;
-
- /* First, clear the siginfo_t structure, so that we don't pass our
- stack content to other tasks. */
- memset (&info, 0, sizeof (siginfo_t));
- /* We must pass the information about the data in a siginfo_t value. */
- info.si_signo = sig;
- info.si_code = SI_QUEUE;
- info.si_pid = __getpid ();
- info.si_uid = __getuid ();
- info.si_value = val;
-
- return __rt_sigqueueinfo(pid, sig, &info);
-}
-weak_alias (__sigqueue, sigqueue)
diff --git a/newlib/libc/sys/linux/sigset.c b/newlib/libc/sys/linux/sigset.c
deleted file mode 100644
index b6f2d79e5..000000000
--- a/newlib/libc/sys/linux/sigset.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/* sigset.c - signal set manipulation functions */
-
-/* Copyright 2002, Red Hat Inc. */
-
-/* Note: these are currently grouped together in one file so that
- it will override the default version in the libc/unix
- directory which has grouped all functions in one file. */
-
-/* sigaddset function */
-
-#include <signal.h>
-#include <bits/sigset.h>
-#include <errno.h>
-#include <string.h>
-#include <machine/weakalias.h>
-
-int
-sigaddset (sigset_t *set, const int signo)
-{
- int index, mask;
- __sigset_t *st = (__sigset_t *)set;
-
- if (signo > NSIG)
- {
- errno = EINVAL;
- return -1;
- }
-
- index = (signo - 1) / (8 * sizeof(long));
- mask = 1 << ((signo - 1) % (8 * sizeof(long)));
-
- st->__val[index] |= mask;
- return 0;
-}
-
-/* sigdelset function */
-
-int
-sigdelset (sigset_t *set, const int signo)
-{
- int index, mask;
- __sigset_t *st = (__sigset_t *)set;
-
- if (signo > NSIG)
- {
- errno = EINVAL;
- return -1;
- }
-
- index = (signo - 1) / (8 * sizeof(long));
- mask = 1 << ((signo - 1) % (8 * sizeof(long)));
-
- st->__val[index] &= ~mask;
- return 0;
-}
-
-/* sigemptyset function */
-
-int
-sigemptyset (sigset_t *set)
-{
- int size = NSIG / 8;
- __sigset_t *st = (__sigset_t *)set;
- memset (st->__val, 0, size);
- return 0;
-}
-
-/* sigfillset function */
-
-int
-sigfillset (sigset_t *set)
-{
- int size = NSIG / 8;
- __sigset_t *st = (__sigset_t *)set;
- memset (st->__val, 0xff, size);
- return 0;
-}
-
-/* sigismember function */
-
-int
-sigismember (const sigset_t *set, int signo)
-{
- int index, mask;
- __sigset_t *st = (__sigset_t *)set;
-
- if (signo > NSIG)
- {
- errno = EINVAL;
- return -1;
- }
-
- index = (signo - 1) / (8 * sizeof(long));
- mask = 1 << ((signo - 1) % (8 * sizeof(long)));
-
- return (st->__val[index] & mask) != 0;
-}
-
diff --git a/newlib/libc/sys/linux/sigwait.c b/newlib/libc/sys/linux/sigwait.c
deleted file mode 100644
index 09a4190e7..000000000
--- a/newlib/libc/sys/linux/sigwait.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Implementation of sigwait function from POSIX.1c.
- Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <signal.h>
-#include <stddef.h> /* For NULL. */
-
-#include <machine/weakalias.h>
-
-/* This is our dummy signal handler we use here. */
-static void ignore_signal (int sig);
-
-/* Place where to remember which signal we got. Please note that this
- implementation cannot be used for the threaded libc. The
- libpthread must provide an own version. */
-static int was_sig;
-
-
-int
-__sigwait (const sigset_t *set, int *sig)
-{
- sigset_t tmp_mask;
- struct sigaction saved[NSIG];
- struct sigaction action;
- int save_errno;
- int this;
-
- /* Prepare set. */
- sigfillset (&tmp_mask);
-
- /* Unblock all signals in the SET and register our nice handler. */
- action.sa_handler = ignore_signal;
- action.sa_flags = 0;
- sigfillset (&action.sa_mask); /* Block all signals for handler. */
-
- /* Make sure we recognize error conditions by setting WAS_SIG to a
- value which does not describe a legal signal number. */
- was_sig = -1;
-
- for (this = 1; this < NSIG; ++this)
- if (sigismember (set, this))
- {
- /* Unblock this signal. */
- sigdelset (&tmp_mask, this);
-
- /* Register temporary action handler. */
- if (__sigaction (this, &action, &saved[this]) != 0)
- goto restore_handler;
- }
-
- /* Now we can wait for signals. */
- __sigsuspend (&tmp_mask);
-
- restore_handler:
- save_errno = errno;
-
- while (--this >= 1)
- if (sigismember (set, this))
- /* We ignore errors here since we must restore all handlers. */
- __sigaction (this, &saved[this], NULL);
-
- errno = (save_errno);
-
- /* Store the result and return. */
- *sig = was_sig;
- return was_sig == -1 ? -1 : 0;
-}
-weak_alias (__sigwait, sigwait)
-
-
-static void
-ignore_signal (int sig)
-{
- /* Remember the signal. */
- was_sig = sig;
-}
diff --git a/newlib/libc/sys/linux/sleep.c b/newlib/libc/sys/linux/sleep.c
deleted file mode 100644
index 7cc2bede6..000000000
--- a/newlib/libc/sys/linux/sleep.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* libc/sys/linux/sleep.c - sleep function */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <linux/times.h>
-
-unsigned int sleep(unsigned int seconds)
-{
- struct timespec ts;
-
- ts.tv_sec = seconds;
- ts.tv_nsec = 0;
- if (!nanosleep(&ts,&ts)) return 0;
- if (errno == EINTR) return ts.tv_sec;
- return -1;
-}
diff --git a/newlib/libc/sys/linux/socket.c b/newlib/libc/sys/linux/socket.c
deleted file mode 100644
index daba98934..000000000
--- a/newlib/libc/sys/linux/socket.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* libc/sys/linux/socket.c - socket system calls */
-
-/* Copyright 2002, Red Hat Inc. */
-
-#define __KERNEL_PROTOTYPES
-
-#include <stdarg.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <machine/socketcall.h>
-
-_sockcall3(int,accept,int,fd,struct sockaddr *,addr,socklen_t *,addr_len)
-_sockcall3(int,bind,int,fd,const struct sockaddr *,addr,socklen_t,len)
-_sockcall3(int,connect,int,fd,const struct sockaddr *,addr,socklen_t,len)
-_sockcall3(int,getpeername,int,fd,struct sockaddr *,addr,socklen_t *,len)
-_sockcall3(int,getsockname,int,fd,struct sockaddr *,addr,socklen_t *,len)
-_sockcall5(int,getsockopt,int,fd,int,level,int,opt,void *,optval,socklen_t *,optlen)
-_sockcall2(int,listen,int,fd,int,n)
-_sockcall4(ssize_t,recv,int,fd,void *,buf,size_t,n,int,flags)
-_sockcall6(ssize_t,recvfrom,int,fd,void *,buf,size_t,n,int,flags,struct sockaddr *,addr,socklen_t *,addr_len)
-_sockcall3(ssize_t,recvmsg,int,fd,struct msghdr *,message,int,flags)
-_sockcall4(ssize_t,send,int,fd,const void *,buf,size_t,n,int,flags)
-_sockcall6(ssize_t,sendto,int,fd,const void *,buf,size_t,n,int,flags,const struct sockaddr *,addr,socklen_t,addr_len)
-_sockcall5(int,setsockopt,int,fd,int,level,int,opt,const void *,optval,socklen_t,optlen)
-_sockcall2(int,shutdown,int,fd,int,how)
-_sockcall3(int,socket,int,domain,int,type,int,protocol)
-_sockcall4(int,socketpair,int,domain,int,type,int,protocol,int,fds[2])
-_sockcall3(ssize_t,sendmsg,int,fd,const struct msghdr *,message,int,flags)
-
-weak_alias(__libc_connect,__connect);
-weak_alias(__libc_send,__send);
diff --git a/newlib/libc/sys/linux/sockops.h b/newlib/libc/sys/linux/sockops.h
deleted file mode 100644
index 7a421f26d..000000000
--- a/newlib/libc/sys/linux/sockops.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Linux socket syscall subopcodes */
-
-#ifndef _SOCKOPS_H
-
-#define _SOCKOPS_H
-
-#define SOCK_socket 1
-#define SOCK_bind 2
-#define SOCK_connect 3
-#define SOCK_listen 4
-#define SOCK_accept 5
-#define SOCK_getsockname 6
-#define SOCK_getpeername 7
-#define SOCK_socketpair 8
-#define SOCK_send 9
-#define SOCK_recv 10
-#define SOCK_sendto 11
-#define SOCK_recvfrom 12
-#define SOCK_shutdown 13
-#define SOCK_setsockopt 14
-#define SOCK_getsockopt 15
-#define SOCK_sendmsg 16
-#define SOCK_recvmsg 17
-
-#endif /* _SOCKOPS_H */
-
-
diff --git a/newlib/libc/sys/linux/stack.c b/newlib/libc/sys/linux/stack.c
deleted file mode 100644
index 52a181cf2..000000000
--- a/newlib/libc/sys/linux/stack.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* libc/sys/linux/stack.c - Basic stack system calls */
-
-/* Copyright 2002, Red Hat Inc. */
-
-#include <signal.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <machine/syscall.h>
-
-_syscall2(int,sigaltstack,const stack_t *,ss,stack_t *,oss)
diff --git a/newlib/libc/sys/linux/statvfs.c b/newlib/libc/sys/linux/statvfs.c
deleted file mode 100644
index 4b0d51abd..000000000
--- a/newlib/libc/sys/linux/statvfs.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#define _GNU_SOURCE
-
-#include <errno.h>
-#include <mntent.h>
-#include <paths.h>
-#include <string.h>
-#include <sys/mount.h>
-#include <sys/stat.h>
-#include <sys/statfs.h>
-#include <sys/statvfs.h>
-
-
-int
-statvfs (const char *file, struct statvfs *buf)
-{
- struct statfs fsbuf;
- struct stat64 st;
-
- /* Get as much information as possible from the system. */
- if (__statfs (file, &fsbuf) < 0)
- return -1;
-
-#define STAT(st) stat64 (file, st)
-#include "internal_statvfs.c"
-
- /* We signal success if the statfs call succeeded. */
- return 0;
-}
diff --git a/newlib/libc/sys/linux/statvfs64.c b/newlib/libc/sys/linux/statvfs64.c
deleted file mode 100644
index f612b991d..000000000
--- a/newlib/libc/sys/linux/statvfs64.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Return information about the filesystem on which FILE resides.
- Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <sys/statvfs.h>
-#include <stddef.h>
-#include <string.h>
-#include <machine/weakalias.h>
-
-/* Return information about the filesystem on which FILE resides. */
-int
-__statvfs64 (const char *file, struct statvfs64 *buf)
-{
- struct statvfs buf32;
-
- if (statvfs (file, &buf32) < 0)
- return -1;
-
- buf->f_bsize = buf32.f_bsize;
- buf->f_frsize = buf32.f_frsize;
- buf->f_blocks = buf32.f_blocks;
- buf->f_bfree = buf32.f_bfree;
- buf->f_bavail = buf32.f_bavail;
- buf->f_files = buf32.f_files;
- buf->f_ffree = buf32.f_ffree;
- buf->f_favail = buf32.f_favail;
- buf->f_fsid = buf32.f_fsid;
- buf->f_flag = buf32.f_flag;
- buf->f_namemax = buf32.f_namemax;
- memcpy (buf->__f_spare, buf32.__f_spare, sizeof (buf32.__f_spare));
-
- return 0;
-}
-weak_alias (__statvfs64, statvfs64)
diff --git a/newlib/libc/sys/linux/stdlib/COPYRIGHT b/newlib/libc/sys/linux/stdlib/COPYRIGHT
deleted file mode 100644
index 574f6bcec..000000000
--- a/newlib/libc/sys/linux/stdlib/COPYRIGHT
+++ /dev/null
@@ -1,56 +0,0 @@
-Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved.
-This software is not subject to any license of the American Telephone
-and Telegraph Company or of the Regents of the University of California.
-
-Permission is granted to anyone to use this software for any purpose on
-any computer system, and to alter it and redistribute it, subject
-to the following restrictions:
-
-1. The author is not responsible for the consequences of use of this
- software, no matter how awful, even if they arise from flaws in it.
-
-2. The origin of this software must not be misrepresented, either by
- explicit claim or by omission. Since few users ever read sources,
- credits must appear in the documentation.
-
-3. Altered versions must be plainly marked as such, and must not be
- misrepresented as being the original software. Since few users
- ever read sources, credits must appear in the documentation.
-
-4. This notice may not be removed or altered.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-/*-
- * Copyright (c) 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)COPYRIGHT 8.1 (Berkeley) 3/16/94
- */
diff --git a/newlib/libc/sys/linux/stdlib/Makefile.am b/newlib/libc/sys/linux/stdlib/Makefile.am
deleted file mode 100644
index 2df19ede7..000000000
--- a/newlib/libc/sys/linux/stdlib/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-GENERAL_SOURCES = \
- fnmatch.c glob.c regcomp.c regerror.c regex2.h \
- regexec.c regfree.c collate.h collate.c collcmp.c \
- reallocf.c
-
-ELIX_3_OBJS = \
- wordexp.$(oext) \
- wordfree.$(oext)
-
-if ELIX_LEVEL_1
-LIB_OBJS =
-else
-if ELIX_LEVEL_2
-LIB_OBJS =
-else
-LIB_OBJS = $(ELIX_3_OBJS)
-endif
-endif
-
-libstdlib_la_LDFLAGS = -Xcompiler -nostdlib
-
-if USE_LIBTOOL
-noinst_LTLIBRARIES = libstdlib.la
-libstdlib_la_SOURCES = $(GENERAL_SOURCES)
-libstdlib_la_LIBADD = $(LIB_OBJS)
-libstdlib_la_DEPENDENCIES = $(LIB_OBJS)
-noinst_DATA = objectlist.awk.in
-else
-noinst_LIBRARIES = lib.a
-lib_a_SOURCES = $(GENERAL_SOURCES)
-lib_a_LIBADD = $(LIB_OBJS)
-lib_a_DEPENDENCIES = $(LIB_OBJS)
-noinst_DATA =
-endif # USE_LIBTOOL
-
-AM_CFLAGS = -D_GNU_SOURCE
-
-include $(srcdir)/../../../../Makefile.shared
diff --git a/newlib/libc/sys/linux/stdlib/Makefile.in b/newlib/libc/sys/linux/stdlib/Makefile.in
deleted file mode 100644
index 641158646..000000000
--- a/newlib/libc/sys/linux/stdlib/Makefile.in
+++ /dev/null
@@ -1,377 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = ..
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-AWK = @AWK@
-CC = @CC@
-CPP = @CPP@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-DLLTOOL = @DLLTOOL@
-EXEEXT = @EXEEXT@
-EXTRA_SUBDIRS = @EXTRA_SUBDIRS@
-EXTRA_SUBLIBS = @EXTRA_SUBLIBS@
-GCJ = @GCJ@
-GCJFLAGS = @GCJFLAGS@
-LDFLAGS = @LDFLAGS@
-LIBTOOL = @LIBTOOL@
-LINUX_MACH_LIB = @LINUX_MACH_LIB@
-LN_S = @LN_S@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-STRIP = @STRIP@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-GENERAL_SOURCES = fnmatch.c glob.c regcomp.c regerror.c regex2.h regexec.c regfree.c collate.h collate.c collcmp.c reallocf.c
-
-
-ELIX_3_OBJS = wordexp.$(oext) wordfree.$(oext)
-
-@ELIX_LEVEL_1_TRUE@LIB_OBJS =
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@LIB_OBJS =
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@LIB_OBJS = $(ELIX_3_OBJS)
-
-libstdlib_la_LDFLAGS = -Xcompiler -nostdlib
-
-@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libstdlib.la
-@USE_LIBTOOL_TRUE@libstdlib_la_SOURCES = $(GENERAL_SOURCES)
-@USE_LIBTOOL_TRUE@libstdlib_la_LIBADD = $(LIB_OBJS)
-@USE_LIBTOOL_TRUE@libstdlib_la_DEPENDENCIES = $(LIB_OBJS)
-@USE_LIBTOOL_TRUE@noinst_DATA = objectlist.awk.in
-@USE_LIBTOOL_FALSE@noinst_DATA =
-@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
-@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(GENERAL_SOURCES)
-@USE_LIBTOOL_FALSE@lib_a_LIBADD = $(LIB_OBJS)
-@USE_LIBTOOL_FALSE@lib_a_DEPENDENCIES = $(LIB_OBJS)
-
-AM_CFLAGS = -D_GNU_SOURCE
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-@USE_LIBTOOL_FALSE@lib_a_OBJECTS = fnmatch.$(OBJEXT) glob.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@regcomp.$(OBJEXT) regerror.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@regexec.$(OBJEXT) regfree.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@collate.$(OBJEXT) collcmp.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@reallocf.$(OBJEXT)
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-
-@USE_LIBTOOL_TRUE@libstdlib_la_OBJECTS = fnmatch.lo glob.lo regcomp.lo \
-@USE_LIBTOOL_TRUE@regerror.lo regexec.lo regfree.lo collate.lo \
-@USE_LIBTOOL_TRUE@collcmp.lo reallocf.lo
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DATA = $(noinst_DATA)
-
-DIST_COMMON = Makefile.am Makefile.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES) $(libstdlib_la_SOURCES)
-OBJECTS = $(lib_a_OBJECTS) $(libstdlib_la_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/../../../../Makefile.shared
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus stdlib/Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-# FIXME: We should only use cygpath when building on Windows,
-# and only if it is available.
-.c.obj:
- $(COMPILE) -c `cygpath -w $<`
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
- -rm -f *.$(OBJEXT)
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.s.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-.S.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) -c $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
-
-maintainer-clean-libtool:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-mostlyclean-noinstLTLIBRARIES:
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-
-distclean-noinstLTLIBRARIES:
-
-maintainer-clean-noinstLTLIBRARIES:
-
-libstdlib.la: $(libstdlib_la_OBJECTS) $(libstdlib_la_DEPENDENCIES)
- $(LINK) $(libstdlib_la_LDFLAGS) $(libstdlib_la_OBJECTS) $(libstdlib_la_LIBADD) $(LIBS)
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-
-subdir = stdlib
-
-distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-libtool mostlyclean-noinstLTLIBRARIES \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-libtool \
- clean-noinstLTLIBRARIES clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-libtool distclean-noinstLTLIBRARIES \
- distclean-tags distclean-generic clean-am
- -rm -f libtool
-
-distclean: distclean-am
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-libtool \
- maintainer-clean-noinstLTLIBRARIES \
- maintainer-clean-tags maintainer-clean-generic \
- distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile mostlyclean-libtool distclean-libtool \
-clean-libtool maintainer-clean-libtool mostlyclean-noinstLTLIBRARIES \
-distclean-noinstLTLIBRARIES clean-noinstLTLIBRARIES \
-maintainer-clean-noinstLTLIBRARIES tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-objectlist.awk.in: $(noinst_LTLIBRARIES)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
- do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
- done
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/linux/stdlib/cclass.h b/newlib/libc/sys/linux/stdlib/cclass.h
deleted file mode 100644
index 956a655fa..000000000
--- a/newlib/libc/sys/linux/stdlib/cclass.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)cclass.h 8.3 (Berkeley) 3/20/94
- * $FreeBSD: src/lib/libc/regex/cclass.h,v 1.4 2002/03/22 23:41:56 obrien Exp $
- */
-
-
-typedef enum {CALNUM, CALPHA, CBLANK, CCNTRL, CDIGIT, CGRAPH,
- CLOWER, CPRINT, CPUNCT, CSPACE, CUPPER, CXDIGIT} citype;
-
-/* character-class table */
-static struct cclass {
- char *name;
- citype fidx;
-} cclasses[] = {
- {"alnum", CALNUM},
- {"alpha", CALPHA},
- {"blank", CBLANK},
- {"cntrl", CCNTRL},
- {"digit", CDIGIT},
- {"graph", CGRAPH},
- {"lower", CLOWER},
- {"print", CPRINT},
- {"punct", CPUNCT},
- {"space", CSPACE},
- {"upper", CUPPER},
- {"xdigit", CXDIGIT},
- {NULL, }
-};
diff --git a/newlib/libc/sys/linux/stdlib/cname.h b/newlib/libc/sys/linux/stdlib/cname.h
deleted file mode 100644
index 4f0d583d2..000000000
--- a/newlib/libc/sys/linux/stdlib/cname.h
+++ /dev/null
@@ -1,142 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)cname.h 8.3 (Berkeley) 3/20/94
- * $FreeBSD: src/lib/libc/regex/cname.h,v 1.3 2002/03/22 23:41:56 obrien Exp $
- */
-
-/* character-name table */
-static struct cname {
- char *name;
- char code;
-} cnames[] = {
- {"NUL", '\0'},
- {"SOH", '\001'},
- {"STX", '\002'},
- {"ETX", '\003'},
- {"EOT", '\004'},
- {"ENQ", '\005'},
- {"ACK", '\006'},
- {"BEL", '\007'},
- {"alert", '\007'},
- {"BS", '\010'},
- {"backspace", '\b'},
- {"HT", '\011'},
- {"tab", '\t'},
- {"LF", '\012'},
- {"newline", '\n'},
- {"VT", '\013'},
- {"vertical-tab", '\v'},
- {"FF", '\014'},
- {"form-feed", '\f'},
- {"CR", '\015'},
- {"carriage-return", '\r'},
- {"SO", '\016'},
- {"SI", '\017'},
- {"DLE", '\020'},
- {"DC1", '\021'},
- {"DC2", '\022'},
- {"DC3", '\023'},
- {"DC4", '\024'},
- {"NAK", '\025'},
- {"SYN", '\026'},
- {"ETB", '\027'},
- {"CAN", '\030'},
- {"EM", '\031'},
- {"SUB", '\032'},
- {"ESC", '\033'},
- {"IS4", '\034'},
- {"FS", '\034'},
- {"IS3", '\035'},
- {"GS", '\035'},
- {"IS2", '\036'},
- {"RS", '\036'},
- {"IS1", '\037'},
- {"US", '\037'},
- {"space", ' '},
- {"exclamation-mark", '!'},
- {"quotation-mark", '"'},
- {"number-sign", '#'},
- {"dollar-sign", '$'},
- {"percent-sign", '%'},
- {"ampersand", '&'},
- {"apostrophe", '\''},
- {"left-parenthesis", '('},
- {"right-parenthesis", ')'},
- {"asterisk", '*'},
- {"plus-sign", '+'},
- {"comma", ','},
- {"hyphen", '-'},
- {"hyphen-minus", '-'},
- {"period", '.'},
- {"full-stop", '.'},
- {"slash", '/'},
- {"solidus", '/'},
- {"zero", '0'},
- {"one", '1'},
- {"two", '2'},
- {"three", '3'},
- {"four", '4'},
- {"five", '5'},
- {"six", '6'},
- {"seven", '7'},
- {"eight", '8'},
- {"nine", '9'},
- {"colon", ':'},
- {"semicolon", ';'},
- {"less-than-sign", '<'},
- {"equals-sign", '='},
- {"greater-than-sign", '>'},
- {"question-mark", '?'},
- {"commercial-at", '@'},
- {"left-square-bracket", '['},
- {"backslash", '\\'},
- {"reverse-solidus", '\\'},
- {"right-square-bracket",']'},
- {"circumflex", '^'},
- {"circumflex-accent", '^'},
- {"underscore", '_'},
- {"low-line", '_'},
- {"grave-accent", '`'},
- {"left-brace", '{'},
- {"left-curly-bracket", '{'},
- {"vertical-line", '|'},
- {"right-brace", '}'},
- {"right-curly-bracket", '}'},
- {"tilde", '~'},
- {"DEL", '\177'},
- {NULL, 0}
-};
diff --git a/newlib/libc/sys/linux/stdlib/collate.c b/newlib/libc/sys/linux/stdlib/collate.c
deleted file mode 100644
index 05ee9aba0..000000000
--- a/newlib/libc/sys/linux/stdlib/collate.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/*-
- * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
- * at Electronni Visti IA, Kiev, Ukraine.
- * 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 ``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: src/lib/libc/locale/collate.c,v 1.24 2002/03/29 22:43:42 markm Exp $");
-
-#include "namespace.h"
-#include <rune.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sysexits.h>
-#include "un-namespace.h"
-
-#include "collate.h"
-#include "setlocale.h"
-
-#include "libc_private.h"
-
-extern char *_PathLocale;
-int __collate_load_error = 1;
-int __collate_substitute_nontrivial;
-char __collate_version[STR_LEN];
-u_char __collate_substitute_table[UCHAR_MAX + 1][STR_LEN];
-struct __collate_st_char_pri __collate_char_pri_table[UCHAR_MAX + 1];
-struct __collate_st_chain_pri __collate_chain_pri_table[TABLE_SIZE];
-
-#define FREAD(a, b, c, d) \
- do { \
- if (fread(a, b, c, d) != c) { \
- fclose(d); \
- return -1; \
- } \
- } while(0)
-
-void __collate_err(int ex, const char *f);
-
-int
-__collate_load_tables(encoding)
- char *encoding;
-{
- char buf[PATH_MAX];
- FILE *fp;
- int i, save_load_error;
-
- save_load_error = __collate_load_error;
- __collate_load_error = 1;
- if (!encoding) {
- __collate_load_error = save_load_error;
- return -1;
- }
- if (!strcmp(encoding, "C") || !strcmp(encoding, "POSIX"))
- return 0;
- if (!_PathLocale) {
- __collate_load_error = save_load_error;
- return -1;
- }
- /* Range checking not needed, encoding has fixed size */
- (void) strcpy(buf, _PathLocale);
- (void) strcat(buf, "/");
- (void) strcat(buf, encoding);
- (void) strcat(buf, "/LC_COLLATE");
- if ((fp = fopen(buf, "r")) == NULL) {
- __collate_load_error = save_load_error;
- return -1;
- }
- FREAD(__collate_version, sizeof(__collate_version), 1, fp);
- if (strcmp(__collate_version, COLLATE_VERSION) != 0) {
- fclose(fp);
- return -1;
- }
- FREAD(__collate_substitute_table, sizeof(__collate_substitute_table),
- 1, fp);
- FREAD(__collate_char_pri_table, sizeof(__collate_char_pri_table), 1,
- fp);
- FREAD(__collate_chain_pri_table, sizeof(__collate_chain_pri_table), 1,
- fp);
- fclose(fp);
- __collate_load_error = 0;
-
- __collate_substitute_nontrivial = 0;
- for (i = 0; i < UCHAR_MAX + 1; i++) {
- if (__collate_substitute_table[i][0] != i ||
- __collate_substitute_table[i][1] != 0) {
- __collate_substitute_nontrivial = 1;
- break;
- }
- }
-
- return 0;
-}
-
-u_char *
-__collate_substitute(s)
- const u_char *s;
-{
- int dest_len, len, nlen;
- int delta = strlen(s);
- u_char *dest_str = NULL;
-
- if(s == NULL || *s == '\0')
- return __collate_strdup("");
- delta += delta / 8;
- dest_str = malloc(dest_len = delta);
- if(dest_str == NULL)
- __collate_err(EX_OSERR, __FUNCTION__);
- len = 0;
- while(*s) {
- nlen = len + strlen(__collate_substitute_table[*s]);
- if (dest_len <= nlen) {
- dest_str = reallocf(dest_str, dest_len = nlen + delta);
- if(dest_str == NULL)
- __collate_err(EX_OSERR, __FUNCTION__);
- }
- strcpy(dest_str + len, __collate_substitute_table[*s++]);
- len = nlen;
- }
- return dest_str;
-}
-
-void
-__collate_lookup(t, len, prim, sec)
- const u_char *t;
- int *len, *prim, *sec;
-{
- struct __collate_st_chain_pri *p2;
-
- *len = 1;
- *prim = *sec = 0;
- for(p2 = __collate_chain_pri_table; p2->str[0]; p2++) {
- if(strncmp(t, p2->str, strlen(p2->str)) == 0) {
- *len = strlen(p2->str);
- *prim = p2->prim;
- *sec = p2->sec;
- return;
- }
- }
- *prim = __collate_char_pri_table[*t].prim;
- *sec = __collate_char_pri_table[*t].sec;
-}
-
-u_char *
-__collate_strdup(s)
- u_char *s;
-{
- u_char *t = strdup(s);
-
- if (t == NULL)
- __collate_err(EX_OSERR, __FUNCTION__);
- return t;
-}
-
-void
-__collate_err(int ex, const char *f)
-{
- const char *s = strdup("collate_error");
- int serrno = errno;
-
- write(STDERR_FILENO, s, strlen(s));
- write(STDERR_FILENO, ": ", 2);
- free(s);
- s = f;
- write(STDERR_FILENO, s, strlen(s));
- write(STDERR_FILENO, ": ", 2);
- s = strerror(serrno);
- write(STDERR_FILENO, s, strlen(s));
- write(STDERR_FILENO, "\n", 1);
- exit(ex);
-}
-
-#ifdef COLLATE_DEBUG
-void
-__collate_print_tables()
-{
- int i;
- struct __collate_st_chain_pri *p2;
-
- printf("Substitute table:\n");
- for (i = 0; i < UCHAR_MAX + 1; i++)
- if (i != *__collate_substitute_table[i])
- printf("\t'%c' --> \"%s\"\n", i,
- __collate_substitute_table[i]);
- printf("Chain priority table:\n");
- for (p2 = __collate_chain_pri_table; p2->str[0]; p2++)
- printf("\t\"%s\" : %d %d\n\n", p2->str, p2->prim, p2->sec);
- printf("Char priority table:\n");
- for (i = 0; i < UCHAR_MAX + 1; i++)
- printf("\t'%c' : %d %d\n", i, __collate_char_pri_table[i].prim,
- __collate_char_pri_table[i].sec);
-}
-#endif
diff --git a/newlib/libc/sys/linux/stdlib/collate.h b/newlib/libc/sys/linux/stdlib/collate.h
deleted file mode 100644
index 2e045188a..000000000
--- a/newlib/libc/sys/linux/stdlib/collate.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-
- * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
- * at Electronni Visti IA, Kiev, Ukraine.
- * 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 ``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.
- *
- * $FreeBSD: src/lib/libc/locale/collate.h,v 1.11 2002/03/21 22:46:54 obrien Exp $
- */
-
-#ifndef _COLLATE_H_
-#define _COLLATE_H_
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <limits.h>
-
-#define STR_LEN 10
-#define TABLE_SIZE 100
-#define COLLATE_VERSION "1.0\n"
-
-struct __collate_st_char_pri {
- int prim, sec;
-};
-struct __collate_st_chain_pri {
- u_char str[STR_LEN];
- int prim, sec;
-};
-
-extern int __collate_load_error;
-extern int __collate_substitute_nontrivial;
-extern char __collate_version[STR_LEN];
-extern u_char __collate_substitute_table[UCHAR_MAX + 1][STR_LEN];
-extern struct __collate_st_char_pri __collate_char_pri_table[UCHAR_MAX + 1];
-extern struct __collate_st_chain_pri __collate_chain_pri_table[TABLE_SIZE];
-
-__BEGIN_DECLS
-u_char *__collate_strdup(u_char *);
-u_char *__collate_substitute(const u_char *);
-int __collate_load_tables(char *);
-void __collate_lookup(const u_char *, int *, int *, int *);
-int __collate_range_cmp(int, int);
-#ifdef COLLATE_DEBUG
-void __collate_print_tables(void);
-#endif
-__END_DECLS
-
-#endif /* !_COLLATE_H_ */
diff --git a/newlib/libc/sys/linux/stdlib/collcmp.c b/newlib/libc/sys/linux/stdlib/collcmp.c
deleted file mode 100644
index 97046a9d5..000000000
--- a/newlib/libc/sys/linux/stdlib/collcmp.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 1996 by Andrey A. Chernov, Moscow, Russia.
- * 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 ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/locale/collcmp.c,v 1.14 2002/03/22 21:52:18 obrien Exp $");
-
-#define ASCII_COMPATIBLE_COLLATE /* see share/colldef */
-
-#include <string.h>
-#include "collate.h"
-#ifndef ASCII_COMPATIBLE_COLLATE
-#include <ctype.h>
-#endif
-
-/*
- * Compare two characters converting collate information
- * into ASCII-compatible range, it allows to handle
- * "[a-z]"-type ranges with national characters.
- */
-
-int __collate_range_cmp (c1, c2)
- int c1, c2;
-{
- static char s1[2], s2[2];
- int ret;
-#ifndef ASCII_COMPATIBLE_COLLATE
- int as1, as2, al1, al2;
-#endif
-
- c1 &= UCHAR_MAX;
- c2 &= UCHAR_MAX;
- if (c1 == c2)
- return (0);
-
-#ifndef ASCII_COMPATIBLE_COLLATE
- as1 = isascii(c1);
- as2 = isascii(c2);
- al1 = isalpha(c1);
- al2 = isalpha(c2);
-
- if (as1 || as2 || al1 || al2) {
- if ((as1 && as2) || (!al1 && !al2))
- return (c1 - c2);
- if (al1 && !al2) {
- if (isupper(c1))
- return ('A' - c2);
- else
- return ('a' - c2);
- } else if (al2 && !al1) {
- if (isupper(c2))
- return (c1 - 'A');
- else
- return (c1 - 'a');
- }
- }
-#endif
- s1[0] = c1;
- s2[0] = c2;
- if ((ret = strcoll(s1, s2)) != 0)
- return (ret);
- return (c1 - c2);
-}
diff --git a/newlib/libc/sys/linux/stdlib/engine.c b/newlib/libc/sys/linux/stdlib/engine.c
deleted file mode 100644
index 92f756f7b..000000000
--- a/newlib/libc/sys/linux/stdlib/engine.c
+++ /dev/null
@@ -1,1140 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)engine.c 8.5 (Berkeley) 3/20/94
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/regex/engine.c,v 1.12 2002/03/22 21:52:47 obrien Exp $");
-
-/*
- * The matching engine and friends. This file is #included by regexec.c
- * after suitable #defines of a variety of macros used herein, so that
- * different state representations can be used without duplicating masses
- * of code.
- */
-
-#ifdef SNAMES
-#define matcher smatcher
-#define fast sfast
-#define slow sslow
-#define dissect sdissect
-#define backref sbackref
-#define step sstep
-#define print sprint
-#define at sat
-#define match smat
-#endif
-#ifdef LNAMES
-#define matcher lmatcher
-#define fast lfast
-#define slow lslow
-#define dissect ldissect
-#define backref lbackref
-#define step lstep
-#define print lprint
-#define at lat
-#define match lmat
-#endif
-
-/* another structure passed up and down to avoid zillions of parameters */
-struct match {
- struct re_guts *g;
- int eflags;
- regmatch_t *pmatch; /* [nsub+1] (0 element unused) */
- char *offp; /* offsets work from here */
- char *beginp; /* start of string -- virtual NUL precedes */
- char *endp; /* end of string -- virtual NUL here */
- char *coldp; /* can be no match starting before here */
- char **lastpos; /* [nplus+1] */
- STATEVARS;
- states st; /* current states */
- states fresh; /* states for a fresh start */
- states tmp; /* temporary */
- states empty; /* empty set of states */
-};
-
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === engine.c === */
-static int matcher(struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[], int eflags);
-static char *dissect(struct match *m, char *start, char *stop, sopno startst, sopno stopst);
-static char *backref(struct match *m, char *start, char *stop, sopno startst, sopno stopst, sopno lev);
-static char *fast(struct match *m, char *start, char *stop, sopno startst, sopno stopst);
-static char *slow(struct match *m, char *start, char *stop, sopno startst, sopno stopst);
-static states step(struct re_guts *g, sopno start, sopno stop, states bef, int ch, states aft);
-#define BOL (OUT+1)
-#define EOL (BOL+1)
-#define BOLEOL (BOL+2)
-#define NOTHING (BOL+3)
-#define BOW (BOL+4)
-#define EOW (BOL+5)
-#define CODEMAX (BOL+5) /* highest code used */
-#define NONCHAR(c) ((c) > CHAR_MAX)
-#define NNONCHAR (CODEMAX-CHAR_MAX)
-#ifdef REDEBUG
-static void print(struct match *m, char *caption, states st, int ch, FILE *d);
-#endif
-#ifdef REDEBUG
-static void at(struct match *m, char *title, char *start, char *stop, sopno startst, sopno stopst);
-#endif
-#ifdef REDEBUG
-static char *pchar(int ch);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
-
-#ifdef REDEBUG
-#define SP(t, s, c) print(m, t, s, c, stdout)
-#define AT(t, p1, p2, s1, s2) at(m, t, p1, p2, s1, s2)
-#define NOTE(str) { if (m->eflags&REG_TRACE) printf("=%s\n", (str)); }
-#else
-#define SP(t, s, c) /* nothing */
-#define AT(t, p1, p2, s1, s2) /* nothing */
-#define NOTE(s) /* nothing */
-#endif
-
-/*
- - matcher - the actual matching engine
- == static int matcher(struct re_guts *g, char *string, \
- == size_t nmatch, regmatch_t pmatch[], int eflags);
- */
-static int /* 0 success, REG_NOMATCH failure */
-matcher(g, string, nmatch, pmatch, eflags)
-struct re_guts *g;
-char *string;
-size_t nmatch;
-regmatch_t pmatch[];
-int eflags;
-{
- char *endp;
- int i;
- struct match mv;
- struct match *m = &mv;
- char *dp;
- const sopno gf = g->firststate+1; /* +1 for OEND */
- const sopno gl = g->laststate;
- char *start;
- char *stop;
- /* Boyer-Moore algorithms variables */
- char *pp;
- int cj, mj;
- char *mustfirst;
- char *mustlast;
- int *matchjump;
- int *charjump;
-
- /* simplify the situation where possible */
- if (g->cflags&REG_NOSUB)
- nmatch = 0;
- if (eflags&REG_STARTEND) {
- start = string + pmatch[0].rm_so;
- stop = string + pmatch[0].rm_eo;
- } else {
- start = string;
- stop = start + strlen(start);
- }
- if (stop < start)
- return(REG_INVARG);
-
- /* prescreening; this does wonders for this rather slow code */
- if (g->must != NULL) {
- if (g->charjump != NULL && g->matchjump != NULL) {
- mustfirst = g->must;
- mustlast = g->must + g->mlen - 1;
- charjump = g->charjump;
- matchjump = g->matchjump;
- pp = mustlast;
- for (dp = start+g->mlen-1; dp < stop;) {
- /* Fast skip non-matches */
- while (dp < stop && charjump[*dp])
- dp += charjump[*dp];
-
- if (dp >= stop)
- break;
-
- /* Greedy matcher */
- /* We depend on not being used for
- * for strings of length 1
- */
- while (*--dp == *--pp && pp != mustfirst);
-
- if (*dp == *pp)
- break;
-
- /* Jump to next possible match */
- mj = matchjump[pp - mustfirst];
- cj = charjump[*dp];
- dp += (cj < mj ? mj : cj);
- pp = mustlast;
- }
- if (pp != mustfirst)
- return(REG_NOMATCH);
- } else {
- for (dp = start; dp < stop; dp++)
- if (*dp == g->must[0] &&
- stop - dp >= g->mlen &&
- memcmp(dp, g->must, (size_t)g->mlen) == 0)
- break;
- if (dp == stop) /* we didn't find g->must */
- return(REG_NOMATCH);
- }
- }
-
- /* match struct setup */
- m->g = g;
- m->eflags = eflags;
- m->pmatch = NULL;
- m->lastpos = NULL;
- m->offp = string;
- m->beginp = start;
- m->endp = stop;
- STATESETUP(m, 4);
- SETUP(m->st);
- SETUP(m->fresh);
- SETUP(m->tmp);
- SETUP(m->empty);
- CLEAR(m->empty);
-
- /* Adjust start according to moffset, to speed things up */
- if (g->moffset > -1)
- start = ((dp - g->moffset) < start) ? start : dp - g->moffset;
-
- /* this loop does only one repetition except for backrefs */
- for (;;) {
- endp = fast(m, start, stop, gf, gl);
- if (endp == NULL) { /* a miss */
- STATETEARDOWN(m);
- return(REG_NOMATCH);
- }
- if (nmatch == 0 && !g->backrefs)
- break; /* no further info needed */
-
- /* where? */
- assert(m->coldp != NULL);
- for (;;) {
- NOTE("finding start");
- endp = slow(m, m->coldp, stop, gf, gl);
- if (endp != NULL)
- break;
- assert(m->coldp < m->endp);
- m->coldp++;
- }
- if (nmatch == 1 && !g->backrefs)
- break; /* no further info needed */
-
- /* oh my, he wants the subexpressions... */
- if (m->pmatch == NULL)
- m->pmatch = (regmatch_t *)malloc((m->g->nsub + 1) *
- sizeof(regmatch_t));
- if (m->pmatch == NULL) {
- STATETEARDOWN(m);
- return(REG_ESPACE);
- }
- for (i = 1; i <= m->g->nsub; i++)
- m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1;
- if (!g->backrefs && !(m->eflags&REG_BACKR)) {
- NOTE("dissecting");
- dp = dissect(m, m->coldp, endp, gf, gl);
- } else {
- if (g->nplus > 0 && m->lastpos == NULL)
- m->lastpos = (char **)malloc((g->nplus+1) *
- sizeof(char *));
- if (g->nplus > 0 && m->lastpos == NULL) {
- free(m->pmatch);
- STATETEARDOWN(m);
- return(REG_ESPACE);
- }
- NOTE("backref dissect");
- dp = backref(m, m->coldp, endp, gf, gl, (sopno)0);
- }
- if (dp != NULL)
- break;
-
- /* uh-oh... we couldn't find a subexpression-level match */
- assert(g->backrefs); /* must be back references doing it */
- assert(g->nplus == 0 || m->lastpos != NULL);
- for (;;) {
- if (dp != NULL || endp <= m->coldp)
- break; /* defeat */
- NOTE("backoff");
- endp = slow(m, m->coldp, endp-1, gf, gl);
- if (endp == NULL)
- break; /* defeat */
- /* try it on a shorter possibility */
-#ifndef NDEBUG
- for (i = 1; i <= m->g->nsub; i++) {
- assert(m->pmatch[i].rm_so == -1);
- assert(m->pmatch[i].rm_eo == -1);
- }
-#endif
- NOTE("backoff dissect");
- dp = backref(m, m->coldp, endp, gf, gl, (sopno)0);
- }
- assert(dp == NULL || dp == endp);
- if (dp != NULL) /* found a shorter one */
- break;
-
- /* despite initial appearances, there is no match here */
- NOTE("false alarm");
- start = m->coldp + 1; /* recycle starting later */
- assert(start <= stop);
- }
-
- /* fill in the details if requested */
- if (nmatch > 0) {
- pmatch[0].rm_so = m->coldp - m->offp;
- pmatch[0].rm_eo = endp - m->offp;
- }
- if (nmatch > 1) {
- assert(m->pmatch != NULL);
- for (i = 1; i < nmatch; i++)
- if (i <= m->g->nsub)
- pmatch[i] = m->pmatch[i];
- else {
- pmatch[i].rm_so = -1;
- pmatch[i].rm_eo = -1;
- }
- }
-
- if (m->pmatch != NULL)
- free((char *)m->pmatch);
- if (m->lastpos != NULL)
- free((char *)m->lastpos);
- STATETEARDOWN(m);
- return(0);
-}
-
-/*
- - dissect - figure out what matched what, no back references
- == static char *dissect(struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst);
- */
-static char * /* == stop (success) always */
-dissect(m, start, stop, startst, stopst)
-struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
- int i;
- sopno ss; /* start sop of current subRE */
- sopno es; /* end sop of current subRE */
- char *sp; /* start of string matched by it */
- char *stp; /* string matched by it cannot pass here */
- char *rest; /* start of rest of string */
- char *tail; /* string unmatched by rest of RE */
- sopno ssub; /* start sop of subsubRE */
- sopno esub; /* end sop of subsubRE */
- char *ssp; /* start of string matched by subsubRE */
- char *sep; /* end of string matched by subsubRE */
- char *oldssp; /* previous ssp */
- char *dp;
-
- AT("diss", start, stop, startst, stopst);
- sp = start;
- for (ss = startst; ss < stopst; ss = es) {
- /* identify end of subRE */
- es = ss;
- switch (OP(m->g->strip[es])) {
- case OPLUS_:
- case OQUEST_:
- es += OPND(m->g->strip[es]);
- break;
- case OCH_:
- while (OP(m->g->strip[es]) != O_CH)
- es += OPND(m->g->strip[es]);
- break;
- }
- es++;
-
- /* figure out what it matched */
- switch (OP(m->g->strip[ss])) {
- case OEND:
- assert(nope);
- break;
- case OCHAR:
- sp++;
- break;
- case OBOL:
- case OEOL:
- case OBOW:
- case OEOW:
- break;
- case OANY:
- case OANYOF:
- sp++;
- break;
- case OBACK_:
- case O_BACK:
- assert(nope);
- break;
- /* cases where length of match is hard to find */
- case OQUEST_:
- stp = stop;
- for (;;) {
- /* how long could this one be? */
- rest = slow(m, sp, stp, ss, es);
- assert(rest != NULL); /* it did match */
- /* could the rest match the rest? */
- tail = slow(m, rest, stop, es, stopst);
- if (tail == stop)
- break; /* yes! */
- /* no -- try a shorter match for this one */
- stp = rest - 1;
- assert(stp >= sp); /* it did work */
- }
- ssub = ss + 1;
- esub = es - 1;
- /* did innards match? */
- if (slow(m, sp, rest, ssub, esub) != NULL) {
- dp = dissect(m, sp, rest, ssub, esub);
- assert(dp == rest);
- } else /* no */
- assert(sp == rest);
- sp = rest;
- break;
- case OPLUS_:
- stp = stop;
- for (;;) {
- /* how long could this one be? */
- rest = slow(m, sp, stp, ss, es);
- assert(rest != NULL); /* it did match */
- /* could the rest match the rest? */
- tail = slow(m, rest, stop, es, stopst);
- if (tail == stop)
- break; /* yes! */
- /* no -- try a shorter match for this one */
- stp = rest - 1;
- assert(stp >= sp); /* it did work */
- }
- ssub = ss + 1;
- esub = es - 1;
- ssp = sp;
- oldssp = ssp;
- for (;;) { /* find last match of innards */
- sep = slow(m, ssp, rest, ssub, esub);
- if (sep == NULL || sep == ssp)
- break; /* failed or matched null */
- oldssp = ssp; /* on to next try */
- ssp = sep;
- }
- if (sep == NULL) {
- /* last successful match */
- sep = ssp;
- ssp = oldssp;
- }
- assert(sep == rest); /* must exhaust substring */
- assert(slow(m, ssp, sep, ssub, esub) == rest);
- dp = dissect(m, ssp, sep, ssub, esub);
- assert(dp == sep);
- sp = rest;
- break;
- case OCH_:
- stp = stop;
- for (;;) {
- /* how long could this one be? */
- rest = slow(m, sp, stp, ss, es);
- assert(rest != NULL); /* it did match */
- /* could the rest match the rest? */
- tail = slow(m, rest, stop, es, stopst);
- if (tail == stop)
- break; /* yes! */
- /* no -- try a shorter match for this one */
- stp = rest - 1;
- assert(stp >= sp); /* it did work */
- }
- ssub = ss + 1;
- esub = ss + OPND(m->g->strip[ss]) - 1;
- assert(OP(m->g->strip[esub]) == OOR1);
- for (;;) { /* find first matching branch */
- if (slow(m, sp, rest, ssub, esub) == rest)
- break; /* it matched all of it */
- /* that one missed, try next one */
- assert(OP(m->g->strip[esub]) == OOR1);
- esub++;
- assert(OP(m->g->strip[esub]) == OOR2);
- ssub = esub + 1;
- esub += OPND(m->g->strip[esub]);
- if (OP(m->g->strip[esub]) == OOR2)
- esub--;
- else
- assert(OP(m->g->strip[esub]) == O_CH);
- }
- dp = dissect(m, sp, rest, ssub, esub);
- assert(dp == rest);
- sp = rest;
- break;
- case O_PLUS:
- case O_QUEST:
- case OOR1:
- case OOR2:
- case O_CH:
- assert(nope);
- break;
- case OLPAREN:
- i = OPND(m->g->strip[ss]);
- assert(0 < i && i <= m->g->nsub);
- m->pmatch[i].rm_so = sp - m->offp;
- break;
- case ORPAREN:
- i = OPND(m->g->strip[ss]);
- assert(0 < i && i <= m->g->nsub);
- m->pmatch[i].rm_eo = sp - m->offp;
- break;
- default: /* uh oh */
- assert(nope);
- break;
- }
- }
-
- assert(sp == stop);
- return(sp);
-}
-
-/*
- - backref - figure out what matched what, figuring in back references
- == static char *backref(struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst, sopno lev);
- */
-static char * /* == stop (success) or NULL (failure) */
-backref(m, start, stop, startst, stopst, lev)
-struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-sopno lev; /* PLUS nesting level */
-{
- int i;
- sopno ss; /* start sop of current subRE */
- char *sp; /* start of string matched by it */
- sopno ssub; /* start sop of subsubRE */
- sopno esub; /* end sop of subsubRE */
- char *ssp; /* start of string matched by subsubRE */
- char *dp;
- size_t len;
- int hard;
- sop s;
- regoff_t offsave;
- cset *cs;
-
- AT("back", start, stop, startst, stopst);
- sp = start;
-
- /* get as far as we can with easy stuff */
- hard = 0;
- for (ss = startst; !hard && ss < stopst; ss++)
- switch (OP(s = m->g->strip[ss])) {
- case OCHAR:
- if (sp == stop || *sp++ != (char)OPND(s))
- return(NULL);
- break;
- case OANY:
- if (sp == stop)
- return(NULL);
- sp++;
- break;
- case OANYOF:
- cs = &m->g->sets[OPND(s)];
- if (sp == stop || !CHIN(cs, *sp++))
- return(NULL);
- break;
- case OBOL:
- if ( (sp == m->beginp && !(m->eflags&REG_NOTBOL)) ||
- (sp < m->endp && *(sp-1) == '\n' &&
- (m->g->cflags&REG_NEWLINE)) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case OEOL:
- if ( (sp == m->endp && !(m->eflags&REG_NOTEOL)) ||
- (sp < m->endp && *sp == '\n' &&
- (m->g->cflags&REG_NEWLINE)) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case OBOW:
- if (( (sp == m->beginp && !(m->eflags&REG_NOTBOL)) ||
- (sp < m->endp && *(sp-1) == '\n' &&
- (m->g->cflags&REG_NEWLINE)) ||
- (sp > m->beginp &&
- !ISWORD(*(sp-1))) ) &&
- (sp < m->endp && ISWORD(*sp)) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case OEOW:
- if (( (sp == m->endp && !(m->eflags&REG_NOTEOL)) ||
- (sp < m->endp && *sp == '\n' &&
- (m->g->cflags&REG_NEWLINE)) ||
- (sp < m->endp && !ISWORD(*sp)) ) &&
- (sp > m->beginp && ISWORD(*(sp-1))) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case O_QUEST:
- break;
- case OOR1: /* matches null but needs to skip */
- ss++;
- s = m->g->strip[ss];
- do {
- assert(OP(s) == OOR2);
- ss += OPND(s);
- } while (OP(s = m->g->strip[ss]) != O_CH);
- /* note that the ss++ gets us past the O_CH */
- break;
- default: /* have to make a choice */
- hard = 1;
- break;
- }
- if (!hard) { /* that was it! */
- if (sp != stop)
- return(NULL);
- return(sp);
- }
- ss--; /* adjust for the for's final increment */
-
- /* the hard stuff */
- AT("hard", sp, stop, ss, stopst);
- s = m->g->strip[ss];
- switch (OP(s)) {
- case OBACK_: /* the vilest depths */
- i = OPND(s);
- assert(0 < i && i <= m->g->nsub);
- if (m->pmatch[i].rm_eo == -1)
- return(NULL);
- assert(m->pmatch[i].rm_so != -1);
- len = m->pmatch[i].rm_eo - m->pmatch[i].rm_so;
- assert(stop - m->beginp >= len);
- if (sp > stop - len)
- return(NULL); /* not enough left to match */
- ssp = m->offp + m->pmatch[i].rm_so;
- if (memcmp(sp, ssp, len) != 0)
- return(NULL);
- while (m->g->strip[ss] != SOP(O_BACK, i))
- ss++;
- return(backref(m, sp+len, stop, ss+1, stopst, lev));
- break;
- case OQUEST_: /* to null or not */
- dp = backref(m, sp, stop, ss+1, stopst, lev);
- if (dp != NULL)
- return(dp); /* not */
- return(backref(m, sp, stop, ss+OPND(s)+1, stopst, lev));
- break;
- case OPLUS_:
- assert(m->lastpos != NULL);
- assert(lev+1 <= m->g->nplus);
- m->lastpos[lev+1] = sp;
- return(backref(m, sp, stop, ss+1, stopst, lev+1));
- break;
- case O_PLUS:
- if (sp == m->lastpos[lev]) /* last pass matched null */
- return(backref(m, sp, stop, ss+1, stopst, lev-1));
- /* try another pass */
- m->lastpos[lev] = sp;
- dp = backref(m, sp, stop, ss-OPND(s)+1, stopst, lev);
- if (dp == NULL)
- return(backref(m, sp, stop, ss+1, stopst, lev-1));
- else
- return(dp);
- break;
- case OCH_: /* find the right one, if any */
- ssub = ss + 1;
- esub = ss + OPND(s) - 1;
- assert(OP(m->g->strip[esub]) == OOR1);
- for (;;) { /* find first matching branch */
- dp = backref(m, sp, stop, ssub, esub, lev);
- if (dp != NULL)
- return(dp);
- /* that one missed, try next one */
- if (OP(m->g->strip[esub]) == O_CH)
- return(NULL); /* there is none */
- esub++;
- assert(OP(m->g->strip[esub]) == OOR2);
- ssub = esub + 1;
- esub += OPND(m->g->strip[esub]);
- if (OP(m->g->strip[esub]) == OOR2)
- esub--;
- else
- assert(OP(m->g->strip[esub]) == O_CH);
- }
- break;
- case OLPAREN: /* must undo assignment if rest fails */
- i = OPND(s);
- assert(0 < i && i <= m->g->nsub);
- offsave = m->pmatch[i].rm_so;
- m->pmatch[i].rm_so = sp - m->offp;
- dp = backref(m, sp, stop, ss+1, stopst, lev);
- if (dp != NULL)
- return(dp);
- m->pmatch[i].rm_so = offsave;
- return(NULL);
- break;
- case ORPAREN: /* must undo assignment if rest fails */
- i = OPND(s);
- assert(0 < i && i <= m->g->nsub);
- offsave = m->pmatch[i].rm_eo;
- m->pmatch[i].rm_eo = sp - m->offp;
- dp = backref(m, sp, stop, ss+1, stopst, lev);
- if (dp != NULL)
- return(dp);
- m->pmatch[i].rm_eo = offsave;
- return(NULL);
- break;
- default: /* uh oh */
- assert(nope);
- break;
- }
-
- /* "can't happen" */
- assert(nope);
- /* NOTREACHED */
- return "shut up gcc";
-}
-
-/*
- - fast - step through the string at top speed
- == static char *fast(struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst);
- */
-static char * /* where tentative match ended, or NULL */
-fast(m, start, stop, startst, stopst)
-struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
- states st = m->st;
- states fresh = m->fresh;
- states tmp = m->tmp;
- char *p = start;
- int c = (start == m->beginp) ? OUT : *(start-1);
- int lastc; /* previous c */
- int flagch;
- int i;
- char *coldp; /* last p after which no match was underway */
-
- CLEAR(st);
- SET1(st, startst);
- st = step(m->g, startst, stopst, st, NOTHING, st);
- ASSIGN(fresh, st);
- SP("start", st, *p);
- coldp = NULL;
- for (;;) {
- /* next character */
- lastc = c;
- c = (p == m->endp) ? OUT : *p;
- if (EQ(st, fresh))
- coldp = p;
-
- /* is there an EOL and/or BOL between lastc and c? */
- flagch = '\0';
- i = 0;
- if ( (lastc == '\n' && m->g->cflags&REG_NEWLINE) ||
- (lastc == OUT && !(m->eflags&REG_NOTBOL)) ) {
- flagch = BOL;
- i = m->g->nbol;
- }
- if ( (c == '\n' && m->g->cflags&REG_NEWLINE) ||
- (c == OUT && !(m->eflags&REG_NOTEOL)) ) {
- flagch = (flagch == BOL) ? BOLEOL : EOL;
- i += m->g->neol;
- }
- if (i != 0) {
- for (; i > 0; i--)
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("boleol", st, c);
- }
-
- /* how about a word boundary? */
- if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
- (c != OUT && ISWORD(c)) ) {
- flagch = BOW;
- }
- if ( (lastc != OUT && ISWORD(lastc)) &&
- (flagch == EOL || (c != OUT && !ISWORD(c))) ) {
- flagch = EOW;
- }
- if (flagch == BOW || flagch == EOW) {
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("boweow", st, c);
- }
-
- /* are we done? */
- if (ISSET(st, stopst) || p == stop)
- break; /* NOTE BREAK OUT */
-
- /* no, we must deal with this character */
- ASSIGN(tmp, st);
- ASSIGN(st, fresh);
- assert(c != OUT);
- st = step(m->g, startst, stopst, tmp, c, st);
- SP("aft", st, c);
- assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st));
- p++;
- }
-
- assert(coldp != NULL);
- m->coldp = coldp;
- if (ISSET(st, stopst))
- return(p+1);
- else
- return(NULL);
-}
-
-/*
- - slow - step through the string more deliberately
- == static char *slow(struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst);
- */
-static char * /* where it ended */
-slow(m, start, stop, startst, stopst)
-struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
- states st = m->st;
- states empty = m->empty;
- states tmp = m->tmp;
- char *p = start;
- int c = (start == m->beginp) ? OUT : *(start-1);
- int lastc; /* previous c */
- int flagch;
- int i;
- char *matchp; /* last p at which a match ended */
-
- AT("slow", start, stop, startst, stopst);
- CLEAR(st);
- SET1(st, startst);
- SP("sstart", st, *p);
- st = step(m->g, startst, stopst, st, NOTHING, st);
- matchp = NULL;
- for (;;) {
- /* next character */
- lastc = c;
- c = (p == m->endp) ? OUT : *p;
-
- /* is there an EOL and/or BOL between lastc and c? */
- flagch = '\0';
- i = 0;
- if ( (lastc == '\n' && m->g->cflags&REG_NEWLINE) ||
- (lastc == OUT && !(m->eflags&REG_NOTBOL)) ) {
- flagch = BOL;
- i = m->g->nbol;
- }
- if ( (c == '\n' && m->g->cflags&REG_NEWLINE) ||
- (c == OUT && !(m->eflags&REG_NOTEOL)) ) {
- flagch = (flagch == BOL) ? BOLEOL : EOL;
- i += m->g->neol;
- }
- if (i != 0) {
- for (; i > 0; i--)
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("sboleol", st, c);
- }
-
- /* how about a word boundary? */
- if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
- (c != OUT && ISWORD(c)) ) {
- flagch = BOW;
- }
- if ( (lastc != OUT && ISWORD(lastc)) &&
- (flagch == EOL || (c != OUT && !ISWORD(c))) ) {
- flagch = EOW;
- }
- if (flagch == BOW || flagch == EOW) {
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("sboweow", st, c);
- }
-
- /* are we done? */
- if (ISSET(st, stopst))
- matchp = p;
- if (EQ(st, empty) || p == stop)
- break; /* NOTE BREAK OUT */
-
- /* no, we must deal with this character */
- ASSIGN(tmp, st);
- ASSIGN(st, empty);
- assert(c != OUT);
- st = step(m->g, startst, stopst, tmp, c, st);
- SP("saft", st, c);
- assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st));
- p++;
- }
-
- return(matchp);
-}
-
-
-/*
- - step - map set of states reachable before char to set reachable after
- == static states step(struct re_guts *g, sopno start, sopno stop, \
- == states bef, int ch, states aft);
- == #define BOL (OUT+1)
- == #define EOL (BOL+1)
- == #define BOLEOL (BOL+2)
- == #define NOTHING (BOL+3)
- == #define BOW (BOL+4)
- == #define EOW (BOL+5)
- == #define CODEMAX (BOL+5) // highest code used
- == #define NONCHAR(c) ((c) > CHAR_MAX)
- == #define NNONCHAR (CODEMAX-CHAR_MAX)
- */
-static states
-step(g, start, stop, bef, ch, aft)
-struct re_guts *g;
-sopno start; /* start state within strip */
-sopno stop; /* state after stop state within strip */
-states bef; /* states reachable before */
-int ch; /* character or NONCHAR code */
-states aft; /* states already known reachable after */
-{
- cset *cs;
- sop s;
- sopno pc;
- onestate here; /* note, macros know this name */
- sopno look;
- int i;
-
- for (pc = start, INIT(here, pc); pc != stop; pc++, INC(here)) {
- s = g->strip[pc];
- switch (OP(s)) {
- case OEND:
- assert(pc == stop-1);
- break;
- case OCHAR:
- /* only characters can match */
- assert(!NONCHAR(ch) || ch != (char)OPND(s));
- if (ch == (char)OPND(s))
- FWD(aft, bef, 1);
- break;
- case OBOL:
- if (ch == BOL || ch == BOLEOL)
- FWD(aft, bef, 1);
- break;
- case OEOL:
- if (ch == EOL || ch == BOLEOL)
- FWD(aft, bef, 1);
- break;
- case OBOW:
- if (ch == BOW)
- FWD(aft, bef, 1);
- break;
- case OEOW:
- if (ch == EOW)
- FWD(aft, bef, 1);
- break;
- case OANY:
- if (!NONCHAR(ch))
- FWD(aft, bef, 1);
- break;
- case OANYOF:
- cs = &g->sets[OPND(s)];
- if (!NONCHAR(ch) && CHIN(cs, ch))
- FWD(aft, bef, 1);
- break;
- case OBACK_: /* ignored here */
- case O_BACK:
- FWD(aft, aft, 1);
- break;
- case OPLUS_: /* forward, this is just an empty */
- FWD(aft, aft, 1);
- break;
- case O_PLUS: /* both forward and back */
- FWD(aft, aft, 1);
- i = ISSETBACK(aft, OPND(s));
- BACK(aft, aft, OPND(s));
- if (!i && ISSETBACK(aft, OPND(s))) {
- /* oho, must reconsider loop body */
- pc -= OPND(s) + 1;
- INIT(here, pc);
- }
- break;
- case OQUEST_: /* two branches, both forward */
- FWD(aft, aft, 1);
- FWD(aft, aft, OPND(s));
- break;
- case O_QUEST: /* just an empty */
- FWD(aft, aft, 1);
- break;
- case OLPAREN: /* not significant here */
- case ORPAREN:
- FWD(aft, aft, 1);
- break;
- case OCH_: /* mark the first two branches */
- FWD(aft, aft, 1);
- assert(OP(g->strip[pc+OPND(s)]) == OOR2);
- FWD(aft, aft, OPND(s));
- break;
- case OOR1: /* done a branch, find the O_CH */
- if (ISSTATEIN(aft, here)) {
- for (look = 1;
- OP(s = g->strip[pc+look]) != O_CH;
- look += OPND(s))
- assert(OP(s) == OOR2);
- FWD(aft, aft, look);
- }
- break;
- case OOR2: /* propagate OCH_'s marking */
- FWD(aft, aft, 1);
- if (OP(g->strip[pc+OPND(s)]) != O_CH) {
- assert(OP(g->strip[pc+OPND(s)]) == OOR2);
- FWD(aft, aft, OPND(s));
- }
- break;
- case O_CH: /* just empty */
- FWD(aft, aft, 1);
- break;
- default: /* ooooops... */
- assert(nope);
- break;
- }
- }
-
- return(aft);
-}
-
-#ifdef REDEBUG
-/*
- - print - print a set of states
- == #ifdef REDEBUG
- == static void print(struct match *m, char *caption, states st, \
- == int ch, FILE *d);
- == #endif
- */
-static void
-print(m, caption, st, ch, d)
-struct match *m;
-char *caption;
-states st;
-int ch;
-FILE *d;
-{
- struct re_guts *g = m->g;
- int i;
- int first = 1;
-
- if (!(m->eflags&REG_TRACE))
- return;
-
- fprintf(d, "%s", caption);
- if (ch != '\0')
- fprintf(d, " %s", pchar(ch));
- for (i = 0; i < g->nstates; i++)
- if (ISSET(st, i)) {
- fprintf(d, "%s%d", (first) ? "\t" : ", ", i);
- first = 0;
- }
- fprintf(d, "\n");
-}
-
-/*
- - at - print current situation
- == #ifdef REDEBUG
- == static void at(struct match *m, char *title, char *start, char *stop, \
- == sopno startst, sopno stopst);
- == #endif
- */
-static void
-at(m, title, start, stop, startst, stopst)
-struct match *m;
-char *title;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
- if (!(m->eflags&REG_TRACE))
- return;
-
- printf("%s %s-", title, pchar(*start));
- printf("%s ", pchar(*stop));
- printf("%ld-%ld\n", (long)startst, (long)stopst);
-}
-
-#ifndef PCHARDONE
-#define PCHARDONE /* never again */
-/*
- - pchar - make a character printable
- == #ifdef REDEBUG
- == static char *pchar(int ch);
- == #endif
- *
- * Is this identical to regchar() over in debug.c? Well, yes. But a
- * duplicate here avoids having a debugging-capable regexec.o tied to
- * a matching debug.o, and this is convenient. It all disappears in
- * the non-debug compilation anyway, so it doesn't matter much.
- */
-static char * /* -> representation */
-pchar(ch)
-int ch;
-{
- static char pbuf[10];
-
- if (isprint((uch)ch) || ch == ' ')
- sprintf(pbuf, "%c", ch);
- else
- sprintf(pbuf, "\\%o", ch);
- return(pbuf);
-}
-#endif
-#endif
-
-#undef matcher
-#undef fast
-#undef slow
-#undef dissect
-#undef backref
-#undef step
-#undef print
-#undef at
-#undef match
diff --git a/newlib/libc/sys/linux/stdlib/fnmatch.3 b/newlib/libc/sys/linux/stdlib/fnmatch.3
deleted file mode 100644
index 9c3fda5f9..000000000
--- a/newlib/libc/sys/linux/stdlib/fnmatch.3
+++ /dev/null
@@ -1,151 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Guido van Rossum.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fnmatch.3 8.3 (Berkeley) 4/28/95
-.\" $FreeBSD: src/lib/libc/gen/fnmatch.3,v 1.12 2001/10/01 16:08:50 ru Exp $
-.\"
-.Dd April 28, 1995
-.Dt FNMATCH 3
-.Os
-.Sh NAME
-.Nm fnmatch
-.Nd match filename or pathname
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In fnmatch.h
-.Ft int
-.Fn fnmatch "const char *pattern" "const char *string" "int flags"
-.Sh DESCRIPTION
-The
-.Fn fnmatch
-function
-matches patterns according to the rules used by the shell.
-It checks the string specified by the
-.Fa string
-argument to see if it matches the pattern specified by the
-.Fa pattern
-argument.
-.Pp
-The
-.Fa flags
-argument modifies the interpretation of
-.Fa pattern
-and
-.Fa string .
-The value of
-.Fa flags
-is the bitwise inclusive
-.Tn OR
-of any of the following
-constants, which are defined in the include file
-.Pa fnmatch.h .
-.Bl -tag -width FNM_PATHNAME
-.It Dv FNM_NOESCAPE
-Normally, every occurrence of a backslash
-.Pq Ql \e
-followed by a character in
-.Fa pattern
-is replaced by that character.
-This is done to negate any special meaning for the character.
-If the
-.Dv FNM_NOESCAPE
-flag is set, a backslash character is treated as an ordinary character.
-.It Dv FNM_PATHNAME
-Slash characters in
-.Fa string
-must be explicitly matched by slashes in
-.Fa pattern .
-If this flag is not set, then slashes are treated as regular characters.
-.It Dv FNM_PERIOD
-Leading periods in
-.Fa string
-must be explicitly matched by periods in
-.Fa pattern .
-If this flag is not set, then leading periods are treated as regular
-characters.
-The definition of
-.Dq leading
-is related to the specification of
-.Dv FNM_PATHNAME .
-A period is always
-.Dq leading
-if it is the first character in
-.Ar string .
-Additionally, if
-.Dv FNM_PATHNAME
-is set,
-a period is
-leading
-if it immediately follows a slash.
-.It Dv FNM_LEADING_DIR
-Ignore
-.Nm /*
-rest after successful
-.Fa pattern
-matching.
-.It Dv FNM_CASEFOLD
-Ignore case distinctions in both the
-.Fa pattern
-and the
-.Fa string .
-.El
-.Sh RETURN VALUES
-The
-.Fn fnmatch
-function returns zero if
-.Fa string
-matches the pattern specified by
-.Fa pattern ,
-otherwise, it returns the value
-.Dv FNM_NOMATCH .
-.Sh SEE ALSO
-.Xr sh 1 ,
-.Xr glob 3 ,
-.Xr regex 3
-.Sh STANDARDS
-The
-.Fn fnmatch
-function conforms to
-.St -p1003.2 .
-.Sh HISTORY
-The
-.Fn fnmatch
-function first appeared in
-.Bx 4.4 .
-.Sh BUGS
-The pattern
-.Ql *
-matches the empty string, even if
-.Dv FNM_PATHNAME
-is specified.
diff --git a/newlib/libc/sys/linux/stdlib/fnmatch.c b/newlib/libc/sys/linux/stdlib/fnmatch.c
deleted file mode 100644
index 7b6f10dff..000000000
--- a/newlib/libc/sys/linux/stdlib/fnmatch.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Copyright (c) 1989, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Guido van Rossum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/gen/fnmatch.c,v 1.15 2002/02/01 01:32:19 obrien Exp $");
-
-/*
- * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
- * Compares a filename or pathname to a pattern.
- */
-
-#include <ctype.h>
-#include <fnmatch.h>
-#include <string.h>
-#include <stdio.h>
-
-#include "collate.h"
-
-#define EOS '\0'
-
-#define RANGE_MATCH 1
-#define RANGE_NOMATCH 0
-#define RANGE_ERROR (-1)
-
-static int rangematch(const char *, char, int, char **);
-
-int
-fnmatch(pattern, string, flags)
- const char *pattern, *string;
- int flags;
-{
- const char *stringstart;
- char *newp;
- char c, test;
-
- for (stringstart = string;;)
- switch (c = *pattern++) {
- case EOS:
- if ((flags & FNM_LEADING_DIR) && *string == '/')
- return (0);
- return (*string == EOS ? 0 : FNM_NOMATCH);
- case '?':
- if (*string == EOS)
- return (FNM_NOMATCH);
- if (*string == '/' && (flags & FNM_PATHNAME))
- return (FNM_NOMATCH);
- if (*string == '.' && (flags & FNM_PERIOD) &&
- (string == stringstart ||
- ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
- return (FNM_NOMATCH);
- ++string;
- break;
- case '*':
- c = *pattern;
- /* Collapse multiple stars. */
- while (c == '*')
- c = *++pattern;
-
- if (*string == '.' && (flags & FNM_PERIOD) &&
- (string == stringstart ||
- ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
- return (FNM_NOMATCH);
-
- /* Optimize for pattern with * at end or before /. */
- if (c == EOS)
- if (flags & FNM_PATHNAME)
- return ((flags & FNM_LEADING_DIR) ||
- strchr(string, '/') == NULL ?
- 0 : FNM_NOMATCH);
- else
- return (0);
- else if (c == '/' && flags & FNM_PATHNAME) {
- if ((string = strchr(string, '/')) == NULL)
- return (FNM_NOMATCH);
- break;
- }
-
- /* General case, use recursion. */
- while ((test = *string) != EOS) {
- if (!fnmatch(pattern, string, flags & ~FNM_PERIOD))
- return (0);
- if (test == '/' && flags & FNM_PATHNAME)
- break;
- ++string;
- }
- return (FNM_NOMATCH);
- case '[':
- if (*string == EOS)
- return (FNM_NOMATCH);
- if (*string == '/' && (flags & FNM_PATHNAME))
- return (FNM_NOMATCH);
- if (*string == '.' && (flags & FNM_PERIOD) &&
- (string == stringstart ||
- ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
- return (FNM_NOMATCH);
-
- switch (rangematch(pattern, *string, flags, &newp)) {
- case RANGE_ERROR:
- goto norm;
- case RANGE_MATCH:
- pattern = newp;
- break;
- case RANGE_NOMATCH:
- return (FNM_NOMATCH);
- }
- ++string;
- break;
- case '\\':
- if (!(flags & FNM_NOESCAPE)) {
- if ((c = *pattern++) == EOS) {
- c = '\\';
- --pattern;
- }
- }
- /* FALLTHROUGH */
- default:
- norm:
- if (c == *string)
- ;
- else if ((flags & FNM_CASEFOLD) &&
- (tolower((unsigned char)c) ==
- tolower((unsigned char)*string)))
- ;
- else
- return (FNM_NOMATCH);
- string++;
- break;
- }
- /* NOTREACHED */
-}
-
-static int
-rangematch(pattern, test, flags, newp)
- const char *pattern;
- char test;
- int flags;
- char **newp;
-{
- int negate, ok;
- char c, c2;
-
- /*
- * A bracket expression starting with an unquoted circumflex
- * character produces unspecified results (IEEE 1003.2-1992,
- * 3.13.2). This implementation treats it like '!', for
- * consistency with the regular expression syntax.
- * J.T. Conklin (conklin@ngai.kaleida.com)
- */
- if ( (negate = (*pattern == '!' || *pattern == '^')) )
- ++pattern;
-
- if (flags & FNM_CASEFOLD)
- test = tolower((unsigned char)test);
-
- /*
- * A right bracket shall lose its special meaning and represent
- * itself in a bracket expression if it occurs first in the list.
- * -- POSIX.2 2.8.3.2
- */
- ok = 0;
- c = *pattern++;
- do {
- if (c == '\\' && !(flags & FNM_NOESCAPE))
- c = *pattern++;
- if (c == EOS)
- return (RANGE_ERROR);
-
- if (c == '/' && (flags & FNM_PATHNAME))
- return (RANGE_NOMATCH);
-
- if (flags & FNM_CASEFOLD)
- c = tolower((unsigned char)c);
-
- if (*pattern == '-'
- && (c2 = *(pattern+1)) != EOS && c2 != ']') {
- pattern += 2;
- if (c2 == '\\' && !(flags & FNM_NOESCAPE))
- c2 = *pattern++;
- if (c2 == EOS)
- return (RANGE_ERROR);
-
- if (flags & FNM_CASEFOLD)
- c2 = tolower((unsigned char)c2);
-
- if (__collate_load_error ?
- c <= test && test <= c2 :
- __collate_range_cmp(c, test) <= 0
- && __collate_range_cmp(test, c2) <= 0
- )
- ok = 1;
- } else if (c == test)
- ok = 1;
- } while ((c = *pattern++) != ']');
-
- *newp = (char *)pattern;
- return (ok == negate ? RANGE_NOMATCH : RANGE_MATCH);
-}
diff --git a/newlib/libc/sys/linux/stdlib/glob.3 b/newlib/libc/sys/linux/stdlib/glob.3
deleted file mode 100644
index aa509a363..000000000
--- a/newlib/libc/sys/linux/stdlib/glob.3
+++ /dev/null
@@ -1,466 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Guido van Rossum.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)glob.3 8.3 (Berkeley) 4/16/94
-.\" $FreeBSD: src/lib/libc/gen/glob.3,v 1.20 2001/10/01 16:08:51 ru Exp $
-.\"
-.Dd April 16, 1994
-.Dt GLOB 3
-.Os
-.Sh NAME
-.Nm glob ,
-.Nm globfree
-.Nd generate pathnames matching a pattern
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In glob.h
-.Ft int
-.Fn glob "const char *pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t *pglob"
-.Ft void
-.Fn globfree "glob_t *pglob"
-.Sh DESCRIPTION
-The
-.Fn glob
-function
-is a pathname generator that implements the rules for file name pattern
-matching used by the shell.
-.Pp
-The include file
-.Pa glob.h
-defines the structure type
-.Fa glob_t ,
-which contains at least the following fields:
-.Bd -literal
-typedef struct {
- int gl_pathc; /* count of total paths so far */
- int gl_matchc; /* count of paths matching pattern */
- int gl_offs; /* reserved at beginning of gl_pathv */
- int gl_flags; /* returned flags */
- char **gl_pathv; /* list of paths matching pattern */
-} glob_t;
-.Ed
-.Pp
-The argument
-.Fa pattern
-is a pointer to a pathname pattern to be expanded.
-The
-.Fn glob
-argument
-matches all accessible pathnames against the pattern and creates
-a list of the pathnames that match.
-In order to have access to a pathname,
-.Fn glob
-requires search permission on every component of a path except the last
-and read permission on each directory of any filename component of
-.Fa pattern
-that contains any of the special characters
-.Ql * ,
-.Ql ?\&
-or
-.Ql \&[ .
-.Pp
-The
-.Fn glob
-argument
-stores the number of matched pathnames into the
-.Fa gl_pathc
-field, and a pointer to a list of pointers to pathnames into the
-.Fa gl_pathv
-field.
-The first pointer after the last pathname is
-.Dv NULL .
-If the pattern does not match any pathnames, the returned number of
-matched paths is set to zero.
-.Pp
-It is the caller's responsibility to create the structure pointed to by
-.Fa pglob .
-The
-.Fn glob
-function allocates other space as needed, including the memory pointed
-to by
-.Fa gl_pathv .
-.Pp
-The argument
-.Fa flags
-is used to modify the behavior of
-.Fn glob .
-The value of
-.Fa flags
-is the bitwise inclusive
-.Tn OR
-of any of the following
-values defined in
-.Pa glob.h :
-.Bl -tag -width GLOB_ALTDIRFUNC
-.It Dv GLOB_APPEND
-Append pathnames generated to the ones from a previous call (or calls)
-to
-.Fn glob .
-The value of
-.Fa gl_pathc
-will be the total matches found by this call and the previous call(s).
-The pathnames are appended to, not merged with the pathnames returned by
-the previous call(s).
-Between calls, the caller must not change the setting of the
-.Dv GLOB_DOOFFS
-flag, nor change the value of
-.Fa gl_offs
-when
-.Dv GLOB_DOOFFS
-is set, nor (obviously) call
-.Fn globfree
-for
-.Fa pglob .
-.It Dv GLOB_DOOFFS
-Make use of the
-.Fa gl_offs
-field.
-If this flag is set,
-.Fa gl_offs
-is used to specify how many
-.Dv NULL
-pointers to prepend to the beginning
-of the
-.Fa gl_pathv
-field.
-In other words,
-.Fa gl_pathv
-will point to
-.Fa gl_offs
-.Dv NULL
-pointers,
-followed by
-.Fa gl_pathc
-pathname pointers, followed by a
-.Dv NULL
-pointer.
-.It Dv GLOB_ERR
-Causes
-.Fn glob
-to return when it encounters a directory that it cannot open or read.
-Ordinarily,
-.Fn glob
-continues to find matches.
-.It Dv GLOB_MARK
-Each pathname that is a directory that matches
-.Fa pattern
-has a slash
-appended.
-.It Dv GLOB_NOCHECK
-If
-.Fa pattern
-does not match any pathname, then
-.Fn glob
-returns a list
-consisting of only
-.Fa pattern ,
-with the number of total pathnames is set to 1, and the number of matched
-pathnames set to 0.
-If
-.Dv GLOB_QUOTE
-is set, its effect is present in the pattern returned.
-.It Dv GLOB_NOSORT
-By default, the pathnames are sorted in ascending
-.Tn ASCII
-order;
-this flag prevents that sorting (speeding up
-.Fn glob ) .
-.El
-.Pp
-The following values may also be included in
-.Fa flags ,
-however, they are non-standard extensions to
-.St -p1003.2 .
-.Bl -tag -width GLOB_ALTDIRFUNC
-.It Dv GLOB_ALTDIRFUNC
-The following additional fields in the pglob structure have been
-initialized with alternate functions for glob to use to open, read,
-and close directories and to get stat information on names found
-in those directories.
-.Bd -literal
-void *(*gl_opendir)(const char * name);
-struct dirent *(*gl_readdir)(void *);
-void (*gl_closedir)(void *);
-int (*gl_lstat)(const char *name, struct stat *st);
-int (*gl_stat)(const char *name, struct stat *st);
-.Ed
-.Pp
-This extension is provided to allow programs such as
-.Xr restore 8
-to provide globbing from directories stored on tape.
-.It Dv GLOB_BRACE
-Pre-process the pattern string to expand
-.Ql {pat,pat,...}
-strings like
-.Xr csh 1 .
-The pattern
-.Ql {}
-is left unexpanded for historical reasons (and
-.Xr csh 1
-does the same thing to
-ease typing
-of
-.Xr find 1
-patterns).
-.It Dv GLOB_MAGCHAR
-Set by the
-.Fn glob
-function if the pattern included globbing characters.
-See the description of the usage of the
-.Fa gl_matchc
-structure member for more details.
-.It Dv GLOB_NOMAGIC
-Is the same as
-.Dv GLOB_NOCHECK
-but it only appends the
-.Fa pattern
-if it does not contain any of the special characters ``*'', ``?'' or ``[''.
-.Dv GLOB_NOMAGIC
-is provided to simplify implementing the historic
-.Xr csh 1
-globbing behavior and should probably not be used anywhere else.
-.It Dv GLOB_QUOTE
-Use the backslash
-.Pq Ql \e
-character for quoting: every occurrence of
-a backslash followed by a character in the pattern is replaced by that
-character, avoiding any special interpretation of the character.
-.It Dv GLOB_TILDE
-Expand patterns that start with
-.Ql ~
-to user name home directories.
-.It Dv GLOB_LIMIT
-Limit the total number of returned pathnames to the value provided in
-.Fa gl_matchc
-(default
-.Dv ARG_MAX ) .
-This option should be set for programs
-that can be coerced into a denial of service attack
-via patterns that expand to a very large number of matches,
-such as a long string of
-.Ql */../*/.. .
-.El
-.Pp
-If, during the search, a directory is encountered that cannot be opened
-or read and
-.Fa errfunc
-is
-.Pf non- Dv NULL ,
-.Fn glob
-calls
-.Fa \*(lp*errfunc\*(rp Ns ( Fa path , errno ) .
-This may be unintuitive: a pattern like
-.Ql */Makefile
-will try to
-.Xr stat 2
-.Ql foo/Makefile
-even if
-.Ql foo
-is not a directory, resulting in a
-call to
-.Fa errfunc .
-The error routine can suppress this action by testing for
-.Er ENOENT
-and
-.Er ENOTDIR ;
-however, the
-.Dv GLOB_ERR
-flag will still cause an immediate
-return when this happens.
-.Pp
-If
-.Fa errfunc
-returns non-zero,
-.Fn glob
-stops the scan and returns
-.Dv GLOB_ABEND
-after setting
-.Fa gl_pathc
-and
-.Fa gl_pathv
-to reflect any paths already matched.
-This also happens if an error is encountered and
-.Dv GLOB_ERR
-is set in
-.Fa flags ,
-regardless of the return value of
-.Fa errfunc ,
-if called.
-If
-.Dv GLOB_ERR
-is not set and either
-.Fa errfunc
-is
-.Dv NULL
-or
-.Fa errfunc
-returns zero, the error is ignored.
-.Pp
-The
-.Fn globfree
-function frees any space associated with
-.Fa pglob
-from a previous call(s) to
-.Fn glob .
-.Sh RETURN VALUES
-On successful completion,
-.Fn glob
-returns zero.
-In addition the fields of
-.Fa pglob
-contain the values described below:
-.Bl -tag -width GLOB_NOCHECK
-.It Fa gl_pathc
-contains the total number of matched pathnames so far.
-This includes other matches from previous invocations of
-.Fn glob
-if
-.Dv GLOB_APPEND
-was specified.
-.It Fa gl_matchc
-contains the number of matched pathnames in the current invocation of
-.Fn glob .
-.It Fa gl_flags
-contains a copy of the
-.Fa flags
-parameter with the bit
-.Dv GLOB_MAGCHAR
-set if
-.Fa pattern
-contained any of the special characters ``*'', ``?'' or ``['', cleared
-if not.
-.It Fa gl_pathv
-contains a pointer to a
-.Dv NULL Ns -terminated
-list of matched pathnames.
-However, if
-.Fa gl_pathc
-is zero, the contents of
-.Fa gl_pathv
-are undefined.
-.El
-.Pp
-If
-.Fn glob
-terminates due to an error, it sets errno and returns one of the
-following non-zero constants, which are defined in the include
-file
-.Aq Pa glob.h :
-.Bl -tag -width GLOB_NOCHECK
-.It Dv GLOB_NOSPACE
-An attempt to allocate memory failed, or if
-.Fa errno
-was 0
-.Dv GLOB_LIMIT
-was specified in the flags and
-.Fa pglob\->gl_matchc
-or more patterns were matched.
-.It Dv GLOB_ABEND
-The scan was stopped because an error was encountered and either
-.Dv GLOB_ERR
-was set or
-.Fa \*(lp*errfunc\*(rp\*(lp\*(rp
-returned non-zero.
-.El
-.Pp
-The arguments
-.Fa pglob\->gl_pathc
-and
-.Fa pglob\->gl_pathv
-are still set as specified above.
-.Sh EXAMPLES
-A rough equivalent of
-.Ql "ls -l *.c *.h"
-can be obtained with the
-following code:
-.Bd -literal -offset indent
-glob_t g;
-
-g.gl_offs = 2;
-glob("*.c", GLOB_DOOFFS, NULL, &g);
-glob("*.h", GLOB_DOOFFS | GLOB_APPEND, NULL, &g);
-g.gl_pathv[0] = "ls";
-g.gl_pathv[1] = "-l";
-execvp("ls", g.gl_pathv);
-.Ed
-.Sh SEE ALSO
-.Xr sh 1 ,
-.Xr fnmatch 3 ,
-.Xr regexp 3
-.Sh STANDARDS
-The
-.Fn glob
-function is expected to be
-.St -p1003.2
-compatible with the exception
-that the flags
-.Dv GLOB_ALTDIRFUNC ,
-.Dv GLOB_BRACE ,
-.Dv GLOB_LIMIT ,
-.Dv GLOB_MAGCHAR ,
-.Dv GLOB_NOMAGIC ,
-.Dv GLOB_QUOTE ,
-and
-.Dv GLOB_TILDE ,
-and the fields
-.Fa gl_matchc
-and
-.Fa gl_flags
-should not be used by applications striving for strict
-.Tn POSIX
-conformance.
-.Sh HISTORY
-The
-.Fn glob
-and
-.Fn globfree
-functions first appeared in
-.Bx 4.4 .
-.Sh BUGS
-Patterns longer than
-.Dv MAXPATHLEN
-may cause unchecked errors.
-.Pp
-The
-.Fn glob
-argument
-may fail and set errno for any of the errors specified for the
-library routines
-.Xr stat 2 ,
-.Xr closedir 3 ,
-.Xr opendir 3 ,
-.Xr readdir 3 ,
-.Xr malloc 3 ,
-and
-.Xr free 3 .
diff --git a/newlib/libc/sys/linux/stdlib/glob.c b/newlib/libc/sys/linux/stdlib/glob.c
deleted file mode 100644
index 0e392b32d..000000000
--- a/newlib/libc/sys/linux/stdlib/glob.c
+++ /dev/null
@@ -1,910 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Guido van Rossum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/gen/glob.c,v 1.19 2002/02/01 01:32:19 obrien Exp $");
-
-/*
- * glob(3) -- a superset of the one defined in POSIX 1003.2.
- *
- * The [!...] convention to negate a range is supported (SysV, Posix, ksh).
- *
- * Optional extra services, controlled by flags not defined by POSIX:
- *
- * GLOB_QUOTE:
- * Escaping convention: \ inhibits any special meaning the following
- * character might have (except \ at end of string is retained).
- * GLOB_MAGCHAR:
- * Set in gl_flags if pattern contained a globbing character.
- * GLOB_NOMAGIC:
- * Same as GLOB_NOCHECK, but it will only append pattern if it did
- * not contain any magic characters. [Used in csh style globbing]
- * GLOB_ALTDIRFUNC:
- * Use alternately specified directory access functions.
- * GLOB_TILDE:
- * expand ~user/foo to the /home/dir/of/user/foo
- * GLOB_BRACE:
- * expand {1,2}{a,b} to 1a 1b 2a 2b
- * gl_matchc:
- * Number of matches in the current invocation of glob.
- */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <ctype.h>
-#include <dirent.h>
-#include <errno.h>
-#include <glob.h>
-#include <pwd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "collate.h"
-
-#define DOLLAR '$'
-#define DOT '.'
-#define EOS '\0'
-#define LBRACKET '['
-#define NOT '!'
-#define QUESTION '?'
-#define QUOTE '\\'
-#define RANGE '-'
-#define RBRACKET ']'
-#define SEP '/'
-#define STAR '*'
-#define TILDE '~'
-#define UNDERSCORE '_'
-#define LBRACE '{'
-#define RBRACE '}'
-#define SLASH '/'
-#define COMMA ','
-
-#ifndef DEBUG
-
-#define M_QUOTE 0x8000
-#define M_PROTECT 0x4000
-#define M_MASK 0xffff
-#define M_ASCII 0x00ff
-
-typedef u_short Char;
-
-#else
-
-#define M_QUOTE 0x80
-#define M_PROTECT 0x40
-#define M_MASK 0xff
-#define M_ASCII 0x7f
-
-typedef char Char;
-
-#endif
-
-
-#define CHAR(c) ((Char)((c)&M_ASCII))
-#define META(c) ((Char)((c)|M_QUOTE))
-#define M_ALL META('*')
-#define M_END META(']')
-#define M_NOT META('!')
-#define M_ONE META('?')
-#define M_RNG META('-')
-#define M_SET META('[')
-#define ismeta(c) (((c)&M_QUOTE) != 0)
-
-
-static int compare(const void *, const void *);
-static int g_Ctoc(const Char *, char *, u_int);
-static int g_lstat(Char *, struct stat *, glob_t *);
-static DIR *g_opendir(Char *, glob_t *);
-static Char *g_strchr(Char *, int);
-#ifdef notdef
-static Char *g_strcat(Char *, const Char *);
-#endif
-static int g_stat(Char *, struct stat *, glob_t *);
-static int glob0(const Char *, glob_t *, int *);
-static int glob1(Char *, glob_t *, int *);
-static int glob2(Char *, Char *, Char *, Char *, glob_t *, int *);
-static int glob3(Char *, Char *, Char *, Char *, Char *, glob_t *, int *);
-static int globextend(const Char *, glob_t *, int *);
-static const Char *
- globtilde(const Char *, Char *, size_t, glob_t *);
-static int globexp1(const Char *, glob_t *, int *);
-static int globexp2(const Char *, const Char *, glob_t *, int *, int *);
-static int match(Char *, Char *, Char *);
-#ifdef DEBUG
-static void qprintf(const char *, Char *);
-#endif
-
-int
-glob(pattern, flags, errfunc, pglob)
- const char *pattern;
- int flags, (*errfunc)(const char *, int);
- glob_t *pglob;
-{
- const u_char *patnext;
- int c, limit;
- Char *bufnext, *bufend, patbuf[MAXPATHLEN];
-
- patnext = (u_char *) pattern;
- if (!(flags & GLOB_APPEND)) {
- pglob->gl_pathc = 0;
- pglob->gl_pathv = NULL;
- if (!(flags & GLOB_DOOFFS))
- pglob->gl_offs = 0;
- }
- if (flags & GLOB_LIMIT) {
- limit = pglob->gl_matchc;
- if (limit == 0)
- limit = ARG_MAX;
- } else
- limit = 0;
- pglob->gl_flags = flags & ~GLOB_MAGCHAR;
- pglob->gl_errfunc = errfunc;
- pglob->gl_matchc = 0;
-
- bufnext = patbuf;
- bufend = bufnext + MAXPATHLEN - 1;
- if (flags & GLOB_QUOTE) {
- /* Protect the quoted characters. */
- while (bufnext < bufend && (c = *patnext++) != EOS)
- if (c == QUOTE) {
- if ((c = *patnext++) == EOS) {
- c = QUOTE;
- --patnext;
- }
- *bufnext++ = c | M_PROTECT;
- }
- else
- *bufnext++ = c;
- }
- else
- while (bufnext < bufend && (c = *patnext++) != EOS)
- *bufnext++ = c;
- *bufnext = EOS;
-
- if (flags & GLOB_BRACE)
- return globexp1(patbuf, pglob, &limit);
- else
- return glob0(patbuf, pglob, &limit);
-}
-
-/*
- * Expand recursively a glob {} pattern. When there is no more expansion
- * invoke the standard globbing routine to glob the rest of the magic
- * characters
- */
-static int
-globexp1(pattern, pglob, limit)
- const Char *pattern;
- glob_t *pglob;
- int *limit;
-{
- const Char* ptr = pattern;
- int rv;
-
- /* Protect a single {}, for find(1), like csh */
- if (pattern[0] == LBRACE && pattern[1] == RBRACE && pattern[2] == EOS)
- return glob0(pattern, pglob, limit);
-
- while ((ptr = (const Char *) g_strchr((Char *) ptr, LBRACE)) != NULL)
- if (!globexp2(ptr, pattern, pglob, &rv, limit))
- return rv;
-
- return glob0(pattern, pglob, limit);
-}
-
-
-/*
- * Recursive brace globbing helper. Tries to expand a single brace.
- * If it succeeds then it invokes globexp1 with the new pattern.
- * If it fails then it tries to glob the rest of the pattern and returns.
- */
-static int
-globexp2(ptr, pattern, pglob, rv, limit)
- const Char *ptr, *pattern;
- glob_t *pglob;
- int *rv, *limit;
-{
- int i;
- Char *lm, *ls;
- const Char *pe, *pm, *pl;
- Char patbuf[MAXPATHLEN];
-
- /* copy part up to the brace */
- for (lm = patbuf, pm = pattern; pm != ptr; *lm++ = *pm++)
- continue;
- *lm = EOS;
- ls = lm;
-
- /* Find the balanced brace */
- for (i = 0, pe = ++ptr; *pe; pe++)
- if (*pe == LBRACKET) {
- /* Ignore everything between [] */
- for (pm = pe++; *pe != RBRACKET && *pe != EOS; pe++)
- continue;
- if (*pe == EOS) {
- /*
- * We could not find a matching RBRACKET.
- * Ignore and just look for RBRACE
- */
- pe = pm;
- }
- }
- else if (*pe == LBRACE)
- i++;
- else if (*pe == RBRACE) {
- if (i == 0)
- break;
- i--;
- }
-
- /* Non matching braces; just glob the pattern */
- if (i != 0 || *pe == EOS) {
- *rv = glob0(patbuf, pglob, limit);
- return 0;
- }
-
- for (i = 0, pl = pm = ptr; pm <= pe; pm++)
- switch (*pm) {
- case LBRACKET:
- /* Ignore everything between [] */
- for (pl = pm++; *pm != RBRACKET && *pm != EOS; pm++)
- continue;
- if (*pm == EOS) {
- /*
- * We could not find a matching RBRACKET.
- * Ignore and just look for RBRACE
- */
- pm = pl;
- }
- break;
-
- case LBRACE:
- i++;
- break;
-
- case RBRACE:
- if (i) {
- i--;
- break;
- }
- /* FALLTHROUGH */
- case COMMA:
- if (i && *pm == COMMA)
- break;
- else {
- /* Append the current string */
- for (lm = ls; (pl < pm); *lm++ = *pl++)
- continue;
- /*
- * Append the rest of the pattern after the
- * closing brace
- */
- for (pl = pe + 1; (*lm++ = *pl++) != EOS;)
- continue;
-
- /* Expand the current pattern */
-#ifdef DEBUG
- qprintf("globexp2:", patbuf);
-#endif
- *rv = globexp1(patbuf, pglob, limit);
-
- /* move after the comma, to the next string */
- pl = pm + 1;
- }
- break;
-
- default:
- break;
- }
- *rv = 0;
- return 0;
-}
-
-
-
-/*
- * expand tilde from the passwd file.
- */
-static const Char *
-globtilde(pattern, patbuf, patbuf_len, pglob)
- const Char *pattern;
- Char *patbuf;
- size_t patbuf_len;
- glob_t *pglob;
-{
- struct passwd *pwd;
- char *h;
- const Char *p;
- Char *b, *eb;
-
- if (*pattern != TILDE || !(pglob->gl_flags & GLOB_TILDE))
- return pattern;
-
- /*
- * Copy up to the end of the string or /
- */
- eb = &patbuf[patbuf_len - 1];
- for (p = pattern + 1, h = (char *) patbuf;
- h < (char *)eb && *p && *p != SLASH; *h++ = *p++)
- continue;
-
- *h = EOS;
-
- if (((char *) patbuf)[0] == EOS) {
- /*
- * handle a plain ~ or ~/ by expanding $HOME first (iff
- * we're not running setuid or setgid) and then trying
- * the password file
- */
- if (
-#ifndef __NETBSD_SYSCALLS
- issetugid() != 0 ||
-#endif
- (h = getenv("HOME")) == NULL) {
-/* If we are not EL/IX level 4, we cannot use getpwxxx interfaces */
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 4
- if (((h = getlogin()) != NULL &&
- (pwd = getpwnam(h)) != NULL) ||
- (pwd = getpwuid(getuid())) != NULL)
- h = pwd->pw_dir;
- else
-#endif /* !_ELIX_LEVEL || _ELIX_LEVEL >= 4 */
- return pattern;
- }
- }
- else {
- /*
- * Expand a ~user
- */
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 4
- if ((pwd = getpwnam((char*) patbuf)) != NULL)
- h = pwd->pw_dir;
- else
-#endif /* !_ELIX_LEVEL || _ELIX_LEVEL >= 4 */
- return pattern;
- }
-
- /* Copy the home directory */
- for (b = patbuf; b < eb && *h; *b++ = *h++)
- continue;
-
- /* Append the rest of the pattern */
- while (b < eb && (*b++ = *p++) != EOS)
- continue;
- *b = EOS;
-
- return patbuf;
-}
-
-
-/*
- * The main glob() routine: compiles the pattern (optionally processing
- * quotes), calls glob1() to do the real pattern matching, and finally
- * sorts the list (unless unsorted operation is requested). Returns 0
- * if things went well, nonzero if errors occurred. It is not an error
- * to find no matches.
- */
-static int
-glob0(pattern, pglob, limit)
- const Char *pattern;
- glob_t *pglob;
- int *limit;
-{
- const Char *qpatnext;
- int c, err, oldpathc;
- Char *bufnext, patbuf[MAXPATHLEN];
-
- qpatnext = globtilde(pattern, patbuf, MAXPATHLEN, pglob);
- oldpathc = pglob->gl_pathc;
- bufnext = patbuf;
-
- /* We don't need to check for buffer overflow any more. */
- while ((c = *qpatnext++) != EOS) {
- switch (c) {
- case LBRACKET:
- c = *qpatnext;
- if (c == NOT)
- ++qpatnext;
- if (*qpatnext == EOS ||
- g_strchr((Char *) qpatnext+1, RBRACKET) == NULL) {
- *bufnext++ = LBRACKET;
- if (c == NOT)
- --qpatnext;
- break;
- }
- *bufnext++ = M_SET;
- if (c == NOT)
- *bufnext++ = M_NOT;
- c = *qpatnext++;
- do {
- *bufnext++ = CHAR(c);
- if (*qpatnext == RANGE &&
- (c = qpatnext[1]) != RBRACKET) {
- *bufnext++ = M_RNG;
- *bufnext++ = CHAR(c);
- qpatnext += 2;
- }
- } while ((c = *qpatnext++) != RBRACKET);
- pglob->gl_flags |= GLOB_MAGCHAR;
- *bufnext++ = M_END;
- break;
- case QUESTION:
- pglob->gl_flags |= GLOB_MAGCHAR;
- *bufnext++ = M_ONE;
- break;
- case STAR:
- pglob->gl_flags |= GLOB_MAGCHAR;
- /* collapse adjacent stars to one,
- * to avoid exponential behavior
- */
- if (bufnext == patbuf || bufnext[-1] != M_ALL)
- *bufnext++ = M_ALL;
- break;
- default:
- *bufnext++ = CHAR(c);
- break;
- }
- }
- *bufnext = EOS;
-#ifdef DEBUG
- qprintf("glob0:", patbuf);
-#endif
-
- if ((err = glob1(patbuf, pglob, limit)) != 0)
- return(err);
-
- /*
- * If there was no match we are going to append the pattern
- * if GLOB_NOCHECK was specified or if GLOB_NOMAGIC was specified
- * and the pattern did not contain any magic characters
- * GLOB_NOMAGIC is there just for compatibility with csh.
- */
- if (pglob->gl_pathc == oldpathc &&
- ((pglob->gl_flags & GLOB_NOCHECK) ||
- ((pglob->gl_flags & GLOB_NOMAGIC) &&
- !(pglob->gl_flags & GLOB_MAGCHAR))))
- return(globextend(pattern, pglob, limit));
- else if (!(pglob->gl_flags & GLOB_NOSORT))
- qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc,
- pglob->gl_pathc - oldpathc, sizeof(char *), compare);
- return(0);
-}
-
-static int
-compare(p, q)
- const void *p, *q;
-{
- return(strcmp(*(char **)p, *(char **)q));
-}
-
-static int
-glob1(pattern, pglob, limit)
- Char *pattern;
- glob_t *pglob;
- int *limit;
-{
- Char pathbuf[MAXPATHLEN];
-
- /* A null pathname is invalid -- POSIX 1003.1 sect. 2.4. */
- if (*pattern == EOS)
- return(0);
- return(glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1,
- pattern, pglob, limit));
-}
-
-/*
- * The functions glob2 and glob3 are mutually recursive; there is one level
- * of recursion for each segment in the pattern that contains one or more
- * meta characters.
- */
-static int
-glob2(pathbuf, pathend, pathend_last, pattern, pglob, limit)
- Char *pathbuf, *pathend, *pathend_last, *pattern;
- glob_t *pglob;
- int *limit;
-{
- struct stat sb;
- Char *p, *q;
- int anymeta;
-
- /*
- * Loop over pattern segments until end of pattern or until
- * segment with meta character found.
- */
- for (anymeta = 0;;) {
- if (*pattern == EOS) { /* End of pattern? */
- *pathend = EOS;
- if (g_lstat(pathbuf, &sb, pglob))
- return(0);
-
- if (((pglob->gl_flags & GLOB_MARK) &&
- pathend[-1] != SEP) && (S_ISDIR(sb.st_mode)
- || (S_ISLNK(sb.st_mode) &&
- (g_stat(pathbuf, &sb, pglob) == 0) &&
- S_ISDIR(sb.st_mode)))) {
- if (pathend + 1 > pathend_last)
- return (1);
- *pathend++ = SEP;
- *pathend = EOS;
- }
- ++pglob->gl_matchc;
- return(globextend(pathbuf, pglob, limit));
- }
-
- /* Find end of next segment, copy tentatively to pathend. */
- q = pathend;
- p = pattern;
- while (*p != EOS && *p != SEP) {
- if (ismeta(*p))
- anymeta = 1;
- if (q + 1 > pathend_last)
- return (1);
- *q++ = *p++;
- }
-
- if (!anymeta) { /* No expansion, do next segment. */
- pathend = q;
- pattern = p;
- while (*pattern == SEP) {
- if (pathend + 1 > pathend_last)
- return (1);
- *pathend++ = *pattern++;
- }
- } else /* Need expansion, recurse. */
- return(glob3(pathbuf, pathend, pathend_last, pattern, p,
- pglob, limit));
- }
- /* NOTREACHED */
-}
-
-static int
-glob3(pathbuf, pathend, pathend_last, pattern, restpattern, pglob, limit)
- Char *pathbuf, *pathend, *pathend_last, *pattern, *restpattern;
- glob_t *pglob;
- int *limit;
-{
- struct dirent *dp;
- DIR *dirp;
- int err;
- char buf[MAXPATHLEN];
-
- /*
- * The readdirfunc declaration can't be prototyped, because it is
- * assigned, below, to two functions which are prototyped in glob.h
- * and dirent.h as taking pointers to differently typed opaque
- * structures.
- */
- struct dirent *(*readdirfunc)();
-
- if (pathend > pathend_last)
- return (1);
- *pathend = EOS;
- errno = 0;
-
- if ((dirp = g_opendir(pathbuf, pglob)) == NULL) {
- /* TODO: don't call for ENOENT or ENOTDIR? */
- if (pglob->gl_errfunc) {
- if (g_Ctoc(pathbuf, buf, sizeof(buf)))
- return (GLOB_ABEND);
- if (pglob->gl_errfunc(buf, errno) ||
- pglob->gl_flags & GLOB_ERR)
- return (GLOB_ABEND);
- }
- return(0);
- }
-
- err = 0;
-
- /* Search directory for matching names. */
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- readdirfunc = pglob->gl_readdir;
- else
- readdirfunc = readdir;
- while ((dp = (*readdirfunc)(dirp))) {
- u_char *sc;
- Char *dc;
-
- /* Initial DOT must be matched literally. */
- if (dp->d_name[0] == DOT && *pattern != DOT)
- continue;
- dc = pathend;
- sc = (u_char *) dp->d_name;
- while (dc < pathend_last && (*dc++ = *sc++) != EOS)
- ;
- if (!match(pathend, pattern, restpattern)) {
- *pathend = EOS;
- continue;
- }
- err = glob2(pathbuf, --dc, pathend_last, restpattern,
- pglob, limit);
- if (err)
- break;
- }
-
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- (*pglob->gl_closedir)(dirp);
- else
- closedir(dirp);
- return(err);
-}
-
-
-/*
- * Extend the gl_pathv member of a glob_t structure to accomodate a new item,
- * add the new item, and update gl_pathc.
- *
- * This assumes the BSD realloc, which only copies the block when its size
- * crosses a power-of-two boundary; for v7 realloc, this would cause quadratic
- * behavior.
- *
- * Return 0 if new item added, error code if memory couldn't be allocated.
- *
- * Invariant of the glob_t structure:
- * Either gl_pathc is zero and gl_pathv is NULL; or gl_pathc > 0 and
- * gl_pathv points to (gl_offs + gl_pathc + 1) items.
- */
-static int
-globextend(path, pglob, limit)
- const Char *path;
- glob_t *pglob;
- int *limit;
-{
- char **pathv;
- int i;
- u_int newsize, len;
- char *copy;
- const Char *p;
-
- if (*limit && pglob->gl_pathc > *limit) {
- errno = 0;
- return (GLOB_NOSPACE);
- }
-
- newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs);
- pathv = pglob->gl_pathv ?
- realloc((char *)pglob->gl_pathv, newsize) :
- malloc(newsize);
- if (pathv == NULL) {
- if (pglob->gl_pathv) {
- free(pglob->gl_pathv);
- pglob->gl_pathv = NULL;
- }
- return(GLOB_NOSPACE);
- }
-
- if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {
- /* first time around -- clear initial gl_offs items */
- pathv += pglob->gl_offs;
- for (i = pglob->gl_offs; --i >= 0; )
- *--pathv = NULL;
- }
- pglob->gl_pathv = pathv;
-
- for (p = path; *p++;)
- continue;
- len = (size_t)(p - path);
- if ((copy = malloc(len)) != NULL) {
- if (g_Ctoc(path, copy, len)) {
- free(copy);
- return (GLOB_NOSPACE);
- }
- pathv[pglob->gl_offs + pglob->gl_pathc++] = copy;
- }
- pathv[pglob->gl_offs + pglob->gl_pathc] = NULL;
- return(copy == NULL ? GLOB_NOSPACE : 0);
-}
-
-/*
- * pattern matching function for filenames. Each occurrence of the *
- * pattern causes a recursion level.
- */
-static int
-match(name, pat, patend)
- Char *name, *pat, *patend;
-{
- int ok, negate_range;
- Char c, k;
-
- while (pat < patend) {
- c = *pat++;
- switch (c & M_MASK) {
- case M_ALL:
- if (pat == patend)
- return(1);
- do
- if (match(name, pat, patend))
- return(1);
- while (*name++ != EOS);
- return(0);
- case M_ONE:
- if (*name++ == EOS)
- return(0);
- break;
- case M_SET:
- ok = 0;
- if ((k = *name++) == EOS)
- return(0);
- if ((negate_range = ((*pat & M_MASK) == M_NOT)) != EOS)
- ++pat;
- while (((c = *pat++) & M_MASK) != M_END)
- if ((*pat & M_MASK) == M_RNG) {
- if (__collate_load_error ?
- CHAR(c) <= CHAR(k) && CHAR(k) <= CHAR(pat[1]) :
- __collate_range_cmp(CHAR(c), CHAR(k)) <= 0
- && __collate_range_cmp(CHAR(k), CHAR(pat[1])) <= 0
- )
- ok = 1;
- pat += 2;
- } else if (c == k)
- ok = 1;
- if (ok == negate_range)
- return(0);
- break;
- default:
- if (*name++ != c)
- return(0);
- break;
- }
- }
- return(*name == EOS);
-}
-
-/* Free allocated data belonging to a glob_t structure. */
-void
-globfree(pglob)
- glob_t *pglob;
-{
- int i;
- char **pp;
-
- if (pglob->gl_pathv != NULL) {
- pp = pglob->gl_pathv + pglob->gl_offs;
- for (i = pglob->gl_pathc; i--; ++pp)
- if (*pp)
- free(*pp);
- free(pglob->gl_pathv);
- pglob->gl_pathv = NULL;
- }
-}
-
-static DIR *
-g_opendir(str, pglob)
- Char *str;
- glob_t *pglob;
-{
- char buf[MAXPATHLEN];
-
- if (!*str)
- strcpy(buf, ".");
- else {
- if (g_Ctoc(str, buf, sizeof(buf)))
- return (NULL);
- }
-
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_opendir)(buf));
-
- return(opendir(buf));
-}
-
-static int
-g_lstat(fn, sb, pglob)
- Char *fn;
- struct stat *sb;
- glob_t *pglob;
-{
- char buf[MAXPATHLEN];
-
- if (g_Ctoc(fn, buf, sizeof(buf))) {
- errno = ENAMETOOLONG;
- return (-1);
- }
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_lstat)(buf, sb));
- return(lstat(buf, sb));
-}
-
-static int
-g_stat(fn, sb, pglob)
- Char *fn;
- struct stat *sb;
- glob_t *pglob;
-{
- char buf[MAXPATHLEN];
-
- if (g_Ctoc(fn, buf, sizeof(buf))) {
- errno = ENAMETOOLONG;
- return (-1);
- }
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_stat)(buf, sb));
- return(stat(buf, sb));
-}
-
-static Char *
-g_strchr(str, ch)
- Char *str;
- int ch;
-{
- do {
- if (*str == ch)
- return (str);
- } while (*str++);
- return (NULL);
-}
-
-static int
-g_Ctoc(str, buf, len)
- const Char *str;
- char *buf;
- u_int len;
-{
-
- while (len--) {
- if ((*buf++ = *str++) == '\0')
- return (0);
- }
- return (1);
-}
-
-#ifdef DEBUG
-static void
-qprintf(str, s)
- const char *str;
- Char *s;
-{
- Char *p;
-
- (void)printf("%s:\n", str);
- for (p = s; *p; p++)
- (void)printf("%c", CHAR(*p));
- (void)printf("\n");
- for (p = s; *p; p++)
- (void)printf("%c", *p & M_PROTECT ? '"' : ' ');
- (void)printf("\n");
- for (p = s; *p; p++)
- (void)printf("%c", ismeta(*p) ? '_' : ' ');
- (void)printf("\n");
-}
-#endif
diff --git a/newlib/libc/sys/linux/stdlib/reallocf.c b/newlib/libc/sys/linux/stdlib/reallocf.c
deleted file mode 100644
index d50200622..000000000
--- a/newlib/libc/sys/linux/stdlib/reallocf.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * Copyright (c) 1998, M. Warner Losh <imp@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.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdlib/reallocf.c,v 1.4 2002/03/22 21:53:10 obrien Exp $");
-
-#include <stdlib.h>
-
-void *
-reallocf(void *ptr, size_t size)
-{
- void *nptr;
-
- nptr = realloc(ptr, size);
- if (!nptr && ptr)
- free(ptr);
- return (nptr);
-}
diff --git a/newlib/libc/sys/linux/stdlib/regcomp.c b/newlib/libc/sys/linux/stdlib/regcomp.c
deleted file mode 100644
index 8a3886964..000000000
--- a/newlib/libc/sys/linux/stdlib/regcomp.c
+++ /dev/null
@@ -1,2089 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regcomp.c 8.5 (Berkeley) 3/20/94
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/regex/regcomp.c,v 1.27 2002/03/22 21:52:47 obrien Exp $");
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <regex.h>
-
-#include "collate.h"
-
-#include "utils.h"
-#include "regex2.h"
-
-#include "cclass.h"
-#include "cname.h"
-
-/*
- * parse structure, passed up and down to avoid global variables and
- * other clumsinesses
- */
-struct parse {
- char *next; /* next character in RE */
- char *end; /* end of string (-> NUL normally) */
- int error; /* has an error been seen? */
- sop *strip; /* malloced strip */
- sopno ssize; /* malloced strip size (allocated) */
- sopno slen; /* malloced strip length (used) */
- int ncsalloc; /* number of csets allocated */
- struct re_guts *g;
-# define NPAREN 10 /* we need to remember () 1-9 for back refs */
- sopno pbegin[NPAREN]; /* -> ( ([0] unused) */
- sopno pend[NPAREN]; /* -> ) ([0] unused) */
-};
-
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === regcomp.c === */
-static void p_ere(struct parse *p, int stop);
-static void p_ere_exp(struct parse *p);
-static void p_str(struct parse *p);
-static void p_bre(struct parse *p, int end1, int end2);
-static int p_simp_re(struct parse *p, int starordinary);
-static int p_count(struct parse *p);
-static void p_bracket(struct parse *p);
-static void p_b_term(struct parse *p, cset *cs);
-static void p_b_cclass(struct parse *p, cset *cs);
-static void p_b_eclass(struct parse *p, cset *cs);
-static char p_b_symbol(struct parse *p);
-static char p_b_coll_elem(struct parse *p, int endc);
-static char othercase(int ch);
-static void bothcases(struct parse *p, int ch);
-static void ordinary(struct parse *p, int ch);
-static void nonnewline(struct parse *p);
-static void repeat(struct parse *p, sopno start, int from, int to);
-static int seterr(struct parse *p, int e);
-static cset *allocset(struct parse *p);
-static void freeset(struct parse *p, cset *cs);
-static int freezeset(struct parse *p, cset *cs);
-static int firstch(struct parse *p, cset *cs);
-static int nch(struct parse *p, cset *cs);
-static void mcadd(struct parse *p, cset *cs, char *cp);
-#if used
-static void mcsub(cset *cs, char *cp);
-static int mcin(cset *cs, char *cp);
-static char *mcfind(cset *cs, char *cp);
-#endif
-static void mcinvert(struct parse *p, cset *cs);
-static void mccase(struct parse *p, cset *cs);
-static int isinsets(struct re_guts *g, int c);
-static int samesets(struct re_guts *g, int c1, int c2);
-static void categorize(struct parse *p, struct re_guts *g);
-static sopno dupl(struct parse *p, sopno start, sopno finish);
-static void doemit(struct parse *p, sop op, size_t opnd);
-static void doinsert(struct parse *p, sop op, size_t opnd, sopno pos);
-static void dofwd(struct parse *p, sopno pos, sop value);
-static void enlarge(struct parse *p, sopno size);
-static void stripsnug(struct parse *p, struct re_guts *g);
-static void findmust(struct parse *p, struct re_guts *g);
-static int altoffset(sop *scan, int offset, int mccs);
-static void computejumps(struct parse *p, struct re_guts *g);
-static void computematchjumps(struct parse *p, struct re_guts *g);
-static sopno pluscount(struct parse *p, struct re_guts *g);
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
-
-static char nuls[10]; /* place to point scanner in event of error */
-
-/*
- * macros for use with parse structure
- * BEWARE: these know that the parse structure is named `p' !!!
- */
-#define PEEK() (*p->next)
-#define PEEK2() (*(p->next+1))
-#define MORE() (p->next < p->end)
-#define MORE2() (p->next+1 < p->end)
-#define SEE(c) (MORE() && PEEK() == (c))
-#define SEETWO(a, b) (MORE() && MORE2() && PEEK() == (a) && PEEK2() == (b))
-#define EAT(c) ((SEE(c)) ? (NEXT(), 1) : 0)
-#define EATTWO(a, b) ((SEETWO(a, b)) ? (NEXT2(), 1) : 0)
-#define NEXT() (p->next++)
-#define NEXT2() (p->next += 2)
-#define NEXTn(n) (p->next += (n))
-#define GETNEXT() (*p->next++)
-#define SETERROR(e) seterr(p, (e))
-#define REQUIRE(co, e) ((co) || SETERROR(e))
-#define MUSTSEE(c, e) (REQUIRE(MORE() && PEEK() == (c), e))
-#define MUSTEAT(c, e) (REQUIRE(MORE() && GETNEXT() == (c), e))
-#define MUSTNOTSEE(c, e) (REQUIRE(!MORE() || PEEK() != (c), e))
-#define EMIT(op, sopnd) doemit(p, (sop)(op), (size_t)(sopnd))
-#define INSERT(op, pos) doinsert(p, (sop)(op), HERE()-(pos)+1, pos)
-#define AHEAD(pos) dofwd(p, pos, HERE()-(pos))
-#define ASTERN(sop, pos) EMIT(sop, HERE()-pos)
-#define HERE() (p->slen)
-#define THERE() (p->slen - 1)
-#define THERETHERE() (p->slen - 2)
-#define DROP(n) (p->slen -= (n))
-
-#ifndef NDEBUG
-static int never = 0; /* for use in asserts; shuts lint up */
-#else
-#define never 0 /* some <assert.h>s have bugs too */
-#endif
-
-/* Macro used by computejump()/computematchjump() */
-#define MIN(a,b) ((a)<(b)?(a):(b))
-
-/*
- - regcomp - interface for parser and compilation
- = extern int regcomp(regex_t *, const char *, int);
- = #define REG_BASIC 0000
- = #define REG_EXTENDED 0001
- = #define REG_ICASE 0002
- = #define REG_NOSUB 0004
- = #define REG_NEWLINE 0010
- = #define REG_NOSPEC 0020
- = #define REG_PEND 0040
- = #define REG_DUMP 0200
- */
-int /* 0 success, otherwise REG_something */
-regcomp(preg, pattern, cflags)
-regex_t *preg;
-const char *pattern;
-int cflags;
-{
- struct parse pa;
- struct re_guts *g;
- struct parse *p = &pa;
- int i;
- size_t len;
-#ifdef REDEBUG
-# define GOODFLAGS(f) (f)
-#else
-# define GOODFLAGS(f) ((f)&~REG_DUMP)
-#endif
-
- cflags = GOODFLAGS(cflags);
- if ((cflags&REG_EXTENDED) && (cflags&REG_NOSPEC))
- return(REG_INVARG);
-
- if (cflags&REG_PEND) {
- if (preg->re_endp < pattern)
- return(REG_INVARG);
- len = preg->re_endp - pattern;
- } else
- len = strlen((char *)pattern);
-
- /* do the mallocs early so failure handling is easy */
- g = (struct re_guts *)malloc(sizeof(struct re_guts) +
- (NC-1)*sizeof(cat_t));
- if (g == NULL)
- return(REG_ESPACE);
- p->ssize = len/(size_t)2*(size_t)3 + (size_t)1; /* ugh */
- p->strip = (sop *)malloc(p->ssize * sizeof(sop));
- p->slen = 0;
- if (p->strip == NULL) {
- free((char *)g);
- return(REG_ESPACE);
- }
-
- /* set things up */
- p->g = g;
- p->next = (char *)pattern; /* convenience; we do not modify it */
- p->end = p->next + len;
- p->error = 0;
- p->ncsalloc = 0;
- for (i = 0; i < NPAREN; i++) {
- p->pbegin[i] = 0;
- p->pend[i] = 0;
- }
- g->csetsize = NC;
- g->sets = NULL;
- g->setbits = NULL;
- g->ncsets = 0;
- g->cflags = cflags;
- g->iflags = 0;
- g->nbol = 0;
- g->neol = 0;
- g->must = NULL;
- g->moffset = -1;
- g->charjump = NULL;
- g->matchjump = NULL;
- g->mlen = 0;
- g->nsub = 0;
- g->ncategories = 1; /* category 0 is "everything else" */
- g->categories = &g->catspace[-(CHAR_MIN)];
- (void) memset((char *)g->catspace, 0, NC*sizeof(cat_t));
- g->backrefs = 0;
-
- /* do it */
- EMIT(OEND, 0);
- g->firststate = THERE();
- if (cflags&REG_EXTENDED)
- p_ere(p, OUT);
- else if (cflags&REG_NOSPEC)
- p_str(p);
- else
- p_bre(p, OUT, OUT);
- EMIT(OEND, 0);
- g->laststate = THERE();
-
- /* tidy up loose ends and fill things in */
- categorize(p, g);
- stripsnug(p, g);
- findmust(p, g);
- /* only use Boyer-Moore algorithm if the pattern is bigger
- * than three characters
- */
- if(g->mlen > 3) {
- computejumps(p, g);
- computematchjumps(p, g);
- if(g->matchjump == NULL && g->charjump != NULL) {
- free(g->charjump);
- g->charjump = NULL;
- }
- }
- g->nplus = pluscount(p, g);
- g->magic = MAGIC2;
- preg->re_nsub = g->nsub;
- preg->re_g = g;
- preg->re_magic = MAGIC1;
-#ifndef REDEBUG
- /* not debugging, so can't rely on the assert() in regexec() */
- if (g->iflags&BAD)
- SETERROR(REG_ASSERT);
-#endif
-
- /* win or lose, we're done */
- if (p->error != 0) /* lose */
- regfree(preg);
- return(p->error);
-}
-
-/*
- - p_ere - ERE parser top level, concatenation and alternation
- == static void p_ere(struct parse *p, int stop);
- */
-static void
-p_ere(p, stop)
-struct parse *p;
-int stop; /* character this ERE should end at */
-{
- char c;
- sopno prevback;
- sopno prevfwd;
- sopno conc;
- int first = 1; /* is this the first alternative? */
-
- for (;;) {
- /* do a bunch of concatenated expressions */
- conc = HERE();
- while (MORE() && (c = PEEK()) != '|' && c != stop)
- p_ere_exp(p);
- (void)REQUIRE(HERE() != conc, REG_EMPTY); /* require nonempty */
-
- if (!EAT('|'))
- break; /* NOTE BREAK OUT */
-
- if (first) {
- INSERT(OCH_, conc); /* offset is wrong */
- prevfwd = conc;
- prevback = conc;
- first = 0;
- }
- ASTERN(OOR1, prevback);
- prevback = THERE();
- AHEAD(prevfwd); /* fix previous offset */
- prevfwd = HERE();
- EMIT(OOR2, 0); /* offset is very wrong */
- }
-
- if (!first) { /* tail-end fixups */
- AHEAD(prevfwd);
- ASTERN(O_CH, prevback);
- }
-
- assert(!MORE() || SEE(stop));
-}
-
-/*
- - p_ere_exp - parse one subERE, an atom possibly followed by a repetition op
- == static void p_ere_exp(struct parse *p);
- */
-static void
-p_ere_exp(p)
-struct parse *p;
-{
- char c;
- sopno pos;
- int count;
- int count2;
- sopno subno;
- int wascaret = 0;
-
- assert(MORE()); /* caller should have ensured this */
- c = GETNEXT();
-
- pos = HERE();
- switch (c) {
- case '(':
- (void)REQUIRE(MORE(), REG_EPAREN);
- p->g->nsub++;
- subno = p->g->nsub;
- if (subno < NPAREN)
- p->pbegin[subno] = HERE();
- EMIT(OLPAREN, subno);
- if (!SEE(')'))
- p_ere(p, ')');
- if (subno < NPAREN) {
- p->pend[subno] = HERE();
- assert(p->pend[subno] != 0);
- }
- EMIT(ORPAREN, subno);
- (void)MUSTEAT(')', REG_EPAREN);
- break;
-#ifndef POSIX_MISTAKE
- case ')': /* happens only if no current unmatched ( */
- /*
- * You may ask, why the ifndef? Because I didn't notice
- * this until slightly too late for 1003.2, and none of the
- * other 1003.2 regular-expression reviewers noticed it at
- * all. So an unmatched ) is legal POSIX, at least until
- * we can get it fixed.
- */
- SETERROR(REG_EPAREN);
- break;
-#endif
- case '^':
- EMIT(OBOL, 0);
- p->g->iflags |= USEBOL;
- p->g->nbol++;
- wascaret = 1;
- break;
- case '$':
- EMIT(OEOL, 0);
- p->g->iflags |= USEEOL;
- p->g->neol++;
- break;
- case '|':
- SETERROR(REG_EMPTY);
- break;
- case '*':
- case '+':
- case '?':
- SETERROR(REG_BADRPT);
- break;
- case '.':
- if (p->g->cflags&REG_NEWLINE)
- nonnewline(p);
- else
- EMIT(OANY, 0);
- break;
- case '[':
- p_bracket(p);
- break;
- case '\\':
- (void)REQUIRE(MORE(), REG_EESCAPE);
- c = GETNEXT();
- ordinary(p, c);
- break;
- case '{': /* okay as ordinary except if digit follows */
- (void)REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT);
- /* FALLTHROUGH */
- default:
- ordinary(p, c);
- break;
- }
-
- if (!MORE())
- return;
- c = PEEK();
- /* we call { a repetition if followed by a digit */
- if (!( c == '*' || c == '+' || c == '?' ||
- (c == '{' && MORE2() && isdigit((uch)PEEK2())) ))
- return; /* no repetition, we're done */
- NEXT();
-
- (void)REQUIRE(!wascaret, REG_BADRPT);
- switch (c) {
- case '*': /* implemented as +? */
- /* this case does not require the (y|) trick, noKLUDGE */
- INSERT(OPLUS_, pos);
- ASTERN(O_PLUS, pos);
- INSERT(OQUEST_, pos);
- ASTERN(O_QUEST, pos);
- break;
- case '+':
- INSERT(OPLUS_, pos);
- ASTERN(O_PLUS, pos);
- break;
- case '?':
- /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
- INSERT(OCH_, pos); /* offset slightly wrong */
- ASTERN(OOR1, pos); /* this one's right */
- AHEAD(pos); /* fix the OCH_ */
- EMIT(OOR2, 0); /* offset very wrong... */
- AHEAD(THERE()); /* ...so fix it */
- ASTERN(O_CH, THERETHERE());
- break;
- case '{':
- count = p_count(p);
- if (EAT(',')) {
- if (isdigit((uch)PEEK())) {
- count2 = p_count(p);
- (void)REQUIRE(count <= count2, REG_BADBR);
- } else /* single number with comma */
- count2 = INFINITY;
- } else /* just a single number */
- count2 = count;
- repeat(p, pos, count, count2);
- if (!EAT('}')) { /* error heuristics */
- while (MORE() && PEEK() != '}')
- NEXT();
- (void)REQUIRE(MORE(), REG_EBRACE);
- SETERROR(REG_BADBR);
- }
- break;
- }
-
- if (!MORE())
- return;
- c = PEEK();
- if (!( c == '*' || c == '+' || c == '?' ||
- (c == '{' && MORE2() && isdigit((uch)PEEK2())) ) )
- return;
- SETERROR(REG_BADRPT);
-}
-
-/*
- - p_str - string (no metacharacters) "parser"
- == static void p_str(struct parse *p);
- */
-static void
-p_str(p)
-struct parse *p;
-{
- (void)REQUIRE(MORE(), REG_EMPTY);
- while (MORE())
- ordinary(p, GETNEXT());
-}
-
-/*
- - p_bre - BRE parser top level, anchoring and concatenation
- == static void p_bre(struct parse *p, int end1, \
- == int end2);
- * Giving end1 as OUT essentially eliminates the end1/end2 check.
- *
- * This implementation is a bit of a kludge, in that a trailing $ is first
- * taken as an ordinary character and then revised to be an anchor. The
- * only undesirable side effect is that '$' gets included as a character
- * category in such cases. This is fairly harmless; not worth fixing.
- * The amount of lookahead needed to avoid this kludge is excessive.
- */
-static void
-p_bre(p, end1, end2)
-struct parse *p;
-int end1; /* first terminating character */
-int end2; /* second terminating character */
-{
- sopno start = HERE();
- int first = 1; /* first subexpression? */
- int wasdollar = 0;
-
- if (EAT('^')) {
- EMIT(OBOL, 0);
- p->g->iflags |= USEBOL;
- p->g->nbol++;
- }
- while (MORE() && !SEETWO(end1, end2)) {
- wasdollar = p_simp_re(p, first);
- first = 0;
- }
- if (wasdollar) { /* oops, that was a trailing anchor */
- DROP(1);
- EMIT(OEOL, 0);
- p->g->iflags |= USEEOL;
- p->g->neol++;
- }
-
- (void)REQUIRE(HERE() != start, REG_EMPTY); /* require nonempty */
-}
-
-/*
- - p_simp_re - parse a simple RE, an atom possibly followed by a repetition
- == static int p_simp_re(struct parse *p, int starordinary);
- */
-static int /* was the simple RE an unbackslashed $? */
-p_simp_re(p, starordinary)
-struct parse *p;
-int starordinary; /* is a leading * an ordinary character? */
-{
- int c;
- int count;
- int count2;
- sopno pos;
- int i;
- sopno subno;
-# define BACKSL (1<<CHAR_BIT)
-
- pos = HERE(); /* repetion op, if any, covers from here */
-
- assert(MORE()); /* caller should have ensured this */
- c = GETNEXT();
- if (c == '\\') {
- (void)REQUIRE(MORE(), REG_EESCAPE);
- c = BACKSL | GETNEXT();
- }
- switch (c) {
- case '.':
- if (p->g->cflags&REG_NEWLINE)
- nonnewline(p);
- else
- EMIT(OANY, 0);
- break;
- case '[':
- p_bracket(p);
- break;
- case BACKSL|'{':
- SETERROR(REG_BADRPT);
- break;
- case BACKSL|'(':
- p->g->nsub++;
- subno = p->g->nsub;
- if (subno < NPAREN)
- p->pbegin[subno] = HERE();
- EMIT(OLPAREN, subno);
- /* the MORE here is an error heuristic */
- if (MORE() && !SEETWO('\\', ')'))
- p_bre(p, '\\', ')');
- if (subno < NPAREN) {
- p->pend[subno] = HERE();
- assert(p->pend[subno] != 0);
- }
- EMIT(ORPAREN, subno);
- (void)REQUIRE(EATTWO('\\', ')'), REG_EPAREN);
- break;
- case BACKSL|')': /* should not get here -- must be user */
- case BACKSL|'}':
- SETERROR(REG_EPAREN);
- break;
- case BACKSL|'1':
- case BACKSL|'2':
- case BACKSL|'3':
- case BACKSL|'4':
- case BACKSL|'5':
- case BACKSL|'6':
- case BACKSL|'7':
- case BACKSL|'8':
- case BACKSL|'9':
- i = (c&~BACKSL) - '0';
- assert(i < NPAREN);
- if (p->pend[i] != 0) {
- assert(i <= p->g->nsub);
- EMIT(OBACK_, i);
- assert(p->pbegin[i] != 0);
- assert(OP(p->strip[p->pbegin[i]]) == OLPAREN);
- assert(OP(p->strip[p->pend[i]]) == ORPAREN);
- (void) dupl(p, p->pbegin[i]+1, p->pend[i]);
- EMIT(O_BACK, i);
- } else
- SETERROR(REG_ESUBREG);
- p->g->backrefs = 1;
- break;
- case '*':
- (void)REQUIRE(starordinary, REG_BADRPT);
- /* FALLTHROUGH */
- default:
- ordinary(p, (char)c);
- break;
- }
-
- if (EAT('*')) { /* implemented as +? */
- /* this case does not require the (y|) trick, noKLUDGE */
- INSERT(OPLUS_, pos);
- ASTERN(O_PLUS, pos);
- INSERT(OQUEST_, pos);
- ASTERN(O_QUEST, pos);
- } else if (EATTWO('\\', '{')) {
- count = p_count(p);
- if (EAT(',')) {
- if (MORE() && isdigit((uch)PEEK())) {
- count2 = p_count(p);
- (void)REQUIRE(count <= count2, REG_BADBR);
- } else /* single number with comma */
- count2 = INFINITY;
- } else /* just a single number */
- count2 = count;
- repeat(p, pos, count, count2);
- if (!EATTWO('\\', '}')) { /* error heuristics */
- while (MORE() && !SEETWO('\\', '}'))
- NEXT();
- (void)REQUIRE(MORE(), REG_EBRACE);
- SETERROR(REG_BADBR);
- }
- } else if (c == '$') /* $ (but not \$) ends it */
- return(1);
-
- return(0);
-}
-
-/*
- - p_count - parse a repetition count
- == static int p_count(struct parse *p);
- */
-static int /* the value */
-p_count(p)
-struct parse *p;
-{
- int count = 0;
- int ndigits = 0;
-
- while (MORE() && isdigit((uch)PEEK()) && count <= DUPMAX) {
- count = count*10 + (GETNEXT() - '0');
- ndigits++;
- }
-
- (void)REQUIRE(ndigits > 0 && count <= DUPMAX, REG_BADBR);
- return(count);
-}
-
-/*
- - p_bracket - parse a bracketed character list
- == static void p_bracket(struct parse *p);
- *
- * Note a significant property of this code: if the allocset() did SETERROR,
- * no set operations are done.
- */
-static void
-p_bracket(p)
-struct parse *p;
-{
- cset *cs = allocset(p);
- int invert = 0;
-
- /* Dept of Truly Sickening Special-Case Kludges */
- if (p->next + 5 < p->end && strncmp(p->next, "[:<:]]", 6) == 0) {
- EMIT(OBOW, 0);
- NEXTn(6);
- return;
- }
- if (p->next + 5 < p->end && strncmp(p->next, "[:>:]]", 6) == 0) {
- EMIT(OEOW, 0);
- NEXTn(6);
- return;
- }
-
- if (EAT('^'))
- invert++; /* make note to invert set at end */
- if (EAT(']'))
- CHadd(cs, ']');
- else if (EAT('-'))
- CHadd(cs, '-');
- while (MORE() && PEEK() != ']' && !SEETWO('-', ']'))
- p_b_term(p, cs);
- if (EAT('-'))
- CHadd(cs, '-');
- (void)MUSTEAT(']', REG_EBRACK);
-
- if (p->error != 0) /* don't mess things up further */
- return;
-
- if (p->g->cflags&REG_ICASE) {
- int i;
- int ci;
-
- for (i = p->g->csetsize - 1; i >= 0; i--)
- if (CHIN(cs, i) && isalpha(i)) {
- ci = othercase(i);
- if (ci != i)
- CHadd(cs, ci);
- }
- if (cs->multis != NULL)
- mccase(p, cs);
- }
- if (invert) {
- int i;
-
- for (i = p->g->csetsize - 1; i >= 0; i--)
- if (CHIN(cs, i))
- CHsub(cs, i);
- else
- CHadd(cs, i);
- if (p->g->cflags&REG_NEWLINE)
- CHsub(cs, '\n');
- if (cs->multis != NULL)
- mcinvert(p, cs);
- }
-
- assert(cs->multis == NULL); /* xxx */
-
- if (nch(p, cs) == 1) { /* optimize singleton sets */
- ordinary(p, firstch(p, cs));
- freeset(p, cs);
- } else
- EMIT(OANYOF, freezeset(p, cs));
-}
-
-/*
- - p_b_term - parse one term of a bracketed character list
- == static void p_b_term(struct parse *p, cset *cs);
- */
-static void
-p_b_term(p, cs)
-struct parse *p;
-cset *cs;
-{
- char c;
- char start, finish;
- int i;
-
- /* classify what we've got */
- switch ((MORE()) ? PEEK() : '\0') {
- case '[':
- c = (MORE2()) ? PEEK2() : '\0';
- break;
- case '-':
- SETERROR(REG_ERANGE);
- return; /* NOTE RETURN */
- break;
- default:
- c = '\0';
- break;
- }
-
- switch (c) {
- case ':': /* character class */
- NEXT2();
- (void)REQUIRE(MORE(), REG_EBRACK);
- c = PEEK();
- (void)REQUIRE(c != '-' && c != ']', REG_ECTYPE);
- p_b_cclass(p, cs);
- (void)REQUIRE(MORE(), REG_EBRACK);
- (void)REQUIRE(EATTWO(':', ']'), REG_ECTYPE);
- break;
- case '=': /* equivalence class */
- NEXT2();
- (void)REQUIRE(MORE(), REG_EBRACK);
- c = PEEK();
- (void)REQUIRE(c != '-' && c != ']', REG_ECOLLATE);
- p_b_eclass(p, cs);
- (void)REQUIRE(MORE(), REG_EBRACK);
- (void)REQUIRE(EATTWO('=', ']'), REG_ECOLLATE);
- break;
- default: /* symbol, ordinary character, or range */
-/* xxx revision needed for multichar stuff */
- start = p_b_symbol(p);
- if (SEE('-') && MORE2() && PEEK2() != ']') {
- /* range */
- NEXT();
- if (EAT('-'))
- finish = '-';
- else
- finish = p_b_symbol(p);
- } else
- finish = start;
- if (start == finish)
- CHadd(cs, start);
- else {
- if (__collate_load_error) {
- (void)REQUIRE((uch)start <= (uch)finish, REG_ERANGE);
- for (i = (uch)start; i <= (uch)finish; i++)
- CHadd(cs, i);
- } else {
- (void)REQUIRE(__collate_range_cmp(start, finish) <= 0, REG_ERANGE);
- for (i = CHAR_MIN; i <= CHAR_MAX; i++) {
- if ( __collate_range_cmp(start, i) <= 0
- && __collate_range_cmp(i, finish) <= 0
- )
- CHadd(cs, i);
- }
- }
- }
- break;
- }
-}
-
-/*
- - p_b_cclass - parse a character-class name and deal with it
- == static void p_b_cclass(struct parse *p, cset *cs);
- */
-static void
-p_b_cclass(p, cs)
-struct parse *p;
-cset *cs;
-{
- int c;
- char *sp = p->next;
- struct cclass *cp;
- size_t len;
-
- while (MORE() && isalpha((uch)PEEK()))
- NEXT();
- len = p->next - sp;
- for (cp = cclasses; cp->name != NULL; cp++)
- if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
- break;
- if (cp->name == NULL) {
- /* oops, didn't find it */
- SETERROR(REG_ECTYPE);
- return;
- }
-
- switch (cp->fidx) {
- case CALNUM:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isalnum((uch)c))
- CHadd(cs, c);
- break;
- case CALPHA:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isalpha((uch)c))
- CHadd(cs, c);
- break;
- case CBLANK:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isblank((uch)c))
- CHadd(cs, c);
- break;
- case CCNTRL:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (iscntrl((uch)c))
- CHadd(cs, c);
- break;
- case CDIGIT:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isdigit((uch)c))
- CHadd(cs, c);
- break;
- case CGRAPH:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isgraph((uch)c))
- CHadd(cs, c);
- break;
- case CLOWER:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (islower((uch)c))
- CHadd(cs, c);
- break;
- case CPRINT:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isprint((uch)c))
- CHadd(cs, c);
- break;
- case CPUNCT:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (ispunct((uch)c))
- CHadd(cs, c);
- break;
- case CSPACE:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isspace((uch)c))
- CHadd(cs, c);
- break;
- case CUPPER:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isupper((uch)c))
- CHadd(cs, c);
- break;
- case CXDIGIT:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isxdigit((uch)c))
- CHadd(cs, c);
- break;
- }
-#if 0
- for (u = cp->multis; *u != '\0'; u += strlen(u) + 1)
- MCadd(p, cs, u);
-#endif
-}
-
-/*
- - p_b_eclass - parse an equivalence-class name and deal with it
- == static void p_b_eclass(struct parse *p, cset *cs);
- *
- * This implementation is incomplete. xxx
- */
-static void
-p_b_eclass(p, cs)
-struct parse *p;
-cset *cs;
-{
- char c;
-
- c = p_b_coll_elem(p, '=');
- CHadd(cs, c);
-}
-
-/*
- - p_b_symbol - parse a character or [..]ed multicharacter collating symbol
- == static char p_b_symbol(struct parse *p);
- */
-static char /* value of symbol */
-p_b_symbol(p)
-struct parse *p;
-{
- char value;
-
- (void)REQUIRE(MORE(), REG_EBRACK);
- if (!EATTWO('[', '.'))
- return(GETNEXT());
-
- /* collating symbol */
- value = p_b_coll_elem(p, '.');
- (void)REQUIRE(EATTWO('.', ']'), REG_ECOLLATE);
- return(value);
-}
-
-/*
- - p_b_coll_elem - parse a collating-element name and look it up
- == static char p_b_coll_elem(struct parse *p, int endc);
- */
-static char /* value of collating element */
-p_b_coll_elem(p, endc)
-struct parse *p;
-int endc; /* name ended by endc,']' */
-{
- char *sp = p->next;
- struct cname *cp;
- int len;
-
- while (MORE() && !SEETWO(endc, ']'))
- NEXT();
- if (!MORE()) {
- SETERROR(REG_EBRACK);
- return(0);
- }
- len = p->next - sp;
- for (cp = cnames; cp->name != NULL; cp++)
- if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
- return(cp->code); /* known name */
- if (len == 1)
- return(*sp); /* single character */
- SETERROR(REG_ECOLLATE); /* neither */
- return(0);
-}
-
-/*
- - othercase - return the case counterpart of an alphabetic
- == static char othercase(int ch);
- */
-static char /* if no counterpart, return ch */
-othercase(ch)
-int ch;
-{
- ch = (uch)ch;
- assert(isalpha(ch));
- if (isupper(ch))
- return(tolower(ch));
- else if (islower(ch))
- return(toupper(ch));
- else /* peculiar, but could happen */
- return(ch);
-}
-
-/*
- - bothcases - emit a dualcase version of a two-case character
- == static void bothcases(struct parse *p, int ch);
- *
- * Boy, is this implementation ever a kludge...
- */
-static void
-bothcases(p, ch)
-struct parse *p;
-int ch;
-{
- char *oldnext = p->next;
- char *oldend = p->end;
- char bracket[3];
-
- ch = (uch)ch;
- assert(othercase(ch) != ch); /* p_bracket() would recurse */
- p->next = bracket;
- p->end = bracket+2;
- bracket[0] = ch;
- bracket[1] = ']';
- bracket[2] = '\0';
- p_bracket(p);
- assert(p->next == bracket+2);
- p->next = oldnext;
- p->end = oldend;
-}
-
-/*
- - ordinary - emit an ordinary character
- == static void ordinary(struct parse *p, int ch);
- */
-static void
-ordinary(p, ch)
-struct parse *p;
-int ch;
-{
- cat_t *cap = p->g->categories;
-
- if ((p->g->cflags&REG_ICASE) && isalpha((uch)ch) && othercase(ch) != ch)
- bothcases(p, ch);
- else {
- EMIT(OCHAR, (uch)ch);
- if (cap[ch] == 0)
- cap[ch] = p->g->ncategories++;
- }
-}
-
-/*
- - nonnewline - emit REG_NEWLINE version of OANY
- == static void nonnewline(struct parse *p);
- *
- * Boy, is this implementation ever a kludge...
- */
-static void
-nonnewline(p)
-struct parse *p;
-{
- char *oldnext = p->next;
- char *oldend = p->end;
- char bracket[4];
-
- p->next = bracket;
- p->end = bracket+3;
- bracket[0] = '^';
- bracket[1] = '\n';
- bracket[2] = ']';
- bracket[3] = '\0';
- p_bracket(p);
- assert(p->next == bracket+3);
- p->next = oldnext;
- p->end = oldend;
-}
-
-/*
- - repeat - generate code for a bounded repetition, recursively if needed
- == static void repeat(struct parse *p, sopno start, int from, int to);
- */
-static void
-repeat(p, start, from, to)
-struct parse *p;
-sopno start; /* operand from here to end of strip */
-int from; /* repeated from this number */
-int to; /* to this number of times (maybe INFINITY) */
-{
- sopno finish = HERE();
-# define N 2
-# define INF 3
-# define REP(f, t) ((f)*8 + (t))
-# define MAP(n) (((n) <= 1) ? (n) : ((n) == INFINITY) ? INF : N)
- sopno copy;
-
- if (p->error != 0) /* head off possible runaway recursion */
- return;
-
- assert(from <= to);
-
- switch (REP(MAP(from), MAP(to))) {
- case REP(0, 0): /* must be user doing this */
- DROP(finish-start); /* drop the operand */
- break;
- case REP(0, 1): /* as x{1,1}? */
- case REP(0, N): /* as x{1,n}? */
- case REP(0, INF): /* as x{1,}? */
- /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
- INSERT(OCH_, start); /* offset is wrong... */
- repeat(p, start+1, 1, to);
- ASTERN(OOR1, start);
- AHEAD(start); /* ... fix it */
- EMIT(OOR2, 0);
- AHEAD(THERE());
- ASTERN(O_CH, THERETHERE());
- break;
- case REP(1, 1): /* trivial case */
- /* done */
- break;
- case REP(1, N): /* as x?x{1,n-1} */
- /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
- INSERT(OCH_, start);
- ASTERN(OOR1, start);
- AHEAD(start);
- EMIT(OOR2, 0); /* offset very wrong... */
- AHEAD(THERE()); /* ...so fix it */
- ASTERN(O_CH, THERETHERE());
- copy = dupl(p, start+1, finish+1);
- assert(copy == finish+4);
- repeat(p, copy, 1, to-1);
- break;
- case REP(1, INF): /* as x+ */
- INSERT(OPLUS_, start);
- ASTERN(O_PLUS, start);
- break;
- case REP(N, N): /* as xx{m-1,n-1} */
- copy = dupl(p, start, finish);
- repeat(p, copy, from-1, to-1);
- break;
- case REP(N, INF): /* as xx{n-1,INF} */
- copy = dupl(p, start, finish);
- repeat(p, copy, from-1, to);
- break;
- default: /* "can't happen" */
- SETERROR(REG_ASSERT); /* just in case */
- break;
- }
-}
-
-/*
- - seterr - set an error condition
- == static int seterr(struct parse *p, int e);
- */
-static int /* useless but makes type checking happy */
-seterr(p, e)
-struct parse *p;
-int e;
-{
- if (p->error == 0) /* keep earliest error condition */
- p->error = e;
- p->next = nuls; /* try to bring things to a halt */
- p->end = nuls;
- return(0); /* make the return value well-defined */
-}
-
-/*
- - allocset - allocate a set of characters for []
- == static cset *allocset(struct parse *p);
- */
-static cset *
-allocset(p)
-struct parse *p;
-{
- int no = p->g->ncsets++;
- size_t nc;
- size_t nbytes;
- cset *cs;
- size_t css = (size_t)p->g->csetsize;
- int i;
-
- if (no >= p->ncsalloc) { /* need another column of space */
- p->ncsalloc += CHAR_BIT;
- nc = p->ncsalloc;
- assert(nc % CHAR_BIT == 0);
- nbytes = nc / CHAR_BIT * css;
- if (p->g->sets == NULL)
- p->g->sets = (cset *)malloc(nc * sizeof(cset));
- else
- p->g->sets = (cset *)reallocf((char *)p->g->sets,
- nc * sizeof(cset));
- if (p->g->setbits == NULL)
- p->g->setbits = (uch *)malloc(nbytes);
- else {
- p->g->setbits = (uch *)reallocf((char *)p->g->setbits,
- nbytes);
- /* xxx this isn't right if setbits is now NULL */
- for (i = 0; i < no; i++)
- p->g->sets[i].ptr = p->g->setbits + css*(i/CHAR_BIT);
- }
- if (p->g->sets != NULL && p->g->setbits != NULL)
- (void) memset((char *)p->g->setbits + (nbytes - css),
- 0, css);
- else {
- no = 0;
- SETERROR(REG_ESPACE);
- /* caller's responsibility not to do set ops */
- }
- }
-
- assert(p->g->sets != NULL); /* xxx */
- cs = &p->g->sets[no];
- cs->ptr = p->g->setbits + css*((no)/CHAR_BIT);
- cs->mask = 1 << ((no) % CHAR_BIT);
- cs->hash = 0;
- cs->smultis = 0;
- cs->multis = NULL;
-
- return(cs);
-}
-
-/*
- - freeset - free a now-unused set
- == static void freeset(struct parse *p, cset *cs);
- */
-static void
-freeset(p, cs)
-struct parse *p;
-cset *cs;
-{
- int i;
- cset *top = &p->g->sets[p->g->ncsets];
- size_t css = (size_t)p->g->csetsize;
-
- for (i = 0; i < css; i++)
- CHsub(cs, i);
- if (cs == top-1) /* recover only the easy case */
- p->g->ncsets--;
-}
-
-/*
- - freezeset - final processing on a set of characters
- == static int freezeset(struct parse *p, cset *cs);
- *
- * The main task here is merging identical sets. This is usually a waste
- * of time (although the hash code minimizes the overhead), but can win
- * big if REG_ICASE is being used. REG_ICASE, by the way, is why the hash
- * is done using addition rather than xor -- all ASCII [aA] sets xor to
- * the same value!
- */
-static int /* set number */
-freezeset(p, cs)
-struct parse *p;
-cset *cs;
-{
- short h = cs->hash;
- int i;
- cset *top = &p->g->sets[p->g->ncsets];
- cset *cs2;
- size_t css = (size_t)p->g->csetsize;
-
- /* look for an earlier one which is the same */
- for (cs2 = &p->g->sets[0]; cs2 < top; cs2++)
- if (cs2->hash == h && cs2 != cs) {
- /* maybe */
- for (i = 0; i < css; i++)
- if (!!CHIN(cs2, i) != !!CHIN(cs, i))
- break; /* no */
- if (i == css)
- break; /* yes */
- }
-
- if (cs2 < top) { /* found one */
- freeset(p, cs);
- cs = cs2;
- }
-
- return((int)(cs - p->g->sets));
-}
-
-/*
- - firstch - return first character in a set (which must have at least one)
- == static int firstch(struct parse *p, cset *cs);
- */
-static int /* character; there is no "none" value */
-firstch(p, cs)
-struct parse *p;
-cset *cs;
-{
- int i;
- size_t css = (size_t)p->g->csetsize;
-
- for (i = 0; i < css; i++)
- if (CHIN(cs, i))
- return((char)i);
- assert(never);
- return(0); /* arbitrary */
-}
-
-/*
- - nch - number of characters in a set
- == static int nch(struct parse *p, cset *cs);
- */
-static int
-nch(p, cs)
-struct parse *p;
-cset *cs;
-{
- int i;
- size_t css = (size_t)p->g->csetsize;
- int n = 0;
-
- for (i = 0; i < css; i++)
- if (CHIN(cs, i))
- n++;
- return(n);
-}
-
-/*
- - mcadd - add a collating element to a cset
- == static void mcadd(struct parse *p, cset *cs, \
- == char *cp);
- */
-static void
-mcadd(p, cs, cp)
-struct parse *p;
-cset *cs;
-char *cp;
-{
- size_t oldend = cs->smultis;
-
- cs->smultis += strlen(cp) + 1;
- if (cs->multis == NULL)
- cs->multis = malloc(cs->smultis);
- else
- cs->multis = reallocf(cs->multis, cs->smultis);
- if (cs->multis == NULL) {
- SETERROR(REG_ESPACE);
- return;
- }
-
- (void) strcpy(cs->multis + oldend - 1, cp);
- cs->multis[cs->smultis - 1] = '\0';
-}
-
-#if used
-/*
- - mcsub - subtract a collating element from a cset
- == static void mcsub(cset *cs, char *cp);
- */
-static void
-mcsub(cs, cp)
-cset *cs;
-char *cp;
-{
- char *fp = mcfind(cs, cp);
- size_t len = strlen(fp);
-
- assert(fp != NULL);
- (void) memmove(fp, fp + len + 1,
- cs->smultis - (fp + len + 1 - cs->multis));
- cs->smultis -= len;
-
- if (cs->smultis == 0) {
- free(cs->multis);
- cs->multis = NULL;
- return;
- }
-
- cs->multis = reallocf(cs->multis, cs->smultis);
- assert(cs->multis != NULL);
-}
-
-/*
- - mcin - is a collating element in a cset?
- == static int mcin(cset *cs, char *cp);
- */
-static int
-mcin(cs, cp)
-cset *cs;
-char *cp;
-{
- return(mcfind(cs, cp) != NULL);
-}
-
-/*
- - mcfind - find a collating element in a cset
- == static char *mcfind(cset *cs, char *cp);
- */
-static char *
-mcfind(cs, cp)
-cset *cs;
-char *cp;
-{
- char *p;
-
- if (cs->multis == NULL)
- return(NULL);
- for (p = cs->multis; *p != '\0'; p += strlen(p) + 1)
- if (strcmp(cp, p) == 0)
- return(p);
- return(NULL);
-}
-#endif
-
-/*
- - mcinvert - invert the list of collating elements in a cset
- == static void mcinvert(struct parse *p, cset *cs);
- *
- * This would have to know the set of possibilities. Implementation
- * is deferred.
- */
-static void
-mcinvert(p, cs)
-struct parse *p;
-cset *cs;
-{
- assert(cs->multis == NULL); /* xxx */
-}
-
-/*
- - mccase - add case counterparts of the list of collating elements in a cset
- == static void mccase(struct parse *p, cset *cs);
- *
- * This would have to know the set of possibilities. Implementation
- * is deferred.
- */
-static void
-mccase(p, cs)
-struct parse *p;
-cset *cs;
-{
- assert(cs->multis == NULL); /* xxx */
-}
-
-/*
- - isinsets - is this character in any sets?
- == static int isinsets(struct re_guts *g, int c);
- */
-static int /* predicate */
-isinsets(g, c)
-struct re_guts *g;
-int c;
-{
- uch *col;
- int i;
- int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
- unsigned uc = (uch)c;
-
- for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
- if (col[uc] != 0)
- return(1);
- return(0);
-}
-
-/*
- - samesets - are these two characters in exactly the same sets?
- == static int samesets(struct re_guts *g, int c1, int c2);
- */
-static int /* predicate */
-samesets(g, c1, c2)
-struct re_guts *g;
-int c1;
-int c2;
-{
- uch *col;
- int i;
- int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
- unsigned uc1 = (uch)c1;
- unsigned uc2 = (uch)c2;
-
- for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
- if (col[uc1] != col[uc2])
- return(0);
- return(1);
-}
-
-/*
- - categorize - sort out character categories
- == static void categorize(struct parse *p, struct re_guts *g);
- */
-static void
-categorize(p, g)
-struct parse *p;
-struct re_guts *g;
-{
- cat_t *cats = g->categories;
- int c;
- int c2;
- cat_t cat;
-
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (cats[c] == 0 && isinsets(g, c)) {
- cat = g->ncategories++;
- cats[c] = cat;
- for (c2 = c+1; c2 <= CHAR_MAX; c2++)
- if (cats[c2] == 0 && samesets(g, c, c2))
- cats[c2] = cat;
- }
-}
-
-/*
- - dupl - emit a duplicate of a bunch of sops
- == static sopno dupl(struct parse *p, sopno start, sopno finish);
- */
-static sopno /* start of duplicate */
-dupl(p, start, finish)
-struct parse *p;
-sopno start; /* from here */
-sopno finish; /* to this less one */
-{
- sopno ret = HERE();
- sopno len = finish - start;
-
- assert(finish >= start);
- if (len == 0)
- return(ret);
- enlarge(p, p->ssize + len); /* this many unexpected additions */
- assert(p->ssize >= p->slen + len);
- (void) memcpy((char *)(p->strip + p->slen),
- (char *)(p->strip + start), (size_t)len*sizeof(sop));
- p->slen += len;
- return(ret);
-}
-
-/*
- - doemit - emit a strip operator
- == static void doemit(struct parse *p, sop op, size_t opnd);
- *
- * It might seem better to implement this as a macro with a function as
- * hard-case backup, but it's just too big and messy unless there are
- * some changes to the data structures. Maybe later.
- */
-static void
-doemit(p, op, opnd)
-struct parse *p;
-sop op;
-size_t opnd;
-{
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- /* deal with oversize operands ("can't happen", more or less) */
- assert(opnd < 1<<OPSHIFT);
-
- /* deal with undersized strip */
- if (p->slen >= p->ssize)
- enlarge(p, (p->ssize+1) / 2 * 3); /* +50% */
- assert(p->slen < p->ssize);
-
- /* finally, it's all reduced to the easy case */
- p->strip[p->slen++] = SOP(op, opnd);
-}
-
-/*
- - doinsert - insert a sop into the strip
- == static void doinsert(struct parse *p, sop op, size_t opnd, sopno pos);
- */
-static void
-doinsert(p, op, opnd, pos)
-struct parse *p;
-sop op;
-size_t opnd;
-sopno pos;
-{
- sopno sn;
- sop s;
- int i;
-
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- sn = HERE();
- EMIT(op, opnd); /* do checks, ensure space */
- assert(HERE() == sn+1);
- s = p->strip[sn];
-
- /* adjust paren pointers */
- assert(pos > 0);
- for (i = 1; i < NPAREN; i++) {
- if (p->pbegin[i] >= pos) {
- p->pbegin[i]++;
- }
- if (p->pend[i] >= pos) {
- p->pend[i]++;
- }
- }
-
- memmove((char *)&p->strip[pos+1], (char *)&p->strip[pos],
- (HERE()-pos-1)*sizeof(sop));
- p->strip[pos] = s;
-}
-
-/*
- - dofwd - complete a forward reference
- == static void dofwd(struct parse *p, sopno pos, sop value);
- */
-static void
-dofwd(p, pos, value)
-struct parse *p;
-sopno pos;
-sop value;
-{
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- assert(value < 1<<OPSHIFT);
- p->strip[pos] = OP(p->strip[pos]) | value;
-}
-
-/*
- - enlarge - enlarge the strip
- == static void enlarge(struct parse *p, sopno size);
- */
-static void
-enlarge(p, size)
-struct parse *p;
-sopno size;
-{
- sop *sp;
-
- if (p->ssize >= size)
- return;
-
- sp = (sop *)realloc(p->strip, size*sizeof(sop));
- if (sp == NULL) {
- SETERROR(REG_ESPACE);
- return;
- }
- p->strip = sp;
- p->ssize = size;
-}
-
-/*
- - stripsnug - compact the strip
- == static void stripsnug(struct parse *p, struct re_guts *g);
- */
-static void
-stripsnug(p, g)
-struct parse *p;
-struct re_guts *g;
-{
- g->nstates = p->slen;
- g->strip = (sop *)realloc((char *)p->strip, p->slen * sizeof(sop));
- if (g->strip == NULL) {
- SETERROR(REG_ESPACE);
- g->strip = p->strip;
- }
-}
-
-/*
- - findmust - fill in must and mlen with longest mandatory literal string
- == static void findmust(struct parse *p, struct re_guts *g);
- *
- * This algorithm could do fancy things like analyzing the operands of |
- * for common subsequences. Someday. This code is simple and finds most
- * of the interesting cases.
- *
- * Note that must and mlen got initialized during setup.
- */
-static void
-findmust(p, g)
-struct parse *p;
-struct re_guts *g;
-{
- sop *scan;
- sop *start;
- sop *newstart;
- sopno newlen;
- sop s;
- char *cp;
- sopno i;
- int offset;
- int cs, mccs;
-
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- /* Find out if we can handle OANYOF or not */
- mccs = 0;
- for (cs = 0; cs < g->ncsets; cs++)
- if (g->sets[cs].multis != NULL)
- mccs = 1;
-
- /* find the longest OCHAR sequence in strip */
- newlen = 0;
- offset = 0;
- g->moffset = 0;
- scan = g->strip + 1;
- do {
- s = *scan++;
- switch (OP(s)) {
- case OCHAR: /* sequence member */
- if (newlen == 0) /* new sequence */
- newstart = scan - 1;
- newlen++;
- break;
- case OPLUS_: /* things that don't break one */
- case OLPAREN:
- case ORPAREN:
- break;
- case OQUEST_: /* things that must be skipped */
- case OCH_:
- offset = altoffset(scan, offset, mccs);
- scan--;
- do {
- scan += OPND(s);
- s = *scan;
- /* assert() interferes w debug printouts */
- if (OP(s) != O_QUEST && OP(s) != O_CH &&
- OP(s) != OOR2) {
- g->iflags |= BAD;
- return;
- }
- } while (OP(s) != O_QUEST && OP(s) != O_CH);
- /* fallthrough */
- case OBOW: /* things that break a sequence */
- case OEOW:
- case OBOL:
- case OEOL:
- case O_QUEST:
- case O_CH:
- case OEND:
- if (newlen > g->mlen) { /* ends one */
- start = newstart;
- g->mlen = newlen;
- if (offset > -1) {
- g->moffset += offset;
- offset = newlen;
- } else
- g->moffset = offset;
- } else {
- if (offset > -1)
- offset += newlen;
- }
- newlen = 0;
- break;
- case OANY:
- if (newlen > g->mlen) { /* ends one */
- start = newstart;
- g->mlen = newlen;
- if (offset > -1) {
- g->moffset += offset;
- offset = newlen;
- } else
- g->moffset = offset;
- } else {
- if (offset > -1)
- offset += newlen;
- }
- if (offset > -1)
- offset++;
- newlen = 0;
- break;
- case OANYOF: /* may or may not invalidate offset */
- /* First, everything as OANY */
- if (newlen > g->mlen) { /* ends one */
- start = newstart;
- g->mlen = newlen;
- if (offset > -1) {
- g->moffset += offset;
- offset = newlen;
- } else
- g->moffset = offset;
- } else {
- if (offset > -1)
- offset += newlen;
- }
- if (offset > -1)
- offset++;
- newlen = 0;
- /* And, now, if we found out we can't deal with
- * it, make offset = -1.
- */
- if (mccs)
- offset = -1;
- break;
- default:
- /* Anything here makes it impossible or too hard
- * to calculate the offset -- so we give up;
- * save the last known good offset, in case the
- * must sequence doesn't occur later.
- */
- if (newlen > g->mlen) { /* ends one */
- start = newstart;
- g->mlen = newlen;
- if (offset > -1)
- g->moffset += offset;
- else
- g->moffset = offset;
- }
- offset = -1;
- newlen = 0;
- break;
- }
- } while (OP(s) != OEND);
-
- if (g->mlen == 0) { /* there isn't one */
- g->moffset = -1;
- return;
- }
-
- /* turn it into a character string */
- g->must = malloc((size_t)g->mlen + 1);
- if (g->must == NULL) { /* argh; just forget it */
- g->mlen = 0;
- g->moffset = -1;
- return;
- }
- cp = g->must;
- scan = start;
- for (i = g->mlen; i > 0; i--) {
- while (OP(s = *scan++) != OCHAR)
- continue;
- assert(cp < g->must + g->mlen);
- *cp++ = (char)OPND(s);
- }
- assert(cp == g->must + g->mlen);
- *cp++ = '\0'; /* just on general principles */
-}
-
-/*
- - altoffset - choose biggest offset among multiple choices
- == static int altoffset(sop *scan, int offset, int mccs);
- *
- * Compute, recursively if necessary, the largest offset among multiple
- * re paths.
- */
-static int
-altoffset(scan, offset, mccs)
-sop *scan;
-int offset;
-int mccs;
-{
- int largest;
- int try;
- sop s;
-
- /* If we gave up already on offsets, return */
- if (offset == -1)
- return -1;
-
- largest = 0;
- try = 0;
- s = *scan++;
- while (OP(s) != O_QUEST && OP(s) != O_CH) {
- switch (OP(s)) {
- case OOR1:
- if (try > largest)
- largest = try;
- try = 0;
- break;
- case OQUEST_:
- case OCH_:
- try = altoffset(scan, try, mccs);
- if (try == -1)
- return -1;
- scan--;
- do {
- scan += OPND(s);
- s = *scan;
- if (OP(s) != O_QUEST && OP(s) != O_CH &&
- OP(s) != OOR2)
- return -1;
- } while (OP(s) != O_QUEST && OP(s) != O_CH);
- /* We must skip to the next position, or we'll
- * leave altoffset() too early.
- */
- scan++;
- break;
- case OANYOF:
- if (mccs)
- return -1;
- case OCHAR:
- case OANY:
- try++;
- case OBOW:
- case OEOW:
- case OLPAREN:
- case ORPAREN:
- case OOR2:
- break;
- default:
- try = -1;
- break;
- }
- if (try == -1)
- return -1;
- s = *scan++;
- }
-
- if (try > largest)
- largest = try;
-
- return largest+offset;
-}
-
-/*
- - computejumps - compute char jumps for BM scan
- == static void computejumps(struct parse *p, struct re_guts *g);
- *
- * This algorithm assumes g->must exists and is has size greater than
- * zero. It's based on the algorithm found on Computer Algorithms by
- * Sara Baase.
- *
- * A char jump is the number of characters one needs to jump based on
- * the value of the character from the text that was mismatched.
- */
-static void
-computejumps(p, g)
-struct parse *p;
-struct re_guts *g;
-{
- int ch;
- int mindex;
-
- /* Avoid making errors worse */
- if (p->error != 0)
- return;
-
- g->charjump = (int*) malloc((NC + 1) * sizeof(int));
- if (g->charjump == NULL) /* Not a fatal error */
- return;
- /* Adjust for signed chars, if necessary */
- g->charjump = &g->charjump[-(CHAR_MIN)];
-
- /* If the character does not exist in the pattern, the jump
- * is equal to the number of characters in the pattern.
- */
- for (ch = CHAR_MIN; ch < (CHAR_MAX + 1); ch++)
- g->charjump[ch] = g->mlen;
-
- /* If the character does exist, compute the jump that would
- * take us to the last character in the pattern equal to it
- * (notice that we match right to left, so that last character
- * is the first one that would be matched).
- */
- for (mindex = 0; mindex < g->mlen; mindex++)
- g->charjump[g->must[mindex]] = g->mlen - mindex - 1;
-}
-
-/*
- - computematchjumps - compute match jumps for BM scan
- == static void computematchjumps(struct parse *p, struct re_guts *g);
- *
- * This algorithm assumes g->must exists and is has size greater than
- * zero. It's based on the algorithm found on Computer Algorithms by
- * Sara Baase.
- *
- * A match jump is the number of characters one needs to advance based
- * on the already-matched suffix.
- * Notice that all values here are minus (g->mlen-1), because of the way
- * the search algorithm works.
- */
-static void
-computematchjumps(p, g)
-struct parse *p;
-struct re_guts *g;
-{
- int mindex; /* General "must" iterator */
- int suffix; /* Keeps track of matching suffix */
- int ssuffix; /* Keeps track of suffixes' suffix */
- int* pmatches; /* pmatches[k] points to the next i
- * such that i+1...mlen is a substring
- * of k+1...k+mlen-i-1
- */
-
- /* Avoid making errors worse */
- if (p->error != 0)
- return;
-
- pmatches = (int*) malloc(g->mlen * sizeof(unsigned int));
- if (pmatches == NULL) {
- g->matchjump = NULL;
- return;
- }
-
- g->matchjump = (int*) malloc(g->mlen * sizeof(unsigned int));
- if (g->matchjump == NULL) /* Not a fatal error */
- return;
-
- /* Set maximum possible jump for each character in the pattern */
- for (mindex = 0; mindex < g->mlen; mindex++)
- g->matchjump[mindex] = 2*g->mlen - mindex - 1;
-
- /* Compute pmatches[] */
- for (mindex = g->mlen - 1, suffix = g->mlen; mindex >= 0;
- mindex--, suffix--) {
- pmatches[mindex] = suffix;
-
- /* If a mismatch is found, interrupting the substring,
- * compute the matchjump for that position. If no
- * mismatch is found, then a text substring mismatched
- * against the suffix will also mismatch against the
- * substring.
- */
- while (suffix < g->mlen
- && g->must[mindex] != g->must[suffix]) {
- g->matchjump[suffix] = MIN(g->matchjump[suffix],
- g->mlen - mindex - 1);
- suffix = pmatches[suffix];
- }
- }
-
- /* Compute the matchjump up to the last substring found to jump
- * to the beginning of the largest must pattern prefix matching
- * it's own suffix.
- */
- for (mindex = 0; mindex <= suffix; mindex++)
- g->matchjump[mindex] = MIN(g->matchjump[mindex],
- g->mlen + suffix - mindex);
-
- ssuffix = pmatches[suffix];
- while (suffix < g->mlen) {
- while (suffix <= ssuffix && suffix < g->mlen) {
- g->matchjump[suffix] = MIN(g->matchjump[suffix],
- g->mlen + ssuffix - suffix);
- suffix++;
- }
- if (suffix < g->mlen)
- ssuffix = pmatches[ssuffix];
- }
-
- free(pmatches);
-}
-
-/*
- - pluscount - count + nesting
- == static sopno pluscount(struct parse *p, struct re_guts *g);
- */
-static sopno /* nesting depth */
-pluscount(p, g)
-struct parse *p;
-struct re_guts *g;
-{
- sop *scan;
- sop s;
- sopno plusnest = 0;
- sopno maxnest = 0;
-
- if (p->error != 0)
- return(0); /* there may not be an OEND */
-
- scan = g->strip + 1;
- do {
- s = *scan++;
- switch (OP(s)) {
- case OPLUS_:
- plusnest++;
- break;
- case O_PLUS:
- if (plusnest > maxnest)
- maxnest = plusnest;
- plusnest--;
- break;
- }
- } while (OP(s) != OEND);
- if (plusnest != 0)
- g->iflags |= BAD;
- return(maxnest);
-}
diff --git a/newlib/libc/sys/linux/stdlib/regerror.c b/newlib/libc/sys/linux/stdlib/regerror.c
deleted file mode 100644
index 66b1e5256..000000000
--- a/newlib/libc/sys/linux/stdlib/regerror.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regerror.c 8.4 (Berkeley) 3/20/94
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)regerror.c 8.4 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/regex/regerror.c,v 1.7 2002/03/21 22:48:00 obrien Exp $");
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <regex.h>
-
-#include "utils.h"
-
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === regerror.c === */
-static char *regatoi(const regex_t *preg, char *localbuf);
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
-/*
- = #define REG_NOMATCH 1
- = #define REG_BADPAT 2
- = #define REG_ECOLLATE 3
- = #define REG_ECTYPE 4
- = #define REG_EESCAPE 5
- = #define REG_ESUBREG 6
- = #define REG_EBRACK 7
- = #define REG_EPAREN 8
- = #define REG_EBRACE 9
- = #define REG_BADBR 10
- = #define REG_ERANGE 11
- = #define REG_ESPACE 12
- = #define REG_BADRPT 13
- = #define REG_EMPTY 14
- = #define REG_ASSERT 15
- = #define REG_INVARG 16
- = #define REG_ATOI 255 // convert name to number (!)
- = #define REG_ITOA 0400 // convert number to name (!)
- */
-static struct rerr {
- int code;
- char *name;
- char *explain;
-} rerrs[] = {
- {REG_NOMATCH, "REG_NOMATCH", "regexec() failed to match"},
- {REG_BADPAT, "REG_BADPAT", "invalid regular expression"},
- {REG_ECOLLATE, "REG_ECOLLATE", "invalid collating element"},
- {REG_ECTYPE, "REG_ECTYPE", "invalid character class"},
- {REG_EESCAPE, "REG_EESCAPE", "trailing backslash (\\)"},
- {REG_ESUBREG, "REG_ESUBREG", "invalid backreference number"},
- {REG_EBRACK, "REG_EBRACK", "brackets ([ ]) not balanced"},
- {REG_EPAREN, "REG_EPAREN", "parentheses not balanced"},
- {REG_EBRACE, "REG_EBRACE", "braces not balanced"},
- {REG_BADBR, "REG_BADBR", "invalid repetition count(s)"},
- {REG_ERANGE, "REG_ERANGE", "invalid character range"},
- {REG_ESPACE, "REG_ESPACE", "out of memory"},
- {REG_BADRPT, "REG_BADRPT", "repetition-operator operand invalid"},
- {REG_EMPTY, "REG_EMPTY", "empty (sub)expression"},
- {REG_ASSERT, "REG_ASSERT", "\"can't happen\" -- you found a bug"},
- {REG_INVARG, "REG_INVARG", "invalid argument to regex routine"},
- {0, "", "*** unknown regexp error code ***"}
-};
-
-/*
- - regerror - the interface to error numbers
- = extern size_t regerror(int, const regex_t *, char *, size_t);
- */
-/* ARGSUSED */
-size_t
-regerror(errcode, preg, errbuf, errbuf_size)
-int errcode;
-const regex_t *preg;
-char *errbuf;
-size_t errbuf_size;
-{
- struct rerr *r;
- size_t len;
- int target = errcode &~ REG_ITOA;
- char *s;
- char convbuf[50];
-
- if (errcode == REG_ATOI)
- s = regatoi(preg, convbuf);
- else {
- for (r = rerrs; r->code != 0; r++)
- if (r->code == target)
- break;
-
- if (errcode&REG_ITOA) {
- if (r->code != 0)
- (void) strcpy(convbuf, r->name);
- else
- sprintf(convbuf, "REG_0x%x", target);
- assert(strlen(convbuf) < sizeof(convbuf));
- s = convbuf;
- } else
- s = r->explain;
- }
-
- len = strlen(s) + 1;
- if (errbuf_size > 0) {
- if (errbuf_size > len)
- (void) strcpy(errbuf, s);
- else {
- (void) strncpy(errbuf, s, errbuf_size-1);
- errbuf[errbuf_size-1] = '\0';
- }
- }
-
- return(len);
-}
-
-/*
- - regatoi - internal routine to implement REG_ATOI
- == static char *regatoi(const regex_t *preg, char *localbuf);
- */
-static char *
-regatoi(preg, localbuf)
-const regex_t *preg;
-char *localbuf;
-{
- struct rerr *r;
-
- for (r = rerrs; r->code != 0; r++)
- if (strcmp(r->name, preg->re_endp) == 0)
- break;
- if (r->code == 0)
- return("0");
-
- sprintf(localbuf, "%d", r->code);
- return(localbuf);
-}
diff --git a/newlib/libc/sys/linux/stdlib/regex.3 b/newlib/libc/sys/linux/stdlib/regex.3
deleted file mode 100644
index d87164177..000000000
--- a/newlib/libc/sys/linux/stdlib/regex.3
+++ /dev/null
@@ -1,701 +0,0 @@
-.\" Copyright (c) 1992, 1993, 1994 Henry Spencer.
-.\" Copyright (c) 1992, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Henry Spencer.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)regex.3 8.4 (Berkeley) 3/20/94
-.\" $FreeBSD: src/lib/libc/regex/regex.3,v 1.9 2001/10/01 16:08:58 ru Exp $
-.\"
-.Dd March 20, 1994
-.Dt REGEX 3
-.Os
-.Sh NAME
-.Nm regcomp ,
-.Nm regexec ,
-.Nm regerror ,
-.Nm regfree
-.Nd regular-expression library
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In sys/types.h
-.In regex.h
-.Ft int
-.Fn regcomp "regex_t *preg" "const char *pattern" "int cflags"
-.Ft int
-.Fo regexec
-.Fa "const regex_t *preg" "const char *string"
-.Fa "size_t nmatch" "regmatch_t pmatch[]" "int eflags"
-.Fc
-.Ft size_t
-.Fo regerror
-.Fa "int errcode" "const regex_t *preg"
-.Fa "char *errbuf" "size_t errbuf_size"
-.Fc
-.Ft void
-.Fn regfree "regex_t *preg"
-.Sh DESCRIPTION
-These routines implement
-.St -p1003.2
-regular expressions
-.Pq Do RE Dc Ns s ;
-see
-.Xr re_format 7 .
-.Fn Regcomp
-compiles an RE written as a string into an internal form,
-.Fn regexec
-matches that internal form against a string and reports results,
-.Fn regerror
-transforms error codes from either into human-readable messages,
-and
-.Fn regfree
-frees any dynamically-allocated storage used by the internal form
-of an RE.
-.Pp
-The header
-.Aq Pa regex.h
-declares two structure types,
-.Ft regex_t
-and
-.Ft regmatch_t ,
-the former for compiled internal forms and the latter for match reporting.
-It also declares the four functions,
-a type
-.Ft regoff_t ,
-and a number of constants with names starting with
-.Dq Dv REG_ .
-.Pp
-.Fn Regcomp
-compiles the regular expression contained in the
-.Fa pattern
-string,
-subject to the flags in
-.Fa cflags ,
-and places the results in the
-.Ft regex_t
-structure pointed to by
-.Fa preg .
-.Fa Cflags
-is the bitwise OR of zero or more of the following flags:
-.Bl -tag -width REG_EXTENDED
-.It Dv REG_EXTENDED
-Compile modern
-.Pq Dq extended
-REs,
-rather than the obsolete
-.Pq Dq basic
-REs that
-are the default.
-.It Dv REG_BASIC
-This is a synonym for 0,
-provided as a counterpart to
-.Dv REG_EXTENDED
-to improve readability.
-.It Dv REG_NOSPEC
-Compile with recognition of all special characters turned off.
-All characters are thus considered ordinary,
-so the
-.Dq RE
-is a literal string.
-This is an extension,
-compatible with but not specified by
-.St -p1003.2 ,
-and should be used with
-caution in software intended to be portable to other systems.
-.Dv REG_EXTENDED
-and
-.Dv REG_NOSPEC
-may not be used
-in the same call to
-.Fn regcomp .
-.It Dv REG_ICASE
-Compile for matching that ignores upper/lower case distinctions.
-See
-.Xr re_format 7 .
-.It Dv REG_NOSUB
-Compile for matching that need only report success or failure,
-not what was matched.
-.It Dv REG_NEWLINE
-Compile for newline-sensitive matching.
-By default, newline is a completely ordinary character with no special
-meaning in either REs or strings.
-With this flag,
-.Ql [^
-bracket expressions and
-.Ql .\&
-never match newline,
-a
-.Ql ^\&
-anchor matches the null string after any newline in the string
-in addition to its normal function,
-and the
-.Ql $\&
-anchor matches the null string before any newline in the
-string in addition to its normal function.
-.It Dv REG_PEND
-The regular expression ends,
-not at the first NUL,
-but just before the character pointed to by the
-.Va re_endp
-member of the structure pointed to by
-.Fa preg .
-The
-.Va re_endp
-member is of type
-.Ft "const char *" .
-This flag permits inclusion of NULs in the RE;
-they are considered ordinary characters.
-This is an extension,
-compatible with but not specified by
-.St -p1003.2 ,
-and should be used with
-caution in software intended to be portable to other systems.
-.El
-.Pp
-When successful,
-.Fn regcomp
-returns 0 and fills in the structure pointed to by
-.Fa preg .
-One member of that structure
-(other than
-.Va re_endp )
-is publicized:
-.Va re_nsub ,
-of type
-.Ft size_t ,
-contains the number of parenthesized subexpressions within the RE
-(except that the value of this member is undefined if the
-.Dv REG_NOSUB
-flag was used).
-If
-.Fn regcomp
-fails, it returns a non-zero error code;
-see
-.Sx DIAGNOSTICS .
-.Pp
-.Fn Regexec
-matches the compiled RE pointed to by
-.Fa preg
-against the
-.Fa string ,
-subject to the flags in
-.Fa eflags ,
-and reports results using
-.Fa nmatch ,
-.Fa pmatch ,
-and the returned value.
-The RE must have been compiled by a previous invocation of
-.Fn regcomp .
-The compiled form is not altered during execution of
-.Fn regexec ,
-so a single compiled RE can be used simultaneously by multiple threads.
-.Pp
-By default,
-the NUL-terminated string pointed to by
-.Fa string
-is considered to be the text of an entire line, minus any terminating
-newline.
-The
-.Fa eflags
-argument is the bitwise OR of zero or more of the following flags:
-.Bl -tag -width REG_STARTEND
-.It Dv REG_NOTBOL
-The first character of
-the string
-is not the beginning of a line, so the
-.Ql ^\&
-anchor should not match before it.
-This does not affect the behavior of newlines under
-.Dv REG_NEWLINE .
-.It Dv REG_NOTEOL
-The NUL terminating
-the string
-does not end a line, so the
-.Ql $\&
-anchor should not match before it.
-This does not affect the behavior of newlines under
-.Dv REG_NEWLINE .
-.It Dv REG_STARTEND
-The string is considered to start at
-.Fa string
-+
-.Fa pmatch Ns [0]. Ns Va rm_so
-and to have a terminating NUL located at
-.Fa string
-+
-.Fa pmatch Ns [0]. Ns Va rm_eo
-(there need not actually be a NUL at that location),
-regardless of the value of
-.Fa nmatch .
-See below for the definition of
-.Fa pmatch
-and
-.Fa nmatch .
-This is an extension,
-compatible with but not specified by
-.St -p1003.2 ,
-and should be used with
-caution in software intended to be portable to other systems.
-Note that a non-zero
-.Va rm_so
-does not imply
-.Dv REG_NOTBOL ;
-.Dv REG_STARTEND
-affects only the location of the string,
-not how it is matched.
-.El
-.Pp
-See
-.Xr re_format 7
-for a discussion of what is matched in situations where an RE or a
-portion thereof could match any of several substrings of
-.Fa string .
-.Pp
-Normally,
-.Fn regexec
-returns 0 for success and the non-zero code
-.Dv REG_NOMATCH
-for failure.
-Other non-zero error codes may be returned in exceptional situations;
-see
-.Sx DIAGNOSTICS .
-.Pp
-If
-.Dv REG_NOSUB
-was specified in the compilation of the RE,
-or if
-.Fa nmatch
-is 0,
-.Fn regexec
-ignores the
-.Fa pmatch
-argument (but see below for the case where
-.Dv REG_STARTEND
-is specified).
-Otherwise,
-.Fa pmatch
-points to an array of
-.Fa nmatch
-structures of type
-.Ft regmatch_t .
-Such a structure has at least the members
-.Va rm_so
-and
-.Va rm_eo ,
-both of type
-.Ft regoff_t
-(a signed arithmetic type at least as large as an
-.Ft off_t
-and a
-.Ft ssize_t ) ,
-containing respectively the offset of the first character of a substring
-and the offset of the first character after the end of the substring.
-Offsets are measured from the beginning of the
-.Fa string
-argument given to
-.Fn regexec .
-An empty substring is denoted by equal offsets,
-both indicating the character following the empty substring.
-.Pp
-The 0th member of the
-.Fa pmatch
-array is filled in to indicate what substring of
-.Fa string
-was matched by the entire RE.
-Remaining members report what substring was matched by parenthesized
-subexpressions within the RE;
-member
-.Va i
-reports subexpression
-.Va i ,
-with subexpressions counted (starting at 1) by the order of their opening
-parentheses in the RE, left to right.
-Unused entries in the array (corresponding either to subexpressions that
-did not participate in the match at all, or to subexpressions that do not
-exist in the RE (that is,
-.Va i
->
-.Fa preg Ns -> Ns Va re_nsub ) )
-have both
-.Va rm_so
-and
-.Va rm_eo
-set to -1.
-If a subexpression participated in the match several times,
-the reported substring is the last one it matched.
-(Note, as an example in particular, that when the RE
-.Ql "(b*)+"
-matches
-.Ql bbb ,
-the parenthesized subexpression matches each of the three
-.So Li b Sc Ns s
-and then
-an infinite number of empty strings following the last
-.Ql b ,
-so the reported substring is one of the empties.)
-.Pp
-If
-.Dv REG_STARTEND
-is specified,
-.Fa pmatch
-must point to at least one
-.Ft regmatch_t
-(even if
-.Fa nmatch
-is 0 or
-.Dv REG_NOSUB
-was specified),
-to hold the input offsets for
-.Dv REG_STARTEND .
-Use for output is still entirely controlled by
-.Fa nmatch ;
-if
-.Fa nmatch
-is 0 or
-.Dv REG_NOSUB
-was specified,
-the value of
-.Fa pmatch Ns [0]
-will not be changed by a successful
-.Fn regexec .
-.Pp
-.Fn Regerror
-maps a non-zero
-.Fa errcode
-from either
-.Fn regcomp
-or
-.Fn regexec
-to a human-readable, printable message.
-If
-.Fa preg
-is
-.No non\- Ns Dv NULL ,
-the error code should have arisen from use of
-the
-.Ft regex_t
-pointed to by
-.Fa preg ,
-and if the error code came from
-.Fn regcomp ,
-it should have been the result from the most recent
-.Fn regcomp
-using that
-.Ft regex_t .
-.No ( Fn Regerror
-may be able to supply a more detailed message using information
-from the
-.Ft regex_t . )
-.Fn Regerror
-places the NUL-terminated message into the buffer pointed to by
-.Fa errbuf ,
-limiting the length (including the NUL) to at most
-.Fa errbuf_size
-bytes.
-If the whole message won't fit,
-as much of it as will fit before the terminating NUL is supplied.
-In any case,
-the returned value is the size of buffer needed to hold the whole
-message (including terminating NUL).
-If
-.Fa errbuf_size
-is 0,
-.Fa errbuf
-is ignored but the return value is still correct.
-.Pp
-If the
-.Fa errcode
-given to
-.Fn regerror
-is first ORed with
-.Dv REG_ITOA ,
-the
-.Dq message
-that results is the printable name of the error code,
-e.g.\&
-.Dq Dv REG_NOMATCH ,
-rather than an explanation thereof.
-If
-.Fa errcode
-is
-.Dv REG_ATOI ,
-then
-.Fa preg
-shall be
-.No non\- Ns Dv NULL
-and the
-.Va re_endp
-member of the structure it points to
-must point to the printable name of an error code;
-in this case, the result in
-.Fa errbuf
-is the decimal digits of
-the numeric value of the error code
-(0 if the name is not recognized).
-.Dv REG_ITOA
-and
-.Dv REG_ATOI
-are intended primarily as debugging facilities;
-they are extensions,
-compatible with but not specified by
-.St -p1003.2 ,
-and should be used with
-caution in software intended to be portable to other systems.
-Be warned also that they are considered experimental and changes are possible.
-.Pp
-.Fn Regfree
-frees any dynamically-allocated storage associated with the compiled RE
-pointed to by
-.Fa preg .
-The remaining
-.Ft regex_t
-is no longer a valid compiled RE
-and the effect of supplying it to
-.Fn regexec
-or
-.Fn regerror
-is undefined.
-.Pp
-None of these functions references global variables except for tables
-of constants;
-all are safe for use from multiple threads if the arguments are safe.
-.Sh IMPLEMENTATION CHOICES
-There are a number of decisions that
-.St -p1003.2
-leaves up to the implementor,
-either by explicitly saying
-.Dq undefined
-or by virtue of them being
-forbidden by the RE grammar.
-This implementation treats them as follows.
-.Pp
-See
-.Xr re_format 7
-for a discussion of the definition of case-independent matching.
-.Pp
-There is no particular limit on the length of REs,
-except insofar as memory is limited.
-Memory usage is approximately linear in RE size, and largely insensitive
-to RE complexity, except for bounded repetitions.
-See
-.Sx BUGS
-for one short RE using them
-that will run almost any system out of memory.
-.Pp
-A backslashed character other than one specifically given a magic meaning
-by
-.St -p1003.2
-(such magic meanings occur only in obsolete
-.Bq Dq basic
-REs)
-is taken as an ordinary character.
-.Pp
-Any unmatched
-.Ql [\&
-is a
-.Dv REG_EBRACK
-error.
-.Pp
-Equivalence classes cannot begin or end bracket-expression ranges.
-The endpoint of one range cannot begin another.
-.Pp
-.Dv RE_DUP_MAX ,
-the limit on repetition counts in bounded repetitions, is 255.
-.Pp
-A repetition operator
-.Ql ( ?\& ,
-.Ql *\& ,
-.Ql +\& ,
-or bounds)
-cannot follow another
-repetition operator.
-A repetition operator cannot begin an expression or subexpression
-or follow
-.Ql ^\&
-or
-.Ql |\& .
-.Pp
-.Ql |\&
-cannot appear first or last in a (sub)expression or after another
-.Ql |\& ,
-i.e. an operand of
-.Ql |\&
-cannot be an empty subexpression.
-An empty parenthesized subexpression,
-.Ql "()" ,
-is legal and matches an
-empty (sub)string.
-An empty string is not a legal RE.
-.Pp
-A
-.Ql {\&
-followed by a digit is considered the beginning of bounds for a
-bounded repetition, which must then follow the syntax for bounds.
-A
-.Ql {\&
-.Em not
-followed by a digit is considered an ordinary character.
-.Pp
-.Ql ^\&
-and
-.Ql $\&
-beginning and ending subexpressions in obsolete
-.Pq Dq basic
-REs are anchors, not ordinary characters.
-.Sh SEE ALSO
-.Xr grep 1 ,
-.Xr re_format 7
-.Pp
-.St -p1003.2 ,
-sections 2.8 (Regular Expression Notation)
-and
-B.5 (C Binding for Regular Expression Matching).
-.Sh DIAGNOSTICS
-Non-zero error codes from
-.Fn regcomp
-and
-.Fn regexec
-include the following:
-.Pp
-.Bl -tag -width REG_ECOLLATE -compact
-.It Dv REG_NOMATCH
-.Fn regexec
-failed to match
-.It Dv REG_BADPAT
-invalid regular expression
-.It Dv REG_ECOLLATE
-invalid collating element
-.It Dv REG_ECTYPE
-invalid character class
-.It Dv REG_EESCAPE
-.Ql \e
-applied to unescapable character
-.It Dv REG_ESUBREG
-invalid backreference number
-.It Dv REG_EBRACK
-brackets
-.Ql "[ ]"
-not balanced
-.It Dv REG_EPAREN
-parentheses
-.Ql "( )"
-not balanced
-.It Dv REG_EBRACE
-braces
-.Ql "{ }"
-not balanced
-.It Dv REG_BADBR
-invalid repetition count(s) in
-.Ql "{ }"
-.It Dv REG_ERANGE
-invalid character range in
-.Ql "[ ]"
-.It Dv REG_ESPACE
-ran out of memory
-.It Dv REG_BADRPT
-.Ql ?\& ,
-.Ql *\& ,
-or
-.Ql +\&
-operand invalid
-.It Dv REG_EMPTY
-empty (sub)expression
-.It Dv REG_ASSERT
-can't happen - you found a bug
-.It Dv REG_INVARG
-invalid argument, e.g. negative-length string
-.El
-.Sh HISTORY
-Originally written by
-.An Henry Spencer .
-Altered for inclusion in the
-.Bx 4.4
-distribution.
-.Sh BUGS
-This is an alpha release with known defects.
-Please report problems.
-.Pp
-The back-reference code is subtle and doubts linger about its correctness
-in complex cases.
-.Pp
-.Fn Regexec
-performance is poor.
-This will improve with later releases.
-.Fa Nmatch
-exceeding 0 is expensive;
-.Fa nmatch
-exceeding 1 is worse.
-.Fn Regexec
-is largely insensitive to RE complexity
-.Em except
-that back
-references are massively expensive.
-RE length does matter; in particular, there is a strong speed bonus
-for keeping RE length under about 30 characters,
-with most special characters counting roughly double.
-.Pp
-.Fn Regcomp
-implements bounded repetitions by macro expansion,
-which is costly in time and space if counts are large
-or bounded repetitions are nested.
-An RE like, say,
-.Ql "((((a{1,100}){1,100}){1,100}){1,100}){1,100}"
-will (eventually) run almost any existing machine out of swap space.
-.Pp
-There are suspected problems with response to obscure error conditions.
-Notably,
-certain kinds of internal overflow,
-produced only by truly enormous REs or by multiply nested bounded repetitions,
-are probably not handled well.
-.Pp
-Due to a mistake in
-.St -p1003.2 ,
-things like
-.Ql "a)b"
-are legal REs because
-.Ql )\&
-is
-a special character only in the presence of a previous unmatched
-.Ql (\& .
-This can't be fixed until the spec is fixed.
-.Pp
-The standard's definition of back references is vague.
-For example, does
-.Ql "a\e(\e(b\e)*\e2\e)*d"
-match
-.Ql "abbbd" ?
-Until the standard is clarified,
-behavior in such cases should not be relied on.
-.Pp
-The implementation of word-boundary matching is a bit of a kludge,
-and bugs may lurk in combinations of word-boundary matching and anchoring.
diff --git a/newlib/libc/sys/linux/stdlib/regex2.h b/newlib/libc/sys/linux/stdlib/regex2.h
deleted file mode 100644
index 303b7f7b3..000000000
--- a/newlib/libc/sys/linux/stdlib/regex2.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regex2.h 8.4 (Berkeley) 3/20/94
- * $FreeBSD: src/lib/libc/regex/regex2.h,v 1.6 2002/03/22 23:41:56 obrien Exp $
- */
-
-/*
- * First, the stuff that ends up in the outside-world include file
- = typedef off_t regoff_t;
- = typedef struct {
- = int re_magic;
- = size_t re_nsub; // number of parenthesized subexpressions
- = const char *re_endp; // end pointer for REG_PEND
- = struct re_guts *re_g; // none of your business :-)
- = } regex_t;
- = typedef struct {
- = regoff_t rm_so; // start of match
- = regoff_t rm_eo; // end of match
- = } regmatch_t;
- */
-/*
- * internals of regex_t
- */
-#define MAGIC1 ((('r'^0200)<<8) | 'e')
-
-/*
- * The internal representation is a *strip*, a sequence of
- * operators ending with an endmarker. (Some terminology etc. is a
- * historical relic of earlier versions which used multiple strips.)
- * Certain oddities in the representation are there to permit running
- * the machinery backwards; in particular, any deviation from sequential
- * flow must be marked at both its source and its destination. Some
- * fine points:
- *
- * - OPLUS_ and O_PLUS are *inside* the loop they create.
- * - OQUEST_ and O_QUEST are *outside* the bypass they create.
- * - OCH_ and O_CH are *outside* the multi-way branch they create, while
- * OOR1 and OOR2 are respectively the end and the beginning of one of
- * the branches. Note that there is an implicit OOR2 following OCH_
- * and an implicit OOR1 preceding O_CH.
- *
- * In state representations, an operator's bit is on to signify a state
- * immediately *preceding* "execution" of that operator.
- */
-typedef unsigned long sop; /* strip operator */
-typedef long sopno;
-#define OPRMASK 0xf8000000L
-#define OPDMASK 0x07ffffffL
-#define OPSHIFT ((unsigned)27)
-#define OP(n) ((n)&OPRMASK)
-#define OPND(n) ((n)&OPDMASK)
-#define SOP(op, opnd) ((op)|(opnd))
-/* operators meaning operand */
-/* (back, fwd are offsets) */
-#define OEND (1L<<OPSHIFT) /* endmarker - */
-#define OCHAR (2L<<OPSHIFT) /* character unsigned char */
-#define OBOL (3L<<OPSHIFT) /* left anchor - */
-#define OEOL (4L<<OPSHIFT) /* right anchor - */
-#define OANY (5L<<OPSHIFT) /* . - */
-#define OANYOF (6L<<OPSHIFT) /* [...] set number */
-#define OBACK_ (7L<<OPSHIFT) /* begin \d paren number */
-#define O_BACK (8L<<OPSHIFT) /* end \d paren number */
-#define OPLUS_ (9L<<OPSHIFT) /* + prefix fwd to suffix */
-#define O_PLUS (10L<<OPSHIFT) /* + suffix back to prefix */
-#define OQUEST_ (11L<<OPSHIFT) /* ? prefix fwd to suffix */
-#define O_QUEST (12L<<OPSHIFT) /* ? suffix back to prefix */
-#define OLPAREN (13L<<OPSHIFT) /* ( fwd to ) */
-#define ORPAREN (14L<<OPSHIFT) /* ) back to ( */
-#define OCH_ (15L<<OPSHIFT) /* begin choice fwd to OOR2 */
-#define OOR1 (16L<<OPSHIFT) /* | pt. 1 back to OOR1 or OCH_ */
-#define OOR2 (17L<<OPSHIFT) /* | pt. 2 fwd to OOR2 or O_CH */
-#define O_CH (18L<<OPSHIFT) /* end choice back to OOR1 */
-#define OBOW (19L<<OPSHIFT) /* begin word - */
-#define OEOW (20L<<OPSHIFT) /* end word - */
-
-/*
- * Structure for [] character-set representation. Character sets are
- * done as bit vectors, grouped 8 to a byte vector for compactness.
- * The individual set therefore has both a pointer to the byte vector
- * and a mask to pick out the relevant bit of each byte. A hash code
- * simplifies testing whether two sets could be identical.
- *
- * This will get trickier for multicharacter collating elements. As
- * preliminary hooks for dealing with such things, we also carry along
- * a string of multi-character elements, and decide the size of the
- * vectors at run time.
- */
-typedef struct {
- uch *ptr; /* -> uch [csetsize] */
- uch mask; /* bit within array */
- short hash; /* hash code */
- size_t smultis;
- char *multis; /* -> char[smulti] ab\0cd\0ef\0\0 */
-} cset;
-/* note that CHadd and CHsub are unsafe, and CHIN doesn't yield 0/1 */
-#define CHadd(cs, c) ((cs)->ptr[(uch)(c)] |= (cs)->mask, (cs)->hash += (uch)(c))
-#define CHsub(cs, c) ((cs)->ptr[(uch)(c)] &= ~(cs)->mask, (cs)->hash -= (uch)(c))
-#define CHIN(cs, c) ((cs)->ptr[(uch)(c)] & (cs)->mask)
-#define MCadd(p, cs, cp) mcadd(p, cs, cp) /* regcomp() internal fns */
-#define MCsub(p, cs, cp) mcsub(p, cs, cp)
-#define MCin(p, cs, cp) mcin(p, cs, cp)
-
-/* stuff for character categories */
-typedef unsigned char cat_t;
-
-/*
- * main compiled-expression structure
- */
-struct re_guts {
- int magic;
-# define MAGIC2 ((('R'^0200)<<8)|'E')
- sop *strip; /* malloced area for strip */
- int csetsize; /* number of bits in a cset vector */
- int ncsets; /* number of csets in use */
- cset *sets; /* -> cset [ncsets] */
- uch *setbits; /* -> uch[csetsize][ncsets/CHAR_BIT] */
- int cflags; /* copy of regcomp() cflags argument */
- sopno nstates; /* = number of sops */
- sopno firststate; /* the initial OEND (normally 0) */
- sopno laststate; /* the final OEND */
- int iflags; /* internal flags */
-# define USEBOL 01 /* used ^ */
-# define USEEOL 02 /* used $ */
-# define BAD 04 /* something wrong */
- int nbol; /* number of ^ used */
- int neol; /* number of $ used */
- int ncategories; /* how many character categories */
- cat_t *categories; /* ->catspace[-CHAR_MIN] */
- char *must; /* match must contain this string */
- int moffset; /* latest point at which must may be located */
- int *charjump; /* Boyer-Moore char jump table */
- int *matchjump; /* Boyer-Moore match jump table */
- int mlen; /* length of must */
- size_t nsub; /* copy of re_nsub */
- int backrefs; /* does it use back references? */
- sopno nplus; /* how deep does it nest +s? */
- /* catspace must be last */
- cat_t catspace[1]; /* actually [NC] */
-};
-
-/* misc utilities */
-#define OUT (CHAR_MAX+1) /* a non-character value */
-#define ISWORD(c) (isalnum((uch)(c)) || (c) == '_')
diff --git a/newlib/libc/sys/linux/stdlib/regexec.c b/newlib/libc/sys/linux/stdlib/regexec.c
deleted file mode 100644
index 4f3bb509f..000000000
--- a/newlib/libc/sys/linux/stdlib/regexec.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regexec.c 8.3 (Berkeley) 3/20/94
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)regexec.c 8.3 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/regex/regexec.c,v 1.3 2002/03/21 18:41:51 obrien Exp $");
-
-/*
- * the outer shell of regexec()
- *
- * This file includes engine.c *twice*, after muchos fiddling with the
- * macros that code uses. This lets the same code operate on two different
- * representations for state sets.
- */
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <ctype.h>
-#include <regex.h>
-
-#include "utils.h"
-#include "regex2.h"
-
-static int nope = 0; /* for use in asserts; shuts lint up */
-
-/* macros for manipulating states, small version */
-#define states long
-#define states1 states /* for later use in regexec() decision */
-#define CLEAR(v) ((v) = 0)
-#define SET0(v, n) ((v) &= ~((unsigned long)1 << (n)))
-#define SET1(v, n) ((v) |= (unsigned long)1 << (n))
-#define ISSET(v, n) (((v) & ((unsigned long)1 << (n))) != 0)
-#define ASSIGN(d, s) ((d) = (s))
-#define EQ(a, b) ((a) == (b))
-#define STATEVARS long dummy /* dummy version */
-#define STATESETUP(m, n) /* nothing */
-#define STATETEARDOWN(m) /* nothing */
-#define SETUP(v) ((v) = 0)
-#define onestate long
-#define INIT(o, n) ((o) = (unsigned long)1 << (n))
-#define INC(o) ((o) <<= 1)
-#define ISSTATEIN(v, o) (((v) & (o)) != 0)
-/* some abbreviations; note that some of these know variable names! */
-/* do "if I'm here, I can also be there" etc without branches */
-#define FWD(dst, src, n) ((dst) |= ((unsigned long)(src)&(here)) << (n))
-#define BACK(dst, src, n) ((dst) |= ((unsigned long)(src)&(here)) >> (n))
-#define ISSETBACK(v, n) (((v) & ((unsigned long)here >> (n))) != 0)
-/* function names */
-#define SNAMES /* engine.c looks after details */
-
-#include "engine.c"
-
-/* now undo things */
-#undef states
-#undef CLEAR
-#undef SET0
-#undef SET1
-#undef ISSET
-#undef ASSIGN
-#undef EQ
-#undef STATEVARS
-#undef STATESETUP
-#undef STATETEARDOWN
-#undef SETUP
-#undef onestate
-#undef INIT
-#undef INC
-#undef ISSTATEIN
-#undef FWD
-#undef BACK
-#undef ISSETBACK
-#undef SNAMES
-
-/* macros for manipulating states, large version */
-#define states char *
-#define CLEAR(v) memset(v, 0, m->g->nstates)
-#define SET0(v, n) ((v)[n] = 0)
-#define SET1(v, n) ((v)[n] = 1)
-#define ISSET(v, n) ((v)[n])
-#define ASSIGN(d, s) memcpy(d, s, m->g->nstates)
-#define EQ(a, b) (memcmp(a, b, m->g->nstates) == 0)
-#define STATEVARS long vn; char *space
-#define STATESETUP(m, nv) { (m)->space = malloc((nv)*(m)->g->nstates); \
- if ((m)->space == NULL) return(REG_ESPACE); \
- (m)->vn = 0; }
-#define STATETEARDOWN(m) { free((m)->space); }
-#define SETUP(v) ((v) = &m->space[m->vn++ * m->g->nstates])
-#define onestate long
-#define INIT(o, n) ((o) = (n))
-#define INC(o) ((o)++)
-#define ISSTATEIN(v, o) ((v)[o])
-/* some abbreviations; note that some of these know variable names! */
-/* do "if I'm here, I can also be there" etc without branches */
-#define FWD(dst, src, n) ((dst)[here+(n)] |= (src)[here])
-#define BACK(dst, src, n) ((dst)[here-(n)] |= (src)[here])
-#define ISSETBACK(v, n) ((v)[here - (n)])
-/* function names */
-#define LNAMES /* flag */
-
-#include "engine.c"
-
-/*
- - regexec - interface for matching
- = extern int regexec(const regex_t *, const char *, size_t, \
- = regmatch_t [], int);
- = #define REG_NOTBOL 00001
- = #define REG_NOTEOL 00002
- = #define REG_STARTEND 00004
- = #define REG_TRACE 00400 // tracing of execution
- = #define REG_LARGE 01000 // force large representation
- = #define REG_BACKR 02000 // force use of backref code
- *
- * We put this here so we can exploit knowledge of the state representation
- * when choosing which matcher to call. Also, by this point the matchers
- * have been prototyped.
- */
-int /* 0 success, REG_NOMATCH failure */
-regexec(preg, string, nmatch, pmatch, eflags)
-const regex_t *preg;
-const char *string;
-size_t nmatch;
-regmatch_t pmatch[];
-int eflags;
-{
- struct re_guts *g = preg->re_g;
-#ifdef REDEBUG
-# define GOODFLAGS(f) (f)
-#else
-# define GOODFLAGS(f) ((f)&(REG_NOTBOL|REG_NOTEOL|REG_STARTEND))
-#endif
-
- if (preg->re_magic != MAGIC1 || g->magic != MAGIC2)
- return(REG_BADPAT);
- assert(!(g->iflags&BAD));
- if (g->iflags&BAD) /* backstop for no-debug case */
- return(REG_BADPAT);
- eflags = GOODFLAGS(eflags);
-
- if (g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags&REG_LARGE))
- return(smatcher(g, (char *)string, nmatch, pmatch, eflags));
- else
- return(lmatcher(g, (char *)string, nmatch, pmatch, eflags));
-}
diff --git a/newlib/libc/sys/linux/stdlib/regfree.c b/newlib/libc/sys/linux/stdlib/regfree.c
deleted file mode 100644
index 82119d31d..000000000
--- a/newlib/libc/sys/linux/stdlib/regfree.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regfree.c 8.3 (Berkeley) 3/20/94
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)regfree.c 8.3 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/regex/regfree.c,v 1.5 2002/03/22 21:52:47 obrien Exp $");
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <regex.h>
-
-#include "utils.h"
-#include "regex2.h"
-
-/*
- - regfree - free everything
- = extern void regfree(regex_t *);
- */
-void
-regfree(preg)
-regex_t *preg;
-{
- struct re_guts *g;
-
- if (preg->re_magic != MAGIC1) /* oops */
- return; /* nice to complain, but hard */
-
- g = preg->re_g;
- if (g == NULL || g->magic != MAGIC2) /* oops again */
- return;
- preg->re_magic = 0; /* mark it invalid */
- g->magic = 0; /* mark it invalid */
-
- if (g->strip != NULL)
- free((char *)g->strip);
- if (g->sets != NULL)
- free((char *)g->sets);
- if (g->setbits != NULL)
- free((char *)g->setbits);
- if (g->must != NULL)
- free(g->must);
- if (g->charjump != NULL)
- free(&g->charjump[CHAR_MIN]);
- if (g->matchjump != NULL)
- free(g->matchjump);
- free((char *)g);
-}
diff --git a/newlib/libc/sys/linux/stdlib/utils.h b/newlib/libc/sys/linux/stdlib/utils.h
deleted file mode 100644
index 5439b6cd4..000000000
--- a/newlib/libc/sys/linux/stdlib/utils.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)utils.h 8.3 (Berkeley) 3/20/94
- * $FreeBSD: src/lib/libc/regex/utils.h,v 1.2 2002/03/22 23:41:56 obrien Exp $
- */
-
-/* utility definitions */
-#define DUPMAX _POSIX2_RE_DUP_MAX /* xxx is this right? */
-#define INFINITY (DUPMAX + 1)
-#define NC (CHAR_MAX - CHAR_MIN + 1)
-typedef unsigned char uch;
-
-/* switch off assertions (if not already off) if no REDEBUG */
-#ifndef REDEBUG
-#ifndef NDEBUG
-#define NDEBUG /* no assertions please */
-#endif
-#endif
-#include <assert.h>
-
-/* for old systems with bcopy() but no memmove() */
-#ifdef USEBCOPY
-#define memmove(d, s, c) bcopy(s, d, c)
-#endif
diff --git a/newlib/libc/sys/linux/stdlib/wordexp.c b/newlib/libc/sys/linux/stdlib/wordexp.c
deleted file mode 100644
index 3928b857e..000000000
--- a/newlib/libc/sys/linux/stdlib/wordexp.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software
- * is freely granted, provided that this notice is preserved.
- */
-
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <ctype.h>
-#include <dirent.h>
-#include <errno.h>
-#include <glob.h>
-#include <pwd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/wait.h>
-
-#include <wordexp.h>
-
-#define MAXLINELEN 500
-
-/* Note: This implementation of wordexp requires a version of bash
- that supports the --wordexp and --protected arguments to be present
- on the system. It does not support the WRDE_UNDEF flag. */
-int
-wordexp(const char *words, wordexp_t *pwordexp, int flags)
-{
- FILE *f;
- FILE *f_err;
- char tmp[MAXLINELEN];
- int i = 0;
- int offs = 0;
- char *iter;
- pid_t pid;
- int num_words = 0;
- int num_bytes = 0;
- int fd[2];
- int fd_err[2];
- int err = 0;
-
- if (pwordexp == NULL)
- {
- return WRDE_NOSPACE;
- }
-
- if (flags & WRDE_REUSE)
- wordfree(pwordexp);
-
- if ((flags & WRDE_APPEND) == 0)
- {
- pwordexp->we_wordc = 0;
- pwordexp->we_wordv = NULL;
- }
-
- if (flags & WRDE_DOOFFS)
- {
- offs = pwordexp->we_offs;
-
- if(!(pwordexp->we_wordv = (char **)realloc(pwordexp->we_wordv, (pwordexp->we_wordc + offs + 1) * sizeof(char *))))
- return WRDE_NOSPACE;
-
- for (i = 0; i < offs; i++)
- pwordexp->we_wordv[i] = NULL;
- }
-
- pipe(fd);
- pipe(fd_err);
- pid = fork();
-
- if (pid > 0)
- {
- /* In parent process. */
-
- /* Close write end of parent's pipe. */
- close(fd[1]);
- close(fd_err[1]);
-
- /* f_err is the standard error from the shell command. */
- f_err = fdopen(fd_err[0], "r");
-
- /* Check for errors. */
- if (fgets(tmp, MAXLINELEN, f_err))
- {
- if (strstr(tmp, "EOF"))
- err = WRDE_SYNTAX;
- else if (strstr(tmp, "`\n'") || strstr(tmp, "`|'")
- || strstr(tmp, "`&'") || strstr(tmp, "`;'")
- || strstr(tmp, "`<'") || strstr(tmp, "`>'")
- || strstr(tmp, "`('") || strstr(tmp, "`)'")
- || strstr(tmp, "`{'") || strstr(tmp, "`}'"))
- err = WRDE_BADCHAR;
- else if (strstr(tmp, "command substitution"))
- err = WRDE_CMDSUB;
- else
- err = WRDE_SYNTAX;
-
- if (flags & WRDE_SHOWERR)
- {
- fprintf(stderr, tmp);
- while(fgets(tmp, MAXLINELEN, f_err))
- fprintf(stderr, tmp);
- }
-
- return err;
- }
-
- /* f is the standard output from the shell command. */
- f = fdopen(fd[0], "r");
-
- /* Get number of words expanded by shell. */
- fgets(tmp, MAXLINELEN, f);
-
- if((iter = strchr(tmp, '\n')))
- *iter = '\0';
-
- num_words = atoi(tmp);
-
- if(!(pwordexp->we_wordv = (char **)realloc(pwordexp->we_wordv,
- (pwordexp->we_wordc + num_words + offs + 1) * sizeof(char *))))
- return WRDE_NOSPACE;
-
- /* Get number of bytes required for storage of num_words words. */
- fgets(tmp, MAXLINELEN, f);
-
- if((iter = strchr(tmp, '\n')))
- *iter = '\0';
-
- num_bytes = atoi(tmp) + pwordexp->we_wordc;
-
- /* Get each expansion from the shell output, and store each in
- pwordexp's we_wordv vector. */
- for(i = 0; i < num_words; i++)
- {
- fgets(tmp, MAXLINELEN, f);
-
- if((iter = strchr(tmp, '\n')))
- *iter = '\0';
-
- pwordexp->we_wordv[pwordexp->we_wordc + offs + i] = strdup(tmp);
- }
-
- pwordexp->we_wordv[pwordexp->we_wordc + offs + i] = NULL;
- pwordexp->we_wordc += num_words;
-
- close(fd[0]);
- close(fd_err[0]);
-
- /* Wait for child to finish. */
- waitpid (pid, NULL, 0);
-
- return WRDE_SUCCESS;
- }
- else
- {
- /* In child process. */
-
- /* Close read end of child's pipe. */
- close(fd[0]);
- close(fd_err[0]);
-
- /* Pipe standard output to parent process via fd. */
- if (fd[1] != STDOUT_FILENO)
- {
- dup2(fd[1], STDOUT_FILENO);
- /* fd[1] no longer required. */
- close(fd[1]);
- }
-
- /* Pipe standard error to parent process via fd_err. */
- if (fd_err[1] != STDERR_FILENO)
- {
- dup2(fd_err[1], STDERR_FILENO);
- /* fd_err[1] no longer required. */
- close(fd_err[1]);
- }
-
- if (flags & WRDE_NOCMD)
- execl("/bin/bash", "bash", "--protected", "--wordexp", words, (char *)0);
- else
- execl("/bin/bash", "bash", "--wordexp", words, (char *)0);
- }
- return WRDE_SUCCESS;
-}
diff --git a/newlib/libc/sys/linux/stdlib/wordfree.c b/newlib/libc/sys/linux/stdlib/wordfree.c
deleted file mode 100644
index 1b6ee1e28..000000000
--- a/newlib/libc/sys/linux/stdlib/wordfree.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software
- * is freely granted, provided that this notice is preserved.
- */
-
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <ctype.h>
-#include <dirent.h>
-#include <errno.h>
-#include <glob.h>
-#include <pwd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <wordexp.h>
-
-void
-wordfree(wordexp_t *pwordexp)
-{
- int i;
-
- if (pwordexp == NULL)
- return;
-
- if (pwordexp->we_wordv == NULL)
- return;
-
- for(i = 0; i < pwordexp->we_wordc; i++)
- free(pwordexp->we_wordv[i]);
-
- free(pwordexp->we_wordv);
- pwordexp->we_wordv = NULL;
-}
diff --git a/newlib/libc/sys/linux/strsignal.c b/newlib/libc/sys/linux/strsignal.c
deleted file mode 100644
index 3f95e18a7..000000000
--- a/newlib/libc/sys/linux/strsignal.c
+++ /dev/null
@@ -1,63 +0,0 @@
-#include <string.h>
-#include <signal.h>
-#include <stdio.h>
-#include <reent.h>
-
-static const char *sigstring[] =
- {
- "Signal 0",
- "Hangup",
- "Interrupt",
- "Quit",
- "Illegal instruction",
- "Trace/breakpoint trap",
- "IOT trap",
- "EMT trap",
- "Floating point exception",
- "Killed",
- "Bus error",
- "Segmentation fault",
- "Bad system call",
- "Broken pipe",
- "Alarm clock",
- "Terminated",
- "Urgent I/O condition",
- "Stopped (signal)",
- "Stopped",
- "Continued",
- "Child exited",
- "Stopped (tty input)",
- "Stopped (tty output)",
- "I/O possible",
- "CPU time limit exceeded",
- "File size limit exceeded",
- "Virtual timer expired",
- "Profiling timer expired",
- "Window changed",
- "Resource lost",
- "User defined signal 1",
- "User defined signal 2"
- };
-
-char *
-strsignal (int sig)
-{
- if (sig < 0 || sig >= __SIGRTMIN)
- {
- char *buffer;
- struct _reent *ptr;
-
- ptr = _REENT;
-
- _REENT_CHECK_SIGNAL_BUF(ptr);
- buffer = _REENT_SIGNAL_BUF(ptr);
-
- if (sig < 0 || sig > __SIGRTMAX)
- siprintf (buffer, "Unknown signal %d", sig);
- else
- siprintf (buffer, "Real-time signal %d", sig - __SIGRTMIN);
- return buffer;
- }
- else
- return sigstring[sig];
-}
diff --git a/newlib/libc/sys/linux/strverscmp.c b/newlib/libc/sys/linux/strverscmp.c
deleted file mode 100644
index 2a9cbf48a..000000000
--- a/newlib/libc/sys/linux/strverscmp.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/* Compare strings while treating digits characters numerically.
- Copyright (C) 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <string.h>
-#include <ctype.h>
-#include <machine/weakalias.h>
-
-/* states: S_N: normal, S_I: comparing integral part, S_F: comparing
- fractionnal parts, S_Z: idem but with leading Zeroes only */
-#define S_N 0x0
-#define S_I 0x4
-#define S_F 0x8
-#define S_Z 0xC
-
-/* result_type: CMP: return diff; LEN: compare using len_diff/diff */
-#define CMP 2
-#define LEN 3
-
-
-/* Compare S1 and S2 as strings holding indices/version numbers,
- returning less than, equal to or greater than zero if S1 is less than,
- equal to or greater than S2 (for more info, see the texinfo doc).
-*/
-
-int
-__strverscmp (s1, s2)
- const char *s1;
- const char *s2;
-{
- const unsigned char *p1 = (const unsigned char *) s1;
- const unsigned char *p2 = (const unsigned char *) s2;
- unsigned char c1, c2;
- int state;
- int diff;
-
- /* Symbol(s) 0 [1-9] others (padding)
- Transition (10) 0 (01) d (00) x (11) - */
- static const unsigned int next_state[] =
- {
- /* state x d 0 - */
- /* S_N */ S_N, S_I, S_Z, S_N,
- /* S_I */ S_N, S_I, S_I, S_I,
- /* S_F */ S_N, S_F, S_F, S_F,
- /* S_Z */ S_N, S_F, S_Z, S_Z
- };
-
- static const int result_type[] =
- {
- /* state x/x x/d x/0 x/- d/x d/d d/0 d/-
- 0/x 0/d 0/0 0/- -/x -/d -/0 -/- */
-
- /* S_N */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP,
- CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP,
- /* S_I */ CMP, -1, -1, CMP, +1, LEN, LEN, CMP,
- +1, LEN, LEN, CMP, CMP, CMP, CMP, CMP,
- /* S_F */ CMP, CMP, CMP, CMP, CMP, LEN, CMP, CMP,
- CMP, CMP, CMP, CMP, CMP, CMP, CMP, CMP,
- /* S_Z */ CMP, +1, +1, CMP, -1, CMP, CMP, CMP,
- -1, CMP, CMP, CMP
- };
-
- if (p1 == p2)
- return 0;
-
- c1 = *p1++;
- c2 = *p2++;
- /* Hint: '0' is a digit too. */
- state = S_N | ((c1 == '0') + (isdigit (c1) != 0));
-
- while ((diff = c1 - c2) == 0 && c1 != '\0')
- {
- state = next_state[state];
- c1 = *p1++;
- c2 = *p2++;
- state |= (c1 == '0') + (isdigit (c1) != 0);
- }
-
- state = result_type[state << 2 | (((c2 == '0') + (isdigit (c2) != 0)))];
-
- switch (state)
- {
- case CMP:
- return diff;
-
- case LEN:
- while (isdigit (*p1++))
- if (!isdigit (*p2++))
- return 1;
-
- return isdigit (*p2) ? -1 : diff;
-
- default:
- return state;
- }
-}
-weak_alias (__strverscmp, strverscmp)
diff --git a/newlib/libc/sys/linux/sys/_types.h b/newlib/libc/sys/linux/sys/_types.h
deleted file mode 100644
index 994df899a..000000000
--- a/newlib/libc/sys/linux/sys/_types.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* ANSI C namespace clean utility typedefs */
-
-/* This file defines various typedefs needed by the system calls that support
- the C library. Basically, they're just the POSIX versions with an '_'
- prepended. This file lives in the `sys' directory so targets can provide
- their own if desired (or they can put target dependant conditionals here).
-*/
-
-#ifndef _SYS__TYPES_H
-#define _SYS__TYPES_H
-
-typedef long _off_t;
-__extension__ typedef long long _off64_t;
-
-#if defined(__INT_MAX__) && __INT_MAX__ == 2147483647
-typedef int _ssize_t;
-#else
-typedef long _ssize_t;
-#endif
-
-#define __need_wint_t
-#include <stddef.h>
-
-/* Conversion state information. */
-typedef struct
-{
- int __count;
- union
- {
- wint_t __wch;
- unsigned char __wchb[4];
- } __value; /* Value so far. */
-} _mbstate_t;
-
-struct __flock_mutex_t_tmp;
-typedef struct
-{
- int __a;
- int __b;
- struct
- {
- long int __c1;
- int __c2;
- } __c;
- int __d;
- struct __flock_mutex_t_tmp * __e;
-} __flock_mutex_t;
-
-typedef struct { __flock_mutex_t mutex; } _flock_t;
-
-#endif /* _SYS__TYPES_H */
diff --git a/newlib/libc/sys/linux/sys/cdefs.h b/newlib/libc/sys/linux/sys/cdefs.h
deleted file mode 100644
index f6ea0c73e..000000000
--- a/newlib/libc/sys/linux/sys/cdefs.h
+++ /dev/null
@@ -1,238 +0,0 @@
-/* Copyright (C) 1992,93,94,95,96,97,98,99,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _SYS_CDEFS_H
-#define _SYS_CDEFS_H 1
-
-/* We are almost always included from features.h. */
-#ifndef _FEATURES_H
-# include <features.h>
-#endif
-
-/* The GNU libc does not support any K&R compilers or the traditional mode
- of ISO C compilers anymore. Check for some of the combinations not
- anymore supported. */
-#if defined __GNUC__ && !defined __STDC__
-# error "You need a ISO C conforming compiler to use the glibc headers"
-#endif
-
-#define __FBSDID(x) /* nothing */
-
-/* Some user header file might have defined this before. */
-#undef __P
-#undef __PMT
-
-#ifdef __GNUC__
-
-/* GCC can always grok prototypes. For C++ programs we add throw()
- to help it optimize the function calls. But this works only with
- gcc 2.8.x and egcs. */
-# if defined __cplusplus && __GNUC_PREREQ (2,8)
-# define __THROW throw ()
-# else
-# define __THROW
-# endif
-# define __P(args) args __THROW
-/* This macro will be used for functions which might take C++ callback
- functions. */
-# define __PMT(args) args
-
-#else /* Not GCC. */
-
-# define __inline /* No inline functions. */
-
-# define __THROW
-# define __P(args) args
-# define __PMT(args) args
-
-# define __const const
-# define __signed signed
-# define __volatile volatile
-
-#endif /* GCC. */
-
-/* For these things, GCC behaves the ANSI way normally,
- and the non-ANSI way under -traditional. */
-
-#define __CONCAT(x,y) x ## y
-#define __STRING(x) #x
-
-/* This is not a typedef so `const __ptr_t' does the right thing. */
-#define __ptr_t void *
-#define __long_double_t long double
-
-
-/* C++ needs to know that types and declarations are C, not C++. */
-#ifdef __cplusplus
-# define __BEGIN_DECLS extern "C" {
-# define __END_DECLS }
-#else
-# define __BEGIN_DECLS
-# define __END_DECLS
-#endif
-
-
-/* Support for bounded pointers. */
-#ifndef __BOUNDED_POINTERS__
-# define __bounded /* nothing */
-# define __unbounded /* nothing */
-# define __ptrvalue /* nothing */
-#endif
-
-
-/* Support for flexible arrays. */
-#if __GNUC_PREREQ (2,97)
-/* GCC 2.97 supports C99 flexible array members. */
-# define __flexarr []
-#else
-# ifdef __GNUC__
-# define __flexarr [0]
-# else
-# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
-# define __flexarr []
-# else
-/* Some other non-C99 compiler. Approximate with [1]. */
-# define __flexarr [1]
-# endif
-# endif
-#endif
-
-
-/* __asm__ ("xyz") is used throughout the headers to rename functions
- at the assembly language level. This is wrapped by the __REDIRECT
- macro, in order to support compilers that can do this some other
- way. When compilers don't support asm-names at all, we have to do
- preprocessor tricks instead (which don't have exactly the right
- semantics, but it's the best we can do).
-
- Example:
- int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
-
-#if defined __GNUC__ && __GNUC__ >= 2
-
-# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
-# define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
-# define __ASMNAME2(prefix, cname) __STRING (prefix) cname
-
-/*
-#elif __SOME_OTHER_COMPILER__
-
-# define __REDIRECT(name, proto, alias) name proto; \
- _Pragma("let " #name " = " #alias)
-*/
-#endif
-
-/* GCC has various useful declarations that can be made with the
- `__attribute__' syntax. All of the ways we use this do fine if
- they are omitted for compilers that don't understand it. */
-#if !defined __GNUC__ || __GNUC__ < 2
-# define __attribute__(xyz) /* Ignore */
-#endif
-
-/* At some point during the gcc 2.96 development the `malloc' attribute
- for functions was introduced. We don't want to use it unconditionally
- (although this would be possible) since it generates warnings. */
-#if __GNUC_PREREQ (2,96)
-# define __attribute_malloc__ __attribute__ ((__malloc__))
-#else
-# define __attribute_malloc__ /* Ignore */
-#endif
-
-/* At some point during the gcc 2.96 development the `pure' attribute
- for functions was introduced. We don't want to use it unconditionally
- (although this would be possible) since it generates warnings. */
-#if __GNUC_PREREQ (2,96)
-# define __attribute_pure__ __attribute__ ((__pure__))
-#else
-# define __attribute_pure__ /* Ignore */
-#endif
-
-/* At some point during the gcc 3.1 development the `used' attribute
- for functions was introduced. We don't want to use it unconditionally
- (although this would be possible) since it generates warnings. */
-#if __GNUC_PREREQ (3,1)
-# define __attribute_used__ __attribute__ ((__used__))
-# define __attribute_noinline__ __attribute__ ((__noinline__))
-#else
-# define __attribute_used__ __attribute__ ((__unused__))
-# define __attribute_noinline__ /* Ignore */
-#endif
-
-/* At some point during the gcc 2.8 development the `format_arg' attribute
- for functions was introduced. We don't want to use it unconditionally
- (although this would be possible) since it generates warnings.
- If several `format_arg' attributes are given for the same function, in
- gcc-3.0 and older, all but the last one are ignored. In newer gccs,
- all designated arguments are considered. */
-#if __GNUC_PREREQ (2,8)
-# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
-#else
-# define __attribute_format_arg__(x) /* Ignore */
-#endif
-
-/* At some point during the gcc 2.97 development the `strfmon' format
- attribute for functions was introduced. We don't want to use it
- unconditionally (although this would be possible) since it
- generates warnings. */
-#if __GNUC_PREREQ (2,97)
-# define __attribute_format_strfmon__(a,b) \
- __attribute__ ((__format__ (__strfmon__, a, b)))
-#else
-# define __attribute_format_strfmon__(a,b) /* Ignore */
-#endif
-
-/* It is possible to compile containing GCC extensions even if GCC is
- run in pedantic mode if the uses are carefully marked using the
- `__extension__' keyword. But this is not generally available before
- version 2.8. */
-#if !__GNUC_PREREQ (2,8)
-# define __extension__ /* Ignore */
-#endif
-
-/* __restrict is known in EGCS 1.2 and above. */
-#if !__GNUC_PREREQ (2,92)
-# define __restrict /* Ignore */
-#endif
-
-/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is
- array_name[restrict]
- GCC 3.1 supports this. */
-#if __GNUC_PREREQ (3,1) && !defined __GNUG__
-# define __restrict_arr __restrict
-#else
-# ifdef __GNUC__
-# define __restrict_arr /* Not supported in old GCC. */
-# else
-# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
-# define __restrict_arr restrict
-# else
-/* Some other non-C99 compiler. */
-# define __restrict_arr /* Not supported. */
-# endif
-# endif
-#endif
-
-/* The nonull function attribute allows to mark pointer parameters which
- must not be NULL. */
-#if __GNUC_PREREQ (3,3)
-# define __nonnull(params) __attribute__ ((__nonnull__ params))
-#else
-# define __nonnull(params)
-#endif
-
-#endif /* sys/cdefs.h */
diff --git a/newlib/libc/sys/linux/sys/dirent.h b/newlib/libc/sys/linux/sys/dirent.h
deleted file mode 100644
index 4bbae4229..000000000
--- a/newlib/libc/sys/linux/sys/dirent.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* libc/sys/linux/sys/dirent.h - Directory entry as returned by readdir */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#ifndef _SYS_DIRENT_H
-#define _SYS_DIRENT_H
-
-#include <sys/types.h>
-#include <linux/dirent.h>
-#define _LIBC 1
-#define NOT_IN_libc 1
-#include <sys/lock.h>
-#undef _LIBC
-
-#define HAVE_NO_D_NAMLEN /* no struct dirent->d_namlen */
-#define HAVE_DD_LOCK /* have locking mechanism */
-
-#define MAXNAMLEN 255 /* sizeof(struct dirent.d_name)-1 */
-
-
-typedef struct {
- int dd_fd; /* directory file */
- int dd_loc; /* position in buffer */
- int dd_seek;
- char *dd_buf; /* buffer */
- int dd_len; /* buffer length */
- int dd_size; /* amount of data in buffer */
- _LOCK_RECURSIVE_T dd_lock;
-} DIR;
-
-
-#define __dirfd(dir) (dir)->dd_fd
-
-/* --- redundant --- */
-
-DIR *opendir(const char *);
-struct dirent *readdir(DIR *);
-void rewinddir(DIR *);
-int closedir(DIR *);
-
-/* internal prototype */
-void _seekdir(DIR *dir,off_t offset);
-DIR *_opendir(const char *);
-
-#ifndef _POSIX_SOURCE
-long telldir (DIR *);
-void seekdir (DIR *, off_t loc);
-
-int scandir (const char *__dir,
- struct dirent ***__namelist,
- int (*select) (const struct dirent *),
- int (*compar) (const struct dirent **, const struct dirent **));
-
-int alphasort (const struct dirent **__a, const struct dirent **__b);
-#endif /* _POSIX_SOURCE */
-
-#endif
diff --git a/newlib/libc/sys/linux/sys/dlfcn.h b/newlib/libc/sys/linux/sys/dlfcn.h
deleted file mode 100644
index e96b5c17a..000000000
--- a/newlib/libc/sys/linux/sys/dlfcn.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* System dependent definitions for run-time dynamic loading.
- Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _DLFCN_H
-# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
-#endif
-
-/* The MODE argument to `dlopen' contains one of the following: */
-#define RTLD_LAZY 0x00001 /* Lazy function call binding. */
-#define RTLD_NOW 0x00002 /* Immediate function call binding. */
-#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
-#define RTLD_NOLOAD 0x00004 /* Do not load the object. */
-
-/* If the following bit is set in the MODE argument to `dlopen',
- the symbols of the loaded object and its dependencies are made
- visible as if the object were linked directly into the program. */
-#define RTLD_GLOBAL 0x00100
-
-/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL.
- The implementation does this by default and so we can define the
- value to zero. */
-#define RTLD_LOCAL 0
-
-/* Do not delete object when closed. */
-#define RTLD_NODELETE 0x01000
-
-#ifdef __USE_GNU
-/* To support profiling of shared objects it is a good idea to call
- the function found using `dlsym' using the following macro since
- these calls do not use the PLT. But this would mean the dynamic
- loader has no chance to find out when the function is called. The
- macro applies the necessary magic so that profiling is possible.
- Rewrite
- foo = (*fctp) (arg1, arg2);
- into
- foo = DL_CALL_FCT (fctp, (arg1, arg2));
-*/
-# define DL_CALL_FCT(fctp, args) \
- (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args)
-
-__BEGIN_DECLS
-
-/* This function calls the profiling functions. */
-extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW;
-
-__END_DECLS
-
-#endif
diff --git a/newlib/libc/sys/linux/sys/elfclass.h b/newlib/libc/sys/linux/sys/elfclass.h
deleted file mode 100644
index 180227d9e..000000000
--- a/newlib/libc/sys/linux/sys/elfclass.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* This file specifies the native word size of the machine, which indicates
- the ELF file class used for executables and shared objects on this
- machine. */
-
-#ifndef _LINK_H
-# error "Never use <bits/elfclass.h> directly; include <link.h> instead."
-#endif
-
-#include <bits/wordsize.h>
-
-#define __ELF_NATIVE_CLASS __WORDSIZE
-
-/* The entries in the .hash table always have a size of 32 bits. */
-typedef uint32_t Elf_Symndx;
diff --git a/newlib/libc/sys/linux/sys/errno.h b/newlib/libc/sys/linux/sys/errno.h
deleted file mode 100644
index 82c84c944..000000000
--- a/newlib/libc/sys/linux/sys/errno.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* libc/sys/linux/sys/errno.h - Errno variable and codes */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#ifndef _SYS_ERRNO_H
-#define _SYS_ERRNO_H
-
-/* --- from newlin's sys/errno.h --- */
-
-#include <sys/reent.h>
-
-#ifndef _REENT_ONLY
-#define errno (*__errno())
-extern int *__errno _PARAMS ((void));
-#endif
-
-extern __IMPORT _CONST char * _CONST _sys_errlist[];
-extern __IMPORT int _sys_nerr;
-
-#define __errno_r(ptr) ((ptr)->_errno)
-
-/* --- end of slight redundancy (the use of struct _reent->_errno is
- hard-coded in perror.c so why pretend anything else could work too ? */
-
-#define __set_errno(x) (errno = (x))
-
-#include <asm/errno.h>
-
-#define ENOTSUP EOPNOTSUPP
-#define EFTYPE 79 /* Inappropriate file type or format */
-#define EILSEQ 84
-
-#endif
diff --git a/newlib/libc/sys/linux/sys/event.h b/newlib/libc/sys/linux/sys/event.h
deleted file mode 100644
index 159e23498..000000000
--- a/newlib/libc/sys/linux/sys/event.h
+++ /dev/null
@@ -1,196 +0,0 @@
-/*-
- * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@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: src/sys/sys/event.h,v 1.19 2002/03/23 08:46:51 bde Exp $
- */
-
-#ifndef _SYS_EVENT_H_
-#define _SYS_EVENT_H_
-
-#define EVFILT_READ (-1)
-#define EVFILT_WRITE (-2)
-#define EVFILT_AIO (-3) /* attached to aio requests */
-#define EVFILT_VNODE (-4) /* attached to vnodes */
-#define EVFILT_PROC (-5) /* attached to struct proc */
-#define EVFILT_SIGNAL (-6) /* attached to struct proc */
-#define EVFILT_TIMER (-7) /* timers */
-#define EVFILT_NETDEV (-8) /* network devices */
-
-#define EVFILT_SYSCOUNT 8
-
-#define EV_SET(kevp, a, b, c, d, e, f) do { \
- (kevp)->ident = (a); \
- (kevp)->filter = (b); \
- (kevp)->flags = (c); \
- (kevp)->fflags = (d); \
- (kevp)->data = (e); \
- (kevp)->udata = (f); \
-} while(0)
-
-struct kevent {
- unsigned int * ident; /* identifier for this event */
- short filter; /* filter for event */
- u_short flags;
- u_int fflags;
- int * data;
- void *udata; /* opaque user data identifier */
-};
-
-/* actions */
-#define EV_ADD 0x0001 /* add event to kq (implies enable) */
-#define EV_DELETE 0x0002 /* delete event from kq */
-#define EV_ENABLE 0x0004 /* enable event */
-#define EV_DISABLE 0x0008 /* disable event (not reported) */
-
-/* flags */
-#define EV_ONESHOT 0x0010 /* only report one occurrence */
-#define EV_CLEAR 0x0020 /* clear event state after reporting */
-
-#define EV_SYSFLAGS 0xF000 /* reserved by system */
-#define EV_FLAG1 0x2000 /* filter-specific flag */
-
-/* returned values */
-#define EV_EOF 0x8000 /* EOF detected */
-#define EV_ERROR 0x4000 /* error, data contains errno */
-
-/*
- * data/hint flags for EVFILT_{READ|WRITE}, shared with userspace
- */
-#define NOTE_LOWAT 0x0001 /* low water mark */
-
-/*
- * data/hint flags for EVFILT_VNODE, shared with userspace
- */
-#define NOTE_DELETE 0x0001 /* vnode was removed */
-#define NOTE_WRITE 0x0002 /* data contents changed */
-#define NOTE_EXTEND 0x0004 /* size increased */
-#define NOTE_ATTRIB 0x0008 /* attributes changed */
-#define NOTE_LINK 0x0010 /* link count changed */
-#define NOTE_RENAME 0x0020 /* vnode was renamed */
-#define NOTE_REVOKE 0x0040 /* vnode access was revoked */
-
-/*
- * data/hint flags for EVFILT_PROC, shared with userspace
- */
-#define NOTE_EXIT 0x80000000 /* process exited */
-#define NOTE_FORK 0x40000000 /* process forked */
-#define NOTE_EXEC 0x20000000 /* process exec'd */
-#define NOTE_PCTRLMASK 0xf0000000 /* mask for hint bits */
-#define NOTE_PDATAMASK 0x000fffff /* mask for pid */
-
-/* additional flags for EVFILT_PROC */
-#define NOTE_TRACK 0x00000001 /* follow across forks */
-#define NOTE_TRACKERR 0x00000002 /* could not track child */
-#define NOTE_CHILD 0x00000004 /* am a child process */
-
-/*
- * data/hint flags for EVFILT_NETDEV, shared with userspace
- */
-#define NOTE_LINKUP 0x0001 /* link is up */
-#define NOTE_LINKDOWN 0x0002 /* link is down */
-#define NOTE_LINKINV 0x0004 /* link state is invalid */
-
-/*
- * This is currently visible to userland to work around broken
- * programs which pull in <sys/proc.h> or <sys/select.h>.
- */
-#include <sys/queue.h>
-struct knote;
-
-#ifdef _KERNEL
-
-#ifdef MALLOC_DECLARE
-MALLOC_DECLARE(M_KQUEUE);
-#endif
-
-#define KNOTE(list, hint) if ((list) != NULL) knote(list, hint)
-
-/*
- * Flag indicating hint is a signal. Used by EVFILT_SIGNAL, and also
- * shared by EVFILT_PROC (all knotes attached to p->p_klist)
- */
-#define NOTE_SIGNAL 0x08000000
-
-struct filterops {
- int f_isfd; /* true if ident == filedescriptor */
- int (*f_attach)(struct knote *kn);
- void (*f_detach)(struct knote *kn);
- int (*f_event)(struct knote *kn, long hint);
-};
-
-struct knote {
- SLIST_ENTRY(knote) kn_link; /* for fd */
- SLIST_ENTRY(knote) kn_selnext; /* for struct selinfo */
- TAILQ_ENTRY(knote) kn_tqe;
- struct kqueue *kn_kq; /* which queue we are on */
- struct kevent kn_kevent;
- int kn_status;
- int kn_sfflags; /* saved filter flags */
- intptr_t kn_sdata; /* saved data field */
- union {
- struct file *p_fp; /* file data pointer */
- struct proc *p_proc; /* proc pointer */
- } kn_ptr;
- struct filterops *kn_fop;
- caddr_t kn_hook;
-#define KN_ACTIVE 0x01 /* event has been triggered */
-#define KN_QUEUED 0x02 /* event is on queue */
-#define KN_DISABLED 0x04 /* event is disabled */
-#define KN_DETACHED 0x08 /* knote is detached */
-
-#define kn_id kn_kevent.ident
-#define kn_filter kn_kevent.filter
-#define kn_flags kn_kevent.flags
-#define kn_fflags kn_kevent.fflags
-#define kn_data kn_kevent.data
-#define kn_fp kn_ptr.p_fp
-};
-
-struct thread;
-struct proc;
-
-extern void knote(struct klist *list, long hint);
-extern void knote_remove(struct thread *p, struct klist *list);
-extern void knote_fdclose(struct thread *p, int fd);
-extern int kqueue_register(struct kqueue *kq,
- struct kevent *kev, struct thread *p);
-extern int kqueue_add_filteropts(int filt, struct filterops *filtops);
-extern int kqueue_del_filteropts(int filt);
-
-#else /* !_KERNEL */
-
-#include <sys/cdefs.h>
-struct timespec;
-
-__BEGIN_DECLS
-int kqueue(void);
-int kevent(int kq, const struct kevent *changelist, int nchanges,
- struct kevent *eventlist, int nevents,
- const struct timespec *timeout);
-__END_DECLS
-
-#endif /* !_KERNEL */
-
-#endif /* !_SYS_EVENT_H_ */
diff --git a/newlib/libc/sys/linux/sys/fcntl.h b/newlib/libc/sys/linux/sys/fcntl.h
deleted file mode 100644
index 78914fd8f..000000000
--- a/newlib/libc/sys/linux/sys/fcntl.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* libc/sys/linux/sys/fcntl.h - File access */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#ifndef _SYS_FCNTL_H
-#define _SYS_FCNTL_H
-
-#include <sys/types.h>
-#include <linux/fcntl.h>
-
-/* --- redundant stuff below --- */
-
-#include <_ansi.h>
-
-extern int creat _PARAMS ((const char *, mode_t));
-extern int _open _PARAMS ((const char *, int, ...));
-
-#ifdef __KERNEL_PROTOTYPES
-extern int open(const char *pathname, int flags, mode_t mode);
-extern int fcntl(int fd, int cmd, long arg);
-#else
-extern int open _PARAMS ((const char *, int, ...));
-extern int fcntl _PARAMS ((int, int, ...));
-#endif
-
-extern int _fcntl _PARAMS ((int, int, ...));
-
-#endif
diff --git a/newlib/libc/sys/linux/sys/features.h b/newlib/libc/sys/linux/sys/features.h
deleted file mode 100644
index 34cd0eb80..000000000
--- a/newlib/libc/sys/linux/sys/features.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef _SYS_FEATURES_H
-#define _SYS_FEATURES_H
-
-#include <bits/posix_opt.h>
-
-/* We do not support asynchronous I/O. */
-#undef _POSIX_ASYNCHRONOUS_IO
-#undef _POSIX_ASYNC_IO
-#undef _LFS_ASYNCHRONOUS_IO
-#undef _LFS64_ASYNCHRONOUS_IO
-
-/* POSIX message queues are supported. */
-#undef _POSIX_MESSAGE_PASSING
-#define _POSIX_MESSAGE_PASSING 1
-
-#endif /* _SYS_FEATURES_H */
diff --git a/newlib/libc/sys/linux/sys/file.h b/newlib/libc/sys/linux/sys/file.h
deleted file mode 100644
index 875ee18c4..000000000
--- a/newlib/libc/sys/linux/sys/file.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* libc/sys/linux/sys/file.h - BSD compatibility */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#ifndef _SYS_FILE_H
-#define _SYS_FILE_H
-
-#include <sys/fcntl.h>
-
-int flock(int fd,int operation);
-
-#endif
diff --git a/newlib/libc/sys/linux/sys/ioccom.h b/newlib/libc/sys/linux/sys/ioccom.h
deleted file mode 100644
index 4a063e973..000000000
--- a/newlib/libc/sys/linux/sys/ioccom.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ioccom.h 8.2 (Berkeley) 3/28/94
- * $FreeBSD: src/sys/sys/ioccom.h,v 1.14 2002/04/10 04:53:37 imp Exp $
- */
-
-#ifndef _SYS_IOCCOM_H_
-#define _SYS_IOCCOM_H_
-
-/*
- * Ioctl's have the command encoded in the lower word, and the size of
- * any in or out parameters in the upper word. The high 3 bits of the
- * upper word are used to encode the in/out status of the parameter.
- */
-#define IOCPARM_MASK 0x1fff /* parameter length, at most 13 bits */
-#define IOCPARM_LEN(x) (((x) >> 16) & IOCPARM_MASK)
-#define IOCBASECMD(x) ((x) & ~(IOCPARM_MASK << 16))
-#define IOCGROUP(x) (((x) >> 8) & 0xff)
-
-#define IOCPARM_MAX PAGE_SIZE /* max size of ioctl, mult. of PAGE_SIZE */
-#define IOC_VOID 0x20000000 /* no parameters */
-#define IOC_OUT 0x40000000 /* copy out parameters */
-#define IOC_IN 0x80000000 /* copy in parameters */
-#define IOC_INOUT (IOC_IN|IOC_OUT)
-#define IOC_DIRMASK 0xe0000000 /* mask for IN/OUT/VOID */
-
-#define _IOC(inout,group,num,len) \
- ((unsigned long)(inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num)))
-#define _IO(g,n) _IOC(IOC_VOID, (g), (n), 0)
-#define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t))
-#define _IOW(g,n,t) _IOC(IOC_IN, (g), (n), sizeof(t))
-/* this should be _IORW, but stdio got there first */
-#define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t))
-
-#ifndef _KERNEL
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int ioctl(int, unsigned long, ...);
-__END_DECLS
-
-#endif
-
-#endif /* !_SYS_IOCCOM_H_ */
diff --git a/newlib/libc/sys/linux/sys/ioctl.h b/newlib/libc/sys/linux/sys/ioctl.h
deleted file mode 100644
index 12e0cd22d..000000000
--- a/newlib/libc/sys/linux/sys/ioctl.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* libc/sys/linux/sys/ioctl.h - ioctl prototype */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#ifndef _SYS_IOCTL_H
-#define _SYS_IOCTL_H
-
-int ioctl(int fd,int request,...);
-
-#endif
diff --git a/newlib/libc/sys/linux/sys/libc-tsd.h b/newlib/libc/sys/linux/sys/libc-tsd.h
deleted file mode 100644
index 80bd1d33d..000000000
--- a/newlib/libc/sys/linux/sys/libc-tsd.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* libc-internal interface for thread-specific data. Stub version.
- Copyright (C) 1998, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _BITS_LIBC_TSD_H
-#define _BITS_LIBC_TSD_H 1
-
-/* This file defines the following macros for accessing a small fixed
- set of thread-specific `void *' data used only internally by libc.
-
- __libc_tsd_define(CLASS, KEY) -- Define or declare a `void *' datum
- for KEY. CLASS can be `static' for
- keys used in only one source file,
- empty for global definitions, or
- `extern' for global declarations.
- __libc_tsd_get(KEY) -- Return the `void *' datum for KEY.
- __libc_tsd_set(KEY, VALUE) -- Set the datum for KEY to VALUE.
-
- The set of available KEY's will usually be provided as an enum,
- and contains (at least):
- _LIBC_TSD_KEY_MALLOC
- _LIBC_TSD_KEY_DL_ERROR
- _LIBC_TSD_KEY_RPC_VARS
- All uses must be the literal _LIBC_TSD_* name in the __libc_tsd_* macros.
- Some implementations may not provide any enum at all and instead
- using string pasting in the macros. */
-
-/* This is the generic/stub implementation for wholly single-threaded
- systems. We don't define an enum for the possible key values, because
- the KEYs translate directly into variables by macro magic. */
-
-#define __libc_tsd_define(CLASS, KEY) CLASS void *__libc_tsd_##KEY##_data;
-#define __libc_tsd_get(KEY) (__libc_tsd_##KEY##_data)
-#define __libc_tsd_set(KEY, VALUE) (__libc_tsd_##KEY##_data = (VALUE))
-
-
-#endif /* bits/libc-tsd.h */
diff --git a/newlib/libc/sys/linux/sys/link.h b/newlib/libc/sys/linux/sys/link.h
deleted file mode 100644
index 470b4d3e5..000000000
--- a/newlib/libc/sys/linux/sys/link.h
+++ /dev/null
@@ -1,4 +0,0 @@
-struct link_map_machine
- {
- /* empty by default */
- };
diff --git a/newlib/libc/sys/linux/sys/linux_time.h b/newlib/libc/sys/linux/sys/linux_time.h
deleted file mode 100644
index e71f70bba..000000000
--- a/newlib/libc/sys/linux/sys/linux_time.h
+++ /dev/null
@@ -1,76 +0,0 @@
-#ifndef _LINUX_TIME_H
-#define _LINUX_TIME_H
-
-#include <asm/param.h>
-#include <sys/types.h>
-
-#ifndef _STRUCT_TIMESPEC
-#define _STRUCT_TIMESPEC
-struct timespec {
- time_t tv_sec; /* seconds */
- long tv_nsec; /* nanoseconds */
-};
-#endif /* _STRUCT_TIMESPEC */
-
-/*
- * Change timeval to jiffies, trying to avoid the
- * most obvious overflows..
- *
- * And some not so obvious.
- *
- * Note that we don't want to return MAX_LONG, because
- * for various timeout reasons we often end up having
- * to wait "jiffies+1" in order to guarantee that we wait
- * at _least_ "jiffies" - so "jiffies+1" had better still
- * be positive.
- */
-#define MAX_JIFFY_OFFSET ((~0UL >> 1)-1)
-
-static __inline__ unsigned long
-timespec_to_jiffies(struct timespec *value)
-{
- unsigned long sec = value->tv_sec;
- long nsec = value->tv_nsec;
-
- if (sec >= (MAX_JIFFY_OFFSET / HZ))
- return MAX_JIFFY_OFFSET;
- nsec += 1000000000L / HZ - 1;
- nsec /= 1000000000L / HZ;
- return HZ * sec + nsec;
-}
-
-static __inline__ void
-jiffies_to_timespec(unsigned long jiffies, struct timespec *value)
-{
- value->tv_nsec = (jiffies % HZ) * (1000000000L / HZ);
- value->tv_sec = jiffies / HZ;
-}
-
-#ifndef _STRUCT_TIMEVAL
-#define _STRUCT_TIMEVAL
-struct timeval {
- time_t tv_sec; /* seconds */
- suseconds_t tv_usec; /* microseconds */
-};
-#endif
-
-struct timezone {
- int tz_minuteswest; /* minutes west of Greenwich */
- int tz_dsttime; /* type of dst correction */
-};
-
-#define ITIMER_REAL 0
-#define ITIMER_VIRTUAL 1
-#define ITIMER_PROF 2
-
-struct itimerspec {
- struct timespec it_interval; /* timer period */
- struct timespec it_value; /* timer expiration */
-};
-
-struct itimerval {
- struct timeval it_interval; /* timer interval */
- struct timeval it_value; /* current value */
-};
-
-#endif
diff --git a/newlib/libc/sys/linux/sys/lock.h b/newlib/libc/sys/linux/sys/lock.h
deleted file mode 100644
index 167392e10..000000000
--- a/newlib/libc/sys/linux/sys/lock.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef __SYS_LOCK_H__
-#define __SYS_LOCK_H__
-
-#include <machine/weakalias.h>
-#include <features.h>
-
-#define _LIBC 1
-#define NOT_IN_libc 1
-
-#ifndef __USE_GNU
-#define __USE_GNU 1
-#endif
-
-#include <bits/libc-lock.h>
-
-typedef __libc_lock_t _LOCK_T;
-typedef __libc_lock_recursive_t _LOCK_RECURSIVE_T;
-
-#define __LOCK_INIT(class,lock) \
- __libc_lock_define_initialized(class, lock)
-#define __LOCK_INIT_RECURSIVE(class, lock) \
- __libc_lock_define_initialized_recursive(class, lock)
-
-#define __lock_init(__lock) __libc_lock_init(__lock)
-#define __lock_init_recursive(__lock) __libc_lock_init_recursive(__lock)
-#define __lock_acquire(__lock) __libc_lock_lock(__lock)
-#define __lock_acquire_recursive(__lock) __libc_lock_lock_recursive(__lock)
-#define __lock_release(__lock) __libc_lock_unlock(__lock)
-#define __lock_release_recursive(__lock) __libc_lock_unlock_recursive(__lock)
-#define __lock_try_acquire(__lock) __libc_lock_trylock(__lock)
-#define __lock_try_acquire_recursive(__lock) \
- __libc_lock_trylock_recursive(__lock)
-#define __lock_close(__lock) __libc_lock_fini(__lock)
-#define __lock_close_recursive(__lock) __libc_lock_fini_recursive(__lock)
-
-#endif /* __SYS_LOCK_H__ */
diff --git a/newlib/libc/sys/linux/sys/param.h b/newlib/libc/sys/linux/sys/param.h
deleted file mode 100644
index de0b4f61c..000000000
--- a/newlib/libc/sys/linux/sys/param.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)param.h 5.8 (Berkeley) 6/28/91
- * $FreeBSD: src/sys/i386/include/param.h,v 1.62 2001/09/12 08:37:33 julian Exp $
- */
-
-/*
- * Round p (pointer or byte index) up to a correctly-aligned value
- * for all data types (int, long, ...). The result is unsigned int
- * and must be cast to any desired pointer type.
- */
-#ifndef _ALIGNBYTES
-#define _ALIGNBYTES (sizeof(int) - 1)
-#endif
-#ifndef _ALIGN
-#define _ALIGN(p) (((unsigned)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
-#endif
-
-/* Macros for min/max. */
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
-
-#include <machine/param.h>
-#include <sys/user.h>
diff --git a/newlib/libc/sys/linux/sys/resource.h b/newlib/libc/sys/linux/sys/resource.h
deleted file mode 100644
index f804731f9..000000000
--- a/newlib/libc/sys/linux/sys/resource.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* libc/sys/linux/sys/resource.h - Resource usage */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#ifndef _SYS_RESOURCE_H
-#define _SYS_RESOURCE_H
-
-#include <sys/types.h>
-#include <bits/resource.h>
-
-#endif
diff --git a/newlib/libc/sys/linux/sys/select.h b/newlib/libc/sys/linux/sys/select.h
deleted file mode 100644
index ddd2ac9d2..000000000
--- a/newlib/libc/sys/linux/sys/select.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef _SYS_SELECT_H
-#define _SYS_SELECT_H 1
-
-#include <sys/types.h>
-#include <bits/sigset.h>
-#include <time.h>
-
-extern int select (int __nfds, fd_set *__restrict __readfds,
- fd_set *__restrict __writefds,
- fd_set *__restrict __exceptfds,
- struct timeval *__restrict __timeout) __THROW;
-
-#endif /* sys/select.h */
diff --git a/newlib/libc/sys/linux/sys/signal.h b/newlib/libc/sys/linux/sys/signal.h
deleted file mode 100644
index cef7058cd..000000000
--- a/newlib/libc/sys/linux/sys/signal.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* libc/sys/linux/sys/signal.h - Signal handling */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#ifndef _SYS_SIGNAL_H
-#define _SYS_SIGNAL_H
-#define _SIGNAL_H
-
-#include <sys/types.h>
-#include <bits/sigset.h>
-#include <bits/signum.h>
-
-/* we want RT signals so we must override the definition of sigset_t
- and NSIG */
-
-#undef NSIG
-#define NSIG _NSIG
-#undef sigset_t
-#define sigset_t __sigset_t
-
-typedef void (*_sig_func_ptr) (int);
-typedef _sig_func_ptr __sighandler_t;
-
-#include <bits/siginfo.h>
-#include <bits/sigaction.h>
-#include <bits/sigstack.h>
-
-/* --- include/signal.h thinks it knows better :-( --- */
-
-#undef SIG_DFL
-#undef SIG_IGN
-#undef SIG_ERR
-
-/* --- redundant stuff below --- */
-
-#include <_ansi.h>
-
-int _EXFUN(kill, (int, int));
-_VOID _EXFUN(psignal, (int, const char *));
-int _EXFUN(sigaction, (int, const struct sigaction *, struct sigaction *));
-int _EXFUN(sigaddset, (sigset_t *, const int));
-int _EXFUN(sigdelset, (sigset_t *, const int));
-int _EXFUN(sigismember, (const sigset_t *, int));
-int _EXFUN(sigfillset, (sigset_t *));
-int _EXFUN(sigemptyset, (sigset_t *));
-int _EXFUN(sigpending, (sigset_t *));
-int _EXFUN(sigsuspend, (const sigset_t *));
-int _EXFUN(sigpause, (int));
-
-#ifndef _POSIX_SOURCE
-extern const char *const sys_siglist[];
-typedef __sighandler_t sig_t; /* BSDism */
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/sys/socket.h b/newlib/libc/sys/linux/sys/socket.h
deleted file mode 100644
index b7a3dd1f1..000000000
--- a/newlib/libc/sys/linux/sys/socket.h
+++ /dev/null
@@ -1,471 +0,0 @@
-/*
- * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)socket.h 8.4 (Berkeley) 2/21/94
- * $FreeBSD: src/sys/sys/socket.h,v 1.60 2002/04/20 02:24:35 mike Exp $
- */
-
-#ifndef _SYS_SOCKET_H_
-#define _SYS_SOCKET_H_
-
-#include <sys/types.h>
-#include <sys/_types.h>
-#include <netinet/in.h>
-#include <netdb.h>
-
-/* Needed by linuxthreads. */
-
-# define __SOCKADDR_ARG struct sockaddr *__restrict
-# define __CONST_SOCKADDR_ARG __const struct sockaddr *
-
-/*
- * Definitions related to sockets: types, address families, options.
- */
-
-/*
- * Data types.
- */
-#ifdef _BSD_SA_FAMILY_T_
-typedef _BSD_SA_FAMILY_T_ sa_family_t;
-#undef _BSD_SA_FAMILY_T_
-#endif
-
-#ifdef _BSD_SOCKLEN_T_
-typedef _BSD_SOCKLEN_T_ socklen_t;
-#undef _BSD_SOCKLEN_T_
-#endif
-
-/*
- * Types
- */
-#define SOCK_STREAM 1 /* stream socket */
-#define SOCK_DGRAM 2 /* datagram socket */
-#define SOCK_RAW 3 /* raw-protocol interface */
-#define SOCK_RDM 4 /* reliably-delivered message */
-#define SOCK_SEQPACKET 5 /* sequenced packet stream */
-
-/*
- * Option flags per-socket.
- */
-#define SO_DEBUG 0x0001 /* turn on debugging info recording */
-#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */
-#define SO_REUSEADDR 0x0004 /* allow local address reuse */
-#define SO_KEEPALIVE 0x0008 /* keep connections alive */
-#define SO_DONTROUTE 0x0010 /* just use interface addresses */
-#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */
-#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */
-#define SO_LINGER 0x0080 /* linger on close if data present */
-#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
-#define SO_REUSEPORT 0x0200 /* allow local address & port reuse */
-#define SO_TIMESTAMP 0x0400 /* timestamp received dgram traffic */
-#define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */
-
-/*
- * Additional options, not kept in so_options.
- */
-#define SO_SNDBUF 0x1001 /* send buffer size */
-#define SO_RCVBUF 0x1002 /* receive buffer size */
-#define SO_SNDLOWAT 0x1003 /* send low-water mark */
-#define SO_RCVLOWAT 0x1004 /* receive low-water mark */
-#define SO_SNDTIMEO 0x1005 /* send timeout */
-#define SO_RCVTIMEO 0x1006 /* receive timeout */
-#define SO_ERROR 0x1007 /* get error status and clear */
-#define SO_TYPE 0x1008 /* get socket type */
-/*efine SO_PRIVSTATE 0x1009 get/deny privileged state */
-
-/*
- * Structure used for manipulating linger option.
- */
-struct linger {
- int l_onoff; /* option on/off */
- int l_linger; /* linger time */
-};
-
-struct accept_filter_arg {
- char af_name[16];
- char af_arg[256-16];
-};
-
-/*
- * Level number for (get/set)sockopt() to apply to socket itself.
- */
-#define SOL_SOCKET 0xffff /* options for socket level */
-
-/*
- * Address families.
- */
-#define AF_UNSPEC 0 /* unspecified */
-#define AF_LOCAL 1 /* local to host (pipes, portals) */
-#define AF_UNIX AF_LOCAL /* backward compatibility */
-#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
-#define AF_IMPLINK 3 /* arpanet imp addresses */
-#define AF_PUP 4 /* pup protocols: e.g. BSP */
-#define AF_CHAOS 5 /* mit CHAOS protocols */
-#define AF_NS 6 /* XEROX NS protocols */
-#define AF_ISO 7 /* ISO protocols */
-#define AF_OSI AF_ISO
-#define AF_ECMA 8 /* European computer manufacturers */
-#define AF_DATAKIT 9 /* datakit protocols */
-#define AF_CCITT 10 /* CCITT protocols, X.25 etc */
-#define AF_SNA 11 /* IBM SNA */
-#define AF_DECnet 12 /* DECnet */
-#define AF_DLI 13 /* DEC Direct data link interface */
-#define AF_LAT 14 /* LAT */
-#define AF_HYLINK 15 /* NSC Hyperchannel */
-#define AF_APPLETALK 16 /* Apple Talk */
-#define AF_ROUTE 17 /* Internal Routing Protocol */
-#define AF_LINK 18 /* Link layer interface */
-#define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */
-#define AF_COIP 20 /* connection-oriented IP, aka ST II */
-#define AF_CNT 21 /* Computer Network Technology */
-#define pseudo_AF_RTIP 22 /* Help Identify RTIP packets */
-#define AF_IPX 23 /* Novell Internet Protocol */
-#define AF_SIP 24 /* Simple Internet Protocol */
-#define pseudo_AF_PIP 25 /* Help Identify PIP packets */
-#define AF_ISDN 26 /* Integrated Services Digital Network*/
-#define AF_E164 AF_ISDN /* CCITT E.164 recommendation */
-#define pseudo_AF_KEY 27 /* Internal key-management function */
-#define AF_INET6 28 /* IPv6 */
-#define AF_NATM 29 /* native ATM access */
-#define AF_ATM 30 /* ATM */
-#define pseudo_AF_HDRCMPLT 31 /* Used by BPF to not rewrite headers
- * in interface output routine
- */
-#define AF_NETGRAPH 32 /* Netgraph sockets */
-#define AF_SLOW 33 /* 802.3ad slow protocol */
-#define AF_SCLUSTER 34 /* Sitara cluster protocol */
-#define AF_MAX 35
-
-/*
- * Structure used by kernel to store most
- * addresses.
- */
-struct sockaddr {
- sa_family_t sa_family; /* address family */
- char sa_data[14]; /* actually longer; address value */
-};
-#define SOCK_MAXADDRLEN 255 /* longest possible addresses */
-
-/*
- * Structure used by kernel to pass protocol
- * information in raw sockets.
- */
-struct sockproto {
- u_short sp_family; /* address family */
- u_short sp_protocol; /* protocol */
-};
-
-/*
- * RFC 2553: protocol-independent placeholder for socket addresses
- */
-#define _SS_MAXSIZE 128U
-#define _SS_ALIGNSIZE (sizeof(int64_t))
-#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) - sizeof(sa_family_t))
-#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) - sizeof(sa_family_t) - \
- _SS_PAD1SIZE - _SS_ALIGNSIZE)
-
-struct sockaddr_storage {
- unsigned char ss_len; /* address length */
- sa_family_t ss_family; /* address family */
- char __ss_pad1[_SS_PAD1SIZE];
- int64_t __ss_align; /* force desired structure storage alignment */
- char __ss_pad2[_SS_PAD2SIZE];
-};
-
-/*
- * Protocol families, same as address families for now.
- */
-#define PF_UNSPEC AF_UNSPEC
-#define PF_LOCAL AF_LOCAL
-#define PF_UNIX PF_LOCAL /* backward compatibility */
-#define PF_INET AF_INET
-#define PF_IMPLINK AF_IMPLINK
-#define PF_PUP AF_PUP
-#define PF_CHAOS AF_CHAOS
-#define PF_NS AF_NS
-#define PF_ISO AF_ISO
-#define PF_OSI AF_ISO
-#define PF_ECMA AF_ECMA
-#define PF_DATAKIT AF_DATAKIT
-#define PF_CCITT AF_CCITT
-#define PF_SNA AF_SNA
-#define PF_DECnet AF_DECnet
-#define PF_DLI AF_DLI
-#define PF_LAT AF_LAT
-#define PF_HYLINK AF_HYLINK
-#define PF_APPLETALK AF_APPLETALK
-#define PF_ROUTE AF_ROUTE
-#define PF_LINK AF_LINK
-#define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */
-#define PF_COIP AF_COIP
-#define PF_CNT AF_CNT
-#define PF_SIP AF_SIP
-#define PF_IPX AF_IPX /* same format as AF_NS */
-#define PF_RTIP pseudo_AF_RTIP /* same format as AF_INET */
-#define PF_PIP pseudo_AF_PIP
-#define PF_ISDN AF_ISDN
-#define PF_KEY pseudo_AF_KEY
-#define PF_INET6 AF_INET6
-#define PF_NATM AF_NATM
-#define PF_ATM AF_ATM
-#define PF_NETGRAPH AF_NETGRAPH
-#define PF_SLOW AF_SLOW
-#define PF_SCLUSTER AF_SCLUSTER
-
-#define PF_MAX AF_MAX
-
-/*
- * Definitions for network related sysctl, CTL_NET.
- *
- * Second level is protocol family.
- * Third level is protocol number.
- *
- * Further levels are defined by the individual families below.
- */
-#define NET_MAXID AF_MAX
-
-#define CTL_NET_NAMES { \
- { 0, 0 }, \
- { "unix", CTLTYPE_NODE }, \
- { "inet", CTLTYPE_NODE }, \
- { "implink", CTLTYPE_NODE }, \
- { "pup", CTLTYPE_NODE }, \
- { "chaos", CTLTYPE_NODE }, \
- { "xerox_ns", CTLTYPE_NODE }, \
- { "iso", CTLTYPE_NODE }, \
- { "emca", CTLTYPE_NODE }, \
- { "datakit", CTLTYPE_NODE }, \
- { "ccitt", CTLTYPE_NODE }, \
- { "ibm_sna", CTLTYPE_NODE }, \
- { "decnet", CTLTYPE_NODE }, \
- { "dec_dli", CTLTYPE_NODE }, \
- { "lat", CTLTYPE_NODE }, \
- { "hylink", CTLTYPE_NODE }, \
- { "appletalk", CTLTYPE_NODE }, \
- { "route", CTLTYPE_NODE }, \
- { "link_layer", CTLTYPE_NODE }, \
- { "xtp", CTLTYPE_NODE }, \
- { "coip", CTLTYPE_NODE }, \
- { "cnt", CTLTYPE_NODE }, \
- { "rtip", CTLTYPE_NODE }, \
- { "ipx", CTLTYPE_NODE }, \
- { "sip", CTLTYPE_NODE }, \
- { "pip", CTLTYPE_NODE }, \
- { "isdn", CTLTYPE_NODE }, \
- { "key", CTLTYPE_NODE }, \
- { "inet6", CTLTYPE_NODE }, \
- { "natm", CTLTYPE_NODE }, \
- { "atm", CTLTYPE_NODE }, \
- { "hdrcomplete", CTLTYPE_NODE }, \
- { "netgraph", CTLTYPE_NODE }, \
- { "snp", CTLTYPE_NODE }, \
- { "scp", CTLTYPE_NODE }, \
-}
-
-/*
- * PF_ROUTE - Routing table
- *
- * Three additional levels are defined:
- * Fourth: address family, 0 is wildcard
- * Fifth: type of info, defined below
- * Sixth: flag(s) to mask with for NET_RT_FLAGS
- */
-#define NET_RT_DUMP 1 /* dump; may limit to a.f. */
-#define NET_RT_FLAGS 2 /* by flags, e.g. RESOLVING */
-#define NET_RT_IFLIST 3 /* survey interface list */
-#define NET_RT_MAXID 4
-
-#define CTL_NET_RT_NAMES { \
- { 0, 0 }, \
- { "dump", CTLTYPE_STRUCT }, \
- { "flags", CTLTYPE_STRUCT }, \
- { "iflist", CTLTYPE_STRUCT }, \
-}
-
-/*
- * Maximum queue length specifiable by listen.
- */
-#ifndef SOMAXCONN
-#define SOMAXCONN 128
-#endif
-
-/*
- * Message header for recvmsg and sendmsg calls.
- * Used value-result for recvmsg, value only for sendmsg.
- */
-struct msghdr {
- void *msg_name; /* optional address */
- socklen_t msg_namelen; /* size of address */
- struct iovec *msg_iov; /* scatter/gather array */
- int msg_iovlen; /* # elements in msg_iov */
- void *msg_control; /* ancillary data, see below */
- socklen_t msg_controllen; /* ancillary data buffer len */
- int msg_flags; /* flags on received message */
-};
-
-#define MSG_OOB 0x1 /* process out-of-band data */
-#define MSG_PEEK 0x2 /* peek at incoming message */
-#define MSG_DONTROUTE 0x4 /* send without using routing tables */
-#define MSG_EOR 0x8 /* data completes record */
-#define MSG_TRUNC 0x10 /* data discarded before delivery */
-#define MSG_CTRUNC 0x20 /* control data lost before delivery */
-#define MSG_WAITALL 0x40 /* wait for full request or error */
-#define MSG_DONTWAIT 0x80 /* this message should be nonblocking */
-#define MSG_EOF 0x100 /* data completes connection */
-#define MSG_COMPAT 0x8000 /* used in sendit() */
-
-/*
- * Header for ancillary data objects in msg_control buffer.
- * Used for additional information with/about a datagram
- * not expressible by flags. The format is a sequence
- * of message elements headed by cmsghdr structures.
- */
-struct cmsghdr {
- socklen_t cmsg_len; /* data byte count, including hdr */
- int cmsg_level; /* originating protocol */
- int cmsg_type; /* protocol-specific type */
-/* followed by unsigned char cmsg_data[]; */
-};
-
-/*
- * While we may have more groups than this, the cmsgcred struct must
- * be able to fit in an mbuf, and NGROUPS_MAX is too large to allow
- * this.
-*/
-#define CMGROUP_MAX 16
-
-/*
- * Credentials structure, used to verify the identity of a peer
- * process that has sent us a message. This is allocated by the
- * peer process but filled in by the kernel. This prevents the
- * peer from lying about its identity. (Note that cmcred_groups[0]
- * is the effective GID.)
- */
-struct cmsgcred {
- pid_t cmcred_pid; /* PID of sending process */
- uid_t cmcred_uid; /* real UID of sending process */
- uid_t cmcred_euid; /* effective UID of sending process */
- gid_t cmcred_gid; /* real GID of sending process */
- short cmcred_ngroups; /* number or groups */
- gid_t cmcred_groups[CMGROUP_MAX]; /* groups */
-};
-
-/* given pointer to struct cmsghdr, return pointer to data */
-#define CMSG_DATA(cmsg) ((unsigned char *)(cmsg) + \
- _ALIGN(sizeof(struct cmsghdr)))
-
-/* given pointer to struct cmsghdr, return pointer to next cmsghdr */
-#define CMSG_NXTHDR(mhdr, cmsg) \
- (((caddr_t)(cmsg) + _ALIGN((cmsg)->cmsg_len) + \
- _ALIGN(sizeof(struct cmsghdr)) > \
- (caddr_t)(mhdr)->msg_control + (mhdr)->msg_controllen) ? \
- (struct cmsghdr *)NULL : \
- (struct cmsghdr *)((caddr_t)(cmsg) + _ALIGN((cmsg)->cmsg_len)))
-
-#define CMSG_FIRSTHDR(mhdr) ((struct cmsghdr *)(mhdr)->msg_control)
-
-/* RFC 2292 additions */
-
-#define CMSG_SPACE(l) (_ALIGN(sizeof(struct cmsghdr)) + _ALIGN(l))
-#define CMSG_LEN(l) (_ALIGN(sizeof(struct cmsghdr)) + (l))
-
-#ifdef _KERNEL
-#define CMSG_ALIGN(n) _ALIGN(n)
-#endif
-
-/* "Socket"-level control message types: */
-#define SCM_RIGHTS 0x01 /* access rights (array of int) */
-#define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */
-#define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */
-
-/*
- * 4.3 compat sockaddr, move to compat file later
- */
-struct osockaddr {
- u_short sa_family; /* address family */
- char sa_data[14]; /* up to 14 bytes of direct address */
-};
-
-/*
- * 4.3-compat message header (move to compat file later).
- */
-struct omsghdr {
- caddr_t msg_name; /* optional address */
- int msg_namelen; /* size of address */
- struct iovec *msg_iov; /* scatter/gather array */
- int msg_iovlen; /* # elements in msg_iov */
- caddr_t msg_accrights; /* access rights sent/received */
- int msg_accrightslen;
-};
-
-/*
- * howto arguments for shutdown(2), specified by Posix.1g.
- */
-#define SHUT_RD 0 /* shut down the reading side */
-#define SHUT_WR 1 /* shut down the writing side */
-#define SHUT_RDWR 2 /* shut down both sides */
-
-/*
- * sendfile(2) header/trailer struct
- */
-struct sf_hdtr {
- struct iovec *headers; /* pointer to an array of header struct iovec's */
- int hdr_cnt; /* number of header iovec's */
- struct iovec *trailers; /* pointer to an array of trailer struct iovec's */
- int trl_cnt; /* number of trailer iovec's */
-};
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-int accept(int, struct sockaddr *, socklen_t *);
-int bind(int, const struct sockaddr *, socklen_t);
-int connect(int, const struct sockaddr *, socklen_t);
-int getpeername(int, struct sockaddr *, socklen_t *);
-int getsockname(int, struct sockaddr *, socklen_t *);
-int getsockopt(int, int, int, void *, socklen_t *);
-int listen(int, int);
-ssize_t recv(int, void *, size_t, int);
-ssize_t recvfrom(int, void *, size_t, int, struct sockaddr *, socklen_t *);
-ssize_t recvmsg(int, struct msghdr *, int);
-ssize_t send(int, const void *, size_t, int);
-ssize_t sendto(int, const void *,
- size_t, int, const struct sockaddr *, socklen_t);
-ssize_t sendmsg(int, const struct msghdr *, int);
-int sendfile(int, int, off_t, size_t, struct sf_hdtr *, off_t *, int);
-int setsockopt(int, int, int, const void *, socklen_t);
-int shutdown(int, int);
-int socket(int, int, int);
-int socketpair(int, int, int, int *);
-__END_DECLS
-
-#endif /* !_SYS_SOCKET_H_ */
diff --git a/newlib/libc/sys/linux/sys/sockio.h b/newlib/libc/sys/linux/sys/sockio.h
deleted file mode 100644
index bdebfbebc..000000000
--- a/newlib/libc/sys/linux/sys/sockio.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)sockio.h 8.1 (Berkeley) 3/28/94
- * $FreeBSD: src/sys/sys/sockio.h,v 1.25 2002/02/10 16:55:35 rwatson Exp $
- */
-
-#ifndef _SYS_SOCKIO_H_
-#define _SYS_SOCKIO_H_
-
-#include <sys/ioccom.h>
-
-/* Socket ioctl's. */
-#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */
-#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */
-#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */
-#define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */
-#define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */
-#define SIOCSPGRP _IOW('s', 8, int) /* set process group */
-#define SIOCGPGRP _IOR('s', 9, int) /* get process group */
-
-#define SIOCADDRT _IOW('r', 10, struct ortentry) /* add route */
-#define SIOCDELRT _IOW('r', 11, struct ortentry) /* delete route */
-#define SIOCGETVIFCNT _IOWR('r', 15, struct sioc_vif_req)/* get vif pkt cnt */
-#define SIOCGETSGCNT _IOWR('r', 16, struct sioc_sg_req) /* get s,g pkt cnt */
-
-#define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */
-#define OSIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get ifnet address */
-#define SIOCGIFADDR _IOWR('i', 33, struct ifreq) /* get ifnet address */
-#define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */
-#define OSIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */
-#define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) /* get p-p address */
-#define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */
-#define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */
-#define OSIOCGIFBRDADDR _IOWR('i', 18, struct ifreq) /* get broadcast addr */
-#define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) /* get broadcast addr */
-#define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */
-#define OSIOCGIFCONF _IOWR('i', 20, struct ifconf) /* get ifnet list */
-#define SIOCGIFCONF _IOWR('i', 36, struct ifconf) /* get ifnet list */
-#define OSIOCGIFNETMASK _IOWR('i', 21, struct ifreq) /* get net addr mask */
-#define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) /* get net addr mask */
-#define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */
-#define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */
-#define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */
-#define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */
-#define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */
-
-#define SIOCALIFADDR _IOW('i', 27, struct if_laddrreq) /* add IF addr */
-#define SIOCGLIFADDR _IOWR('i', 28, struct if_laddrreq) /* get IF addr */
-#define SIOCDLIFADDR _IOW('i', 29, struct if_laddrreq) /* delete IF addr */
-#define SIOCSIFCAP _IOW('i', 30, struct ifreq) /* set IF features */
-#define SIOCGIFCAP _IOWR('i', 31, struct ifreq) /* get IF features */
-#define SIOCGIFINDEX _IOWR('i', 32, struct ifreq) /* get IF index */
-#define SIOCGIFMAC _IOWR('i', 38, struct ifreq) /* get IF MAC label */
-#define SIOCSIFMAC _IOW('i', 39, struct ifreq) /* set IF MAC label */
-
-#define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */
-#define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */
-#define SIOCGIFMTU _IOWR('i', 51, struct ifreq) /* get IF mtu */
-#define SIOCSIFMTU _IOW('i', 52, struct ifreq) /* set IF mtu */
-#define SIOCGIFPHYS _IOWR('i', 53, struct ifreq) /* get IF wire */
-#define SIOCSIFPHYS _IOW('i', 54, struct ifreq) /* set IF wire */
-#define SIOCSIFMEDIA _IOWR('i', 55, struct ifreq) /* set net media */
-#define SIOCGIFMEDIA _IOWR('i', 56, struct ifmediareq) /* get net media */
-
-#define SIOCSIFGENERIC _IOW('i', 57, struct ifreq) /* generic IF set op */
-#define SIOCGIFGENERIC _IOWR('i', 58, struct ifreq) /* generic IF get op */
-
-#define SIOCGIFSTATUS _IOWR('i', 59, struct ifstat) /* get IF status */
-#define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) /* set linklevel addr */
-
-#define SIOCSIFPHYADDR _IOW('i', 70, struct ifaliasreq) /* set gif addres */
-#define SIOCGIFPSRCADDR _IOWR('i', 71, struct ifreq) /* get gif psrc addr */
-#define SIOCGIFPDSTADDR _IOWR('i', 72, struct ifreq) /* get gif pdst addr */
-#define SIOCDIFPHYADDR _IOW('i', 73, struct ifreq) /* delete gif addrs */
-#define SIOCSLIFPHYADDR _IOW('i', 74, struct if_laddrreq) /* set gif addrs */
-#define SIOCGLIFPHYADDR _IOWR('i', 75, struct if_laddrreq) /* get gif addrs */
-
-#define SIOCGPRIVATE_0 _IOWR('i', 80, struct ifreq) /* device private 0 */
-#define SIOCGPRIVATE_1 _IOWR('i', 81, struct ifreq) /* device private 1 */
-
-#define SIOCIFCREATE _IOWR('i', 122, struct ifreq) /* create clone if */
-#define SIOCIFDESTROY _IOW('i', 121, struct ifreq) /* destroy clone if */
-#define SIOCIFGCLONERS _IOWR('i', 120, struct if_clonereq) /* get cloners */
-
-#endif /* !_SYS_SOCKIO_H_ */
diff --git a/newlib/libc/sys/linux/sys/stat.h b/newlib/libc/sys/linux/sys/stat.h
deleted file mode 100644
index b7a7f53e6..000000000
--- a/newlib/libc/sys/linux/sys/stat.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* libc/sys/linux/sys/stat.h - Stat structure and macros */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#ifndef _SYS_STAT_H
-#define _SYS_STAT_H
-
-#include <asm/stat.h>
-#include <_ansi.h>
-#include <sys/types.h>
-#include <linux/time.h>
-#define __KERNEL__
-#include <linux/stat.h>
-#undef __KERNEL__
-
-/* --- redundant stuff below --- */
-
-
-int _EXFUN(fstat,( int __fd, struct stat *__sbuf ));
-int _EXFUN(mkdir,( const char *_path, mode_t __mode ));
-int _EXFUN(mkfifo,( const char *__path, mode_t __mode ));
-int _EXFUN(stat,( const char *__path, struct stat *__sbuf ));
-mode_t _EXFUN(umask,( mode_t __mask ));
-
-#ifndef _POSIX_SOURCE
-int _EXFUN(fstat64,( int __fd, struct stat *__sbuf ));
-int _EXFUN(lstat,( const char *file_name, struct stat *buf));
-int _EXFUN(lstat64,( const char *file_name, struct stat *buf));
-int _EXFUN(stat64,( const char *__path, struct stat *__sbuf ));
-#endif /* _POSIX_SOURCE */
-
-#endif /* _SYS_STAT_H */
diff --git a/newlib/libc/sys/linux/sys/stdio.h b/newlib/libc/sys/linux/sys/stdio.h
deleted file mode 100644
index a99308161..000000000
--- a/newlib/libc/sys/linux/sys/stdio.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef _NEWLIB_STDIO_H
-#define _NEWLIB_STDIO_H
-
-/* Internal locking macros, used to protect stdio functions. In the
- linux case, expand to flockfile, and funlockfile, both defined in
- LinuxThreads. */
-#if !defined(__SINGLE_THREAD__)
-# if !defined(_flockfile)
-# define _flockfile(fp) flockfile(fp)
-# endif
-# if !defined(_funlockfile)
-# define _funlockfile(fp) funlockfile(fp)
-# endif
-#endif /* __SINGLE_THREAD__ */
-
-#define getline __getline
-#define getdelim __getdelim
-
-char * _EXFUN(ctermid, (char *));
-
-#endif /* _NEWLIB_STDIO_H */
diff --git a/newlib/libc/sys/linux/sys/string.h b/newlib/libc/sys/linux/sys/string.h
deleted file mode 100644
index 25489caea..000000000
--- a/newlib/libc/sys/linux/sys/string.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _SYS_STRING_H
-#define _SYS_STRING_H
-
-#ifndef __STRICT_ANSI__
-char *_EXFUN(strsignal, (int __signo));
-#endif
-
-#endif /* _SYS_STRING_H */
diff --git a/newlib/libc/sys/linux/sys/termios.h b/newlib/libc/sys/linux/sys/termios.h
deleted file mode 100644
index ae053b5e4..000000000
--- a/newlib/libc/sys/linux/sys/termios.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* libc/sys/linux/sys/termios.h - Terminal control definitions */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#ifndef _SYS_TERMIOS_H
-#define _SYS_TERMIOS_H
-
-#include <linux/termios.h>
-#include <machine/termios.h>
-
-/* grr, this shouldn't have to be here */
-
-int tcgetattr(int fd,struct termios *termios_p);
-int tcsetattr(int fd,int optional_actions,const struct termios *termios_p);
-
-#endif
diff --git a/newlib/libc/sys/linux/sys/time.h b/newlib/libc/sys/linux/sys/time.h
deleted file mode 100644
index f2c656e5a..000000000
--- a/newlib/libc/sys/linux/sys/time.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* libc/sys/linux/sys/time.h - Time handling */
-
-/* Written 2000 by Werner Almesberger */
-
-/*
- * Copyright (c) 1982, 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)time.h 8.5 (Berkeley) 5/4/95
- * $FreeBSD: src/sys/sys/time.h,v 1.56 2002/05/05 04:33:09 bde Exp $
- */
-
-#ifndef _SYS_TIME_H
-#define _SYS_TIME_H
-
-#include <sys/types.h>
-#include <sys/linux_time.h>
-
-/* Macros for converting between `struct timeval' and `struct timespec'. */
-# define TIMEVAL_TO_TIMESPEC(tv, ts) { \
- (ts)->tv_sec = (tv)->tv_sec; \
- (ts)->tv_nsec = (tv)->tv_usec * 1000; \
-}
-# define TIMESPEC_TO_TIMEVAL(tv, ts) { \
- (tv)->tv_sec = (ts)->tv_sec; \
- (tv)->tv_usec = (ts)->tv_nsec / 1000; \
-}
-
-/* Convenience macros for operations on timevals.
- NOTE: `timercmp' does not work for >= or <=. */
-# define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
-# define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
-# define timercmp(a, b, CMP) \
- (((a)->tv_sec == (b)->tv_sec) ? \
- ((a)->tv_usec CMP (b)->tv_usec) : \
- ((a)->tv_sec CMP (b)->tv_sec))
-# define timeradd(a, b, result) \
- do { \
- (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \
- (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \
- if ((result)->tv_usec >= 1000000) \
- { \
- ++(result)->tv_sec; \
- (result)->tv_usec -= 1000000; \
- } \
- } while (0)
-# define timersub(a, b, result) \
- do { \
- (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
- (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
- if ((result)->tv_usec < 0) { \
- --(result)->tv_sec; \
- (result)->tv_usec += 1000000; \
- } \
- } while (0)
-/* --- redundant stuff below --- */
-
-#include <_ansi.h>
-
-int _EXFUN(gettimeofday, (struct timeval *__p, struct timezone *__z));
-int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *));
-int _EXFUN(utimes, (const char *__path, const struct timeval __tvp[2]));
-int _EXFUN(getitimer, (int __which, struct itimerval *__value));
-int _EXFUN(setitimer, (int __which, const struct itimerval *__value,
- struct itimerval *__ovalue));
-#endif
diff --git a/newlib/libc/sys/linux/sys/types.h b/newlib/libc/sys/linux/sys/types.h
deleted file mode 100644
index 1401b0598..000000000
--- a/newlib/libc/sys/linux/sys/types.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/* libc/sys/linux/sys/types.h - The usual type zoo */
-
-/* Written 2000 by Werner Almesberger */
-
-/*-
- * Copyright (c) 1982, 1986, 1991, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)types.h 8.6 (Berkeley) 2/19/95
- * $FreeBSD: src/sys/sys/types.h,v 1.60 2002/04/10 15:58:13 mike Exp $
- */
-
-#ifndef _SYS_TYPES_H
-#define _SYS_TYPES_H
-
-/* Newlib has it's own time_t and clock_t definitions in
- * libc/include/sys/types.h. Repeat those here and
- * skip the kernel's definitions. */
-
-#include <features.h>
-#include <sys/config.h>
-#include <machine/types.h>
-#include <sys/_types.h>
-
-#if !defined(__time_t_defined) && !defined(_TIME_T)
-#define _TIME_T
-#define __time_t_defined
-typedef _TIME_T_ time_t;
-#endif
-
-#if !defined(__clock_t_defined) && !defined(_CLOCK_T)
-#define _CLOCK_T
-#define __clock_t_defined
-typedef _CLOCK_T_ clock_t;
-#endif
-
-#ifndef _SSIZE_T
-#define _SSIZE_T
-typedef _ssize_t ssize_t;
-#endif
-
-#ifndef __u_char_defined
-#ifdef __GNUC__
-__extension__ typedef long long quad_t;
-__extension__ typedef unsigned long long u_quad_t;
-#else
-typedef struct
- {
- long int __val[2];
- } quad_t;
-typedef struct
- {
- unsigned long __val[2];
- } u_quad_t;
-#endif
-typedef struct
- {
- int __val[2];
- } fsid_t;
-#define __u_char_defined
-#endif
-
-typedef int clockid_t;
-
-# define _SYS_TYPES_FD_SET
-# define NBBY 8 /* number of bits in a byte */
-/*
- * Select uses bit masks of file descriptors in longs.
- * These macros manipulate such bit fields (the filesystem macros use chars).
- * FD_SETSIZE may be defined by the user, but the default here
- * should be >= NOFILE (param.h).
- */
-# ifndef FD_SETSIZE
-# define FD_SETSIZE 64
-# endif
-
-typedef long fd_mask;
-# define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */
-# ifndef howmany
-# define howmany(x,y) (((x)+((y)-1))/(y))
-# endif
-
-typedef struct {
- unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))];
-} __fd_set;
-
-# define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
-# define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
-# define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
-# define FD_ZERO(p) (__extension__ (void)({ \
- size_t __i; \
- char *__tmp = (char *)p; \
- for (__i = 0; __i < sizeof (*(p)); ++__i) \
- *__tmp++ = 0; \
-}))
-
-#include <linux/types.h>
-#include <bits/types.h>
-#define __mode_t_defined
-#define __gid_t_defined
-#define __uid_t_defined
-#define __pid_t_defined
-#define __ssize_t_defined
-#define __key_t_defined
-#define __off_t_defined
-#define __off64_t_defined
-
-typedef __ino_t ino_t;
-typedef __ino64_t ino64_t;
-typedef __uint32_t uintptr_t;
-typedef __int32_t intptr_t;
-typedef __off64_t off64_t;
-typedef __off_t off_t;
-typedef __loff_t loff_t;
-typedef __mode_t mode_t;
-typedef __pid_t pid_t;
-typedef __uid_t uid_t;
-typedef __gid_t gid_t;
-typedef __key_t key_t;
-typedef __suseconds_t suseconds_t;
-typedef __useconds_t useconds_t;
-typedef __daddr_t daddr_t;
-typedef __caddr_t caddr_t;
-typedef __dev_t dev_t;
-typedef __fd_set fd_set;
-typedef __nlink_t nlink_t;
-
-typedef __u_char u_char;
-typedef __u_short u_short;
-typedef __u_int u_int;
-typedef __u_long u_long;
-typedef __uint8_t u_int8_t;
-typedef __uint16_t u_int16_t;
-typedef __uint32_t u_int32_t;
-typedef __uint64_t u_int64_t;
-typedef __int8_t int8_t;
-typedef __int16_t int16_t;
-typedef __int32_t int32_t;
-typedef __int64_t int64_t;
-
-#ifndef _UINT8_T_DECLARED
-typedef __uint8_t uint8_t;
-#define _UINT8_T_DECLARED
-#endif
-
-#ifndef _UINT16_T_DECLARED
-typedef __uint16_t uint16_t;
-#define _UINT16_T_DECLARED
-#endif
-
-#ifndef _UINT32_T_DECLARED
-typedef __uint32_t uint32_t;
-#define _UINT32_T_DECLARED
-#endif
-
-#ifndef _UINT64_T_DECLARED
-typedef __uint64_t uint64_t;
-#define _UINT64_T_DECLARED
-#endif
-
-typedef __uint64_t u64;
-
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
-typedef struct _physadr {
- int r[1];
-} *physadr;
-
-typedef struct label_t {
- int val[6];
-} label_t;
-#endif
-
-typedef unsigned int vm_offset_t;
-typedef __int64_t vm_ooffset_t;
-typedef unsigned int vm_pindex_t;
-typedef unsigned int vm_size_t;
-
-typedef __int32_t register_t;
-typedef __uint32_t u_register_t;
-
-#ifdef _KERNEL
-typedef int intfptr_t;
-typedef unsigned int uintfptr_t;
-#endif
-
-/* Critical section value */
-typedef register_t critical_t;
-
-/* Interrupt mask (spl, xxx_imask, etc) */
-typedef __uint32_t intrmask_t;
-
-/* Interrupt handler function type. */
-typedef void ointhand2_t(int _device_id);
-
-#endif
diff --git a/newlib/libc/sys/linux/sys/unistd.h b/newlib/libc/sys/linux/sys/unistd.h
deleted file mode 100644
index e720d6b72..000000000
--- a/newlib/libc/sys/linux/sys/unistd.h
+++ /dev/null
@@ -1,145 +0,0 @@
-#ifndef _UNISTD_H
-#define _UNISTD_H
-
-#include <features.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/_types.h>
-#define __need_size_t
-#define __need_ptrdiff_t
-#include <stddef.h>
-
-extern char **environ;
-
-void _EXFUN(_exit, (int __status ) _ATTRIBUTE ((noreturn)));
-
-int _EXFUN(access,(const char *__path, int __amode ));
-unsigned _EXFUN(alarm, (unsigned __secs ));
-int _EXFUN(chdir, (const char *__path ));
-int _EXFUN(chmod, (const char *__path, mode_t __mode ));
-int _EXFUN(chown, (const char *__path, uid_t __owner, gid_t __group ));
-int _EXFUN(chroot, (const char *__path ));
-int _EXFUN(close, (int __fildes ));
-char _EXFUN(*ctermid, (char *__s ));
-char _EXFUN(*cuserid, (char *__s ));
-int _EXFUN(dup, (int __fildes ));
-int _EXFUN(dup2, (int __fildes, int __fildes2 ));
-int _EXFUN(execl, (const char *__path, const char *, ... ));
-int _EXFUN(execle, (const char *__path, const char *, ... ));
-int _EXFUN(execlp, (const char *__file, const char *, ... ));
-int _EXFUN(execv, (const char *__path, char * const __argv[] ));
-int _EXFUN(execve, (const char *__path, char * const __argv[], char * const __envp[] ));
-int _EXFUN(execvp, (const char *__file, char * const __argv[] ));
-int _EXFUN(fchdir, (int __fildes));
-int _EXFUN(fchmod, (int __fildes, mode_t __mode ));
-int _EXFUN(fchown, (int __fildes, uid_t __owner, gid_t __group ));
-pid_t _EXFUN(fork, (void ));
-long _EXFUN(fpathconf, (int __fd, int __name ));
-int _EXFUN(fsync, (int __fd));
-int _EXFUN(ftruncate, (int __fd, off_t __length));
-char _EXFUN(*getcwd, (char *__buf, size_t __size ));
-int _EXFUN(getdomainname ,(char *__name, size_t __len));
-gid_t _EXFUN(getegid, (void ));
-uid_t _EXFUN(geteuid, (void ));
-gid_t _EXFUN(getgid, (void ));
-int _EXFUN(getgroups, (int __gidsetsize, gid_t __grouplist[] ));
-char _EXFUN(*getlogin, (void ));
-#if defined(_POSIX_THREAD_SAFE_FUNCTIONS)
-int _EXFUN(getlogin_r, (char *name, size_t namesize) );
-#endif
-char _EXFUN(*getpass, (__const char *__prompt));
-size_t _EXFUN(getpagesize, (void));
-pid_t _EXFUN(getpgid, (pid_t));
-pid_t _EXFUN(getpgrp, (void ));
-pid_t _EXFUN(getpid, (void ));
-pid_t _EXFUN(getppid, (void ));
-uid_t _EXFUN(getuid, (void ));
-char * _EXFUN(getusershell, (void));
-char _EXFUN(*getwd, (char *__buf ));
-int _EXFUN(isatty, (int __fildes ));
-int _EXFUN(lchown, (const char *__path, uid_t __owner, gid_t __group ));
-int _EXFUN(link, (const char *__path1, const char *__path2 ));
-int _EXFUN(nice, (int __nice_value ));
-off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence ));
-long _EXFUN(pathconf, (const char *__path, int __name ));
-int _EXFUN(pause, (void ));
-int _EXFUN(pipe, (int __fildes[2] ));
-ssize_t _EXFUN(pread, (int __fd, void *__buf, size_t __nbytes, off_t __offset));
-ssize_t _EXFUN(pwrite, (int __fd, const void *__buf, size_t __nbytes, off_t __offset));
-_READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte ));
-int _EXFUN(rmdir, (const char *__path ));
-void * _EXFUN(sbrk, (ptrdiff_t __incr));
-int _EXFUN(setegid, (gid_t __gid ));
-int _EXFUN(seteuid, (uid_t __uid ));
-int _EXFUN(setgid, (gid_t __gid ));
-int _EXFUN(setpgid, (pid_t __pid, pid_t __pgid ));
-int _EXFUN(setpgrp, (void ));
-pid_t _EXFUN(setsid, (void ));
-int _EXFUN(setuid, (uid_t __uid ));
-unsigned _EXFUN(sleep, (unsigned int __seconds ));
-void _EXFUN(swab, (const void *, void *, ssize_t));
-long _EXFUN(sysconf, (int __name ));
-pid_t _EXFUN(tcgetpgrp, (int __fildes ));
-int _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id ));
-int _EXFUN(truncate, (const char *, off_t __length));
-char * _EXFUN(ttyname, (int __fildes ));
-int _EXFUN(ttyname_r, (int __fildes, char *__buf, size_t __len));
-int _EXFUN(unlink, (const char *__path ));
-int _EXFUN(usleep, (__useconds_t __useconds));
-int _EXFUN(vhangup, (void ));
-_READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte ));
-
-extern char *optarg; /* getopt(3) external variables */
-extern int optind, opterr, optopt;
-int getopt(int, char * const [], const char *);
-extern int optreset; /* getopt(3) external variable */
-
-#ifndef _POSIX_SOURCE
-pid_t _EXFUN(vfork, (void ));
-
-extern char *suboptarg; /* getsubopt(3) external variable */
-int getsubopt(char **, char * const *, char **);
-#endif /* _POSIX_SOURCE */
-
-/* Provide prototypes for most of the _<systemcall> names that are
- provided in newlib for some compilers. */
-int _EXFUN(_close, (int __fildes ));
-pid_t _EXFUN(_fork, (void ));
-pid_t _EXFUN(_getpid, (void ));
-int _EXFUN(_link, (const char *__path1, const char *__path2 ));
-off_t _EXFUN(_lseek, (int __fildes, off_t __offset, int __whence ));
-_READ_WRITE_RETURN_TYPE _EXFUN(_read, (int __fd, void *__buf, size_t __nbyte ));
-void * _EXFUN(_sbrk, (size_t __incr));
-int _EXFUN(_unlink, (const char *__path ));
-_READ_WRITE_RETURN_TYPE _EXFUN(_write, (int __fd, const void *__buf, size_t __nbyte ));
-int _EXFUN(_execve, (const char *__path, char * const __argv[], char * const __envp[] ));
-
-#define F_OK 0
-#define R_OK 4
-#define W_OK 2
-#define X_OK 1
-
-# define SEEK_SET 0
-# define SEEK_CUR 1
-# define SEEK_END 2
-
-#include <sys/features.h>
-
-#define STDIN_FILENO 0 /* standard input file descriptor */
-#define STDOUT_FILENO 1 /* standard output file descriptor */
-#define STDERR_FILENO 2 /* standard error file descriptor */
-
-#include <bits/environments.h>
-#include <bits/confname.h>
-
-# define MAXPATHLEN 1024
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _SYS_UNISTD_H */
diff --git a/newlib/libc/sys/linux/sys/utime.h b/newlib/libc/sys/linux/sys/utime.h
deleted file mode 100644
index 7499cfe7e..000000000
--- a/newlib/libc/sys/linux/sys/utime.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef _SYS_UTIME_H
-#define _SYS_UTIME_H 1
-
-#include <sys/types.h>
-
-struct utimbuf
- {
- time_t actime; /* Access time. */
- time_t modtime; /* Modification time. */
- };
-
-int _EXFUN(utime, (const char *__file, const struct utimbuf *__times));
-
-#endif /* _SYS_UTIME_H */
diff --git a/newlib/libc/sys/linux/sys/utmp.h b/newlib/libc/sys/linux/sys/utmp.h
deleted file mode 100644
index a837483a9..000000000
--- a/newlib/libc/sys/linux/sys/utmp.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* libc/sys/linux/sys/utmp.h - utmp structure */
-
-/* Written 2000 by Werner Almesberger */
-
-
-/* Some things copied from glibc's /usr/include/bits/utmp.h */
-
-
-#ifndef _SYS_UTMP_H
-#define _SYS_UTMP_H
-
-
-#include <sys/types.h>
-
-
-#define UTMP_FILE "/var/run/utmp"
-
-#define UT_LINESIZE 32
-#define UT_NAMESIZE 32
-#define UT_HOSTSIZE 256
-
-struct utmp {
- short int ut_type;
- pid_t ut_pid;
- char ut_line[UT_LINESIZE];
- char ut_id[4];
- char ut_user[UT_NAMESIZE];
- char ut_host[UT_HOSTSIZE];
- char __filler[52];
-};
-
-#define RUN_LVL 1
-#define BOOT_TIME 2
-#define NEW_TIME 3
-#define OLD_TIME 4
-
-#define INIT_PROCESS 5
-#define LOGIN_PROCESS 6
-#define USER_PROCESS 7
-#define DEAD_PROCESS 8
-
-
-/* --- redundant, from sys/cygwin/sys/utmp.h --- */
-
-struct utmp *_getutline (struct utmp *);
-struct utmp *getutent (void);
-struct utmp *getutid (struct utmp *);
-struct utmp *getutline (struct utmp *);
-void endutent (void);
-void pututline (struct utmp *);
-void setutent (void);
-void utmpname (const char *);
-
-#endif
diff --git a/newlib/libc/sys/linux/sys/utsname.h b/newlib/libc/sys/linux/sys/utsname.h
deleted file mode 100644
index 4de4c63be..000000000
--- a/newlib/libc/sys/linux/sys/utsname.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* libc/sys/linux/sys/utsname.h - System identification */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#ifndef _SYS_UTSNAME_H
-#define _SYS_UTSNAME_H
-
-#define __UTSNAMELEN 65 /* synchronize with kernel */
-
-struct utsname {
- char sysname[__UTSNAMELEN];
- char nodename[__UTSNAMELEN];
- char release[__UTSNAMELEN];
- char version[__UTSNAMELEN];
- char machine[__UTSNAMELEN];
- char domainname[__UTSNAMELEN];
-};
-
-
-int uname(struct utsname *name);
-
-#endif
diff --git a/newlib/libc/sys/linux/sys/wait.h b/newlib/libc/sys/linux/sys/wait.h
deleted file mode 100644
index 4cc337783..000000000
--- a/newlib/libc/sys/linux/sys/wait.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* libc/sys/linux/sys/wait.h - Wait for children */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#ifndef _SYS_WAIT_H
-#define _SYS_WAIT_H
-
-#include <linux/wait.h>
-
-#define WIFEXITED(status) (!WTERMSIG(status))
-#define WEXITSTATUS(status) (((status) >> 8) & 0xff)
-#define WIFSIGNALED(status) (!WIFSTOPPED(status) && !WIFEXITED(status))
-#define WTERMSIG(status) ((status ) & 0x7f)
-#define WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
-#define WSTOPSIG(status) WEXITSTATUS(status)
-
-#ifndef _POSIX_SOURCE
-#define WCOREDUMP(status) ((status) & 0x80)
-#endif
-
-/* --- redundant stuff below --- */
-
-#include <_ansi.h>
-#include <sys/types.h>
-
-pid_t wait (int *);
-pid_t waitpid (pid_t, int *, int);
-
-pid_t _wait (int *);
-
-
-#ifndef _POSIX_SOURCE
-#include <sys/resource.h>
-
-pid_t wait3(int *status,int options,struct rusage *rusage);
-pid_t wait4(pid_t pid,int *status,int options,struct rusage *rusage);
-#endif
-
-#endif
diff --git a/newlib/libc/sys/linux/sysconf.c b/newlib/libc/sys/linux/sysconf.c
deleted file mode 100644
index 037ae54bf..000000000
--- a/newlib/libc/sys/linux/sysconf.c
+++ /dev/null
@@ -1,383 +0,0 @@
-/* libc/sys/linux/sysconf.c - The sysconf function */
-
-/* Copyright 2002, Red Hat Inc. */
-
-
-#include <unistd.h>
-#include <limits.h>
-#include <time.h>
-#include <errno.h>
-#include <sys/types.h>
-
-long int
-sysconf (int name)
-{
- switch (name)
- {
- case _SC_AIO_LISTIO_MAX:
-#ifdef AIO_LISTIO_MAX
- return AIO_LISTIO_MAX;
-#else
- return -1;
-#endif
-
- case _SC_AIO_MAX:
-#ifdef AIO_MAX
- return AIO_MAX;
-#else
- return -1;
-#endif
-
- case _SC_AIO_PRIO_DELTA_MAX:
-#ifdef AIO_PRIO_DELTA_MAX
- return AIO_PRIO_DELTA_MAX;
-#else
- return -1;
-#endif
-
- case _SC_ARG_MAX:
-#ifdef ARG_MAX
- return ARG_MAX;
-#else
- return -1;
-#endif
-
- case _SC_CHILD_MAX:
-#ifdef CHILD_MAX
- return CHILD_MAX;
-#else
- return -1;
-#endif
-
- case _SC_CLK_TCK:
- return CLK_TCK;
-
- case _SC_DELAYTIMER_MAX:
-#ifdef DELAYTIMER_MAX
- return DELAYTIMER_MAX;
-#else
- return -1;
-#endif
-
- case _SC_GETGR_R_SIZE_MAX:
-#ifdef _GETGR_R_SIZE_MAX
- return _GETGR_R_SIZE_MAX;
-#else
- return -1;
-#endif
-
- case _SC_GETPW_R_SIZE_MAX:
-#ifdef _GETPW_R_SIZE_MAX
- return _GETPW_R_SIZE_MAX;
-#else
- return -1;
-#endif
-
- case _SC_LOGIN_NAME_MAX:
-#ifdef LOGIN_NAME_MAX
- return LOGIN_NAME_MAX;
-#else
- return -1;
-#endif
-
- case _SC_MQ_OPEN_MAX:
-#ifdef MQ_OPEN_MAX
- return MQ_OPEN_MAX;
-#else
- return -1;
-#endif
-
- case _SC_MQ_PRIO_MAX:
-#ifdef MQ_PRIO_MAX
- return MQ_PRIO_MAX;
-#else
- return -1;
-#endif
-
- case _SC_NGROUPS_MAX:
-#ifdef NGROUPS_MAX
- return NGROUPS_MAX;
-#else
- return -1;
-#endif
-
- case _SC_OPEN_MAX:
-#ifdef OPEN_MAX
- return OPEN_MAX;
-#else
- return -1;
-#endif
-
- case _SC_PAGESIZE:
-#ifdef PAGESIZE
- return PAGESIZE;
-#else
- return -1;
-#endif
-
- case _SC_RTSIG_MAX:
-#ifdef RTSIG_MAX
- return RTSIG_MAX;
-#else
- return -1;
-#endif
-
- case _SC_SEM_NSEMS_MAX:
-#ifdef SEM_NSEMS_MAX
- return SEM_NSEMS_MAX;
-#else
- return -1;
-#endif
-
- case _SC_SEM_VALUE_MAX:
-#ifdef SEM_VALUE_MAX
- return SEM_VALUE_MAX;
-#else
- return -1;
-#endif
-
- case _SC_SIGQUEUE_MAX:
-#ifdef SIGQUEUE_MAX
- return SIGQUEUE_MAX;
-#else
- return -1;
-#endif
-
- case _SC_STREAM_MAX:
-#ifdef STREAM_MAX
- return STREAM_MAX;
-#else
- return -1;
-#endif
-
- case _SC_THREAD_DESTRUCTOR_ITERATIONS:
-#ifdef PTHREAD_DESTRUCTOR_ITERATIONS
- return PTHREAD_DESTRUCTOR_ITERATIONS;
-#else
- return -1;
-#endif
-
- case _SC_THREAD_KEYS_MAX:
-#ifdef PTHREAD_KEYS_MAX
- return PTHREAD_KEYS_MAX;
-#else
- return -1;
-#endif
-
- case _SC_THREAD_STACK_MIN:
-#ifdef PTHREAD_STACK_MIN
- return PTHREAD_STACK_MIN;
-#else
- return -1;
-#endif
-
- case _SC_THREAD_THREADS_MAX:
-#ifdef PTHREAD_THREADS_MAX
- return PTHREAD_THREADS_MAX;
-#else
- return -1;
-#endif
-
- case _SC_TIMER_MAX:
-#ifdef TIMER_MAX
- return TIMER_MAX;
-#else
- return -1;
-#endif
-
- case _SC_TTY_NAME_MAX:
-#ifdef TTY_NAME_MAX
- return TTY_NAME_MAX;
-#else
- return -1;
-#endif
-
- case _SC_TZNAME_MAX:
-#ifdef TZNAME_MAX
- return TZNAME_MAX;
-#else
- return -1;
-#endif
-
- case _SC_ASYNCHRONOUS_IO:
-#ifdef _POSIX_ASYNCHRONOUS_IO
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_FSYNC:
-#ifdef _POSIX_FSYNC
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_JOB_CONTROL:
-#ifdef _POSIX_JOB_CONTROL
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_MAPPED_FILES:
-#ifdef _POSIX_MAPPED_FILES
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_MEMLOCK:
-#ifdef _POSIX_MEMLOCK
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_MEMLOCK_RANGE:
-#ifdef _POSIX_MEMLOCK_RANGE
- return _POSIX_MEMLOCK_RANGE;
-#else
- return -1;
-#endif
-
- case _SC_MEMORY_PROTECTION:
-#ifdef _POSIX_MEMORY_PROTECTION
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_MESSAGE_PASSING:
-#ifdef _POSIX_MESSAGE_PASSING
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_PRIORITIZED_IO:
-#ifdef _POSIX_PRIORITIZED_IO
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_PRIORITY_SCHEDULING:
-#ifdef _POSIX_PRIORITY_SCHEDULING
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_REALTIME_SIGNALS:
-#ifdef _POSIX_REALTIME_SIGNALS
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_SAVED_IDS:
-#ifdef _POSIX_SAVED_IDS
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_SEMAPHORES:
-#ifdef _POSIX_SEMAPHORES
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_SHARED_MEMORY_OBJECTS:
-#ifdef _POSIX_SHARED_MEMORY_OBJECTS
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_SYNCHRONIZED_IO:
-#ifdef _POSIX_SYNCHRONIZED_IO
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_TIMERS:
-#ifdef _POSIX_TIMERS
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_THREADS:
-#ifdef _POSIX_THREADS
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_THREAD_ATTR_STACKADDR:
-#ifdef _POSIX_THREAD_ATTR_STACKADDR
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_THREAD_ATTR_STACKSIZE:
-#ifdef _POSIX_THREAD_ATTR_STACKSIZE
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_THREAD_PRIORITY_SCHEDULING:
-#ifdef _POSIX_THREAD_PRIORITY_SCHEDULING
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_THREAD_PRIO_INHERIT:
-#ifdef _POSIX_THREAD_PRIO_INHERIT
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_THREAD_PRIO_PROTECT:
-#ifdef _POSIX_THREAD_PRIO_PROTECT
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_THREAD_PROCESS_SHARED:
-#ifdef _POSIX_THREAD_PROCESS_SHARED
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_THREAD_SAFE_FUNCTIONS:
-#ifdef _POSIX_THREAD_SAFE_FUNCTIONS
- return 1;
-#else
- return -1;
-#endif
-
- case _SC_VERSION:
-#ifdef _POSIX_VERSION
- return _POSIX_VERSION;
-#else
- return -1;
-#endif
-
- default:
- errno = EINVAL;
- return -1;
- }
-
- return -1; /* can't get here */
-}
diff --git a/newlib/libc/sys/linux/sysctl.c b/newlib/libc/sys/linux/sysctl.c
deleted file mode 100644
index 020d431be..000000000
--- a/newlib/libc/sys/linux/sysctl.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Read or write system information. Linux version.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <sys/sysctl.h>
-
-#include <machine/syscall.h>
-
-static _syscall1(int,_sysctl,struct __sysctl_args *,args)
-
-int
-__sysctl (int *name, int nlen, void *oldval, size_t *oldlenp,
- void *newval, size_t newlen)
-{
- struct __sysctl_args args =
- {
- name: name,
- nlen: nlen,
- oldval: oldval,
- oldlenp: oldlenp,
- newval: newval,
- newlen: newlen
- };
-
- return _sysctl(&args);
-}
diff --git a/newlib/libc/sys/linux/systat.c b/newlib/libc/sys/linux/systat.c
deleted file mode 100644
index 9a57aa7e4..000000000
--- a/newlib/libc/sys/linux/systat.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* libc/sys/linux/systat.c - System calls related to overall system state */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#include <sys/utsname.h>
-#include <machine/syscall.h>
-
-
-_syscall1(int,uname,struct utsname *,name)
diff --git a/newlib/libc/sys/linux/system.c b/newlib/libc/sys/linux/system.c
deleted file mode 100644
index f8edfbf63..000000000
--- a/newlib/libc/sys/linux/system.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/* Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/wait.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <errno.h>
-#include <machine/weakalias.h>
-
-
-#ifndef HAVE_GNU_LD
-#define __environ environ
-#endif
-
-#define SHELL_PATH "/bin/sh" /* Path of the shell. */
-#define SHELL_NAME "sh" /* Name to give it. */
-
-/* Execute LINE as a shell command, returning its status. */
-int
-__libc_system (const char *line)
-{
- int status, save;
- pid_t pid;
- struct sigaction sa, intr, quit;
-#ifndef WAITPID_CANNOT_BLOCK_SIGCHLD
- sigset_t block, omask;
-#endif
-
- if (line == NULL)
- /* Check that we have a command processor available. It might
- not be available after a chroot(), for example. */
- return __libc_system ("exit 0") == 0;
-
- sa.sa_handler = SIG_IGN;
- sa.sa_flags = 0;
- sigemptyset (&sa.sa_mask);
-
- if (sigaction (SIGINT, &sa, &intr) < 0)
- return -1;
- if (sigaction (SIGQUIT, &sa, &quit) < 0)
- {
- save = errno;
- (void) sigaction (SIGINT, &intr, (struct sigaction *) NULL);
- errno = save;
- return -1;
- }
-
-#ifndef WAITPID_CANNOT_BLOCK_SIGCHLD
-
-/* SCO 3.2v4 has a bug where `waitpid' will never return if SIGCHLD is
- blocked. This makes it impossible for `system' to be implemented in
- compliance with POSIX.2-1992. They have acknowledged that this is a bug
- but I have not seen nor heard of any forthcoming fix. */
-
- sigemptyset (&block);
- sigaddset (&block, SIGCHLD);
- save = errno;
- if (sigprocmask (SIG_BLOCK, &block, &omask) < 0)
- {
- if (errno == ENOSYS)
- errno = save;
- else
- {
- save = errno;
- (void) sigaction (SIGINT, &intr, (struct sigaction *) NULL);
- (void) sigaction (SIGQUIT, &quit, (struct sigaction *) NULL);
- errno = save;
- return -1;
- }
- }
-# define UNBLOCK sigprocmask (SIG_SETMASK, &omask, (sigset_t *) NULL)
-#else
-# define UNBLOCK 0
-#endif
-
- pid = fork ();
- if (pid == (pid_t) 0)
- {
- /* Child side. */
- const char *new_argv[4];
- new_argv[0] = SHELL_NAME;
- new_argv[1] = "-c";
- new_argv[2] = line;
- new_argv[3] = NULL;
-
- /* Restore the signals. */
- (void) sigaction (SIGINT, &intr, (struct sigaction *) NULL);
- (void) sigaction (SIGQUIT, &quit, (struct sigaction *) NULL);
- (void) UNBLOCK;
-
- /* Exec the shell. */
- (void) execve (SHELL_PATH, (char *const *) new_argv, __environ);
- _exit (127);
- }
- else if (pid < (pid_t) 0)
- /* The fork failed. */
- status = -1;
- else
- /* Parent side. */
- {
-#ifdef NO_WAITPID
- pid_t child;
- do
- {
- child = wait (&status);
- if (child <= -1 && errno != EINTR)
- {
- status = -1;
- break;
- }
- /* Note that pid cannot be <= -1 and therefore the loop continues
- when wait returned with EINTR. */
- }
- while (child != pid);
-#else
- int n;
-
- do
- n = waitpid (pid, &status, 0);
- while (n == -1 && errno == EINTR);
-
- if (n != pid)
- status = -1;
-#endif
- }
-
- save = errno;
- if ((sigaction (SIGINT, &intr, (struct sigaction *) NULL) |
- sigaction (SIGQUIT, &quit, (struct sigaction *) NULL) |
- UNBLOCK) != 0)
- {
- if (errno == ENOSYS)
- errno = save;
- else
- return -1;
- }
-
- return status;
-}
-weak_alias (__libc_system, system)
diff --git a/newlib/libc/sys/linux/tcdrain.c b/newlib/libc/sys/linux/tcdrain.c
deleted file mode 100644
index 364fc035f..000000000
--- a/newlib/libc/sys/linux/tcdrain.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* tcdrain - wait for transmission of output */
-
-#include <termios.h>
-#include <sys/ioctl.h>
-#include <machine/weakalias.h>
-
-int
-__libc_tcdrain (int fd)
-{
- return ioctl (fd, TCSBRK, 1);
-}
-weak_alias (__libc_tcdrain, tcdrain)
-
diff --git a/newlib/libc/sys/linux/tcsendbrk.c b/newlib/libc/sys/linux/tcsendbrk.c
deleted file mode 100644
index a35a4d8ce..000000000
--- a/newlib/libc/sys/linux/tcsendbrk.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Modified for newlib, May 27, 2002, by Jeff Johnston */
-
-#include <errno.h>
-#include <stddef.h>
-#include <signal.h>
-#include <termios.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-
-/* Send zero bits on FD. */
-int
-tcsendbreak (fd, duration)
- int fd;
- int duration;
-{
- /* The break lasts 0.25 to 0.5 seconds if DURATION is zero,
- and an implementation-defined period if DURATION is nonzero.
- We define a positive DURATION to be number of milliseconds to break. */
- if (duration <= 0)
- return ioctl (fd, TCSBRK, 0);
-
- /* ioctl can't send a break of any other duration for us.
- This could be changed to use trickery (e.g. lower speed and
- send a '\0') to send the break, but for now just return an error. */
- errno = (EINVAL);
- return -1;
-}
diff --git a/newlib/libc/sys/linux/termios.c b/newlib/libc/sys/linux/termios.c
deleted file mode 100644
index ac155201d..000000000
--- a/newlib/libc/sys/linux/termios.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* libc/sys/linux/termios.c - Terminal control */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/termios.h>
-#include <sys/ioctl.h>
-
-
-int
-tcgetattr(int fd,struct termios *termios_p)
-{
- return ioctl(fd,TCGETS,termios_p);
-}
-
-
-int
-tcsetattr(int fd,int optional_actions,const struct termios *termios_p)
-{
- int cmd;
-
- switch (optional_actions) {
- case TCSANOW:
- cmd = TCSETS;
- break;
- case TCSADRAIN:
- cmd = TCSETSW;
- break;
- case TCSAFLUSH:
- cmd = TCSETSF;
- break;
- default:
- errno = EINVAL;
- return -1;
- }
- return ioctl(fd,cmd,termios_p);
-}
-
-#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL >= 4
-pid_t
-tcgetpgrp(int fd)
-{
- int p;
-
- if (ioctl(fd,TIOCGPGRP,&p) < 0)
- return (pid_t)-1;
- return (pid_t)p;
-}
-
-
-int
-tcsetpgrp(int fd, pid_t pid)
-{
- int p = (int)pid;
- return ioctl(fd,TIOCSPGRP,&p);
-}
-#endif /* !_ELIX_LEVEL || _ELIX_LEVEL >= 4 */
-
-int
-tcflow (int fd, int action)
-{
- return ioctl (fd, TCXONC, action);
-}
-
-int
-tcflush (int fd, int queue_selector)
-{
- return ioctl (fd, TCFLSH, queue_selector);
-}
-
diff --git a/newlib/libc/sys/linux/thread-m.h b/newlib/libc/sys/linux/thread-m.h
deleted file mode 100644
index 2cdacab19..000000000
--- a/newlib/libc/sys/linux/thread-m.h
+++ /dev/null
@@ -1,241 +0,0 @@
-/* Basic platform-independent macro definitions for mutexes and
- thread-specific data.
- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>, 1996.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* $Id$
- One out of _LIBC, USE_PTHREADS, USE_THR or USE_SPROC should be
- defined, otherwise the token NO_THREADS and dummy implementations
- of the macros will be defined. */
-
-#ifndef _THREAD_M_H
-#define _THREAD_M_H
-
-#undef thread_atfork_static
-
-#if defined(_LIBC) /* The GNU C library, a special case of Posix threads */
-
-#include <bits/libc-lock.h>
-
-#ifdef PTHREAD_MUTEX_INITIALIZER
-
-typedef pthread_t thread_id;
-
-/* mutex */
-typedef pthread_mutex_t mutex_t;
-
-#define MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
-
-/* Even if not linking with libpthread, ensure usability of mutex as
- an `in use' flag, see also the NO_THREADS case below. Assume
- pthread_mutex_t is at least one int wide. */
-
-#define mutex_init(m) \
- (__pthread_mutex_init != NULL \
- ? __pthread_mutex_init (m, NULL) : (*(int *)(m) = 0))
-#define mutex_lock(m) \
- (__pthread_mutex_lock != NULL \
- ? __pthread_mutex_lock (m) : ((*(int *)(m) = 1), 0))
-#define mutex_trylock(m) \
- (__pthread_mutex_trylock != NULL \
- ? __pthread_mutex_trylock (m) : (*(int *)(m) ? 1 : ((*(int *)(m) = 1), 0)))
-#define mutex_unlock(m) \
- (__pthread_mutex_unlock != NULL \
- ? __pthread_mutex_unlock (m) : (*(int*)(m) = 0))
-
-#define thread_atfork(prepare, parent, child) \
- (__pthread_atfork != NULL ? __pthread_atfork(prepare, parent, child) : 0)
-
-#elif defined(MUTEX_INITIALIZER)
-/* Assume hurd, with cthreads */
-
-/* Cthreads `mutex_t' is a pointer to a mutex, and malloc wants just the
- mutex itself. */
-#undef mutex_t
-#define mutex_t struct mutex
-
-#undef mutex_init
-#define mutex_init(m) (__mutex_init(m), 0)
-
-#undef mutex_lock
-#define mutex_lock(m) (__mutex_lock(m), 0)
-
-#undef mutex_unlock
-#define mutex_unlock(m) (__mutex_unlock(m), 0)
-
-#define mutex_trylock(m) (!__mutex_trylock(m))
-
-#define thread_atfork(prepare, parent, child) do {} while(0)
-#define thread_atfork_static(prepare, parent, child) \
- text_set_element(_hurd_fork_prepare_hook, prepare); \
- text_set_element(_hurd_fork_parent_hook, parent); \
- text_set_element(_hurd_fork_child_hook, child);
-
-/* No we're *not* using pthreads. */
-#define __pthread_initialize ((void (*)(void))0)
-
-#else
-
-#define NO_THREADS
-
-#endif /* MUTEX_INITIALIZER && PTHREAD_MUTEX_INITIALIZER */
-
-#ifndef NO_THREADS
-
-/* thread specific data for glibc */
-
-#include <libc-tsd.h>
-
-typedef int tsd_key_t[1]; /* no key data structure, libc magic does it */
-__libc_tsd_define (, MALLOC) /* declaration/common definition */
-#define tsd_key_create(key, destr) ((void) (key))
-#define tsd_setspecific(key, data) __libc_tsd_set (MALLOC, (data))
-#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (MALLOC))
-
-#endif
-
-#elif defined(USE_PTHREADS) /* Posix threads */
-
-#include <pthread.h>
-
-typedef pthread_t thread_id;
-
-/* mutex */
-typedef pthread_mutex_t mutex_t;
-
-#define MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
-#define mutex_init(m) pthread_mutex_init(m, NULL)
-#define mutex_lock(m) pthread_mutex_lock(m)
-#define mutex_trylock(m) pthread_mutex_trylock(m)
-#define mutex_unlock(m) pthread_mutex_unlock(m)
-
-/* thread specific data */
-#if defined(__sgi) || defined(USE_TSD_DATA_HACK)
-
-/* Hack for thread-specific data, e.g. on Irix 6.x. We can't use
- pthread_setspecific because that function calls malloc() itself.
- The hack only works when pthread_t can be converted to an integral
- type. */
-
-typedef void *tsd_key_t[256];
-#define tsd_key_create(key, destr) do { \
- int i; \
- for(i=0; i<256; i++) (*key)[i] = 0; \
-} while(0)
-#define tsd_setspecific(key, data) \
- (key[(unsigned)pthread_self() % 256] = (data))
-#define tsd_getspecific(key, vptr) \
- (vptr = key[(unsigned)pthread_self() % 256])
-
-#else
-
-typedef pthread_key_t tsd_key_t;
-
-#define tsd_key_create(key, destr) pthread_key_create(key, destr)
-#define tsd_setspecific(key, data) pthread_setspecific(key, data)
-#define tsd_getspecific(key, vptr) (vptr = pthread_getspecific(key))
-
-#endif
-
-/* at fork */
-#define thread_atfork(prepare, parent, child) \
- pthread_atfork(prepare, parent, child)
-
-#elif USE_THR /* Solaris threads */
-
-#include <thread.h>
-
-typedef thread_t thread_id;
-
-#define MUTEX_INITIALIZER { 0 }
-#define mutex_init(m) mutex_init(m, USYNC_THREAD, NULL)
-
-/*
- * Hack for thread-specific data on Solaris. We can't use thr_setspecific
- * because that function calls malloc() itself.
- */
-typedef void *tsd_key_t[256];
-#define tsd_key_create(key, destr) do { \
- int i; \
- for(i=0; i<256; i++) (*key)[i] = 0; \
-} while(0)
-#define tsd_setspecific(key, data) (key[(unsigned)thr_self() % 256] = (data))
-#define tsd_getspecific(key, vptr) (vptr = key[(unsigned)thr_self() % 256])
-
-#define thread_atfork(prepare, parent, child) do {} while(0)
-
-#elif USE_SPROC /* SGI sproc() threads */
-
-#include <sys/wait.h>
-#include <sys/types.h>
-#include <sys/prctl.h>
-#include <abi_mutex.h>
-
-typedef int thread_id;
-
-typedef abilock_t mutex_t;
-
-#define MUTEX_INITIALIZER { 0 }
-#define mutex_init(m) init_lock(m)
-#define mutex_lock(m) (spin_lock(m), 0)
-#define mutex_trylock(m) acquire_lock(m)
-#define mutex_unlock(m) release_lock(m)
-
-typedef int tsd_key_t;
-int tsd_key_next;
-#define tsd_key_create(key, destr) ((*key) = tsd_key_next++)
-#define tsd_setspecific(key, data) (((void **)(&PRDA->usr_prda))[key] = data)
-#define tsd_getspecific(key, vptr) (vptr = ((void **)(&PRDA->usr_prda))[key])
-
-#define thread_atfork(prepare, parent, child) do {} while(0)
-
-#else /* no _LIBC or USE_... are defined */
-
-#define NO_THREADS
-
-#endif /* defined(_LIBC) */
-
-#ifdef NO_THREADS /* No threads, provide dummy macros */
-
-typedef int thread_id;
-
-/* The mutex functions used to do absolutely nothing, i.e. lock,
- trylock and unlock would always just return 0. However, even
- without any concurrently active threads, a mutex can be used
- legitimately as an `in use' flag. To make the code that is
- protected by a mutex async-signal safe, these macros would have to
- be based on atomic test-and-set operations, for example. */
-typedef int mutex_t;
-
-#define MUTEX_INITIALIZER 0
-#define mutex_init(m) (*(m) = 0)
-#define mutex_lock(m) ((*(m) = 1), 0)
-#define mutex_trylock(m) (*(m) ? 1 : ((*(m) = 1), 0))
-#define mutex_unlock(m) (*(m) = 0)
-
-typedef void *tsd_key_t;
-#define tsd_key_create(key, destr) do {} while(0)
-#define tsd_setspecific(key, data) ((key) = (data))
-#define tsd_getspecific(key, vptr) (vptr = (key))
-
-#define thread_atfork(prepare, parent, child) do {} while(0)
-
-#endif /* defined(NO_THREADS) */
-
-#endif /* !defined(_THREAD_M_H) */
diff --git a/newlib/libc/sys/linux/time.c b/newlib/libc/sys/linux/time.c
deleted file mode 100644
index a7313505e..000000000
--- a/newlib/libc/sys/linux/time.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* libc/sys/linux/time.c - Time-related system calls */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/timex.h>
-#include <linux/times.h>
-#include <machine/syscall.h>
-
-#define __NR___adjtimex __NR_adjtimex
-
-_syscall1(int,__adjtimex,struct timex *,tx)
-_syscall1(time_t,time,time_t *,t)
-_syscall1(clock_t,times,struct tms *,buf)
-_syscall2(int,getitimer,int,type,struct itimerval *,old)
-_syscall3(int,setitimer,int,type,const struct itimerval *,new,struct itimerval *,old)
-_syscall2(int,gettimeofday,struct timeval *,tv,struct timezone *,tz)
-_syscall2(int,settimeofday,const struct timeval *,tv,const struct timezone *,tz)
-_syscall2(int,nanosleep,const struct timespec *,req,struct timespec *,rem)
-
-weak_alias(__libc_gettimeofday,__gettimeofday);
-weak_alias(__adjtimex,adjtimex);
-weak_alias(__adjtimex,ntp_adjtime);
diff --git a/newlib/libc/sys/linux/ttyname_r.c b/newlib/libc/sys/linux/ttyname_r.c
deleted file mode 100644
index efad76a0e..000000000
--- a/newlib/libc/sys/linux/ttyname_r.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/* Copyright (C) 1991,92,93,1995-1999,2000,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <limits.h>
-#include <stddef.h>
-#include <dirent.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <machine/weakalias.h>
-
-static int getttyname_r (char *buf, size_t buflen,
- dev_t mydev, ino64_t myino, int save,
- int *dostat);
-
-extern struct dirent64 *__readdir64 (DIR *);
-
-static int
-getttyname_r (char *buf, size_t buflen, dev_t mydev, ino64_t myino,
- int save, int *dostat)
-{
- struct stat64 st;
- DIR *dirstream;
- struct dirent64 *d;
- size_t devlen = strlen (buf);
-
- dirstream = opendir (buf);
- if (dirstream == NULL)
- {
- *dostat = -1;
- return errno;
- }
-
- while ((d = __readdir64 (dirstream)) != NULL)
- {
- if ((d->d_ino == myino || *dostat)
- && strcmp (d->d_name, "stdin")
- && strcmp (d->d_name, "stdout")
- && strcmp (d->d_name, "stderr"))
- {
- size_t needed = strlen (d->d_name) + 1;
-
- if (needed > buflen)
- {
- *dostat = -1;
- (void) closedir (dirstream);
- __set_errno (ERANGE);
- return ERANGE;
- }
-
- strncpy (buf + devlen, d->d_name, needed);
-
- if (stat64 (buf, &st) == 0
-#ifdef _STATBUF_ST_RDEV
- && S_ISCHR (st.st_mode) && st.st_rdev == mydev
-#else
- && d->d_ino == myino && st.st_dev == mydev
-#endif
- )
- {
- (void) closedir (dirstream);
- __set_errno (save);
- return 0;
- }
- }
- }
-
- (void) closedir (dirstream);
- __set_errno (save);
- /* It is not clear what to return in this case. `isatty' says FD
- refers to a TTY but no entry in /dev has this inode. */
- return ENOTTY;
-}
-
-/* Store at most BUFLEN character of the pathname of the terminal FD is
- open on in BUF. Return 0 on success, otherwise an error number. */
-int
-__ttyname_r (int fd, char *buf, size_t buflen)
-{
- char procname[30];
- struct stat64 st, st1;
- int dostat = 0;
- int save = errno;
- int ret;
-
- /* Test for the absolute minimal size. This makes life easier inside
- the loop. */
- if (!buf)
- {
- __set_errno (EINVAL);
- return EINVAL;
- }
-
- if (buflen < sizeof ("/dev/pts/"))
- {
- __set_errno (ERANGE);
- return ERANGE;
- }
-
- if (!isatty (fd))
- {
- __set_errno (ENOTTY);
- return ENOTTY;
- }
-
- /* We try using the /proc filesystem. */
- sprintf (procname, "/proc/self/fd/%d", fd);
-
- ret = readlink (procname, buf, buflen - 1);
- if (ret != -1 && buf[0] != '[')
- {
- buf[ret] = '\0';
- return 0;
- }
- if (ret == -1 && errno == ENAMETOOLONG)
- {
- __set_errno (ERANGE);
- return ERANGE;
- }
-
- if (fstat64 (fd, &st) < 0)
- return errno;
-
- /* Prepare the result buffer. */
- memcpy (buf, "/dev/pts/", sizeof ("/dev/pts/"));
- buflen -= sizeof ("/dev/pts/") - 1;
-
- if (stat64 (buf, &st1) == 0 && S_ISDIR (st1.st_mode))
- {
-#ifdef _STATBUF_ST_RDEV
- ret = getttyname_r (buf, buflen, st.st_rdev, st.st_ino, save,
- &dostat);
-#else
- ret = getttyname_r (buf, buflen, st.st_dev, st.st_ino, save,
- &dostat);
-#endif
- }
- else
- {
- __set_errno (save);
- ret = ENOENT;
- }
-
- if (ret && dostat != -1)
- {
- buf[sizeof ("/dev/") - 1] = '\0';
- buflen += sizeof ("pts/") - 1;
-#ifdef _STATBUF_ST_RDEV
- ret = getttyname_r (buf, buflen, st.st_rdev, st.st_ino, save,
- &dostat);
-#else
- ret = getttyname_r (buf, buflen, st.st_dev, st.st_ino, save,
- &dostat);
-#endif
- }
-
- if (ret && dostat != -1)
- {
- buf[sizeof ("/dev/") - 1] = '\0';
- dostat = 1;
-#ifdef _STATBUF_ST_RDEV
- ret = getttyname_r (buf, buflen, st.st_rdev, st.st_ino,
- save, &dostat);
-#else
- ret = getttyname_r (buf, buflen, st.st_dev, st.st_ino,
- save, &dostat);
-#endif
- }
-
- return ret;
-}
-
-weak_alias (__ttyname_r, ttyname_r)
diff --git a/newlib/libc/sys/linux/usleep.c b/newlib/libc/sys/linux/usleep.c
deleted file mode 100644
index fab6911f2..000000000
--- a/newlib/libc/sys/linux/usleep.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* libc/sys/linux/usleep.c - usleep function */
-
-/* Written 2002 by Jeff Johnston */
-
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <linux/times.h>
-
-int usleep(__useconds_t useconds)
-{
- struct timespec ts;
-
- ts.tv_sec = (long int)useconds / 1000000;
- ts.tv_nsec = ((long int)useconds % 1000000) * 1000;
- if (!nanosleep(&ts,&ts)) return 0;
- if (errno == EINTR) return ts.tv_sec;
- return -1;
-}
diff --git a/newlib/libc/sys/linux/utimes.c b/newlib/libc/sys/linux/utimes.c
deleted file mode 100644
index 0bee55152..000000000
--- a/newlib/libc/sys/linux/utimes.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <utime.h>
-#include <sys/time.h>
-#include <errno.h>
-#include <stddef.h>
-#include <machine/weakalias.h>
-
-/* Change the access time of FILE to TVP[0] and
- the modification time of FILE to TVP[1]. */
-int
-__utimes (const char *file, const struct timeval tvp[2])
-{
- struct utimbuf buf, *times;
-
- if (tvp)
- {
- times = &buf;
- times->actime = tvp[0].tv_sec + tvp[0].tv_usec / 1000000;
- times->modtime = tvp[1].tv_sec + tvp[1].tv_usec / 1000000;
- }
- else
- times = NULL;
-
- return utime (file, times);
-}
-
-weak_alias (__utimes, utimes)
diff --git a/newlib/libc/sys/linux/vallocr.c b/newlib/libc/sys/linux/vallocr.c
deleted file mode 100644
index 8de7ffc21..000000000
--- a/newlib/libc/sys/linux/vallocr.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdlib.h>
-
-void *
-_valloc_r (struct _reent *ptr, size_t bytes)
-{
- return valloc (bytes);
-}
diff --git a/newlib/libc/sys/linux/versionsort.c b/newlib/libc/sys/linux/versionsort.c
deleted file mode 100644
index 13cbdccfc..000000000
--- a/newlib/libc/sys/linux/versionsort.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <dirent.h>
-#include <string.h>
-
-extern int __strverscmp (char *, char *);
-
-int
-versionsort (const void *a, const void *b)
-{
- return __strverscmp ((*(const struct dirent **)a)->d_name,
- (*(const struct dirent **)b)->d_name);
-}
diff --git a/newlib/libc/sys/linux/versionsort64.c b/newlib/libc/sys/linux/versionsort64.c
deleted file mode 100644
index 45147b00d..000000000
--- a/newlib/libc/sys/linux/versionsort64.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <dirent.h>
-#include <string.h>
-
-extern int __strverscmp (char *, char *);
-
-int
-versionsort64 (const void *a, const void *b)
-{
- return __strverscmp ((*(const struct dirent64 **)a)->d_name,
- (*(const struct dirent64 **)b)->d_name);
-}
diff --git a/newlib/libc/sys/linux/wait.c b/newlib/libc/sys/linux/wait.c
deleted file mode 100644
index 31d1cc765..000000000
--- a/newlib/libc/sys/linux/wait.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* libc/sys/linux/wait.c - Wait function wrappers */
-
-/* Written 2000 by Werner Almesberger */
-
-
-#include <sys/wait.h>
-#include <machine/syscall.h>
-
-
-_syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
-_syscall4(pid_t,wait4,pid_t,pid,int *,status,int,options,struct rusage *,rusage)
-
-
-pid_t __libc_wait3(int *status,int options,struct rusage *rusage)
-{
- return __libc_wait4(-1,status,options,rusage);
-}
-weak_alias(__libc_wait3,wait3)
-
-pid_t __libc_wait(int *status)
-{
- return __libc_waitpid(-1,status,0);
-}
-
-weak_alias(__libc_waitpid,__libc___waitpid);
-weak_alias(__libc_wait,__wait);
-weak_alias(__libc_wait,wait);
diff --git a/newlib/libc/sys/m88kbug/Makefile.am b/newlib/libc/sys/m88kbug/Makefile.am
deleted file mode 100644
index 9e6c84db5..000000000
--- a/newlib/libc/sys/m88kbug/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = syscalls.c
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/m88kbug/Makefile.in b/newlib/libc/sys/m88kbug/Makefile.in
deleted file mode 100644
index d81a098a7..000000000
--- a/newlib/libc/sys/m88kbug/Makefile.in
+++ /dev/null
@@ -1,329 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = syscalls.c
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = syscalls.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/m88kbug/aclocal.m4 b/newlib/libc/sys/m88kbug/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/m88kbug/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/m88kbug/configure b/newlib/libc/sys/m88kbug/configure
deleted file mode 100755
index 89a8b1c97..000000000
--- a/newlib/libc/sys/m88kbug/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=syscalls.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/m88kbug/configure.in b/newlib/libc/sys/m88kbug/configure.in
deleted file mode 100644
index 33f201000..000000000
--- a/newlib/libc/sys/m88kbug/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/m88kbug configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(syscalls.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/m88kbug/crt0.c b/newlib/libc/sys/m88kbug/crt0.c
deleted file mode 100644
index d0d95e418..000000000
--- a/newlib/libc/sys/m88kbug/crt0.c
+++ /dev/null
@@ -1,19 +0,0 @@
-extern int main(int argc, char **argv);
-
-extern char edata;
-extern char end;
-extern char stack;
-
-_start()
-{
- char *p;
-
- p = &edata + 1;
- while (p < &end)
- {
- *p++ = 0;
- }
-
- main(0, 0);
- _exit();
-}
diff --git a/newlib/libc/sys/m88kbug/sys/systraps.h b/newlib/libc/sys/m88kbug/sys/systraps.h
deleted file mode 100644
index f3ee1a3c2..000000000
--- a/newlib/libc/sys/m88kbug/sys/systraps.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* trap numbers for mvme187bug */
-
-#define INCHR 0x0000
-#define OUTCHR 0x0020
-#define RETURN 0x0063
-
-#define SYSTRAP(x) {asm("or r9,r0,%0" : : "i" (x) : "r9"); asm("tb0 0,r0,496");}
-
-/* end of systraps.h */
diff --git a/newlib/libc/sys/m88kbug/syscalls.c b/newlib/libc/sys/m88kbug/syscalls.c
deleted file mode 100644
index 32f42a925..000000000
--- a/newlib/libc/sys/m88kbug/syscalls.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/* Operating system and traps for mvme187bug, the motorolola BUG
- monitor for m88k */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/times.h>
-#include <errno.h>
-
-#include "sys/systraps.h"
-
-static void writechar(int c) {
- register int n asm ("r2");
- n = c;
- SYSTRAP(OUTCHR);
- return;
-}
-
-static int readchar(void) {
- register int n asm ("r2");
- SYSTRAP(INCHR);
- return(n);
-}
-
-int read(int file, char *ptr, int len) {
- int todo;
-
- for (todo = len; todo; --todo) {
- *ptr++ = readchar();
- }
-
- return(len);
-}
-
-int lseek(int file, int ptr, int dir) {
- return 0;
-}
-
-int write(int file, char *ptr, int len) {
- int todo;
-
- for (todo = len; todo; --todo) {
- writechar(*ptr++);
- }
- return(len);
-}
-
-int close(int file) {
- return(-1);
-}
-
-caddr_t sbrk(int incr) {
- extern char end; /* Defined by the linker */
- static char *heap_end;
- char *prev_heap_end;
-
- if (heap_end == 0)
- {
- heap_end = &end;
- }
- prev_heap_end = heap_end;
- if (heap_end + incr > stack_ptr)
- {
- _write (1, "Heap and stack collision\n", 25);
- abort ();
- }
- heap_end += incr;
- return((caddr_t) prev_heap_end);
-}
-
-int isatty(int file) {
- return(1);
-}
-
-int fstat(int file, struct stat *st) {
- st->st_mode = S_IFCHR;
- return(0);
-}
-
-int stat(char *filename, struct stat *st) {
- st->st_mode = S_IFCHR;
- return(0);
-}
-
-int open(const char *path, int flags) {
- return(0);
-}
-
-
-int _exit() {
- SYSTRAP(RETURN);
-}
-
-int execve(char *name, char **argv, char **env) {
- errno = ENOMEM;
- return(-1);
-}
-
-int fork() {
- errno = EAGAIN;
- return(-1);
-}
-
-int getpid() {
- return(1);
-}
-
-int kill(int pid, int sig) {
- errno = EINVAL;
- return(-1);
-}
-
-int link(char *old, char *new) {
- errno = EMLINK;
- return(-1);
-}
-
-clock_t times(struct tms *buf) {
- return(-1);
-}
-
-int unlink(char *name) {
- errno = ENOENT;
- return(-1);
-}
-
-int wait(int *status) {
- errno = ECHILD;
- return(-1);
-}
-
-/* end of syscalls.c */
diff --git a/newlib/libc/sys/mmixware/Makefile.am b/newlib/libc/sys/mmixware/Makefile.am
deleted file mode 100644
index 054220feb..000000000
--- a/newlib/libc/sys/mmixware/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = _exit.c access.c chmod.c chown.c close.c creat.c \
- execv.c execve.c fork.c fstat.c getpid.c isatty.c \
- kill.c link.c lseek.c open.c pipe.c read.c \
- sbrk.c stat.c time.c unlink.c utime.c wait.c write.c \
- times.c gettime.c setjmp.S
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/mmixware/Makefile.in b/newlib/libc/sys/mmixware/Makefile.in
deleted file mode 100644
index 45f717f76..000000000
--- a/newlib/libc/sys/mmixware/Makefile.in
+++ /dev/null
@@ -1,333 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = _exit.c access.c chmod.c chown.c close.c creat.c execv.c execve.c fork.c fstat.c getpid.c isatty.c kill.c link.c lseek.c open.c pipe.c read.c sbrk.c stat.c time.c unlink.c utime.c wait.c write.c times.c gettime.c setjmp.S
-
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = _exit.o access.o chmod.o chown.o close.o creat.o \
-execv.o execve.o fork.o fstat.o getpid.o isatty.o kill.o link.o lseek.o \
-open.o pipe.o read.o sbrk.o stat.o time.o unlink.o utime.o wait.o \
-write.o times.o gettime.o setjmp.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/mmixware/_exit.c b/newlib/libc/sys/mmixware/_exit.c
deleted file mode 100644
index 127bda75d..000000000
--- a/newlib/libc/sys/mmixware/_exit.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* _exit for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-void _exit (int n)
-{
- /* Unfortunately, the return status is not returned by Knuth's mmix
- simulator, so it seems in effect ineffective. We set it anyway;
- there may be a purpose. */
- __asm__ ("SET $255,%0\n\tTRAP 0,0,0"
- : /* No outputs. */
- : "r" (n)
- : "memory");
-}
diff --git a/newlib/libc/sys/mmixware/access.c b/newlib/libc/sys/mmixware/access.c
deleted file mode 100644
index a7b664620..000000000
--- a/newlib/libc/sys/mmixware/access.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* access for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-int
-access (const char *fn, int flags)
-{
- /* Ugh. We don't have stat (), so we can't copy the other
- implementations. Opening a directory as a file usually works, so
- let's try and open it and use the openability, regardless of what
- kind of test or file it is. */
- long ret;
-
- /* We'll just assume that if we can open the file for reading, then it's
- Z-able, no matter what Z was. */
- ret = TRAP3f (SYS_Fopen, TMPFNO, fn, BinaryRead);
- if (ret == 0)
- {
- /* Yes, this was readable. As in other simulator access functions,
- we always return success in this case (though the others check
- for directory access). */
- TRAP1f (SYS_Fclose, TMPFNO);
- return 0;
- }
-
- errno = EACCES;
- return -1;
-}
diff --git a/newlib/libc/sys/mmixware/aclocal.m4 b/newlib/libc/sys/mmixware/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/mmixware/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/mmixware/chmod.c b/newlib/libc/sys/mmixware/chmod.c
deleted file mode 100644
index a328d6cce..000000000
--- a/newlib/libc/sys/mmixware/chmod.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* chmod stub for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-int
-chmod (const char *path, mode_t mode)
-{
- UNIMPLEMENTED (("path: %s, mode: %lu", path, (unsigned long) mode));
- errno = ENOSYS;
- return -1;
-}
diff --git a/newlib/libc/sys/mmixware/chown.c b/newlib/libc/sys/mmixware/chown.c
deleted file mode 100644
index f4fc49cac..000000000
--- a/newlib/libc/sys/mmixware/chown.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* chown stub for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-int
-chown (const char *path, short owner, short group)
-{
- UNIMPLEMENTED (("path: %s, owner: %d, group: %d", path, owner, group));
- errno = ENOSYS;
- return -1;
-}
diff --git a/newlib/libc/sys/mmixware/close.c b/newlib/libc/sys/mmixware/close.c
deleted file mode 100644
index d8203f4e2..000000000
--- a/newlib/libc/sys/mmixware/close.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* close for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-int
-_close (int file)
-{
- if ((unsigned int) file >= N_MMIX_FILEHANDLES
- || _MMIX_allocated_filehandle[file] == 0)
- {
- errno = EBADF;
- return -1;
- }
-
- _MMIX_allocated_filehandle[file] = 0;
-
- if (TRAP1f (SYS_Fclose, file) != 0)
- {
- errno = EIO;
- return -1;
- }
- return 0;
-}
diff --git a/newlib/libc/sys/mmixware/configure b/newlib/libc/sys/mmixware/configure
deleted file mode 100755
index d5e1fc3ee..000000000
--- a/newlib/libc/sys/mmixware/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=crt0.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/mmixware/configure.in b/newlib/libc/sys/mmixware/configure.in
deleted file mode 100644
index b9fa98875..000000000
--- a/newlib/libc/sys/mmixware/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/mmixware configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(crt0.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/mmixware/creat.c b/newlib/libc/sys/mmixware/creat.c
deleted file mode 100644
index 622dcfad2..000000000
--- a/newlib/libc/sys/mmixware/creat.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* creat for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-int
-creat (const char *path,
- /* We can't set the mode, so we have to ignore it. */
- mode_t mode)
-{
- return open (path, O_CREAT|O_WRONLY|O_TRUNC);
-}
diff --git a/newlib/libc/sys/mmixware/crt0.c b/newlib/libc/sys/mmixware/crt0.c
deleted file mode 100644
index 63fda5019..000000000
--- a/newlib/libc/sys/mmixware/crt0.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* crt0 stub for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-/* At present this is just a placeholder, to be filled in, if the need
- arises. The main init contents is in gcc/config/mmix/crti.asm.
-
- I think this file is not allowed to be empty. So here goes: */
-extern int _Dummy;
diff --git a/newlib/libc/sys/mmixware/execv.c b/newlib/libc/sys/mmixware/execv.c
deleted file mode 100644
index cae2813b5..000000000
--- a/newlib/libc/sys/mmixware/execv.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* execv stub for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-int
-execv (const char *path, char *const argv[])
-{
- UNIMPLEMENTED (("path: %s, argv: %p", path, argv));
- errno = ENOSYS;
- return -1;
-}
diff --git a/newlib/libc/sys/mmixware/execve.c b/newlib/libc/sys/mmixware/execve.c
deleted file mode 100644
index 6477daebc..000000000
--- a/newlib/libc/sys/mmixware/execve.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* execve stub for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-int
-_execve (const char *path, char *const argv[], char *const envp[])
-{
- UNIMPLEMENTED (("path: %s, argv: %p, envp: %p", path, argv, envp));
- errno = ENOSYS;
- return -1;
-}
diff --git a/newlib/libc/sys/mmixware/fork.c b/newlib/libc/sys/mmixware/fork.c
deleted file mode 100644
index ad2705846..000000000
--- a/newlib/libc/sys/mmixware/fork.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* fork stub for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-int
-_fork ()
-{
- UNIMPLEMENTED ((""));
- errno = ENOSYS;
- return -1;
-}
diff --git a/newlib/libc/sys/mmixware/fstat.c b/newlib/libc/sys/mmixware/fstat.c
deleted file mode 100644
index 63a9ac788..000000000
--- a/newlib/libc/sys/mmixware/fstat.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* fstat for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int
-_fstat (int file,
- struct stat *st)
-{
- st->st_mode = S_IFCHR;
- st->st_blksize = 4096;
- return 0;
-}
diff --git a/newlib/libc/sys/mmixware/getpid.c b/newlib/libc/sys/mmixware/getpid.c
deleted file mode 100644
index 5190726bf..000000000
--- a/newlib/libc/sys/mmixware/getpid.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* getpid stub for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-_getpid (n)
-{
- return 1;
-}
diff --git a/newlib/libc/sys/mmixware/gettime.c b/newlib/libc/sys/mmixware/gettime.c
deleted file mode 100644
index 973c6dfda..000000000
--- a/newlib/libc/sys/mmixware/gettime.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* gettime stub for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include "sys/time.h"
-#include <errno.h>
-
-int
-_gettimeofday (struct timeval *tp, void *tzp)
-{
- UNIMPLEMENTED (("timeval: %p, tzp: %p", tp, tzp));
- errno = ENOSYS;
- return -1;
-}
diff --git a/newlib/libc/sys/mmixware/isatty.c b/newlib/libc/sys/mmixware/isatty.c
deleted file mode 100644
index 86729aa56..000000000
--- a/newlib/libc/sys/mmixware/isatty.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* isatty for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-isatty (fd)
- int fd;
-{
- return fd == 0 || fd == 1 || fd == 2;
-}
diff --git a/newlib/libc/sys/mmixware/kill.c b/newlib/libc/sys/mmixware/kill.c
deleted file mode 100644
index c01f53c81..000000000
--- a/newlib/libc/sys/mmixware/kill.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* kill for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-_kill (n, m)
-{
- if (n == 1)
- return TRAP1i (SYS_halt, 0);
-
- errno = EPERM;
- return -1;
-}
-
diff --git a/newlib/libc/sys/mmixware/link.c b/newlib/libc/sys/mmixware/link.c
deleted file mode 100644
index 0629163b3..000000000
--- a/newlib/libc/sys/mmixware/link.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* link stub for MMIXware.
-
- Copyright (C) 2002 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-int
-_link ()
-{
- errno = EMLINK;
- return -1;
-}
diff --git a/newlib/libc/sys/mmixware/lseek.c b/newlib/libc/sys/mmixware/lseek.c
deleted file mode 100644
index 13a6ce14f..000000000
--- a/newlib/libc/sys/mmixware/lseek.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* lseek for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/unistd.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-off_t
-_lseek (int file,
- off_t ptr,
- int dir)
-{
- off_t simoff = dir == SEEK_END ? -(ptr + 1) : ptr;
- long ret;
-
- if ((unsigned int) file >= 32 || _MMIX_allocated_filehandle[file] == 0)
- {
- errno = EBADF;
- return -1;
- }
-
- if (dir == SEEK_CUR)
- {
- long curpos = TRAP2f (SYS_Ftell, file, 0);
-
- if (curpos == -1)
- {
- errno = EIO;
- return -1;
- }
-
- ptr += (off_t) curpos;
- }
-
- ret = TRAP2f (SYS_Fseek, file, simoff);
- if (ret == -1)
- {
- return -1;
- errno = EIO;
- }
-
- ret = TRAP2f (SYS_Ftell, file, 0);
- if (ret == -1)
- {
- errno = EIO;
- return -1;
- }
-
- return ret;
-}
diff --git a/newlib/libc/sys/mmixware/open.c b/newlib/libc/sys/mmixware/open.c
deleted file mode 100644
index f0b9fbafe..000000000
--- a/newlib/libc/sys/mmixware/open.c
+++ /dev/null
@@ -1,237 +0,0 @@
-/* open for MMIXware.
-
- Copyright (C) 2001, 2002 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <stdlib.h>
-#include <fcntl.h>
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-/* Let's keep the filehandle array here, since this is a primary
- initializer of it. */
-unsigned char _MMIX_allocated_filehandle[32] =
- {
- 1,
- 1,
- 1,
- 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
- };
-
-int
-_open (const char *path,
- int flags, ...)
-{
- long fileno;
- unsigned char mode;
- long append_contents = 0;
- unsigned long prev_contents_size = 0;
- char *prev_contents = NULL;
- long ret;
-
- for (fileno = 0;
- fileno < (sizeof (_MMIX_allocated_filehandle) /
- sizeof (_MMIX_allocated_filehandle[0]));
- fileno++)
- if (_MMIX_allocated_filehandle[fileno] == 0)
- break;
-
- if (fileno == (sizeof (_MMIX_allocated_filehandle) /
- sizeof (_MMIX_allocated_filehandle[0])))
- {
- errno = EMFILE;
- return -1;
- }
-
- /* We map this to a fopen call. The flags parameter is stymied because
- we don't support other than these flags. */
- if (flags & ~(O_RDONLY | O_WRONLY | O_RDWR | O_CREAT | O_APPEND | O_TRUNC))
- {
- UNIMPLEMENTED (("path: %s, flags: %d", path, flags));
- errno = ENOSYS;
- return -1;
- }
-
- if ((flags & O_ACCMODE) == O_RDONLY)
- mode = BinaryRead;
- else if ((flags & (O_WRONLY | O_APPEND)) == (O_WRONLY | O_APPEND))
- {
- mode = BinaryReadWrite;
- append_contents = 1;
- }
- else if ((flags & (O_RDWR | O_APPEND)) == (O_RDWR | O_APPEND))
- {
- mode = BinaryReadWrite;
- append_contents = 1;
- }
- else if ((flags & (O_WRONLY | O_CREAT)) == (O_WRONLY | O_CREAT)
- || (flags & (O_WRONLY | O_TRUNC)) == (O_WRONLY | O_TRUNC))
- mode = BinaryWrite;
- else if ((flags & (O_RDWR | O_CREAT)) == (O_RDWR | O_CREAT))
- mode = BinaryReadWrite;
- else if (flags & O_RDWR)
- mode = BinaryReadWrite;
- else
- {
- errno = EINVAL;
- return -1;
- }
-
- if (append_contents)
- {
- /* BinaryReadWrite is equal to "w+", so it truncates the file rather
- than keeping the contents, as can be imagined if you're looking
- for append functionality. The only way we can keep the contents
- so we can append to it, is by first reading in and saving the
- contents, then re-opening the file as BinaryReadWrite and write
- the previous contents. This seems to work for the needs of
- simple test-programs. */
- long openexist = TRAP3f (SYS_Fopen, fileno, path, BinaryRead);
- if (openexist == 0)
- {
- /* Yes, this file exists, now opened, so let's read it and keep
- the contents. Better have the memory around for this to
- work. */
- long seekval = TRAP2f (SYS_Fseek, fileno, -1);
-
- if (seekval == 0)
- {
- prev_contents_size = TRAP1f (SYS_Ftell, fileno);
-
- /* If the file has non-zero size, we have something to
- append to. */
- if (prev_contents_size != 0)
- {
- /* Start reading from the beginning. Ignore the return
- value from this call: we'll notice if we can't read
- as much as we want. */
- TRAP2f (SYS_Fseek, fileno, 0);
-
- prev_contents = malloc (prev_contents_size);
- if (prev_contents != 0)
- {
- /* I don't like the thought of trying to read the
- whole file all at once, disregarding the size,
- because the host system might not support that
- and we'd get funky errors. Read in 32k at a
- time. */
- char *ptr = prev_contents;
- unsigned long read_more = prev_contents_size;
- unsigned long chunk_size = 1 << 15;
-
- while (read_more >= chunk_size)
- {
- long readval
- = TRAP3f (SYS_Fread, fileno, ptr, chunk_size);
-
- if (readval != 0)
- {
- free (prev_contents);
- TRAP1f (SYS_Fclose, fileno);
- errno = EIO;
- return -1;
- }
- read_more -= chunk_size;
- ptr += chunk_size;
- }
-
- if (read_more != 0)
- {
- long readval
- = TRAP3f (SYS_Fread, fileno, ptr, read_more);
- if (readval != 0)
- {
- free (prev_contents);
- TRAP1f (SYS_Fclose, fileno);
- errno = EIO;
- return -1;
- }
- }
- }
- else
- {
- /* Malloc of area to copy to failed. The glibc
- manpage says its open can return ENOMEM due to
- kernel memory failures, so let's do that too
- here. */
- errno = ENOMEM;
- return -1;
- }
- }
- }
- else
- {
- /* Seek failed. Gotta be some I/O error. */
- errno = EIO;
- return -1;
- }
-
- TRAP1f (SYS_Fclose, fileno);
- }
- }
-
- ret = TRAP3f (SYS_Fopen, fileno, path, mode);
- if (ret < 0)
- {
- /* It's totally unknown what the error was. We'll just take our
- chances and assume ENOENT. */
- errno = ENOENT;
- return -1;
- }
-
- if (prev_contents_size != 0)
- {
- /* Write out the previous contents, a chunk at a time. Leave the
- file pointer at the end of the file. */
- unsigned long write_more = prev_contents_size;
- unsigned long chunk_size = 1 << 15;
- char *ptr = prev_contents;
-
- while (write_more >= chunk_size)
- {
- long writeval
- = TRAP3f (SYS_Fwrite, fileno, ptr, chunk_size);
- if (writeval != 0)
- {
- free (prev_contents);
- TRAP1f (SYS_Fclose, fileno);
- errno = EIO;
- return -1;
- }
- write_more -= chunk_size;
- ptr += chunk_size;
- }
- if (write_more != 0)
- {
- long writeval
- = TRAP3f (SYS_Fwrite, fileno, ptr, write_more);
- if (writeval != 0)
- {
- free (prev_contents);
- TRAP1f (SYS_Fclose, fileno);
- errno = EIO;
- return -1;
- }
- }
-
- free (prev_contents);
- }
-
- _MMIX_allocated_filehandle[fileno] = 1;
-
- return fileno;
-}
diff --git a/newlib/libc/sys/mmixware/pipe.c b/newlib/libc/sys/mmixware/pipe.c
deleted file mode 100644
index f980bcdb1..000000000
--- a/newlib/libc/sys/mmixware/pipe.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* pipe stub for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-int
-pipe (int *fd)
-{
- UNIMPLEMENTED (("fd: %p", fd));
- errno = ENOSYS;
- return -1;
-}
diff --git a/newlib/libc/sys/mmixware/read.c b/newlib/libc/sys/mmixware/read.c
deleted file mode 100644
index f0f5e22f9..000000000
--- a/newlib/libc/sys/mmixware/read.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* read for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-int
-_read (int file,
- char *ptr,
- size_t len)
-{
- long ret;
-
- if ((unsigned int) file >= 32 || _MMIX_allocated_filehandle[file] == 0)
- {
- errno = EBADF;
- return -1;
- }
-
- if (isatty(file))
- {
- ret = TRAP3f (SYS_Fgets, file, ptr, len);
-
- if (ret == -1)
- return 0;
-
- return ret;
- }
-
- ret = TRAP3f (SYS_Fread, file, ptr, len);
-
- /* Map the return codes:
- -1-len: an error. We return -1.
- 0: success. We return len.
- n-len: end-of-file after n chars read. We return n. */
- if (ret == 0)
- return len;
-
- if (ret == -1 - (long) len)
- {
- /* We don't know the nature of the failure, so this is an
- approximation. */
- errno = EIO;
- return -1;
- }
-
- return ret + len;
-}
diff --git a/newlib/libc/sys/mmixware/sbrk.c b/newlib/libc/sys/mmixware/sbrk.c
deleted file mode 100644
index de5ce5dac..000000000
--- a/newlib/libc/sys/mmixware/sbrk.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* sbrk for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-extern char *_Sbrk_high;
-
-/* When the program is loaded, the first location in Pool_Segment holds
- the first available octabyte in the memory pool (a.k.a. the heap);
- somewhere after the command-line parameters. We don't have to
- initialize that location, we can just use it straight up as a pointer;
- just point the symbol there.
-
- This file will be compiled with -no-builtin-syms, so we need to define
- Pool_Segment and any other symbols that would be predefined in mmixal. */
-
-__asm__ (" .global _Sbrk_high\n"
- "_Sbrk_high IS Pool_Segment\n"
- "Pool_Segment IS 0x40<<56");
-
-caddr_t
-_sbrk (size_t incr)
-{
- extern char end; /* Defined by the linker */
- char *prev_heap_end;
-
- prev_heap_end = _Sbrk_high;
- _Sbrk_high += incr;
- return (caddr_t) prev_heap_end;
-}
diff --git a/newlib/libc/sys/mmixware/setjmp.S b/newlib/libc/sys/mmixware/setjmp.S
deleted file mode 100644
index 862273dd5..000000000
--- a/newlib/libc/sys/mmixware/setjmp.S
+++ /dev/null
@@ -1,87 +0,0 @@
-/* Setjmp and longjmp for mmix.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE.
-
- jmp_buf[5]:
- 0: fp
- 1: rJ (return-address)
- 2: sp
- 3: rO *before* the setjmp call.
- 4: temporary storage. Reserved between setjmp and longjmp. */
-
-#ifdef __MMIX_ABI_GNU__
-#define arg1 $231
-#define arg2 $232
-#define outret $231
-#define popval 0
-#else
-#define arg1 $0
-#define arg2 $1
-#define outret $0
-#define popval 1
-#endif
-
- .section .text.setjmp,"ax",@progbits
- .global setjmp
-setjmp:
-% Store fp, sp and return address. Recycle the static-chain and
-% structure-return registers as temporary register, since we need to keep
-% the jmp_buf (parameter 1) and the return address across a "POP".
- SET $251,arg1
- STOU $253,$251,0
- GET $252,rJ
- STOU $252,$251,8
- STOU $254,$251,16
- SETL outret,0
-
-% Jump through hoops to get the value of rO *before* the setjmp call.
- GETA $255,0f
- PUT rJ,$255
- POP popval,0
-0:
- GET $255,rO
- STOU $255,$251,24
- GO $255,$252,0
- .size setjmp,.-setjmp
-
- .section .text.longjmp,"ax",@progbits
- .global longjmp
-longjmp:
-% Reset arg2 to 1 if it is 0 (see longjmp(2)) and store it in jmp_buf.
-% Save arg1 in a global register, since it will be destroyed by the POPs
-% (in the mmixware ABI).
- CSZ arg2,arg2,1
- STOU arg2,arg1,32
- SET $251,arg1
-
-% Loop and "POP 0,0" until rO is the expected value, like
-% the expansion of nonlocal_goto_receiver, except that we put the return
-% value in the right register and make sure that the POP causes it to
-% enter the right return-value register as seen by the caller. For the
-% GNU ABI, it is unnecessary to do this in the loop and perhaps the memory
-% access can be hoisted outside the loop, but this is safe and simple and
-% I see no need to optimize longjmps.
- GETA $255,0f
- PUT rJ,$255
- LDOU $255,$251,24
-0:
- GET $252,rO
- CMPU $252,$252,$255
- BNP $252,1f
- LDOU outret,$251,32
- POP popval,0
-1:
- LDOU $253,$251,0
- LDOU $255,$251,8
- LDOU $254,$251,16
- GO $255,$255,0
- .size longjmp,.-longjmp
diff --git a/newlib/libc/sys/mmixware/stat.c b/newlib/libc/sys/mmixware/stat.c
deleted file mode 100644
index b008a8263..000000000
--- a/newlib/libc/sys/mmixware/stat.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* stat stub for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-int
-_stat (const char *path, struct stat *st)
-
-{
- UNIMPLEMENTED (("path: %s, st: %p", path, st));
- errno = ENOSYS;
- return -1;
-}
diff --git a/newlib/libc/sys/mmixware/sys/syscall.h b/newlib/libc/sys/mmixware/sys/syscall.h
deleted file mode 100644
index e9e1ff4db..000000000
--- a/newlib/libc/sys/mmixware/sys/syscall.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/* syscall defines for MMIXware.
-
- Copyright (C) 2001, 2002 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-/* These are the mmixware simulator calls that are of use in newlib. */
-
-#define SYS_halt 0
-#define SYS_Fopen 1
-#define SYS_Fclose 2
-#define SYS_Fread 3
-#define SYS_Fgets 4
-#define SYS_Fwrite 6
-#define SYS_Fseek 9
-#define SYS_Ftell 10
-
-
-enum MMIX_filemode
- {
- TextRead = 0,
- TextWrite = 1,
- BinaryRead = 2,
- BinaryWrite = 3,
- BinaryReadWrite = 4
- };
-
-#define N_MMIX_FILEHANDLES 32
-
-/* We store a bitmap of allocated filehandles
- _MMIX_allocated_filehandle[fileno] in an array. There are 32 of them.
- Indexes 0, 1 and 2 are allocated from start. The reason we keep track
- of them is that *we* have to allocate a filehandle when opening a file.
- Had we got a filehandle from the simulator, we wouldn't have to keep
- track of it. A value of 0 denotes a free handle. */
-extern unsigned char _MMIX_allocated_filehandle[N_MMIX_FILEHANDLES];
-
-/* We use this file-handle number as a temporary; not used by usual file
- I/O. */
-#define TMPFNO 127
-
-/* Simulator call with one argument. Also used for zero-argument calls;
- pass a zero as ARG1. Make the asm volatile so we can safely ignore the
- return-value and only get the benefit from the supposed side-effect
- without the asm being optimized away. */
-#define TRAP1i(FUN, ARG1) \
- ({ long ret_; \
- __asm__ __volatile__ \
- ("TRAP 0,%1,%2\n\tSET %0,$255" \
- : "=r" (ret_) : "i" (FUN), "i" (ARG1) \
- : "memory"); \
- ret_; \
- })
-
-/* Helper macros to cope with the file-handle parameter to the simulator
- being *constant*. We support up to 32 simultaneously open files. Make
- the asm volatile so we can safely ignore the return-value and get the
- benefit from the supposed side-effect without the asm being optimized
- away. */
-
-#define I3f(FUN, ARG1, N, ARGS) \
- if (ARG1 == N) \
- __asm__ __volatile__ \
- ("SET $255,%3\n\tTRAP 0,%1,%2\n\tSET %0,$255" \
- : "=r" (ret_) : "i" (FUN), "i" (N), "r" (ARGS) \
- : "memory")
-
-/* Using if:s rather than switches to help GCC optimize the rest away. */
-#define DO32(FUN, ARG1, ARGS) \
- I3f (FUN, ARG1, 0, ARGS); \
- else I3f (FUN, ARG1, 1, ARGS); \
- else I3f (FUN, ARG1, 2, ARGS); \
- else I3f (FUN, ARG1, 3, ARGS); \
- else I3f (FUN, ARG1, 4, ARGS); \
- else I3f (FUN, ARG1, 5, ARGS); \
- else I3f (FUN, ARG1, 6, ARGS); \
- else I3f (FUN, ARG1, 7, ARGS); \
- else I3f (FUN, ARG1, 8, ARGS); \
- else I3f (FUN, ARG1, 9, ARGS); \
- else I3f (FUN, ARG1, 10, ARGS); \
- else I3f (FUN, ARG1, 11, ARGS); \
- else I3f (FUN, ARG1, 12, ARGS); \
- else I3f (FUN, ARG1, 13, ARGS); \
- else I3f (FUN, ARG1, 14, ARGS); \
- else I3f (FUN, ARG1, 15, ARGS); \
- else I3f (FUN, ARG1, 16, ARGS); \
- else I3f (FUN, ARG1, 17, ARGS); \
- else I3f (FUN, ARG1, 18, ARGS); \
- else I3f (FUN, ARG1, 19, ARGS); \
- else I3f (FUN, ARG1, 20, ARGS); \
- else I3f (FUN, ARG1, 21, ARGS); \
- else I3f (FUN, ARG1, 22, ARGS); \
- else I3f (FUN, ARG1, 23, ARGS); \
- else I3f (FUN, ARG1, 24, ARGS); \
- else I3f (FUN, ARG1, 25, ARGS); \
- else I3f (FUN, ARG1, 26, ARGS); \
- else I3f (FUN, ARG1, 27, ARGS); \
- else I3f (FUN, ARG1, 28, ARGS); \
- else I3f (FUN, ARG1, 29, ARGS); \
- else I3f (FUN, ARG1, 30, ARGS); \
- else I3f (FUN, ARG1, 31, ARGS); \
- else \
- { \
- errno = EBADF; \
- return -1; \
- }
-
-#define TRAP1f(FUN, ARG1) \
- ({ long ret_; \
- DO32 (FUN, ARG1, 0); \
- ret_; \
- })
-
-#define TRAP2f(FUN, ARG1, ARG2) \
- ({ long ret_; \
- DO32 (FUN, ARG1, ARG2); \
- ret_; \
- })
-
-#define TRAP3f(FUN, ARG1, ARG2, ARG3) \
- ({ long ret_; \
- unsigned long args_[] \
- = { (unsigned long) (ARG2), (unsigned long) (ARG3) }; \
- DO32 (FUN, ARG1, args_); \
- ret_; \
- })
-
-#ifndef __GNUC__
-/* Probably will not happen. Nevertheless... */
-# define UNIMPLEMENTED(MSG)
-#else
-# define UNIMPLEMENTED(MSG) UNIMPLEMENTEDi MSG
-# define UNIMPLEMENTEDi(MSG, ARGS...) \
- do { \
- char buf[2000]; \
- sprintf (buf, "UNIMPLEMENTED %s in %s\n", __FUNCTION__, __FILE__); \
- write (2, buf, strlen (buf)); \
- sprintf (buf, MSG , ##ARGS); \
- write (2, buf, strlen (buf)); \
- write (2, "\n", 1); \
- } while (0)
-#endif
diff --git a/newlib/libc/sys/mmixware/time.c b/newlib/libc/sys/mmixware/time.c
deleted file mode 100644
index 14be19b34..000000000
--- a/newlib/libc/sys/mmixware/time.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* time stub for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-time_t
-time (time_t *tloc)
-{
- /* Nowhere to get time reasonably from; neither of rC, rI and rU seems
- usable without assuming some scaling of mems and oops to real time. */
- time_t thetime = 0;
-
- if (tloc)
- *tloc = thetime;
-
- return thetime;
-}
diff --git a/newlib/libc/sys/mmixware/times.c b/newlib/libc/sys/mmixware/times.c
deleted file mode 100644
index 6275ef34e..000000000
--- a/newlib/libc/sys/mmixware/times.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* times stub for MMIXware.
-
- Copyright (C) 2001, 2002 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include "sys/times.h"
-
-clock_t
-_times (struct tms *buffer)
-{
- memset (buffer, 0, sizeof (*buffer));
- return 0;
-}
diff --git a/newlib/libc/sys/mmixware/unlink.c b/newlib/libc/sys/mmixware/unlink.c
deleted file mode 100644
index b70df2dc3..000000000
--- a/newlib/libc/sys/mmixware/unlink.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* unlink stub for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int
-_unlink ()
-{
- return -1;
-}
diff --git a/newlib/libc/sys/mmixware/utime.c b/newlib/libc/sys/mmixware/utime.c
deleted file mode 100644
index 47259fcff..000000000
--- a/newlib/libc/sys/mmixware/utime.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* utime stub for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-int
-utime (path, times)
- const char *path;
- char *times;
-{
- UNIMPLEMENTED (("path: %s, times: %p", path, times));
- errno = ENOSYS;
- return -1;
-}
diff --git a/newlib/libc/sys/mmixware/wait.c b/newlib/libc/sys/mmixware/wait.c
deleted file mode 100644
index 9c66f3b76..000000000
--- a/newlib/libc/sys/mmixware/wait.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* wait stub for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-int
-_wait (statusp)
- int *statusp;
-{
- UNIMPLEMENTED (("statusp: %p", statusp));
- errno = ENOSYS;
- return -1;
-}
diff --git a/newlib/libc/sys/mmixware/write.c b/newlib/libc/sys/mmixware/write.c
deleted file mode 100644
index 74d5fcaa7..000000000
--- a/newlib/libc/sys/mmixware/write.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* write for MMIXware.
-
- Copyright (C) 2001 Hans-Peter Nilsson
-
- Permission to use, copy, modify, and distribute this software is
- freely granted, provided that the above copyright notice, this notice
- and the following disclaimer are preserved with no changes.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE. */
-
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <errno.h>
-
-int
-_write ( int file,
- char *ptr,
- size_t len)
-{
- long ret;
-
- if ((unsigned int) file >= 32 || _MMIX_allocated_filehandle[file] == 0)
- {
- errno = EBADF;
- return -1;
- }
-
- ret = TRAP3f (SYS_Fwrite, file, ptr, len);
-
- if (ret < 0)
- {
- errno = EIO;
- return -1;
- }
-
- return len;
-}
diff --git a/newlib/libc/sys/netware/Makefile.am b/newlib/libc/sys/netware/Makefile.am
deleted file mode 100644
index e112bac10..000000000
--- a/newlib/libc/sys/netware/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = \
- getpid.c \
- link.c
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/netware/Makefile.in b/newlib/libc/sys/netware/Makefile.in
deleted file mode 100644
index 726e1f35d..000000000
--- a/newlib/libc/sys/netware/Makefile.in
+++ /dev/null
@@ -1,330 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = getpid.c link.c
-
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = getpid.o link.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/netware/aclocal.m4 b/newlib/libc/sys/netware/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/netware/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/netware/configure b/newlib/libc/sys/netware/configure
deleted file mode 100755
index e3668a287..000000000
--- a/newlib/libc/sys/netware/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=link.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/netware/configure.in b/newlib/libc/sys/netware/configure.in
deleted file mode 100644
index 16f824c1f..000000000
--- a/newlib/libc/sys/netware/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/netware configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(link.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/netware/crt0.c b/newlib/libc/sys/netware/crt0.c
deleted file mode 100644
index 1d796d025..000000000
--- a/newlib/libc/sys/netware/crt0.c
+++ /dev/null
@@ -1,4 +0,0 @@
-/* I have a copy of something that would serve as a NetWare crt0.o,
- but it is copyright by Novell. */
-
-int _dummy_crt0 = 1;
diff --git a/newlib/libc/sys/netware/getpid.c b/newlib/libc/sys/netware/getpid.c
deleted file mode 100644
index 9218dfcc3..000000000
--- a/newlib/libc/sys/netware/getpid.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* NetWare version of getpid. This is supposed to return a unique
- identifier which is used to create temporary file names. We use
- the thread ID. I hope this is unique. */
-
-#include <unistd.h>
-
-pid_t
-getpid ()
-{
- return GetThreadID ();
-}
diff --git a/newlib/libc/sys/netware/link.c b/newlib/libc/sys/netware/link.c
deleted file mode 100644
index d816d0ac6..000000000
--- a/newlib/libc/sys/netware/link.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* NetWare version of link. This can not be implemented using an
- MS-DOS file system. */
-
-#include <unistd.h>
-#include <errno.h>
-
-#undef errno
-extern int errno;
-
-int
-link (path1, path2)
- const char *path1;
- const char *path2;
-{
- errno = ENOSYS;
- return -1;
-}
diff --git a/newlib/libc/sys/rtems/Makefile.am b/newlib/libc/sys/rtems/Makefile.am
deleted file mode 100644
index 24b82b83e..000000000
--- a/newlib/libc/sys/rtems/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = dummysys.c
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/rtems/Makefile.in b/newlib/libc/sys/rtems/Makefile.in
deleted file mode 100644
index a72d595f3..000000000
--- a/newlib/libc/sys/rtems/Makefile.in
+++ /dev/null
@@ -1,329 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = dummysys.c
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = dummysys.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/rtems/aclocal.m4 b/newlib/libc/sys/rtems/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/rtems/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/rtems/configure b/newlib/libc/sys/rtems/configure
deleted file mode 100755
index 112cfebe8..000000000
--- a/newlib/libc/sys/rtems/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=dummysys.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/rtems/configure.in b/newlib/libc/sys/rtems/configure.in
deleted file mode 100644
index 5d9abcf05..000000000
--- a/newlib/libc/sys/rtems/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/rtems configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(dummysys.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/rtems/crt0.c b/newlib/libc/sys/rtems/crt0.c
deleted file mode 100644
index e40a8fc03..000000000
--- a/newlib/libc/sys/rtems/crt0.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * RTEMS Fake crt0
- *
- * Each RTEMS BSP provides its own crt0 and linker script. Unfortunately
- * this means that crt0 and the linker script are not available as
- * each tool is configured. Without a crt0 and linker script, some
- * targets do not successfully link "conftest.c" during the configuration
- * process. So this fake crt0.c provides all the symbols required to
- * successfully link a program. The resulting program will not run
- * but this is enough to satisfy the autoconf macro AC_PROG_CC.
- */
-
-#include <reent.h>
-
-void rtems_provides_crt0( void ) {} /* dummy symbol so file always has one */
-
-/* RTEMS provides some of its own routines including a Malloc family */
-
-void *malloc() { return 0; }
-void *realloc() { return 0; }
-void free() { ; }
-void abort() { ; }
-int raise() { return -1; }
-void rtems_gxx_mutex_init() { }
-int rtems_gxx_mutex_lock() { return -1; }
-int rtems_gxx_mutex_unlock() { return -1; }
-int rtems_gxx_once() { return -1; }
-
-/* stubs for functions from reent.h */
-int _close_r (struct _reent *r, int fd) { return -1; }
-#if NOT_USED_BY_RTEMS
-int _execve_r (struct _reent *r, char *, char **, char **) { return -1; }
-#endif
-int _fcntl_r ( struct _reent *ptr, int fd, int cmd, int arg ) { return -1;}
-#if NOT_USED_BY_RTEMS
-int _fork_r (struct _reent *r) { return -1; }
-#endif
-int _fstat_r (struct _reent *r, int fd, struct stat *buf) { return -1; }
-int _getpid_r (struct _reent *r) { return -1; }
-int _kill_r ( struct _reent *r, int pid, int sig ) { return -1; }
-int _link_r ( struct _reent *ptr, const char *existing, const char *new) { return -1; }
-_off_t _lseek_r ( struct _reent *ptr, int fd, _off_t offset, int whence ) { return -1; }
-int _open_r (struct _reent *r, const char *buf, int flags, int mode) { return -1; }
-_ssize_t _read_r (struct _reent *r, int fd, void *buf, size_t nbytes) { return -1; }
-#if NOT_USED_BY_RTEMS
-void *_sbrk_r (struct _reent *r, ptrdiff_t) { return -1; }
-#endif
-int _stat_r (struct _reent *r, const char *path, struct stat *buf) { return -1; }
-_CLOCK_T_ _times_r (struct _reent *r, struct tms *ptms) { return -1; }
-int _unlink_r (struct _reent *r, const char *path) { return -1; }
-#if NOT_USED_BY_RTEMS
-int _wait_r (struct _reent *r, int *) { return -1; }
-#endif
-_ssize_t _write_r (struct _reent *r, int fd, const void *buf, size_t nbytes) { return -1; }
-
-int isatty( int fd ) { return -1; }
-
-_realloc_r() {}
-_calloc_r() {}
-_malloc_r() {}
-_free_r() {}
-
-/* gcc can implicitly generate references to these */
-/* strcmp() {} */
-/* strcpy() {} */
-/* strlen() {} */
-/* memcmp() {} */
-/* memcpy() {} */
-/* memset() {} */
-
-/* The PowerPC expects certain symbols to be defined in the linker script. */
-
-#if defined(__PPC__)
- int __SDATA_START__; int __SDATA2_START__;
- int __GOT_START__; int __GOT_END__;
- int __GOT2_START__; int __GOT2_END__;
- int __SBSS_END__; int __SBSS2_END__;
- int __FIXUP_START__; int __FIXUP_END__;
- int __EXCEPT_START__; int __EXCEPT_END__;
- int __init; int __fini;
- int __CTOR_LIST__; int __CTOR_END__;
- int __DTOR_LIST__; int __DTOR_END__;
-#endif
-
-/* The SH expects certain symbols to be defined in the linker script. */
-
-#if defined(__sh__)
-int __EH_FRAME_BEGIN__;
-#endif
-
-/* The hppa expects this to be defined in the real crt0.s.
- * Also for some reason, the hppa1.1 does not find atexit()
- * during the AC_PROG_CC tests.
- */
-
-#if defined(__hppa__)
-/*
- asm ( ".subspa \$GLOBAL\$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=40");
- asm ( ".export \$global\$" );
- asm ( "\$global\$:");
-*/
-
- asm (".text");
- asm (".global");
- asm (".EXPORT $$dyncall,ENTRY");
- asm ("$$dyncall:");
- int atexit(void (*function)(void)) { return 0; }
-#endif
-
-
-/*
- * The AMD a29k generates code expecting the following.
- */
-
-#if defined(_AM29000) || defined(_AM29K)
-asm (".global V_SPILL, V_FILL" );
-asm (".global V_EPI_OS, V_BSD_OS" );
-
-asm (".equ V_SPILL, 64" );
-asm (".equ V_FILL, 65" );
-
-asm (".equ V_BSD_OS, 66" );
-asm (".equ V_EPI_OS, 69" );
-#endif
-
-#if defined(__AVR__)
-/*
- * Initial stack pointer address "__stack"
- * hard coded into GCC instead of providing it through ldscripts
- */
-const char* __stack ;
-#endif
diff --git a/newlib/libc/sys/rtems/dummysys.c b/newlib/libc/sys/rtems/dummysys.c
deleted file mode 100644
index 81091182e..000000000
--- a/newlib/libc/sys/rtems/dummysys.c
+++ /dev/null
@@ -1 +0,0 @@
-void not_required_by_rtems( void ) {}
diff --git a/newlib/libc/sys/rtems/include/limits.h b/newlib/libc/sys/rtems/include/limits.h
deleted file mode 100644
index 9d1162420..000000000
--- a/newlib/libc/sys/rtems/include/limits.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * This file lists the minimums for the limits set by each of
- * the POSIX features subsets.
- *
- * XXX: Careful attention needs to be paid to section 2.8 in 1003.1b-1993
- * to segregrate the variables below based on their "class" according
- * to our implementation. We also need to set the Run-Time Invariant
- * and other related values.
- *
- * $Id$
- */
-
-#ifndef _GCC_LIMITS_H_ /* if we have not seen gcc's limits.h yet */
-#include_next <limits.h>
-#endif
-
-#include <sys/syslimits.h>
-
-#ifndef __POSIX_LIMITS_h
-#define __POSIX_LIMITS_h
-
-/****************************************************************************
- ****************************************************************************
- * *
- * P1003.1b-1993 defines the constants below this comment. *
- * *
- ****************************************************************************
- ****************************************************************************/
-
-#define _POSIX_AIO_LISTIO_MAX 2
-#define _POSIX_AIO_MAX 1
-#define _POSIX_ARG_MAX 4096
-#define _POSIX_CHILD_MAX 6
-#define _POSIX_DELAYTIMER_MAX 32
-#define _POSIX_LINK_MAX 8
-#define _POSIX_MAX_CANON 255
-#define _POSIX_MAX_INPUT 255
-#define _POSIX_MQ_OPEN_MAX 8
-#define _POSIX_MQ_PRIO_MAX 32
-#define _POSIX_NAME_MAX 255
-#define _POSIX_NGROUPS_MAX 0
-#define _POSIX_OPEN_MAX 16
-#define _POSIX_PATH_MAX 255
-#define _POSIX_PIPE_BUF 512
-#define _POSIX_RTSIG_MAX 8
-#define _POSIX_SEM_NSEMS_MAX 256
-#define _POSIX_SEM_VALUE_MAX 32767
-#define _POSIX_SIGQUEUE_MAX 32
-#define _POSIX_SSIZE_MAX 32767
-#define _POSIX_STREAM_MAX 8
-#define _POSIX_TIMER_MAX 32
-#define _POSIX_TZNAME_MAX 3
-
-/*
- * Definitions of the following may be omitted if the value is >= stated
- * minimum but is indeterminate.
- */
-
-#define AIO_LISTIO_MAX 2
-#define AIO_MAX 1
-#define AIO_PRIO_DELTA_MAX 0
-#define DELAYTIMER_MAX 32
-#define MQ_OPEN_MAX 8
-#define MQ_PRIO_MAX 32
-#define PAGESIZE 1
-#define RTSIG_MAX 8
-#define SEM_NSEMS_MAX 256
-#define SEM_VALUE_MAX 32767
-#define SIGQUEUE_MAX 32
-#define STREAM_MAX 8
-#define TIMER_MAX 32
-#define TZNAME_MAX 3
-
-/*
- * Invariant values
- */
-
-#define SSIZE_MAX 32767
-
-/*
- * Maximum Values
- */
-
-#define _POSIX_CLOCKRES_MIN 0 /* in nanoseconds */
-
-/****************************************************************************
- ****************************************************************************
- * *
- * P1003.1c/D10 defines the constants below this comment. *
- *
- * XXX: doc seems to have printing problems in this table :(
- * *
- ****************************************************************************
- ****************************************************************************/
-
-#define _POSIX_LOGIN_NAME_MAX 9
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-#define _POSIX_THREAD_KEYS_MAX 28
-#define _POSIX_THREAD_THREADS_MAX 64
-#define _POSIX_TTY_NAME_MAX 9
-
-/*
- * Definitions of the following may be omitted if the value is >= stated
- * minimum but is indeterminate.
- *
- * NOTE: LOGIN_NAME_MAX is named LOGNAME_MAX under Solaris 2.x. Perhaps
- * the draft specification will be changing. jrs 05/24/96
- */
-
-#define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
-#define TTY_NAME_MAX _POSIX_TTY_NAME_MAX
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/*
- * RTEMS is smart enough to give us the minimum stack size if we ask
- * for too little. Because the real RTEMS limit for this is cpu dependent
- * AND rtems header files are not installed yet, we cannot use the cpu
- * dependent constant CPU_STACK_MINIMUM_SIZE. Moreover, we do not want
- * to duplicate that information here so we will just let RTEMS magically
- * give us its minimum stack size.
- *
- * NOTE: The other alternative is to have this be a macro for a
- * routine in RTEMS which returns the constant.
- */
-
-#define PTHREAD_STACK_MIN 0
-
-/*
- * The maximum number of keys (PTHREAD_KEYS_MAX) and threads
- * (PTHREAD_THREADS_MAX) are configurable and may exceed the minimum.
- *
-#define PTHREAD_KEYS_MAX _POSIX_THREAD_KEYS_MAX
-#define PTHREAD_THREADS_MAX _POSIX_THREAD_THREADS_MAX
-*/
-
-
-/****************************************************************************
- ****************************************************************************
- * *
- * P1003.4b/D8 defines the constants below this comment. *
- * *
- ****************************************************************************
- ****************************************************************************/
-
-#define _POSIX_INTERRUPT_OVERRUN_MAX 32
-
-/*
- * Definitions of the following may be omitted if the value is >= stated
- * minimum but is indeterminate.
- */
-
-#define INTERRUPT_OVERRUN_MAX 32
-
-/*
- * Pathname Variables
- */
-
-#define MIN_ALLOC_SIZE
-#define REC_MIN_XFER_SIZE
-#define REC_MAX_XFER_SIZE
-#define REC_INCR_XFER_SIZE
-#define REC_XFER_ALIGN
-#define MAX_ATOMIC_SIZE
-
-#endif
-/* end of include file */
diff --git a/newlib/libc/sys/rtems/machine/limits.h b/newlib/libc/sys/rtems/machine/limits.h
deleted file mode 100644
index 5a6ee0337..000000000
--- a/newlib/libc/sys/rtems/machine/limits.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * $Id$
- */
-
-/* intentionally empty file */
-
diff --git a/newlib/libc/sys/rtems/machine/param.h b/newlib/libc/sys/rtems/machine/param.h
deleted file mode 100644
index 4168f1f6c..000000000
--- a/newlib/libc/sys/rtems/machine/param.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef _MACHINE_PARAM_H_
-#define _MACHINE_PARAM_H_
-
-/*
- * These aren't really machine-dependent for RTEMS.....
- */
-
-/*
-#define MACHINE "i386"
-#define MID_MACHINE MID_I386
-*/
-
-/*
- * Round p (pointer or byte index) up to a correctly-aligned value
- * for all data types (int, long, ...). The result is unsigned int
- * and must be cast to any desired pointer type.
- */
-#define ALIGNBYTES (sizeof(int) - 1)
-#define ALIGN(p) (((unsigned)(p) + ALIGNBYTES) & ~ALIGNBYTES)
-
-#define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */
-#define PAGE_SIZE (1<<PAGE_SHIFT) /* bytes/page */
-#define PAGE_MASK (PAGE_SIZE-1)
-#define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t)))
-
-#define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t)))
-#define PDRSHIFT 22 /* LOG2(NBPDR) */
-#define NBPDR (1<<PDRSHIFT) /* bytes/page dir */
-
-#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
-#define DEV_BSIZE (1<<DEV_BSHIFT)
-
-#define BLKDEV_IOSIZE 2048
-#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
-
-#define UPAGES 2 /* pages of u-area */
-
-/*
- * Constants related to network buffer management.
- * MCLBYTES must be no larger than CLBYTES (the software page size), and,
- * on machines that exchange pages of input or output buffers with mbuf
- * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
- * of the hardware page size.
- */
-#ifndef MSIZE
-#define MSIZE 128 /* size of an mbuf */
-#endif /* MSIZE */
-
-#ifndef MCLSHIFT
-#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
-#endif /* MCLSHIFT */
-#define MCLBYTES (1 << MCLSHIFT) /* size of an m_buf cluster */
-#define MCLOFSET (MCLBYTES - 1) /* offset within an m_buf cluster */
-
-/*
- * Some macros for units conversion
- */
-
-/* clicks to bytes */
-#define ctob(x) ((x)<<PAGE_SHIFT)
-
-/* bytes to clicks */
-#define btoc(x) (((unsigned)(x)+PAGE_MASK)>>PAGE_SHIFT)
-
-/*
- * btodb() is messy and perhaps slow because `bytes' may be an off_t. We
- * want to shift an unsigned type to avoid sign extension and we don't
- * want to widen `bytes' unnecessarily. Assume that the result fits in
- * a daddr_t.
- */
-#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
- (sizeof (bytes) > sizeof(long) \
- ? (daddr_t)((unsigned long long)(bytes) >> DEV_BSHIFT) \
- : (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT))
-
-#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
- ((off_t)(db) << DEV_BSHIFT)
-
-/*
- * Mach derived conversion macros
- */
-#define trunc_page(x) ((unsigned)(x) & ~PAGE_MASK)
-#define round_page(x) ((((unsigned)(x)) + PAGE_MASK) & ~PAGE_MASK)
-
-#define atop(x) ((unsigned)(x) >> PAGE_SHIFT)
-#define ptoa(x) ((unsigned)(x) << PAGE_SHIFT)
-
-#endif /* !_MACHINE_PARAM_H_ */
diff --git a/newlib/libc/sys/rtems/sys/dirent.h b/newlib/libc/sys/rtems/sys/dirent.h
deleted file mode 100644
index fa3182824..000000000
--- a/newlib/libc/sys/rtems/sys/dirent.h
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef _SYS_DIRENT_H
-# define _SYS_DIRENT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This file was written to be compatible with the BSD directory
- * routines, so it looks like it. But it was written from scratch.
- * Sean Eric Fagan, sef@Kithrup.COM
- *
- * Copied to RTEMS configuration without modification.
- */
-
-typedef struct _dirdesc {
- int dd_fd;
- long dd_loc;
- long dd_size;
- char *dd_buf;
- int dd_len;
- long dd_seek;
-} DIR;
-
-# define __dirfd(dp) ((dp)->dd_fd)
-
-DIR *opendir(const char *);
-struct dirent *readdir(DIR *);
-void rewinddir(DIR *);
-int closedir(DIR *);
-void seekdir(DIR *dir, long loc);
-long telldir(DIR *dir);
-
-#include <sys/types.h>
-
-#include <limits.h>
-
-struct dirent {
- long d_ino;
- off_t d_off;
- unsigned short d_reclen;
- /* we need better syntax for variable-sized arrays */
- unsigned short d_namlen;
- char d_name[NAME_MAX + 1];
-};
-
-int scandir ( const char *dirname,
- struct dirent *** namelist,
- int (*select)(struct dirent *),
- int (*dcomp)(const struct dirent **, const struct dirent **)
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
diff --git a/newlib/libc/sys/rtems/sys/param.h b/newlib/libc/sys/rtems/sys/param.h
deleted file mode 100644
index 0060720f8..000000000
--- a/newlib/libc/sys/rtems/sys/param.h
+++ /dev/null
@@ -1,241 +0,0 @@
-/*-
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)param.h 8.3 (Berkeley) 4/4/95
- * $Id$
- */
-
-#ifndef _SYS_PARAM_H_
-#define _SYS_PARAM_H_
-
-/* from newlib's <sys/param.h> */
-
-#include <sys/config.h>
-#include <machine/endian.h>
-
-# define HZ (60)
-# define PATHSIZE (1024)
-
-/* end of from newlib's <sys/param.h> */
-
-#include <unistd.h>
-
-#define BSD 199506 /* System version (year & month). */
-#define BSD4_3 1
-#define BSD4_4 1
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef LOCORE
-#include <sys/types.h>
-#endif
-
-/*
- * Machine-independent constants (some used in following include files).
- * Redefined constants are from POSIX 1003.1 limits file.
- *
- * MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>)
- * MAXLOGNAME should be >= UT_NAMESIZE (see <utmp.h>)
- */
-#include <sys/syslimits.h>
-
-#define MAXCOMLEN 16 /* max command name remembered */
-#define MAXINTERP 32 /* max interpreter file name length */
-#define MAXLOGNAME 12 /* max login name length */
-#define MAXUPRC CHILD_MAX /* max simultaneous processes */
-#define NCARGS ARG_MAX /* max bytes for an exec function */
-#define NGROUPS NGROUPS_MAX /* max number groups */
-#define NOFILE OPEN_MAX /* max open files per process */
-#define NOGROUP 65535 /* marker for empty group set member */
-#define MAXHOSTNAMELEN 256 /* max hostname size */
-
-/* More types and definitions used throughout the kernel. */
-#ifdef KERNEL
-#include <sys/cdefs.h>
-#include <sys/errno.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/ucred.h>
-#include <sys/uio.h>
-#include <sys/rtprio.h>
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-#ifndef TRUE
-#define TRUE 1
-#endif
-#endif
-
-/* Signals. */
-#include <sys/signal.h>
-
-/* Machine type dependent parameters. */
-#include <machine/param.h>
-#include <machine/limits.h>
-
-/*
- * Priorities. Note that with 32 run queues, differences less than 4 are
- * insignificant.
- */
-#define PSWP 0
-#define PVM 4
-#define PINOD 8
-#define PRIBIO 16
-#define PVFS 20
-#define PZERO 22 /* No longer magic, shouldn't be here. XXX */
-#define PSOCK 24
-#define PWAIT 32
-#define PLOCK 36
-#define PPAUSE 40
-#define PUSER 50
-#define MAXPRI 127 /* Priorities range from 0 through MAXPRI. */
-
-#define PRIMASK 0x0ff
-#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */
-
-#define NZERO 0 /* default "nice" */
-
-#define NBPW sizeof(int) /* number of bytes per word (integer) */
-
-#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */
-#define NODEV (dev_t)(-1) /* non-existent device */
-
-/*
- * Clustering of hardware pages on machines with ridiculously small
- * page sizes is done here. The paging subsystem deals with units of
- * CLSIZE pte's describing PAGE_SIZE (from machine/machparam.h) pages each.
- */
-#if 0
-#define CLBYTES (CLSIZE*PAGE_SIZE)
-#endif
-
-#define CBLOCK 128 /* Clist block size, must be a power of 2. */
-#define CBQSIZE (CBLOCK/NBBY) /* Quote bytes/cblock - can do better. */
- /* Data chars/clist. */
-#define CBSIZE (CBLOCK - sizeof(struct cblock *) - CBQSIZE)
-#define CROUND (CBLOCK - 1) /* Clist rounding. */
-
-/*
- * File system parameters and macros.
- *
- * The file system is made out of blocks of at most MAXBSIZE units, with
- * smaller units (fragments) only in the last direct block. MAXBSIZE
- * primarily determines the size of buffers in the buffer pool. It may be
- * made larger without any effect on existing file systems; however making
- * it smaller make make some file systems unmountable. Also, MAXBSIZE
- * must be less than MAXPHYS!!! DFLTBSIZE is the average amount of
- * memory allocated by vfs_bio per nbuf. BKVASIZE is the average amount
- * of kernel virtual space allocated per nbuf. BKVASIZE should be >=
- * DFLTBSIZE. If it is significantly bigger than DFLTBSIZE, then
- * kva fragmentation causes fewer performance problems.
- */
-#define MAXBSIZE 65536
-#define BKVASIZE 8192
-#define DFLTBSIZE 4096
-#define MAXFRAG 8
-
-/*
- * MAXPATHLEN defines the longest permissible path length after expanding
- * symbolic links. It is used to allocate a temporary buffer from the buffer
- * pool in which to do the name expansion, hence should be a power of two,
- * and must be less than or equal to MAXBSIZE. MAXSYMLINKS defines the
- * maximum number of symbolic links that may be expanded in a path name.
- * It should be set high enough to allow all legitimate uses, but halt
- * infinite loops reasonably quickly.
- */
-#if !defined(__rtems__)
-#define MAXPATHLEN PATH_MAX
-#endif
-#define MAXSYMLINKS 32
-
-/* Bit map related macros. */
-#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
-#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
-#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
-#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
-
-/* Macros for counting and rounding. */
-#ifndef howmany
-#define howmany(x, y) (((x)+((y)-1))/(y))
-#endif
-#define rounddown(x, y) (((x)/(y))*(y))
-#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */
-#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
-#define powerof2(x) ((((x)-1)&(x))==0)
-
-/* Macros for min/max. */
-#ifndef KERNEL
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#endif
-
-/*
- * Constants for setting the parameters of the kernel memory allocator.
- *
- * 2 ** MINBUCKET is the smallest unit of memory that will be
- * allocated. It must be at least large enough to hold a pointer.
- *
- * Units of memory less or equal to MAXALLOCSAVE will permanently
- * allocate physical memory; requests for these size pieces of
- * memory are quite fast. Allocations greater than MAXALLOCSAVE must
- * always allocate and free physical memory; requests for these
- * size allocations should be done infrequently as they will be slow.
- *
- * Constraints: PAGE_SIZE <= MAXALLOCSAVE <= 2 ** (MINBUCKET + 14), and
- * MAXALLOCSIZE must be a power of two.
- */
-#define MINBUCKET 4 /* 4 => min allocation of 16 bytes */
-#define MAXALLOCSAVE (2 * PAGE_SIZE)
-
-/*
- * Scale factor for scaled integers used to count %cpu time and load avgs.
- *
- * The number of CPU `tick's that map to a unique `%age' can be expressed
- * by the formula (1 / (2 ^ (FSHIFT - 11))). The maximum load average that
- * can be calculated (assuming 32 bits) can be closely approximated using
- * the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15).
- *
- * For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age',
- * FSHIFT must be at least 11; this gives us a maximum load avg of ~1024.
- */
-#define FSHIFT 11 /* bits to right of fixed binary point */
-#define FSCALE (1<<FSHIFT)
-
-#endif /* _SYS_PARAM_H_ */
diff --git a/newlib/libc/sys/rtems/sys/queue.h b/newlib/libc/sys/rtems/sys/queue.h
deleted file mode 100644
index 037009f1a..000000000
--- a/newlib/libc/sys/rtems/sys/queue.h
+++ /dev/null
@@ -1,611 +0,0 @@
-/*
- * Copyright (c) 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)queue.h 8.5 (Berkeley) 8/20/94
- * $FreeBSD: src/sys/sys/queue.h,v 1.54 2002/08/05 05:18:43 alfred Exp $
- */
-
-#ifndef _SYS_QUEUE_H_
-#define _SYS_QUEUE_H_
-
-#include <sys/cdefs.h>
-
-/*
- * This file defines four types of data structures: singly-linked lists,
- * singly-linked tail queues, lists and tail queues.
- *
- * A singly-linked list is headed by a single forward pointer. The elements
- * are singly linked for minimum space and pointer manipulation overhead at
- * the expense of O(n) removal for arbitrary elements. New elements can be
- * added to the list after an existing element or at the head of the list.
- * Elements being removed from the head of the list should use the explicit
- * macro for this purpose for optimum efficiency. A singly-linked list may
- * only be traversed in the forward direction. Singly-linked lists are ideal
- * for applications with large datasets and few or no removals or for
- * implementing a LIFO queue.
- *
- * A singly-linked tail queue is headed by a pair of pointers, one to the
- * head of the list and the other to the tail of the list. The elements are
- * singly linked for minimum space and pointer manipulation overhead at the
- * expense of O(n) removal for arbitrary elements. New elements can be added
- * to the list after an existing element, at the head of the list, or at the
- * end of the list. Elements being removed from the head of the tail queue
- * should use the explicit macro for this purpose for optimum efficiency.
- * A singly-linked tail queue may only be traversed in the forward direction.
- * Singly-linked tail queues are ideal for applications with large datasets
- * and few or no removals or for implementing a FIFO queue.
- *
- * A list is headed by a single forward pointer (or an array of forward
- * pointers for a hash table header). The elements are doubly linked
- * so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list before
- * or after an existing element or at the head of the list. A list
- * may only be traversed in the forward direction.
- *
- * A tail queue is headed by a pair of pointers, one to the head of the
- * list and the other to the tail of the list. The elements are doubly
- * linked so that an arbitrary element can be removed without a need to
- * traverse the list. New elements can be added to the list before or
- * after an existing element, at the head of the list, or at the end of
- * the list. A tail queue may be traversed in either direction.
- *
- * For details on the use of these macros, see the queue(3) manual page.
- *
- *
- * SLIST LIST STAILQ TAILQ
- * _HEAD + + + +
- * _HEAD_INITIALIZER + + + +
- * _ENTRY + + + +
- * _INIT + + + +
- * _EMPTY + + + +
- * _FIRST + + + +
- * _NEXT + + + +
- * _PREV - - - +
- * _LAST - - + +
- * _FOREACH + + + +
- * _FOREACH_REVERSE - - - +
- * _INSERT_HEAD + + + +
- * _INSERT_BEFORE - + - +
- * _INSERT_AFTER + + + +
- * _INSERT_TAIL - - + +
- * _CONCAT - - + +
- * _REMOVE_HEAD + - + -
- * _REMOVE + + + +
- *
- */
-#define QUEUE_MACRO_DEBUG 0
-#if QUEUE_MACRO_DEBUG
-/* Store the last 2 places the queue element or head was altered */
-struct qm_trace {
- char * lastfile;
- int lastline;
- char * prevfile;
- int prevline;
-};
-
-#define TRACEBUF struct qm_trace trace;
-#define TRASHIT(x) do {(x) = (void *)-1;} while (0)
-
-#define QMD_TRACE_HEAD(head) do { \
- (head)->trace.prevline = (head)->trace.lastline; \
- (head)->trace.prevfile = (head)->trace.lastfile; \
- (head)->trace.lastline = __LINE__; \
- (head)->trace.lastfile = __FILE__; \
-} while (0)
-
-#define QMD_TRACE_ELEM(elem) do { \
- (elem)->trace.prevline = (elem)->trace.lastline; \
- (elem)->trace.prevfile = (elem)->trace.lastfile; \
- (elem)->trace.lastline = __LINE__; \
- (elem)->trace.lastfile = __FILE__; \
-} while (0)
-
-#else
-#define QMD_TRACE_ELEM(elem)
-#define QMD_TRACE_HEAD(head)
-#define TRACEBUF
-#define TRASHIT(x)
-#endif /* QUEUE_MACRO_DEBUG */
-
-/*
- * Singly-linked List declarations.
- */
-#define SLIST_HEAD(name, type) \
-struct name { \
- struct type *slh_first; /* first element */ \
-}
-
-#define SLIST_HEAD_INITIALIZER(head) \
- { NULL }
-
-#define SLIST_ENTRY(type) \
-struct { \
- struct type *sle_next; /* next element */ \
-}
-
-/*
- * Singly-linked List functions.
- */
-#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
-
-#define SLIST_FIRST(head) ((head)->slh_first)
-
-#define SLIST_FOREACH(var, head, field) \
- for ((var) = SLIST_FIRST((head)); \
- (var); \
- (var) = SLIST_NEXT((var), field))
-
-#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \
- for ((varp) = &SLIST_FIRST((head)); \
- ((var) = *(varp)) != NULL; \
- (varp) = &SLIST_NEXT((var), field))
-
-#define SLIST_INIT(head) do { \
- SLIST_FIRST((head)) = NULL; \
-} while (0)
-
-#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
- SLIST_NEXT((elm), field) = SLIST_NEXT((slistelm), field); \
- SLIST_NEXT((slistelm), field) = (elm); \
-} while (0)
-
-#define SLIST_INSERT_HEAD(head, elm, field) do { \
- SLIST_NEXT((elm), field) = SLIST_FIRST((head)); \
- SLIST_FIRST((head)) = (elm); \
-} while (0)
-
-#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
-
-#define SLIST_REMOVE(head, elm, type, field) do { \
- if (SLIST_FIRST((head)) == (elm)) { \
- SLIST_REMOVE_HEAD((head), field); \
- } \
- else { \
- struct type *curelm = SLIST_FIRST((head)); \
- while (SLIST_NEXT(curelm, field) != (elm)) \
- curelm = SLIST_NEXT(curelm, field); \
- SLIST_NEXT(curelm, field) = \
- SLIST_NEXT(SLIST_NEXT(curelm, field), field); \
- } \
-} while (0)
-
-#define SLIST_REMOVE_HEAD(head, field) do { \
- SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \
-} while (0)
-
-/*
- * Singly-linked Tail queue declarations.
- */
-#define STAILQ_HEAD(name, type) \
-struct name { \
- struct type *stqh_first;/* first element */ \
- struct type **stqh_last;/* addr of last next element */ \
-}
-
-#define STAILQ_HEAD_INITIALIZER(head) \
- { NULL, &(head).stqh_first }
-
-#define STAILQ_ENTRY(type) \
-struct { \
- struct type *stqe_next; /* next element */ \
-}
-
-/*
- * Singly-linked Tail queue functions.
- */
-#define STAILQ_CONCAT(head1, head2) do { \
- if (!STAILQ_EMPTY((head2))) { \
- *(head1)->stqh_last = (head2)->stqh_first; \
- (head1)->stqh_last = (head2)->stqh_last; \
- STAILQ_INIT((head2)); \
- } \
-} while (0)
-
-#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL)
-
-#define STAILQ_FIRST(head) ((head)->stqh_first)
-
-#define STAILQ_FOREACH(var, head, field) \
- for((var) = STAILQ_FIRST((head)); \
- (var); \
- (var) = STAILQ_NEXT((var), field))
-
-#define STAILQ_INIT(head) do { \
- STAILQ_FIRST((head)) = NULL; \
- (head)->stqh_last = &STAILQ_FIRST((head)); \
-} while (0)
-
-#define STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \
- if ((STAILQ_NEXT((elm), field) = STAILQ_NEXT((tqelm), field)) == NULL)\
- (head)->stqh_last = &STAILQ_NEXT((elm), field); \
- STAILQ_NEXT((tqelm), field) = (elm); \
-} while (0)
-
-#define STAILQ_INSERT_HEAD(head, elm, field) do { \
- if ((STAILQ_NEXT((elm), field) = STAILQ_FIRST((head))) == NULL) \
- (head)->stqh_last = &STAILQ_NEXT((elm), field); \
- STAILQ_FIRST((head)) = (elm); \
-} while (0)
-
-#define STAILQ_INSERT_TAIL(head, elm, field) do { \
- STAILQ_NEXT((elm), field) = NULL; \
- *(head)->stqh_last = (elm); \
- (head)->stqh_last = &STAILQ_NEXT((elm), field); \
-} while (0)
-
-#define STAILQ_LAST(head, type, field) \
- (STAILQ_EMPTY((head)) ? \
- NULL : \
- ((struct type *) \
- ((char *)((head)->stqh_last) - __offsetof(struct type, field))))
-
-#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
-
-#define STAILQ_REMOVE(head, elm, type, field) do { \
- if (STAILQ_FIRST((head)) == (elm)) { \
- STAILQ_REMOVE_HEAD((head), field); \
- } \
- else { \
- struct type *curelm = STAILQ_FIRST((head)); \
- while (STAILQ_NEXT(curelm, field) != (elm)) \
- curelm = STAILQ_NEXT(curelm, field); \
- if ((STAILQ_NEXT(curelm, field) = \
- STAILQ_NEXT(STAILQ_NEXT(curelm, field), field)) == NULL)\
- (head)->stqh_last = &STAILQ_NEXT((curelm), field);\
- } \
-} while (0)
-
-#define STAILQ_REMOVE_HEAD(head, field) do { \
- if ((STAILQ_FIRST((head)) = \
- STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL) \
- (head)->stqh_last = &STAILQ_FIRST((head)); \
-} while (0)
-
-#define STAILQ_REMOVE_HEAD_UNTIL(head, elm, field) do { \
- if ((STAILQ_FIRST((head)) = STAILQ_NEXT((elm), field)) == NULL) \
- (head)->stqh_last = &STAILQ_FIRST((head)); \
-} while (0)
-
-/*
- * List declarations.
- */
-#define LIST_HEAD(name, type) \
-struct name { \
- struct type *lh_first; /* first element */ \
-}
-
-#define LIST_HEAD_INITIALIZER(head) \
- { NULL }
-
-#define LIST_ENTRY(type) \
-struct { \
- struct type *le_next; /* next element */ \
- struct type **le_prev; /* address of previous next element */ \
-}
-
-/*
- * List functions.
- */
-
-#define LIST_EMPTY(head) ((head)->lh_first == NULL)
-
-#define LIST_FIRST(head) ((head)->lh_first)
-
-#define LIST_FOREACH(var, head, field) \
- for ((var) = LIST_FIRST((head)); \
- (var); \
- (var) = LIST_NEXT((var), field))
-
-#define LIST_INIT(head) do { \
- LIST_FIRST((head)) = NULL; \
-} while (0)
-
-#define LIST_INSERT_AFTER(listelm, elm, field) do { \
- if ((LIST_NEXT((elm), field) = LIST_NEXT((listelm), field)) != NULL)\
- LIST_NEXT((listelm), field)->field.le_prev = \
- &LIST_NEXT((elm), field); \
- LIST_NEXT((listelm), field) = (elm); \
- (elm)->field.le_prev = &LIST_NEXT((listelm), field); \
-} while (0)
-
-#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
- (elm)->field.le_prev = (listelm)->field.le_prev; \
- LIST_NEXT((elm), field) = (listelm); \
- *(listelm)->field.le_prev = (elm); \
- (listelm)->field.le_prev = &LIST_NEXT((elm), field); \
-} while (0)
-
-#define LIST_INSERT_HEAD(head, elm, field) do { \
- if ((LIST_NEXT((elm), field) = LIST_FIRST((head))) != NULL) \
- LIST_FIRST((head))->field.le_prev = &LIST_NEXT((elm), field);\
- LIST_FIRST((head)) = (elm); \
- (elm)->field.le_prev = &LIST_FIRST((head)); \
-} while (0)
-
-#define LIST_NEXT(elm, field) ((elm)->field.le_next)
-
-#define LIST_REMOVE(elm, field) do { \
- if (LIST_NEXT((elm), field) != NULL) \
- LIST_NEXT((elm), field)->field.le_prev = \
- (elm)->field.le_prev; \
- *(elm)->field.le_prev = LIST_NEXT((elm), field); \
-} while (0)
-
-/*
- * Tail queue declarations.
- */
-#define TAILQ_HEAD(name, type) \
-struct name { \
- struct type *tqh_first; /* first element */ \
- struct type **tqh_last; /* addr of last next element */ \
- TRACEBUF \
-}
-
-#define TAILQ_HEAD_INITIALIZER(head) \
- { NULL, &(head).tqh_first }
-
-#define TAILQ_ENTRY(type) \
-struct { \
- struct type *tqe_next; /* next element */ \
- struct type **tqe_prev; /* address of previous next element */ \
- TRACEBUF \
-}
-
-/*
- * Tail queue functions.
- */
-#define TAILQ_CONCAT(head1, head2, field) do { \
- if (!TAILQ_EMPTY(head2)) { \
- *(head1)->tqh_last = (head2)->tqh_first; \
- (head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
- (head1)->tqh_last = (head2)->tqh_last; \
- TAILQ_INIT((head2)); \
- QMD_TRACE_HEAD(head); \
- QMD_TRACE_HEAD(head2); \
- } \
-} while (0)
-
-#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
-
-#define TAILQ_FIRST(head) ((head)->tqh_first)
-
-#define TAILQ_FOREACH(var, head, field) \
- for ((var) = TAILQ_FIRST((head)); \
- (var); \
- (var) = TAILQ_NEXT((var), field))
-
-#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
- for ((var) = TAILQ_LAST((head), headname); \
- (var); \
- (var) = TAILQ_PREV((var), headname, field))
-
-#define TAILQ_INIT(head) do { \
- TAILQ_FIRST((head)) = NULL; \
- (head)->tqh_last = &TAILQ_FIRST((head)); \
- QMD_TRACE_HEAD(head); \
-} while (0)
-
-#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
- if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\
- TAILQ_NEXT((elm), field)->field.tqe_prev = \
- &TAILQ_NEXT((elm), field); \
- else { \
- (head)->tqh_last = &TAILQ_NEXT((elm), field); \
- QMD_TRACE_HEAD(head); \
- } \
- TAILQ_NEXT((listelm), field) = (elm); \
- (elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \
- QMD_TRACE_ELEM(&(elm)->field); \
- QMD_TRACE_ELEM(&listelm->field); \
-} while (0)
-
-#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
- (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
- TAILQ_NEXT((elm), field) = (listelm); \
- *(listelm)->field.tqe_prev = (elm); \
- (listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \
- QMD_TRACE_ELEM(&(elm)->field); \
- QMD_TRACE_ELEM(&listelm->field); \
-} while (0)
-
-#define TAILQ_INSERT_HEAD(head, elm, field) do { \
- if ((TAILQ_NEXT((elm), field) = TAILQ_FIRST((head))) != NULL) \
- TAILQ_FIRST((head))->field.tqe_prev = \
- &TAILQ_NEXT((elm), field); \
- else \
- (head)->tqh_last = &TAILQ_NEXT((elm), field); \
- TAILQ_FIRST((head)) = (elm); \
- (elm)->field.tqe_prev = &TAILQ_FIRST((head)); \
- QMD_TRACE_HEAD(head); \
- QMD_TRACE_ELEM(&(elm)->field); \
-} while (0)
-
-#define TAILQ_INSERT_TAIL(head, elm, field) do { \
- TAILQ_NEXT((elm), field) = NULL; \
- (elm)->field.tqe_prev = (head)->tqh_last; \
- *(head)->tqh_last = (elm); \
- (head)->tqh_last = &TAILQ_NEXT((elm), field); \
- QMD_TRACE_HEAD(head); \
- QMD_TRACE_ELEM(&(elm)->field); \
-} while (0)
-
-#define TAILQ_LAST(head, headname) \
- (*(((struct headname *)((head)->tqh_last))->tqh_last))
-
-#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
-
-#define TAILQ_PREV(elm, headname, field) \
- (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
-
-#define TAILQ_REMOVE(head, elm, field) do { \
- if ((TAILQ_NEXT((elm), field)) != NULL) \
- TAILQ_NEXT((elm), field)->field.tqe_prev = \
- (elm)->field.tqe_prev; \
- else { \
- (head)->tqh_last = (elm)->field.tqe_prev; \
- QMD_TRACE_HEAD(head); \
- } \
- *(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \
- TRASHIT((elm)->field.tqe_next); \
- TRASHIT((elm)->field.tqe_prev); \
- QMD_TRACE_ELEM(&(elm)->field); \
-} while (0)
-
-
-/*
- * Circular queue definitions.
- */
-#define CIRCLEQ_HEAD(name, type) \
-struct name { \
- struct type *cqh_first; /* first element */ \
- struct type *cqh_last; /* last element */ \
-}
-
-#define CIRCLEQ_ENTRY(type) \
-struct { \
- struct type *cqe_next; /* next element */ \
- struct type *cqe_prev; /* previous element */ \
-}
-
-/*
- * Circular queue functions.
- */
-#define CIRCLEQ_INIT(head) { \
- (head)->cqh_first = (void *)(head); \
- (head)->cqh_last = (void *)(head); \
-}
-
-#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) { \
- (elm)->field.cqe_next = (listelm)->field.cqe_next; \
- (elm)->field.cqe_prev = (listelm); \
- if ((listelm)->field.cqe_next == (void *)(head)) \
- (head)->cqh_last = (elm); \
- else \
- (listelm)->field.cqe_next->field.cqe_prev = (elm); \
- (listelm)->field.cqe_next = (elm); \
-}
-
-#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) { \
- (elm)->field.cqe_next = (listelm); \
- (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
- if ((listelm)->field.cqe_prev == (void *)(head)) \
- (head)->cqh_first = (elm); \
- else \
- (listelm)->field.cqe_prev->field.cqe_next = (elm); \
- (listelm)->field.cqe_prev = (elm); \
-}
-
-#define CIRCLEQ_INSERT_HEAD(head, elm, field) { \
- (elm)->field.cqe_next = (head)->cqh_first; \
- (elm)->field.cqe_prev = (void *)(head); \
- if ((head)->cqh_last == (void *)(head)) \
- (head)->cqh_last = (elm); \
- else \
- (head)->cqh_first->field.cqe_prev = (elm); \
- (head)->cqh_first = (elm); \
-}
-
-#define CIRCLEQ_INSERT_TAIL(head, elm, field) { \
- (elm)->field.cqe_next = (void *)(head); \
- (elm)->field.cqe_prev = (head)->cqh_last; \
- if ((head)->cqh_first == (void *)(head)) \
- (head)->cqh_first = (elm); \
- else \
- (head)->cqh_last->field.cqe_next = (elm); \
- (head)->cqh_last = (elm); \
-}
-
-#define CIRCLEQ_REMOVE(head, elm, field) { \
- if ((elm)->field.cqe_next == (void *)(head)) \
- (head)->cqh_last = (elm)->field.cqe_prev; \
- else \
- (elm)->field.cqe_next->field.cqe_prev = \
- (elm)->field.cqe_prev; \
- if ((elm)->field.cqe_prev == (void *)(head)) \
- (head)->cqh_first = (elm)->field.cqe_next; \
- else \
- (elm)->field.cqe_prev->field.cqe_next = \
- (elm)->field.cqe_next; \
-}
-
-#ifdef KERNEL
-
-/*
- * XXX insque() and remque() are an old way of handling certain queues.
- * They bogusly assumes that all queue heads look alike.
- */
-
-
-#ifdef __GNUC__
-
-struct quehead {
-#if defined(__arm__)
- struct quehead *qh_link __attribute__((packed));
- struct quehead *qh_rlink __attribute__((packed));
-#else /* !defined(__arm__)) */
- struct quehead *qh_link;
- struct quehead *qh_rlink;
-#endif
-};
-
-static __inline void
-insque(void *a, void *b)
-{
- struct quehead *element = (struct quehead *)a,
- *head = (struct quehead *)b;
-
- element->qh_link = head->qh_link;
- element->qh_rlink = head;
- head->qh_link = element;
- element->qh_link->qh_rlink = element;
-}
-
-static __inline void
-remque(void *a)
-{
- struct quehead *element = (struct quehead *)a;
-
- element->qh_link->qh_rlink = element->qh_rlink;
- element->qh_rlink->qh_link = element->qh_link;
- element->qh_rlink = 0;
-}
-
-#else /* !__GNUC__ */
-
-void insque(void *a, void *b);
-void remque(void *a);
-
-#endif /* __GNUC__ */
-
-#endif /* _KERNEL */
-
-#endif /* !_SYS_QUEUE_H_ */ \ No newline at end of file
diff --git a/newlib/libc/sys/rtems/sys/syslimits.h b/newlib/libc/sys/rtems/sys/syslimits.h
deleted file mode 100644
index 74c4dd273..000000000
--- a/newlib/libc/sys/rtems/sys/syslimits.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)syslimits.h 8.1 (Berkeley) 6/2/93
- * $Id$
- */
-
-#ifndef _SYS_SYSLIMITS_H_
-#define _SYS_SYSLIMITS_H_
-
-#define ARG_MAX 4096 /* max bytes for an exec function */
-#ifndef CHILD_MAX
-#define CHILD_MAX 6 /* max simultaneous processes */
-#endif
-#define LINK_MAX 8 /* max file link count */
-#define MAX_CANON 255 /* max bytes in term canon input line */
-#define MAX_INPUT 255 /* max bytes in terminal input */
-#define NAME_MAX 255 /* max bytes in a file name */
-#define NGROUPS_MAX 16 /* max supplemental group id's */
-#ifndef OPEN_MAX
-#define OPEN_MAX 64 /* max open files per process */
-#endif
-#define PATH_MAX 255 /* max bytes in pathname */
-#define PIPE_BUF 512 /* max bytes for atomic pipe writes */
-#define IOV_MAX 1024 /* max elements in i/o vector */
-#define BC_BASE_MAX 99 /* max ibase/obase values in bc(1) */
-#define BC_DIM_MAX 2048 /* max array elements in bc(1) */
-#define BC_SCALE_MAX 99 /* max scale value in bc(1) */
-#define BC_STRING_MAX 1000 /* max const string length in bc(1) */
-#define COLL_WEIGHTS_MAX 0 /* max weights for order keyword */
-#define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */
-#define LINE_MAX 2048 /* max bytes in an input line */
-#define RE_DUP_MAX 255 /* max RE's in interval notation */
-
-#endif
diff --git a/newlib/libc/sys/rtems/sys/utime.h b/newlib/libc/sys/rtems/sys/utime.h
deleted file mode 100644
index 31d1c472d..000000000
--- a/newlib/libc/sys/rtems/sys/utime.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef __UTIME_h__
-#define __UTIME_h__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * POSIX 1003.1b 5.6.6 Set File Access and Modification Times
- */
-
-struct utimbuf {
- time_t actime; /* Access time */
- time_t modtime; /* Modification time */
-};
-
-/* Functions */
-
-int utime(
- const char *path,
- const struct utimbuf *times
-);
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _SYS_UTIME_H */
diff --git a/newlib/libc/sys/sh/Makefile.am b/newlib/libc/sys/sh/Makefile.am
deleted file mode 100644
index 1fddc4cd2..000000000
--- a/newlib/libc/sys/sh/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = syscalls.c trap.S creat.c ftruncate.c truncate.c
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/sh/Makefile.in b/newlib/libc/sys/sh/Makefile.in
deleted file mode 100644
index 423a3addd..000000000
--- a/newlib/libc/sys/sh/Makefile.in
+++ /dev/null
@@ -1,329 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = syscalls.c trap.S creat.c ftruncate.c truncate.c
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = syscalls.o trap.o creat.o ftruncate.o truncate.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/sh/aclocal.m4 b/newlib/libc/sys/sh/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/sh/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/sh/configure b/newlib/libc/sys/sh/configure
deleted file mode 100755
index cf9254bff..000000000
--- a/newlib/libc/sys/sh/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=creat.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/sh/configure.in b/newlib/libc/sys/sh/configure.in
deleted file mode 100644
index 84e836394..000000000
--- a/newlib/libc/sys/sh/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/sh configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(creat.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/sh/creat.c b/newlib/libc/sys/sh/creat.c
deleted file mode 100644
index 62ec5ead8..000000000
--- a/newlib/libc/sys/sh/creat.c
+++ /dev/null
@@ -1,7 +0,0 @@
-int
-creat(path, mode)
- const char *path;
- int mode;
-{
- return _creat (path, mode);
-}
diff --git a/newlib/libc/sys/sh/crt0.S b/newlib/libc/sys/sh/crt0.S
deleted file mode 100644
index f9473ae44..000000000
--- a/newlib/libc/sys/sh/crt0.S
+++ /dev/null
@@ -1,119 +0,0 @@
-
-#ifdef __SH5__
- .section .data,"aw"
- .global ___data
-___data:
-
- .section .rodata,"a"
- .global ___rodata
-___rodata:
-
-#if __SH5__ == 64
- .section .text,"ax"
-#define LOAD_ADDR(sym, reg) \
- movi (sym >> 48) & 65535, reg; \
- shori (sym >> 32) & 65535, reg; \
- shori (sym >> 16) & 65535, reg; \
- shori sym & 65535, reg
-#else
- .mode SHmedia
- .section .text..SHmedia32,"ax"
-#define LOAD_ADDR(sym, reg) \
- movi (sym >> 16) & 65535, reg; \
- shori sym & 65535, reg
-#endif
- .global start
-start:
- LOAD_ADDR (_stack, r15)
-
- pt/l zero_bss_loop, tr0
- pt/l _atexit, tr1
- pt/l _init, tr5
- pt/l _main, tr6
- pt/l _exit, tr7
-
- ! zero out bss
- LOAD_ADDR (_edata, r0)
- LOAD_ADDR (_end, r1)
-zero_bss_loop:
- stx.q r0, r63, r63
- addi r0, 8, r0
- bgt/l r1, r0, tr0
-
- LOAD_ADDR (___data, r26)
- LOAD_ADDR (___rodata, r27)
-
-#if ! __SH4_NOFPU__
- getcon cr0, r0
- movi 1, r1
- shlli r1, 15, r1
- or r1, r0, r0
- putcon r0, cr0
-#endif
-
- ! arrange for exit to call fini
- LOAD_ADDR (_fini, r2)
- blink tr1, r18
-
- ! call init
- blink tr5, r18
-
- ! call the mainline
- blink tr6, r18
-
- ! call exit
- blink tr7, r18
-#else
- .section .text
- .global start
-start:
- mov.l stack_k,r15
-
- ! zero out bss
- mov.l edata_k,r0
- mov.l end_k,r1
- mov #0,r2
-start_l:
- mov.l r2,@r0
- add #4,r0
- cmp/ge r0,r1
- bt start_l
-
-#ifndef __SH2A_NOFPU__
-#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY) || defined(__SH2A__)
- mov.l set_fpscr_k, r1
- jsr @r1
- mov #0,r4
- lds r3,fpscr
-#endif /* defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) || defined(__SH2A__) */
-#endif /* !__SH2A_NOFPU__ */
-
- ! call the mainline
- mov.l main_k,r0
- jsr @r0
- or r0,r0
-
- ! call exit
- mov r0,r4
- mov.l exit_k,r0
- jsr @r0
- or r0,r0
-
- .align 2
-#ifndef __SH2A_NOFPU__
-#if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) || defined(__SH2A__)
-set_fpscr_k:
- .long ___set_fpscr
-#endif /* defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(SH4_SINGLE_ONLY) || defined(__SH2A__) */
-#endif /* !__SH2A_NOFPU__ */
-stack_k:
- .long _stack
-edata_k:
- .long _edata
-end_k:
- .long _end
-main_k:
- .long _main
-exit_k:
- .long _exit
-#endif
diff --git a/newlib/libc/sys/sh/ftruncate.c b/newlib/libc/sys/sh/ftruncate.c
deleted file mode 100644
index 660377bf3..000000000
--- a/newlib/libc/sys/sh/ftruncate.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include "sys/syscall.h"
-
-int
-ftruncate (int file, off_t length)
-{
- return __trap34 (SYS_ftruncate, file, length, 0);
-}
diff --git a/newlib/libc/sys/sh/sys/syscall.h b/newlib/libc/sys/sh/sys/syscall.h
deleted file mode 100644
index 9ab32e7b7..000000000
--- a/newlib/libc/sys/sh/sys/syscall.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#define SYS_exit 1
-#define SYS_fork 2
-
-#define SYS_read 3
-#define SYS_write 4
-#define SYS_open 5
-#define SYS_close 6
-#define SYS_wait4 7
-#define SYS_creat 8
-#define SYS_link 9
-#define SYS_unlink 10
-#define SYS_execv 11
-#define SYS_chdir 12
-#define SYS_mknod 14
-#define SYS_chmod 15
-#define SYS_chown 16
-#define SYS_lseek 19
-#define SYS_getpid 20
-#define SYS_isatty 21
-#define SYS_fstat 22
-#define SYS_time 23
-
-
-#define SYS_ARG 24
-#define SYS_stat 38
-
-#define SYS_pipe 42
-#define SYS_execve 59
-
-#define SYS_truncate 129
-#define SYS_ftruncate 130
-
-#define SYS_argc 172 /* == 0xAC, for Argument Count :-) */
-#define SYS_argnlen 173
-#define SYS_argn 174
-
-#define SYS_utime 201 /* not really a system call */
-#define SYS_wait 202 /* nor is this */
diff --git a/newlib/libc/sys/sh/syscalls.c b/newlib/libc/sys/sh/syscalls.c
deleted file mode 100644
index f0e924297..000000000
--- a/newlib/libc/sys/sh/syscalls.c
+++ /dev/null
@@ -1,221 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include "sys/syscall.h"
-int errno;
-
-/* This is used by _sbrk. */
-register char *stack_ptr asm ("r15");
-
-int
-_read (int file,
- char *ptr,
- int len)
-{
- return __trap34 (SYS_read, file, ptr, len);
-}
-
-int
-_lseek (int file,
- int ptr,
- int dir)
-{
- return __trap34 (SYS_lseek, file, ptr, dir);
-}
-
-int
-_write ( int file,
- char *ptr,
- int len)
-{
- return __trap34 (SYS_write, file, ptr, len);
-}
-
-int
-_close (int file)
-{
- return __trap34 (SYS_close, file, 0, 0);
-}
-
-int
-_link (char *old, char *new)
-{
- return -1;
-}
-
-caddr_t
-_sbrk (int incr)
-{
- extern char end; /* Defined by the linker */
- static char *heap_end;
- char *prev_heap_end;
-
- if (heap_end == 0)
- {
- heap_end = &end;
- }
- prev_heap_end = heap_end;
- if (heap_end + incr > stack_ptr)
- {
- _write (1, "Heap and stack collision\n", 25);
- abort ();
- }
- heap_end += incr;
- return (caddr_t) prev_heap_end;
-}
-
-int
-_fstat (int file,
- struct stat *st)
-{
- st->st_mode = S_IFCHR;
- return 0;
-}
-
-int
-_open (const char *path,
- int flags)
-{
- return __trap34 (SYS_open, path, flags, 0);
-}
-
-int
-_creat (const char *path,
- int mode)
-{
- return __trap34 (SYS_creat, path, mode, 0);
-}
-
-int
-_unlink ()
-{
- return -1;
-}
-
-isatty (fd)
- int fd;
-{
- return 1;
-}
-
-_exit (n)
-{
- return __trap34 (SYS_exit, n, 0, 0);
-}
-
-_kill (n, m)
-{
- return __trap34 (SYS_exit, 0xdead, 0, 0);
-}
-
-_getpid (n)
-{
- return 1;
-}
-
-_raise ()
-{
-}
-
-int
-_stat (const char *path, struct stat *st)
-
-{
- return __trap34 (SYS_stat, path, st, 0);
-}
-
-int
-_chmod (const char *path, short mode)
-{
- return __trap34 (SYS_chmod, path, mode);
-}
-
-int
-_chown (const char *path, short owner, short group)
-{
- return __trap34 (SYS_chown, path, owner, group);
-}
-
-int
-_utime (path, times)
- const char *path;
- char *times;
-{
- return __trap34 (SYS_utime, path, times);
-}
-
-int
-_fork ()
-{
- return __trap34 (SYS_fork);
-}
-
-int
-_wait (statusp)
- int *statusp;
-{
- return __trap34 (SYS_wait);
-}
-
-int
-_execve (const char *path, char *const argv[], char *const envp[])
-{
- return __trap34 (SYS_execve, path, argv, envp);
-}
-
-int
-_execv (const char *path, char *const argv[])
-{
- return __trap34 (SYS_execv, path, argv);
-}
-
-int
-_pipe (int *fd)
-{
- return __trap34 (SYS_pipe, fd);
-}
-
-/* This is only provided because _gettimeofday_r and _times_r are
- defined in the same module, so we avoid a link error. */
-clock_t
-_times (struct tms *tp)
-{
- return -1;
-}
-
-int
-_gettimeofday (struct timeval *tv, struct timezone *tz)
-{
- tv->tv_usec = 0;
- tv->tv_sec = __trap34 (SYS_time);
- return 0;
-}
-
-static inline int
-__setup_argv_for_main (int argc)
-{
- char **argv;
- int i = argc;
-
- argv = __builtin_alloca ((1 + argc) * sizeof (*argv));
-
- argv[i] = NULL;
- while (i--) {
- argv[i] = __builtin_alloca (1 + __trap34 (SYS_argnlen, i));
- __trap34 (SYS_argn, i, argv[i]);
- }
-
- return main (argc, argv);
-}
-
-int
-__setup_argv_and_call_main ()
-{
- int argc = __trap34 (SYS_argc);
-
- if (argc <= 0)
- return main (argc, NULL);
- else
- return __setup_argv_for_main (argc);
-}
diff --git a/newlib/libc/sys/sh/trap.S b/newlib/libc/sys/sh/trap.S
deleted file mode 100644
index 0eb6e5dfe..000000000
--- a/newlib/libc/sys/sh/trap.S
+++ /dev/null
@@ -1,43 +0,0 @@
-#if __SH5__
- .mode SHmedia
-#if __SH5__ == 32 && __SHMEDIA__
- .section .text..SHmedia32, "ax"
-#else
- .text
-#endif
- .global ___trap34
-___trap34:
- movi 34, r0
- trapa r0
- pt/l ret, tr1
- ptabs/l r18, tr0
- beqi r1, 0, tr1
-#if __SH5__ == 64
- movi ((_errno >> 48) & 65535), r0
- shori ((_errno >> 32) & 65535), r0
- shori ((_errno >> 16) & 65535), r0
-#else
- movi ((_errno >> 16) & 65535), r0
-#endif
- shori (_errno & 65535), r0
- stx.l r0, r63, r1
-ret:
- blink tr0, r63
-
-#else
- .text
- .global ___trap34
-___trap34:
- trapa #34
- tst r1,r1 ! r1 is errno
- bt ret
- mov.l perrno,r2
- mov.l r1,@r2
-ret:
- rts
- nop
-
- .align 2
-perrno:
- .long _errno
-#endif /* ! __SH5__ */
diff --git a/newlib/libc/sys/sh/truncate.c b/newlib/libc/sys/sh/truncate.c
deleted file mode 100644
index 5ca48d3c6..000000000
--- a/newlib/libc/sys/sh/truncate.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include "sys/syscall.h"
-
-int
-truncate (const char *path, off_t length)
-{
- return __trap34 (SYS_truncate, path, length, 0);
-}
diff --git a/newlib/libc/sys/sparc64/Makefile.am b/newlib/libc/sys/sparc64/Makefile.am
deleted file mode 100644
index 83f0d31b3..000000000
--- a/newlib/libc/sys/sparc64/Makefile.am
+++ /dev/null
@@ -1,119 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-# _r.o is for the reentrant syscall stubs.
-
-SUFFIXES = _r.o
-
-.S_r.o:
- $(COMPILE) -DREENT -c $< -o $@
-
-.c_r.o:
- $(COMPILE) -DREENT -c $< -o $@
-
-# We no longer copy files out of /lib/libc.a. This is kept around until
-# most of them have replacements.
-#
-#COPYOFILES = \
-# Ovfork.o _sigvec.o abort.o access.o chown.o creat.o \
-# errlst.o getdents.o getdtablesize.o getpid.o \
-# getrusage.o gettimeofday.o ieee_globals.o ioctl.o isatty.o \
-# kill.o popen.o sbrk.o sigblock.o sigpause.o sigsetmask.o \
-# sigtramp.o sigvec.o sleep.o setitimer.o start_float.o \
-# time.o times.o utime.o utimes.o wait3.o
-COPYOFILES =
-
-# These files are from Sun's libc.a but must be renamed because they
-# conflict with other library .o's. They are renamed to xxxS.o.
-# div.o is used by times.o. errno.o conflicts with libc/errno/errno.o.
-#COPYRENAMEOFILES = divS.o errnoS.o
-COPYRENAMEOFILES =
-
-#COPYOMFILES = ieee_flags.o
-COPYOMFILES =
-
-# CFILES_R, SFILES_R, and TEMPLATE_SFILES_R define those system calls that are
-# needed by the ANSI C part of newlib (and thus we must provide namespace
-# clean versions of them because we define REENTRANT_SYSCALLS_PROVIDED).
-
-CFILES = _main.c ieee.c \
- closedir.c opendir.c readdir.c rewinddir.c scandir.c seekdir.c \
- telldir.c \
- creat.c isatty.c utime2.c
-
-CFILES_R =
-
-SFILES = cerror.S crt0.S dup2.S execve.S _exit.S sigsetjmp.S utime.S
-
-SFILES_R = sbrk.S wait.S
-
-# List of files built from template.S (with an '_' suffix).
-
-TEMPLATE_SFILES = access_ chdir_ chmod_ chown_ dup_ fcntl_ \
- lstat_ mkdir_ pipe_ rmdir_ times_ umask_ utimes_
-
-TEMPLATE_SFILES_R = close_ fork_ fstat_ getpid_ gettimeofday_ kill_ \
- link_ lseek_ open_ read_ stat_ times_ unlink_ wait4_ write_
-
-OFILES = $(COPYOFILES) $(COPYRENAMEOFILES) $(COPYOMFILES) \
- $(SFILES:.S=.o) $(SFILES_R:.S=.o) $(SFILES_R:.S=_r.o) \
- $(TEMPLATE_SFILES:_=.o) $(TEMPLATE_SFILES_R:_=.o) $(TEMPLATE_SFILES_R:_=_r.o) \
- $(CFILES:.c=.o) $(CFILES_R:.c=.o) $(CFILES_R:.c=_r.o)
-
-lib_a_SOURCES = $(SFILES) $(SFILES_R) $(CFILES) $(CFILES_R)
-lib_a_LIBADD = $(COPYOFILES) $(COPYRENAMEOFILES) $(COPYOMFILES) \
- $(SFILES_R:.S=_r.o) \
- $(TEMPLATE_SFILES:_=.o) $(TEMPLATE_SFILES_R:_=.o) \
- $(TEMPLATE_SFILES_R:_=_r.o) \
- $(CFILES_R:.c=_r.o)
-
-$(COPYOFILES):
- $(AR) x /lib/libc.a $(COPYOFILES)
-
-$(COPYRENAMEOFILES):
- $(AR) x /lib/libc.a $(COPYRENAMEOFILES:S.o=.o)
- for f in $(COPYRENAMEOFILES); do mv `basename $$f S.o`.o $$f; done
-
-$(COPYOMFILES):
- $(AR) x /lib/libm.a $(COPYOMFILES)
-
-stamp-srcs: Makefile template.S template_r.S
- for f in $(TEMPLATE_SFILES:_=); do \
- $(COMPILE) -E -Dfunc=$$f $(srcdir)/template.S >$$f.S; \
- done
- for f in $(TEMPLATE_SFILES_R:_=); do \
- $(COMPILE) -E -Dfunc=$$f $(srcdir)/template_r.S | sed -e 's/^_/#/' >$$f.S; \
- done
- touch stamp-srcs
-
-# Make a dependency for each file built from a template.
-
-$(TEMPLATE_SFILES:_=.S) $(TEMPLATE_SFILES_R:_=.S): stamp-srcs
-
-all: crt0.o
-
-close_r.o: close.S
-fork_r.o: fork.S
-fstat_r.o: fstat.S
-getpid_r.o: getpid.S
-gettimeofday_r.o: gettimeofday.S
-kill_r.o: kill.S
-link_r.o: link.S
-lseek_r.o: lseek.S
-open_r.o: open.S
-read_r.o: read.S
-sbrk_r.o: sbrk.S
-stat_r.o: stat.S
-times_r.o: times.S
-unlink_r.o: unlink.S
-wait_r.o: wait.S
-wait4_r.o: wait4.S
-write_r.o: write.S
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/sparc64/Makefile.in b/newlib/libc/sys/sparc64/Makefile.in
deleted file mode 100644
index 21186622d..000000000
--- a/newlib/libc/sys/sparc64/Makefile.in
+++ /dev/null
@@ -1,435 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-# _r.o is for the reentrant syscall stubs.
-
-SUFFIXES = _r.o
-
-# We no longer copy files out of /lib/libc.a. This is kept around until
-# most of them have replacements.
-#
-#COPYOFILES = \
-# Ovfork.o _sigvec.o abort.o access.o chown.o creat.o \
-# errlst.o getdents.o getdtablesize.o getpid.o \
-# getrusage.o gettimeofday.o ieee_globals.o ioctl.o isatty.o \
-# kill.o popen.o sbrk.o sigblock.o sigpause.o sigsetmask.o \
-# sigtramp.o sigvec.o sleep.o setitimer.o start_float.o \
-# time.o times.o utime.o utimes.o wait3.o
-COPYOFILES =
-
-# These files are from Sun's libc.a but must be renamed because they
-# conflict with other library .o's. They are renamed to xxxS.o.
-# div.o is used by times.o. errno.o conflicts with libc/errno/errno.o.
-#COPYRENAMEOFILES = divS.o errnoS.o
-COPYRENAMEOFILES =
-
-#COPYOMFILES = ieee_flags.o
-COPYOMFILES =
-
-# CFILES_R, SFILES_R, and TEMPLATE_SFILES_R define those system calls that are
-# needed by the ANSI C part of newlib (and thus we must provide namespace
-# clean versions of them because we define REENTRANT_SYSCALLS_PROVIDED).
-
-CFILES = _main.c ieee.c closedir.c opendir.c readdir.c rewinddir.c scandir.c seekdir.c telldir.c creat.c isatty.c utime2.c
-
-
-CFILES_R =
-
-SFILES = cerror.S crt0.S dup2.S execve.S _exit.S sigsetjmp.S utime.S
-
-SFILES_R = sbrk.S wait.S
-
-# List of files built from template.S (with an '_' suffix).
-
-TEMPLATE_SFILES = access_ chdir_ chmod_ chown_ dup_ fcntl_ lstat_ mkdir_ pipe_ rmdir_ times_ umask_ utimes_
-
-
-TEMPLATE_SFILES_R = close_ fork_ fstat_ getpid_ gettimeofday_ kill_ link_ lseek_ open_ read_ stat_ times_ unlink_ wait4_ write_
-
-
-OFILES = $(COPYOFILES) $(COPYRENAMEOFILES) $(COPYOMFILES) $(SFILES:.S=.o) $(SFILES_R:.S=.o) $(SFILES_R:.S=_r.o) $(TEMPLATE_SFILES:_=.o) $(TEMPLATE_SFILES_R:_=.o) $(TEMPLATE_SFILES_R:_=_r.o) $(CFILES:.c=.o) $(CFILES_R:.c=.o) $(CFILES_R:.c=_r.o)
-
-
-lib_a_SOURCES = $(SFILES) $(SFILES_R) $(CFILES) $(CFILES_R)
-lib_a_LIBADD = $(COPYOFILES) $(COPYRENAMEOFILES) $(COPYOMFILES) $(SFILES_R:.S=_r.o) $(TEMPLATE_SFILES:_=.o) $(TEMPLATE_SFILES_R:_=.o) $(TEMPLATE_SFILES_R:_=_r.o) $(CFILES_R:.c=_r.o)
-
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_DEPENDENCIES = sbrk_r.o wait_r.o access.o chdir.o chmod.o chown.o \
-dup.o fcntl.o lstat.o mkdir.o pipe.o rmdir.o times.o umask.o utimes.o \
-close.o fork.o fstat.o getpid.o gettimeofday.o kill.o link.o lseek.o \
-open.o read.o stat.o times.o unlink.o wait4.o write.o close_r.o \
-fork_r.o fstat_r.o getpid_r.o gettimeofday_r.o kill_r.o link_r.o \
-lseek_r.o open_r.o read_r.o stat_r.o times_r.o unlink_r.o wait4_r.o \
-write_r.o
-lib_a_OBJECTS = cerror.o crt0.o dup2.o execve.o _exit.o sigsetjmp.o \
-utime.o sbrk.o wait.o _main.o ieee.o closedir.o opendir.o readdir.o \
-rewinddir.o scandir.o seekdir.o telldir.o creat.o isatty.o utime2.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s _r.o
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-.S_r.o:
- $(COMPILE) -DREENT -c $< -o $@
-
-.c_r.o:
- $(COMPILE) -DREENT -c $< -o $@
-
-$(COPYOFILES):
- $(AR) x /lib/libc.a $(COPYOFILES)
-
-$(COPYRENAMEOFILES):
- $(AR) x /lib/libc.a $(COPYRENAMEOFILES:S.o=.o)
- for f in $(COPYRENAMEOFILES); do mv `basename $$f S.o`.o $$f; done
-
-$(COPYOMFILES):
- $(AR) x /lib/libm.a $(COPYOMFILES)
-
-stamp-srcs: Makefile template.S template_r.S
- for f in $(TEMPLATE_SFILES:_=); do \
- $(COMPILE) -E -Dfunc=$$f $(srcdir)/template.S >$$f.S; \
- done
- for f in $(TEMPLATE_SFILES_R:_=); do \
- $(COMPILE) -E -Dfunc=$$f $(srcdir)/template_r.S | sed -e 's/^_/#/' >$$f.S; \
- done
- touch stamp-srcs
-
-# Make a dependency for each file built from a template.
-
-$(TEMPLATE_SFILES:_=.S) $(TEMPLATE_SFILES_R:_=.S): stamp-srcs
-
-all: crt0.o
-
-close_r.o: close.S
-fork_r.o: fork.S
-fstat_r.o: fstat.S
-getpid_r.o: getpid.S
-gettimeofday_r.o: gettimeofday.S
-kill_r.o: kill.S
-link_r.o: link.S
-lseek_r.o: lseek.S
-open_r.o: open.S
-read_r.o: read.S
-sbrk_r.o: sbrk.S
-stat_r.o: stat.S
-times_r.o: times.S
-unlink_r.o: unlink.S
-wait_r.o: wait.S
-wait4_r.o: wait4.S
-write_r.o: write.S
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/sparc64/_exit.S b/newlib/libc/sys/sparc64/_exit.S
deleted file mode 100644
index 174f72165..000000000
--- a/newlib/libc/sys/sparc64/_exit.S
+++ /dev/null
@@ -1,14 +0,0 @@
-! _exit() system call
-
-#include "sys/syscallasm.h"
-
- TEXT_SECTION
- ALIGN (4)
- GLOBAL (ASM_SYMBOL (_exit))
-ASM_SYMBOL (_exit):
- mov SYS_exit,%g1
- ta %icc,SYSCALL_TRAP
-
-! If that returns (yikes!), try an illegal insn ...
-
- WORD (0) \ No newline at end of file
diff --git a/newlib/libc/sys/sparc64/_main.c b/newlib/libc/sys/sparc64/_main.c
deleted file mode 100644
index 64878088d..000000000
--- a/newlib/libc/sys/sparc64/_main.c
+++ /dev/null
@@ -1,6 +0,0 @@
-
-__main()
-{
-
-
-}
diff --git a/newlib/libc/sys/sparc64/aclocal.m4 b/newlib/libc/sys/sparc64/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/sparc64/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/sparc64/cerror.S b/newlib/libc/sys/sparc64/cerror.S
deleted file mode 100644
index c29563fef..000000000
--- a/newlib/libc/sys/sparc64/cerror.S
+++ /dev/null
@@ -1,29 +0,0 @@
-! Set errno.
-! This function is called by all the syscall stubs.
-!
-! FIXME: We assume errno is the first member of struct _reent.
-! Not sure what to do about this.
-
-#include <sys/syscallasm.h>
-
- DATA_SECTION
- ALIGN (4)
- GLOBAL (ASM_SYMBOL (errno)) ! FIXME: ASM_PRIVATE_SYMBOL ?
-ASM_SYMBOL (errno):
- WORD (0)
-
- TEXT_SECTION
- ALIGN (4)
-
- GLOBAL (ASM_PRIVATE_SYMBOL (cerror))
-ASM_PRIVATE_SYMBOL (cerror):
- sethi %hi (ASM_SYMBOL (errno)),%g1
- stw %o0,[%g1+%lo (ASM_SYMBOL (errno))]
- jmpl %o7+8,%g0
- mov -1,%o0
-
- GLOBAL (ASM_PRIVATE_SYMBOL (cerror_r))
-ASM_PRIVATE_SYMBOL (cerror_r):
- stw %o0,[%o1]
- jmpl %o7+8,%g0
- mov -1,%o0
diff --git a/newlib/libc/sys/sparc64/closedir.c b/newlib/libc/sys/sparc64/closedir.c
deleted file mode 100644
index d87d81654..000000000
--- a/newlib/libc/sys/sparc64/closedir.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)closedir.c 5.9 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-/*
- * close a directory.
- */
-int
-closedir(dirp)
- register DIR *dirp;
-{
- int fd;
-
- fd = dirp->dd_fd;
- dirp->dd_fd = -1;
- dirp->dd_loc = 0;
- (void)free((void *)dirp->dd_buf);
- (void)free((void *)dirp);
- return(close(fd));
-}
diff --git a/newlib/libc/sys/sparc64/configure b/newlib/libc/sys/sparc64/configure
deleted file mode 100755
index 024f19110..000000000
--- a/newlib/libc/sys/sparc64/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=template_r.S
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/sparc64/configure.in b/newlib/libc/sys/sparc64/configure.in
deleted file mode 100644
index c434b2244..000000000
--- a/newlib/libc/sys/sparc64/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/sparc64 configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(template_r.S)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/sparc64/creat.c b/newlib/libc/sys/sparc64/creat.c
deleted file mode 100644
index 6b1116206..000000000
--- a/newlib/libc/sys/sparc64/creat.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* creat() "system call" */
-
-/* This is needed by f2c and therefore the SPEC benchmarks. */
-
-#include <fcntl.h>
-
-int
-creat (const char *path, mode_t mode)
-{
- return open (path, O_WRONLY | O_CREAT | O_TRUNC, mode);
-}
diff --git a/newlib/libc/sys/sparc64/crt0.S b/newlib/libc/sys/sparc64/crt0.S
deleted file mode 100644
index ed2cb7e93..000000000
--- a/newlib/libc/sys/sparc64/crt0.S
+++ /dev/null
@@ -1,123 +0,0 @@
-! C run time start off
-
-! This file supports:
-!
-! - both 32bit pointer and 64bit pointer environments (at compile time)
-! - an imposed stack bias (of 2047) (at run time)
-! - medium/low and medium/anywhere code models (at run time)
-
-! Initial stack setup:
-!
-! bottom of stack (higher memory address)
-! ...
-! text of environment strings
-! text of argument strings
-! envp[envc] = 0 (4/8 bytes)
-! ...
-! env[0] (4/8 bytes)
-! argv[argc] = 0 (4/8 bytes)
-! ...
-! argv[0] (4/8 bytes)
-! argc (4/8 bytes)
-! register save area (64 bits by 16 registers = 128 bytes)
-! top of stack (%sp)
-
-! Stack Bias:
-!
-! It is the responsibility of the o/s to set this up.
-! We handle both a 0 and 2047 value for the stack bias.
-
-! Medium/Anywhere code model support:
-!
-! In this model %g4 points to the start of the data segment.
-! The text segment can go anywhere, but %g4 points to the *data* segment.
-! It is up to the compiler/linker to get this right.
-!
-! Since this model is statically linked the start of the data segment
-! is known at link time. Eg:
-!
-! sethi %hh(data_start), %g1
-! sethi %lm(data_start), %g4
-! or %g1, %hm(data_start), %g1
-! or %g4, %lo(data_start), %g4
-! sllx %g1, 32, %g1
-! or %g4, %g1, %g4
-!
-! FIXME: For now we just assume 0.
-
-! FIXME: if %g1 contains a non-zero value, atexit() should be invoked
-! with this value.
-
-#include <sys/syscallasm.h>
-
- TEXT_SECTION
- ALIGN (4)
- GLOBAL (ASM_PRIVATE_SYMBOL (start))
-ASM_PRIVATE_SYMBOL (start):
- clr %fp
-
-! We use %g4 even if the code model is Medium/Low (simplifies the code).
-
- clr %g4 ! Medium/Anywhere base reg
-
-! If there is a stack bias in effect, account for it in %g5. Then always
-! add %g5 to stack references below. This way the code can be used with
-! or without an imposed bias.
-
- andcc %sp, 1, %g5
- bnz,a .LHaveBias
- mov 2047, %g5
-.LHaveBias:
- add %sp, %g5, %sp
-
-#if TARGET_PTR_SIZE == 32
- ! FIXME: We apparently assume here that there is no reserved word.
- ! This is probably correct, but try to verify it.
- ld [%sp + 0x80], %o0 ! argc
- add %sp, 0x84, %o1 ! argv
- add %o0, 1, %o2
- sll %o2, 2, %o2
-#else /* TARGET_PTR_SIZE == 64 */
- ld [%sp + 0x8c], %o0 ! argc.lo
- add %sp, 0x90, %o1 ! argv
- add %o0, 1, %o2
- sll %o2, 3, %o2
-#endif
- add %o1, %o2, %o2 ! envp
- sethi %hi (ASM_SYMBOL (environ)), %o3
- or %o3, %lo (ASM_SYMBOL (environ)), %o3
-#if TARGET_PTR_SIZE == 32
- st %o2, [%o3 + %g4]
-#else /* TARGET_PTR_SIZE == 64 */
- stx %o2, [%o3 + %g4]
-#endif
-
-! Restore any stack bias before we call main() ...
-
- sub %sp, %g5, %sp
-
- GLOBAL (ASM_SYMBOL (main))
- call ASM_SYMBOL (main)
-
-! FIXME: Not sure if this is needed anymore.
-#if TARGET_PTR_SIZE == 32
- sub %sp, 0x20, %sp ! room to push args
-#else /* TARGET_PTR_SIZE == 64 */
- sub %sp, 0x30, %sp ! room to push args
-#endif
-
- GLOBAL (ASM_SYMBOL (exit))
- call ASM_SYMBOL (exit)
- nop
-
- GLOBAL (ASM_SYMBOL (_exit))
- call ASM_SYMBOL (_exit)
- nop
-
- set SYS_exit, %g1
- ta SYSCALL_TRAP ! in case user redefines __exit
-
-! If all the above methods fail to terminate the program, try an illegal insn.
-! If that does not work, the o/s is hosed more than we are.
-
- WORD (0)
diff --git a/newlib/libc/sys/sparc64/dup2.S b/newlib/libc/sys/sparc64/dup2.S
deleted file mode 100644
index f46fb703e..000000000
--- a/newlib/libc/sys/sparc64/dup2.S
+++ /dev/null
@@ -1,9 +0,0 @@
-! dup2() system call
-
-#include "sys/syscallasm.h"
-
-/* FIXME: rewrite in C to use fcntl */
-
-#ifndef __svr4__ /* svr4 uses fcntl */
- defsyscall (dup2, SYS_dup2)
-#endif
diff --git a/newlib/libc/sys/sparc64/execve.S b/newlib/libc/sys/sparc64/execve.S
deleted file mode 100644
index 804d2ee3c..000000000
--- a/newlib/libc/sys/sparc64/execve.S
+++ /dev/null
@@ -1,27 +0,0 @@
-! execve.S
-! This function is invoked by the other exec*() fns.
-!
-! If sizeof(char *) == 64, we invoke a new Shade function until the real one
-! is defined.
-
-#include "sys/syscallasm.h"
-
- TEXT_SECTION
- ALIGN (4)
- GLOBAL (ASM_SYMBOL (execve))
-ASM_SYMBOL (execve):
- mov SYS_execve,%g1
-#if TARGET_PTR_SIZE == 64
- ta 42
-#else
- ta SYSCALL_TRAP
-#endif
-
- bcc noerr
- nop
-
- seterrno()
-
-noerr:
- jmpl %o7+8,%g0
- nop
diff --git a/newlib/libc/sys/sparc64/ieee.c b/newlib/libc/sys/sparc64/ieee.c
deleted file mode 100644
index 28289761d..000000000
--- a/newlib/libc/sys/sparc64/ieee.c
+++ /dev/null
@@ -1,115 +0,0 @@
-
-#include <ieeefp.h>
-
-
-fp_rnd
-_DEFUN_VOID(fpgetround)
-{
- char *out;
- ieee_flags("get", "direction","", &out);
- if (strcmp(out,"nearest") == 0) return FP_RN;
- if (strcmp(out,"negative") == 0) return FP_RM;
- if (strcmp(out,"positive") == 0) return FP_RP;
- if (strcmp(out,"tozero") == 0) return FP_RZ;
- abort();
-
-}
-
-fp_rnd
-_DEFUN(fpsetround,(new),
- fp_rnd new)
-{
- fp_rnd old = fpgetround();
- char *dummy;
-
- switch (new)
- {
- case FP_RN:
- ieee_flags("set", "direction", "nearest", &dummy);
- break;
- case FP_RM:
- ieee_flags("set", "direction", "negative", &dummy);
- break;
- case FP_RP:
- ieee_flags("set", "direction", "positive", &dummy);
- break;
- case FP_RZ:
- ieee_flags("set", "direction", "tozero", &dummy);
- break;
- default:
- break;
- }
- return old;
-}
-
-
-fp_except
-_DEFUN_VOID(fpgetmask)
-{
- char *out;
- int r = 0;
-
- int i = ieee_flags("get","exception","",&out);
- if (i & 1) r |= FP_X_IMP;
- if (i & 2) r |= FP_X_DX;
- if (i & 4) r |= FP_X_UFL;
- if (i & 8) r |= FP_X_OFL;
- if (i & 16) r |= FP_X_INV;
- return r;
-
-}
-
-fp_except
-_DEFUN(fpsetmask,(mask),
- fp_except mask)
-{
- fp_except old = fpgetmask();
-
- char *out;
- ieee_flags("clear","exception", "all", &out);
-
-
- if (mask & FP_X_IMP)
- ieee_flags("set","exception","inexact", &out);
- if (mask & FP_X_DX)
- ieee_flags("set","exception","division", &out);
- if (mask & FP_X_UFL)
- ieee_flags("set","exception","underflow", &out);
- if (mask & FP_X_OFL)
- ieee_flags("set","exception","overflow", &out);
- if (mask & FP_X_INV)
- ieee_flags("set","exception","invalid", &out);
-
- return old;
-
-}
-
-fp_except
-_DEFUN(fpsetsticky,(mask),
- fp_except mask)
-{
- return fpsetmask(mask);
-}
-
-fp_except
-_DEFUN_VOID(fpgetsticky)
-{
- return fpgetmask();
-}
-
-int
-_DEFUN(fpsetroundtoi,(rdi_mode),
- fp_rdi rdi_mode)
-{
-
- return 0;
-
-}
-
-int
-_DEFUN_VOID(fpgetroundtoi)
-{
-
- return 0;
-
-}
diff --git a/newlib/libc/sys/sparc64/isatty.c b/newlib/libc/sys/sparc64/isatty.c
deleted file mode 100644
index 3c64647a9..000000000
--- a/newlib/libc/sys/sparc64/isatty.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* isatty.c */
-
-/* Dumb implementation so programs will at least run. */
-
-#include <sys/stat.h>
-
-int
-isatty (int fd)
-{
- struct stat buf;
-
- if (fstat (fd, &buf) < 0)
- return 0;
- if (S_ISCHR (buf.st_mode))
- return 1;
- return 0;
-}
diff --git a/newlib/libc/sys/sparc64/lstat.S b/newlib/libc/sys/sparc64/lstat.S
deleted file mode 100644
index 381330d17..000000000
--- a/newlib/libc/sys/sparc64/lstat.S
+++ /dev/null
@@ -1,5 +0,0 @@
-! lstat() system call
-
-#include "sys/syscallasm.h"
-
- defsyscall (lstat, SYS_lstat)
diff --git a/newlib/libc/sys/sparc64/opendir.c b/newlib/libc/sys/sparc64/opendir.c
deleted file mode 100644
index ce080e312..000000000
--- a/newlib/libc/sys/sparc64/opendir.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)opendir.c 5.11 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <dirent.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-/*
- * open a directory.
- */
-DIR *
-opendir(name)
- const char *name;
-{
- register DIR *dirp;
- register int fd;
-
- if ((fd = open(name, 0)) == -1)
- return NULL;
- if (fcntl(fd, F_SETFD, 1) == -1 ||
- (dirp = (DIR *)malloc(sizeof(DIR))) == NULL) {
- close (fd);
- return NULL;
- }
- /*
- * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE
- * buffer that it cluster boundary aligned.
- * Hopefully this can be a big win someday by allowing page trades
- * to user space to be done by getdirentries()
- */
- dirp->dd_buf = malloc (512);
- dirp->dd_len = 512;
-
- if (dirp->dd_buf == NULL) {
- close (fd);
- return NULL;
- }
- dirp->dd_fd = fd;
- dirp->dd_loc = 0;
- dirp->dd_seek = 0;
- /*
- * Set up seek point for rewinddir.
- */
- return dirp;
-}
diff --git a/newlib/libc/sys/sparc64/readdir.c b/newlib/libc/sys/sparc64/readdir.c
deleted file mode 100644
index b3839870c..000000000
--- a/newlib/libc/sys/sparc64/readdir.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)readdir.c 5.7 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-#include <dirent.h>
-
-/*
- * get next entry in a directory.
- */
-struct dirent *
-readdir(dirp)
-register DIR *dirp; {
- register struct dirent *dp;
-
- for (;;) {
- if (dirp->dd_loc == 0) {
- dirp->dd_size = getdents (dirp->dd_fd,
- dirp->dd_buf,
- dirp->dd_len);
-
- if (dirp->dd_size <= 0)
- return NULL;
- }
- if (dirp->dd_loc >= dirp->dd_size) {
- dirp->dd_loc = 0;
- continue;
- }
- dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc);
- if ((int)dp & 03) /* bogus pointer check */
- return NULL;
- if (dp->d_reclen <= 0 ||
- dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc)
- return NULL;
- dirp->dd_loc += dp->d_reclen;
- if (dp->d_ino == 0)
- continue;
- return (dp);
- }
-}
diff --git a/newlib/libc/sys/sparc64/rewinddir.c b/newlib/libc/sys/sparc64/rewinddir.c
deleted file mode 100644
index d52c013c4..000000000
--- a/newlib/libc/sys/sparc64/rewinddir.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rewinddir.c 5.1 (Berkeley) 5/25/90";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <dirent.h>
-
-void
-rewinddir(dirp)
- DIR *dirp;
-{
- extern long _rewinddir;
-
- _seekdir((dirp), _rewinddir);
- _rewinddir = telldir(dirp);
-}
diff --git a/newlib/libc/sys/sparc64/sbrk.S b/newlib/libc/sys/sparc64/sbrk.S
deleted file mode 100644
index bff72fa81..000000000
--- a/newlib/libc/sys/sparc64/sbrk.S
+++ /dev/null
@@ -1,78 +0,0 @@
-! sbrk() system call
-
-#include "sys/syscallasm.h"
-
- DATA_SECTION
- ALIGN (4)
-
-! CURBRK contains the current top of allocated space.
-! END is a private symbol in svr4, but a public one in sunos4.
-! FIXME: CURBRK is 4 bytes for now.
-
-
- GLOBAL (ASM_PRIVATE_SYMBOL (curbrk))
-ASM_PRIVATE_SYMBOL (curbrk):
-#ifdef __svr4__
- WORD (ASM_PRIVATE_SYMBOL (end))
-#else
- WORD (ASM_SYMBOL (end))
-#endif
-
- TEXT_SECTION
- ALIGN (4)
-#ifdef REENT
- GLOBAL (ASM_SYMBOL (_sbrk_r))
-ASM_SYMBOL (_sbrk_r):
- mov %o0,%o5
- mov %o1,%o0
-#else
- GLOBAL (ASM_SYMBOL (sbrk))
-ASM_SYMBOL (sbrk):
-#endif
- add %o0,7,%o0
- andn %o0,7,%o0
- sethi %hi (ASM_PRIVATE_SYMBOL (curbrk)),%o2
- lduw [%o2+%lo (ASM_PRIVATE_SYMBOL (curbrk))],%o3
- add %o3,7,%o3
- andn %o3,7,%o3
- add %o3,%o0,%o0
- mov %o0,%o4
- mov SYS_brk,%g1
- ta SYSCALL_TRAP
- bcs err
- nop
- stw %o4,[%o2+%lo (ASM_PRIVATE_SYMBOL (curbrk))]
- jmpl %o7+8,%g0
- mov %o3,%o0
-
-#ifdef REENT
- GLOBAL (ASM_SYMBOL (_brk_r))
-ASM_SYMBOL (_brk_r):
- mov %o0,%o5
- mov %o1,%o0
-#else
- GLOBAL (ASM_SYMBOL (brk))
-ASM_SYMBOL (brk):
-#endif
- add %o0,7,%o0
- andn %o0,7,%o0
- mov %o0,%o2
- mov SYS_brk,%g1
- ta SYSCALL_TRAP
- bcs err
- nop
- sethi %hi (ASM_PRIVATE_SYMBOL (curbrk)),%o3
- st %o2,[%o3+%lo (ASM_PRIVATE_SYMBOL (curbrk))]
- retl
- mov %g0,%o0
-
-err:
-#ifdef REENT
- sethi %hi (ASM_PRIVATE_SYMBOL (cerror_r)),%g1
- or %g1,%lo (ASM_PRIVATE_SYMBOL (cerror_r)),%g1
-#else
- sethi %hi (ASM_PRIVATE_SYMBOL (cerror)),%g1
- or %g1,%lo (ASM_PRIVATE_SYMBOL (cerror)),%g1
-#endif
- jmpl %g1,%g0
- mov %o5,%o1
diff --git a/newlib/libc/sys/sparc64/scandir.c b/newlib/libc/sys/sparc64/scandir.c
deleted file mode 100644
index bcfd525c4..000000000
--- a/newlib/libc/sys/sparc64/scandir.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)scandir.c 5.10 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Scan the directory dirname calling select to make a list of selected
- * directory entries then sort using qsort and compare routine dcomp.
- * Returns the number of entries and a pointer to a list of pointers to
- * struct dirent (through namelist). Returns -1 if there were any errors.
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <string.h>
-
-/*
- * The DIRSIZ macro gives the minimum record length which will hold
- * the directory entry. This requires the amount of space in struct dirent
- * without the d_name field, plus enough space for the name with a terminating
- * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary.
- */
-#undef DIRSIZ
-#define DIRSIZ(dp) \
- ((sizeof (struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
-
-#ifndef __P
-#define __P(args) ()
-#endif
-
-int
-scandir(dirname, namelist, select, dcomp)
- const char *dirname;
- struct dirent ***namelist;
- int (*select) __P((struct dirent *));
- int (*dcomp) __P((const void *, const void *));
-{
- register struct dirent *d, *p, **names;
- register size_t nitems;
- struct stat stb;
- long arraysz;
- DIR *dirp;
-
- if ((dirp = opendir(dirname)) == NULL)
- return(-1);
- if (fstat(dirp->dd_fd, &stb) < 0)
- return(-1);
-
- /*
- * estimate the array size by taking the size of the directory file
- * and dividing it by a multiple of the minimum size entry.
- */
- arraysz = (stb.st_size / 24);
- names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
- if (names == NULL)
- return(-1);
-
- nitems = 0;
- while ((d = readdir(dirp)) != NULL) {
- if (select != NULL && !(*select)(d))
- continue; /* just selected names */
- /*
- * Make a minimum size copy of the data
- */
- p = (struct dirent *)malloc(DIRSIZ(d));
- if (p == NULL)
- return(-1);
- p->d_ino = d->d_ino;
- p->d_reclen = d->d_reclen;
- p->d_namlen = d->d_namlen;
- bcopy(d->d_name, p->d_name, p->d_namlen + 1);
- /*
- * Check to make sure the array has space left and
- * realloc the maximum size.
- */
- if (++nitems >= arraysz) {
- if (fstat(dirp->dd_fd, &stb) < 0)
- return(-1); /* just might have grown */
- arraysz = stb.st_size / 12;
- names = (struct dirent **)realloc((char *)names,
- arraysz * sizeof(struct dirent *));
- if (names == NULL)
- return(-1);
- }
- names[nitems-1] = p;
- }
- closedir(dirp);
- if (nitems && dcomp != NULL)
- qsort(names, nitems, sizeof(struct dirent *), dcomp);
- *namelist = names;
- return(nitems);
-}
-
-/*
- * Alphabetic order comparison routine for those who want it.
- */
-int
-alphasort(d1, d2)
- const void *d1;
- const void *d2;
-{
- return(strcmp((*(struct dirent **)d1)->d_name,
- (*(struct dirent **)d2)->d_name));
-}
diff --git a/newlib/libc/sys/sparc64/seekdir.c b/newlib/libc/sys/sparc64/seekdir.c
deleted file mode 100644
index 50331402a..000000000
--- a/newlib/libc/sys/sparc64/seekdir.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)seekdir.c 5.7 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <dirent.h>
-
-/*
- * Seek to an entry in a directory.
- * _seekdir is in telldir.c so that it can share opaque data structures.
- */
-void
-seekdir(dirp, loc)
- DIR *dirp;
- long loc;
-{
-
- _seekdir(dirp, loc);
-}
diff --git a/newlib/libc/sys/sparc64/sigsetjmp.S b/newlib/libc/sys/sparc64/sigsetjmp.S
deleted file mode 100644
index 7751e5f8c..000000000
--- a/newlib/libc/sys/sparc64/sigsetjmp.S
+++ /dev/null
@@ -1,77 +0,0 @@
-! This file is called sigsetjmp.s because that is what V8 uses.
-! We do not define sigsetjmp() or setlongjmp() yet.
-! Solaris has setjmp/longjmp in setjmp.o. Move this stuff there.
-
-#include <sys/syscallasm.h>
-
- TEXT_SECTION
- ALIGN (4)
-
-#ifdef __svr4__
-
- GLOBAL (ASM_SYMBOL (setjmp))
- .proc 04
-ASM_SYMBOL (setjmp):
-
- clr [%o0]
- stx %sp,[%o0+8]
- add %o7,8,%g1
- stx %g1,[%o0+16]
- retl
- mov %g0,%o0
-
- GLOBAL (ASM_SYMBOL (longjmp))
- .proc 04
-ASM_SYMBOL (longjmp):
-
- flushw ! flush register windows
- sub %sp,136,%sp
- ldx [%o0+8],%fp
- ldx [%o0+16],%g1
- tst %o1
- bne L0
- sub %g1,8,%o7
- mov 1,%o1
-L0:
- retl
- restore %o1,0,%o0
-
-#else
-
- GLOBAL (ASM_SYMBOL (setjmp))
- .proc 04
-ASM_SYMBOL (setjmp):
- save %sp,-136,%sp
- or %g0,%g0,%o0 ! %o0 = 0
- or %g0,0x6d,%g1 ! %g1 = 0x6d (syscall number)
- ta SYSCALL_TRAP
- stw %o0,[%i0+4] ! save result at [%i0+4] (sigmask?)
- add %fp,-8,%o1 ! %o1 -> tmp 8 byte buffer
- or %g0,%g0,%o0 ! %o0 = 0
- or %g0,0x70,%g1 ! %g1 = 0x70 (syscall number)
- ta SYSCALL_TRAP
- lduw [%fp-4],%g1 ! %g1 = onsstack?
- stw %fp,[%i0+8] ! save %fp at [%i0+8]
- stw %g1,[%i0+0] ! save ? at [%i0+8]
- add %i7,8,%g1 ! %g1 = return address
- stw %g1,[%i0+12] ! save return address at [%i0+12]
- add %g1,4,%g1 ! %g1 = nPC
- stw %g1,[%i0+16] ! save nPC at [%i0+16]
- stw %g0,[%i0+20]
- stw %g0,[%i0+24]
- stw %g0,[%i0+32]
- jmpl %i7+8,%g0
- restore %g0,0,%o0
-
- GLOBAL (ASM_SYMBOL (longjmp))
- .proc 04
-ASM_SYMBOL (longjmp):
- orcc %g0,%o1,%g0 ! return val == 0 ?
- be,a L1 ! branch if 0
- or %g0,1,%o1 ! make it 1 (executed if branch taken)
-L1:
- or %g0,0x8b,%g1 ! set syscall 0x8b
- stw %o1,[%o0+28] ! save return val for restoration
- ta SYSCALL_TRAP
-
-#endif /* ! __svr4__ */
diff --git a/newlib/libc/sys/sparc64/stat.S b/newlib/libc/sys/sparc64/stat.S
deleted file mode 100644
index 32adb23ce..000000000
--- a/newlib/libc/sys/sparc64/stat.S
+++ /dev/null
@@ -1,9 +0,0 @@
-! stat() system call
-
-#include "sys/syscallasm.h"
-
-#ifdef REENT
- defsyscall_r (_stat_r, SYS_stat, 2)
-#else
- defsyscall (stat, SYS_stat)
-#endif
diff --git a/newlib/libc/sys/sparc64/sys/dirent.h b/newlib/libc/sys/sparc64/sys/dirent.h
deleted file mode 100644
index 864bb5ca1..000000000
--- a/newlib/libc/sys/sparc64/sys/dirent.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* FIXME: From sys/sysvi386/sys */
-#ifndef _SYS_DIRENT_H
-# define _SYS_DIRENT_H
-
-/*
- * This file was written to be compatible with the BSD directory
- * routines, so it looks like it. But it was written from scratch.
- * Sean Eric Fagan, sef@Kithrup.COM
- */
-
-typedef struct __dirdesc {
- int dd_fd;
- long dd_loc;
- long dd_size;
- char *dd_buf;
- int dd_len;
- long dd_seek;
-} DIR;
-
-# define __dirfd(dp) ((dp)->dd_fd)
-
-DIR *opendir (const char *);
-struct dirent *readdir (DIR *);
-void rewinddir (DIR *);
-int closedir (DIR *);
-
-#include <sys/types.h>
-
-#undef MAXNAMLEN /* from unistd.h */
-#ifdef __svr4__
-#define MAXNAMLEN 512
-#else
-#define MAXNAMLEN 255
-#endif
-
-#define d_ino d_fileno /* compatibility */
-
-struct dirent {
- off_t d_off;
- unsigned long d_fileno;
- unsigned short d_reclen;
- unsigned short d_namlen;
- char d_name[MAXNAMLEN + 1];
-};
-
-/* FIXME: include definition of DIRSIZ() ? */
-
-#endif
diff --git a/newlib/libc/sys/sparc64/sys/fcntl.h b/newlib/libc/sys/sparc64/sys/fcntl.h
deleted file mode 100644
index 940649ac7..000000000
--- a/newlib/libc/sys/sparc64/sys/fcntl.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/* sys/fcntl.h for sparc64 */
-
-/* This is basically the same as the default version, except that a few of
- the values are different on Solaris (eg: FCREAT).
- We support both SunOS4 and Solaris. */
-
-#ifndef _SYS_FCNTL_H_
-#define _SYS_FCNTL_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <_ansi.h>
-
-#define _FOPEN (-1) /* from sys/file.h, kernel use only */
-#define _FREAD 0x0001 /* read enabled */
-#define _FWRITE 0x0002 /* write enabled */
-#define _FNDELAY 0x0004 /* non blocking I/O (4.2 style) */
-#define _FAPPEND 0x0008 /* append (writes guaranteed at the end) */
-#ifdef __svr4__
-#define _FNONBLOCK 0x0080 /* non blocking I/O (POSIX) */
-#define _FCREAT 0x0100 /* open with file create */
-#define _FTRUNC 0x0200 /* open with truncation */
-#define _FEXCL 0x0400 /* error on open if file exists */
-#define _FNOCTTY 0x0800 /* don't assign a ctty on this open */
-#else
-#define _FMARK 0x0010 /* internal; mark during gc() */
-#define _FDEFER 0x0020 /* internal; defer for next gc pass */
-#define _FASYNC 0x0040 /* signal pgrp when data ready */
-#define _FSHLOCK 0x0080 /* BSD flock() shared lock present */
-#define _FEXLOCK 0x0100 /* BSD flock() exclusive lock present */
-#define _FCREAT 0x0200 /* open with file create */
-#define _FTRUNC 0x0400 /* open with truncation */
-#define _FEXCL 0x0800 /* error on open if file exists */
-#define _FNBIO 0x1000 /* non blocking I/O (sys5 style) */
-#define _FSYNC 0x2000 /* do all writes synchronously */
-#define _FNONBLOCK 0x4000 /* non blocking I/O (POSIX style) */
-#define _FNOCTTY 0x8000 /* don't assign a ctty on this open */
-#endif /* ! __svr4__ */
-
-#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
-
-/*
- * Flag values for open(2) and fcntl(2)
- * The kernel adds 1 to the open modes to turn it into some
- * combination of FREAD and FWRITE.
- */
-#define O_RDONLY 0 /* +1 == FREAD */
-#define O_WRONLY 1 /* +1 == FWRITE */
-#define O_RDWR 2 /* +1 == FREAD|FWRITE */
-#define O_APPEND _FAPPEND
-#define O_CREAT _FCREAT
-#define O_TRUNC _FTRUNC
-#define O_EXCL _FEXCL
-/* O_SYNC _FSYNC not posix, defined below */
-/* O_NDELAY _FNDELAY set in include/fcntl.h */
-/* O_NDELAY _FNBIO set in 5include/fcntl.h */
-#define O_NONBLOCK _FNONBLOCK
-#define O_NOCTTY _FNOCTTY
-
-#ifndef _POSIX_SOURCE
-
-#define O_SYNC _FSYNC
-
-/*
- * Flags that work for fcntl(fd, F_SETFL, FXXXX)
- */
-#define FAPPEND _FAPPEND
-#define FSYNC _FSYNC
-#define FASYNC _FASYNC
-#define FNBIO _FNBIO
-#define FNONBIO _FNONBLOCK /* XXX fix to be NONBLOCK everywhere */
-#define FNDELAY _FNDELAY
-
-/*
- * Flags that are disallowed for fcntl's (FCNTLCANT);
- * used for opens, internal state, or locking.
- */
-#define FREAD _FREAD
-#define FWRITE _FWRITE
-#define FMARK _FMARK
-#define FDEFER _FDEFER
-#define FSHLOCK _FSHLOCK
-#define FEXLOCK _FEXLOCK
-
-/*
- * The rest of the flags, used only for opens
- */
-#define FOPEN _FOPEN
-#define FCREAT _FCREAT
-#define FTRUNC _FTRUNC
-#define FEXCL _FEXCL
-#define FNOCTTY _FNOCTTY
-
-#endif !_POSIX_SOURCE
-
-/* XXX close on exec request; must match UF_EXCLOSE in user.h */
-#define FD_CLOEXEC 1 /* posix */
-
-/* fcntl(2) requests */
-#define F_DUPFD 0 /* Duplicate fildes */
-#define F_GETFD 1 /* Get fildes flags (close on exec) */
-#define F_SETFD 2 /* Set fildes flags (close on exec) */
-#define F_GETFL 3 /* Get file flags */
-#define F_SETFL 4 /* Set file flags */
-#ifndef _POSIX_SOURCE
-#ifdef __svr4__
-#define F_GETOWN 23 /* Get owner - for ASYNC */
-#define F_SETOWN 24 /* Set owner - for ASYNC */
-#else
-#define F_GETOWN 5 /* Get owner - for ASYNC */
-#define F_SETOWN 6 /* Set owner - for ASYNC */
-#endif
-#endif /* !_POSIX_SOURCE */
-#ifdef __svr4__
-#define F_GETLK 14 /* Get record-locking information */
-#define F_SETLK 6 /* Set or Clear a record-lock (Non-Blocking) */
-#define F_SETLKW 7 /* Set or Clear a record-lock (Blocking) */
-#else
-#define F_GETLK 7 /* Get record-locking information */
-#define F_SETLK 8 /* Set or Clear a record-lock (Non-Blocking) */
-#define F_SETLKW 9 /* Set or Clear a record-lock (Blocking) */
-#endif
-#ifndef _POSIX_SOURCE
-#define F_RGETLK 10 /* Test a remote lock to see if it is blocked */
-#define F_RSETLK 11 /* Set or unlock a remote lock */
-#define F_CNVT 12 /* Convert a fhandle to an open fd */
-#define F_RSETLKW 13 /* Set or Clear remote record-lock(Blocking) */
-#endif /* !_POSIX_SOURCE */
-
-/* fcntl(2) flags (l_type field of flock structure) */
-#define F_RDLCK 1 /* read lock */
-#define F_WRLCK 2 /* write lock */
-#define F_UNLCK 3 /* remove lock(s) */
-#ifndef _POSIX_SOURCE
-#define F_UNLKSYS 4 /* remove remote locks for a given system */
-#endif /* !_POSIX_SOURCE */
-
-/*#include <sys/stdtypes.h>*/
-
-/* file segment locking set data type - information passed to system by user */
-struct flock {
- short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
- short l_whence; /* flag to choose starting offset */
- long l_start; /* relative offset, in bytes */
- long l_len; /* length, in bytes; 0 means lock to EOF */
- short l_pid; /* returned with F_GETLK */
- short l_xxx; /* reserved for future use */
-};
-
-#ifndef _POSIX_SOURCE
-/* extended file segment locking set data type */
-struct eflock {
- short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
- short l_whence; /* flag to choose starting offset */
- long l_start; /* relative offset, in bytes */
- long l_len; /* length, in bytes; 0 means lock to EOF */
- short l_pid; /* returned with F_GETLK */
- short l_xxx; /* reserved for future use */
- long l_rpid; /* Remote process id wanting this lock */
- long l_rsys; /* Remote system id wanting this lock */
-};
-#endif /* !_POSIX_SOURCE */
-
-
-#include <sys/types.h>
-#include <sys/stat.h> /* sigh. for the mode bits for open/creat */
-
-extern int open _PARAMS ((const char *, int, ...));
-extern int creat _PARAMS ((const char *, mode_t));
-extern int fcntl _PARAMS ((int, int, ...));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_SYS_FCNTL_H_ */
diff --git a/newlib/libc/sys/sparc64/sys/file.h b/newlib/libc/sys/sparc64/sys/file.h
deleted file mode 100644
index 768494377..000000000
--- a/newlib/libc/sys/sparc64/sys/file.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* This is the same as sys/fcntl.h for now. */
-
-#include <sys/fcntl.h>
diff --git a/newlib/libc/sys/sparc64/sys/stat.h b/newlib/libc/sys/sparc64/sys/stat.h
deleted file mode 100644
index 256c1b41b..000000000
--- a/newlib/libc/sys/sparc64/sys/stat.h
+++ /dev/null
@@ -1,131 +0,0 @@
-#ifndef _SYS_STAT_H
-#define _SYS_STAT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <_ansi.h>
-#include <sys/types.h>
-
-#ifdef __svr4__
-
-#include <sys/time.h>
-
-#define _ST_FSTYPSZ 16 /* array size for file system type name */
-
-struct stat
-{
- dev_t st_dev;
- long st_pad1[3]; /* reserved for network id */
- ino_t st_ino;
- mode_t st_mode;
- nlink_t st_nlink;
- uid_t st_uid;
- gid_t st_gid;
- dev_t st_rdev;
- long st_pad2[2];
- off_t st_size;
- long st_pad3; /* future off_t expansion */
- timestruc_t st_atim;
- timestruc_t st_mtim;
- timestruc_t st_ctim;
- long st_blksize;
- long st_blocks;
- char st_fstype[_ST_FSTYPSZ];
- long st_pad4[8]; /* expansion area */
-};
-
-#define st_atime st_atim.tv_sec
-#define st_mtime st_mtim.tv_sec
-#define st_ctime st_ctim.tv_sec
-
-#else
-
-#include <time.h>
-
-struct stat
-{
- dev_t st_dev;
- ino_t st_ino;
- mode_t st_mode;
- short st_nlink;
- uid_t st_uid;
- gid_t st_gid;
- dev_t st_rdev;
- off_t st_size;
- time_t st_atime;
- int st_spare1;
- time_t st_mtime;
- int st_spare2;
- time_t st_ctime;
- int st_spare3;
- long st_blksize;
- long st_blocks;
- long st_spare4[2];
-};
-
-#endif
-
-#define _IFMT 0170000 /* type of file */
-#define _IFDIR 0040000 /* directory */
-#define _IFCHR 0020000 /* character special */
-#define _IFBLK 0060000 /* block special */
-#define _IFREG 0100000 /* regular */
-#define _IFLNK 0120000 /* symbolic link */
-#define _IFSOCK 0140000 /* socket */
-#define _IFIFO 0010000 /* fifo */
-
-#define S_ISUID 0004000 /* set user id on execution */
-#define S_ISGID 0002000 /* set group id on execution */
-#ifndef _POSIX_SOURCE
-#define S_ISVTX 0001000 /* save swapped text even after use */
-#define S_IREAD 0000400 /* read permission, owner */
-#define S_IWRITE 0000200 /* write permission, owner */
-#define S_IEXEC 0000100 /* execute/search permission, owner */
-
-#define S_ENFMT 0002000 /* enforcement-mode locking */
-
-#define S_IFMT _IFMT
-#define S_IFDIR _IFDIR
-#define S_IFCHR _IFCHR
-#define S_IFBLK _IFBLK
-#define S_IFREG _IFREG
-#define S_IFLNK _IFLNK
-#define S_IFSOCK _IFSOCK
-#define S_IFIFO _IFIFO
-#endif /* !_POSIX_SOURCE */
-
-
-#define S_IRWXU 0000700 /* rwx, owner */
-#define S_IRUSR 0000400 /* read permission, owner */
-#define S_IWUSR 0000200 /* write permission, owner */
-#define S_IXUSR 0000100 /* execute/search permission, owner */
-#define S_IRWXG 0000070 /* rwx, group */
-#define S_IRGRP 0000040 /* read permission, group */
-#define S_IWGRP 0000020 /* write permission, grougroup */
-#define S_IXGRP 0000010 /* execute/search permission, group */
-#define S_IRWXO 0000007 /* rwx, other */
-#define S_IROTH 0000004 /* read permission, other */
-#define S_IWOTH 0000002 /* write permission, other */
-#define S_IXOTH 0000001 /* execute/search permission, other */
-
-#define S_ISBLK(m) (((m)&_IFMT) == _IFBLK)
-#define S_ISCHR(m) (((m)&_IFMT) == _IFCHR)
-#define S_ISDIR(m) (((m)&_IFMT) == _IFDIR)
-#define S_ISFIFO(m) (((m)&_IFMT) == _IFIFO)
-#define S_ISREG(m) (((m)&_IFMT) == _IFREG)
-#define S_ISLNK(m) (((m)&_IFMT) == _IFLNK)
-#define S_ISSOCK(m) (((m)&_IFMT) == _IFSOCK)
-
-int _EXFUN(chmod,( const char *_path, mode_t _mode ));
-int _EXFUN(fstat,( int _fd, struct stat *_sbuf ));
-int _EXFUN(mkdir,( char *_path, mode_t _mode ));
-int _EXFUN(mkfifo,( char *_path, mode_t _mode ));
-int _EXFUN(stat,( const char *_path, struct stat *_sbuf ));
-mode_t _EXFUN(umask,( mode_t _mask ));
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _SYS_STAT_H */
diff --git a/newlib/libc/sys/sparc64/sys/syscall.h b/newlib/libc/sys/sparc64/sys/syscall.h
deleted file mode 100644
index df5da365f..000000000
--- a/newlib/libc/sys/sparc64/sys/syscall.h
+++ /dev/null
@@ -1,346 +0,0 @@
-#ifndef _SYSCALL_H_
-#define _SYSCALL_H_
-
-/*
- * This file defines the system calls for SPARC.
- *
- * WARNING: This file can be included by assembler files.
- */
-
-#define SYS_exit 1
-#define SYS_fork 2
-#define SYS_read 3
-#define SYS_write 4
-#define SYS_open 5
-#define SYS_close 6
-#define SYS_wait4 7
-#define SYS_creat 8
-#define SYS_link 9
-#define SYS_unlink 10
-#define SYS_execv 11
-#define SYS_chdir 12
-#ifdef __svr4__
-#define SYS_time 13 /* old time in sunos4 */
-#endif
-#define SYS_mknod 14
-#define SYS_chmod 15
-#define SYS_chown 16
-#define SYS_brk 17
-#ifdef __svr4__
-#define SYS_stat 18 /* old stat in sunos4 */
-#endif
-#define SYS_lseek 19
-#define SYS_getpid 20
-#ifdef __svr4__
-#define SYS_mount 21 /* old mount in sunos4 */
-#define SYS_umount 22 /* old umount in sunos4 */
-#define SYS_setuid 23 /* old setuid in sunos4 */
-#endif
-#define SYS_getuid 24
-#ifdef __svr4__
-#define SYS_stime 25 /* old stime in sunos4 */
-#endif
-#define SYS_ptrace 26
-#ifdef __svr4__
-#define SYS_alarm 27 /* old alarm in sunos4 */
-#define SYS_fstat 28 /* old fstat in sunos4 */
-#define SYS_pause 29 /* old pause in sunos4 */
-#define SYS_utime 30 /* old utime in sunos4 */
-#define SYS_stty 31 /* old stty in sunos4 */
-#define SYS_gtty 32 /* old gtty in sunos4 */
-#endif
-#define SYS_access 33
-#ifdef __svr4__
-#define SYS_nice 34 /* old nice in sunos4 */
-#define SYS_statfs 35 /* old ftime in sunos4 */
-#endif
-#define SYS_sync 36
-#define SYS_kill 37
-#ifdef __svr4__
-#define SYS_fstatfs 38
-#define SYS_pgrpsys 39 /* old setpgrp in sunos4 */
-#define SYS_xenix 40
-#else
-#define SYS_stat 38
-#define SYS_lstat 40
-#endif
-#define SYS_dup 41
-#define SYS_pipe 42
-#define SYS_times 43 /* times is obsolete in sunos4, used anyway */
-#define SYS_profil 44
-#ifdef __svr4__
-#define SYS_plock 45 /* unused in sunos4 */
-#define SYS_setgid 46 /* old setgid in sunos4 */
-#endif
-#define SYS_getgid 47
-#ifdef __svr4__
-#define SYS_signal 48 /* old sigsys in sunos4 */
-#define SYS_msgsys 49 /* unused in sunos4 */
-#define SYS_sun 50 /* unused in sunos4 */
-#endif
-#define SYS_acct 51
-#ifdef __svr4__
-#define SYS_shmsys 52 /* old phys in sunos4 */
-#define SYS_semsys 53
-#else
-#define SYS_mctl 53
-#endif
-#define SYS_ioctl 54
-#ifdef __svr4__
-#define SYS_uadmin 55
-#else
-#define SYS_reboot 55
-#endif
- /* 56 is old: mpxchan (reserved in sunos5) */
-#ifdef __svr4__
-#define SYS_utssys 57
-#define SYS_fsync 58
-#else
-#define SYS_symlink 57
-#define SYS_readlink 58
-#endif
-#define SYS_execve 59
-#define SYS_umask 60
-#define SYS_chroot 61
-#ifdef __svr4__
-#define SYS_fcntl 62
-#define SYS_ulimit 63 /* unused in sunos4 */
- /* 64-77 unused/reserved in sunos5 */
-#else
-#define SYS_fstat 62
-#define SYS_getpagesize 64
-#define SYS_msync 65
- /* 66 is old: vfork */
- /* 67 is old: vread */
- /* 68 is old: vwrite */
-#define SYS_sbrk 69
-#define SYS_sstk 70
-#define SYS_mmap 71
-#define SYS_vadvise 72
-#define SYS_munmap 73
-#define SYS_mprotect 74
-#define SYS_madvise 75
-#define SYS_vhangup 76
- /* 77 is old: vlimit */
-#endif
-
-#ifdef __svr4__
-#define SYS_rfsys 78
-#define SYS_rmdir 79
-#define SYS_mkdir 80
-#define SYS_getdents 81
- /* 82 not used, was libattach */
- /* 83 not used, was libdetach */
-#define SYS_sysfs 84
-#define SYS_getmsg 85
-#define SYS_putmsg 86
-#define SYS_poll 87
-#define SYS_lstat 88
-#define SYS_symlink 89
-#define SYS_readlink 90
-#define SYS_setgroups 91
-#define SYS_getgroups 92
-#define SYS_fchmod 93
-#define SYS_fchown 94
-#define SYS_sigprocmask 95
-#define SYS_sigsuspend 96
-#define SYS_sigaltstack 97
-#define SYS_sigaction 98
-#define SYS_sigpending 99
-#define SYS_context 100
-#define SYS_evsys 101
-#define SYS_evtrapret 102
-#define SYS_statvfs 103
-#define SYS_fstatvfs 104
- /* 105 reserved */
-#define SYS_nfssys 106
-#define SYS_waitsys 107
-#define SYS_sigsendsys 108
-#define SYS_hrtsys 109
-#define SYS_acancel 110
-#define SYS_async 111
-#define SYS_priocntlsys 112
-#define SYS_pathconf 113
-#define SYS_mincore 114
-#define SYS_mmap 115
-#define SYS_mprotect 116
-#define SYS_munmap 117
-#define SYS_fpathconf 118
-#define SYS_vfork 119
-#define SYS_fchdir 120
-#define SYS_readv 121
-#define SYS_writev 122
-#define SYS_xstat 123
-#define SYS_lxstat 124
-#define SYS_fxstat 125
-#define SYS_xmknod 126
-#define SYS_clocal 127
-#define SYS_setrlimit 128
-#define SYS_getrlimit 129
-#define SYS_lchown 130
-#define SYS_memcntl 131
-#define SYS_getpmsg 132
-#define SYS_putpmsg 133
-#define SYS_rename 134
-#define SYS_uname 135
-#define SYS_setegid 136
-#define SYS_sysconfig 137
-#define SYS_adjtime 138
-#define SYS_systeminfo 139
-#define SYS_seteuid 141
-#define SYS_vtrace 142
-#define SYS_fork1 143
-#define SYS_sigwait 144
-#define SYS_lwp_info 145
-#define SYS_yield 146
-#define SYS_lwp_sema_p 147
-#define SYS_lwp_sema_v 148
-#define SYS_modctl 152
-#define SYS_fchroot 153
-#define SYS_utimes 154
-#define SYS_vhangup 155
-#define SYS_gettimeofday 156
-#define SYS_getitimer 157
-#define SYS_setitimer 158
-#define SYS_lwp_create 159
-#define SYS_lwp_exit 160
-#define SYS_lwp_suspend 161
-#define SYS_lwp_continue 162
-#define SYS_lwp_kill 163
-#define SYS_lwp_self 164
-#define SYS_lwp_setprivate 165
-#define SYS_lwp_getprivate 166
-#define SYS_lwp_wait 167
-#define SYS_lwp_mutex_unlock 168
-#define SYS_lwp_mutex_lock 169
-#define SYS_lwp_cond_wait 170
-#define SYS_lwp_cond_signal 171
-#define SYS_lwp_cond_broadcast 172
-#define SYS_pread 173
-#define SYS_pwrite 174
-#define SYS_llseek 175
-#define SYS_inst_sync 176
-#define SYS_auditsys 186
-#else
-#define SYS_mincore 78
-#define SYS_getgroups 79
-#define SYS_setgroups 80
-#define SYS_getpgrp 81
-#define SYS_setpgrp 82
-#define SYS_setitimer 83
- /* 84 is old: wait & wait3 */
-#define SYS_swapon 85
-#define SYS_getitimer 86
-#define SYS_gethostname 87
-#define SYS_sethostname 88
-#define SYS_getdtablesize 89
-#define SYS_dup2 90
-#define SYS_getdopt 91
-#define SYS_fcntl 92
-#define SYS_select 93
-#define SYS_setdopt 94
-#define SYS_fsync 95
-#define SYS_setpriority 96
-#define SYS_socket 97
-#define SYS_connect 98
-#define SYS_accept 99
-#define SYS_getpriority 100
-#define SYS_send 101
-#define SYS_recv 102
- /* 103 was socketaddr */
-#define SYS_bind 104
-#define SYS_setsockopt 105
-#define SYS_listen 106
- /* 107 was vtimes */
-#define SYS_sigvec 108
-#define SYS_sigblock 109
-#define SYS_sigsetmask 110
-#define SYS_sigpause 111
-#define SYS_sigstack 112
-#define SYS_recvmsg 113
-#define SYS_sendmsg 114
-#define SYS_vtrace 115
-#define SYS_gettimeofday 116
-#define SYS_getrusage 117
-#define SYS_getsockopt 118
- /* 119 is old resuba */
-#define SYS_readv 120
-#define SYS_writev 121
-#define SYS_settimeofday 122
-#define SYS_fchown 123
-#define SYS_fchmod 124
-#define SYS_recvfrom 125
-#define SYS_setreuid 126
-#define SYS_setregid 127
-#define SYS_rename 128
-#define SYS_truncate 129
-#define SYS_ftruncate 130
-#define SYS_flock 131
- /* 132 is unused */
-#define SYS_sendto 133
-#define SYS_shutdown 134
-#define SYS_socketpair 135
-#define SYS_mkdir 136
-#define SYS_rmdir 137
-#define SYS_utimes 138
- /* 139 is unused */
-#define SYS_adjtime 140
-#define SYS_getpeername 141
-#define SYS_gethostid 142
- /* 143 is old: sethostid */
-#define SYS_getrlimit 144
-#define SYS_setrlimit 145
-#define SYS_killpg 146
- /* 147 is unused */
- /* 148 is old: setquota */
- /* 149 is old: quota */
-#define SYS_getsockname 150
-#define SYS_getmsg 151
-#define SYS_putmsg 152
-#define SYS_poll 153
- /* 154 is old: nfs_mount */
-#define SYS_nfssvc 155
-#define SYS_getdirentries 156
-#define SYS_statfs 157
-#define SYS_fstatfs 158
-#define SYS_unmount 159
-#define SYS_async_daemon 160
-#define SYS_getfh 161
-#define SYS_getdomainname 162
-#define SYS_setdomainname 163
- /* 164 is old: pcfs_mount */
-#define SYS_quotactl 165
-#define SYS_exportfs 166
-#define SYS_mount 167
-#define SYS_ustat 168
-#define SYS_semsys 169
-#define SYS_msgsys 170
-#define SYS_shmsys 171
-#define SYS_auditsys 172
-#define SYS_rfssys 173
-#define SYS_getdents 174
-#define SYS_setsid 175
-#define SYS_fchdir 176
-#define SYS_fchroot 177
-#define SYS_vpixsys 178
-
-#define SYS_aioread 179
-#define SYS_aiowrite 180
-#define SYS_aiowait 181
-#define SYS_aiocancel 182
-
-#define SYS_sigpending 183
- /* 184 is available */
-#define SYS_setpgid 185
-#define SYS_pathconf 186
-#define SYS_fpathconf 187
-#define SYS_sysconf 188
-
-#define SYS_uname 189
-
-#endif /* ! __svr4__ */
-
-#endif /* _SYSCALL_H_ */
-
-
-
diff --git a/newlib/libc/sys/sparc64/sys/syscallasm.h b/newlib/libc/sys/sparc64/sys/syscallasm.h
deleted file mode 100644
index d882a9e31..000000000
--- a/newlib/libc/sys/sparc64/sys/syscallasm.h
+++ /dev/null
@@ -1,87 +0,0 @@
-#ifndef _SYSCALLASM_H_
-#define _SYSCALLASM_H_
-
-/*
- * This file defines the system calls for SPARC for the assembler.
- * Anything C-ish is not allowed in this file.
- * C files should include syscall.h.
- */
-
-#include <sys/syscall.h>
-
-/* Some macros for writing assember syscall stubs. */
-
-#ifdef __svr4__
-#define TEXT_SECTION .section ".text"
-#define DATA_SECTION .section ".data"
-#define ALIGN(x) .align x
-#define GLOBAL(sym) .global sym
-#define WORD(x) .long x
-#define ASM_SYMBOL(name) name
-#define ASM_PRIVATE_SYMBOL(name) _##name
-#define SYSCALL_TRAP 8
-#else
-#define TEXT_SECTION .text
-#define DATA_SECTION .data
-#define ALIGN(x) .align x
-#define GLOBAL(sym) .global sym
-#define WORD(x) .word x
-#define ASM_SYMBOL(name) _##name
-#define ASM_PRIVATE_SYMBOL(name) name
-#define SYSCALL_TRAP 0
-#endif
-
-#define defsyscall(name, n) \
- TEXT_SECTION ; \
- ALIGN (4) ; \
- GLOBAL (ASM_SYMBOL (name)) ; \
-ASM_SYMBOL (name): \
- mov n,%g1 ; \
- ta %icc,SYSCALL_TRAP ; \
- bcc noerr ; \
- sethi %hi (ASM_PRIVATE_SYMBOL (cerror)),%g1 ; \
- or %g1,%lo (ASM_PRIVATE_SYMBOL (cerror)),%g1 ; \
- jmpl %g1+%g0,%g0 ; \
- nop ; \
-noerr: \
- jmpl %o7+8,%g0 ; \
- nop
-
-/* Support for reentrant syscalls. The "struct _reent *" arg is always the
- the first one. After that we allow up to four additional args. We could
- allow more, but that's all we need for now.
-
- It may seem inefficient to have the reent arg be the first one as it means
- copying all the other args into place (as opposed to making the reent arg
- the last one in which case there wouldn't be any copying). I chose a clean
- design over an extra four instructions in a system call. All other
- reentrant functions use the first arg this way. */
-
-#define defsyscall_r(name, n) \
- TEXT_SECTION ; \
- ALIGN (4) ; \
- GLOBAL (ASM_SYMBOL (name)) ; \
-ASM_SYMBOL (name): \
- mov n,%g1 ; \
- mov %o0,%o5 ; \
- mov %o1,%o0 ; \
- mov %o2,%o1 ; \
- mov %o3,%o2 ; \
- mov %o4,%o3 ; \
- ta %icc,SYSCALL_TRAP ; \
- bcc noerr ; \
- sethi %hi (ASM_PRIVATE_SYMBOL (cerror_r)),%g1 ; \
- or %g1,%lo (ASM_PRIVATE_SYMBOL (cerror_r)),%g1 ; \
- jmpl %g1+%g0,%g0 ; \
- mov %o5,%o1 ; \
-noerr: \
- jmpl %o7+8,%g0 ; \
- nop
-
-#define seterrno() \
- sethi %hi (ASM_PRIVATE_SYMBOL (cerror)),%g1 ; \
- or %g1,%lo (ASM_PRIVATE_SYMBOL (cerror)),%g1 ; \
- jmpl %g1+%g0,%g0 ; \
- nop
-
-#endif /* _SYSCALLASM_H_ */
diff --git a/newlib/libc/sys/sparc64/sys/termios.h b/newlib/libc/sys/sparc64/sys/termios.h
deleted file mode 100644
index ffdeb9bb2..000000000
--- a/newlib/libc/sys/sparc64/sys/termios.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* FIXME: From sys/sysvi386/sys */
-#ifndef _SYS_TERMIOS_H
-# define _SYS_TERMIOS_H
-
-# define _XCGETA (('x'<<8)|1)
-# define _XCSETA (('x'<<8)|2)
-# define _XCSETAW (('x'<<8)|3)
-# define _XCSETAF (('x'<<8)|4)
-# define _TCSBRK (('T'<<8)|5)
-# define _TCFLSH (('T'<<8)|7)
-# define _TCXONC (('T'<<8)|6)
-
-# define TCOOFF 0
-# define TCOON 1
-# define TCIOFF 2
-# define TCION 3
-
-# define TCIFLUSH 0
-# define TCOFLUSH 1
-# define TCIOFLUSH 2
-
-# define NCCS 13
-
-# define TCSAFLUSH _XCSETAF
-# define TCSANOW _XCSETA
-# define TCSADRAIN _XCSETAW
-# define TCSADFLUSH _XCSETAF
-
-# define IGNBRK 000001
-# define BRKINT 000002
-# define IGNPAR 000004
-# define INPCK 000020
-# define ISTRIP 000040
-# define INLCR 000100
-# define IGNCR 000200
-# define ICRNL 000400
-# define IXON 002000
-# define IXOFF 010000
-
-# define OPOST 000001
-# define OCRNL 000004
-# define ONLCR 000010
-# define ONOCR 000020
-# define TAB3 014000
-
-# define CLOCAL 004000
-# define CREAD 000200
-# define CSIZE 000060
-# define CS5 0
-# define CS6 020
-# define CS7 040
-# define CS8 060
-# define CSTOPB 000100
-# define HUPCL 002000
-# define PARENB 000400
-# define PAODD 001000
-
-# define ECHO 0000010
-# define ECHOE 0000020
-# define ECHOK 0000040
-# define ECHONL 0000100
-# define ICANON 0000002
-# define IEXTEN 0000400 /* anybody know *what* this does?! */
-# define ISIG 0000001
-# define NOFLSH 0000200
-# define TOSTOP 0001000
-
-# define VEOF 4 /* also VMIN -- thanks, AT&T */
-# define VEOL 5 /* also VTIME -- thanks again */
-# define VERASE 2
-# define VINTR 0
-# define VKILL 3
-# define VMIN 4 /* also VEOF */
-# define VQUIT 1
-# define VSUSP 10
-# define VTIME 5 /* also VEOL */
-# define VSTART 11
-# define VSTOP 12
-
-# define B0 000000
-# define B50 000001
-# define B75 000002
-# define B110 000003
-# define B134 000004
-# define B150 000005
-# define B200 000006
-# define B300 000007
-# define B600 000010
-# define B1200 000011
-# define B1800 000012
-# define B2400 000013
-# define B4800 000014
-# define B9600 000015
-# define B19200 000016
-# define B38400 000017
-
-typedef unsigned char cc_t;
-typedef unsigned short tcflag_t;
-typedef char speed_t;
-
-struct termios {
- tcflag_t c_iflag;
- tcflag_t c_oflag;
- tcflag_t c_cflag;
- tcflag_t c_lflag;
- char c_line;
- cc_t c_cc[NCCS];
- speed_t c_ispeed;
- speed_t c_ospeed;
-};
-
-# ifndef _NO_MACROS
-
-# define cfgetospeed(tp) ((tp)->c_ospeed)
-# define cfgetispeed(tp) ((tp)->c_ispeed)
-# define cfsetospeed(tp,s) (((tp)->c_ospeed = (s)), 0)
-# define cfsetispeed(tp,s) (((tp)->c_ispeed = (s)), 0)
-# define tcdrain(fd) _ioctl (fd, _TCSBRK, 1)
-# endif /* _NO_MACROS */
-
-#endif /* _SYS_TERMIOS_H */
-
diff --git a/newlib/libc/sys/sparc64/sys/time.h b/newlib/libc/sys/sparc64/sys/time.h
deleted file mode 100644
index 36f8e1c11..000000000
--- a/newlib/libc/sys/sparc64/sys/time.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _SYS_TIME_H
-#define _SYS_TIME_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct timeval {
- long tv_sec;
- long tv_usec;
-};
-
-typedef struct timestruc {
- time_t tv_sec;
- long tv_nsec;
-} timestruc_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SYS_TIME_H */
diff --git a/newlib/libc/sys/sparc64/sys/utime.h b/newlib/libc/sys/sparc64/sys/utime.h
deleted file mode 100644
index e2a55faff..000000000
--- a/newlib/libc/sys/sparc64/sys/utime.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* FIXME: From sys/sysvi386/sys */
-#ifndef _SYS_UTIME_H
-# define _SYS_UTIME_H
-
-#include <time.h>
-
-struct utimbuf {
- time_t actime;
- time_t modtime;
-};
-
-#endif /* _SYS_UTIME_H */
-
diff --git a/newlib/libc/sys/sparc64/sys/utmp.h b/newlib/libc/sys/sparc64/sys/utmp.h
deleted file mode 100644
index f519e6af0..000000000
--- a/newlib/libc/sys/sparc64/sys/utmp.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef _UTMP_H
-# define _UTMP_H
-
-#include <sys/types.h>
-
-# define UTMP_FILE "/etc/utmp"
-# define WTMP_FILE "/etc/wtmp"
-
-struct utmp {
- char ut_user[8]; /* how limited */
- char ut_id[4]; /* ditto */
- char ut_line[12]; /* I'm repeating myself */
- short ut_pid;
- short ut_type;
- struct exit_status {
- short e_termination;
- short e_exit;
- } ut_exit; /* for DEAD_PROCESS processes */
- time_t ut_time;
-};
-
-/* Definitions for ut_type fields */
-
-# define EMPTY 0
-# define RUN_LVL 1
-# define BOOT_TIME 2
-# define OLD_TIME 3
-# define NEW_TIME 4
-# define INIT_PROCESS 5
-# define LOGIN_PROCESS 6
-# define USER_PROCESS 7
-# define DEAD_PROCESS 8
-# define ACCOUNTING 9
-# define UTMAXTYPE ACCOUNTING
-
-# define RUNLVL_MSG "run-level %c"
-# define BOOT_MSG "system boot"
-# define OTIME_MSG "old time"
-# define NTIME_MSG "new time"
-
-#endif /* _UTMP_H */
-
-
diff --git a/newlib/libc/sys/sparc64/sys/wait.h b/newlib/libc/sys/sparc64/sys/wait.h
deleted file mode 100644
index 08b756aab..000000000
--- a/newlib/libc/sys/sparc64/sys/wait.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* FIXME: From sys/sysvi386/sys */
-#ifndef _WAIT_H
-# define _WAIT_H
-
-# define WNOHANG 1
-# define WUNTRACED 2
-
-/*
- * Unlike the atrocity that BSD ended up using, we do not have a "union
- * wait," although I could probably implement one. Given the code I
- * sometimes end up porting, it might be a good thing. Anyway, the
- * format of a stat thingy, filled in by the wait*() routines, is:
- * struct {
- * int filler:16;
- * union {
- * struct stopped {
- * int signo:8;
- * int o177:8; // will be 0177
- * };
- * struct exited {
- * int retval:8;
- * int zero:8; // 0, obviously 8-)
- * };
- * struct termed {
- * int zero:8; // zeroes
- * int corep:1; // was there a core file?
- * int signo:7; // what?! Only 127 signals?!
- * };
- * int value:16;
- * };
- * };
- *
- * Braver souls than I can turn that into a union wait, if desired. Ick.
- */
-
-# define WIFEXITED(val) ((val)&0xff)
-# define WEXITSTATUS(val) (((val)>>8)&0xff)
-# define WIFSIGNALED(val) ((val) && !((val)&0xff))
-# define WTERMSIG(val) (((val)>>8)&0x7f)
-# define WIFSTOPPED(val) (((val)&0xff)==0177)
-# define WSTOPSIG(val) (((val)>>8)&0xff)
-#endif /* _SYS_WAIT_H */
-
diff --git a/newlib/libc/sys/sparc64/telldir.c b/newlib/libc/sys/sparc64/telldir.c
deleted file mode 100644
index 37d9de638..000000000
--- a/newlib/libc/sys/sparc64/telldir.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)telldir.c 5.9 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-/*
- * The option SINGLEUSE may be defined to say that a telldir
- * cookie may be used only once before it is freed. This option
- * is used to avoid having memory usage grow without bound.
- */
-#define SINGLEUSE
-
-/*
- * One of these structures is malloced to describe the current directory
- * position each time telldir is called. It records the current magic
- * cookie returned by getdirentries and the offset within the buffer
- * associated with that return value.
- */
-struct ddloc {
- struct ddloc *loc_next;/* next structure in list */
- long loc_index; /* key associated with structure */
- long loc_seek; /* magic cookie returned by getdirentries */
- long loc_loc; /* offset of entry in buffer */
-};
-
-#define NDIRHASH 32 /* Num of hash lists, must be a power of 2 */
-#define LOCHASH(i) ((i)&(NDIRHASH-1))
-
-static long dd_loccnt; /* Index of entry for sequential readdir's */
-static struct ddloc *dd_hash[NDIRHASH]; /* Hash list heads for ddlocs */
-
-/*
- * return a pointer into a directory
- */
-long
-telldir(dirp)
- const DIR *dirp;
-{
- register int index;
- register struct ddloc *lp;
-
- if ((lp = (struct ddloc *)malloc(sizeof(struct ddloc))) == NULL)
- return (-1);
- index = dd_loccnt++;
- lp->loc_index = index;
- lp->loc_seek = dirp->dd_seek;
- lp->loc_loc = dirp->dd_loc;
- lp->loc_next = dd_hash[LOCHASH(index)];
- dd_hash[LOCHASH(index)] = lp;
- return (index);
-}
-
-/*
- * seek to an entry in a directory.
- * Only values returned by "telldir" should be passed to seekdir.
- */
-void
-_seekdir(dirp, loc)
- register DIR *dirp;
- long loc;
-{
- register struct ddloc *lp;
- register struct ddloc **prevlp;
- struct dirent *dp;
- extern long lseek();
-
- prevlp = &dd_hash[LOCHASH(loc)];
- lp = *prevlp;
- while (lp != NULL) {
- if (lp->loc_index == loc)
- break;
- prevlp = &lp->loc_next;
- lp = lp->loc_next;
- }
- if (lp == NULL)
- return;
- if (lp->loc_loc == dirp->dd_loc && lp->loc_seek == dirp->dd_seek)
- goto found;
- (void) lseek(dirp->dd_fd, lp->loc_seek, 0);
- dirp->dd_seek = lp->loc_seek;
- dirp->dd_loc = 0;
- while (dirp->dd_loc < lp->loc_loc) {
- dp = readdir(dirp);
- if (dp == NULL)
- break;
- }
-found:
-#ifdef SINGLEUSE
- *prevlp = lp->loc_next;
- free((caddr_t)lp);
-#endif
-}
diff --git a/newlib/libc/sys/sparc64/template.S b/newlib/libc/sys/sparc64/template.S
deleted file mode 100644
index 53d8e778a..000000000
--- a/newlib/libc/sys/sparc64/template.S
+++ /dev/null
@@ -1,14 +0,0 @@
-/* system call template */
-
-/* Lots of system calls are trivial functions, so we build their source files
- from a template. New syscalls can be added simply by editing the
- Makefile!
-
- Usage: Compile this file with "func" set to the name of the syscall. */
-
-#include "sys/syscallasm.h"
-
-#define concat(a,b) a##b
-#define makesys(a) concat (SYS_, a)
-
- defsyscall (func, makesys(func))
diff --git a/newlib/libc/sys/sparc64/template_r.S b/newlib/libc/sys/sparc64/template_r.S
deleted file mode 100644
index 8eaa4fc63..000000000
--- a/newlib/libc/sys/sparc64/template_r.S
+++ /dev/null
@@ -1,26 +0,0 @@
-/* reentrant system call template */
-
-/* Lots of system calls are trivial functions, so we build their source files
- from a template. New syscalls can be added simply by editing the
- Makefile!
-
- The system calls aren't necessarily reentrant. If we were being used in
- an embedded system they could be. Reentrant syscalls are also used,
- however, to provide ANSI C namespace clean access to the host o/s.
-
- Usage: Compile this file with "func" set to the name of the syscall. */
-
-#include "sys/syscallasm.h"
-
-#define concat(a,b) a##b
-#define concat3(a,b,c) a##b##c
-#define makesys(a) concat (SYS_, a)
-#define make_r_fn(a) concat3 (_, a, _r)
-
-/* The leading _'s get turned into #'s by the Makefile. */
-
-_ifdef REENT
- defsyscall_r (make_r_fn (func), makesys (func))
-_else
- defsyscall (func, makesys (func))
-_endif
diff --git a/newlib/libc/sys/sparc64/utime.S b/newlib/libc/sys/sparc64/utime.S
deleted file mode 100644
index c5729cca3..000000000
--- a/newlib/libc/sys/sparc64/utime.S
+++ /dev/null
@@ -1,10 +0,0 @@
-/* utime() system call */
-/* svr4 only, sunos4 version calls utimes */
-
-#ifdef __svr4__
-
-#include "sys/syscallasm.h"
-
- defsyscall (utime, SYS_utime)
-
-#endif
diff --git a/newlib/libc/sys/sparc64/utime2.c b/newlib/libc/sys/sparc64/utime2.c
deleted file mode 100644
index 5f01e3b2b..000000000
--- a/newlib/libc/sys/sparc64/utime2.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* utime() system call for sunos4 */
-
-#ifndef __svr4__
-
-#include <time.h>
-#include <sys/time.h>
-#include <utime.h>
-
-int
-utime (char *path, struct utimbuf *times)
-{
- if (times != NULL)
- {
- struct timeval timevals[2];
-
- timevals[0].tv_sec = (long int) times->actime;
- timevals[0].tv_usec = 0;
- timevals[1].tv_sec = (long int) times->modtime;
- timevals[1].tv_usec = 0;
- return utimes (path, timevals);
- }
-
- return utimes (path, (struct timeval *) 0);
-}
-
-#endif
diff --git a/newlib/libc/sys/sparc64/wait.S b/newlib/libc/sys/sparc64/wait.S
deleted file mode 100644
index 49ab5e939..000000000
--- a/newlib/libc/sys/sparc64/wait.S
+++ /dev/null
@@ -1,35 +0,0 @@
-! wait() "system" call
-! It is really not a system call as it uses wait4().
-
-#include "sys/syscallasm.h"
-
- TEXT_SECTION
- ALIGN (4)
-
-#ifdef REENT
-
- GLOBAL (ASM_SYMBOL (_wait_r))
-ASM_SYMBOL (_wait_r):
- save %sp,-136,%sp
- clr %o1
- mov %i1,%o2
- clr %o3
- call ASM_SYMBOL (_wait4_r)
- clr %o4
- jmpl %i7+8,%g0
- restore %g0,%o0,%o0
-
-#else /* ! REENT */
-
- GLOBAL (ASM_SYMBOL (wait))
-ASM_SYMBOL (wait):
- save %sp,-136,%sp
- clr %o0
- mov %i0,%o1
- clr %o2
- call ASM_SYMBOL (wait4)
- clr %o3
- jmpl %i7+8,%g0
- restore %g0,%o0,%o0
-
-#endif /* ! REENT */
diff --git a/newlib/libc/sys/sun4/Makefile.am b/newlib/libc/sys/sun4/Makefile.am
deleted file mode 100644
index 911008641..000000000
--- a/newlib/libc/sys/sun4/Makefile.am
+++ /dev/null
@@ -1,95 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-COPYOFILES = \
- Ovfork.o \
- _exit.o \
- _sigvec.o \
- abort.o \
- access.o \
- cerror.o \
- chmod.o \
- chown.o \
- close.o \
- creat.o \
- dup.o \
- dup2.o \
- errlst.o \
- execl.o \
- execle.o \
- execv.o \
- execve.o \
- execvp.o \
- fork.o \
- fstat.o \
- getdtablesize.o \
- getpid.o \
- getrusage.o \
- gettimeofday.o \
- ieee_globals.o \
- ioctl.o \
- isatty.o \
- kill.o \
- link.o \
- lseek.o \
- open.o \
- pipe.o \
- popen.o \
- read.o \
- sbrk.o \
- setitimer.o \
- sigblock.o \
- signal.o \
- sigpause.o \
- sigsetjmp.o \
- sigsetmask.o \
- sigtramp.o \
- sigvec.o \
- sleep.o \
- start_float.o \
- stat.o \
- time.o \
- times.o \
- umask.o \
- unlink.o \
- utime.o \
- utimes.o \
- wait.o \
- wait3.o \
- wait4.o \
- write.o \
- rem.o \
- multiply.o \
- umultiply.o
-
-# These files are from Sun's libc.a, but the must be renamed because they
-# conflict with other library .o's. They are renamed to xxxS.o.
-COPYRENAMEOFILES = divS.o
-
-COPYOMFILES = ieee_flags.o
-
-lib_a_SOURCES = _main.c ieee.c
-lib_a_LIBADD = $(COPYOFILES) $(COPYOMFILES) $(COPYRENAMEOFILES)
-
-$(COPYOFILES):
- $(AR) x /lib/libc.a $(COPYOFILES)
-
-$(COPYRENAMEOFILES):
- $(AR) x /lib/libc.a $(COPYRENAMEFILES:S.o=.o)
- for f in $(COPYRENAMEOFILES); do mv `basename $$f S.o`.o $$f; done
-
-$(COPYOMFILES):
- $(AR) x /lib/libm.a $(COPYOMFILES)
-
-all: crt0.o
-
-crt0.o:
- cp /lib/crt0.o crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/sun4/Makefile.in b/newlib/libc/sys/sun4/Makefile.in
deleted file mode 100644
index 557de68b0..000000000
--- a/newlib/libc/sys/sun4/Makefile.in
+++ /dev/null
@@ -1,360 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-COPYOFILES = Ovfork.o _exit.o _sigvec.o abort.o access.o cerror.o chmod.o chown.o close.o creat.o dup.o dup2.o errlst.o execl.o execle.o execv.o execve.o execvp.o fork.o fstat.o getdtablesize.o getpid.o getrusage.o gettimeofday.o ieee_globals.o ioctl.o isatty.o kill.o link.o lseek.o open.o pipe.o popen.o read.o sbrk.o setitimer.o sigblock.o signal.o sigpause.o sigsetjmp.o sigsetmask.o sigtramp.o sigvec.o sleep.o start_float.o stat.o time.o times.o umask.o unlink.o utime.o utimes.o wait.o wait3.o wait4.o write.o rem.o multiply.o umultiply.o
-
-
-# These files are from Sun's libc.a, but the must be renamed because they
-# conflict with other library .o's. They are renamed to xxxS.o.
-COPYRENAMEOFILES = divS.o
-
-COPYOMFILES = ieee_flags.o
-
-lib_a_SOURCES = _main.c ieee.c
-lib_a_LIBADD = $(COPYOFILES) $(COPYOMFILES) $(COPYRENAMEOFILES)
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_DEPENDENCIES = Ovfork.o _exit.o _sigvec.o abort.o access.o \
-cerror.o chmod.o chown.o close.o creat.o dup.o dup2.o errlst.o execl.o \
-execle.o execv.o execve.o execvp.o fork.o fstat.o getdtablesize.o \
-getpid.o getrusage.o gettimeofday.o ieee_globals.o ioctl.o isatty.o \
-kill.o link.o lseek.o open.o pipe.o popen.o read.o sbrk.o setitimer.o \
-sigblock.o signal.o sigpause.o sigsetjmp.o sigsetmask.o sigtramp.o \
-sigvec.o sleep.o start_float.o stat.o time.o times.o umask.o unlink.o \
-utime.o utimes.o wait.o wait3.o wait4.o write.o rem.o multiply.o \
-umultiply.o ieee_flags.o divS.o
-lib_a_OBJECTS = _main.o ieee.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-$(COPYOFILES):
- $(AR) x /lib/libc.a $(COPYOFILES)
-
-$(COPYRENAMEOFILES):
- $(AR) x /lib/libc.a $(COPYRENAMEFILES:S.o=.o)
- for f in $(COPYRENAMEOFILES); do mv `basename $$f S.o`.o $$f; done
-
-$(COPYOMFILES):
- $(AR) x /lib/libm.a $(COPYOMFILES)
-
-all: crt0.o
-
-crt0.o:
- cp /lib/crt0.o crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/sun4/_main.c b/newlib/libc/sys/sun4/_main.c
deleted file mode 100644
index 64878088d..000000000
--- a/newlib/libc/sys/sun4/_main.c
+++ /dev/null
@@ -1,6 +0,0 @@
-
-__main()
-{
-
-
-}
diff --git a/newlib/libc/sys/sun4/aclocal.m4 b/newlib/libc/sys/sun4/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/sun4/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/sun4/configure b/newlib/libc/sys/sun4/configure
deleted file mode 100755
index 182785c45..000000000
--- a/newlib/libc/sys/sun4/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=ieee.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/sun4/configure.in b/newlib/libc/sys/sun4/configure.in
deleted file mode 100644
index b16aed354..000000000
--- a/newlib/libc/sys/sun4/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/sun4 configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(ieee.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/sun4/ieee.c b/newlib/libc/sys/sun4/ieee.c
deleted file mode 100644
index 28289761d..000000000
--- a/newlib/libc/sys/sun4/ieee.c
+++ /dev/null
@@ -1,115 +0,0 @@
-
-#include <ieeefp.h>
-
-
-fp_rnd
-_DEFUN_VOID(fpgetround)
-{
- char *out;
- ieee_flags("get", "direction","", &out);
- if (strcmp(out,"nearest") == 0) return FP_RN;
- if (strcmp(out,"negative") == 0) return FP_RM;
- if (strcmp(out,"positive") == 0) return FP_RP;
- if (strcmp(out,"tozero") == 0) return FP_RZ;
- abort();
-
-}
-
-fp_rnd
-_DEFUN(fpsetround,(new),
- fp_rnd new)
-{
- fp_rnd old = fpgetround();
- char *dummy;
-
- switch (new)
- {
- case FP_RN:
- ieee_flags("set", "direction", "nearest", &dummy);
- break;
- case FP_RM:
- ieee_flags("set", "direction", "negative", &dummy);
- break;
- case FP_RP:
- ieee_flags("set", "direction", "positive", &dummy);
- break;
- case FP_RZ:
- ieee_flags("set", "direction", "tozero", &dummy);
- break;
- default:
- break;
- }
- return old;
-}
-
-
-fp_except
-_DEFUN_VOID(fpgetmask)
-{
- char *out;
- int r = 0;
-
- int i = ieee_flags("get","exception","",&out);
- if (i & 1) r |= FP_X_IMP;
- if (i & 2) r |= FP_X_DX;
- if (i & 4) r |= FP_X_UFL;
- if (i & 8) r |= FP_X_OFL;
- if (i & 16) r |= FP_X_INV;
- return r;
-
-}
-
-fp_except
-_DEFUN(fpsetmask,(mask),
- fp_except mask)
-{
- fp_except old = fpgetmask();
-
- char *out;
- ieee_flags("clear","exception", "all", &out);
-
-
- if (mask & FP_X_IMP)
- ieee_flags("set","exception","inexact", &out);
- if (mask & FP_X_DX)
- ieee_flags("set","exception","division", &out);
- if (mask & FP_X_UFL)
- ieee_flags("set","exception","underflow", &out);
- if (mask & FP_X_OFL)
- ieee_flags("set","exception","overflow", &out);
- if (mask & FP_X_INV)
- ieee_flags("set","exception","invalid", &out);
-
- return old;
-
-}
-
-fp_except
-_DEFUN(fpsetsticky,(mask),
- fp_except mask)
-{
- return fpsetmask(mask);
-}
-
-fp_except
-_DEFUN_VOID(fpgetsticky)
-{
- return fpgetmask();
-}
-
-int
-_DEFUN(fpsetroundtoi,(rdi_mode),
- fp_rdi rdi_mode)
-{
-
- return 0;
-
-}
-
-int
-_DEFUN_VOID(fpgetroundtoi)
-{
-
- return 0;
-
-}
diff --git a/newlib/libc/sys/sun4/sys/dirent.h b/newlib/libc/sys/sun4/sys/dirent.h
deleted file mode 100644
index b7ca90b0d..000000000
--- a/newlib/libc/sys/sun4/sys/dirent.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* FIXME: From sys/sysvi386/sys */
-#ifndef _SYS_DIRENT_H
-# define _SYS_DIRENT_H
-
-/*
- * This file was written to be compatible with the BSD directory
- * routines, so it looks like it. But it was written from scratch.
- * Sean Eric Fagan, sef@Kithrup.COM
- *
- * Modified by dje@cygnus.com for sun.
- */
-
-typedef struct __dirdesc {
- int dd_fd;
- long dd_loc;
- long dd_size;
- long dd_bsize;
- long dd_off;
- char *dd_buf;
-} DIR;
-
-# define __dirfd(dp) ((dp)->dd_fd)
-
-DIR *opendir (const char *);
-struct dirent *readdir (DIR *);
-void rewinddir (DIR *);
-int closedir (DIR *);
-
-#include <sys/types.h>
-
-#define MAXNAMLEN 255
-
-#define d_ino d_fileno /* compatibility */
-
-struct dirent {
- off_t d_off;
- unsigned long d_fileno;
- unsigned short d_reclen;
- unsigned short d_namlen;
- char d_name[MAXNAMLEN + 1];
-};
-
-/* FIXME: include definition of DIRSIZ() ? */
-
-#endif
diff --git a/newlib/libc/sys/sun4/sys/file.h b/newlib/libc/sys/sun4/sys/file.h
deleted file mode 100644
index 94d65c1df..000000000
--- a/newlib/libc/sys/sun4/sys/file.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* FIXME: really fcntl.h */
-
-#include <sys/fcntl.h>
diff --git a/newlib/libc/sys/sun4/sys/termios.h b/newlib/libc/sys/sun4/sys/termios.h
deleted file mode 100644
index ffdeb9bb2..000000000
--- a/newlib/libc/sys/sun4/sys/termios.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* FIXME: From sys/sysvi386/sys */
-#ifndef _SYS_TERMIOS_H
-# define _SYS_TERMIOS_H
-
-# define _XCGETA (('x'<<8)|1)
-# define _XCSETA (('x'<<8)|2)
-# define _XCSETAW (('x'<<8)|3)
-# define _XCSETAF (('x'<<8)|4)
-# define _TCSBRK (('T'<<8)|5)
-# define _TCFLSH (('T'<<8)|7)
-# define _TCXONC (('T'<<8)|6)
-
-# define TCOOFF 0
-# define TCOON 1
-# define TCIOFF 2
-# define TCION 3
-
-# define TCIFLUSH 0
-# define TCOFLUSH 1
-# define TCIOFLUSH 2
-
-# define NCCS 13
-
-# define TCSAFLUSH _XCSETAF
-# define TCSANOW _XCSETA
-# define TCSADRAIN _XCSETAW
-# define TCSADFLUSH _XCSETAF
-
-# define IGNBRK 000001
-# define BRKINT 000002
-# define IGNPAR 000004
-# define INPCK 000020
-# define ISTRIP 000040
-# define INLCR 000100
-# define IGNCR 000200
-# define ICRNL 000400
-# define IXON 002000
-# define IXOFF 010000
-
-# define OPOST 000001
-# define OCRNL 000004
-# define ONLCR 000010
-# define ONOCR 000020
-# define TAB3 014000
-
-# define CLOCAL 004000
-# define CREAD 000200
-# define CSIZE 000060
-# define CS5 0
-# define CS6 020
-# define CS7 040
-# define CS8 060
-# define CSTOPB 000100
-# define HUPCL 002000
-# define PARENB 000400
-# define PAODD 001000
-
-# define ECHO 0000010
-# define ECHOE 0000020
-# define ECHOK 0000040
-# define ECHONL 0000100
-# define ICANON 0000002
-# define IEXTEN 0000400 /* anybody know *what* this does?! */
-# define ISIG 0000001
-# define NOFLSH 0000200
-# define TOSTOP 0001000
-
-# define VEOF 4 /* also VMIN -- thanks, AT&T */
-# define VEOL 5 /* also VTIME -- thanks again */
-# define VERASE 2
-# define VINTR 0
-# define VKILL 3
-# define VMIN 4 /* also VEOF */
-# define VQUIT 1
-# define VSUSP 10
-# define VTIME 5 /* also VEOL */
-# define VSTART 11
-# define VSTOP 12
-
-# define B0 000000
-# define B50 000001
-# define B75 000002
-# define B110 000003
-# define B134 000004
-# define B150 000005
-# define B200 000006
-# define B300 000007
-# define B600 000010
-# define B1200 000011
-# define B1800 000012
-# define B2400 000013
-# define B4800 000014
-# define B9600 000015
-# define B19200 000016
-# define B38400 000017
-
-typedef unsigned char cc_t;
-typedef unsigned short tcflag_t;
-typedef char speed_t;
-
-struct termios {
- tcflag_t c_iflag;
- tcflag_t c_oflag;
- tcflag_t c_cflag;
- tcflag_t c_lflag;
- char c_line;
- cc_t c_cc[NCCS];
- speed_t c_ispeed;
- speed_t c_ospeed;
-};
-
-# ifndef _NO_MACROS
-
-# define cfgetospeed(tp) ((tp)->c_ospeed)
-# define cfgetispeed(tp) ((tp)->c_ispeed)
-# define cfsetospeed(tp,s) (((tp)->c_ospeed = (s)), 0)
-# define cfsetispeed(tp,s) (((tp)->c_ispeed = (s)), 0)
-# define tcdrain(fd) _ioctl (fd, _TCSBRK, 1)
-# endif /* _NO_MACROS */
-
-#endif /* _SYS_TERMIOS_H */
-
diff --git a/newlib/libc/sys/sun4/sys/utime.h b/newlib/libc/sys/sun4/sys/utime.h
deleted file mode 100644
index e2a55faff..000000000
--- a/newlib/libc/sys/sun4/sys/utime.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* FIXME: From sys/sysvi386/sys */
-#ifndef _SYS_UTIME_H
-# define _SYS_UTIME_H
-
-#include <time.h>
-
-struct utimbuf {
- time_t actime;
- time_t modtime;
-};
-
-#endif /* _SYS_UTIME_H */
-
diff --git a/newlib/libc/sys/sun4/sys/utmp.h b/newlib/libc/sys/sun4/sys/utmp.h
deleted file mode 100644
index f519e6af0..000000000
--- a/newlib/libc/sys/sun4/sys/utmp.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef _UTMP_H
-# define _UTMP_H
-
-#include <sys/types.h>
-
-# define UTMP_FILE "/etc/utmp"
-# define WTMP_FILE "/etc/wtmp"
-
-struct utmp {
- char ut_user[8]; /* how limited */
- char ut_id[4]; /* ditto */
- char ut_line[12]; /* I'm repeating myself */
- short ut_pid;
- short ut_type;
- struct exit_status {
- short e_termination;
- short e_exit;
- } ut_exit; /* for DEAD_PROCESS processes */
- time_t ut_time;
-};
-
-/* Definitions for ut_type fields */
-
-# define EMPTY 0
-# define RUN_LVL 1
-# define BOOT_TIME 2
-# define OLD_TIME 3
-# define NEW_TIME 4
-# define INIT_PROCESS 5
-# define LOGIN_PROCESS 6
-# define USER_PROCESS 7
-# define DEAD_PROCESS 8
-# define ACCOUNTING 9
-# define UTMAXTYPE ACCOUNTING
-
-# define RUNLVL_MSG "run-level %c"
-# define BOOT_MSG "system boot"
-# define OTIME_MSG "old time"
-# define NTIME_MSG "new time"
-
-#endif /* _UTMP_H */
-
-
diff --git a/newlib/libc/sys/sun4/sys/wait.h b/newlib/libc/sys/sun4/sys/wait.h
deleted file mode 100644
index 08b756aab..000000000
--- a/newlib/libc/sys/sun4/sys/wait.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* FIXME: From sys/sysvi386/sys */
-#ifndef _WAIT_H
-# define _WAIT_H
-
-# define WNOHANG 1
-# define WUNTRACED 2
-
-/*
- * Unlike the atrocity that BSD ended up using, we do not have a "union
- * wait," although I could probably implement one. Given the code I
- * sometimes end up porting, it might be a good thing. Anyway, the
- * format of a stat thingy, filled in by the wait*() routines, is:
- * struct {
- * int filler:16;
- * union {
- * struct stopped {
- * int signo:8;
- * int o177:8; // will be 0177
- * };
- * struct exited {
- * int retval:8;
- * int zero:8; // 0, obviously 8-)
- * };
- * struct termed {
- * int zero:8; // zeroes
- * int corep:1; // was there a core file?
- * int signo:7; // what?! Only 127 signals?!
- * };
- * int value:16;
- * };
- * };
- *
- * Braver souls than I can turn that into a union wait, if desired. Ick.
- */
-
-# define WIFEXITED(val) ((val)&0xff)
-# define WEXITSTATUS(val) (((val)>>8)&0xff)
-# define WIFSIGNALED(val) ((val) && !((val)&0xff))
-# define WTERMSIG(val) (((val)>>8)&0x7f)
-# define WIFSTOPPED(val) (((val)&0xff)==0177)
-# define WSTOPSIG(val) (((val)>>8)&0xff)
-#endif /* _SYS_WAIT_H */
-
diff --git a/newlib/libc/sys/sysmec/Makefile.am b/newlib/libc/sys/sysmec/Makefile.am
deleted file mode 100644
index fdaa7f649..000000000
--- a/newlib/libc/sys/sysmec/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = _exit.c access.c chmod.c chown.c close.c creat.c crt1.c \
- execv.c execve.c fork.c fstat.c getpid.c isatty.c \
- kill.c lseek.c open.c pipe.c read.c \
- sbrk.c stat.c time.c trap.S unlink.c utime.c wait.c write.c \
- times.c gettime.c
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/sysmec/Makefile.in b/newlib/libc/sys/sysmec/Makefile.in
deleted file mode 100644
index 45b924a08..000000000
--- a/newlib/libc/sys/sysmec/Makefile.in
+++ /dev/null
@@ -1,333 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = _exit.c access.c chmod.c chown.c close.c creat.c crt1.c execv.c execve.c fork.c fstat.c getpid.c isatty.c kill.c lseek.c open.c pipe.c read.c sbrk.c stat.c time.c trap.S unlink.c utime.c wait.c write.c times.c gettime.c
-
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = _exit.o access.o chmod.o chown.o close.o creat.o crt1.o \
-execv.o execve.o fork.o fstat.o getpid.o isatty.o kill.o lseek.o open.o \
-pipe.o read.o sbrk.o stat.o time.o trap.o unlink.o utime.o wait.o \
-write.o times.o gettime.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/sysmec/_exit.c b/newlib/libc/sys/sysmec/_exit.c
deleted file mode 100644
index bf7e2866b..000000000
--- a/newlib/libc/sys/sysmec/_exit.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-static void _do_dtors()
-{
- /* The loop variable is static so that if a destructor calls exit,
- and we return here, we simply continue with the next destructor. */
- typedef void (*pfunc) ();
- extern pfunc __dtors[];
- extern pfunc __dtors_end[];
- static pfunc *p = __dtors;
-
- while (p < __dtors_end)
- (*p++) ();
-}
-
-
-void _exit (n)
-{
- /* Destructors should be done earlier because they need to be done before the
- files are closed, but here is better than nowhere (and this balances the
- constructors done in crt1.c. */
- _do_dtors();
-
- TRAP0 (SYS_exit, n, 0, 0);
-}
diff --git a/newlib/libc/sys/sysmec/access.c b/newlib/libc/sys/sysmec/access.c
deleted file mode 100644
index 8e08b3a7f..000000000
--- a/newlib/libc/sys/sysmec/access.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* This is file ACCESS.C */
-/*
- * Copyright (C) 1993 DJ Delorie
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms is permitted
- * provided that the above copyright notice and following paragraph are
- * duplicated in all such forms.
- *
- * This file is distributed WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-int access(const char *fn, int flags)
-{
- struct stat s;
- if (stat(fn, &s))
- return -1;
- if (s.st_mode & S_IFDIR)
- return 0;
- if (flags & W_OK)
- {
- if (s.st_mode & S_IWRITE)
- return 0;
- return -1;
- }
- return 0;
-}
-
diff --git a/newlib/libc/sys/sysmec/aclocal.m4 b/newlib/libc/sys/sysmec/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/sysmec/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/sysmec/chmod.c b/newlib/libc/sys/sysmec/chmod.c
deleted file mode 100644
index 181460415..000000000
--- a/newlib/libc/sys/sysmec/chmod.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-int
-chmod (const char *path, mode_t mode)
-{
- return TRAP0 (SYS_chmod, path, mode, 0);
-}
diff --git a/newlib/libc/sys/sysmec/chown.c b/newlib/libc/sys/sysmec/chown.c
deleted file mode 100644
index 5b083f1db..000000000
--- a/newlib/libc/sys/sysmec/chown.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-
-int
-chown (const char *path, short owner, short group)
-{
- return TRAP0 (SYS_chown, path, owner, group);
-}
diff --git a/newlib/libc/sys/sysmec/close.c b/newlib/libc/sys/sysmec/close.c
deleted file mode 100644
index 323c74ac5..000000000
--- a/newlib/libc/sys/sysmec/close.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-int
-_close (int file)
-{
- return TRAP0 (SYS_close, file, 0, 0);
-}
diff --git a/newlib/libc/sys/sysmec/configure b/newlib/libc/sys/sysmec/configure
deleted file mode 100755
index c3fe7f351..000000000
--- a/newlib/libc/sys/sysmec/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=crt1.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/sysmec/configure.in b/newlib/libc/sys/sysmec/configure.in
deleted file mode 100644
index 39673d20c..000000000
--- a/newlib/libc/sys/sysmec/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/sysmec configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(crt1.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/sysmec/creat.c b/newlib/libc/sys/sysmec/creat.c
deleted file mode 100644
index fce9bc31c..000000000
--- a/newlib/libc/sys/sysmec/creat.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-int
-creat (const char *path,
- int mode)
-{
- return TRAP0 (SYS_creat, path, mode, 0);
-}
diff --git a/newlib/libc/sys/sysmec/crt0.S b/newlib/libc/sys/sysmec/crt0.S
deleted file mode 100644
index ca7c88fe6..000000000
--- a/newlib/libc/sys/sysmec/crt0.S
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifdef __mn10300__
- .section .text
- .global _start
-_start:
- mov _stack-8,a0 # Load up the stack pointer
- mov a0,sp
-
- mov _edata,a0 # Get the start/end of bss
- mov _end,a1
-
- cmp a0,a1 # If no bss, then do nothing
- beq .L0
-
- clr d0 # clear d0
-
-.L1:
- movbu d0,(a0) # Clear a byte and bump pointer
- inc a0
- cmp a0,a1
- bne .L1
-
-.L0:
- call ___main,[],0 # Call __main to run ctors/dtors
- clr d0
- clr d1
- mov d0,(4,sp)
- call _main,[],0 # Call main program
- call _exit,[],0 # All done, no need to return or
- # deallocate our stack.
-
- .section ._stack
-_stack: .long 1
-#else
- .section .text
- .global _start
-_start:
- mov _stack-4,a3 # Load up the stack pointer and allocate
- # our current frame.
-
- mov _edata,a0 # Get the start/end of bss
- mov _end,a1
-
- cmp a0,a1 # If no bss, then do nothing
- beqx .L0
-
- sub d0,d0 # clear d0
-
-.L1:
- movb d0,(a0) # Clear a byte and bump pointer
- add 1,a0
- cmp a0,a1
- bnex .L1
-
-.L0:
- jsr ___main
- sub d0,d0
- mov d0,d1
- mov d0,(a3)
- jsr _main # Call main program
- jmp _exit # All done, no need to return or
- # deallocate our stack.
-
- .section ._stack
-_stack: .long 1
-#endif
diff --git a/newlib/libc/sys/sysmec/crt1.c b/newlib/libc/sys/sysmec/crt1.c
deleted file mode 100644
index dd0be3145..000000000
--- a/newlib/libc/sys/sysmec/crt1.c
+++ /dev/null
@@ -1,16 +0,0 @@
-void __main ()
-{
- static int initialized;
- if (! initialized)
- {
- typedef void (*pfunc) ();
- extern pfunc __ctors[];
- extern pfunc __ctors_end[];
- pfunc *p;
-
- initialized = 1;
- for (p = __ctors_end; p > __ctors; )
- (*--p) ();
-
- }
-}
diff --git a/newlib/libc/sys/sysmec/execv.c b/newlib/libc/sys/sysmec/execv.c
deleted file mode 100644
index 6665721c0..000000000
--- a/newlib/libc/sys/sysmec/execv.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-int
-execv (const char *path, char *const argv[])
-{
- return TRAP0 (SYS_execv, path, argv, 0);
-}
diff --git a/newlib/libc/sys/sysmec/execve.c b/newlib/libc/sys/sysmec/execve.c
deleted file mode 100644
index a0d64c233..000000000
--- a/newlib/libc/sys/sysmec/execve.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-int
-_execve (const char *path, char *const argv[], char *const envp[])
-{
- return TRAP0 (SYS_execve, path, argv, envp);
-}
diff --git a/newlib/libc/sys/sysmec/fork.c b/newlib/libc/sys/sysmec/fork.c
deleted file mode 100644
index 1aab32445..000000000
--- a/newlib/libc/sys/sysmec/fork.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-int
-_fork ()
-{
- return TRAP0 (SYS_fork, 0, 0, 0);
-}
diff --git a/newlib/libc/sys/sysmec/fstat.c b/newlib/libc/sys/sysmec/fstat.c
deleted file mode 100644
index 261b1449b..000000000
--- a/newlib/libc/sys/sysmec/fstat.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-int
-_fstat (int file,
- struct stat *st)
-{
- st->st_mode = S_IFCHR;
- st->st_blksize = 4096;
- return 0;
-}
diff --git a/newlib/libc/sys/sysmec/getpid.c b/newlib/libc/sys/sysmec/getpid.c
deleted file mode 100644
index 070382e75..000000000
--- a/newlib/libc/sys/sysmec/getpid.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-_getpid (n)
-{
- return 1;
-}
diff --git a/newlib/libc/sys/sysmec/gettime.c b/newlib/libc/sys/sysmec/gettime.c
deleted file mode 100644
index 69250b12c..000000000
--- a/newlib/libc/sys/sysmec/gettime.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include "sys/time.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-int
-_gettimeofday (struct timeval *tp, void *tzp)
-{
- return TRAP0 (SYS_gettimeofday, tp, tzp, 0);
-}
diff --git a/newlib/libc/sys/sysmec/isatty.c b/newlib/libc/sys/sysmec/isatty.c
deleted file mode 100644
index 3ea99863d..000000000
--- a/newlib/libc/sys/sysmec/isatty.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-isatty (fd)
- int fd;
-{
- return 1;
-}
diff --git a/newlib/libc/sys/sysmec/kill.c b/newlib/libc/sys/sysmec/kill.c
deleted file mode 100644
index 638132fed..000000000
--- a/newlib/libc/sys/sysmec/kill.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-_kill (n, m)
-{
- return TRAP0 (SYS_exit, 0xdead, 0, 0);
-}
-
diff --git a/newlib/libc/sys/sysmec/lseek.c b/newlib/libc/sys/sysmec/lseek.c
deleted file mode 100644
index dad6c39a8..000000000
--- a/newlib/libc/sys/sysmec/lseek.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/unistd.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-off_t
-_lseek (int file,
- off_t ptr,
- int dir)
-{
- return TRAP0 (SYS_lseek, file, ptr, dir);
-}
diff --git a/newlib/libc/sys/sysmec/open.c b/newlib/libc/sys/sysmec/open.c
deleted file mode 100644
index 0a9dbb04c..000000000
--- a/newlib/libc/sys/sysmec/open.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-int
-_open (const char *path,
- int flags)
-{
- return TRAP0 (SYS_open, path, flags, 0);
-}
diff --git a/newlib/libc/sys/sysmec/pipe.c b/newlib/libc/sys/sysmec/pipe.c
deleted file mode 100644
index 4c0078067..000000000
--- a/newlib/libc/sys/sysmec/pipe.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-int
-pipe (int *fd)
-{
- return TRAP0 (SYS_pipe, fd, 0, 0);
-}
diff --git a/newlib/libc/sys/sysmec/read.c b/newlib/libc/sys/sysmec/read.c
deleted file mode 100644
index eae084a6e..000000000
--- a/newlib/libc/sys/sysmec/read.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-_read (int file,
- char *ptr,
- size_t len)
-{
- return TRAP0 (SYS_read, file, ptr, len);
-}
diff --git a/newlib/libc/sys/sysmec/sbrk.c b/newlib/libc/sys/sysmec/sbrk.c
deleted file mode 100644
index 80cb431f6..000000000
--- a/newlib/libc/sys/sysmec/sbrk.c
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-caddr_t
-_sbrk (size_t incr)
-{
- extern char end; /* Defined by the linker */
- static char *heap_end;
- char *prev_heap_end;
-#if 0
- char *sp = (char *)stack_ptr;
-#else
- char *sp = (char *)&sp;
-#endif
-
- if (heap_end == 0)
- {
- heap_end = &end;
- }
- prev_heap_end = heap_end;
- if (heap_end + incr > sp)
- {
- _write (1, "Heap and stack collision\n", 25);
- abort ();
- }
- heap_end += incr;
- return (caddr_t) prev_heap_end;
-}
diff --git a/newlib/libc/sys/sysmec/stat.c b/newlib/libc/sys/sysmec/stat.c
deleted file mode 100644
index 11bbe8e30..000000000
--- a/newlib/libc/sys/sysmec/stat.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-int
-_stat (const char *path, struct stat *st)
-
-{
- return TRAP0 (SYS_stat, path, st, 0);
-}
diff --git a/newlib/libc/sys/sysmec/sys/syscall.h b/newlib/libc/sys/sysmec/sys/syscall.h
deleted file mode 100644
index f301ea0ee..000000000
--- a/newlib/libc/sys/sysmec/sys/syscall.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#define SYS_exit 1
-#define SYS_fork 2
-
-#define SYS_read 3
-#define SYS_write 4
-#define SYS_open 5
-#define SYS_close 6
-#define SYS_wait4 7
-#define SYS_creat 8
-#define SYS_link 9
-#define SYS_unlink 10
-#define SYS_execv 11
-#define SYS_chdir 12
-#define SYS_mknod 14
-#define SYS_chmod 15
-#define SYS_chown 16
-#define SYS_lseek 19
-#define SYS_getpid 20
-#define SYS_isatty 21
-#define SYS_fstat 22
-#define SYS_time 23
-
-
-#define SYS_ARG 24
-#define SYS_stat 38
-
-
-#define SYS_pipe 42
-#define SYS_execve 59
-#define SYS_times 43
-#define SYS_gettimeofday 116
-
-#define SYS_utime 201 /* not really a system call */
-#define SYS_wait 202 /* nor is this */
-
diff --git a/newlib/libc/sys/sysmec/time.c b/newlib/libc/sys/sysmec/time.c
deleted file mode 100644
index bde056eba..000000000
--- a/newlib/libc/sys/sysmec/time.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-time_t
-time (time_t *tloc)
-{
- return TRAP0 (SYS_time, tloc, 0, 0);
-}
diff --git a/newlib/libc/sys/sysmec/times.c b/newlib/libc/sys/sysmec/times.c
deleted file mode 100644
index 3555fd6a4..000000000
--- a/newlib/libc/sys/sysmec/times.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include "sys/times.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-clock_t
-times (struct tms *buffer)
-{
- return TRAP0 (SYS_times, buffer, 0, 0);
-}
diff --git a/newlib/libc/sys/sysmec/trap.S b/newlib/libc/sys/sysmec/trap.S
deleted file mode 100644
index 911c02dbc..000000000
--- a/newlib/libc/sys/sysmec/trap.S
+++ /dev/null
@@ -1,13 +0,0 @@
- .text
- .global ___trap0
-___trap0:
- syscall
- cmp 0,d0
- beq .L0
- mov d0,(_errno)
-.L0:
-#ifdef __mn10300__
- rets
-#else
- rts
-#endif
diff --git a/newlib/libc/sys/sysmec/unlink.c b/newlib/libc/sys/sysmec/unlink.c
deleted file mode 100644
index debd806a9..000000000
--- a/newlib/libc/sys/sysmec/unlink.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-int
-_unlink ()
-{
- return -1;
-}
diff --git a/newlib/libc/sys/sysmec/utime.c b/newlib/libc/sys/sysmec/utime.c
deleted file mode 100644
index 8d3e35977..000000000
--- a/newlib/libc/sys/sysmec/utime.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-int
-utime (path, times)
- const char *path;
- char *times;
-{
- return TRAP0 (SYS_utime, path, times, 0);
-}
diff --git a/newlib/libc/sys/sysmec/wait.c b/newlib/libc/sys/sysmec/wait.c
deleted file mode 100644
index 2e5cb6bad..000000000
--- a/newlib/libc/sys/sysmec/wait.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-int
-_wait (statusp)
- int *statusp;
-{
- return TRAP0 (SYS_wait, 0, 0, 0);
-}
diff --git a/newlib/libc/sys/sysmec/write.c b/newlib/libc/sys/sysmec/write.c
deleted file mode 100644
index 78fd64f22..000000000
--- a/newlib/libc/sys/sysmec/write.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 ();
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (p1), (p2), (p3))
-
-int
-_write ( int file,
- char *ptr,
- size_t len)
-{
- return TRAP0 (SYS_write, file, ptr, len);
-}
diff --git a/newlib/libc/sys/sysnec810/Makefile.am b/newlib/libc/sys/sysnec810/Makefile.am
deleted file mode 100644
index 018895432..000000000
--- a/newlib/libc/sys/sysnec810/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = io.s write.c sbrk.c misc.c
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/sysnec810/Makefile.in b/newlib/libc/sys/sysnec810/Makefile.in
deleted file mode 100644
index 9ca741bbf..000000000
--- a/newlib/libc/sys/sysnec810/Makefile.in
+++ /dev/null
@@ -1,329 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = io.s write.c sbrk.c misc.c
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = io.o write.o sbrk.o misc.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/sysnec810/aclocal.m4 b/newlib/libc/sys/sysnec810/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/sysnec810/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/sysnec810/configure b/newlib/libc/sys/sysnec810/configure
deleted file mode 100755
index 8acbb73ae..000000000
--- a/newlib/libc/sys/sysnec810/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=io.s
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/sysnec810/configure.in b/newlib/libc/sys/sysnec810/configure.in
deleted file mode 100644
index 483662c7a..000000000
--- a/newlib/libc/sys/sysnec810/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/sysnec810 configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(io.s)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/sysnec810/crt0.s b/newlib/libc/sys/sysnec810/crt0.s
deleted file mode 100644
index 3c7a382ff..000000000
--- a/newlib/libc/sys/sysnec810/crt0.s
+++ /dev/null
@@ -1,22 +0,0 @@
- .set STACKTOP, 0x100000
-
- .extern __tp_TEXT, 4
- .extern __gp_DATA, 4
- .extern _main
- .globl __start
- .globl _exit
- .globl __exit
-
- .text
-__start:
- mov 2, r10 -- set Cache Control Word
- ldsr r10, 24 --
-#
- mov STACKTOP, sp -- set stack pointer
- mov #__tp_TEXT, tp -- set tp register
- mov #__gp_DATA, gp -- set gp register offset
- add tp, gp -- set gp register
- jal _main -- call main function
-__exit:
- halt -- end of the program
-
diff --git a/newlib/libc/sys/sysnec810/io.s b/newlib/libc/sys/sysnec810/io.s
deleted file mode 100644
index f85975a1f..000000000
--- a/newlib/libc/sys/sysnec810/io.s
+++ /dev/null
@@ -1,41 +0,0 @@
-# V800 Series Assembler Source File created by cxx732
- .data
- .sdata
- .bss
- .sbss
- .text
- #@(#)V800 Series Assembly Code Improver E1.50c [16 Jul 93]
- #@(#)V800 Series Assembly Code Generator E1.00f'[25 Nov 93]
- #@(#)V800 Series Optic Optimizer E1.00e [13 Jul 93]
- #@(#)optimized at Wed May 11 13:37:07 1994
- #@(#)option:_R_xcedfgbhjqkn___s____T:
- #@(#)V800 Series Optic Inliner E1.00c [14 Jul 93]
- #@(#)V800 Series Optic Merger E1.00b [15 Jul 93]
- #@(#)V800 Series Optimizing C Compiler Frontend E1.00j [26 Feb 94]
- .file "/sethra/death/sef/v810/devo/newlib/libc/sys/v810/io.c"
- #@(#) fsort : -N8192 -G512 -C1024 -q -e -a -d
- .align 4
- .frame __inb, .F2
- .globl __inb
-__inb:
- add -.F2, sp
- in.b [r6],r10
- andi 0xff, r10, r10
- add .F2, sp
- jmp [lp]
- .set .F2, 0x8
- .set .A2, 0x4
- .set .T2, 0x0
- .align 4
- .frame __outb, .F3
- .globl __outb
-__outb:
- andi 0xff, r7, r10
- out.b r10,[r6]
- jmp [lp]
- .set .F3, 0x0
- .set .A3, 0x0
- .set .T3, 0x0
- .vline
- .vdebug
- .vdbstrtab
diff --git a/newlib/libc/sys/sysnec810/misc.c b/newlib/libc/sys/sysnec810/misc.c
deleted file mode 100644
index f44c03d51..000000000
--- a/newlib/libc/sys/sysnec810/misc.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-extern int _write (int, void*, unsigned int);
-
-int
-_open() {
- return -1;
-}
-
-int
-_close() {
- return -1;
-}
-
-int
-_lseek() {
- return 0;
-}
-
-int
-_read() {
- return 0;
-}
-
-int
-isatty() {
- return 1;
-}
-
-int
-_DEFUN(_fstat,(file, st),
- int file _AND
- struct stat *st)
-{
- st->st_mode = S_IFCHR;
- return 0;
-}
-
diff --git a/newlib/libc/sys/sysnec810/sbrk.c b/newlib/libc/sys/sysnec810/sbrk.c
deleted file mode 100644
index b1cf4a781..000000000
--- a/newlib/libc/sys/sysnec810/sbrk.c
+++ /dev/null
@@ -1,12 +0,0 @@
-extern int _end;
-
-static char *end_of_data = (char *) &_end;
-
-char *
-_sbrk (int delta) {
- char *ptr = end_of_data;
-
- end_of_data += delta;
- return ptr;
-}
-
diff --git a/newlib/libc/sys/sysnec810/write.c b/newlib/libc/sys/sysnec810/write.c
deleted file mode 100644
index 96c1e49ce..000000000
--- a/newlib/libc/sys/sysnec810/write.c
+++ /dev/null
@@ -1,36 +0,0 @@
-static volatile char *data = (char *)(0x20);
-static volatile char *control = (char *)(0x24);
-
-extern void _outb (volatile char*, unsigned char);
-extern unsigned char _inb (volatile char*);
-
-static unsigned char
- read_scc_reg (unsigned char n)
-{
- _outb (control, n);
- return _inb(control);
-}
-
-static void write_scc_data (unsigned char n)
-{
- _outb (data, n);
-}
-
-int
-_write (int dev, void *buf, unsigned int len)
-{
- int i;
- char *string = (char*)buf;
-
- for (i = 0; i < len; i++)
- {
- int j;
-
- for (j = 0 ; j < 5000; j++)
- ;
- write_scc_data (string[i]);
-
- }
- return len;
-}
-
diff --git a/newlib/libc/sys/sysnecv850/Makefile.am b/newlib/libc/sys/sysnecv850/Makefile.am
deleted file mode 100644
index 2c74d173d..000000000
--- a/newlib/libc/sys/sysnecv850/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = \
- _exit.c access.c chmod.c chown.c close.c creat.c crt1.c \
- execv.c execve.c fork.c fstat.c getpid.c isatty.c \
- kill.c lseek.c open.c pipe.c read.c link.c \
- sbrk.c stat.c time.c trap.S unlink.c utime.c wait.c write.c \
- times.c gettime.c
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/sysnecv850/Makefile.in b/newlib/libc/sys/sysnecv850/Makefile.in
deleted file mode 100644
index 7d3b0ba31..000000000
--- a/newlib/libc/sys/sysnecv850/Makefile.in
+++ /dev/null
@@ -1,333 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = _exit.c access.c chmod.c chown.c close.c creat.c crt1.c execv.c execve.c fork.c fstat.c getpid.c isatty.c kill.c lseek.c open.c pipe.c read.c link.c sbrk.c stat.c time.c trap.S unlink.c utime.c wait.c write.c times.c gettime.c
-
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = _exit.o access.o chmod.o chown.o close.o creat.o crt1.o \
-execv.o execve.o fork.o fstat.o getpid.o isatty.o kill.o lseek.o open.o \
-pipe.o read.o link.o sbrk.o stat.o time.o trap.o unlink.o utime.o \
-wait.o write.o times.o gettime.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/sysnecv850/_exit.c b/newlib/libc/sys/sysnecv850/_exit.c
deleted file mode 100644
index b45ae96c8..000000000
--- a/newlib/libc/sys/sysnecv850/_exit.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-static void _do_dtors()
-{
- /* The loop variable is static so that if a destructor calls exit,
- and we return here, we simply continue with the next destructor. */
- typedef void (*pfunc) ();
- extern pfunc __dtors[];
- extern pfunc __dtors_end[];
- static pfunc *p = __dtors;
-
- while (p < __dtors_end)
- (*p++) ();
-}
-
-
-void _exit (n)
-{
- /* Destructors should be done earlier because they need to be done before the
- files are closed, but here is better than nowhere (and this balances the
- constructors done in crt1.c. */
- _do_dtors();
-
- TRAP0 (SYS_exit, n, 0, 0);
-}
diff --git a/newlib/libc/sys/sysnecv850/access.c b/newlib/libc/sys/sysnecv850/access.c
deleted file mode 100644
index 8e08b3a7f..000000000
--- a/newlib/libc/sys/sysnecv850/access.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* This is file ACCESS.C */
-/*
- * Copyright (C) 1993 DJ Delorie
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms is permitted
- * provided that the above copyright notice and following paragraph are
- * duplicated in all such forms.
- *
- * This file is distributed WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-int access(const char *fn, int flags)
-{
- struct stat s;
- if (stat(fn, &s))
- return -1;
- if (s.st_mode & S_IFDIR)
- return 0;
- if (flags & W_OK)
- {
- if (s.st_mode & S_IWRITE)
- return 0;
- return -1;
- }
- return 0;
-}
-
diff --git a/newlib/libc/sys/sysnecv850/aclocal.m4 b/newlib/libc/sys/sysnecv850/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/sysnecv850/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/sysnecv850/chmod.c b/newlib/libc/sys/sysnecv850/chmod.c
deleted file mode 100644
index c86e5c902..000000000
--- a/newlib/libc/sys/sysnecv850/chmod.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-chmod (const char *path, mode_t mode)
-{
- return TRAP0 (SYS_chmod, path, mode, 0);
-}
diff --git a/newlib/libc/sys/sysnecv850/chown.c b/newlib/libc/sys/sysnecv850/chown.c
deleted file mode 100644
index 0344d77a9..000000000
--- a/newlib/libc/sys/sysnecv850/chown.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-chown (const char *path, short owner, short group)
-{
- return TRAP0 (SYS_chown, path, owner, group);
-}
diff --git a/newlib/libc/sys/sysnecv850/close.c b/newlib/libc/sys/sysnecv850/close.c
deleted file mode 100644
index 3c62f68e2..000000000
--- a/newlib/libc/sys/sysnecv850/close.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-_close (int file)
-{
- return TRAP0 (SYS_close, file, 0, 0);
-}
diff --git a/newlib/libc/sys/sysnecv850/configure b/newlib/libc/sys/sysnecv850/configure
deleted file mode 100755
index c3fe7f351..000000000
--- a/newlib/libc/sys/sysnecv850/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=crt1.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/sysnecv850/configure.in b/newlib/libc/sys/sysnecv850/configure.in
deleted file mode 100644
index 0bb0a1f85..000000000
--- a/newlib/libc/sys/sysnecv850/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/sysnecv850 configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(crt1.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/sysnecv850/creat.c b/newlib/libc/sys/sysnecv850/creat.c
deleted file mode 100644
index 8d468a68c..000000000
--- a/newlib/libc/sys/sysnecv850/creat.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-creat (const char *path,
- int mode)
-{
- return TRAP0 (SYS_creat, path, mode, 0);
-}
diff --git a/newlib/libc/sys/sysnecv850/crt0.S b/newlib/libc/sys/sysnecv850/crt0.S
deleted file mode 100644
index e006871b3..000000000
--- a/newlib/libc/sys/sysnecv850/crt0.S
+++ /dev/null
@@ -1,67 +0,0 @@
-# NEC V850 startup code
-
- .section .text
- .global _start
-
-_start:
-
-#if defined __v850e__
-
- movea 255, r0, r20
- mov 65535, r21
- mov hilo(_stack), sp
- mov hilo(__ep), ep
- mov hilo(__gp), gp
- mov hilo(__ctbp), r6
- ldsr r6, ctbp
- mov hilo(_edata), r6
- mov hilo(_end), r7
-.L0:
- st.w r0, 0[r6]
- addi 4, r6, r6
- cmp r7, r6
- bl .L0
-.L1:
- jarl ___main, r31
- addi -16, sp, sp
- mov 0, r6
- mov 0, r7
- mov 0, r8
- jarl _main, r31
- mov r10, r6
- jarl _exit, r31
-
-# else
- movea 255, r0, r20
- mov r0, r21
- ori 65535, r0, r21
- movhi hi(_stack), r0, sp
- movea lo(_stack), sp, sp
- movhi hi(__ep), r0, ep
- movea lo(__ep), ep, ep
- movhi hi(__gp), r0, gp
- movea lo(__gp), gp, gp
-
- movhi hi(_edata), r0, r6
- movea lo(_edata), r6, r6
- movhi hi(_end), r0, r7
- movea lo(_end), r7, r7
-.L0:
- st.b r0, 0[r6]
- addi 1, r6, r6
- cmp r7, r6
- bl .L0
-.L1:
- jarl ___main, r31
- addi -16, sp, sp
- mov 0, r6
- mov 0, r7
- mov 0, r8
- jarl _main, r31
- mov r10, r6
- jarl _exit, r31
-
-# endif
-
- .section .stack
-_stack: .long 1
diff --git a/newlib/libc/sys/sysnecv850/crt1.c b/newlib/libc/sys/sysnecv850/crt1.c
deleted file mode 100644
index dd0be3145..000000000
--- a/newlib/libc/sys/sysnecv850/crt1.c
+++ /dev/null
@@ -1,16 +0,0 @@
-void __main ()
-{
- static int initialized;
- if (! initialized)
- {
- typedef void (*pfunc) ();
- extern pfunc __ctors[];
- extern pfunc __ctors_end[];
- pfunc *p;
-
- initialized = 1;
- for (p = __ctors_end; p > __ctors; )
- (*--p) ();
-
- }
-}
diff --git a/newlib/libc/sys/sysnecv850/execv.c b/newlib/libc/sys/sysnecv850/execv.c
deleted file mode 100644
index 5286be68b..000000000
--- a/newlib/libc/sys/sysnecv850/execv.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-execv (const char *path, char *const argv[])
-{
- return TRAP0 (SYS_execv, path, argv, 0);
-}
diff --git a/newlib/libc/sys/sysnecv850/execve.c b/newlib/libc/sys/sysnecv850/execve.c
deleted file mode 100644
index b8d97f914..000000000
--- a/newlib/libc/sys/sysnecv850/execve.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-_execve (const char *path, char *const argv[], char *const envp[])
-{
- return TRAP0 (SYS_execve, path, argv, envp);
-}
diff --git a/newlib/libc/sys/sysnecv850/fork.c b/newlib/libc/sys/sysnecv850/fork.c
deleted file mode 100644
index 116116c1b..000000000
--- a/newlib/libc/sys/sysnecv850/fork.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-_fork ()
-{
- return TRAP0 (SYS_fork, 0, 0, 0);
-}
diff --git a/newlib/libc/sys/sysnecv850/fstat.c b/newlib/libc/sys/sysnecv850/fstat.c
deleted file mode 100644
index e8783b376..000000000
--- a/newlib/libc/sys/sysnecv850/fstat.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-_fstat (int file,
- struct stat *st)
-{
- st->st_mode = S_IFCHR;
- return 0;
-}
diff --git a/newlib/libc/sys/sysnecv850/getpid.c b/newlib/libc/sys/sysnecv850/getpid.c
deleted file mode 100644
index 18fd1494e..000000000
--- a/newlib/libc/sys/sysnecv850/getpid.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-_getpid (n)
-{
- return 1;
-}
diff --git a/newlib/libc/sys/sysnecv850/gettime.c b/newlib/libc/sys/sysnecv850/gettime.c
deleted file mode 100644
index fc47532a0..000000000
--- a/newlib/libc/sys/sysnecv850/gettime.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include "sys/time.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-_gettimeofday (struct timeval *tp, void *tzp)
-{
- return TRAP0 (SYS_gettimeofday, tp, tzp, 0);
-}
diff --git a/newlib/libc/sys/sysnecv850/isatty.c b/newlib/libc/sys/sysnecv850/isatty.c
deleted file mode 100644
index e5361559f..000000000
--- a/newlib/libc/sys/sysnecv850/isatty.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-isatty (fd)
- int fd;
-{
- return 1;
-}
diff --git a/newlib/libc/sys/sysnecv850/kill.c b/newlib/libc/sys/sysnecv850/kill.c
deleted file mode 100644
index b8e53955a..000000000
--- a/newlib/libc/sys/sysnecv850/kill.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include <reent.h>
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-_kill (pid, sig)
- pid_t pid;
- int sig;
-{
- return TRAP0 (SYS_exit, 0xdead0000 | sig, 0, 0);
-}
-
diff --git a/newlib/libc/sys/sysnecv850/link.c b/newlib/libc/sys/sysnecv850/link.c
deleted file mode 100644
index 9776d7993..000000000
--- a/newlib/libc/sys/sysnecv850/link.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-_link ()
-{
- return -1;
-}
diff --git a/newlib/libc/sys/sysnecv850/lseek.c b/newlib/libc/sys/sysnecv850/lseek.c
deleted file mode 100644
index b5d3ef0c2..000000000
--- a/newlib/libc/sys/sysnecv850/lseek.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-_lseek (int file,
- int ptr,
- int dir)
-{
- return TRAP0 (SYS_lseek, file, ptr, dir);
-}
diff --git a/newlib/libc/sys/sysnecv850/open.c b/newlib/libc/sys/sysnecv850/open.c
deleted file mode 100644
index 96616e528..000000000
--- a/newlib/libc/sys/sysnecv850/open.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-_open (const char *path,
- int flags)
-{
- return TRAP0 (SYS_open, path, flags, 0);
-}
diff --git a/newlib/libc/sys/sysnecv850/pipe.c b/newlib/libc/sys/sysnecv850/pipe.c
deleted file mode 100644
index 494a99e36..000000000
--- a/newlib/libc/sys/sysnecv850/pipe.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-pipe (int *fd)
-{
- return TRAP0 (SYS_pipe, fd, 0, 0);
-}
diff --git a/newlib/libc/sys/sysnecv850/read.c b/newlib/libc/sys/sysnecv850/read.c
deleted file mode 100644
index ec064cbb2..000000000
--- a/newlib/libc/sys/sysnecv850/read.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-_read (int file,
- char *ptr,
- int len)
-{
- return TRAP0 (SYS_read, file, ptr, len);
-}
diff --git a/newlib/libc/sys/sysnecv850/sbrk.c b/newlib/libc/sys/sysnecv850/sbrk.c
deleted file mode 100644
index b41370595..000000000
--- a/newlib/libc/sys/sysnecv850/sbrk.c
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-caddr_t
-_sbrk (int incr)
-{
- extern char end; /* Defined by the linker */
- static char *heap_end;
- char *prev_heap_end;
-#if 0
- char *sp = (char *)stack_ptr;
-#else
- char *sp = (char *)&sp;
-#endif
-
- if (heap_end == 0)
- {
- heap_end = &end;
- }
- prev_heap_end = heap_end;
- if (heap_end + incr > sp)
- {
- _write (1, "Heap and stack collision\n", 25);
- abort ();
- }
- heap_end += incr;
- return (caddr_t) prev_heap_end;
-}
diff --git a/newlib/libc/sys/sysnecv850/stat.c b/newlib/libc/sys/sysnecv850/stat.c
deleted file mode 100644
index dc8351e1a..000000000
--- a/newlib/libc/sys/sysnecv850/stat.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-_stat (const char *path, struct stat *st)
-
-{
- return TRAP0 (SYS_stat, path, st, 0);
-}
diff --git a/newlib/libc/sys/sysnecv850/sys/syscall.h b/newlib/libc/sys/sysnecv850/sys/syscall.h
deleted file mode 100644
index f301ea0ee..000000000
--- a/newlib/libc/sys/sysnecv850/sys/syscall.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#define SYS_exit 1
-#define SYS_fork 2
-
-#define SYS_read 3
-#define SYS_write 4
-#define SYS_open 5
-#define SYS_close 6
-#define SYS_wait4 7
-#define SYS_creat 8
-#define SYS_link 9
-#define SYS_unlink 10
-#define SYS_execv 11
-#define SYS_chdir 12
-#define SYS_mknod 14
-#define SYS_chmod 15
-#define SYS_chown 16
-#define SYS_lseek 19
-#define SYS_getpid 20
-#define SYS_isatty 21
-#define SYS_fstat 22
-#define SYS_time 23
-
-
-#define SYS_ARG 24
-#define SYS_stat 38
-
-
-#define SYS_pipe 42
-#define SYS_execve 59
-#define SYS_times 43
-#define SYS_gettimeofday 116
-
-#define SYS_utime 201 /* not really a system call */
-#define SYS_wait 202 /* nor is this */
-
diff --git a/newlib/libc/sys/sysnecv850/time.c b/newlib/libc/sys/sysnecv850/time.c
deleted file mode 100644
index d0dc93f8a..000000000
--- a/newlib/libc/sys/sysnecv850/time.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-time_t
-time (time_t *tloc)
-{
- return TRAP0 (SYS_time, tloc, 0, 0);
-}
diff --git a/newlib/libc/sys/sysnecv850/times.c b/newlib/libc/sys/sysnecv850/times.c
deleted file mode 100644
index a558267fe..000000000
--- a/newlib/libc/sys/sysnecv850/times.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-#include "sys/times.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-clock_t
-_times (struct tms *buffer)
-{
- return TRAP0 (SYS_times, buffer, 0, 0);
-}
diff --git a/newlib/libc/sys/sysnecv850/trap.S b/newlib/libc/sys/sysnecv850/trap.S
deleted file mode 100644
index 9955572a3..000000000
--- a/newlib/libc/sys/sysnecv850/trap.S
+++ /dev/null
@@ -1,10 +0,0 @@
- .text
- .global ___trap0
-___trap0:
- trap 31
- tst r10,r10
- bz .L0
- movhi hi(_errno),r0,r6
- st.w r10,lo(_errno)[r6]
-.L0:
- jmp [r31]
diff --git a/newlib/libc/sys/sysnecv850/unlink.c b/newlib/libc/sys/sysnecv850/unlink.c
deleted file mode 100644
index c6261d3eb..000000000
--- a/newlib/libc/sys/sysnecv850/unlink.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-_unlink ()
-{
- return -1;
-}
diff --git a/newlib/libc/sys/sysnecv850/utime.c b/newlib/libc/sys/sysnecv850/utime.c
deleted file mode 100644
index ea1f78993..000000000
--- a/newlib/libc/sys/sysnecv850/utime.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-utime (path, times)
- const char *path;
- char *times;
-{
- return TRAP0 (SYS_utime, path, times, 0);
-}
diff --git a/newlib/libc/sys/sysnecv850/wait.c b/newlib/libc/sys/sysnecv850/wait.c
deleted file mode 100644
index d8c96f05b..000000000
--- a/newlib/libc/sys/sysnecv850/wait.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-_wait (statusp)
- int *statusp;
-{
- return TRAP0 (SYS_wait, 0, 0, 0);
-}
diff --git a/newlib/libc/sys/sysnecv850/write.c b/newlib/libc/sys/sysnecv850/write.c
deleted file mode 100644
index 136ac9ec8..000000000
--- a/newlib/libc/sys/sysnecv850/write.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-
-int errno;
-
-int __trap0 (int function, int p1, int p2, int p3);
-
-#define TRAP0(f, p1, p2, p3) __trap0(f, (int)(p1), (int)(p2), (int)(p3))
-
-int
-_write ( int file,
- char *ptr,
- int len)
-{
- return TRAP0 (SYS_write, file, ptr, len);
-}
diff --git a/newlib/libc/sys/sysvi386/Makefile.am b/newlib/libc/sys/sysvi386/Makefile.am
deleted file mode 100644
index 91c8d69a6..000000000
--- a/newlib/libc/sys/sysvi386/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = \
- ioctl.s isatty.c read.s lseek.s close.s sbrk.c fstat.s cerror.s \
- _exit.s write.s open.s signal.s kill.s getpid.s brk.s fork.s wait.s \
- execve.s exec.c utime.s fcntl.s chmod.s getuid.s getgid.s time.s \
- stat.s link.s unlink.s rename.s mkdir.s rmdir.s sigaction.s \
- sigprocmask.s waitpid.s sysconf.s pathconf.s fpathconf.s \
- getdents.s opendir.c readdir.c rewinddir.c closedir.c pipe.s \
- getgroups.s setuid.s getuid.s setgid.s geteuid.s getegid.s \
- chdir.s dup2.c dup.c tcgetattr.c tcsetattr.c speed.c tcline.c \
- times.s pause.s sleep.c alarm.s access.s _longjmp.s _setjmp.s
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/sysvi386/Makefile.in b/newlib/libc/sys/sysvi386/Makefile.in
deleted file mode 100644
index f8286507f..000000000
--- a/newlib/libc/sys/sysvi386/Makefile.in
+++ /dev/null
@@ -1,338 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = ioctl.s isatty.c read.s lseek.s close.s sbrk.c fstat.s cerror.s _exit.s write.s open.s signal.s kill.s getpid.s brk.s fork.s wait.s execve.s exec.c utime.s fcntl.s chmod.s getuid.s getgid.s time.s stat.s link.s unlink.s rename.s mkdir.s rmdir.s sigaction.s sigprocmask.s waitpid.s sysconf.s pathconf.s fpathconf.s getdents.s opendir.c readdir.c rewinddir.c closedir.c pipe.s getgroups.s setuid.s getuid.s setgid.s geteuid.s getegid.s chdir.s dup2.c dup.c tcgetattr.c tcsetattr.c speed.c tcline.c times.s pause.s sleep.c alarm.s access.s _longjmp.s _setjmp.s
-
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = ioctl.o isatty.o read.o lseek.o close.o sbrk.o fstat.o \
-cerror.o _exit.o write.o open.o signal.o kill.o getpid.o brk.o fork.o \
-wait.o execve.o exec.o utime.o fcntl.o chmod.o getuid.o getgid.o time.o \
-stat.o link.o unlink.o rename.o mkdir.o rmdir.o sigaction.o \
-sigprocmask.o waitpid.o sysconf.o pathconf.o fpathconf.o getdents.o \
-opendir.o readdir.o rewinddir.o closedir.o pipe.o getgroups.o setuid.o \
-getuid.o setgid.o geteuid.o getegid.o chdir.o dup2.o dup.o tcgetattr.o \
-tcsetattr.o speed.o tcline.o times.o pause.o sleep.o alarm.o access.o \
-_longjmp.o _setjmp.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/sysvi386/_exit.s b/newlib/libc/sys/sysvi386/_exit.s
deleted file mode 100644
index 57e598979..000000000
--- a/newlib/libc/sys/sysvi386/_exit.s
+++ /dev/null
@@ -1,6 +0,0 @@
-
- .globl _exit
-_exit:
- movl $1, %eax
- lcall $7,$0
-
diff --git a/newlib/libc/sys/sysvi386/_longjmp.s b/newlib/libc/sys/sysvi386/_longjmp.s
deleted file mode 100644
index 691409b0b..000000000
--- a/newlib/libc/sys/sysvi386/_longjmp.s
+++ /dev/null
@@ -1,31 +0,0 @@
-/
-/ our buffer looks like:
-/ eax,ebx,ecx,edx,esi,edi,esp,ebp,pc
-/
-/ _longjmp is called with two parameters: jmp_buf*,int
-/ jmp_buf* is at 4(%esp), int is at 8(%esp)
-/ retaddr is, of course, at (%esp)
-
- .globl _longjmp
- .globl longjmp
-_longjmp:
-longjmp:
- movl 4(%esp), %ebx / address of buf
- movl 8(%esp), %eax / store return value
-
- movl 24(%ebx), %esp / restore stack
- movl 32(%ebx), %edi
-/ Next line sets up return address.
- movl %edi, 0(%esp)
- movl 8(%ebx), %ecx
- movl 12(%ebx), %edx
- movl 16(%ebx), %esi
- movl 20(%ebx), %edi
- movl 28(%ebx), %ebp
- movl 4(%ebx), %ebx
- testl %eax,%eax
- jne bye
- incl %eax / eax hold 0 if we are here
-bye:
- ret
-
diff --git a/newlib/libc/sys/sysvi386/_setjmp.s b/newlib/libc/sys/sysvi386/_setjmp.s
deleted file mode 100644
index 8f191b59a..000000000
--- a/newlib/libc/sys/sysvi386/_setjmp.s
+++ /dev/null
@@ -1,24 +0,0 @@
-/
-/ our buffer looks like:
-/ eax,ebx,ecx,edx,esi,edi,esp,ebp,pc
-
- .globl _setjmp
- .globl setjmp
-_setjmp:
-setjmp:
- pushl %ebx
- movl 8(%esp), %ebx
- movl %eax, (%ebx)
- popl %eax
- movl %eax, 4(%ebx)
- movl %ecx, 8(%ebx)
- movl %edx, 12(%ebx)
- movl %esi, 16(%ebx)
- movl %edi, 20(%ebx)
- movl %esp, 24(%ebx)
- movl %ebp, 28(%ebx)
- movl (%esp), %eax
- movl %eax, 32(%ebx)
- xorl %eax, %eax
- ret
-
diff --git a/newlib/libc/sys/sysvi386/access.s b/newlib/libc/sys/sysvi386/access.s
deleted file mode 100644
index bf35891dc..000000000
--- a/newlib/libc/sys/sysvi386/access.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .globl _access
- .globl access
-access:
-_access:
- movl $0x21, %eax
- lcall $7, $0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/aclocal.m4 b/newlib/libc/sys/sysvi386/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/sysvi386/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/sysvi386/alarm.s b/newlib/libc/sys/sysvi386/alarm.s
deleted file mode 100644
index f31b3d380..000000000
--- a/newlib/libc/sys/sysvi386/alarm.s
+++ /dev/null
@@ -1,5 +0,0 @@
- .globl _alarm
-_alarm:
- movl $0x1b, %eax
- lcall $7,$0
- ret
diff --git a/newlib/libc/sys/sysvi386/brk.s b/newlib/libc/sys/sysvi386/brk.s
deleted file mode 100644
index c3cb43f11..000000000
--- a/newlib/libc/sys/sysvi386/brk.s
+++ /dev/null
@@ -1,8 +0,0 @@
-
- .globl _brk
-_brk:
- movl $0x11, %eax
- lcall $7,$0
- jb _cerror
- xor %eax,%eax
- ret
diff --git a/newlib/libc/sys/sysvi386/cerror.s b/newlib/libc/sys/sysvi386/cerror.s
deleted file mode 100644
index 9d53bae15..000000000
--- a/newlib/libc/sys/sysvi386/cerror.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _cerror
-_cerror:
- movl %eax, errno
- movl $-1, %eax
- ret
- .data
- .globl errno
-errno: .long 0
-
diff --git a/newlib/libc/sys/sysvi386/chdir.s b/newlib/libc/sys/sysvi386/chdir.s
deleted file mode 100644
index 9974c8668..000000000
--- a/newlib/libc/sys/sysvi386/chdir.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _chdir
- .globl chdir
-_chdir:
-chdir:
- movl $0xc, %eax
- lcall $7,$0
- jb _cerror
- xor %eax, %eax
- ret
diff --git a/newlib/libc/sys/sysvi386/chmod.s b/newlib/libc/sys/sysvi386/chmod.s
deleted file mode 100644
index ab5ef3d6a..000000000
--- a/newlib/libc/sys/sysvi386/chmod.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _chmod
- .globl chmod
-_chmod:
-chmod:
- movl $0xf, %eax
- lcall $7,$0
- jb _cerror
- xor %eax, %eax
- ret
diff --git a/newlib/libc/sys/sysvi386/close.s b/newlib/libc/sys/sysvi386/close.s
deleted file mode 100644
index e46c0c13d..000000000
--- a/newlib/libc/sys/sysvi386/close.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _close
- .globl close
-_close:
-close:
- movl $6, %eax
- lcall $7,$0
- jb _cerror
- xor %eax, %eax
- ret
diff --git a/newlib/libc/sys/sysvi386/closedir.c b/newlib/libc/sys/sysvi386/closedir.c
deleted file mode 100644
index d87d81654..000000000
--- a/newlib/libc/sys/sysvi386/closedir.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)closedir.c 5.9 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-/*
- * close a directory.
- */
-int
-closedir(dirp)
- register DIR *dirp;
-{
- int fd;
-
- fd = dirp->dd_fd;
- dirp->dd_fd = -1;
- dirp->dd_loc = 0;
- (void)free((void *)dirp->dd_buf);
- (void)free((void *)dirp);
- return(close(fd));
-}
diff --git a/newlib/libc/sys/sysvi386/configure b/newlib/libc/sys/sysvi386/configure
deleted file mode 100755
index 9076487fe..000000000
--- a/newlib/libc/sys/sysvi386/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=fps.s
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/sysvi386/configure.in b/newlib/libc/sys/sysvi386/configure.in
deleted file mode 100644
index 68eeb5243..000000000
--- a/newlib/libc/sys/sysvi386/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/sysvi386 configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(fps.s)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/sysvi386/crt0.c b/newlib/libc/sys/sysvi386/crt0.c
deleted file mode 100644
index b41c00a3c..000000000
--- a/newlib/libc/sys/sysvi386/crt0.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)crt0.c 5.7 (Berkeley) 7/3/91";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * C start up routine.
- * Robert Henry, UCB, 20 Oct 81
- *
- * We make the following (true) assumption:
- * 1) The only register variable that we can trust is ebp,
- * which points to the base of the kernel calling frame.
- */
-
-char **environ = (char **)0;
-static int fd;
-
-/*
-asm(".text");
-asm(".long 0xc000c000");
-*/
-extern unsigned char etext;
-extern unsigned char eprol asm ("eprol");
-/* extern start() asm("start"); */
-
-_start(int arg)
-{
- struct kframe {
- int kargc;
- char *kargv[1]; /* size depends on kargc */
- char kargstr[1]; /* size varies */
- char kenvstr[1]; /* size varies */
- };
- /*
- * ALL REGISTER VARIABLES!!!
- */
- register struct kframe *kfp; /* r10 */
- register char **targv;
- register char **argv;
- extern int errno;
- extern void _mcleanup();
-
-#ifdef lint
- kfp = 0;
- initcode = initcode = 0;
-#else not lint
-# if 0
- asm("lea 4(%ebp),%ebx"); /* catch it quick */
-# else
- kfp = (struct kframe *)&(((int *)(&arg))[-1]);
-# endif
-#endif not lint
- for (argv = targv = &kfp->kargv[0]; *targv++; /* void */)
- /* void */ ;
- if (targv >= (char **)(*argv))
- --targv;
- environ = targv;
-asm("eprol:");
-
-#ifdef paranoid
- /*
- * The standard I/O library assumes that file descriptors 0, 1, and 2
- * are open. If one of these descriptors is closed prior to the start
- * of the process, I/O gets very confused. To avoid this problem, we
- * insure that the first three file descriptors are open before calling
- * main(). Normally this is undefined, as it adds two unnecessary
- * system calls.
- */
- do {
- fd = open("/dev/null", 2);
- } while (fd >= 0 && fd < 3);
- close(fd);
-#endif paranoid
-
-#ifdef MCRT0
- atexit(_mcleanup);
- monstartup(&eprol, &etext);
-#endif MCRT0
- errno = 0;
- exit(main(kfp->kargc, argv, environ));
-}
-
-#ifdef CRT0
-/*
- * null mcount and moncontrol,
- * just in case some routine is compiled for profiling
- */
-moncontrol(val)
- int val;
-{
-
-}
-asm(".globl mcount");
-asm("mcount: ret");
-#endif CRT0
diff --git a/newlib/libc/sys/sysvi386/dup.c b/newlib/libc/sys/sysvi386/dup.c
deleted file mode 100644
index 95b0a5c92..000000000
--- a/newlib/libc/sys/sysvi386/dup.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <fcntl.h>
-
-int
-dup (int fd1) {
- return (fcntl (fd1, F_DUPFD, 0));
-}
diff --git a/newlib/libc/sys/sysvi386/dup2.c b/newlib/libc/sys/sysvi386/dup2.c
deleted file mode 100644
index 6b72599fb..000000000
--- a/newlib/libc/sys/sysvi386/dup2.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <fcntl.h>
-
-int
-dup2 (int fd1, int fd2) {
- close (fd2); /* ignore errors, if any */
- return (fcntl (fd1, F_DUPFD, fd2));
-}
diff --git a/newlib/libc/sys/sysvi386/exec.c b/newlib/libc/sys/sysvi386/exec.c
deleted file mode 100644
index 6587d50a7..000000000
--- a/newlib/libc/sys/sysvi386/exec.c
+++ /dev/null
@@ -1,54 +0,0 @@
-#include <sys/unistd.h>
-#include <errno.h>
-
-extern char **environ;
-
-int
-execv (const char *path, char * const *args) {
- extern int execve (const char *, char * const *, char * const*);
- return execve (path, args, environ);
-}
-
-int
-execl(const char *path, const char *arg1, ...) {
- return execv (path, &arg1);
-}
-
-/*
- * Copy string, until c or <nul> is encountered.
- * NUL-terminate the destination string (s1).
- */
-
-static char *
-strccpy (char *s1, char *s2, char c) {
- char *dest = s1;
- while (*s2 && *s2 != c) {
- *s1++ = *s2++;
- }
- *s1 = 0;
- return dest;
-}
-
-int
-execvp(const char *file, char * const *args) {
- extern char *getenv (const char *);
- char *path = getenv ("PATH");
- char buf[MAXNAMLEN];
-
- if (file[0] == '/') { /* absolute pathname -- easy out */
- return execv (file, args);
- }
-
- buf[0] = 0; /* lots of initialization here 8-) */
- while (*path) {
- strccpy (buf, path, ':');
- strcat (buf, "/");
- strcat (buf, file);
- execv (buf, args);
- if (errno != ENOENT)
- return -1;
- while (*path && *path != ':')
- path++;
- }
- return -1;
-}
diff --git a/newlib/libc/sys/sysvi386/execve.s b/newlib/libc/sys/sysvi386/execve.s
deleted file mode 100644
index d1d29bc9f..000000000
--- a/newlib/libc/sys/sysvi386/execve.s
+++ /dev/null
@@ -1,7 +0,0 @@
- .globl _execve
- .globl execve
-_execve:
-execve:
- movl $0x3b, %eax
- lcall $7,$0
- jb _cerror
diff --git a/newlib/libc/sys/sysvi386/fcntl.s b/newlib/libc/sys/sysvi386/fcntl.s
deleted file mode 100644
index dc3e11f74..000000000
--- a/newlib/libc/sys/sysvi386/fcntl.s
+++ /dev/null
@@ -1,9 +0,0 @@
-
- .globl _fcntl
- .globl fcntl
-_fcntl:
-fcntl:
- movl $0x3e, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/fork.s b/newlib/libc/sys/sysvi386/fork.s
deleted file mode 100644
index 8c9b60035..000000000
--- a/newlib/libc/sys/sysvi386/fork.s
+++ /dev/null
@@ -1,12 +0,0 @@
- .globl _fork
- .globl fork
-_fork:
-fork:
- movl $2, %eax
- lcall $7,$0
- jb _cerror
- testl %edx, %edx
- je bye
- xorl %eax,%eax
-bye:
- ret
diff --git a/newlib/libc/sys/sysvi386/fpathconf.s b/newlib/libc/sys/sysvi386/fpathconf.s
deleted file mode 100644
index b55ea92d1..000000000
--- a/newlib/libc/sys/sysvi386/fpathconf.s
+++ /dev/null
@@ -1,6 +0,0 @@
- .globl fpathconf
-fpathconf:
- movl $0x2f28, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/fps.s b/newlib/libc/sys/sysvi386/fps.s
deleted file mode 100644
index 83214dff4..000000000
--- a/newlib/libc/sys/sysvi386/fps.s
+++ /dev/null
@@ -1,18 +0,0 @@
- .globl _fpgetsticky
-_fpgetsticky:
- getpsw r0
- and.w #0x1f00,r0
- shl.w #0xf8,r0
- ret #0x0
-
-
- .globl _fpsetsticky
-_fpsetsticky:
- getpsw r0
- mov.w [ap],r1
- shl.w #0x8,r1
- updpsw.h r1,#0x1f00
- trapfl
- and.w #0x1f00,r0
- shl.w #0xf8,r0
- ret #0x0
diff --git a/newlib/libc/sys/sysvi386/fpx.c b/newlib/libc/sys/sysvi386/fpx.c
deleted file mode 100644
index d55a1e30f..000000000
--- a/newlib/libc/sys/sysvi386/fpx.c
+++ /dev/null
@@ -1,73 +0,0 @@
-#include <ieeefp.h>
-#include <machine/registers.h>
-
-
-fp_except _DEFUN(fpsetmask,(newmask),
- fp_except newmask)
-
-{
- fp_except oldmask;
- v60_tkcw_type tkcw;
-
- sysv60(0, 8, &tkcw);
- oldmask = tkcw.fp_trap;
- tkcw.fp_trap = newmask;
- sysv60(0, 8, &tkcw);
- return oldmask;
-
-}
-
-fp_except _DEFUN_VOID(fpgetmask)
-{
- v60_tkcw_type tkcw;
- sysv60(0, 8, &tkcw);
- return tkcw.fp_trap;
-}
-
-
-fp_rnd _DEFUN_VOID(fpgetround)
-{
- v60_tkcw_type tkcw;
- sysv60(0, 8, &tkcw);
- return tkcw.fp_rounding;
-}
-
-fp_rnd _DEFUN(fpsetround,(rnd),
- fp_rnd rnd)
-{
- fp_rnd oldrnd;
- v60_tkcw_type tkcw;
-
- sysv60(0, 8, &tkcw);
- oldrnd = tkcw.fp_rounding;
- tkcw.fp_rounding = rnd;
- sysv60(0, 8, &tkcw);
- return oldrnd;
-}
-
-
-
-
-
-fp_rdi _DEFUN_VOID(fpgetroundtoi)
-{
- v60_tkcw_type tkcw;
- sysv60(0, 8, &tkcw);
- return tkcw.integer_rounding;
-}
-
-fp_rdi _DEFUN(fpsetroundtoi,(rnd),
- fp_rdi rnd)
-{
- fp_rdi oldrnd;
- v60_tkcw_type tkcw;
-
- sysv60(0, 8, &tkcw);
- oldrnd = tkcw.integer_rounding;
- tkcw.integer_rounding = rnd;
- sysv60(0, 8, &tkcw);
- return oldrnd;
-}
-
-
-
diff --git a/newlib/libc/sys/sysvi386/fstat.s b/newlib/libc/sys/sysvi386/fstat.s
deleted file mode 100644
index ced264526..000000000
--- a/newlib/libc/sys/sysvi386/fstat.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _fstat
- .globl fstat
-_fstat:
-fstat:
- movl $0x1c, %eax
- lcall $7,$0
- jb _cerror
- xor %eax,%eax
- ret
diff --git a/newlib/libc/sys/sysvi386/getdents.s b/newlib/libc/sys/sysvi386/getdents.s
deleted file mode 100644
index 524a88727..000000000
--- a/newlib/libc/sys/sysvi386/getdents.s
+++ /dev/null
@@ -1,6 +0,0 @@
- .globl _getdents
-_getdents:
- movl $0x51, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/getegid.s b/newlib/libc/sys/sysvi386/getegid.s
deleted file mode 100644
index 3a9709841..000000000
--- a/newlib/libc/sys/sysvi386/getegid.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _getegid
- .globl getegid
-_getegid:
-getegid:
- movl $0x2f, %eax
- lcall $7,$0
- movl %edx,%eax
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/geteuid.s b/newlib/libc/sys/sysvi386/geteuid.s
deleted file mode 100644
index ae45c473f..000000000
--- a/newlib/libc/sys/sysvi386/geteuid.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _geteuid
- .globl geteuid
-_geteuid:
-geteuid:
- movl $0x18, %eax
- lcall $7,$0
- movl %edx,%eax
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/getgid.s b/newlib/libc/sys/sysvi386/getgid.s
deleted file mode 100644
index 47a6391f8..000000000
--- a/newlib/libc/sys/sysvi386/getgid.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .globl _getgid
- .globl getgid
-_getgid:
-getgid:
- movl $0x2f, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/getgroups.s b/newlib/libc/sys/sysvi386/getgroups.s
deleted file mode 100644
index d690adf44..000000000
--- a/newlib/libc/sys/sysvi386/getgroups.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .globl _getgroups
- .globl getgroups
-_getgroups:
-getgroups:
- movl $0x2b28, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/getpid.s b/newlib/libc/sys/sysvi386/getpid.s
deleted file mode 100644
index 6d19dffc9..000000000
--- a/newlib/libc/sys/sysvi386/getpid.s
+++ /dev/null
@@ -1,9 +0,0 @@
-
- .globl _getpid
- .globl getpid
-_getpid:
-getpid:
- movl $0x14, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/getuid.s b/newlib/libc/sys/sysvi386/getuid.s
deleted file mode 100644
index 9c4dfe3a4..000000000
--- a/newlib/libc/sys/sysvi386/getuid.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .globl _getuid
- .globl getuid
-_getuid:
-getuid:
- movl $0x18, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/ioctl.s b/newlib/libc/sys/sysvi386/ioctl.s
deleted file mode 100644
index b63597d1f..000000000
--- a/newlib/libc/sys/sysvi386/ioctl.s
+++ /dev/null
@@ -1,9 +0,0 @@
-
- .globl _ioctl
- .globl ioctl
-_ioctl:
-ioctl:
- movl $0x36, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/isatty.c b/newlib/libc/sys/sysvi386/isatty.c
deleted file mode 100644
index fa1e3557f..000000000
--- a/newlib/libc/sys/sysvi386/isatty.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <sys/termio.h>
-
-int
-isatty(fd)
-int fd; {
- struct termio buf;
-
- if (ioctl (fd, TCGETA, &buf) == -1)
- return 0;
- return 1;
-}
diff --git a/newlib/libc/sys/sysvi386/kill.s b/newlib/libc/sys/sysvi386/kill.s
deleted file mode 100644
index 805d8f778..000000000
--- a/newlib/libc/sys/sysvi386/kill.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _kill
- .globl kill
-_kill:
-kill:
- movl $0x25, %eax
- lcall $7,$0
- jb _cerror
- xor %eax, %eax
- ret
diff --git a/newlib/libc/sys/sysvi386/link.s b/newlib/libc/sys/sysvi386/link.s
deleted file mode 100644
index d298cd08e..000000000
--- a/newlib/libc/sys/sysvi386/link.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _link
- .globl link
-_link:
-link:
- movl $0x9, %eax
- lcall $7,$0
- jb _cerror
- xor %eax, %eax
- ret
diff --git a/newlib/libc/sys/sysvi386/lseek.s b/newlib/libc/sys/sysvi386/lseek.s
deleted file mode 100644
index 88b2fc1b0..000000000
--- a/newlib/libc/sys/sysvi386/lseek.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .globl _lseek
- .globl lseek
-_lseek:
-lseek:
- movl $0x13, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/mkdir.s b/newlib/libc/sys/sysvi386/mkdir.s
deleted file mode 100644
index b2888eb68..000000000
--- a/newlib/libc/sys/sysvi386/mkdir.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _mkdir
- .globl mkdir
-_mkdir:
-mkdir:
- movl $0x50, %eax
- lcall $7,$0
- jb _cerror
- xor %eax, %eax
- ret
diff --git a/newlib/libc/sys/sysvi386/open.s b/newlib/libc/sys/sysvi386/open.s
deleted file mode 100644
index 97356f1ad..000000000
--- a/newlib/libc/sys/sysvi386/open.s
+++ /dev/null
@@ -1,9 +0,0 @@
-
- .globl _open
- .globl open
-_open:
-open:
- movl $5, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/opendir.c b/newlib/libc/sys/sysvi386/opendir.c
deleted file mode 100644
index ce080e312..000000000
--- a/newlib/libc/sys/sysvi386/opendir.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)opendir.c 5.11 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <dirent.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-/*
- * open a directory.
- */
-DIR *
-opendir(name)
- const char *name;
-{
- register DIR *dirp;
- register int fd;
-
- if ((fd = open(name, 0)) == -1)
- return NULL;
- if (fcntl(fd, F_SETFD, 1) == -1 ||
- (dirp = (DIR *)malloc(sizeof(DIR))) == NULL) {
- close (fd);
- return NULL;
- }
- /*
- * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE
- * buffer that it cluster boundary aligned.
- * Hopefully this can be a big win someday by allowing page trades
- * to user space to be done by getdirentries()
- */
- dirp->dd_buf = malloc (512);
- dirp->dd_len = 512;
-
- if (dirp->dd_buf == NULL) {
- close (fd);
- return NULL;
- }
- dirp->dd_fd = fd;
- dirp->dd_loc = 0;
- dirp->dd_seek = 0;
- /*
- * Set up seek point for rewinddir.
- */
- return dirp;
-}
diff --git a/newlib/libc/sys/sysvi386/pathconf.s b/newlib/libc/sys/sysvi386/pathconf.s
deleted file mode 100644
index 23de786d9..000000000
--- a/newlib/libc/sys/sysvi386/pathconf.s
+++ /dev/null
@@ -1,6 +0,0 @@
- .globl pathconf
-pathconf:
- movl $0x2e28, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/pause.s b/newlib/libc/sys/sysvi386/pause.s
deleted file mode 100644
index 8e8bd229b..000000000
--- a/newlib/libc/sys/sysvi386/pause.s
+++ /dev/null
@@ -1,6 +0,0 @@
- .globl _pause
-_pause:
- movl $0x1d, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/pipe.s b/newlib/libc/sys/sysvi386/pipe.s
deleted file mode 100644
index 6365bcbe6..000000000
--- a/newlib/libc/sys/sysvi386/pipe.s
+++ /dev/null
@@ -1,12 +0,0 @@
- .globl _pipe
- .globl pipe
-_pipe:
-pipe:
- movl $0x2a, %eax
- lcall $7,$0
- jb _cerror
- movl 4(%esp), %ecx
- movl (%ecx), %eax
- movl 4(%ecx), %edx
- xor %eax, %eax
- ret
diff --git a/newlib/libc/sys/sysvi386/read.s b/newlib/libc/sys/sysvi386/read.s
deleted file mode 100644
index 8ecb5bacf..000000000
--- a/newlib/libc/sys/sysvi386/read.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .globl _read
- .globl read
-_read:
-read:
- movl $3, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/readdir.c b/newlib/libc/sys/sysvi386/readdir.c
deleted file mode 100644
index 350fa664f..000000000
--- a/newlib/libc/sys/sysvi386/readdir.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)readdir.c 5.7 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-#include <dirent.h>
-
-/*
- * get next entry in a directory.
- */
-struct dirent *
-readdir(dirp)
-register DIR *dirp; {
- register struct dirent *dp;
-
- for (;;) {
- if (dirp->dd_loc == 0) {
- dirp->dd_size = _getdents (dirp->dd_fd,
- dirp->dd_buf,
- dirp->dd_len);
-
- if (dirp->dd_size <= 0)
- return NULL;
- }
- if (dirp->dd_loc >= dirp->dd_size) {
- dirp->dd_loc = 0;
- continue;
- }
- dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc);
- if ((int)dp & 03) /* bogus pointer check */
- return NULL;
- if (dp->d_reclen <= 0 ||
- dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc)
- return NULL;
- dirp->dd_loc += dp->d_reclen;
- if (dp->d_ino == 0)
- continue;
- return (dp);
- }
-}
diff --git a/newlib/libc/sys/sysvi386/rename.s b/newlib/libc/sys/sysvi386/rename.s
deleted file mode 100644
index 61a69c59e..000000000
--- a/newlib/libc/sys/sysvi386/rename.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _rename
- .globl rename
-_rename:
-rename:
- movl $0x3028, %eax
- lcall $7,$0
- jb _cerror
- xor %eax, %eax
- ret
diff --git a/newlib/libc/sys/sysvi386/rewinddir.c b/newlib/libc/sys/sysvi386/rewinddir.c
deleted file mode 100644
index d52c013c4..000000000
--- a/newlib/libc/sys/sysvi386/rewinddir.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rewinddir.c 5.1 (Berkeley) 5/25/90";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <dirent.h>
-
-void
-rewinddir(dirp)
- DIR *dirp;
-{
- extern long _rewinddir;
-
- _seekdir((dirp), _rewinddir);
- _rewinddir = telldir(dirp);
-}
diff --git a/newlib/libc/sys/sysvi386/rmdir.s b/newlib/libc/sys/sysvi386/rmdir.s
deleted file mode 100644
index 427ee108d..000000000
--- a/newlib/libc/sys/sysvi386/rmdir.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _rmdir
- .globl rmdir
-_rmdir:
-rmdir:
- movl $0x4f, %eax
- lcall $7,$0
- jb _cerror
- xor %eax, %eax
- ret
diff --git a/newlib/libc/sys/sysvi386/sbrk.c b/newlib/libc/sys/sysvi386/sbrk.c
deleted file mode 100644
index 8ae3ed12b..000000000
--- a/newlib/libc/sys/sysvi386/sbrk.c
+++ /dev/null
@@ -1,21 +0,0 @@
-extern end;
-
-static void *curbrk = (char*)&end;
-
-void *
-sbrk(incr)
-int incr; {
- extern int errno;
- extern int _brk(void *);
- void *ptr = curbrk;
- int t;
-
- if (incr == 0)
- return curbrk;
- t = _brk (curbrk + incr);
- if (t == -1 && errno)
- return (void *)-1;
- curbrk = ((char *)curbrk) + incr;
- return ptr;
-}
-
diff --git a/newlib/libc/sys/sysvi386/scandir.c b/newlib/libc/sys/sysvi386/scandir.c
deleted file mode 100644
index 6c4116c9c..000000000
--- a/newlib/libc/sys/sysvi386/scandir.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)scandir.c 5.10 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Scan the directory dirname calling select to make a list of selected
- * directory entries then sort using qsort and compare routine dcomp.
- * Returns the number of entries and a pointer to a list of pointers to
- * struct dirent (through namelist). Returns -1 if there were any errors.
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <string.h>
-
-/*
- * The DIRSIZ macro gives the minimum record length which will hold
- * the directory entry. This requires the amount of space in struct dirent
- * without the d_name field, plus enough space for the name with a terminating
- * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary.
- */
-#undef DIRSIZ
-#define DIRSIZ(dp) \
- ((sizeof (struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
-
-int
-scandir(dirname, namelist, select, dcomp)
- const char *dirname;
- struct dirent ***namelist;
- int (*select) __P((struct dirent *));
- int (*dcomp) __P((const void *, const void *));
-{
- register struct dirent *d, *p, **names;
- register size_t nitems;
- struct stat stb;
- long arraysz;
- DIR *dirp;
-
- if ((dirp = opendir(dirname)) == NULL)
- return(-1);
- if (fstat(dirp->dd_fd, &stb) < 0)
- return(-1);
-
- /*
- * estimate the array size by taking the size of the directory file
- * and dividing it by a multiple of the minimum size entry.
- */
- arraysz = (stb.st_size / 24);
- names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
- if (names == NULL)
- return(-1);
-
- nitems = 0;
- while ((d = readdir(dirp)) != NULL) {
- if (select != NULL && !(*select)(d))
- continue; /* just selected names */
- /*
- * Make a minimum size copy of the data
- */
- p = (struct dirent *)malloc(DIRSIZ(d));
- if (p == NULL)
- return(-1);
- p->d_ino = d->d_ino;
- p->d_reclen = d->d_reclen;
- p->d_namlen = d->d_namlen;
- bcopy(d->d_name, p->d_name, p->d_namlen + 1);
- /*
- * Check to make sure the array has space left and
- * realloc the maximum size.
- */
- if (++nitems >= arraysz) {
- if (fstat(dirp->dd_fd, &stb) < 0)
- return(-1); /* just might have grown */
- arraysz = stb.st_size / 12;
- names = (struct dirent **)realloc((char *)names,
- arraysz * sizeof(struct dirent *));
- if (names == NULL)
- return(-1);
- }
- names[nitems-1] = p;
- }
- closedir(dirp);
- if (nitems && dcomp != NULL)
- qsort(names, nitems, sizeof(struct dirent *), dcomp);
- *namelist = names;
- return(nitems);
-}
-
-/*
- * Alphabetic order comparison routine for those who want it.
- */
-int
-alphasort(d1, d2)
- const void *d1;
- const void *d2;
-{
- return(strcmp((*(struct dirent **)d1)->d_name,
- (*(struct dirent **)d2)->d_name));
-}
diff --git a/newlib/libc/sys/sysvi386/seekdir.c b/newlib/libc/sys/sysvi386/seekdir.c
deleted file mode 100644
index 50331402a..000000000
--- a/newlib/libc/sys/sysvi386/seekdir.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)seekdir.c 5.7 (Berkeley) 6/1/90";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <dirent.h>
-
-/*
- * Seek to an entry in a directory.
- * _seekdir is in telldir.c so that it can share opaque data structures.
- */
-void
-seekdir(dirp, loc)
- DIR *dirp;
- long loc;
-{
-
- _seekdir(dirp, loc);
-}
diff --git a/newlib/libc/sys/sysvi386/setgid.s b/newlib/libc/sys/sysvi386/setgid.s
deleted file mode 100644
index a55dbf89e..000000000
--- a/newlib/libc/sys/sysvi386/setgid.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _setgid
- .globl setgid
-_setgid:
-setgid:
- movl $0x2e, %eax
- lcall $7,$0
- jb _cerror
- xor %eax,%eax
- ret
diff --git a/newlib/libc/sys/sysvi386/setuid.s b/newlib/libc/sys/sysvi386/setuid.s
deleted file mode 100644
index f24da1fd1..000000000
--- a/newlib/libc/sys/sysvi386/setuid.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _setuid
- .globl setuid
-_setuid:
-setuid:
- movl $0x17, %eax
- lcall $7,$0
- jb _cerror
- xor %eax,%eax
- ret
diff --git a/newlib/libc/sys/sysvi386/sigaction.s b/newlib/libc/sys/sysvi386/sigaction.s
deleted file mode 100644
index 35a1b8d2a..000000000
--- a/newlib/libc/sys/sysvi386/sigaction.s
+++ /dev/null
@@ -1,20 +0,0 @@
-/
-/ The SCO signal stuff seems to be weird. The POSIX stuff appears to
-/ "extended" system calls, and use values in eax and edx.
-/ Like most of the other signal routines, it takes a function pointer
-/ in %edx. Since this function is terribly small, I am including it
-/ in all of the ones that need it, for now at least. Seems silly to include
-/ a whole file for two instructions.
-
-sigret:
- addl $4, %esp
- lcall $0xf, $0
- .globl sigaction
-sigaction:
- movl $0x2728, %eax
- movl sigret, %edx
- lcall $7,$0
- jb _cerror
- ret
- addl $4, %esp
- lcall $0xf,$0
diff --git a/newlib/libc/sys/sysvi386/signal.s b/newlib/libc/sys/sysvi386/signal.s
deleted file mode 100644
index 2418eb02b..000000000
--- a/newlib/libc/sys/sysvi386/signal.s
+++ /dev/null
@@ -1,16 +0,0 @@
-/ According to the iBCS2 book, signal() has 0x30 in %eax, and the address
-/ of a function in %edx. This function is where a signal handler will
-/ return to; it should just adjust the stack pointer, and call $f,$0.
-/ Strange but true.
- .globl signal
-
-sigret:
- addl $4, %esp
- lcall $0xf, $0
-signal:
- movl $0x30, %eax
- movl sigret, %edx
- lcall $7,$0
- jb _cerror
-/ The iBCS2 book also clears out %eax here, which seems to be broken.
- ret
diff --git a/newlib/libc/sys/sysvi386/sigprocmask.s b/newlib/libc/sys/sysvi386/sigprocmask.s
deleted file mode 100644
index fa988d538..000000000
--- a/newlib/libc/sys/sysvi386/sigprocmask.s
+++ /dev/null
@@ -1,12 +0,0 @@
-/
-/ The SCO signal stuff seems to be weird. The POSIX stuff appears to
-/ "extended" system calls, and use values in eax and edx.
-/
- .globl sigprocmask
-sigprocmask:
- movl $0x2828, %eax
- lcall $7,$0
- jb _cerror
- ret
- addl $4, %esp
- lcall $0xf,$0
diff --git a/newlib/libc/sys/sysvi386/sleep.c b/newlib/libc/sys/sysvi386/sleep.c
deleted file mode 100644
index 723ee3ce2..000000000
--- a/newlib/libc/sys/sysvi386/sleep.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <sys/types.h>
-#include <sys/signal.h>
-
-unsigned
-sleep(unsigned secs) {
- extern time_t time (time_t *);
- time_t t = time(0);
-
- _alarm(secs);
- _pause();
- return (time(0) - t);
-}
diff --git a/newlib/libc/sys/sysvi386/speed.c b/newlib/libc/sys/sysvi386/speed.c
deleted file mode 100644
index 1b22c026f..000000000
--- a/newlib/libc/sys/sysvi386/speed.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#define _NO_MACROS
-#include <sys/termios.h>
-
-speed_t
-cfgetospeed(const struct termios *tp) {
- return tp->c_ospeed;
-}
-
-int
-cfsetospeed(struct termios *tp, speed_t speed) {
- tp->c_ospeed = speed;
- return 0;
-}
-
-speed_t
-cfgetispeed(const struct termios *tp) {
- return tp->c_ispeed;
-}
-
-int
-cfsetispeed(struct termios *tp, speed_t speed) {
- tp->c_ispeed = speed;
- return 0;
-}
diff --git a/newlib/libc/sys/sysvi386/stat.s b/newlib/libc/sys/sysvi386/stat.s
deleted file mode 100644
index 50c84bb97..000000000
--- a/newlib/libc/sys/sysvi386/stat.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _stat
- .globl stat
-_stat:
-stat:
- movl $0x12, %eax
- lcall $7,$0
- jb _cerror
- xor %eax,%eax
- ret
diff --git a/newlib/libc/sys/sysvi386/sys/dirent.h b/newlib/libc/sys/sysvi386/sys/dirent.h
deleted file mode 100644
index 728042176..000000000
--- a/newlib/libc/sys/sysvi386/sys/dirent.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef _SYS_DIRENT_H
-# define _SYS_DIRENT_H
-
-/*
- * This file was written to be compatible with the BSD directory
- * routines, so it looks like it. But it was written from scratch.
- * Sean Eric Fagan, sef@Kithrup.COM
- */
-
-typedef struct _dirdesc {
- int dd_fd;
- long dd_loc;
- long dd_size;
- char *dd_buf;
- int dd_len;
- long dd_seek;
-} DIR;
-
-# define __dirfd(dp) ((dp)->dd_fd)
-
-DIR *opendir (const char *);
-struct dirent *readdir (DIR *);
-void rewinddir (DIR *);
-int closedir (DIR *);
-
-#include <sys/types.h>
-
-struct dirent {
- long d_ino;
- off_t d_off;
- unsigned short d_reclen;
- /* we need better syntax for variable-sized arrays */
- char d_name[1];
-};
-
-#endif
diff --git a/newlib/libc/sys/sysvi386/sys/setjmp.h b/newlib/libc/sys/sysvi386/sys/setjmp.h
deleted file mode 100644
index 425b0ae89..000000000
--- a/newlib/libc/sys/sysvi386/sys/setjmp.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _JBLEN
-# define _JBLEN 36
-
-typedef char jmp_buf[_JBLEN];
-
-#endif /* _JBLEN */
diff --git a/newlib/libc/sys/sysvi386/sys/termio.h b/newlib/libc/sys/sysvi386/sys/termio.h
deleted file mode 100644
index 2ef33b8dc..000000000
--- a/newlib/libc/sys/sysvi386/sys/termio.h
+++ /dev/null
@@ -1,82 +0,0 @@
-#ifndef _SYS_TERMIO_H
-# define _SYS_TERMIO_H
-
-# define TCGETA (('T'<<8)|1)
-# define TCSBRK (('T'<<8)|5)
-# define NCC 8
-
-# define IGNBRK 000001
-# define BRKINT 000002
-# define IGNPAR 000004
-# define INPCK 000020
-# define ISTRIP 000040
-# define INLCR 000100
-# define IGNCR 000200
-# define ICRNL 000400
-# define IXON 002000
-# define IXOFF 010000
-
-# define OPOST 000001
-# define OCRNL 000004
-# define ONLCR 000010
-# define ONOCR 000020
-# define TAB3 014000
-
-# define CLOCAL 004000
-# define CREAD 000200
-# define CSIZE 000060
-# define CS5 0
-# define CS6 020
-# define CS7 040
-# define CS8 060
-# define CSTOPB 000100
-# define HUPCL 002000
-# define PARENB 000400
-# define PAODD 001000
-
-# define ECHO 0000010
-# define ECHOE 0000020
-# define ECHOK 0000040
-# define ECHONL 0000100
-# define ICANON 0000002
-# define IEXTEN 0000400 /* anybody know *what* this does?! */
-# define ISIG 0000001
-# define NOFLSH 0000200
-
-# define VEOF 4 /* also VMIN -- thanks, AT&T */
-# define VEOL 5 /* also VTIME -- thanks again */
-# define VERASE 2
-# define VINTR 0
-# define VKILL 3
-# define VMIN 4 /* also VEOF */
-# define VQUIT 1
-# define VTIME 5 /* also VEOL */
-
-# define B0 000000
-# define B50 000001
-# define B75 000002
-# define B110 000003
-# define B134 000004
-# define B150 000005
-# define B200 000006
-# define B300 000007
-# define B600 000010
-# define B1200 000011
-# define B1800 000012
-# define B2400 000013
-# define B4800 000014
-# define B9600 000015
-# define B19200 000016
-# define B38400 000017
-
-struct termio {
- unsigned short c_iflag;
- unsigned short c_oflag;
- unsigned short c_cflag;
- unsigned short c_lflag;
- char c_line;
- unsigned char c_cc[NCC];
-};
-
-#endif /* _SYS_TERMIO_H */
-
diff --git a/newlib/libc/sys/sysvi386/sys/termios.h b/newlib/libc/sys/sysvi386/sys/termios.h
deleted file mode 100644
index edc81b3d5..000000000
--- a/newlib/libc/sys/sysvi386/sys/termios.h
+++ /dev/null
@@ -1,121 +0,0 @@
-#ifndef _SYS_TERMIOS_H
-# define _SYS_TERMIOS_H
-
-# define _XCGETA (('x'<<8)|1)
-# define _XCSETA (('x'<<8)|2)
-# define _XCSETAW (('x'<<8)|3)
-# define _XCSETAF (('x'<<8)|4)
-# define _TCSBRK (('T'<<8)|5)
-# define _TCFLSH (('T'<<8)|7)
-# define _TCXONC (('T'<<8)|6)
-
-# define TCOOFF 0
-# define TCOON 1
-# define TCIOFF 2
-# define TCION 3
-
-# define TCIFLUSH 0
-# define TCOFLUSH 1
-# define TCIOFLUSH 2
-
-# define NCCS 13
-
-# define TCSAFLUSH _XCSETAF
-# define TCSANOW _XCSETA
-# define TCSADRAIN _XCSETAW
-# define TCSADFLUSH _XCSETAF
-
-# define IGNBRK 000001
-# define BRKINT 000002
-# define IGNPAR 000004
-# define INPCK 000020
-# define ISTRIP 000040
-# define INLCR 000100
-# define IGNCR 000200
-# define ICRNL 000400
-# define IXON 002000
-# define IXOFF 010000
-
-# define OPOST 000001
-# define OCRNL 000004
-# define ONLCR 000010
-# define ONOCR 000020
-# define TAB3 014000
-
-# define CLOCAL 004000
-# define CREAD 000200
-# define CSIZE 000060
-# define CS5 0
-# define CS6 020
-# define CS7 040
-# define CS8 060
-# define CSTOPB 000100
-# define HUPCL 002000
-# define PARENB 000400
-# define PAODD 001000
-
-# define ECHO 0000010
-# define ECHOE 0000020
-# define ECHOK 0000040
-# define ECHONL 0000100
-# define ICANON 0000002
-# define IEXTEN 0000400 /* anybody know *what* this does?! */
-# define ISIG 0000001
-# define NOFLSH 0000200
-# define TOSTOP 0001000
-
-# define VEOF 4 /* also VMIN -- thanks, AT&T */
-# define VEOL 5 /* also VTIME -- thanks again */
-# define VERASE 2
-# define VINTR 0
-# define VKILL 3
-# define VMIN 4 /* also VEOF */
-# define VQUIT 1
-# define VSUSP 10
-# define VTIME 5 /* also VEOL */
-# define VSTART 11
-# define VSTOP 12
-
-# define B0 000000
-# define B50 000001
-# define B75 000002
-# define B110 000003
-# define B134 000004
-# define B150 000005
-# define B200 000006
-# define B300 000007
-# define B600 000010
-# define B1200 000011
-# define B1800 000012
-# define B2400 000013
-# define B4800 000014
-# define B9600 000015
-# define B19200 000016
-# define B38400 000017
-
-typedef unsigned char cc_t;
-typedef unsigned short tcflag_t;
-typedef char speed_t;
-
-struct termios {
- tcflag_t c_iflag;
- tcflag_t c_oflag;
- tcflag_t c_cflag;
- tcflag_t c_lflag;
- char c_line;
- cc_t c_cc[NCCS];
- speed_t c_ispeed;
- speed_t c_ospeed;
-};
-
-# ifndef _NO_MACROS
-
-# define cfgetospeed(tp) ((tp)->c_ospeed)
-# define cfgetispeed(tp) ((tp)->c_ispeed)
-# define cfsetospeed(tp,s) (((tp)->c_ospeed = (s)), 0)
-# define cfsetispeed(tp,s) (((tp)->c_ispeed = (s)), 0)
-# define tcdrain(fd) _ioctl (fd, _TCSBRK, 1)
-# endif /* _NO_MACROS */
-
-#endif /* _SYS_TERMIOS_H */
-
diff --git a/newlib/libc/sys/sysvi386/sys/utime.h b/newlib/libc/sys/sysvi386/sys/utime.h
deleted file mode 100644
index 80b1daa74..000000000
--- a/newlib/libc/sys/sysvi386/sys/utime.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _SYS_UTIME_H
-# define _SYS_UTIME_H
-
-#include <time.h>
-
-struct utimbuf {
- time_t actime;
- time_t modtime;
-};
-
-#endif /* _SYS_UTIME_H */
-
diff --git a/newlib/libc/sys/sysvi386/sys/utmp.h b/newlib/libc/sys/sysvi386/sys/utmp.h
deleted file mode 100644
index f519e6af0..000000000
--- a/newlib/libc/sys/sysvi386/sys/utmp.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef _UTMP_H
-# define _UTMP_H
-
-#include <sys/types.h>
-
-# define UTMP_FILE "/etc/utmp"
-# define WTMP_FILE "/etc/wtmp"
-
-struct utmp {
- char ut_user[8]; /* how limited */
- char ut_id[4]; /* ditto */
- char ut_line[12]; /* I'm repeating myself */
- short ut_pid;
- short ut_type;
- struct exit_status {
- short e_termination;
- short e_exit;
- } ut_exit; /* for DEAD_PROCESS processes */
- time_t ut_time;
-};
-
-/* Definitions for ut_type fields */
-
-# define EMPTY 0
-# define RUN_LVL 1
-# define BOOT_TIME 2
-# define OLD_TIME 3
-# define NEW_TIME 4
-# define INIT_PROCESS 5
-# define LOGIN_PROCESS 6
-# define USER_PROCESS 7
-# define DEAD_PROCESS 8
-# define ACCOUNTING 9
-# define UTMAXTYPE ACCOUNTING
-
-# define RUNLVL_MSG "run-level %c"
-# define BOOT_MSG "system boot"
-# define OTIME_MSG "old time"
-# define NTIME_MSG "new time"
-
-#endif /* _UTMP_H */
-
-
diff --git a/newlib/libc/sys/sysvi386/sys/wait.h b/newlib/libc/sys/sysvi386/sys/wait.h
deleted file mode 100644
index 7c36f32db..000000000
--- a/newlib/libc/sys/sysvi386/sys/wait.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef _WAIT_H
-# define _WAIT_H
-
-# define WNOHANG 1
-# define WUNTRACED 2
-
-/*
- * Unlike the atrocity that BSD ended up using, we do not have a "union
- * wait," although I could probably implement one. Given the code I
- * sometimes end up porting, it might be a good thing. Anyway, the
- * format of a stat thingy, filled in by the wait*() routines, is:
- * struct {
- * int filler:16;
- * union {
- * struct stopped {
- * int signo:8;
- * int o177:8; // will be 0177
- * };
- * struct exited {
- * int retval:8;
- * int zero:8; // 0, obviously 8-)
- * };
- * struct termed {
- * int zero:8; // zeroes
- * int corep:1; // was there a core file?
- * int signo:7; // what?! Only 127 signals?!
- * };
- * int value:16;
- * };
- * };
- *
- * Braver souls than I can turn that into a union wait, if desired. Ick.
- */
-
-# define WIFEXITED(val) ((val)&0xff)
-# define WEXITSTATUS(val) (((val)>>8)&0xff)
-# define WIFSIGNALED(val) ((val) && !((val)&0xff))
-# define WTERMSIG(val) (((val)>>8)&0x7f)
-# define WIFSTOPPED(val) (((val)&0xff)==0177)
-# define WSTOPSIG(val) (((val)>>8)&0xff)
-#endif /* _SYS_WAIT_H */
-
diff --git a/newlib/libc/sys/sysvi386/sysconf.s b/newlib/libc/sys/sysvi386/sysconf.s
deleted file mode 100644
index 99bbc6040..000000000
--- a/newlib/libc/sys/sysvi386/sysconf.s
+++ /dev/null
@@ -1,6 +0,0 @@
- .globl sysconf
-sysconf:
- movl $0x2d28, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/tcgetattr.c b/newlib/libc/sys/sysvi386/tcgetattr.c
deleted file mode 100644
index e368418c1..000000000
--- a/newlib/libc/sys/sysvi386/tcgetattr.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <sys/termios.h>
-
-int
-tcgetattr (int fd, struct termios *tp) {
- return _ioctl (fd, _XCGETA, tp);
-}
diff --git a/newlib/libc/sys/sysvi386/tcline.c b/newlib/libc/sys/sysvi386/tcline.c
deleted file mode 100644
index 39d4699e0..000000000
--- a/newlib/libc/sys/sysvi386/tcline.c
+++ /dev/null
@@ -1,84 +0,0 @@
-#define _NO_MACROS
-#include <sys/unistd.h>
-#include <sys/termios.h>
-#include <errno.h>
-
-int
-tcsendbreak (int fd, int dur) {
- do {
- if (_ioctl (fd, _TCSBRK, 0) == -1)
- return -1;
- } while (dur--);
- return 0;
-}
-
-int
-tcdrain (int fd) {
- return _ioctl (fd, _TCSBRK, 1);
-}
-
-int
-tcflush(int fd, int what) {
- return _ioctl (fd, _TCFLSH, what);
-}
-
-/*
- * I'm not positive about this function. I *think* it's right,
- * but I could be missing something.
- */
-
-int
-tcflow (int fd, int action) {
- struct termios t;
-
- switch (action) {
- case TCOOFF:
- case TCOON:
- return _ioctl (fd, _TCXONC, action);
-/*
- * Here is where I'm not terribly certain. 1003.1 says:
- * if action is TCIOFF, the system shall transmit a STOP
- * character, which is intended to cause the terminal device
- * to stop transmitting data to the system. (Similarly for
- * TCION.)
- * I *assume* that means I find out what VSTOP for the
- * terminal device is, and then write it. 1003.1 also does
- * not say what happens if c_cc[VSTOP] is _POSIX_VDISABLE;
- * I assume it should reaturn EINVAL, so that's what I do.
- * Anyway, here's the code. It might or might not be right.
- */
- case TCIOFF:
- if (tcgetattr (fd, &t) == -1)
- return -1;
- if (tcgetattr (fd, &t) == -1)
- return -1;
-#ifdef _POSIX_VDISABLE
- if (t.c_cc[VSTOP] == _POSIX_VDISABLE) {
- errno = EINVAL;
- return -1;
- }
-#endif
- if (write (fd, &t.c_cc[VSTOP], 1) == 1)
- return 0;
- else
- return -1;
- case TCION:
- if (tcgetattr (fd, &t) == -1)
- return -1;
- if (tcgetattr (fd, &t) == -1)
- return -1;
-#ifdef _POSIX_VDISABLE
- if (t.c_cc[VSTART] == _POSIX_VDISABLE) {
- errno = EINVAL;
- return -1;
- }
-#endif
- if (write (fd, &t.c_cc[VSTART], 1) == 1)
- return 0;
- else
- return -1;
- default:
- errno = EINVAL;
- return -1;
- }
-}
diff --git a/newlib/libc/sys/sysvi386/tcsetattr.c b/newlib/libc/sys/sysvi386/tcsetattr.c
deleted file mode 100644
index 1df92b281..000000000
--- a/newlib/libc/sys/sysvi386/tcsetattr.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <sys/termios.h>
-
-int
-tcsetattr (int fd, int opts, const struct termios *tp) {
- return _ioctl (fd, opts, tp);
-}
-
diff --git a/newlib/libc/sys/sysvi386/telldir.c b/newlib/libc/sys/sysvi386/telldir.c
deleted file mode 100644
index 37d9de638..000000000
--- a/newlib/libc/sys/sysvi386/telldir.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)telldir.c 5.9 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-/*
- * The option SINGLEUSE may be defined to say that a telldir
- * cookie may be used only once before it is freed. This option
- * is used to avoid having memory usage grow without bound.
- */
-#define SINGLEUSE
-
-/*
- * One of these structures is malloced to describe the current directory
- * position each time telldir is called. It records the current magic
- * cookie returned by getdirentries and the offset within the buffer
- * associated with that return value.
- */
-struct ddloc {
- struct ddloc *loc_next;/* next structure in list */
- long loc_index; /* key associated with structure */
- long loc_seek; /* magic cookie returned by getdirentries */
- long loc_loc; /* offset of entry in buffer */
-};
-
-#define NDIRHASH 32 /* Num of hash lists, must be a power of 2 */
-#define LOCHASH(i) ((i)&(NDIRHASH-1))
-
-static long dd_loccnt; /* Index of entry for sequential readdir's */
-static struct ddloc *dd_hash[NDIRHASH]; /* Hash list heads for ddlocs */
-
-/*
- * return a pointer into a directory
- */
-long
-telldir(dirp)
- const DIR *dirp;
-{
- register int index;
- register struct ddloc *lp;
-
- if ((lp = (struct ddloc *)malloc(sizeof(struct ddloc))) == NULL)
- return (-1);
- index = dd_loccnt++;
- lp->loc_index = index;
- lp->loc_seek = dirp->dd_seek;
- lp->loc_loc = dirp->dd_loc;
- lp->loc_next = dd_hash[LOCHASH(index)];
- dd_hash[LOCHASH(index)] = lp;
- return (index);
-}
-
-/*
- * seek to an entry in a directory.
- * Only values returned by "telldir" should be passed to seekdir.
- */
-void
-_seekdir(dirp, loc)
- register DIR *dirp;
- long loc;
-{
- register struct ddloc *lp;
- register struct ddloc **prevlp;
- struct dirent *dp;
- extern long lseek();
-
- prevlp = &dd_hash[LOCHASH(loc)];
- lp = *prevlp;
- while (lp != NULL) {
- if (lp->loc_index == loc)
- break;
- prevlp = &lp->loc_next;
- lp = lp->loc_next;
- }
- if (lp == NULL)
- return;
- if (lp->loc_loc == dirp->dd_loc && lp->loc_seek == dirp->dd_seek)
- goto found;
- (void) lseek(dirp->dd_fd, lp->loc_seek, 0);
- dirp->dd_seek = lp->loc_seek;
- dirp->dd_loc = 0;
- while (dirp->dd_loc < lp->loc_loc) {
- dp = readdir(dirp);
- if (dp == NULL)
- break;
- }
-found:
-#ifdef SINGLEUSE
- *prevlp = lp->loc_next;
- free((caddr_t)lp);
-#endif
-}
diff --git a/newlib/libc/sys/sysvi386/time.s b/newlib/libc/sys/sysvi386/time.s
deleted file mode 100644
index c5617891c..000000000
--- a/newlib/libc/sys/sysvi386/time.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .globl _time
- .globl time
-_time:
-time:
- movl $0xd, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/times.s b/newlib/libc/sys/sysvi386/times.s
deleted file mode 100644
index 007de1e1e..000000000
--- a/newlib/libc/sys/sysvi386/times.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .globl _times
- .globl times
-_times:
-times:
- movl $0x2b, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/unlink.s b/newlib/libc/sys/sysvi386/unlink.s
deleted file mode 100644
index b85e87c27..000000000
--- a/newlib/libc/sys/sysvi386/unlink.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _unlink
- .globl unlink
-_unlink:
-unlink:
- movl $0xa, %eax
- lcall $7,$0
- jb _cerror
- xor %eax, %eax
- ret
diff --git a/newlib/libc/sys/sysvi386/utime.s b/newlib/libc/sys/sysvi386/utime.s
deleted file mode 100644
index 23fc50476..000000000
--- a/newlib/libc/sys/sysvi386/utime.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .globl _utime
- .globl utime
-_utime:
-utime:
- movl $0x1e, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvi386/wait.s b/newlib/libc/sys/sysvi386/wait.s
deleted file mode 100644
index 1ae8b0c6b..000000000
--- a/newlib/libc/sys/sysvi386/wait.s
+++ /dev/null
@@ -1,13 +0,0 @@
- .globl _wait
- .globl wait
-_wait:
-wait:
- movl $0x7, %eax
- lcall $7,$0
- jb _cerror
- movl 4(%esp), %ecx
- testl %ecx, %ecx
- je bye
- movl %edx, (%ecx)
-bye:
- ret
diff --git a/newlib/libc/sys/sysvi386/waitpid.s b/newlib/libc/sys/sysvi386/waitpid.s
deleted file mode 100644
index 598099f91..000000000
--- a/newlib/libc/sys/sysvi386/waitpid.s
+++ /dev/null
@@ -1,18 +0,0 @@
- .globl _waitpid
- .globl waitpid
-_waitpid:
-waitpid:
- pushfl
- popl %eax
- orl $0x8c4,%eax
- pushl %eax
- popfl
- movl $0x7, %eax
- lcall $7,$0
- jb _cerror
- movl 8(%esp), %ecx
- testl %ecx, %ecx
- je bye
- movl %edx, (%ecx)
-bye:
- ret
diff --git a/newlib/libc/sys/sysvi386/write.s b/newlib/libc/sys/sysvi386/write.s
deleted file mode 100644
index 05374652c..000000000
--- a/newlib/libc/sys/sysvi386/write.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .globl _write
- .globl write
-_write:
-write:
- movl $4, %eax
- lcall $7,$0
- jb _cerror
- ret
diff --git a/newlib/libc/sys/sysvnecv70/Makefile.am b/newlib/libc/sys/sysvnecv70/Makefile.am
deleted file mode 100644
index cc0d79411..000000000
--- a/newlib/libc/sys/sysvnecv70/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = ioctl.s isatty.s read.s lseek.s close.s sbrk.s fstat.s \
- cerror.s exit.s write.s sysv60.s fpx.c fps.s open.s
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/sysvnecv70/Makefile.in b/newlib/libc/sys/sysvnecv70/Makefile.in
deleted file mode 100644
index 60bb205e7..000000000
--- a/newlib/libc/sys/sysvnecv70/Makefile.in
+++ /dev/null
@@ -1,331 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = ioctl.s isatty.s read.s lseek.s close.s sbrk.s fstat.s cerror.s exit.s write.s sysv60.s fpx.c fps.s open.s
-
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = ioctl.o isatty.o read.o lseek.o close.o sbrk.o fstat.o \
-cerror.o exit.o write.o sysv60.o fpx.o fps.o open.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/sysvnecv70/aclocal.m4 b/newlib/libc/sys/sysvnecv70/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/sysvnecv70/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/sysvnecv70/cerror.s b/newlib/libc/sys/sysvnecv70/cerror.s
deleted file mode 100644
index 9827c1087..000000000
--- a/newlib/libc/sys/sysvnecv70/cerror.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl cerror
-cerror: mov.w r0,_errno
- neg.w #1,r0
- ret #0
-
- .data
- .globl _errno
-_errno: .word 0
-
diff --git a/newlib/libc/sys/sysvnecv70/close.s b/newlib/libc/sys/sysvnecv70/close.s
deleted file mode 100644
index 5c80dcd30..000000000
--- a/newlib/libc/sys/sysvnecv70/close.s
+++ /dev/null
@@ -1,10 +0,0 @@
-
- .globl __close
- .globl _close
-__close:
-_close: chlvl #0,#6
- jnl ok
- jmp cerror
-ok: xor.w r0,r0
- ret #0
-
diff --git a/newlib/libc/sys/sysvnecv70/configure b/newlib/libc/sys/sysvnecv70/configure
deleted file mode 100755
index 7814031e1..000000000
--- a/newlib/libc/sys/sysvnecv70/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=sysv60.s
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/sysvnecv70/configure.in b/newlib/libc/sys/sysvnecv70/configure.in
deleted file mode 100644
index 72710998f..000000000
--- a/newlib/libc/sys/sysvnecv70/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/sysvnecv70 configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(sysv60.s)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/sysvnecv70/crt0.s b/newlib/libc/sys/sysvnecv70/crt0.s
deleted file mode 100644
index 7c4bc77cf..000000000
--- a/newlib/libc/sys/sysvnecv70/crt0.s
+++ /dev/null
@@ -1,28 +0,0 @@
- .globl start
-start:
- sub.w #0x8,sp
- mov.w 0x8[sp],[sp]
- movea.w 0xc[sp],r0
- mov.w r0,0x4[sp]
-tloop: test.w [r0+]
- jne tloop
- cmp.w r0,[0x4[sp]]
- jge l1
- sub.w #0x4,r0
-l1: mov.w r0,0x8[sp]
- mov.w r0,_environ
-
-
- call _main,[sp]
- add.w #0xc,sp
- push r0
- call _exit,[sp]
- add.w #0x4,sp
- chlvl #0,#1
-
- .data
-
- .globl _environ
-_environ:
- .word 0
-
diff --git a/newlib/libc/sys/sysvnecv70/exit.s b/newlib/libc/sys/sysvnecv70/exit.s
deleted file mode 100644
index a37a17c21..000000000
--- a/newlib/libc/sys/sysvnecv70/exit.s
+++ /dev/null
@@ -1,7 +0,0 @@
-
- .globl __exit
-__exit: chlvl #0,#1
- jnl ok
- jmp cerror
-ok: ret #0
-
diff --git a/newlib/libc/sys/sysvnecv70/fps.s b/newlib/libc/sys/sysvnecv70/fps.s
deleted file mode 100644
index 83214dff4..000000000
--- a/newlib/libc/sys/sysvnecv70/fps.s
+++ /dev/null
@@ -1,18 +0,0 @@
- .globl _fpgetsticky
-_fpgetsticky:
- getpsw r0
- and.w #0x1f00,r0
- shl.w #0xf8,r0
- ret #0x0
-
-
- .globl _fpsetsticky
-_fpsetsticky:
- getpsw r0
- mov.w [ap],r1
- shl.w #0x8,r1
- updpsw.h r1,#0x1f00
- trapfl
- and.w #0x1f00,r0
- shl.w #0xf8,r0
- ret #0x0
diff --git a/newlib/libc/sys/sysvnecv70/fpx.c b/newlib/libc/sys/sysvnecv70/fpx.c
deleted file mode 100644
index d55a1e30f..000000000
--- a/newlib/libc/sys/sysvnecv70/fpx.c
+++ /dev/null
@@ -1,73 +0,0 @@
-#include <ieeefp.h>
-#include <machine/registers.h>
-
-
-fp_except _DEFUN(fpsetmask,(newmask),
- fp_except newmask)
-
-{
- fp_except oldmask;
- v60_tkcw_type tkcw;
-
- sysv60(0, 8, &tkcw);
- oldmask = tkcw.fp_trap;
- tkcw.fp_trap = newmask;
- sysv60(0, 8, &tkcw);
- return oldmask;
-
-}
-
-fp_except _DEFUN_VOID(fpgetmask)
-{
- v60_tkcw_type tkcw;
- sysv60(0, 8, &tkcw);
- return tkcw.fp_trap;
-}
-
-
-fp_rnd _DEFUN_VOID(fpgetround)
-{
- v60_tkcw_type tkcw;
- sysv60(0, 8, &tkcw);
- return tkcw.fp_rounding;
-}
-
-fp_rnd _DEFUN(fpsetround,(rnd),
- fp_rnd rnd)
-{
- fp_rnd oldrnd;
- v60_tkcw_type tkcw;
-
- sysv60(0, 8, &tkcw);
- oldrnd = tkcw.fp_rounding;
- tkcw.fp_rounding = rnd;
- sysv60(0, 8, &tkcw);
- return oldrnd;
-}
-
-
-
-
-
-fp_rdi _DEFUN_VOID(fpgetroundtoi)
-{
- v60_tkcw_type tkcw;
- sysv60(0, 8, &tkcw);
- return tkcw.integer_rounding;
-}
-
-fp_rdi _DEFUN(fpsetroundtoi,(rnd),
- fp_rdi rnd)
-{
- fp_rdi oldrnd;
- v60_tkcw_type tkcw;
-
- sysv60(0, 8, &tkcw);
- oldrnd = tkcw.integer_rounding;
- tkcw.integer_rounding = rnd;
- sysv60(0, 8, &tkcw);
- return oldrnd;
-}
-
-
-
diff --git a/newlib/libc/sys/sysvnecv70/fstat.s b/newlib/libc/sys/sysvnecv70/fstat.s
deleted file mode 100644
index f646859c0..000000000
--- a/newlib/libc/sys/sysvnecv70/fstat.s
+++ /dev/null
@@ -1,11 +0,0 @@
-
- .globl __fstat
- .globl _fstat
-__fstat:
-_fstat: chlvl #0,#0x1c
- jnl ok
- jmp cerror
-ok: xor.w r0,r0
- ret #0
-
-
diff --git a/newlib/libc/sys/sysvnecv70/ioctl.s b/newlib/libc/sys/sysvnecv70/ioctl.s
deleted file mode 100644
index de3aad548..000000000
--- a/newlib/libc/sys/sysvnecv70/ioctl.s
+++ /dev/null
@@ -1,9 +0,0 @@
-
- .globl __ioctl
- .globl _ioctl
-__ioctl:
-_ioctl: chlvl #0,#0x36
- jnl ok
- jmp cerror
-ok: ret #0
-
diff --git a/newlib/libc/sys/sysvnecv70/isatty.s b/newlib/libc/sys/sysvnecv70/isatty.s
deleted file mode 100644
index 5f2c1d9c8..000000000
--- a/newlib/libc/sys/sysvnecv70/isatty.s
+++ /dev/null
@@ -1,19 +0,0 @@
- .globl _isatty
- .globl __isatty
-
-_isatty:
-__isatty:
- prepare #0x14
- movea.w -0x12[fp],[-sp]
- push #0x5401
- push [ap]
- call _ioctl,[sp]
- add.w #0xc,sp
- test.w r0
- jge ret1
- mov.w #0x0,r0
- dispose
- ret #0x0
-ret1: mov.w #0x1,r0
- dispose
- ret #0
diff --git a/newlib/libc/sys/sysvnecv70/lseek.s b/newlib/libc/sys/sysvnecv70/lseek.s
deleted file mode 100644
index 4b55e98e3..000000000
--- a/newlib/libc/sys/sysvnecv70/lseek.s
+++ /dev/null
@@ -1,9 +0,0 @@
-
- .globl __lseek
- .globl _lseek
-__lseek:
-_lseek: chlvl #0,#0x13
- jnl ok
- jmp cerror
-ok: ret #0
-
diff --git a/newlib/libc/sys/sysvnecv70/open.s b/newlib/libc/sys/sysvnecv70/open.s
deleted file mode 100644
index 20c1ce338..000000000
--- a/newlib/libc/sys/sysvnecv70/open.s
+++ /dev/null
@@ -1,10 +0,0 @@
-
- .globl __open
- .globl _open
-__open:
-_open: chlvl #0,#5
- jnl ok
- jmp cerror
-ok: xor.w r0,r0
- ret #0
-
diff --git a/newlib/libc/sys/sysvnecv70/read.s b/newlib/libc/sys/sysvnecv70/read.s
deleted file mode 100644
index 7d517ab8e..000000000
--- a/newlib/libc/sys/sysvnecv70/read.s
+++ /dev/null
@@ -1,9 +0,0 @@
-
- .globl __read
- .globl _read
-__read:
-_read: chlvl #0,#3
- jnl ok
- jmp cerror
-ok: ret #0
-
diff --git a/newlib/libc/sys/sysvnecv70/sbrk.s b/newlib/libc/sys/sysvnecv70/sbrk.s
deleted file mode 100644
index 1d5f9242a..000000000
--- a/newlib/libc/sys/sysvnecv70/sbrk.s
+++ /dev/null
@@ -1,34 +0,0 @@
-
- .globl _sbrk
- .globl __sbrk
-_sbrk:
-__sbrk:
- mov.w tptr,r0
- test.w [ap]
- je justreport
- add.w r0,[ap]
- push [ap]
- mov.w ap,r3
- mov.w sp,ap
- chlvl #0x0,#0x11
- jnl ok
- add.w #0x4,sp
- jmp cerror
-ok: add.w #0x4,sp
- mov.w tptr,r0
- mov.w [r3],tptr
-justreport:
- ret #0x0
-
- .globl _brk
- .globl __brk
-__brk:
-_brk: chlvl #0x0,#0x11
- jnl ok1
- jmp cerror
-ok1: mov.w [ap],63
- xor.w r0,r0
- ret #0x0
-
- .data
-tptr: .word _end
diff --git a/newlib/libc/sys/sysvnecv70/sysv60.s b/newlib/libc/sys/sysvnecv70/sysv60.s
deleted file mode 100644
index 2ab7c7a05..000000000
--- a/newlib/libc/sys/sysvnecv70/sysv60.s
+++ /dev/null
@@ -1,9 +0,0 @@
- .globl _sysv60
-_sysv60:
- chlvl #0,#0x32
- jnl ok
- jmp cerror
-ok: xor.w r0,r0
- ret #0
-
-
diff --git a/newlib/libc/sys/sysvnecv70/sysvnecv70.tex b/newlib/libc/sys/sysvnecv70/sysvnecv70.tex
deleted file mode 100644
index c2d038aec..000000000
--- a/newlib/libc/sys/sysvnecv70/sysvnecv70.tex
+++ /dev/null
@@ -1,129 +0,0 @@
-@node syscalls,machine,reentrancy,Top
-@chapter NEC V70 system calls
-
-The library needs a certain amount of system-specific support in order
-to operate. These routines have to be written for each unique
-target environment. For testing purposes,
-a set of system calls specific to an NEC V70 Unix PC running AT&T Unix
-System V R2 are included. These files are in the @file{sys/sysvnecv70}
-directory.
-
-All the calls have to be implemented in order to avoid link time
-errors, but the implementation need not include all possible
-functionality; in general, for any functionality that isn't
-available, returning an error code is sufficient.
-
-@section Input/Output
-
-The V70 target may not have any character I/O devices.
-In this case, the @code{fstat}, @code{ioctl}, @code{isatty},
-@code{lseek}, @code{read} and @code{write} routines may all return @code{-1},
-to signal failure (inspect @file{cerror.s} to see how to do this).
-
-Sometimes it is correct to implement the functions in a very
-simple and machine specific way. For instance, the target board may
-have one serial line.
-
-In this case, the @code{write} system call can be ``hard-wired'' to
-always print to the serial device, no matter what the supplied file
-handle says. Similarly, the other I/O system calls can be written to
-take advantage of a known configuration.
-
-Note that the library starts up assuming that three files are already
-open. File handles used are:
-@table @code
-@item 0
-Is used for all input from @code{stdin}.
-@item 1
-Is used for all output to @code{stdout}. This includes functions like
-@code{putc} and @code{printf}.
-@item 2
-Is used for all output to @code{stderr}. The library will use this
-file to print error messages from the math functions. Output can
-also be sent to @code{stderr} by @code{fprintf(stderr,@dots{})}
-@end table
-@section Example @code{write} routine
-On a board with a very simple I/O structure, this would be adequate:
-
-@example
-
-@group
-char *duart_status = DUART_ADDR;
-
-void poll()
-@{
- /* Dummy function to fool optimizer */
-@}
-
-int write(fd, string, len)
-int fd;
-char *string;
-int len;
-@{
- int i;
-
- for (i = 0; i < len; i++)
- @{
- while (*duart_status & DUART_BUSY)
- poll();
- *duart_port = string[i];
- @}
- return len;
-@}
-@end group
-@end example
-
-@section Memory allocation
-
-The library allocates memory from the heap either for its own use, or when
-you explicitly call @code{malloc}. It asks the system for
-memory by calling the @code{sbrk} function.
-
-On a Unix system, @code{sbrk} keeps track of the heap's extent by keeping a
-pointer to the end of the @code{bss} section. Unix linkers
-traditionaly mark the end of @code{bss} by creating a symbol
-@code{_end}. When the library wants more memory, it calls
-@code{sbrk} with the size of the request. @code{sbrk} must then
-perform an operation specific to the target environment, and return a pointer
-to the new area. For a simple application, the following fragment may
-be sufficient:
-@example
-
-@group
-char *moving_end = &end;
-
-char *sbrk(request)
-int request;
-@{
- char *return_address;
-
- return_address = moving_end;
- moving_end += request;
- return return_address;
-@}
-@end group
-@end example
-
-@section Initialization and termination
-
-The system dependent support routines are responsible for
-initializing the library for use by an application, and cleaning up
-when the application is complete.
-
-This functionality is traditionally provided in @code{crt0} and
-@code{_exit}.
-
-The @code{crt0} function usually contains the instructions first run
-by the operating system when an application starts. The
-@code{crt0} function can take advantage of this and prepare the way
-for the libary.
-
-Another task for @code{crt0} is to call the @code{main} function
-provided by the application writer, and also to call @code{exit} if
-the main function ever returns.
-
-@code{exit} tells the operating system that the application has
-finished.
-
-
-
diff --git a/newlib/libc/sys/sysvnecv70/write.s b/newlib/libc/sys/sysvnecv70/write.s
deleted file mode 100644
index 5b4dfb272..000000000
--- a/newlib/libc/sys/sysvnecv70/write.s
+++ /dev/null
@@ -1,9 +0,0 @@
-
- .globl __write
- .globl _write
-__write:
-_write: chlvl #0,#4
- jnl ok
- jmp cerror
-ok: ret #0
-
diff --git a/newlib/libc/sys/tic80/Makefile.am b/newlib/libc/sys/tic80/Makefile.am
deleted file mode 100644
index f55a90adb..000000000
--- a/newlib/libc/sys/tic80/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES =
-
-# This is a hack to force automake to include a definition for
-# COMPILE.
-EXTRA_LIBRARIES = libfoo.a
-libfoo_a_SOURCES = crt0.c
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/tic80/Makefile.in b/newlib/libc/sys/tic80/Makefile.in
deleted file mode 100644
index 3eaf3033a..000000000
--- a/newlib/libc/sys/tic80/Makefile.in
+++ /dev/null
@@ -1,341 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES =
-
-# This is a hack to force automake to include a definition for
-# COMPILE.
-EXTRA_LIBRARIES = libfoo.a
-libfoo_a_SOURCES = crt0.c
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-libfoo_a_LIBADD =
-libfoo_a_OBJECTS = crt0.o
-lib_a_LIBADD =
-lib_a_OBJECTS =
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(libfoo_a_SOURCES) $(lib_a_SOURCES)
-OBJECTS = $(libfoo_a_OBJECTS) $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-libfoo.a: $(libfoo_a_OBJECTS) $(libfoo_a_DEPENDENCIES)
- -rm -f libfoo.a
- $(AR) cru libfoo.a $(libfoo_a_OBJECTS) $(libfoo_a_LIBADD)
- $(RANLIB) libfoo.a
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/tic80/aclocal.m4 b/newlib/libc/sys/tic80/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/tic80/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/tic80/configure b/newlib/libc/sys/tic80/configure
deleted file mode 100755
index d5e1fc3ee..000000000
--- a/newlib/libc/sys/tic80/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=crt0.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/tic80/configure.in b/newlib/libc/sys/tic80/configure.in
deleted file mode 100644
index 154bd527c..000000000
--- a/newlib/libc/sys/tic80/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/tic80 configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(crt0.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/tic80/crt0.c b/newlib/libc/sys/tic80/crt0.c
deleted file mode 100644
index ff25e4a1c..000000000
--- a/newlib/libc/sys/tic80/crt0.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* This is mostly just a placeholder (copied from m88kbug) until we
- figure out what it really should be... -fnf */
-
-extern int main(int argc, char **argv);
-
-extern char _edata;
-extern char _end;
-extern char stack;
-
-_start()
-{
- char *p;
-
- p = &_edata + 1;
- while (p < &_end)
- {
- *p++ = 0;
- }
-
- main(0, 0);
- _exit();
-}
diff --git a/newlib/libc/sys/w65/Makefile.am b/newlib/libc/sys/w65/Makefile.am
deleted file mode 100644
index db6b81665..000000000
--- a/newlib/libc/sys/w65/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = syscalls.c trap.c
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/w65/Makefile.in b/newlib/libc/sys/w65/Makefile.in
deleted file mode 100644
index 75ce8ff89..000000000
--- a/newlib/libc/sys/w65/Makefile.in
+++ /dev/null
@@ -1,329 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = syscalls.c trap.c
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = syscalls.o trap.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/w65/aclocal.m4 b/newlib/libc/sys/w65/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/w65/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/w65/configure b/newlib/libc/sys/w65/configure
deleted file mode 100755
index 52291f899..000000000
--- a/newlib/libc/sys/w65/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=trap.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/w65/configure.in b/newlib/libc/sys/w65/configure.in
deleted file mode 100644
index 1c62fcb84..000000000
--- a/newlib/libc/sys/w65/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/w65 configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(trap.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/w65/crt0.c b/newlib/libc/sys/w65/crt0.c
deleted file mode 100644
index b7598973b..000000000
--- a/newlib/libc/sys/w65/crt0.c
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-int p;
-extern int edata;
-extern int end;
-start()
-{
-int *s;
- asm ("lda #stack");
- asm ("tcs");
- for (s = &edata; s != &end; s++)
- *s = 0;
-
- main();
- exit(0);
-}
diff --git a/newlib/libc/sys/w65/sys/syscall.h b/newlib/libc/sys/w65/sys/syscall.h
deleted file mode 100644
index f141df764..000000000
--- a/newlib/libc/sys/w65/sys/syscall.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#define SYS_exit 1
-#define SYS_fork 2
-
-#define SYS_read 3
-#define SYS_write 4
-#define SYS_open 5
-#define SYS_close 6
-#define SYS_wait4 7
-#define SYS_creat 8
-#define SYS_link 9
-#define SYS_unlink 10
-#define SYS_execv 11
-#define SYS_chdir 12
-#define SYS_mknod 14
-#define SYS_chmod 15
-#define SYS_chown 16
-#define SYS_lseek 19
-#define SYS_getpid 20
-#define SYS_isatty 21
-#define SYS_fstat 22
-#define SYS_time 23
-
-
-#define SYS_ARG 24
-#define SYS_stat 38
-
-#define SYS_pipe 42
-#define SYS_execve 59
-
-#define SYS_utime 201 /* not really a system call */
-#define SYS_wait 202 /* nor is this */
diff --git a/newlib/libc/sys/w65/syscalls.c b/newlib/libc/sys/w65/syscalls.c
deleted file mode 100644
index 4f5b108b1..000000000
--- a/newlib/libc/sys/w65/syscalls.c
+++ /dev/null
@@ -1,191 +0,0 @@
-#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "sys/syscall.h"
-int errno;
-
-
-
-int
-_read (int file,
- char *ptr,
- int len)
-{
- return __trap3 (SYS_read, file, ptr, len);
-}
-
-
-int
-_lseek (int file,
- int ptr,
- int dir)
-{
- return __trap3 (SYS_lseek, file, ptr, dir);
-}
-
-static
-writechar (char c)
-{
- asm ("lda %0" : : "r" (c));
- asm ("wdm");
-}
-
-
-
-int
-_write (
- int file,
- char *ptr,
- int len)
-{
- return __trap3 (SYS_write, file, ptr, len);
-}
-
-
-
-int
-_close (int file)
-{
- return __trap3 (SYS_close, file, 0, 0);
-}
-
-
-
-caddr_t
-_sbrk (int incr)
-{
- extern char end; /* Defined by the linker */
- static char *heap_end;
- char *prev_heap_end;
-
- if (heap_end == 0)
- {
- heap_end = &end;
- }
- prev_heap_end = heap_end;
- if (heap_end + incr > stack_ptr)
- {
- _write (1, "Heap and stack collision\n", 25);
- abort ();
- }
-
- heap_end += incr;
- return (caddr_t) prev_heap_end;
-}
-
-
-
-
-int
-_fstat (int file,
- struct stat *st)
-{
- st->st_mode = S_IFCHR;
- return 0;
-}
-
-
-int
-_open (
- char *path,
- int flags)
-{
- return __trap3 (SYS_open, path, flags, 0);
-}
-
-int
-_unlink ()
-{
- return -1;
-}
-
-isatty (fd)
- int fd;
-{
- return 1;
-}
-
-
-
-_exit (n)
-{
- return __trap3 (SYS_exit, n, 0, 0);
-}
-
-
-_kill (n, m)
-{
- return __trap3 (SYS_exit, 0xdead, 0, 0);
-}
-
-
-_getpid (n)
-{
- return 1;
-}
-
-
-
-
-_raise ()
-{
-
-}
-
-int
-_stat (const char *path, struct stat *st)
-
-{
- return _trap3 (SYS_stat, path, st, 0);
-}
-
-int
-_chmod (const char *path, short mode)
-{
- return _trap3 (SYS_chmod, path, mode);
-}
-
-int
-_chown (const char *path, short owner, short group)
-{
- return _trap3 (SYS_chown, path, owner, group);
-}
-
-int
-_utime (path, times)
- const char *path;
- char *times;
-{
- return _trap3 (SYS_utime, path, times);
-}
-
-int
-_fork ()
-{
- return _trap3 (SYS_fork);
-}
-
-int
-_wait (statusp)
- int *statusp;
-{
- return _trap3 (SYS_wait);
-}
-
-int
-_execve (const char *path, char *const argv[], char *const envp[])
-{
- return _trap3 (SYS_execve, path, argv, envp);
-}
-
-int
-_execv (const char *path, char *const argv[])
-{
- return _trap3 (SYS_execv, path, argv);
-}
-
-int
-_pipe (int *fd)
-{
- return _trap3 (SYS_pipe, fd);
-}
diff --git a/newlib/libc/sys/w65/trap.c b/newlib/libc/sys/w65/trap.c
deleted file mode 100644
index 1f49999bb..000000000
--- a/newlib/libc/sys/w65/trap.c
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-_trap3()
-{
-
-}
-
-
-__trap3(a1,a2,a3,a4,a5,a6)
-{
- asm ("ldx #r0");
- asm ("wdm");
-}
-
diff --git a/newlib/libc/sys/z8ksim/Makefile.am b/newlib/libc/sys/z8ksim/Makefile.am
deleted file mode 100644
index 184707d97..000000000
--- a/newlib/libc/sys/z8ksim/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-## Process this file with automake to generate Makefile.in
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = glue.c
-
-all: crt0.o
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/z8ksim/Makefile.in b/newlib/libc/sys/z8ksim/Makefile.in
deleted file mode 100644
index 5f998257c..000000000
--- a/newlib/libc/sys/z8ksim/Makefile.in
+++ /dev/null
@@ -1,329 +0,0 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
-
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DESTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_alias = @build_alias@
-build_triplet = @build@
-host_alias = @host_alias@
-host_triplet = @host@
-target_alias = @target_alias@
-target_triplet = @target@
-AR = @AR@
-AS = @AS@
-CC = @CC@
-CPP = @CPP@
-EXEEXT = @EXEEXT@
-LDFLAGS = @LDFLAGS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
-OBJEXT = @OBJEXT@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-VERSION = @VERSION@
-aext = @aext@
-libm_machine_dir = @libm_machine_dir@
-machine_dir = @machine_dir@
-newlib_basedir = @newlib_basedir@
-oext = @oext@
-sys_dir = @sys_dir@
-
-AUTOMAKE_OPTIONS = cygnus
-
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-
-noinst_LIBRARIES = lib.a
-
-lib_a_SOURCES = glue.c
-
-ACLOCAL_AMFLAGS = -I ../../..
-CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
-CONFIG_CLEAN_FILES =
-LIBRARIES = $(noinst_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir)
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-lib_a_LIBADD =
-lib_a_OBJECTS = glue.o
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
-DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = gtar
-GZIP_ENV = --best
-SOURCES = $(lib_a_SOURCES)
-OBJECTS = $(lib_a_OBJECTS)
-
-all: all-redirect
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
- cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in \
- ../../../acinclude.m4 ../../../aclocal.m4 \
- ../../../libtool.m4
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-
-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
- cd $(srcdir) && $(AUTOCONF)
-
-mostlyclean-noinstLIBRARIES:
-
-clean-noinstLIBRARIES:
- -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-
-distclean-noinstLIBRARIES:
-
-maintainer-clean-noinstLIBRARIES:
-
-.c.o:
- $(COMPILE) -c $<
-
-.s.o:
- $(COMPILE) -c $<
-
-.S.o:
- $(COMPILE) -c $<
-
-mostlyclean-compile:
- -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
- -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
- -rm -f lib.a
- $(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
- $(RANLIB) lib.a
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- here=`pwd` && cd $(srcdir) \
- && mkid -f$$here/ID $$unique $(LISP)
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS)'; \
- unique=`for i in $$list; do echo $$i; done | \
- awk ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
- || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
- -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- -rm -rf $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
- mkdir $(distdir)/=build
- mkdir $(distdir)/=inst
- dc_install_base=`cd $(distdir)/=inst && pwd`; \
- cd $(distdir)/=build \
- && ../configure --srcdir=.. --prefix=$$dc_install_base \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) dist
- -rm -rf $(distdir)
- @banner="$(distdir).tar.gz is ready for distribution"; \
- dashes=`echo "$$banner" | sed s/./=/g`; \
- echo "$$dashes"; \
- echo "$$banner"; \
- echo "$$dashes"
-dist: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-dist-all: distdir
- -chmod -R a+r $(distdir)
- GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
- -rm -rf $(distdir)
-distdir: $(DISTFILES)
- -rm -rf $(distdir)
- mkdir $(distdir)
- -chmod 777 $(distdir)
- @for file in $(DISTFILES); do \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
- else \
- test -f $(distdir)/$$file \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file || :; \
- fi; \
- done
-info-am:
-info: info-am
-dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
-installcheck-am:
-installcheck: installcheck-am
-install-info-am:
-install-info: install-info-am
-install-exec-am:
-install-exec: install-exec-am
-
-install-data-am:
-install-data: install-data-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
-uninstall-am:
-uninstall: uninstall-am
-all-am: Makefile $(LIBRARIES)
-all-redirect: all-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
-installdirs:
-
-
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-
-maintainer-clean-generic:
-mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
- mostlyclean-tags mostlyclean-generic
-
-mostlyclean: mostlyclean-am
-
-clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
- mostlyclean-am
-
-clean: clean-am
-
-distclean-am: distclean-noinstLIBRARIES distclean-compile \
- distclean-tags distclean-generic clean-am
-
-distclean: distclean-am
- -rm -f config.status
-
-maintainer-clean-am: maintainer-clean-noinstLIBRARIES \
- maintainer-clean-compile maintainer-clean-tags \
- maintainer-clean-generic distclean-am
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-maintainer-clean: maintainer-clean-am
- -rm -f config.status
-
-.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
-clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
-mostlyclean-compile distclean-compile clean-compile \
-maintainer-clean-compile tags mostlyclean-tags distclean-tags \
-clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
-check-am installcheck-am installcheck install-info-am install-info \
-install-exec-am install-exec install-data-am install-data install-am \
-install uninstall-am uninstall all-redirect all-am all installdirs \
-mostlyclean-generic distclean-generic clean-generic \
-maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-
-
-all: crt0.o
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/newlib/libc/sys/z8ksim/aclocal.m4 b/newlib/libc/sys/z8ksim/aclocal.m4
deleted file mode 100644
index 0a1490998..000000000
--- a/newlib/libc/sys/z8ksim/aclocal.m4
+++ /dev/null
@@ -1,366 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-dnl This provides configure definitions used by all the newlib
-dnl configure.in files.
-
-dnl Basic newlib configury. This calls basic introductory stuff,
-dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
-dnl configure.host. The only argument is the relative path to the top
-dnl newlib directory.
-
-AC_DEFUN(NEWLIB_CONFIGURE,
-[
-dnl Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
-[case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
- esac], [multilib=yes])dnl
-
-dnl Support --enable-target-optspace
-AC_ARG_ENABLE(target-optspace,
-[ --enable-target-optspace optimize for space],
-[case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for target-optspace option) ;;
- esac], [target_optspace=])dnl
-
-dnl Support --enable-malloc-debugging - currently only supported for Cygwin
-AC_ARG_ENABLE(malloc-debugging,
-[ --enable-malloc-debugging indicate malloc debugging requested],
-[case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;;
- esac], [malloc_debugging=])dnl
-
-dnl Support --enable-newlib-multithread
-AC_ARG_ENABLE(newlib-multithread,
-[ --enable-newlib-multithread enable support for multiple threads],
-[case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
- esac], [newlib_multithread=yes])dnl
-
-dnl Support --enable-newlib-iconv
-AC_ARG_ENABLE(newlib-iconv,
-[ --enable-newlib-iconv enable iconv library support],
-[if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;;
- esac
- fi], [newlib_iconv=${newlib_iconv}])dnl
-
-dnl Support --enable-newlib-elix-level
-AC_ARG_ENABLE(newlib-elix-level,
-[ --enable-newlib-elix-level supply desired elix library level (1-4)],
-[case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-elix-level option) ;;
- esac], [newlib_elix_level=0])dnl
-
-dnl Support --disable-newlib-io-float
-AC_ARG_ENABLE(newlib-io-float,
-[ --disable-newlib-io-float disable printf/scanf family float support],
-[case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
- esac], [newlib_io_float=yes])dnl
-
-dnl Support --disable-newlib-supplied-syscalls
-AC_ARG_ENABLE(newlib-supplied-syscalls,
-[ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls],
-[case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for newlib-supplied-syscalls option) ;;
- esac], [newlib_may_supply_syscalls=yes])dnl
-
-AM_CONDITIONAL(MAY_SUPPLY_SYSCALLS, test x[$]{newlib_may_supply_syscalls} = xyes)
-
-dnl We may get other options which we don't document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-test -z "[$]{with_target_subdir}" && with_target_subdir=.
-
-if test "[$]{srcdir}" = "."; then
- if test "[$]{with_target_subdir}" != "."; then
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
- else
- newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
- fi
-else
- newlib_basedir="[$]{srcdir}/$1"
-fi
-AC_SUBST(newlib_basedir)
-
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE(newlib, 1.13.0)
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
- AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
-dnl Check whether -g works, even if CFLAGS is set, in case the package
-dnl plays around with CFLAGS (such as to build both debugging and
-dnl normal versions of a library), tasteless as that idea is.
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- AC_PROG_CC_G
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-AC_CHECK_TOOL(AS, as)
-AC_CHECK_TOOL(AR, ar)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
-AC_PROG_INSTALL
-
-AM_MAINTAINER_MODE
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
- AC_EXEEXT
-fi
-
-. [$]{newlib_basedir}/configure.host
-
-newlib_cflags="[$]{newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-AC_SUBST(NEWLIB_CFLAGS)
-
-LDFLAGS=${ldflags}
-AC_SUBST(LDFLAGS)
-
-AM_CONDITIONAL(ELIX_LEVEL_0, test x[$]{newlib_elix_level} = x0)
-AM_CONDITIONAL(ELIX_LEVEL_1, test x[$]{newlib_elix_level} = x1)
-AM_CONDITIONAL(ELIX_LEVEL_2, test x[$]{newlib_elix_level} = x2)
-AM_CONDITIONAL(ELIX_LEVEL_3, test x[$]{newlib_elix_level} = x3)
-AM_CONDITIONAL(ELIX_LEVEL_4, test x[$]{newlib_elix_level} = x4)
-
-AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-AC_SUBST(OBJEXT)
-AC_SUBST(oext)
-AC_SUBST(aext)
-
-AC_SUBST(libm_machine_dir)
-AC_SUBST(machine_dir)
-AC_SUBST(sys_dir)
-])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-# Copyright 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.4-p6])])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN([AM_MISSING_PROG],
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Define a conditional.
-
-AC_DEFUN([AM_CONDITIONAL],
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN([AM_MAINTAINER_MODE],
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST(MAINT)dnl
-]
-)
-
diff --git a/newlib/libc/sys/z8ksim/configure b/newlib/libc/sys/z8ksim/configure
deleted file mode 100755
index 04155f15b..000000000
--- a/newlib/libc/sys/z8ksim/configure
+++ /dev/null
@@ -1,1880 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-multilib build many library versions (default)"
-ac_help="$ac_help
- --enable-target-optspace optimize for space"
-ac_help="$ac_help
- --enable-malloc-debugging indicate malloc debugging requested"
-ac_help="$ac_help
- --enable-newlib-multithread enable support for multiple threads"
-ac_help="$ac_help
- --enable-newlib-iconv enable iconv library support"
-ac_help="$ac_help
- --enable-newlib-elix-level supply desired elix library level (1-4)"
-ac_help="$ac_help
- --disable-newlib-io-float disable printf/scanf family float support"
-ac_help="$ac_help
- --disable-newlib-supplied-syscalls disable newlib from supplying syscalls"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=glue.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-ac_aux_dir=
-for ac_dir in ../../../.. $srcdir/../../../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in ../../../.. $srcdir/../../../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-am__api_version="1.4"
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:578: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:631: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "$*" != "X $srcdir/configure conftestfile" \
- && test "$*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
- fi
-
- test "$2" = conftestfile
- )
-then
- # Ok.
- :
-else
- { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:688: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:721: checking for Cygwin environment" >&5
-if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
-#include "confdefs.h"
-
-int main() {
-
-#ifndef __CYGWIN__
-#define __CYGWIN__ __CYGWIN32__
-#endif
-return __CYGWIN__;
-; return 0; }
-EOF
-if { (eval echo configure:737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_cygwin=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_cygwin=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_cygwin" 1>&6
-CYGWIN=
-test "$ac_cv_cygwin" = yes && CYGWIN=yes
-echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:754: checking for mingw32 environment" >&5
-if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 759 "configure"
-#include "confdefs.h"
-
-int main() {
-return __MINGW32__;
-; return 0; }
-EOF
-if { (eval echo configure:766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_mingw32=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_mingw32=no
-fi
-rm -f conftest*
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_mingw32" 1>&6
-MINGW32=
-test "$ac_cv_mingw32" = yes && MINGW32=yes
-
-# Check whether --enable-multilib or --disable-multilib was given.
-if test "${enable_multilib+set}" = set; then
- enableval="$enable_multilib"
- case "${enableval}" in
- yes) multilib=yes ;;
- no) multilib=no ;;
- *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
- esac
-else
- multilib=yes
-fi
-
-# Check whether --enable-target-optspace or --disable-target-optspace was given.
-if test "${enable_target_optspace+set}" = set; then
- enableval="$enable_target_optspace"
- case "${enableval}" in
- yes) target_optspace=yes ;;
- no) target_optspace=no ;;
- *) { echo "configure: error: bad value ${enableval} for target-optspace option" 1>&2; exit 1; } ;;
- esac
-else
- target_optspace=
-fi
-
-# Check whether --enable-malloc-debugging or --disable-malloc-debugging was given.
-if test "${enable_malloc_debugging+set}" = set; then
- enableval="$enable_malloc_debugging"
- case "${enableval}" in
- yes) malloc_debugging=yes ;;
- no) malloc_debugging=no ;;
- *) { echo "configure: error: bad value ${enableval} for malloc-debugging option" 1>&2; exit 1; } ;;
- esac
-else
- malloc_debugging=
-fi
-
-# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given.
-if test "${enable_newlib_multithread+set}" = set; then
- enableval="$enable_newlib_multithread"
- case "${enableval}" in
- yes) newlib_multithread=yes ;;
- no) newlib_multithread=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_multithread=yes
-fi
-
-# Check whether --enable-newlib-iconv or --disable-newlib-iconv was given.
-if test "${enable_newlib_iconv+set}" = set; then
- enableval="$enable_newlib_iconv"
- if test "${newlib_iconv+set}" != set; then
- case "${enableval}" in
- yes) newlib_iconv=yes ;;
- no) newlib_iconv=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;;
- esac
- fi
-else
- newlib_iconv=${newlib_iconv}
-fi
-
-# Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given.
-if test "${enable_newlib_elix_level+set}" = set; then
- enableval="$enable_newlib_elix_level"
- case "${enableval}" in
- 0) newlib_elix_level=0 ;;
- 1) newlib_elix_level=1 ;;
- 2) newlib_elix_level=2 ;;
- 3) newlib_elix_level=3 ;;
- 4) newlib_elix_level=4 ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-elix-level option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_elix_level=0
-fi
-
-# Check whether --enable-newlib-io-float or --disable-newlib-io-float was given.
-if test "${enable_newlib_io_float+set}" = set; then
- enableval="$enable_newlib_io_float"
- case "${enableval}" in
- yes) newlib_io_float=yes ;;
- no) newlib_io_float=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-io-float option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_io_float=yes
-fi
-
-# Check whether --enable-newlib-supplied-syscalls or --disable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
- enableval="$enable_newlib_supplied_syscalls"
- case "${enableval}" in
- yes) newlib_may_supply_syscalls=yes ;;
- no) newlib_may_supply_syscalls=no ;;
- *) { echo "configure: error: bad value ${enableval} for newlib-supplied-syscalls option" 1>&2; exit 1; } ;;
- esac
-else
- newlib_may_supply_syscalls=yes
-fi
-
-
-
-if test x${newlib_may_supply_syscalls} = xyes; then
- MAY_SUPPLY_SYSCALLS_TRUE=
- MAY_SUPPLY_SYSCALLS_FALSE='#'
-else
- MAY_SUPPLY_SYSCALLS_TRUE='#'
- MAY_SUPPLY_SYSCALLS_FALSE=
-fi
-
-
-test -z "${with_target_subdir}" && with_target_subdir=.
-
-if test "${srcdir}" = "."; then
- if test "${with_target_subdir}" != "."; then
- newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
- else
- newlib_basedir="${srcdir}/${with_multisrctop}../../.."
- fi
-else
- newlib_basedir="${srcdir}/../../.."
-fi
-
-
-
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
-esac
-
-
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:936: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
-esac
-
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:957: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:975: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
-esac
-
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-
-test "$host_alias" != "$target_alias" &&
- test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, &&
- program_prefix=${target_alias}-
-
-
-
-PACKAGE=newlib
-
-VERSION=1.13.0
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1018: checking for working aclocal-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1031: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
- AUTOCONF=autoconf
- echo "$ac_t""found" 1>&6
-else
- AUTOCONF="$missing_dir/missing autoconf"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
-echo "configure:1044: checking for working automake-${am__api_version}" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake-${am__api_version}
- echo "$ac_t""found" 1>&6
-else
- AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1057: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
- AUTOHEADER=autoheader
- echo "$ac_t""found" 1>&6
-else
- AUTOHEADER="$missing_dir/missing autoheader"
- echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1070: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
- MAKEINFO=makeinfo
- echo "$ac_t""found" 1>&6
-else
- MAKEINFO="$missing_dir/missing makeinfo"
- echo "$ac_t""missing" 1>&6
-fi
-
-
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1095: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1125: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
- # We found a bogon in the path, so make sure we never use it.
- set dummy $ac_cv_prog_CC
- shift
- if test $# -gt 0; then
- # We chose a different compiler from the bogus one.
- # However, it has the same basename, so the bogon will be chosen
- # first if we set CC to just the basename; use the full file name.
- shift
- set dummy "$ac_dir/$ac_word" "$@"
- shift
- ac_cv_prog_CC="$@"
- fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1174: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
- ac_test_CFLAGS="${CFLAGS+set}"
- ac_save_CFLAGS="$CFLAGS"
- CFLAGS=
- echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1198: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
- if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
- elif test $ac_cv_prog_cc_g = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1229: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1325: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB=":"
-fi
-fi
-
-
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1370: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
- if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
- fi
- fi
- done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
-
-fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL="$ac_install_sh"
- fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:1424: checking whether to enable maintainer-specific portions of Makefiles" >&5
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which can't create executables. So we include AC_EXEEXT to keep
-# automake happy, but we don't execute it, since we don't care about
-# the result.
-if false; then
-
-
-echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1458: checking for executable suffix" >&5
-if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
- ac_cv_exeext=.exe
-else
- rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
- ac_cv_exeext=
- if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- for file in conftest.*; do
- case $file in
- *.c | *.o | *.obj) ;;
- *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
- esac
- done
- else
- { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
- fi
- rm -f conftest*
- test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
-fi
-fi
-
-EXEEXT=""
-test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
-echo "$ac_t""${ac_cv_exeext}" 1>&6
-ac_exeext=$EXEEXT
-
-fi
-
-. ${newlib_basedir}/configure.host
-
-newlib_cflags="${newlib_cflags} -fno-builtin"
-
-NEWLIB_CFLAGS=${newlib_cflags}
-
-
-LDFLAGS=${ldflags}
-
-
-
-
-if test x${newlib_elix_level} = x0; then
- ELIX_LEVEL_0_TRUE=
- ELIX_LEVEL_0_FALSE='#'
-else
- ELIX_LEVEL_0_TRUE='#'
- ELIX_LEVEL_0_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x1; then
- ELIX_LEVEL_1_TRUE=
- ELIX_LEVEL_1_FALSE='#'
-else
- ELIX_LEVEL_1_TRUE='#'
- ELIX_LEVEL_1_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x2; then
- ELIX_LEVEL_2_TRUE=
- ELIX_LEVEL_2_FALSE='#'
-else
- ELIX_LEVEL_2_TRUE='#'
- ELIX_LEVEL_2_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x3; then
- ELIX_LEVEL_3_TRUE=
- ELIX_LEVEL_3_FALSE='#'
-else
- ELIX_LEVEL_3_TRUE='#'
- ELIX_LEVEL_3_FALSE=
-fi
-
-
-if test x${newlib_elix_level} = x4; then
- ELIX_LEVEL_4_TRUE=
- ELIX_LEVEL_4_FALSE='#'
-else
- ELIX_LEVEL_4_TRUE='#'
- ELIX_LEVEL_4_FALSE=
-fi
-
-
-
-if test x${use_libtool} = xyes; then
- USE_LIBTOOL_TRUE=
- USE_LIBTOOL_FALSE='#'
-else
- USE_LIBTOOL_TRUE='#'
- USE_LIBTOOL_FALSE=
-fi
-
-# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
-# use oext, which is set in configure.host based on the target platform.
-OBJEXT=${oext}
-
-
-
-
-
-
-
-
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@MAY_SUPPLY_SYSCALLS_TRUE@%$MAY_SUPPLY_SYSCALLS_TRUE%g
-s%@MAY_SUPPLY_SYSCALLS_FALSE@%$MAY_SUPPLY_SYSCALLS_FALSE%g
-s%@newlib_basedir@%$newlib_basedir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@AS@%$AS%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@EXEEXT@%$EXEEXT%g
-s%@NEWLIB_CFLAGS@%$NEWLIB_CFLAGS%g
-s%@ELIX_LEVEL_0_TRUE@%$ELIX_LEVEL_0_TRUE%g
-s%@ELIX_LEVEL_0_FALSE@%$ELIX_LEVEL_0_FALSE%g
-s%@ELIX_LEVEL_1_TRUE@%$ELIX_LEVEL_1_TRUE%g
-s%@ELIX_LEVEL_1_FALSE@%$ELIX_LEVEL_1_FALSE%g
-s%@ELIX_LEVEL_2_TRUE@%$ELIX_LEVEL_2_TRUE%g
-s%@ELIX_LEVEL_2_FALSE@%$ELIX_LEVEL_2_FALSE%g
-s%@ELIX_LEVEL_3_TRUE@%$ELIX_LEVEL_3_TRUE%g
-s%@ELIX_LEVEL_3_FALSE@%$ELIX_LEVEL_3_FALSE%g
-s%@ELIX_LEVEL_4_TRUE@%$ELIX_LEVEL_4_TRUE%g
-s%@ELIX_LEVEL_4_FALSE@%$ELIX_LEVEL_4_FALSE%g
-s%@USE_LIBTOOL_TRUE@%$USE_LIBTOOL_TRUE%g
-s%@USE_LIBTOOL_FALSE@%$USE_LIBTOOL_FALSE%g
-s%@OBJEXT@%$OBJEXT%g
-s%@oext@%$oext%g
-s%@aext@%$aext%g
-s%@libm_machine_dir@%$libm_machine_dir%g
-s%@machine_dir@%$machine_dir%g
-s%@sys_dir@%$sys_dir%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/newlib/libc/sys/z8ksim/configure.in b/newlib/libc/sys/z8ksim/configure.in
deleted file mode 100644
index ce23fd612..000000000
--- a/newlib/libc/sys/z8ksim/configure.in
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl This is the newlib/libc/sys/z8ksim configure.in file.
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.5)
-AC_INIT(glue.c)
-
-dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
-AC_CONFIG_AUX_DIR(../../../..)
-
-NEWLIB_CONFIGURE(../../..)
-
-AC_OUTPUT(Makefile)
diff --git a/newlib/libc/sys/z8ksim/crt0.c b/newlib/libc/sys/z8ksim/crt0.c
deleted file mode 100644
index f9aad6d95..000000000
--- a/newlib/libc/sys/z8ksim/crt0.c
+++ /dev/null
@@ -1,58 +0,0 @@
-extern char _start_bss;
-extern char _end_bss;
-extern int main(int argc, char **argv, char **environ);
-void __main();
-
-static void
-enter()
-{
-#if defined(__Z8002__)
- __main();
-#endif
- exit(main(0,0,0));
-}
-start()
-{
- char *p;
-#if defined(__Z8002__)
- asm("ld r15,#__stack_top");
- asm("ld r10,r15");
-#endif
-#if defined(__Z8001__)
- asm("ldl rr14,#__stack_top");
- asm("ldl rr10,rr14");
-#endif
-
-
- /* zero bss */
- p = &_start_bss;
- while (p < & _end_bss)
- {
- *p++ = 0;
- }
- enter();
-}
-
-#if defined(__Z8002__)
-void __do_global_ctors ()
-{
- typedef void (*pfunc)();
- extern pfunc __ctors[];
- extern pfunc __ctors_end[];
- pfunc *p;
- for (p = __ctors_end; p > __ctors; )
- {
- (*--p)();
- }
-}
-
-void __main()
-{
- static int initialized;
- if (! initialized)
- {
- initialized = 1;
- __do_global_ctors ();
- }
-}
-#endif
diff --git a/newlib/libc/sys/z8ksim/glue.c b/newlib/libc/sys/z8ksim/glue.c
deleted file mode 100644
index b3b0bab07..000000000
--- a/newlib/libc/sys/z8ksim/glue.c
+++ /dev/null
@@ -1,156 +0,0 @@
-#include "sys/syscall.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <_ansi.h>
-#include <errno.h>
-
-extern char _start_heap;
-extern char _end_heap;
-extern char _start_bss;
-extern char _end_bss;
-
-
-static int argl(long value)
-{
- asm("ld r0,%H0" : : "r" (value));
- asm("ld r1,%I0" : : "r" (value));
- asm("sc %0" : : "i" (SYS_ARG));
-}
-
-
-static int argw(value)
-{
- asm("ld r1,%H0" : : "r" ( value));
- asm("ld r0,#0");
- asm("sc %0" : : "i" (SYS_ARG));
-}
-
-static int argp(void *value)
-{
-#ifdef __Z8001__
- asm("ld r0,%H0" : : "r" (value));
- asm("ld r1,%I0" : : "r" (value));
-#else
- asm("ld r1,%H0" : : "r" ( value));
- asm("ld r0,#0");
-#endif
- asm("sc %0" : : "i" (SYS_ARG));
-
-}
-
-
-
-#define ARGL(n, value) argl(value)
-#define ARGW(n, value) argw(value)
-#define ARGP(n, value) argp(value)
-
-#define MACRO(n) asm("sc %0" : : "i" (n));
-
-int _read (int fd, char *buf,size_t nbytes)
-{
- ARGW(0,fd);
- ARGP(1,buf);
- ARGP(2,(void *)(nbytes));
- MACRO(SYS_read);
-}
-
-int _write (int fd, char *buf, size_t nbytes)
-{
- ARGW(0,fd);
- ARGP(1,buf);
- ARGP(2,(void *)(nbytes));
- MACRO(SYS_write);
-}
-
-int _open (const char *buf, int flags, int mode)
-{
- ARGP(0, buf);
- ARGW(1, flags);
- ARGW(2, mode);
- MACRO(SYS_open);
-}
-
-int _close (int fd)
-{
- ARGW(0,fd);
- MACRO(SYS_close );
-}
-
-/*
- * sbrk -- changes heap size size. Get nbytes more
- * RAM. We just increment a pointer in what's
- * left of memory on the board.
- */
-caddr_t _sbrk (size_t nbytes)
-{
- static char* heap_ptr = NULL;
- caddr_t base;
-
- if (heap_ptr == NULL) {
- heap_ptr = (caddr_t)&_start_heap;
- }
-
- if (heap_ptr + nbytes < &_end_heap) {
- base = heap_ptr;
- heap_ptr += nbytes;
- return (heap_ptr);
- } else {
- errno = ENOMEM;
- return ((caddr_t)-1);
- }
-}
-
-int isatty (int fd)
-{
- ARGW(0,fd);
- MACRO(SYS_isatty);
-}
-
-off_t _lseek (int fd, off_t offset, int whence)
-{
- ARGW(0,fd);
- ARGL(1,offset);
- ARGW(2, whence);
- MACRO(SYS_lseek);
-}
-
-int _fstat (int fd, struct stat *buf)
-{
- ARGW(0,fd);
- ARGP(1,buf);
- MACRO(SYS_fstat);
-}
-
-
-
-
-int
-_exit(int val)
-{
- ARGW(0,val);
- MACRO(SYS_exit);
-}
-
-time_t _time(time_t *timer)
-{
- ARGP(0,timer);
- MACRO(SYS_time);
-}
-
-int
-_creat (const char *path, int mode)
-{
- ARGP(0, path);
- ARGW(1, mode);
- MACRO(SYS_creat);
-}
-
-_kill(int pid, int val)
-{
- _exit(val);
-}
-
-_getpid()
-{
- return 1;
-}
diff --git a/newlib/libc/sys/z8ksim/sys/syscall.h b/newlib/libc/sys/z8ksim/sys/syscall.h
deleted file mode 100644
index 9631a73bd..000000000
--- a/newlib/libc/sys/z8ksim/sys/syscall.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#define SYS_exit 1
-#define SYS_fork 2
-#define SYS_read 3
-#define SYS_write 4
-#define SYS_open 5
-#define SYS_close 6
-#define SYS_wait4 7
-#define SYS_creat 8
-#define SYS_link 9
-#define SYS_unlink 10
-#define SYS_execv 11
-#define SYS_chdir 12
-#define SYS_mknod 14
-#define SYS_chmod 15
-#define SYS_chown 16
-#define SYS_lseek 19
-#define SYS_getpid 20
-#define SYS_isatty 21
-#define SYS_fstat 22
-#define SYS_time 23
-
-
-#define SYS_ARG 24