Merge from head at r201628.

# This hasn't been tested, and there are at least three bad commits
# that need to be backed out before the branch will be stable again.
This commit is contained in:
Warner Losh 2010-01-06 05:58:07 +00:00
commit 9199c09a15
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/mips/; revision=201629
2313 changed files with 130614 additions and 140525 deletions

View file

@ -4,7 +4,7 @@
The compilation of software known as FreeBSD is distributed under the
following terms:
Copyright (c) 1992-2009 The FreeBSD Project. All rights reserved.
Copyright (c) 1992-2010 The FreeBSD Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions

View file

@ -48,7 +48,6 @@ iostat(8) ken Pre-commit review requested.
cd(4) ken Pre-commit review requested.
pass(4) ken Pre-commit review requested.
ch(4) ken Pre-commit review requested.
isp(4) mjacob Pre-commit review requested.
em(4) jfv Pre-commit review requested.
tdfx(4) cokane Just keep me informed of changes, try not to break it.
sendmail gshapiro Pre-commit review requested.
@ -124,6 +123,8 @@ usr.bin/bluetooth emax Pre-commit review preferred.
usr.sbin/bluetooth emax Pre-commit review preferred.
gnu/usr.bin/send-pr bugmaster Pre-commit review requested.
ncurses rafan Heads-up appreciated, try not to break it.
*env(3) secteam Due to the problematic security history of this
code, please have patches reviewed by secteam.
Following are the entries from the Makefiles, and a few other sources.
Please remove stale entries from both their origin, and this file.

View file

@ -5,10 +5,11 @@
# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
# -DNO_CLEAN do not clean at all
# -DNO_SHARE do not go into share subdir
# -DKERNFAST define NO_KERNELCONFIG, NO_KERNELCLEAN and NO_KERNELDEPEND
# -DKERNFAST define NO_KERNEL{CONFIG,CLEAN,DEPEND,OBJ}
# -DNO_KERNELCONFIG do not run config in ${MAKE} buildkernel
# -DNO_KERNELCLEAN do not run ${MAKE} clean in ${MAKE} buildkernel
# -DNO_KERNELDEPEND do not run ${MAKE} depend in ${MAKE} buildkernel
# -DNO_KERNELOBJ do not run ${MAKE} obj in ${MAKE} buildkernel
# -DNO_PORTSUPDATE do not update ports in ${MAKE} update
# -DNO_DOCUPDATE do not update doc in ${MAKE} update
# -DNO_CTF do not run the DTrace CTF conversion tools on built objects
@ -694,6 +695,7 @@ distrib-dirs distribution:
NO_KERNELCLEAN= t
NO_KERNELCONFIG= t
NO_KERNELDEPEND= t
NO_KERNELOBJ= t
# Shortcut for KERNCONF=Blah -DKERNFAST is now KERNFAST=Blah
.if !defined(KERNCONF) && ${KERNFAST} != "1"
KERNCONF=${KERNFAST}
@ -763,11 +765,13 @@ buildkernel:
@echo "--------------------------------------------------------------"
cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR}
.endif
.if !defined(NO_KERNELOBJ)
@echo
@echo "--------------------------------------------------------------"
@echo ">>> stage 2.2: rebuilding the object tree"
@echo "--------------------------------------------------------------"
cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} obj
.endif
@echo
@echo "--------------------------------------------------------------"
@echo ">>> stage 2.3: build tools"
@ -936,6 +940,11 @@ _mklocale= usr.bin/mklocale
_sed= usr.bin/sed
.endif
.if ${BOOTSTRAPPING} < 900006
_lex= usr.bin/lex
_yacc= usr.bin/yacc
.endif
.if ${BOOTSTRAPPING} < 700018
_gensnmptree= usr.sbin/bsnmpd/gensnmptree
.endif
@ -962,6 +971,8 @@ bootstrap-tools:
${_mklocale} \
usr.bin/rpcgen \
${_sed} \
${_lex} \
${_yacc} \
usr.bin/xinstall \
${_gensnmptree} \
usr.sbin/config \
@ -1103,8 +1114,8 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libkrb5} \
lib/libkiconv lib/libkvm lib/libmd \
lib/ncurses/ncurses lib/ncurses/ncursesw \
lib/libopie lib/libpam ${_lib_libthr} \
lib/libradius lib/libsbuf lib/libtacplus lib/libutil \
${_lib_libypclnt} lib/libz lib/msun \
lib/libradius lib/libsbuf lib/libtacplus lib/libulog \
lib/libutil ${_lib_libypclnt} lib/libz lib/msun \
${_secure_lib_libcrypto} ${_secure_lib_libssh} \
${_secure_lib_libssl} lib/libdwarf lib/libproc

View file

@ -14,6 +14,42 @@
# The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
#
# 20100105: new userland semaphore implementation
OLD_FILES+=usr/include/sys/semaphore.h
# 20100103: ntptrace(8) removed
OLD_FILES+=usr/sbin/ntptrace
OLD_FILES+=usr/share/man/man8/ntptrace.8.gz
# 20091229: remove no longer relevant examples
OLD_FILES+=usr/share/examples/pppd/auth-down.sample
OLD_FILES+=usr/share/examples/pppd/auth-up.sample
OLD_FILES+=usr/share/examples/pppd/chap-secrets.sample
OLD_FILES+=usr/share/examples/pppd/chat.sh.sample
OLD_FILES+=usr/share/examples/pppd/ip-down.sample
OLD_FILES+=usr/share/examples/pppd/ip-up.sample
OLD_FILES+=usr/share/examples/pppd/options.sample
OLD_FILES+=usr/share/examples/pppd/pap-secrets.sample
OLD_FILES+=usr/share/examples/pppd/ppp.deny.sample
OLD_FILES+=usr/share/examples/pppd/ppp.shells.sample
OLD_DIRS+=usr/share/examples/pppd
OLD_FILES+=usr/share/examples/slattach/unit-command.sh
OLD_DIRS+=usr/share/examples/slattach
OLD_FILES+=usr/share/examples/sliplogin/slip.hosts
OLD_FILES+=usr/share/examples/sliplogin/slip.login
OLD_FILES+=usr/share/examples/sliplogin/slip.logout
OLD_FILES+=usr/share/examples/sliplogin/slip.slparms
OLD_DIRS+=usr/share/examples/sliplogin
OLD_FILES+=usr/share/examples/startslip/sldown.sh
OLD_FILES+=usr/share/examples/startslip/slip.sh
OLD_FILES+=usr/share/examples/startslip/slup.sh
OLD_DIRS+=usr/share/examples/startslip
# 20091202: unify rc.firewall and rc.firewall6.
OLD_FILES+=etc/rc.d/ip6fw
OLD_FILES+=etc/rc.firewall6
OLD_FILES+=usr/share/examples/etc/rc.firewall6
# 20091117: removal of rc.early(8) link
OLD_FILES+=usr/share/man/man8/rc.early.8.gz
# 20091117: usr/share/zoneinfo/GMT link removed
OLD_FILES+=usr/share/zoneinfo/GMT
# 20091027: pselect.3 implemented as syscall
OLD_FILES+=usr/share/man/man3/pselect.3.gz
# 20091005: fusword.9 and susword.9 removed

View file

@ -22,11 +22,43 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.x IS SLOW:
machines to maximize performance. (To disable malloc debugging, run
ln -s aj /etc/malloc.conf.)
20091202:
The rc.firewall and rc.firewall6 were unified, and
rc.firewall6 and rc.d/ip6fw were removed.
According to the removal of rc.d/ip6fw, ipv6_firewall_* rc
variables are obsoleted. Instead, the following new rc
variables are added to rc.d/ipfw:
firewall_client_net_ipv6, firewall_simple_iif_ipv6,
firewall_simple_inet_ipv6, firewall_simple_oif_ipv6,
firewall_simple_onet_ipv6, firewall_trusted_ipv6
The meanings correspond to the relevant IPv4 variables.
20091113:
The default terminal emulation for syscons(4) has been changed
from cons25 to xterm on all platforms except pc98. This means
that the /etc/ttys file needs to be updated to ensure correct
operation of applications on the console.
The terminal emulation style can be toggled per window by using
vidcontrol(1)'s -T flag. The TEKEN_CONS25 kernel configuration
options can be used to change the compile-time default back to
cons25.
To prevent graphical artifacts, make sure the TERM environment
variable is set to match the terminal emulation that is being
performed by syscons(4).
20091109:
The layout of the structure ieee80211req_scan_result has changed.
Applications that require wireless scan results (e.g. ifconfig(8))
from net80211 need to be recompiled.
Applications such as wpa_supplicant(8) may require a full world
build without using NO_CLEAN in order to get synchronized with the
new structure.
20091025:
The iwn(4) driver has been updated to support the 5000 and 5150 series.
There's one kernel module for each firmware. Adding "device iwnfw"
@ -129,7 +161,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.x IS SLOW:
20090712:
Padding has been added to struct tcpcb, sackhint and tcpstat in
<netinet/tcp_var.h> to facilitate future MFCs and bug fixes whilst
maintainig the ABI. However, this change breaks the ABI, so bump
maintaining the ABI. However, this change breaks the ABI, so bump
__FreeBSD_version to 800102. User space tools that rely on the size of
any of these structs (e.g. sockstat) need to be recompiled.
@ -863,7 +895,7 @@ COMMON ITEMS:
-------------
Avoid using make -j when upgrading. While generally safe, there are
sometimes problems using -j to upgrade. If your upgrade fails with
-j, please try again wtihout -j. From time to time in the past there
-j, please try again without -j. From time to time in the past there
have been problems using -j with buildworld and/or installworld. This
is especially true when upgrading between "distant" versions (eg one
that cross a major release boundary or several minor releases, or when

View file

@ -27,6 +27,7 @@ SUBDIR= cat \
pax \
pkill \
ps \
pwait \
pwd \
${_rcp} \
realpath \

View file

@ -3,7 +3,7 @@
PROG= date
SRCS= date.c netdate.c vary.c
DPADD= ${LIBUTIL}
LDADD= -lutil
DPADD= ${LIBULOG}
LDADD= -lulog
.include <bsd.prog.mk>

View file

@ -48,11 +48,12 @@ __FBSDID("$FreeBSD$");
#include <ctype.h>
#include <err.h>
#include <locale.h>
#include <libutil.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#define _ULOG_POSIX_NAMES
#include <ulog.h>
#include <unistd.h>
#include "extern.h"
@ -181,6 +182,7 @@ main(int argc, char *argv[])
static void
setthetime(const char *fmt, const char *p, int jflag, int nflag)
{
struct utmpx utx;
struct tm *lt;
struct timeval tv;
const char *dot, *t;
@ -271,12 +273,16 @@ setthetime(const char *fmt, const char *p, int jflag, int nflag)
if (!jflag) {
/* set the time */
if (nflag || netsettime(tval)) {
logwtmp("|", "date", "");
utx.ut_type = OLD_TIME;
gettimeofday(&utx.ut_tv, NULL);
pututxline(&utx);
tv.tv_sec = tval;
tv.tv_usec = 0;
if (settimeofday(&tv, (struct timezone *)NULL))
err(1, "settimeofday (timeval)");
logwtmp("{", "date", "");
utx.ut_type = NEW_TIME;
gettimeofday(&utx.ut_tv, NULL);
pututxline(&utx);
}
if ((p = getlogin()) == NULL)

View file

@ -118,7 +118,7 @@ main(int argc, char **argv)
}
static int
kdumpenv()
kdumpenv(void)
{
char *buf, *cp;
int buflen, envlen;

View file

@ -219,7 +219,7 @@ ftree_sel(ARCHD *arcn)
*/
void
ftree_notsel()
ftree_notsel(void)
{
if (ftent != NULL)
(void)fts_set(ftsp, ftent, FTS_SKIP);

View file

@ -396,6 +396,7 @@ trng_add(char *str)
default:
paxwarn(1, "Bad option %c with time range %s",
*flgpt, str);
free(pt);
goto out;
}
++flgpt;

View file

@ -113,14 +113,14 @@ static int cflags = REG_EXTENDED;
static kvm_t *kd;
static pid_t mypid;
static struct listhead euidlist = SLIST_HEAD_INITIALIZER(list);
static struct listhead ruidlist = SLIST_HEAD_INITIALIZER(list);
static struct listhead rgidlist = SLIST_HEAD_INITIALIZER(list);
static struct listhead pgrplist = SLIST_HEAD_INITIALIZER(list);
static struct listhead ppidlist = SLIST_HEAD_INITIALIZER(list);
static struct listhead tdevlist = SLIST_HEAD_INITIALIZER(list);
static struct listhead sidlist = SLIST_HEAD_INITIALIZER(list);
static struct listhead jidlist = SLIST_HEAD_INITIALIZER(list);
static struct listhead euidlist = SLIST_HEAD_INITIALIZER(euidlist);
static struct listhead ruidlist = SLIST_HEAD_INITIALIZER(ruidlist);
static struct listhead rgidlist = SLIST_HEAD_INITIALIZER(rgidlist);
static struct listhead pgrplist = SLIST_HEAD_INITIALIZER(pgrplist);
static struct listhead ppidlist = SLIST_HEAD_INITIALIZER(ppidlist);
static struct listhead tdevlist = SLIST_HEAD_INITIALIZER(tdevlist);
static struct listhead sidlist = SLIST_HEAD_INITIALIZER(sidlist);
static struct listhead jidlist = SLIST_HEAD_INITIALIZER(jidlist);
static void usage(void) __attribute__((__noreturn__));
static int killact(const struct kinfo_proc *);
@ -671,8 +671,19 @@ makelist(struct listhead *head, enum listtype type, char *src)
li->li_number = -1; /* any jail */
break;
case LT_TTY:
usage();
/* NOTREACHED */
if (li->li_number < 0)
errx(STATUS_BADUSAGE,
"Negative /dev/pts tty `%s'", sp);
snprintf(buf, sizeof(buf), _PATH_DEV "pts/%s",
sp);
if (stat(buf, &st) != -1)
goto foundtty;
if (errno == ENOENT)
errx(STATUS_BADUSAGE, "No such tty: `"
_PATH_DEV "pts/%s'", sp);
err(STATUS_ERROR, "Cannot access `"
_PATH_DEV "pts/%s'", sp);
break;
default:
break;
}

View file

@ -330,6 +330,7 @@ findvar(char *p, int user, char **header)
errx(1, "malloc failed");
snprintf(realfmt, rflen, "%s=%s", v->alias, hp);
parsefmt(realfmt, user);
free(realfmt);
}
return ((VAR *)NULL);
}

5
bin/pwait/Makefile Normal file
View file

@ -0,0 +1,5 @@
# $FreeBSD$
PROG= pwait
.include <bsd.prog.mk>

78
bin/pwait/pwait.1 Normal file
View file

@ -0,0 +1,78 @@
.\"
.\" Copyright (c) 2004-2009, Jilles Tjoelker
.\" 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 COPYRIGHT HOLDERS AND
.\" CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
.\" WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
.\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
.\" COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
.\" NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
.\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
.\" OF SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd November 1, 2009
.Os
.Dt PWAIT 1
.Sh NAME
.Nm pwait
.Nd wait for processes to terminate
.Sh SYNOPSIS
.Nm
.Op Fl v
.Ar pid
\&...
.Sh DESCRIPTION
The
.Nm
utility will wait until each of the given processes has terminated.
.Pp
The following option is available:
.Bl -tag -width indent
.It Fl v
Print the exit status when each process terminates.
.El
.Sh DIAGNOSTICS
.Pp
The
.Nm
utility returns 0 on success, and >0 if an error occurs.
.Pp
Invalid pids elicit a warning message but are otherwise ignored.
.Sh SEE ALSO
.Xr kill 1 ,
.Xr pkill 1 ,
.Xr ps 1 ,
.Xr wait 1 ,
.Xr kqueue 2
.Sh NOTES
.Nm
is not a substitute for the
.Xr wait 1
builtin
as it will not clean up any zombies or state in the parent process.
.Sh HISTORY
A
.Nm
command first appeared in SunOS 5.8.

145
bin/pwait/pwait.c Normal file
View file

@ -0,0 +1,145 @@
/*-
* Copyright (c) 2004-2009, Jilles Tjoelker
* 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 COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sysexits.h>
#include <unistd.h>
static void
usage(void)
{
fprintf(stderr, "usage: pwait [-v] pid ...\n");
exit(EX_USAGE);
}
/*
* pwait - wait for processes to terminate
*/
int
main(int argc, char *argv[])
{
int kq;
struct kevent *e;
int verbose = 0;
int opt, nleft, n, i, duplicate, status;
long pid;
char *s, *end;
while ((opt = getopt(argc, argv, "v")) != -1) {
switch (opt) {
case 'v':
verbose = 1;
break;
default:
usage();
/* NOTREACHED */
}
}
argc -= optind;
argv += optind;
if (argc == 0)
usage();
kq = kqueue();
if (kq == -1)
err(1, "kqueue");
e = malloc(argc * sizeof(struct kevent));
if (e == NULL)
err(1, "malloc");
nleft = 0;
for (n = 0; n < argc; n++) {
s = argv[n];
if (!strncmp(s, "/proc/", 6)) /* Undocumented Solaris compat */
s += 6;
errno = 0;
pid = strtol(s, &end, 10);
if (pid < 0 || *end != '\0' || errno != 0) {
warnx("%s: bad process id", s);
continue;
}
duplicate = 0;
for (i = 0; i < nleft; i++)
if (e[i].ident == (uintptr_t)pid)
duplicate = 1;
if (!duplicate) {
EV_SET(e + nleft, pid, EVFILT_PROC, EV_ADD, NOTE_EXIT,
0, NULL);
if (kevent(kq, e + nleft, 1, NULL, 0, NULL) == -1)
warn("%ld", pid);
else
nleft++;
}
}
while (nleft > 0) {
n = kevent(kq, NULL, 0, e, nleft, NULL);
if (n == -1)
err(1, "kevent");
if (verbose)
for (i = 0; i < n; i++) {
status = e[i].data;
if (WIFEXITED(status))
printf("%ld: exited with status %d.\n",
(long)e[i].ident,
WEXITSTATUS(status));
else if (WIFSIGNALED(status))
printf("%ld: killed by signal %d.\n",
(long)e[i].ident,
WTERMSIG(status));
else
printf("%ld: terminated.\n",
(long)e[i].ident);
}
nleft -= n;
}
return 0;
}

View file

@ -100,11 +100,10 @@ merge_acl(acl_t acl, acl_t *prev_acl, const char *filename)
acl_get_brand_np(acl, &acl_brand);
acl_get_brand_np(*prev_acl, &prev_acl_brand);
if (acl_brand != prev_acl_brand) {
if (branding_mismatch(acl_brand, prev_acl_brand)) {
warnx("%s: branding mismatch; existing ACL is %s, "
"entry to be merged is %s", filename,
prev_acl_brand == ACL_BRAND_NFS4 ? "NFSv4" : "POSIX.1e",
acl_brand == ACL_BRAND_NFS4 ? "NFSv4" : "POSIX.1e");
brand_name(prev_acl_brand), brand_name(acl_brand));
return (-1);
}
@ -252,9 +251,10 @@ add_acl(acl_t acl, uint entry_number, acl_t *prev_acl, const char *filename)
return (-1);
}
if (acl_brand != ACL_BRAND_NFS4) {
if (branding_mismatch(acl_brand, ACL_BRAND_NFS4)) {
warnx("%s: branding mismatch; existing ACL is NFSv4, "
"entry to be added is POSIX.1e", filename);
"entry to be added is %s", filename,
brand_name(acl_brand));
return (-1);
}

View file

@ -53,11 +53,10 @@ remove_acl(acl_t acl, acl_t *prev_acl, const char *filename)
acl_get_brand_np(acl, &acl_brand);
acl_get_brand_np(*prev_acl, &prev_acl_brand);
if (acl_brand != prev_acl_brand) {
if (branding_mismatch(acl_brand, prev_acl_brand)) {
warnx("%s: branding mismatch; existing ACL is %s, "
"entry to be removed is %s", filename,
prev_acl_brand == ACL_BRAND_NFS4 ? "NFSv4" : "POSIX.1e",
acl_brand == ACL_BRAND_NFS4 ? "NFSv4" : "POSIX.1e");
brand_name(prev_acl_brand), brand_name(acl_brand));
return (-1);
}

View file

@ -71,6 +71,8 @@ void remove_ext(acl_t *prev_acl, const char *filename);
int set_acl_mask(acl_t *prev_acl, const char *filename);
/* util.c */
void *zmalloc(size_t size);
const char *brand_name(int brand);
int branding_mismatch(int brand1, int brand2);
uint have_mask;
uint need_mask;

View file

@ -43,3 +43,26 @@ zmalloc(size_t size)
err(1, "calloc() failed");
return (ptr);
}
const char *
brand_name(int brand)
{
switch (brand) {
case ACL_BRAND_NFS4:
return "NFSv4";
case ACL_BRAND_POSIX:
return "POSIX.1e";
default:
return "unknown";
}
}
int
branding_mismatch(int brand1, int brand2)
{
if (brand1 == ACL_BRAND_UNKNOWN || brand2 == ACL_BRAND_UNKNOWN)
return (0);
if (brand1 != brand2)
return (1);
return (0);
}

View file

@ -52,13 +52,13 @@ __FBSDID("$FreeBSD$");
STATIC struct alias *atab[ATABSIZE];
STATIC int aliases;
STATIC void setalias(char *, char *);
STATIC void setalias(const char *, const char *);
STATIC int unalias(const char *);
STATIC struct alias **hashalias(const char *);
STATIC
void
setalias(char *name, char *val)
setalias(const char *name, const char *val)
{
struct alias *ap, **app;
@ -176,7 +176,7 @@ rmaliases(void)
}
struct alias *
lookupalias(char *name, int check)
lookupalias(const char *name, int check)
{
struct alias *ap = *hashalias(name);

View file

@ -42,7 +42,7 @@ struct alias {
int flag;
};
struct alias *lookupalias(char *, int);
struct alias *lookupalias(const char *, int);
int aliascmd(int, char **);
int unaliascmd(int, char **);
void rmaliases(void);

View file

@ -34,8 +34,8 @@
#define DIGITS(var) (3 + (2 + CHAR_BIT * sizeof((var))) / 3)
extern char *arith_buf, *arith_startbuf;
extern const char *arith_buf, *arith_startbuf;
arith_t arith(char *);
arith_t arith(const char *);
void arith_lex_reset(void);
int expcmd(int, char **);

View file

@ -85,9 +85,9 @@ expr:
ARITH_LPAREN expr ARITH_RPAREN
{ $$ = $2; } |
expr ARITH_OR expr
{ $$ = $1 ? $1 : $3 ? $3 : 0; } |
{ $$ = $1 || $3; } |
expr ARITH_AND expr
{ $$ = $1 ? ( $3 ? $3 : 0 ) : 0; } |
{ $$ = $1 && $3; } |
expr ARITH_BOR expr
{ $$ = $1 | $3; } |
expr ARITH_BXOR expr
@ -265,7 +265,7 @@ expr:
#define YYPARSE_PARAM_TYPE arith_t *
#define YYPARSE_PARAM result
char *arith_buf, *arith_startbuf;
const char *arith_buf, *arith_startbuf;
int yylex(void);
int yyparse(YYPARSE_PARAM_TYPE);
@ -284,7 +284,7 @@ arith_assign(char *name, arith_t value)
}
arith_t
arith(char *s)
arith(const char *s)
{
arith_t result;
@ -299,7 +299,7 @@ arith(char *s)
}
static void
yyerror(char *s)
yyerror(const char *s)
{
yyerrok;
@ -314,7 +314,7 @@ yyerror(char *s)
int
expcmd(int argc, char **argv)
{
char *p;
const char *p;
char *concat;
char **ap;
arith_t i;
@ -354,7 +354,7 @@ main(int argc, char *argv[])
printf("%d\n", exp(argv[1]));
}
error(char *s)
error(const char *s)
{
fprintf(stderr, "exp: %s\n", s);
exit(1);

View file

@ -70,7 +70,7 @@ STATIC int docd(char *, int, int);
STATIC char *getcomponent(void);
STATIC char *findcwd(char *);
STATIC void updatepwd(char *);
STATIC char *getpwd2(char *, size_t);
STATIC char *getpwd2(void);
STATIC char *curdir = NULL; /* current working directory */
STATIC char *prevdir; /* previous working directory */
@ -79,8 +79,8 @@ STATIC char *cdcomppath;
int
cdcmd(int argc, char **argv)
{
char *dest;
char *path;
const char *dest;
const char *path;
char *p;
struct stat statb;
int ch, phys, print = 0;
@ -263,10 +263,8 @@ findcwd(char *dir)
* any more because we traversed a symbolic link or something
* we couldn't stat().
*/
if (dir == NULL || curdir == NULL) {
p = stalloc(PATH_MAX);
return getpwd2(p, PATH_MAX);
}
if (dir == NULL || curdir == NULL)
return getpwd2();
cdcomppath = stalloc(strlen(dir) + 1);
scopy(dir, cdcomppath);
STARTSTACKSTR(new);
@ -313,7 +311,7 @@ updatepwd(char *dir)
int
pwdcmd(int argc, char **argv)
{
char buf[PATH_MAX];
char *p;
int ch, phys;
optreset = 1; optind = 1; opterr = 0; /* initialize getopt */
@ -341,9 +339,9 @@ pwdcmd(int argc, char **argv)
out1str(curdir);
out1c('\n');
} else {
if (getcwd(buf, sizeof(buf)) == NULL)
if ((p = getpwd2()) == NULL)
error(".: %s", strerror(errno));
out1str(buf);
out1str(p);
out1c('\n');
}
@ -356,36 +354,45 @@ pwdcmd(int argc, char **argv)
char *
getpwd(void)
{
char buf[PATH_MAX];
char *p;
if (curdir)
return curdir;
p = getpwd2(buf, sizeof(buf));
p = getpwd2();
if (p != NULL)
curdir = savestr(p);
return curdir;
}
#define MAXPWD 256
/*
* Return the current directory.
*/
STATIC char *
getpwd2(char *buf, size_t size)
getpwd2(void)
{
if (getcwd(buf, size) == NULL) {
char *pwd = getenv("PWD");
struct stat stdot, stpwd;
struct stat stdot, stpwd;
char *pwd;
int i;
if (pwd && *pwd == '/' && stat(".", &stdot) != -1 &&
stat(pwd, &stpwd) != -1 &&
stdot.st_dev == stpwd.st_dev &&
stdot.st_ino == stpwd.st_ino) {
for (i = MAXPWD;; i *= 2) {
pwd = stalloc(i);
if (getcwd(pwd, i) != NULL)
return pwd;
}
return NULL;
stunalloc(pwd);
if (errno != ERANGE)
break;
}
return buf;
pwd = getenv("PWD");
if (pwd && *pwd == '/' && stat(".", &stdot) != -1 &&
stat(pwd, &stpwd) != -1 &&
stdot.st_dev == stpwd.st_dev &&
stdot.st_ino == stpwd.st_ino) {
return pwd;
}
return NULL;
}

View file

@ -67,17 +67,21 @@ volatile sig_atomic_t intpending;
char *commandname;
static void exverror(int, const char *, va_list) __printf0like(2, 0);
static void exverror(int, const char *, va_list) __printf0like(2, 0) __dead2;
/*
* Called to raise an exception. Since C doesn't include exceptions, we
* just do a longjmp to the exception handler. The type of exception is
* stored in the global variable "exception".
*
* Interrupts are disabled; they should be reenabled when the exception is
* caught.
*/
void
exraise(int e)
{
INTOFF;
if (handler == NULL)
abort();
exception = e;
@ -138,8 +142,15 @@ onint(void)
static void
exverror(int cond, const char *msg, va_list ap)
{
CLEAR_PENDING_INT;
INTOFF;
/*
* An interrupt trumps an error. Certain places catch error
* exceptions or transform them to a plain nonzero exit code
* in child processes, and if an error exception can be handled,
* an interrupt can be handled as well.
*
* exraise() will disable interrupts for the exception handler.
*/
FORCEINTON;
#ifdef DEBUG
if (msg)
@ -149,8 +160,8 @@ exverror(int cond, const char *msg, va_list ap)
#endif
if (msg) {
if (commandname)
outfmt(&errout, "%s: ", commandname);
doformat(&errout, msg, ap);
outfmt(out2, "%s: ", commandname);
doformat(out2, msg, ap);
out2c('\n');
}
flushall();

View file

@ -72,14 +72,16 @@ extern volatile sig_atomic_t intpending;
#define INTOFF suppressint++
#define INTON { if (--suppressint == 0 && intpending) onint(); }
#define is_int_on() suppressint
#define SETINTON(s) suppressint = (s)
#define FORCEINTON {suppressint = 0; if (intpending) onint();}
#define CLEAR_PENDING_INT intpending = 0
#define int_pending() intpending
void exraise(int);
void exraise(int) __dead2;
void onint(void);
void error(const char *, ...) __printf0like(1, 2);
void exerror(int, const char *, ...) __printf0like(2, 3);
void error(const char *, ...) __printf0like(1, 2) __dead2;
void exerror(int, const char *, ...) __printf0like(2, 3) __dead2;
/*

View file

@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$");
#endif
MKINIT int evalskip; /* set if we are skipping commands */
int evalskip; /* set if we are skipping commands */
STATIC int skipcount; /* number of levels to skip */
MKINIT int loopnest; /* current loop nesting level */
int funcnest; /* depth of function calls */
@ -407,8 +407,7 @@ evalsubshell(union node *n, int flags)
flags &=~ EV_TESTED;
redirect(n->nredir.redirect, 0);
evaltree(n->nredir.n, flags | EV_EXIT); /* never returns */
}
if (! backgnd) {
} else if (! backgnd) {
INTOFF;
exitstatus = waitforjob(jp, (int *)NULL);
INTON;
@ -593,6 +592,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
char *savecmdname;
struct shparam saveparam;
struct localvar *savelocalvars;
struct parsefile *savetopfile;
volatile int e;
char *lastarg;
int realstatus;
@ -646,7 +646,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
out2str(ps4val());
for (sp = varlist.list ; sp ; sp = sp->next) {
if (sep != 0)
outc(' ', &errout);
out2c(' ');
p = sp->text;
while (*p != '=' && *p != '\0')
out2c(*p++);
@ -658,7 +658,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
}
for (sp = arglist.list ; sp ; sp = sp->next) {
if (sep != 0)
outc(' ', &errout);
out2c(' ');
/* Disambiguate command looking like assignment. */
if (sp == arglist.list &&
strchr(sp->text, '=') != NULL &&
@ -670,7 +670,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
out2qstr(sp->text);
sep = ' ';
}
outc('\n', &errout);
out2c('\n');
flushout(&errout);
}
@ -722,10 +722,10 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
break;
if ((cmdentry.u.index = find_builtin(*argv,
&cmdentry.special)) < 0) {
outfmt(&errout, "%s: not found\n", *argv);
exitstatus = 127;
flushout(&errout);
return;
cmdentry.u.index = BLTINCMD;
argv--;
argc++;
break;
}
if (cmdentry.u.index != BLTINCMD)
break;
@ -781,7 +781,6 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
savelocalvars = localvars;
localvars = NULL;
reffunc(cmdentry.u.func);
INTON;
savehandler = handler;
if (setjmp(jmploc.loc)) {
if (exception == EXSHELLPROC)
@ -793,19 +792,20 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
unreffunc(cmdentry.u.func);
poplocalvars();
localvars = savelocalvars;
funcnest--;
handler = savehandler;
longjmp(handler->loc, 1);
}
handler = &jmploc;
funcnest++;
INTON;
for (sp = varlist.list ; sp ; sp = sp->next)
mklocal(sp->text);
funcnest++;
exitstatus = oexitstatus;
if (flags & EV_TESTED)
evaltree(getfuncnode(cmdentry.u.func), EV_TESTED);
else
evaltree(getfuncnode(cmdentry.u.func), 0);
funcnest--;
INTOFF;
unreffunc(cmdentry.u.func);
poplocalvars();
@ -813,6 +813,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
freeparam(&shellparam);
shellparam = saveparam;
handler = savehandler;
funcnest--;
popredir();
INTON;
if (evalskip == SKIPFUNC) {
@ -831,8 +832,10 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
memout.nextc = memout.buf;
memout.bufsize = 64;
mode |= REDIR_BACKQ;
cmdentry.special = 0;
}
savecmdname = commandname;
savetopfile = getcurrentfile();
cmdenviron = varlist.list;
e = -1;
savehandler = handler;
@ -847,7 +850,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
listsetvar(cmdenviron);
commandname = argv[0];
argptr = argv + 1;
optptr = NULL; /* initialize nextopt */
nextopt_optptr = NULL; /* initialize nextopt */
builtin_flags = flags;
exitstatus = (*builtinfunc[cmdentry.u.index])(argc, argv);
flushall();
@ -863,24 +866,25 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
}
}
handler = savehandler;
if (e != -1) {
if ((e != EXERROR && e != EXEXEC)
|| cmdentry.special)
exraise(e);
FORCEINTON;
}
if (cmdentry.u.index != EXECCMD)
popredir();
if (flags == EV_BACKCMD) {
backcmd->buf = memout.buf;
backcmd->nleft = memout.nextc - memout.buf;
memout.buf = NULL;
}
if (e != -1) {
if ((e != EXERROR && e != EXEXEC)
|| cmdentry.special)
exraise(e);
popfilesupto(savetopfile);
if (flags != EV_BACKCMD)
FORCEINTON;
}
if (cmdentry.u.index != EXECCMD)
popredir();
} else {
#ifdef DEBUG
trputs("normal command: "); trargs(argv);
#endif
clearredir();
redirect(cmd->ncmd.redirect, 0);
for (sp = varlist.list ; sp ; sp = sp->next)
setvareq(sp->text, VEXPORT|VSTACK);
@ -941,12 +945,17 @@ prehash(union node *n)
*/
/*
* No command given, or a bltin command with no arguments.
* No command given, a bltin command with no arguments, or a bltin command
* with an invalid name.
*/
int
bltincmd(int argc __unused, char **argv __unused)
bltincmd(int argc, char **argv)
{
if (argc > 1) {
out2fmt_flush("%s: not found\n", argv[1]);
return 127;
}
/*
* Preserve exitstatus of a previous possible redirection
* as POSIX mandates
@ -1021,7 +1030,7 @@ commandcmd(int argc, char **argv)
if (cmd != -1) {
if (argc != 1)
error("wrong number of arguments");
return typecmd_impl(2, argv - 1, cmd);
return typecmd_impl(2, argv - 1, cmd, path);
}
if (argc != 0) {
old = handler;

View file

@ -35,6 +35,7 @@
extern char *commandname; /* currently executing command */
extern int exitstatus; /* exit status of last command */
extern int oexitstatus; /* saved exit status */
extern struct strlist *cmdenviron; /* environment for builtin command */

View file

@ -98,7 +98,7 @@ int exerrno = 0; /* Last exec error */
STATIC void tryexec(char *, char **, char **);
STATIC void printentry(struct tblentry *, int);
STATIC struct tblentry *cmdlookup(char *, int);
STATIC struct tblentry *cmdlookup(const char *, int);
STATIC void delete_cmd_entry(void);
@ -109,7 +109,7 @@ STATIC void delete_cmd_entry(void);
*/
void
shellexec(char **argv, char **envp, char *path, int index)
shellexec(char **argv, char **envp, const char *path, int idx)
{
char *cmdname;
int e;
@ -120,7 +120,7 @@ shellexec(char **argv, char **envp, char *path, int index)
} else {
e = ENOENT;
while ((cmdname = padvance(&path, argv[0])) != NULL) {
if (--index < 0 && pathopt == NULL) {
if (--idx < 0 && pathopt == NULL) {
tryexec(cmdname, argv, envp);
if (errno != ENOENT && errno != ENOTDIR)
e = errno;
@ -175,13 +175,13 @@ tryexec(char *cmd, char **argv, char **envp)
* NULL.
*/
char *pathopt;
const char *pathopt;
char *
padvance(char **path, char *name)
padvance(const char **path, const char *name)
{
char *p, *q;
char *start;
const char *p, *start;
char *q;
int len;
if (*path == NULL)
@ -255,7 +255,7 @@ hashcmd(int argc __unused, char **argv __unused)
if (cmdp != NULL)
printentry(cmdp, verbose);
else
outfmt(&errout, "%s: not found\n", name);
outfmt(out2, "%s: not found\n", name);
}
flushall();
}
@ -268,17 +268,17 @@ hashcmd(int argc __unused, char **argv __unused)
STATIC void
printentry(struct tblentry *cmdp, int verbose)
{
int index;
char *path;
int idx;
const char *path;
char *name;
if (cmdp->cmdtype == CMDNORMAL) {
index = cmdp->param.index;
idx = cmdp->param.index;
path = pathval();
do {
name = padvance(&path, cmdp->cmdname);
stunalloc(name);
} while (--index >= 0);
} while (--idx >= 0);
out1str(name);
} else if (cmdp->cmdtype == CMDBUILTIN) {
out1fmt("builtin %s", cmdp->cmdname);
@ -310,10 +310,11 @@ printentry(struct tblentry *cmdp, int verbose)
*/
void
find_command(char *name, struct cmdentry *entry, int printerr, char *path)
find_command(const char *name, struct cmdentry *entry, int printerr,
const char *path)
{
struct tblentry *cmdp;
int index;
int idx;
int prev;
char *fullname;
struct stat statb;
@ -353,11 +354,11 @@ find_command(char *name, struct cmdentry *entry, int printerr, char *path)
}
e = ENOENT;
index = -1;
idx = -1;
loop:
while ((fullname = padvance(&path, name)) != NULL) {
stunalloc(fullname);
index++;
idx++;
if (pathopt) {
if (prefix("builtin", pathopt)) {
if ((i = find_builtin(name, &spec)) < 0)
@ -376,8 +377,8 @@ find_command(char *name, struct cmdentry *entry, int printerr, char *path)
}
}
/* if rehash, don't redo absolute path names */
if (fullname[0] == '/' && index <= prev) {
if (index < prev)
if (fullname[0] == '/' && idx <= prev) {
if (idx < prev)
goto loop;
TRACE(("searchexec \"%s\": no change\n", name));
goto success;
@ -414,7 +415,7 @@ find_command(char *name, struct cmdentry *entry, int printerr, char *path)
INTOFF;
cmdp = cmdlookup(name, 1);
cmdp->cmdtype = CMDNORMAL;
cmdp->param.index = index;
cmdp->param.index = idx;
INTON;
goto success;
}
@ -446,7 +447,7 @@ find_command(char *name, struct cmdentry *entry, int printerr, char *path)
*/
int
find_builtin(char *name, int *special)
find_builtin(const char *name, int *special)
{
const struct builtincmd *bp;
@ -493,18 +494,18 @@ void
changepath(const char *newval)
{
const char *old, *new;
int index;
int idx;
int firstchange;
int bltin;
old = pathval();
new = newval;
firstchange = 9999; /* assume no change */
index = 0;
idx = 0;
bltin = -1;
for (;;) {
if (*old != *new) {
firstchange = index;
firstchange = idx;
if ((*old == '\0' && *new == ':')
|| (*old == ':' && *new == '\0'))
firstchange++;
@ -513,9 +514,9 @@ changepath(const char *newval)
if (*new == '\0')
break;
if (*new == '%' && bltin < 0 && prefix("builtin", new + 1))
bltin = index;
bltin = idx;
if (*new == ':') {
index++;
idx++;
}
new++, old++;
}
@ -608,10 +609,10 @@ STATIC struct tblentry **lastcmdentry;
STATIC struct tblentry *
cmdlookup(char *name, int add)
cmdlookup(const char *name, int add)
{
int hashval;
char *p;
const char *p;
struct tblentry *cmdp;
struct tblentry **pp;
@ -664,7 +665,7 @@ delete_cmd_entry(void)
*/
void
addcmdentry(char *name, struct cmdentry *entry)
addcmdentry(const char *name, struct cmdentry *entry)
{
struct tblentry *cmdp;
@ -684,7 +685,7 @@ addcmdentry(char *name, struct cmdentry *entry)
*/
void
defun(char *name, union node *func)
defun(const char *name, union node *func)
{
struct cmdentry entry;
@ -701,7 +702,7 @@ defun(char *name, union node *func)
*/
int
unsetfunc(char *name)
unsetfunc(const char *name)
{
struct tblentry *cmdp;
@ -719,19 +720,21 @@ unsetfunc(char *name)
*/
int
typecmd_impl(int argc, char **argv, int cmd)
typecmd_impl(int argc, char **argv, int cmd, const char *path)
{
struct cmdentry entry;
struct tblentry *cmdp;
char **pp;
const char *const *pp;
struct alias *ap;
int i;
int error = 0;
extern char *const parsekwd[];
int error1 = 0;
if (path != pathval())
clearcmdentry(0);
for (i = 1; i < argc; i++) {
/* First look at the keywords */
for (pp = (char **)parsekwd; *pp; pp++)
for (pp = parsekwd; *pp; pp++)
if (**pp == *argv[i] && equal(*pp, argv[i]))
break;
@ -761,16 +764,17 @@ typecmd_impl(int argc, char **argv, int cmd)
}
else {
/* Finally use brute force */
find_command(argv[i], &entry, 0, pathval());
find_command(argv[i], &entry, 0, path);
}
switch (entry.cmdtype) {
case CMDNORMAL: {
if (strchr(argv[i], '/') == NULL) {
char *path = pathval(), *name;
const char *path2 = path;
char *name;
int j = entry.u.index;
do {
name = padvance(&path, argv[i]);
name = padvance(&path2, argv[i]);
stunalloc(name);
} while (--j >= 0);
if (cmd == TYPECMD_SMALLV)
@ -791,7 +795,7 @@ typecmd_impl(int argc, char **argv, int cmd)
if (cmd != TYPECMD_SMALLV)
outfmt(out2, "%s: %s\n",
argv[i], strerror(errno));
error |= 127;
error1 |= 127;
}
}
break;
@ -816,11 +820,15 @@ typecmd_impl(int argc, char **argv, int cmd)
default:
if (cmd != TYPECMD_SMALLV)
outfmt(out2, "%s: not found\n", argv[i]);
error |= 127;
error1 |= 127;
break;
}
}
return error;
if (path != pathval())
clearcmdentry(0);
return error1;
}
/*
@ -830,5 +838,5 @@ typecmd_impl(int argc, char **argv, int cmd)
int
typecmd(int argc, char **argv)
{
return typecmd_impl(argc, argv, TYPECMD_TYPE);
return typecmd_impl(argc, argv, TYPECMD_TYPE, bltinlookup("PATH", 1));
}

View file

@ -57,20 +57,20 @@ struct cmdentry {
};
extern char *pathopt; /* set by padvance */
extern const char *pathopt; /* set by padvance */
extern int exerrno; /* last exec error */
void shellexec(char **, char **, char *, int);
char *padvance(char **, char *);
void shellexec(char **, char **, const char *, int) __dead2;
char *padvance(const char **, const char *);
int hashcmd(int, char **);
void find_command(char *, struct cmdentry *, int, char *);
int find_builtin(char *, int *);
void find_command(const char *, struct cmdentry *, int, const char *);
int find_builtin(const char *, int *);
void hashcd(void);
void changepath(const char *);
void deletefuncs(void);
void addcmdentry(char *, struct cmdentry *);
void defun(char *, union node *);
int unsetfunc(char *);
int typecmd_impl(int, char **, int);
void addcmdentry(const char *, struct cmdentry *);
void defun(const char *, union node *);
int unsetfunc(const char *);
int typecmd_impl(int, char **, int, const char *);
int typecmd(int, char **);
void clearcmdentry(int);

View file

@ -107,7 +107,7 @@ STATIC void expmeta(char *, char *);
STATIC void addfname(char *);
STATIC struct strlist *expsort(struct strlist *);
STATIC struct strlist *msort(struct strlist *, int);
STATIC int pmatch(char *, char *, int);
STATIC int pmatch(const char *, const char *, int);
STATIC char *cvtnum(int, char *);
STATIC int collate_range_cmp(int, int);
@ -271,8 +271,13 @@ exptilde(char *p, int flag)
while ((c = *p) != '\0') {
switch(c) {
case CTLESC:
return (startp);
case CTLESC: /* This means CTL* are always considered quoted. */
case CTLVAR:
case CTLENDVAR:
case CTLBACKQ:
case CTLBACKQ | CTLQUOTE:
case CTLARI:
case CTLENDARI:
case CTLQUOTEMARK:
return (startp);
case ':':
@ -521,7 +526,7 @@ subevalvar(char *p, char *str, int strloc, int subtype, int startloc,
case VSQUESTION:
if (*p != CTLENDVAR) {
outfmt(&errout, "%s\n", startp);
outfmt(out2, "%s\n", startp);
error((char *)NULL);
}
error("%.*s: parameter %snot set", (int)(p - str - 1),
@ -850,7 +855,6 @@ varvalue(char *name, int quoted, int subtype, int flag)
int num;
char *p;
int i;
extern int oexitstatus;
char sep;
char **ap;
char const *syntax;
@ -974,7 +978,7 @@ ifsbreakup(char *string, struct arglist *arglist)
char *start;
char *p;
char *q;
char *ifs;
const char *ifs;
const char *ifsspc;
int had_param_ch = 0;
@ -1338,7 +1342,7 @@ msort(struct strlist *list, int len)
*/
int
patmatch(char *pattern, char *string, int squoted)
patmatch(const char *pattern, const char *string, int squoted)
{
#ifdef notdef
if (pattern[0] == '!' && pattern[1] == '!')
@ -1350,9 +1354,9 @@ patmatch(char *pattern, char *string, int squoted)
STATIC int
pmatch(char *pattern, char *string, int squoted)
pmatch(const char *pattern, const char *string, int squoted)
{
char *p, *q;
const char *p, *q;
char c;
p = pattern;
@ -1400,7 +1404,7 @@ pmatch(char *pattern, char *string, int squoted)
} while (*q++ != '\0');
return 0;
case '[': {
char *endp;
const char *endp;
int invert, found;
char chr;
@ -1504,7 +1508,7 @@ rmescapes(char *str)
*/
int
casematch(union node *pattern, char *val)
casematch(union node *pattern, const char *val)
{
struct stackmark smark;
int result;

View file

@ -58,7 +58,7 @@ union node;
void expandhere(union node *, int);
void expandarg(union node *, struct arglist *, int);
void expari(int);
int patmatch(char *, char *, int);
int patmatch(const char *, const char *, int);
void rmescapes(char *);
int casematch(union node *, char *);
int casematch(union node *, const char *);
int wordexpcmd(int, char **);

View file

@ -92,7 +92,7 @@ histedit(void)
if (hist != NULL)
sethistsize(histsizeval());
else
out2str("sh: can't initialize history\n");
out2fmt_flush("sh: can't initialize history\n");
}
if (editing && !el && isatty(0)) { /* && isatty(2) ??? */
/*
@ -114,7 +114,7 @@ histedit(void)
el_set(el, EL_PROMPT, getprompt);
} else {
bad:
out2str("sh: can't initialize editing\n");
out2fmt_flush("sh: can't initialize editing\n");
}
INTON;
} else if (!editing && el) {
@ -164,19 +164,19 @@ int
histcmd(int argc, char **argv)
{
int ch;
char *editor = NULL;
const char *editor = NULL;
HistEvent he;
int lflg = 0, nflg = 0, rflg = 0, sflg = 0;
int i, retval;
char *firststr, *laststr;
const char *firststr, *laststr;
int first, last, direction;
char *pat = NULL, *repl;
char *pat = NULL, *repl = NULL;
static int active = 0;
struct jmploc jmploc;
struct jmploc *savehandler;
char editfilestr[PATH_MAX];
char *volatile editfile;
FILE *efp;
FILE *efp = NULL;
int oldhistnum;
if (hist == NULL)
@ -336,6 +336,7 @@ histcmd(int argc, char **argv)
if (sflg) {
if (displayhist) {
out2str(s);
flushout(out2);
}
evalstring(s, 0);
if (displayhist && hist) {
@ -405,7 +406,7 @@ fc_replace(const char *s, char *p, char *r)
}
int
not_fcnumber(char *s)
not_fcnumber(const char *s)
{
if (s == NULL)
return (0);
@ -415,10 +416,10 @@ not_fcnumber(char *s)
}
int
str_to_event(char *str, int last)
str_to_event(const char *str, int last)
{
HistEvent he;
char *s = str;
const char *s = str;
int relative = 0;
int i, retval;

View file

@ -93,7 +93,7 @@ struct parsefile {
int plinno = 1; /* input line number */
MKINIT int parsenleft; /* copy of parsefile->nleft */
int parsenleft; /* copy of parsefile->nleft */
MKINIT int parselleft; /* copy of parsefile->lleft */
char *parsenextc; /* copy of parsefile->nextc */
MKINIT struct parsefile basepf; /* top level input file */
@ -111,9 +111,9 @@ static int preadfd(void);
INCLUDE "input.h"
INCLUDE "error.h"
INIT {
extern char basebuf[];
MKINIT char basebuf[];
INIT {
basepf.nextc = basepf.buf = basebuf;
}
@ -215,7 +215,7 @@ preadfd(void)
if (flags >= 0 && flags & O_NONBLOCK) {
flags &=~ O_NONBLOCK;
if (fcntl(0, F_SETFL, flags) >= 0) {
out2str("sh: turning off NDELAY mode\n");
out2fmt_flush("sh: turning off NDELAY mode\n");
goto retry;
}
}
@ -359,7 +359,7 @@ pushstring(char *s, int len, void *ap)
struct strpush *sp;
INTOFF;
/*dprintf("*** calling pushstring: %s, %d\n", s, len);*/
/*out2fmt_flush("*** calling pushstring: %s, %d\n", s, len);*/
if (parsefile->strpush) {
sp = ckmalloc(sizeof (struct strpush));
sp->prev = parsefile->strpush;
@ -386,7 +386,7 @@ popstring(void)
parsenextc = sp->prevstring;
parsenleft = sp->prevnleft;
parselleft = sp->prevlleft;
/*dprintf("*** calling popstring: restoring to '%s'\n", parsenextc);*/
/*out2fmt_flush("*** calling popstring: restoring to '%s'\n", parsenextc);*/
if (sp->ap)
sp->ap->flag &= ~ALIASINUSE;
parsefile->strpush = sp->prev;
@ -401,7 +401,7 @@ popstring(void)
*/
void
setinputfile(char *fname, int push)
setinputfile(const char *fname, int push)
{
int fd;
int fd2;
@ -508,6 +508,32 @@ popfile(void)
}
/*
* Return current file (to go back to it later using popfilesupto()).
*/
struct parsefile *
getcurrentfile(void)
{
return parsefile;
}
/*
* Pop files until the given file is on top again. Useful for regular
* builtins that read shell commands from files or strings.
* If the given file is not an active file, an error is raised.
*/
void
popfilesupto(struct parsefile *file)
{
while (parsefile != file && parsefile != &basepf)
popfile();
if (parsefile != file)
error("popfilesupto() misused");
}
/*
* Return to top level.
*/

View file

@ -45,6 +45,8 @@ extern int parsenleft; /* number of characters left in input buffer */
extern char *parsenextc; /* next character in input buffer */
extern int init_editline; /* 0 == not setup, 1 == OK, -1 == failed */
struct parsefile;
char *pfgets(char *, int);
int pgetc(void);
int preadbuffer(void);
@ -52,10 +54,12 @@ int preadateof(void);
void pungetc(void);
void pushstring(char *, int, void *);
void popstring(void);
void setinputfile(char *, int);
void setinputfile(const char *, int);
void setinputfd(int, int);
void setinputstring(char *, int);
void popfile(void);
struct parsefile *getcurrentfile(void);
void popfilesupto(struct parsefile *);
void popallfiles(void);
void closescript(void);

View file

@ -92,7 +92,7 @@ STATIC struct job *getjob(char *);
STATIC pid_t dowait(int, struct job *);
STATIC pid_t waitproc(int, int *);
STATIC void cmdtxt(union node *);
STATIC void cmdputs(char *);
STATIC void cmdputs(const char *);
#if JOBS
STATIC void setcurjob(struct job *);
STATIC void deljob(struct job *);
@ -146,7 +146,7 @@ setjobctl(int on)
do { /* while we are in the background */
initialpgrp = tcgetpgrp(ttyfd);
if (initialpgrp < 0) {
out: out2str("sh: can't access tty; job control turned off\n");
out: out2fmt_flush("sh: can't access tty; job control turned off\n");
mflag = 0;
return;
}
@ -757,6 +757,7 @@ forkshell(struct job *jp, union node *n, int mode)
TRACE(("Child shell %d\n", (int)getpid()));
wasroot = rootshell;
rootshell = 0;
handler = &main_handler;
closescript();
INTON;
clear_traps();
@ -1046,7 +1047,7 @@ stoppedjobs(void)
if (jp->used == 0)
continue;
if (jp->state == JOBSTOPPED) {
out2str("You have stopped jobs.\n");
out2fmt_flush("You have stopped jobs.\n");
job_warning = 2;
return (1);
}
@ -1082,7 +1083,7 @@ cmdtxt(union node *n)
{
union node *np;
struct nodelist *lp;
char *p;
const char *p;
int i;
char s[2];
@ -1211,9 +1212,10 @@ cmdtxt(union node *n)
STATIC void
cmdputs(char *s)
cmdputs(const char *s)
{
char *p, *q;
const char *p;
char *q;
char c;
int subtype = 0;

View file

@ -72,7 +72,7 @@ void
chkmail(int silent)
{
int i;
char *mpath;
const char *mpath;
char *p;
char *q;
struct stackmark smark;

View file

@ -75,8 +75,9 @@ __FBSDID("$FreeBSD$");
int rootpid;
int rootshell;
struct jmploc main_handler;
STATIC void read_profile(char *);
STATIC void read_profile(const char *);
STATIC char *find_dot_file(char *);
/*
@ -90,14 +91,13 @@ STATIC char *find_dot_file(char *);
int
main(int argc, char *argv[])
{
struct jmploc jmploc;
struct stackmark smark;
volatile int state;
char *shinit;
(void) setlocale(LC_ALL, "");
state = 0;
if (setjmp(jmploc.loc)) {
if (setjmp(main_handler.loc)) {
/*
* When a shell procedure is executed, we raise the
* exception EXSHELLPROC to clean up before executing
@ -143,7 +143,7 @@ main(int argc, char *argv[])
else
goto state4;
}
handler = &jmploc;
handler = &main_handler;
#ifdef DEBUG
opentrace();
trputs("Shell args: "); trargs(argv);
@ -154,7 +154,7 @@ main(int argc, char *argv[])
setstackmark(&smark);
procargs(argc, argv);
if (getpwd() == NULL && iflag)
out2str("sh: cannot determine working directory\n");
out2fmt_flush("sh: cannot determine working directory\n");
if (getpwd() != NULL)
setvar ("PWD", getpwd(), VEXPORT);
if (argv[0] && argv[0][0] == '-') {
@ -223,7 +223,7 @@ cmdloop(int top)
if (!stoppedjobs()) {
if (!Iflag)
break;
out2str("\nUse \"exit\" to leave shell.\n");
out2fmt_flush("\nUse \"exit\" to leave shell.\n");
}
numeof++;
} else if (n != NULL && nflag == 0) {
@ -248,7 +248,7 @@ cmdloop(int top)
*/
STATIC void
read_profile(char *name)
read_profile(const char *name)
{
int fd;
@ -269,7 +269,7 @@ read_profile(char *name)
*/
void
readcmdfile(char *name)
readcmdfile(const char *name)
{
int fd;
@ -296,7 +296,7 @@ find_dot_file(char *basename)
{
static char localname[FILENAME_MAX+1];
char *fullname;
char *path = pathval();
const char *path = pathval();
struct stat statb;
/* don't try this for absolute or relative paths */
@ -315,7 +315,6 @@ find_dot_file(char *basename)
int
dotcmd(int argc, char **argv)
{
struct strlist *sp;
char *fullname;
if (argc < 2)
@ -323,9 +322,6 @@ dotcmd(int argc, char **argv)
exitstatus = 0;
for (sp = cmdenviron; sp ; sp = sp->next)
setvareq(savestr(sp->text), VSTRFIXED|VTEXTFIXED);
fullname = find_dot_file(argv[1]);
setinputfile(fullname, 1);
commandname = fullname;
@ -338,8 +334,6 @@ dotcmd(int argc, char **argv)
int
exitcmd(int argc, char **argv)
{
extern int oexitstatus;
if (stoppedjobs())
return 0;
if (argc > 1)

View file

@ -35,8 +35,9 @@
extern int rootpid; /* pid of main shell */
extern int rootshell; /* true if we aren't a child of the main shell */
extern struct jmploc main_handler; /* top level exception handler */
void readcmdfile(char *);
void readcmdfile(const char *);
void cmdloop(int);
int dotcmd(int, char **);
int exitcmd(int, char **);

View file

@ -95,7 +95,7 @@ ckfree(pointer p)
*/
char *
savestr(char *s)
savestr(const char *s)
{
char *p;

View file

@ -51,7 +51,7 @@ extern int herefd;
pointer ckmalloc(size_t);
pointer ckrealloc(pointer, int);
void ckfree(pointer);
char *savestr(char *);
char *savestr(const char *);
pointer stalloc(int);
void stunalloc(pointer);
void setstackmark(struct stackmark *);

View file

@ -93,7 +93,7 @@ readcmd(int argc __unused, char **argv __unused)
char c;
int rflag;
char *prompt;
char *ifs;
const char *ifs;
char *p;
int startword;
int status;
@ -254,7 +254,7 @@ readcmd(int argc __unused, char **argv __unused)
int
umaskcmd(int argc __unused, char **argv)
umaskcmd(int argc __unused, char **argv __unused)
{
char *ap;
int mask;

View file

@ -88,7 +88,7 @@ tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ < $temp |
awk '{ printf "#define %s %d\n", $1, NR-1}'
echo '
struct builtincmd {
char *name;
const char *name;
int code;
int special;
};

View file

@ -102,9 +102,9 @@ struct block {
*/
struct event {
char *name; /* name of event (e.g. INIT) */
char *routine; /* name of routine called on event */
char *comment; /* comment describing routine */
const char *name; /* name of event (e.g. INIT) */
const char *routine; /* name of routine called on event */
const char *comment; /* comment describing routine */
struct text code; /* code for handling event */
};
@ -140,7 +140,7 @@ struct event event[] = {
};
char *curfile; /* current file */
const char *curfile; /* current file */
int linno; /* current line */
char *header_files[200]; /* list of header files */
struct text defines; /* #define statements */
@ -148,20 +148,20 @@ struct text decls; /* declarations */
int amiddecls; /* for formatting */
void readfile(char *);
int match(char *, char *);
int gooddefine(char *);
void doevent(struct event *, FILE *, char *);
void readfile(const char *);
int match(const char *, const char *);
int gooddefine(const char *);
void doevent(struct event *, FILE *, const char *);
void doinclude(char *);
void dodecl(char *, FILE *);
void output(void);
void addstr(char *, struct text *);
void addstr(const char *, struct text *);
void addchar(int, struct text *);
void writetext(struct text *, FILE *);
FILE *ckfopen(char *, char *);
FILE *ckfopen(const char *, const char *);
void *ckmalloc(size_t);
char *savestr(char *);
void error(char *);
char *savestr(const char *);
void error(const char *);
#define equal(s1, s2) (strcmp(s1, s2) == 0)
@ -170,9 +170,9 @@ main(int argc __unused, char *argv[])
{
char **ap;
header_files[0] = "\"shell.h\"";
header_files[1] = "\"mystring.h\"";
header_files[2] = "\"init.h\"";
header_files[0] = savestr("\"shell.h\"");
header_files[1] = savestr("\"mystring.h\"");
header_files[2] = savestr("\"init.h\"");
for (ap = argv + 1 ; *ap ; ap++)
readfile(*ap);
output();
@ -186,7 +186,7 @@ main(int argc __unused, char *argv[])
*/
void
readfile(char *fname)
readfile(const char *fname)
{
FILE *fp;
char line[1024];
@ -230,9 +230,9 @@ readfile(char *fname)
int
match(char *name, char *line)
match(const char *name, const char *line)
{
char *p, *q;
const char *p, *q;
p = name, q = line;
while (*p) {
@ -246,9 +246,9 @@ match(char *name, char *line)
int
gooddefine(char *line)
gooddefine(const char *line)
{
char *p;
const char *p;
if (! match("#define", line))
return 0; /* not a define */
@ -269,11 +269,11 @@ gooddefine(char *line)
void
doevent(struct event *ep, FILE *fp, char *fname)
doevent(struct event *ep, FILE *fp, const char *fname)
{
char line[1024];
int indent;
char *p;
const char *p;
sprintf(line, "\n /* from %s: */\n", fname);
addstr(line, &ep->code);
@ -407,7 +407,7 @@ output(void)
*/
void
addstr(char *s, struct text *text)
addstr(const char *s, struct text *text)
{
while (*s) {
if (--text->nleft < 0)
@ -452,7 +452,7 @@ writetext(struct text *text, FILE *fp)
}
FILE *
ckfopen(char *file, char *mode)
ckfopen(const char *file, const char *mode)
{
FILE *fp;
@ -474,7 +474,7 @@ ckmalloc(size_t nbytes)
}
char *
savestr(char *s)
savestr(const char *s)
{
char *p;
@ -484,7 +484,7 @@ savestr(char *s)
}
void
error(char *msg)
error(const char *msg)
{
if (curfile != NULL)
fprintf(stderr, "%s:%d: ", curfile, linno);

View file

@ -55,8 +55,8 @@ __FBSDID("$FreeBSD$");
struct synclass {
char *name;
char *comment;
const char *name;
const char *comment;
};
/* Syntax classes */
@ -101,16 +101,16 @@ static char writer[] = "\
static FILE *cfile;
static FILE *hfile;
static char *syntax[513];
static const char *syntax[513];
static int base;
static int size; /* number of values which a char variable can have */
static int nbits; /* number of bits in a character */
static int digit_contig;/* true if digits are contiguous */
static void filltable(char *);
static void filltable(const char *);
static void init(void);
static void add(char *, char *);
static void print(char *);
static void add(const char *, const char *);
static void print(const char *);
static void output_type_macros(void);
static void digit_convert(void);
@ -259,7 +259,7 @@ main(int argc __unused, char **argv __unused)
*/
static void
filltable(char *dftval)
filltable(const char *dftval)
{
int i;
@ -293,7 +293,7 @@ init(void)
*/
static void
add(char *p, char *type)
add(const char *p, const char *type)
{
while (*p)
syntax[*p++ + base] = type;
@ -306,7 +306,7 @@ add(char *p, char *type)
*/
static void
print(char *name)
print(const char *name)
{
int i;
int col;
@ -338,7 +338,7 @@ print(char *name)
* contiguous, we can test for them quickly.
*/
static char *macro[] = {
static const char *macro[] = {
"#define is_digit(c)\t((is_type+SYNBASE)[c] & ISDIGIT)",
"#define is_eof(c)\t((c) == PEOF)",
"#define is_alpha(c)\t(((c) < CTLESC || (c) > CTLQUOTEMARK) && isalpha((unsigned char) (c)))",
@ -351,7 +351,7 @@ static char *macro[] = {
static void
output_type_macros(void)
{
char **pp;
const char **pp;
if (digit_contig)
macro[0] = "#define is_digit(c)\t((unsigned int)((c) - '0') <= 9)";

View file

@ -39,7 +39,7 @@ extern int displayhist;
void histedit(void);
void sethistsize(const char *);
int histcmd(int, char **);
int not_fcnumber(char *);
int str_to_event(char *, int);
int not_fcnumber(const char *);
int str_to_event(const char *, int);
int bindcmd(int, char **);

View file

@ -108,7 +108,7 @@ int
number(const char *s)
{
if (! is_number(s))
error("Illegal number: %s", (char *)s);
error("Illegal number: %s", s);
return atoi(s);
}

View file

@ -64,7 +64,7 @@ char *arg0; /* value of $0 */
struct shparam shellparam; /* current positional parameters */
char **argptr; /* argument list for builtin commands */
char *shoptarg; /* set by nextopt (like getopt) */
char *optptr; /* used by nextopt */
char *nextopt_optptr; /* used by nextopt */
char *minusc; /* argument to -c option */
@ -554,12 +554,13 @@ getopts(char *optstr, char *optvar, char **optfirst, char ***optnext,
*/
int
nextopt(char *optstring)
nextopt(const char *optstring)
{
char *p, *q;
char *p;
const char *q;
char c;
if ((p = optptr) == NULL || *p == '\0') {
if ((p = nextopt_optptr) == NULL || *p == '\0') {
p = *argptr;
if (p == NULL || *p != '-' || *++p == '\0')
return '\0';
@ -580,6 +581,6 @@ nextopt(char *optstring)
shoptarg = p;
p = NULL;
}
optptr = p;
nextopt_optptr = p;
return c;
}

View file

@ -102,7 +102,7 @@ extern char *arg0; /* $0 */
extern struct shparam shellparam; /* $@ */
extern char **argptr; /* argument list for builtin commands */
extern char *shoptarg; /* set by nextopt */
extern char *optptr; /* used by nextopt */
extern char *nextopt_optptr; /* used by nextopt */
void procargs(int, char **);
void optschanged(void);
@ -111,5 +111,5 @@ void freeparam(struct shparam *);
int shiftcmd(int, char **);
int setcmd(int, char **);
int getoptscmd(int, char **);
int nextopt(char *);
int nextopt(const char *);
void getoptsreset(const char *);

View file

@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$");
static int doformat_wr(void *, const char *, int);
struct output output = {NULL, 0, NULL, OUTBUFSIZ, 1, 0};
struct output errout = {NULL, 0, NULL, 100, 2, 0};
struct output errout = {NULL, 0, NULL, 256, 2, 0};
struct output memout = {NULL, 0, NULL, 0, MEM_OUT, 0};
struct output *out1 = &output;
struct output *out2 = &errout;
@ -124,8 +124,6 @@ outstr(const char *p, struct output *file)
{
while (*p)
outc(*p++, file);
if (file == out2)
flushout(file);
}
/* Like outstr(), but quote for re-input into the shell. */
@ -255,7 +253,7 @@ out1fmt(const char *fmt, ...)
}
void
dprintf(const char *fmt, ...)
out2fmt_flush(const char *fmt, ...)
{
va_list ap;
@ -316,7 +314,7 @@ doformat(struct output *dest, const char *f, va_list ap)
*/
int
xwrite(int fd, char *buf, int nbytes)
xwrite(int fd, const char *buf, int nbytes)
{
int ntry;
int i;

View file

@ -46,13 +46,13 @@ struct output {
short flags;
};
extern struct output output;
extern struct output errout;
extern struct output output; /* to fd 1 */
extern struct output errout; /* to fd 2 */
extern struct output memout;
extern struct output *out1;
extern struct output *out2;
extern struct output *out1; /* &memout if backquote, otherwise &output */
extern struct output *out2; /* &memout if backquote with 2>&1, otherwise
&errout */
void open_mem(char *, int, struct output *);
void out1str(const char *);
void out1qstr(const char *);
void out2str(const char *);
@ -65,10 +65,10 @@ void flushout(struct output *);
void freestdout(void);
void outfmt(struct output *, const char *, ...) __printflike(2, 3);
void out1fmt(const char *, ...) __printflike(1, 2);
void dprintf(const char *, ...) __printflike(1, 2);
void out2fmt_flush(const char *, ...) __printflike(1, 2);
void fmtstr(char *, int, const char *, ...) __printflike(3, 4);
void doformat(struct output *, const char *, va_list) __printflike(2, 0);
int xwrite(int, char *, int);
int xwrite(int, const char *, int);
#define outc(c, file) (--(file)->nleft < 0? (emptyoutbuf(file), *(file)->nextc++ = (c)) : (*(file)->nextc++ = (c)))
#define out1c(c) outc(c, out1);

View file

@ -113,7 +113,7 @@ STATIC int xxreadtoken(void);
STATIC int readtoken1(int, char const *, char *, int);
STATIC int noexpand(char *);
STATIC void synexpect(int);
STATIC void synerror(char *);
STATIC void synerror(const char *);
STATIC void setprompt(int);
@ -364,7 +364,9 @@ TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : ""));
n1 = (union node *)stalloc(sizeof (struct nfor));
n1->type = NFOR;
n1->nfor.var = wordtext;
if (readtoken() == TWORD && ! quoteflag && equal(wordtext, "in")) {
while (readtoken() == TNL)
;
if (lasttoken == TWORD && ! quoteflag && equal(wordtext, "in")) {
app = &ap;
while (readtoken() == TWORD) {
n2 = (union node *)stalloc(sizeof (struct narg));
@ -1309,10 +1311,16 @@ parsebackq: {
int savelen;
int saveprompt;
const int bq_startlinno = plinno;
char *volatile ostr = NULL;
struct parsefile *const savetopfile = getcurrentfile();
str = NULL;
if (setjmp(jmploc.loc)) {
popfilesupto(savetopfile);
if (str)
ckfree(str);
if (ostr)
ckfree(ostr);
handler = savehandler;
if (exception == EXERROR) {
startlinno = bq_startlinno;
@ -1321,7 +1329,6 @@ parsebackq: {
longjmp(handler->loc, 1);
}
INTOFF;
str = NULL;
savelen = out - stackblock();
if (savelen > 0) {
str = ckmalloc(savelen);
@ -1333,13 +1340,12 @@ parsebackq: {
/* We must read until the closing backquote, giving special
treatment to some slashes, and then push the string and
reread it as input, interpreting it normally. */
char *out;
char *oout;
int c;
int savelen;
char *str;
int olen;
STARTSTACKSTR(out);
STARTSTACKSTR(oout);
for (;;) {
if (needprompt) {
setprompt(2);
@ -1366,7 +1372,7 @@ parsebackq: {
}
if (c != '\\' && c != '`' && c != '$'
&& (!dblquote || c != '"'))
STPUTC('\\', out);
STPUTC('\\', oout);
break;
case '\n':
@ -1382,16 +1388,16 @@ parsebackq: {
default:
break;
}
STPUTC(c, out);
STPUTC(c, oout);
}
done:
STPUTC('\0', out);
savelen = out - stackblock();
if (savelen > 0) {
str = ckmalloc(savelen);
memcpy(str, stackblock(), savelen);
setinputstring(str, 1);
}
STPUTC('\0', oout);
olen = oout - stackblock();
INTOFF;
ostr = ckmalloc(olen);
memcpy(ostr, stackblock(), olen);
setinputstring(ostr, 1);
INTON;
}
nlpp = &bqlist;
while (*nlpp)
@ -1433,6 +1439,12 @@ parsebackq: {
str = NULL;
INTON;
}
if (ostr) {
INTOFF;
ckfree(ostr);
ostr = NULL;
INTON;
}
handler = savehandler;
if (arinest || dblquote)
USTPUTC(CTLBACKQ | CTLQUOTE, out);
@ -1508,9 +1520,9 @@ noexpand(char *text)
*/
int
goodname(char *name)
goodname(const char *name)
{
char *p;
const char *p;
p = name;
if (! is_name(*p))
@ -1545,11 +1557,11 @@ synexpect(int token)
STATIC void
synerror(char *msg)
synerror(const char *msg)
{
if (commandname)
outfmt(&errout, "%s: %d: ", commandname, startlinno);
outfmt(&errout, "Syntax error: %s\n", msg);
outfmt(out2, "%s: %d: ", commandname, startlinno);
outfmt(out2, "Syntax error: %s\n", msg);
error((char *)NULL);
}
@ -1561,7 +1573,10 @@ setprompt(int which)
#ifndef NO_HISTORY
if (!el)
#endif
{
out2str(getprompt(NULL));
flushout(out2);
}
}
/*
@ -1574,13 +1589,14 @@ getprompt(void *unused __unused)
static char ps[PROMPTLEN];
char *fmt;
int i, j, trim;
static char internal_error[] = "<internal prompt error>";
/*
* Select prompt format.
*/
switch (whichprompt) {
case 0:
fmt = "";
fmt = nullstr;
break;
case 1:
fmt = ps1val();
@ -1589,7 +1605,7 @@ getprompt(void *unused __unused)
fmt = ps2val();
break;
default:
return "<internal prompt error>";
return internal_error;
}
/*

View file

@ -73,9 +73,10 @@
extern int tokpushback;
#define NEOF ((union node *)&tokpushback)
extern int whichprompt; /* 1 == PS1, 2 == PS2 */
extern const char *const parsekwd[];
union node *parsecmd(int);
void fixredir(union node *, const char *, int);
int goodname(char *);
int goodname(const char *);
char *getprompt(void *);

View file

@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
#define EMPTY -2 /* marks an unused slot in redirtab */
#define CLOSED -1 /* fd was not open before redir */
#define PIPESIZE 4096 /* amount of buffering in a pipe */
@ -101,7 +102,6 @@ redirect(union node *redir, int flags)
struct redirtab *sv = NULL;
int i;
int fd;
int try;
char memory[10]; /* file descriptors to write to memory */
for (i = 10 ; --i >= 0 ; )
@ -116,38 +116,30 @@ redirect(union node *redir, int flags)
}
for (n = redir ; n ; n = n->nfile.next) {
fd = n->nfile.fd;
try = 0;
if ((n->nfile.type == NTOFD || n->nfile.type == NFROMFD) &&
n->ndup.dupfd == fd)
continue; /* redirect from/to same file descriptor */
if ((flags & REDIR_PUSH) && sv->renamed[fd] == EMPTY) {
INTOFF;
again:
if ((i = fcntl(fd, F_DUPFD, 10)) == -1) {
switch (errno) {
case EBADF:
if (!try) {
openredirect(n, memory);
try++;
goto again;
}
/* FALLTHROUGH*/
i = CLOSED;
break;
default:
INTON;
error("%d: %s", fd, strerror(errno));
break;
}
}
if (!try) {
sv->renamed[fd] = i;
}
} else
(void)fcntl(i, F_SETFD, FD_CLOEXEC);
sv->renamed[fd] = i;
INTON;
}
if (fd == 0)
fd0_redirected++;
if (!try)
openredirect(n, memory);
openredirect(n, memory);
}
if (memory[1])
out1 = &memout;
@ -166,8 +158,11 @@ openredirect(union node *redir, char memory[10])
/*
* We suppress interrupts so that we won't leave open file
* descriptors around. This may not be such a good idea because
* an open of a device or a fifo can block indefinitely.
* descriptors around. Because the signal handler remains
* installed and we do not use system call restart, interrupts
* will still abort blocking opens such as fifos (they will fail
* with EINTR). There is, however, a race condition if an interrupt
* arrives after INTOFF and before open blocks.
*/
INTOFF;
memory[fd] = 0;

View file

@ -32,7 +32,7 @@
.\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95
.\" $FreeBSD$
.\"
.Dd October 24, 2009
.Dd December 31, 2009
.Dt SH 1
.Os
.Sh NAME
@ -865,7 +865,7 @@ command is:
If
.Ic in
and the following words are omitted,
.Ic in Li $@
.Ic in Li \&"$@\&"
is used instead.
The words are expanded, and then the list is executed
repeatedly with the variable set to each word in turn.
@ -1080,7 +1080,7 @@ and
is
.Dq Li "def ghi" ,
then
.Dq Li $@
.Li \&"$@\&"
expands to
the two arguments:
.Bd -literal -offset indent
@ -2137,7 +2137,7 @@ and not found.
For aliases the alias expansion is printed;
for commands and tracked aliases
the complete pathname of the command is printed.
.It Ic ulimit Oo Fl HSabcdflmnpstuv Oc Op Ar limit
.It Ic ulimit Oo Fl HSabcdflmnpstuvw Oc Op Ar limit
Set or display resource limits (see
.Xr getrlimit 2 ) .
If
@ -2201,6 +2201,9 @@ The maximal amount of CPU time to be used by each process, in seconds.
The maximal number of simultaneous processes for this user ID.
.It Fl v Ar virtualmem
The maximal virtual size of a process, in kilobytes.
.It Fl w Ar swapuse
The maximum amount of swap space reserved or used for this user ID,
in kilobytes.
.El
.It Ic umask Oo Fl S Oc Op Ar mask
Set the file creation mask (see

View file

@ -307,7 +307,7 @@ sh_trace(const char *fmt, ...)
void
trputs(char *s)
trputs(const char *s)
{
if (tracefile == NULL)
return;

View file

@ -35,6 +35,6 @@ void showtree(union node *);
void sh_trace(const char *, ...) __printflike(1, 2);
void trargs(char **);
void trputc(int);
void trputs(char *);
void trputs(const char *);
void opentrace(void);
#endif

View file

@ -149,6 +149,7 @@ trapcmd(int argc, char **argv)
{
char *action;
int signo;
int errors = 0;
if (argc <= 1) {
for (signo = 0 ; signo < sys_nsig ; signo++) {
@ -183,8 +184,10 @@ trapcmd(int argc, char **argv)
}
}
while (*argv) {
if ((signo = sigstring_to_signum(*argv)) == -1)
error("bad signal %s", *argv);
if ((signo = sigstring_to_signum(*argv)) == -1) {
out2fmt_flush("trap: bad signal %s\n", *argv);
errors = 1;
}
INTOFF;
if (action)
action = savestr(action);
@ -196,7 +199,7 @@ trapcmd(int argc, char **argv)
INTON;
argv++;
}
return 0;
return errors;
}
@ -244,7 +247,8 @@ void
setsignal(int signo)
{
int action;
sig_t sig, sigact = SIG_DFL;
sig_t sigact = SIG_DFL;
struct sigaction sa;
char *t;
if ((t = trap[signo]) == NULL)
@ -320,9 +324,10 @@ setsignal(int signo)
case S_IGN: sigact = SIG_IGN; break;
}
*t = action;
sig = signal(signo, sigact);
if (sig != SIG_ERR && action == S_CATCH)
siginterrupt(signo, 1);
sa.sa_handler = sigact;
sa.sa_flags = 0;
sigemptyset(&sa.sa_mask);
sigaction(signo, &sa, NULL);
}

View file

@ -45,4 +45,4 @@ void ignoresig(int);
void onsig(int);
void dotrap(void);
void setinteractive(int);
void exitshell(int);
void exitshell(int) __dead2;

View file

@ -73,7 +73,7 @@ __FBSDID("$FreeBSD$");
struct varinit {
struct var *var;
int flags;
char *text;
const char *text;
void (*func)(const char *);
};
@ -94,27 +94,27 @@ STATIC struct var voptind;
STATIC const struct varinit varinit[] = {
#ifndef NO_HISTORY
{ &vhistsize, VSTRFIXED|VTEXTFIXED|VUNSET, "HISTSIZE=",
{ &vhistsize, VUNSET, "HISTSIZE=",
sethistsize },
#endif
{ &vifs, VSTRFIXED|VTEXTFIXED, "IFS= \t\n",
{ &vifs, 0, "IFS= \t\n",
NULL },
{ &vmail, VSTRFIXED|VTEXTFIXED|VUNSET, "MAIL=",
{ &vmail, VUNSET, "MAIL=",
NULL },
{ &vmpath, VSTRFIXED|VTEXTFIXED|VUNSET, "MAILPATH=",
{ &vmpath, VUNSET, "MAILPATH=",
NULL },
{ &vpath, VSTRFIXED|VTEXTFIXED, "PATH=" _PATH_DEFPATH,
{ &vpath, 0, "PATH=" _PATH_DEFPATH,
changepath },
{ &vppid, VSTRFIXED|VTEXTFIXED|VUNSET, "PPID=",
{ &vppid, VUNSET, "PPID=",
NULL },
/*
* vps1 depends on uid
*/
{ &vps2, VSTRFIXED|VTEXTFIXED, "PS2=> ",
{ &vps2, 0, "PS2=> ",
NULL },
{ &vps4, VSTRFIXED|VTEXTFIXED, "PS4=+ ",
{ &vps4, 0, "PS4=+ ",
NULL },
{ &voptind, VSTRFIXED|VTEXTFIXED, "OPTIND=1",
{ &voptind, 0, "OPTIND=1",
getoptsreset },
{ NULL, 0, NULL,
NULL }
@ -122,9 +122,9 @@ STATIC const struct varinit varinit[] = {
STATIC struct var *vartab[VTABSIZE];
STATIC struct var **hashvar(char *);
STATIC int varequal(char *, char *);
STATIC int localevar(char *);
STATIC struct var **hashvar(const char *);
STATIC int varequal(const char *, const char *);
STATIC int localevar(const char *);
/*
* Initialize the variable symbol tables and import the environment.
@ -132,9 +132,9 @@ STATIC int localevar(char *);
#ifdef mkinit
INCLUDE "var.h"
MKINIT char **environ;
INIT {
char **envp;
extern char **environ;
initvar();
for (envp = environ ; *envp ; envp++) {
@ -164,8 +164,8 @@ initvar(void)
vpp = hashvar(ip->text);
vp->next = *vpp;
*vpp = vp;
vp->text = ip->text;
vp->flags = ip->flags;
vp->text = __DECONST(char *, ip->text);
vp->flags = ip->flags | VSTRFIXED | VTEXTFIXED;
vp->func = ip->func;
}
}
@ -176,7 +176,7 @@ initvar(void)
vpp = hashvar("PS1=");
vps1.next = *vpp;
*vpp = &vps1;
vps1.text = geteuid() ? "PS1=$ " : "PS1=# ";
vps1.text = __DECONST(char *, geteuid() ? "PS1=$ " : "PS1=# ");
vps1.flags = VSTRFIXED|VTEXTFIXED;
}
if ((vppid.flags & VEXPORT) == 0) {
@ -190,12 +190,14 @@ initvar(void)
*/
int
setvarsafe(char *name, char *val, int flags)
setvarsafe(const char *name, const char *val, int flags)
{
struct jmploc jmploc;
struct jmploc *const savehandler = handler;
int err = 0;
int inton;
inton = is_int_on();
if (setjmp(jmploc.loc))
err = 1;
else {
@ -203,6 +205,7 @@ setvarsafe(char *name, char *val, int flags)
setvar(name, val, flags);
}
handler = savehandler;
SETINTON(inton);
return err;
}
@ -212,9 +215,9 @@ setvarsafe(char *name, char *val, int flags)
*/
void
setvar(char *name, char *val, int flags)
setvar(const char *name, const char *val, int flags)
{
char *p, *q;
const char *p;
int len;
int namelen;
char *nameeq;
@ -242,25 +245,24 @@ setvar(char *name, char *val, int flags)
} else {
len += strlen(val);
}
p = nameeq = ckmalloc(len);
q = name;
while (--namelen >= 0)
*p++ = *q++;
*p++ = '=';
*p = '\0';
nameeq = ckmalloc(len);
memcpy(nameeq, name, namelen);
nameeq[namelen] = '=';
if (val)
scopy(val, p);
scopy(val, nameeq + namelen + 1);
else
nameeq[namelen + 1] = '\0';
setvareq(nameeq, flags);
}
STATIC int
localevar(char *s)
localevar(const char *s)
{
static char *lnames[7] = {
static const char *lnames[7] = {
"ALL", "COLLATE", "CTYPE", "MONETARY",
"NUMERIC", "TIME", NULL
};
char **ss;
const char **ss;
if (*s != 'L')
return 0;
@ -280,7 +282,7 @@ localevar(char *s)
* pointer into environ where the string should not be manipulated.
*/
static void
change_env(char *s, int set)
change_env(const char *s, int set)
{
char *eqp;
char *ss;
@ -386,7 +388,7 @@ listsetvar(struct strlist *list)
*/
char *
lookupvar(char *name)
lookupvar(const char *name)
{
struct var *v;
@ -409,7 +411,7 @@ lookupvar(char *name)
*/
char *
bltinlookup(char *name, int doall)
bltinlookup(const char *name, int doall)
{
struct strlist *sp;
struct var *v;
@ -467,9 +469,9 @@ environment(void)
* VSTACK set since these are currently allocated on the stack.
*/
#ifdef mkinit
MKINIT void shprocvar(void);
#ifdef mkinit
SHELLPROC {
shprocvar();
}
@ -604,7 +606,6 @@ exportcmd(int argc, char **argv)
if (values && argc != 0)
error("-p requires no arguments");
listsetvar(cmdenviron);
if (argc != 0) {
while ((name = *argv++) != NULL) {
if ((p = strchr(name, '=')) != NULL) {
@ -794,7 +795,7 @@ unsetcmd(int argc __unused, char **argv __unused)
*/
int
unsetvar(char *s)
unsetvar(const char *s)
{
struct var **vpp;
struct var *vp;
@ -834,7 +835,7 @@ unsetvar(char *s)
*/
STATIC struct var **
hashvar(char *p)
hashvar(const char *p)
{
unsigned int hashval;
@ -853,7 +854,7 @@ hashvar(char *p)
*/
STATIC int
varequal(char *p, char *q)
varequal(const char *p, const char *q)
{
while (*p == *q++) {
if (*p++ == '=')

View file

@ -101,14 +101,13 @@ extern struct var vhistsize;
#define mpathset() ((vmpath.flags & VUNSET) == 0)
void initvar(void);
void setvar(char *, char *, int);
void setvar(const char *, const char *, int);
void setvareq(char *, int);
struct strlist;
void listsetvar(struct strlist *);
char *lookupvar(char *);
char *bltinlookup(char *, int);
char *lookupvar(const char *);
char *bltinlookup(const char *, int);
char **environment(void);
void shprocvar(void);
int showvarscmd(int, char **);
int exportcmd(int, char **);
int localcmd(int, char **);
@ -116,5 +115,5 @@ void mklocal(char *);
void poplocalvars(void);
int setvarcmd(int, char **);
int unsetcmd(int, char **);
int unsetvar(char *);
int setvarsafe(char *, char *, int);
int unsetvar(const char *);
int setvarsafe(const char *, const char *, int);

View file

@ -19,12 +19,10 @@
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Print intent log header and statistics.
*/
@ -345,8 +343,10 @@ dump_intent_log(zilog_t *zilog)
if (zh->zh_log.blk_birth == 0 || verbose < 2)
return;
(void) printf("\n ZIL header: claim_txg %llu, seq %llu\n",
(u_longlong_t)zh->zh_claim_txg, (u_longlong_t)zh->zh_replay_seq);
(void) printf("\n ZIL header: claim_txg %llu, claim_seq %llu",
(u_longlong_t)zh->zh_claim_txg, (u_longlong_t)zh->zh_claim_seq);
(void) printf(" replay_seq %llu, flags 0x%llx\n",
(u_longlong_t)zh->zh_replay_seq, (u_longlong_t)zh->zh_flags);
if (verbose >= 4)
print_log_bp(&zh->zh_log, "\n\tfirst block: ");

View file

@ -20,7 +20,7 @@
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@ -2457,7 +2457,7 @@ zfs_do_receive(int argc, char **argv)
bzero(&flags, sizeof (recvflags_t));
/* check options */
while ((c = getopt(argc, argv, ":dnvF")) != -1) {
while ((c = getopt(argc, argv, ":dnuvF")) != -1) {
switch (c) {
case 'd':
flags.isprefix = B_TRUE;
@ -2465,6 +2465,9 @@ zfs_do_receive(int argc, char **argv)
case 'n':
flags.dryrun = B_TRUE;
break;
case 'u':
flags.nomount = B_TRUE;
break;
case 'v':
flags.verbose = B_TRUE;
break;

View file

@ -3488,6 +3488,8 @@ zpool_do_upgrade(int argc, char **argv)
(void) printf(gettext(" 11 Improved scrub performance\n"));
(void) printf(gettext(" 12 Snapshot properties\n"));
(void) printf(gettext(" 13 snapused property\n"));
(void) printf(gettext(" 14 passthrough-x aclinherit "
"support\n"));
(void) printf(gettext("For more information on a particular "
"version, including supported releases, see:\n\n"));
(void) printf("http://www.opensolaris.org/os/community/zfs/"

View file

@ -20,7 +20,7 @@
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@ -457,6 +457,9 @@ typedef struct recvflags {
/* byteswap flag is used internally; callers need not specify */
int byteswap : 1;
/* do not mount file systems as they are extracted (private) */
int nomount : 1;
} recvflags_t;
extern int zfs_receive(libzfs_handle_t *, const char *, recvflags_t,

View file

@ -20,7 +20,7 @@
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@ -2080,7 +2080,7 @@ zfs_receive(libzfs_handle_t *hdl, const char *tosnap, recvflags_t flags,
err = zfs_receive_impl(hdl, tosnap, flags, infd, stream_avl, &top_zfs);
if (err == 0 && top_zfs) {
if (err == 0 && !flags.nomount && top_zfs) {
zfs_handle_t *zhp;
prop_changelist_t *clp;

View file

@ -1,3 +1,9 @@
--- 9.6.1-P2 released ---
2772. [security] When validating, track whether pending data was from
the additional section or not and only return it if
validates as secure. [RT #20438]
--- 9.6.1-P1 released ---
2640. [security] A specially crafted update packet will cause named

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: query.c,v 1.313.20.7 2009/03/13 01:38:51 marka Exp $ */
/* $Id: query.c,v 1.313.20.7.12.1 2009/11/18 23:58:04 marka Exp $ */
/*! \file */
@ -116,6 +116,8 @@
#define DNS_GETDB_NOLOG 0x02U
#define DNS_GETDB_PARTIAL 0x04U
#define PENDINGOK(x) (((x) & DNS_DBFIND_PENDINGOK) != 0)
typedef struct client_additionalctx {
ns_client_t *client;
dns_rdataset_t *rdataset;
@ -1761,8 +1763,8 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
*/
if (result == ISC_R_SUCCESS &&
additionaltype == dns_rdatasetadditional_fromcache &&
(rdataset->trust == dns_trust_pending ||
rdataset->trust == dns_trust_glue) &&
(DNS_TRUST_PENDING(rdataset->trust) ||
DNS_TRUST_GLUE(rdataset->trust)) &&
!validate(client, db, fname, rdataset, sigrdataset)) {
dns_rdataset_disassociate(rdataset);
if (dns_rdataset_isassociated(sigrdataset))
@ -1801,8 +1803,8 @@ query_addadditional2(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
*/
if (result == ISC_R_SUCCESS &&
additionaltype == dns_rdatasetadditional_fromcache &&
(rdataset->trust == dns_trust_pending ||
rdataset->trust == dns_trust_glue) &&
(DNS_TRUST_PENDING(rdataset->trust) ||
DNS_TRUST_GLUE(rdataset->trust)) &&
!validate(client, db, fname, rdataset, sigrdataset)) {
dns_rdataset_disassociate(rdataset);
if (dns_rdataset_isassociated(sigrdataset))
@ -2601,14 +2603,14 @@ query_addbestns(ns_client_t *client) {
/*
* Attempt to validate RRsets that are pending or that are glue.
*/
if ((rdataset->trust == dns_trust_pending ||
(sigrdataset != NULL && sigrdataset->trust == dns_trust_pending))
if ((DNS_TRUST_PENDING(rdataset->trust) ||
(sigrdataset != NULL && DNS_TRUST_PENDING(sigrdataset->trust)))
&& !validate(client, db, fname, rdataset, sigrdataset) &&
(client->query.dboptions & DNS_DBFIND_PENDINGOK) == 0)
!PENDINGOK(client->query.dboptions))
goto cleanup;
if ((rdataset->trust == dns_trust_glue ||
(sigrdataset != NULL && sigrdataset->trust == dns_trust_glue)) &&
if ((DNS_TRUST_GLUE(rdataset->trust) ||
(sigrdataset != NULL && DNS_TRUST_GLUE(sigrdataset->trust))) &&
!validate(client, db, fname, rdataset, sigrdataset) &&
SECURE(client) && WANTDNSSEC(client))
goto cleanup;
@ -3716,6 +3718,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
dns_rdataset_t *noqname;
isc_boolean_t resuming;
int line = -1;
dns_rdataset_t tmprdataset;
unsigned int dboptions;
CTRACE("query_find");
@ -3933,9 +3937,49 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
/*
* Now look for an answer in the database.
*/
dboptions = client->query.dboptions;
if (sigrdataset == NULL && client->view->enablednssec) {
/*
* If the client doesn't want DNSSEC we still want to
* look for any data pending validation to save a remote
* lookup if possible.
*/
dns_rdataset_init(&tmprdataset);
sigrdataset = &tmprdataset;
dboptions |= DNS_DBFIND_PENDINGOK;
}
refind:
result = dns_db_find(db, client->query.qname, version, type,
client->query.dboptions, client->now,
&node, fname, rdataset, sigrdataset);
dboptions, client->now, &node, fname,
rdataset, sigrdataset);
/*
* If we have found pending data try to validate it.
* If the data does not validate as secure and we can't
* use the unvalidated data requery the database with
* pending disabled to prevent infinite looping.
*/
if (result != ISC_R_SUCCESS || !DNS_TRUST_PENDING(rdataset->trust))
goto validation_done;
if (validate(client, db, fname, rdataset, sigrdataset))
goto validation_done;
if (rdataset->trust != dns_trust_pending_answer ||
!PENDINGOK(client->query.dboptions)) {
dns_rdataset_disassociate(rdataset);
if (sigrdataset != NULL &&
dns_rdataset_isassociated(sigrdataset))
dns_rdataset_disassociate(sigrdataset);
if (sigrdataset == &tmprdataset)
sigrdataset = NULL;
dns_db_detachnode(db, &node);
dboptions &= ~DNS_DBFIND_PENDINGOK;
goto refind;
}
validation_done:
if (sigrdataset == &tmprdataset) {
if (dns_rdataset_isassociated(sigrdataset))
dns_rdataset_disassociate(sigrdataset);
sigrdataset = NULL;
}
resume:
CTRACE("query_find: resume");

View file

@ -1,3 +1,3 @@
LIBINTERFACE = 52
LIBINTERFACE = 53
LIBREVISION = 0
LIBAGE = 2
LIBAGE = 0

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: types.h,v 1.130.50.3 2009/01/29 22:40:35 jinmei Exp $ */
/* $Id: types.h,v 1.130.50.3.12.1 2009/11/18 23:58:04 marka Exp $ */
#ifndef DNS_TYPES_H
#define DNS_TYPES_H 1
@ -258,40 +258,52 @@ enum {
dns_trust_none = 0,
#define dns_trust_none ((dns_trust_t)dns_trust_none)
/*% Subject to DNSSEC validation but has not yet been validated */
dns_trust_pending = 1,
#define dns_trust_pending ((dns_trust_t)dns_trust_pending)
/*%
* Subject to DNSSEC validation but has not yet been validated
* dns_trust_pending_additional (from the additional section).
*/
dns_trust_pending_additional = 1,
#define dns_trust_pending_additional \
((dns_trust_t)dns_trust_pending_additional)
dns_trust_pending_answer = 2,
#define dns_trust_pending_answer ((dns_trust_t)dns_trust_pending_answer)
/*% Received in the additional section of a response. */
dns_trust_additional = 2,
dns_trust_additional = 3,
#define dns_trust_additional ((dns_trust_t)dns_trust_additional)
/* Received in a referral response. */
dns_trust_glue = 3,
dns_trust_glue = 4,
#define dns_trust_glue ((dns_trust_t)dns_trust_glue)
/* Answer from a non-authoritative server */
dns_trust_answer = 4,
dns_trust_answer = 5,
#define dns_trust_answer ((dns_trust_t)dns_trust_answer)
/* Received in the authority section as part of an
authoritative response */
dns_trust_authauthority = 5,
dns_trust_authauthority = 6,
#define dns_trust_authauthority ((dns_trust_t)dns_trust_authauthority)
/* Answer from an authoritative server */
dns_trust_authanswer = 6,
dns_trust_authanswer = 7,
#define dns_trust_authanswer ((dns_trust_t)dns_trust_authanswer)
/* Successfully DNSSEC validated */
dns_trust_secure = 7,
dns_trust_secure = 8,
#define dns_trust_secure ((dns_trust_t)dns_trust_secure)
/* This server is authoritative */
dns_trust_ultimate = 8
dns_trust_ultimate = 9
#define dns_trust_ultimate ((dns_trust_t)dns_trust_ultimate)
};
#define DNS_TRUST_PENDING(x) ((x) == dns_trust_pending_answer || \
(x) == dns_trust_pending_additional)
#define DNS_TRUST_GLUE(x) ((x) == dns_trust_glue)
/*%
* Name checking severities.
*/

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: masterdump.c,v 1.94.50.2 2009/01/18 23:47:40 tbox Exp $ */
/* $Id: masterdump.c,v 1.94.50.2.12.1 2009/11/18 23:58:04 marka Exp $ */
/*! \file */
@ -775,7 +775,8 @@ dump_order_compare(const void *a, const void *b) {
static const char *trustnames[] = {
"none",
"pending",
"pending-additional",
"pending-answer",
"additional",
"glue",
"answer",

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rbtdb.c,v 1.270.12.6 2009/05/06 23:34:30 jinmei Exp $ */
/* $Id: rbtdb.c,v 1.270.12.6.10.1 2009/11/18 23:58:04 marka Exp $ */
/*! \file */
@ -4005,7 +4005,7 @@ cache_zonecut_callback(dns_rbtnode_t *node, dns_name_t *name, void *arg) {
}
if (dname_header != NULL &&
(dname_header->trust != dns_trust_pending ||
(!DNS_TRUST_PENDING(dname_header->trust) ||
(search->options & DNS_DBFIND_PENDINGOK) != 0)) {
/*
* We increment the reference count on node to ensure that
@ -4548,7 +4548,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
if (found == NULL ||
(found->trust == dns_trust_glue &&
((options & DNS_DBFIND_GLUEOK) == 0)) ||
(found->trust == dns_trust_pending &&
(DNS_TRUST_PENDING(found->trust) &&
((options & DNS_DBFIND_PENDINGOK) == 0))) {
/*
* If there is an NS rdataset at this node, then this is the

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: resolver.c,v 1.384.14.14 2009/06/02 23:47:13 tbox Exp $ */
/* $Id: resolver.c,v 1.384.14.14.8.1 2009/11/18 23:58:04 marka Exp $ */
/*! \file */
@ -4293,6 +4293,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
* for it, unless it is glue.
*/
if (secure_domain && rdataset->trust != dns_trust_glue) {
dns_trust_t trust;
/*
* RRSIGs are validated as part of validating the
* type they cover.
@ -4329,12 +4330,34 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
}
/*
* Cache this rdataset/sigrdataset pair as
* pending data.
* Reject out of bailiwick additional records
* without RRSIGs as they can't possibly validate
* as "secure" and as we will never never want to
* store these as "answers" after validation.
*/
rdataset->trust = dns_trust_pending;
if (rdataset->trust == dns_trust_additional &&
sigrdataset == NULL && EXTERNAL(rdataset))
continue;
/*
* XXXMPA: If we store as "answer" after validating
* then we need to do bailiwick processing and
* also need to track whether RRsets are in or
* out of bailiwick. This will require a another
* pending trust level.
*
* Cache this rdataset/sigrdataset pair as
* pending data. Track whether it was additional
* or not.
*/
if (rdataset->trust == dns_trust_additional)
trust = dns_trust_pending_additional;
else
trust = dns_trust_pending_answer;
rdataset->trust = trust;
if (sigrdataset != NULL)
sigrdataset->trust = dns_trust_pending;
sigrdataset->trust = trust;
if (!need_validation || !ANSWER(rdataset)) {
addedrdataset = ardataset;
result = dns_db_addrdataset(fctx->cache, node,
@ -4682,7 +4705,7 @@ ncache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
for (trdataset = ISC_LIST_HEAD(tname->list);
trdataset != NULL;
trdataset = ISC_LIST_NEXT(trdataset, link))
trdataset->trust = dns_trust_pending;
trdataset->trust = dns_trust_pending_answer;
result = dns_message_nextname(fctx->rmessage,
DNS_SECTION_AUTHORITY);
}

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: validator.c,v 1.164.12.9 2009/05/07 23:47:12 tbox Exp $ */
/* $Id: validator.c,v 1.164.12.9.8.1 2009/11/18 23:58:04 marka Exp $ */
#include <config.h>
@ -1607,7 +1607,7 @@ get_key(dns_validator_t *val, dns_rdata_rrsig_t *siginfo) {
* We have an rrset for the given keyname.
*/
val->keyset = &val->frdataset;
if (val->frdataset.trust == dns_trust_pending &&
if (DNS_TRUST_PENDING(val->frdataset.trust) &&
dns_rdataset_isassociated(&val->fsigrdataset))
{
/*
@ -1622,7 +1622,7 @@ get_key(dns_validator_t *val, dns_rdata_rrsig_t *siginfo) {
if (result != ISC_R_SUCCESS)
return (result);
return (DNS_R_WAIT);
} else if (val->frdataset.trust == dns_trust_pending) {
} else if (DNS_TRUST_PENDING(val->frdataset.trust)) {
/*
* Having a pending key with no signature means that
* something is broken.
@ -2243,7 +2243,7 @@ validatezonekey(dns_validator_t *val) {
* We have DS records.
*/
val->dsset = &val->frdataset;
if (val->frdataset.trust == dns_trust_pending &&
if (DNS_TRUST_PENDING(val->frdataset.trust) &&
dns_rdataset_isassociated(&val->fsigrdataset))
{
result = create_validator(val,
@ -2256,7 +2256,7 @@ validatezonekey(dns_validator_t *val) {
if (result != ISC_R_SUCCESS)
return (result);
return (DNS_R_WAIT);
} else if (val->frdataset.trust == dns_trust_pending) {
} else if (DNS_TRUST_PENDING(val->frdataset.trust)) {
/*
* There should never be an unsigned DS.
*/
@ -3337,7 +3337,7 @@ proveunsecure(dns_validator_t *val, isc_boolean_t have_ds, isc_boolean_t resume)
* There is no DS. If this is a delegation,
* we maybe done.
*/
if (val->frdataset.trust == dns_trust_pending) {
if (DNS_TRUST_PENDING(val->frdataset.trust)) {
result = create_fetch(val, tname,
dns_rdatatype_ds,
dsfetched2,

View file

@ -41,7 +41,7 @@ isc_atomic_xadd(isc_int32_t *p, isc_int32_t val)
for (prev = *(volatile isc_int32_t *)p; ; prev = swapped) {
swapped = prev + val;
__asm__ volatile(
"mov ar.ccv=%2;"
"mov ar.ccv=%2;;"
"cmpxchg4.acq %0=%4,%3,ar.ccv"
: "=r" (swapped), "=m" (*p)
: "r" (prev), "r" (swapped), "m" (*p)
@ -84,7 +84,7 @@ isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val)
isc_int32_t ret;
__asm__ volatile(
"mov ar.ccv=%2;"
"mov ar.ccv=%2;;"
"cmpxchg4.acq %0=%4,%3,ar.ccv"
: "=r" (ret), "=m" (*p)
: "r" (cmpval), "r" (val), "m" (*p)

View file

@ -1,4 +1,4 @@
# $Id: version,v 1.43.12.5.8.1 2009/07/28 14:18:08 marka Exp $
# $Id: version,v 1.43.12.5.8.2 2009/11/18 23:58:04 marka Exp $
#
# This file must follow /bin/sh rules. It is imported directly via
# configure.
@ -7,4 +7,4 @@ MAJORVER=9
MINORVER=6
PATCHVER=1
RELEASETYPE=-P
RELEASEVER=1
RELEASEVER=2

View file

@ -39,7 +39,7 @@ IMPORTS
FROM BEGEMOT-IP-MIB;
begemotMib2 MODULE-IDENTITY
LAST-UPDATED "200602130000Z"
LAST-UPDATED "200908030000Z"
ORGANIZATION "German Aerospace Center"
CONTACT-INFO
" Hartmut Brandt
@ -54,6 +54,12 @@ begemotMib2 MODULE-IDENTITY
E-mail: harti@freebsd.org"
DESCRIPTION
"The MIB for private mib2 stuff."
REVISION "200908030000Z"
DESCRIPTION
"Second edition adds begemotIfDataPoll object."
REVISION "200602130000Z"
DESCRIPTION
"Initial revision."
::= { begemotIp 1 }
begemotIfMaxspeed OBJECT-TYPE
@ -87,4 +93,14 @@ begemotIfForcePoll OBJECT-TYPE
bit rate in its MIB."
::= { begemotMib2 3 }
begemotIfDataPoll OBJECT-TYPE
SYNTAX TimeTicks
UNITS "deciseconds"
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The rate at which the mib2 module will poll interface data."
DEFVAL { 100 }
::= { begemotMib2 4 }
END

View file

@ -117,6 +117,15 @@ u_int mibif_hc_update_interval;
/* HC update timer handle */
static void *hc_update_timer;
/* Idle poll timer */
static void *mibII_poll_timer;
/* interfaces' data poll interval */
u_int mibII_poll_ticks;
/* Idle poll hook */
static void mibII_idle(void *arg __unused);
/*****************************/
static const struct asn_oid oid_ifMIB = OIDX_ifMIB;
@ -410,6 +419,20 @@ mibif_reset_hc_timer(void)
mibif_hc_update_interval = ticks;
}
/**
* Restart the idle poll timer.
*/
void
mibif_restart_mibII_poll_timer(void)
{
if (mibII_poll_timer != NULL)
timer_stop(mibII_poll_timer);
if ((mibII_poll_timer = timer_start_repeat(mibII_poll_ticks * 10,
mibII_poll_ticks * 10, mibII_idle, NULL, module)) == NULL)
syslog(LOG_ERR, "timer_start(%u): %m", mibII_poll_ticks);
}
/*
* Fetch new MIB data.
*/
@ -1553,7 +1576,7 @@ get_cloners(void)
* Idle function
*/
static void
mibII_idle(void)
mibII_idle(void *arg __unused)
{
struct mibifa *ifa;
@ -1608,6 +1631,10 @@ mibII_start(void)
ipForward_reg = or_register(&oid_ipForward,
"The MIB module for the display of CIDR multipath IP Routes.",
module);
mibII_poll_timer = NULL;
mibII_poll_ticks = MIBII_POLL_TICKS;
mibif_restart_mibII_poll_timer();
}
/*
@ -1651,6 +1678,11 @@ mibII_init(struct lmodule *mod, int argc __unused, char *argv[] __unused)
static int
mibII_fini(void)
{
if (mibII_poll_timer != NULL ) {
timer_stop(mibII_poll_timer);
mibII_poll_timer = NULL;
}
if (route_fd != NULL)
fd_deselect(route_fd);
if (route != -1)
@ -1690,7 +1722,7 @@ const struct snmp_module config = {
"This module implements the interface and ip groups.",
mibII_init,
mibII_fini,
mibII_idle, /* idle */
NULL, /* idle */
NULL, /* dump */
NULL, /* config */
mibII_start,

View file

@ -211,6 +211,14 @@ extern u_int mibif_hc_update_interval;
/* re-compute update interval */
void mibif_reset_hc_timer(void);
/* interfaces' data poll interval */
extern u_int mibII_poll_ticks;
/* restart the data poll timer */
void mibif_restart_mibII_poll_timer(void);
#define MIBII_POLL_TICKS 100
/* get interfaces and interface addresses. */
void mib_fetch_interfaces(void);

View file

@ -59,6 +59,11 @@ op_begemot_mibII(struct snmp_context *ctx __unused, struct snmp_value *value,
ctx->scratch->int1 = mibif_force_hc_update_interval;
mibif_force_hc_update_interval = value->v.uint32;
return (SNMP_ERR_NOERROR);
case LEAF_begemotIfDataPoll:
ctx->scratch->int1 = mibII_poll_ticks;
mibII_poll_ticks = value->v.uint32;
return (SNMP_ERR_NOERROR);
}
abort();
@ -68,6 +73,10 @@ op_begemot_mibII(struct snmp_context *ctx __unused, struct snmp_value *value,
case LEAF_begemotIfForcePoll:
mibif_force_hc_update_interval = ctx->scratch->int1;
return (SNMP_ERR_NOERROR);
case LEAF_begemotIfDataPoll:
mibII_poll_ticks = ctx->scratch->int1;
return (SNMP_ERR_NOERROR);
}
abort();
@ -78,6 +87,10 @@ op_begemot_mibII(struct snmp_context *ctx __unused, struct snmp_value *value,
mibif_force_hc_update_interval = ctx->scratch->int1;
mibif_reset_hc_timer();
return (SNMP_ERR_NOERROR);
case LEAF_begemotIfDataPoll:
mibif_restart_mibII_poll_timer();
return (SNMP_ERR_NOERROR);
}
abort();
}
@ -98,6 +111,10 @@ op_begemot_mibII(struct snmp_context *ctx __unused, struct snmp_value *value,
case LEAF_begemotIfForcePoll:
value->v.uint32 = mibif_force_hc_update_interval;
return (SNMP_ERR_NOERROR);
case LEAF_begemotIfDataPoll:
value->v.uint32 = mibII_poll_ticks;
return (SNMP_ERR_NOERROR);
}
abort();
}

View file

@ -240,6 +240,7 @@
(1 begemotIfMaxspeed COUNTER64 op_begemot_mibII GET)
(2 begemotIfPoll TIMETICKS op_begemot_mibII GET)
(3 begemotIfForcePoll TIMETICKS op_begemot_mibII GET SET)
(4 begemotIfDataPoll TIMETICKS op_begemot_mibII GET SET)
)
)
)

View file

@ -3725,7 +3725,6 @@ doProlog(XML_Parser parser,
return XML_ERROR_NO_ELEMENTS;
default:
tok = -tok;
next = end;
break;
}
}

View file

@ -1744,7 +1744,7 @@ PREFIX(updatePosition)(const ENCODING *enc,
const char *end,
POSITION *pos)
{
while (ptr != end) {
while (ptr < end) {
switch (BYTE_TYPE(enc, ptr)) {
#define LEAD_CASE(n) \
case BT_LEAD ## n: \

View file

@ -103,9 +103,10 @@ Boston, MA 02110-1301, USA. */
%{p:gcrt1.o%s} \
%{!p: \
%{profile:gcrt1.o%s} \
%{!profile:crt1.o%s}}}} \
%{!profile: \
%{pie: Scrt1.o%s;:crt1.o%s}}}}} \
crti.o%s \
%{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
/* Provide an ENDFILE_SPEC appropriate for FreeBSD/i386. Here we tack on
our own magical crtend.o file (see crtstuff.c) which provides part of
@ -113,8 +114,7 @@ Boston, MA 02110-1301, USA. */
entering `main', followed by the normal "finalizer" file, `crtn.o'. */
#define FBSD_ENDFILE_SPEC "\
%{!shared:crtend.o%s} \
%{shared:crtendS.o%s} \
%{shared|pie:crtendS.o%s;:crtend.o%s} \
crtn.o%s "
/* Provide a LIB_SPEC appropriate for FreeBSD as configured and as

View file

@ -777,6 +777,7 @@
.ds doc-str-Lb-librt \*[Px] \*[doc-str-Lb]Real-time Library (librt, \-lrt)
.ds doc-str-Lb-libtermcap Termcap Access Library (libtermcap, \-ltermcap)
.ds doc-str-Lb-libusbhid USB Human Interface Devices Library (libusbhid, \-lusbhid)
.ds doc-str-Lb-libulog User Login Record Library (libulog, \-lulog)
.ds doc-str-Lb-libutil System Utilities Library (libutil, \-lutil)
.ds doc-str-Lb-libx86_64 x86_64 Architecture Library (libx86_64, \-lx86_64)
.ds doc-str-Lb-libz Compression Library (libz, \-lz)

View file

@ -46,7 +46,7 @@ supports \fBlanguage\fI. At present, the only target language supported is
\fBC\fB (-cc) for which two files - \fBip_rules.c\fP
and \fBip_rules.h\fP are generated in the \fBCURRENT DIRECTORY\fP when
\fBipf\fP is being run. These files can be used with the
\fBIPFILTER_COMPILED\fP kernel option to build filter rules staticly into
\fBIPFILTER_COMPILED\fP kernel option to build filter rules staticlly into
the kernel.
.TP
.B \-d

View file

@ -403,30 +403,22 @@ add_addr_to_iflist(pcap_if_t **alldevs, const char *name, u_int flags,
pcap_addr_t *curaddr, *prevaddr, *nextaddr;
#ifdef SIOCGIFDESCR
struct ifreq ifrdesc;
#ifdef __FreeBSD__
#define _IFDESCRSIZE 64
char ifdescr[_IFDESCRSIZE];
#else
char ifdescr[IFDESCRSIZE];
#endif
int s;
#endif
#ifdef SIOCGIFDESCR
/*
* Get the description for the interface.
*/
memset(&ifrdesc, 0, sizeof ifrdesc);
strlcpy(ifrdesc.ifr_name, name, sizeof ifrdesc.ifr_name);
#ifdef __FreeBSD__
ifrdesc.ifr_buffer.buffer = ifdescr;
ifrdesc.ifr_buffer.length = _IFDESCRSIZE;
#else
ifrdesc.ifr_data = (caddr_t)&ifdescr;
#endif
s = socket(AF_INET, SOCK_DGRAM, 0);
if (s >= 0) {
if (ioctl(s, SIOCGIFDESCR, &ifrdesc) == 0 &&
strlen(ifdescr) != 0)
description = ifdescr;
strlen(ifrdesc.ifr_data) != 0)
description = ifrdesc.ifr_data;
close(s);
}
#endif

View file

@ -1,5 +1,5 @@
# $FreeBSD$
Project: netcat (aka src/usr.bin/nc in OpenBSD)
ProjectURL: http://www.openbsd.org/
Version: 4.4
Version: 4.5
License: BSD

View file

@ -13,7 +13,7 @@ This file is automatically generated from html/copyright.html
applies as if the text was explicitly included in the file.
***********************************************************************
* *
* Copyright (c) David L. Mills 1992-2008 *
* Copyright (c) David L. Mills 1992-2009 *
* *
* Permission to use, copy, modify, and distribute this software and *
* its documentation for any purpose with or without fee is hereby *

View file

@ -1,6 +1,85 @@
(4.2.4p5) 2008/08/17 Released by Harlan Stenn <stenn@ntp.org>
---
(4.2.4p5) 2008/08/17 Released by Harlan Stenn <stenn@ntp.org>
(4.2.4p8) 2009/12/08 Released by Harlan Stenn <stenn@ntp.org>
* [Sec 1331] DoS with mode 7 packets - CVE-2009-3563.
---
(4.2.4p7) 2009/05/18 Released by Harlan Stenn <stenn@ntp.org>
* [Sec 1151] Remote exploit if autokey is enabled - CVE-2009-1252.
* [Bug 1187] Update the copyright date.
* [Bug 1191] ntpd fails on Win2000 - "Address already in use" after fix
for [Sec 1149].
---
(4.2.4p7-RC7) 2009/05/12 Released by Harlan Stenn <stenn@ntp.org>
* ntp.isc.org -> ntp.org cleanup.
* [Bug 1178] Use prior FORCE_DNSRETRY behavior as needed at runtime,
add configure --enable-ignore-dns-errors to be even more stubborn
---
(4.2.4p7-RC6) 2009/05/08 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 784] Make --enable-linuxcaps the default when available
* [Bug 1179] error messages for -u/--user and -i lacking droproot
* Updated JJY reference clock driver from Takao Abe
* [Bug 1071] Log a message and exit before trying to use FD_SET with a
descriptor larger than FD_SETSIZE, which will corrupt memory
* On corruption of the iface list head in add_interface, log and exit
---
(4.2.4p7-RC5) 2009/05/02 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1172] 4.2.4p7-RC{3,4} fail to build on linux.
* flock-build script unportable 'set -m' use removed
---
(4.2.4p7-RC4) 2009/04/29 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1167] use gcc -Winit-self only if it is understood
---
(4.2.4p7-RC3) 2009/04/22 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 787] Bug fixes for 64-bit time_t on Windows
* [Bug 813] Conditional naming of Event
* [Bug 1147] System errors should be logged to msyslog()
* [Bug 1155] Fix compile problem on Windows with VS2005
* [Bug 1156] lock_thread_to_processor() should be declared in header
* [Bug 1157] quiet OpenSSL warnings, clean up configure.ac
* [Bug 1158] support for aix6.1
* [Bug 1160] MacOS X is like BSD regarding F_SETOWN
---
(4.2.4p7-RC2) 2009/04/09 Released by Harlan Stenn <stenn@ntp.org>
* [Sec 1144] limited buffer overflow in ntpq. CVE-2009-0159
* [Sec 1149] use SO_EXCLUSIVEADDRUSE on Windows
---
(4.2.4p7-RC1) 2009/03/30 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1131] UDP sockets should not use SIGPOLL on Solaris.
* build system email address cleanup
* [Bug 774] parsesolaris.c does not compile under the new Solaris
* [Bug 873] Windows serial refclock proper TTY line discipline emulation
* [Bug 1014] Enable building with VC9 (in Visual Studio 2008,
Visual C++ 2008, or SDK)
* [Bug 1117] Deferred interface binding under Windows works only correctly
if FORCE_DNSRETRY is defined
* [BUG 1124] Lock QueryPerformanceCounter() client threads to same CPU
* DPRINTF macro made safer, always evaluates to a statement and will not
misassociate an else which follows the macro.
---
(4.2.4p6) 2009/01/08 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 1113] Fixed build errors with recent versions of openSSL.
* [Sec 1111] Fix incorrect check of EVP_VerifyFinal()'s return value.
* Update the copyright year.
---
(4.2.4p5) 2008/08/17 Released by Harlan Stenn <stenn@ntp.org>
* [BUG 1051] Month off by one in leap second message written to clockstats

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,9 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.
@ -13,15 +14,12 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@ -36,11 +34,11 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@NEED_LIBOPTS_TRUE@am__append_1 = libopts
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure ChangeLog INSTALL NEWS TODO compile \
config.guess config.sub depcomp install-sh ltmain.sh missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/define_dir.m4 \
@ -50,34 +48,64 @@ am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
{ test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; }
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
ARLIB_DIR = @ARLIB_DIR@
@ -93,10 +121,6 @@ CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@ -109,11 +133,10 @@ EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
HAVE_INLINE = @HAVE_INLINE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_LIBOPTS_FALSE = @INSTALL_LIBOPTS_FALSE@
INSTALL_LIBOPTS_TRUE = @INSTALL_LIBOPTS_TRUE@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
@ -127,6 +150,7 @@ LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LSCF = @LSCF@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
@ -140,8 +164,7 @@ MAKE_NTPTIME = @MAKE_NTPTIME@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
NEED_LIBOPTS_FALSE = @NEED_LIBOPTS_FALSE@
NEED_LIBOPTS_TRUE = @NEED_LIBOPTS_TRUE@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
@ -151,6 +174,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
@ -164,16 +188,11 @@ STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@ -185,29 +204,41 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
#AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies
AUTOMAKE_OPTIONS = util/ansi2knr foreign 1.8
@ -299,15 +330,15 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
cd $(srcdir) && $(AUTOMAKE) --foreign \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@ -323,21 +354,22 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
@ -351,8 +383,7 @@ clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
-rm -f libtool config.lt
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@ -378,15 +409,14 @@ $(RECURSIVE_TARGETS):
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
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:
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
@ -413,16 +443,16 @@ maintainer-clean-recursive:
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@ -430,14 +460,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
@ -449,84 +479,103 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/libopts/m4 $(distdir)/m4 $(distdir)/ntpdc $(distdir)/scripts
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(mkdir_p) "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
@ -534,11 +583,12 @@ distdir: $(DISTFILES)
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
@ -547,6 +597,14 @@ dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
@ -573,6 +631,10 @@ distcheck: dist
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
@ -584,9 +646,11 @@ distcheck: dist
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
@ -608,13 +672,15 @@ distcheck: dist
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
@$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
@ -658,6 +724,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@ -680,18 +747,38 @@ dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@ -712,24 +799,27 @@ ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am
uninstall-am:
uninstall-info: uninstall-info-recursive
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
ctags-recursive install install-am install-strip \
tags-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
check-am clean clean-generic clean-libtool clean-recursive \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-generic distclean-hdr distclean-libtool \
distclean-recursive distclean-tags distcleancheck distdir \
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
dist-zip distcheck distclean distclean-generic distclean-hdr \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-generic \
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am uninstall-info-am
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags tags-recursive uninstall uninstall-am
$(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
@ -803,6 +893,7 @@ FRC.CommitLog FRC.distwarn FRC.checkcvo FRC.checkhost FRC.version:
# HMS: what was I trying to do with this?
#dot.emacs: FRC.distwarn
# 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:

View file

@ -1,3 +1,91 @@
NTP 4.2.4p8 (Harlan Stenn <stenn@ntp.org>, 2009/12/08)
Focus: Security Fixes
Severity: HIGH
This release fixes the following high-severity vulnerability:
* [Sec 1331] DoS with mode 7 packets - CVE-2009-3563.
See http://support.ntp.org/security for more information.
NTP mode 7 (MODE_PRIVATE) is used by the ntpdc query and control utility.
In contrast, ntpq uses NTP mode 6 (MODE_CONTROL), while routine NTP time
transfers use modes 1 through 5. Upon receipt of an incorrect mode 7
request or a mode 7 error response from an address which is not listed
in a "restrict ... noquery" or "restrict ... ignore" statement, ntpd will
reply with a mode 7 error response (and log a message). In this case:
* If an attacker spoofs the source address of ntpd host A in a
mode 7 response packet sent to ntpd host B, both A and B will
continuously send each other error responses, for as long as
those packets get through.
* If an attacker spoofs an address of ntpd host A in a mode 7
response packet sent to ntpd host A, A will respond to itself
endlessly, consuming CPU and logging excessively.
Credit for finding this vulnerability goes to Robin Park and Dmitri
Vinokurov of Alcatel-Lucent.
THIS IS A STRONGLY RECOMMENDED UPGRADE.
---
NTP 4.2.4p7 (Harlan Stenn <stenn@ntp.org>, 2009/05/04)
Focus: Security and Bug Fixes
Severity: HIGH
This release fixes the following high-severity vulnerability:
* [Sec 1151] Remote exploit if autokey is enabled. CVE-2009-1252
See http://support.ntp.org/security for more information.
If autokey is enabled (if ntp.conf contains a "crypto pw whatever"
line) then a carefully crafted packet sent to the machine will cause
a buffer overflow and possible execution of injected code, running
with the privileges of the ntpd process (often root).
Credit for finding this vulnerability goes to Chris Ries of CMU.
This release fixes the following low-severity vulnerabilities:
* [Sec 1144] limited (two byte) buffer overflow in ntpq. CVE-2009-0159
Credit for finding this vulnerability goes to Geoff Keating of Apple.
* [Sec 1149] use SO_EXCLUSIVEADDRUSE on Windows
Credit for finding this issue goes to Dave Hart.
This release fixes a number of bugs and adds some improvements:
* Improved logging
* Fix many compiler warnings
* Many fixes and improvements for Windows
* Adds support for AIX 6.1
* Resolves some issues under MacOS X and Solaris
THIS IS A STRONGLY RECOMMENDED UPGRADE.
---
NTP 4.2.4p6 (Harlan Stenn <stenn@ntp.org>, 2009/01/07)
Focus: Security Fix
Severity: Low
This release fixes oCERT.org's CVE-2009-0021, a vulnerability affecting
the OpenSSL library relating to the incorrect checking of the return
value of EVP_VerifyFinal function.
Credit for finding this issue goes to the Google Security Team for
finding the original issue with OpenSSL, and to ocert.org for finding
the problem in NTP and telling us about it.
This is a recommended upgrade.
---
NTP 4.2.4p5 (Harlan Stenn <stenn@ntp.org>, 2008/08/17)
Focus: Minor Bugfixes

View file

@ -1,7 +1,7 @@
Submit patches, bug reports, and enhancement requests via
http://bugs.ntp.isc.org
http://bugs.ntp.org
The ntp Distribution Base Directory

View file

@ -1,6 +1,6 @@
In order to use the BitKeeper repository version of NTP you should visit
http://ntp.isc.org/Main/SoftwareDevelopment
http://support.ntp.org/Main/SoftwareDevelopment
for important information.

View file

@ -2,7 +2,7 @@ See README.hackers for notes on coding styles.
The master copy of this information can be found at:
http://ntp.isc.org/bin/view/Dev/MaintainerIssues#How_to_work_on_a_bug_using_BitKe
http://support.ntp.org/Dev/MaintainerIssues#How_to_work_on_a_bug_using_BitKe
If you are going to patch both ntp-stable and ntp-dev
please do it this way:

View file

@ -15,7 +15,7 @@ bugfixes and drivers for new and exotic radios, telephones and sundials.
This distribution is normally available by anonymous ftp as the
compressed tar archive ntp-<version>.tar.gz in the pub/ntp directory on
huey.udel.edu and <version> is the version number. The current stable
and development version numbers can be found at <http://ntp.isc.org>.
and development version numbers can be found at <http://ntp.org>.
A considerable amount of documentation, including build instructions,
configuration advice, program usage and miscellaneous information is

481
contrib/ntp/aclocal.m4 vendored
View file

@ -1,7 +1,7 @@
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
# generated automatically by aclocal 1.11 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc.
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -11,6 +11,14 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
[m4_warning([this file was generated for autoconf 2.65.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
# serial 47 AC_PROG_LIBTOOL
@ -6175,7 +6183,7 @@ SED=$lt_cv_path_SED
AC_MSG_RESULT([$SED])
])
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -6185,14 +6193,31 @@ AC_MSG_RESULT([$SED])
# ----------------------------
# 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.9"])
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.11], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
# _AM_AUTOCONF_VERSION(VERSION)
# -----------------------------
# aclocal traces this macro to find the Autoconf version.
# This is a private macro too. Using m4_define simplifies
# the logic in aclocal, which can simply ignore this definition.
m4_define([_AM_AUTOCONF_VERSION], [])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.9.6])])
[AM_AUTOMAKE_VERSION([1.11])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
@ -6249,14 +6274,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 7
# serial 9
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
@ -6265,8 +6290,11 @@ AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ(2.52)dnl
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])
AC_SUBST([$1_FALSE])
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
m4_define([_AM_COND_VALUE_$1], [$2])dnl
if $2; then
$1_TRUE=
$1_FALSE='#'
@ -6280,15 +6308,14 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8
# serial 10
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@ -6316,6 +6343,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], UPC, [depcc="$UPC" am_compiler_list=],
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
@ -6344,6 +6372,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
am__universal=false
m4_case([$1], [CC],
[case " $depcc " in #(
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac],
[CXX],
[case " $depcc " in #(
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac])
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
@ -6361,7 +6399,17 @@ AC_CACHE_CHECK([dependency style of $depcc],
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
gcc)
# This depmode causes a compiler race in universal mode.
test "$am__universal" = false || continue
;;
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
@ -6371,18 +6419,23 @@ AC_CACHE_CHECK([dependency style of $depcc],
break
fi
;;
msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
am__minus_obj=
;;
none) break ;;
esac
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
source=sub/conftest.c object=$am__obj \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
@ -6433,61 +6486,74 @@ if test "x$enable_dependency_tracking" != xno; then
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
#serial 3
#serial 5
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[for mf in $CONFIG_FILES; do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# So let's grep whole file.
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
[{
# Autoconf 2.62 quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
*\'*) eval set x "$CONFIG_FILES" ;;
*) set x $CONFIG_FILES ;;
esac
shift
for mf
do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
done
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
@ -6518,14 +6584,14 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 12
# serial 16
# 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.
@ -6542,16 +6608,20 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.58])dnl
[AC_PREREQ([2.62])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])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])
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
fi
# test whether we have cygpath
@ -6571,6 +6641,9 @@ m4_ifval([$2],
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
@ -6586,8 +6659,8 @@ AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AM_PROG_INSTALL_SH
AM_PROG_INSTALL_STRIP
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
@ -6595,20 +6668,37 @@ AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_CC],
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_CC],
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_CXX],
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_CXX],
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
[_AM_DEPENDENCIES(OBJC)],
[define([AC_PROG_OBJC],
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
])
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
])
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
@ -6619,18 +6709,19 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$1 | $1:* )
$_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -6641,7 +6732,14 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"}
if test x"${install_sh}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
*)
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
AC_SUBST(install_sh)])
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
@ -6667,13 +6765,13 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3
# serial 4
# AM_MAKE_INCLUDE()
# -----------------
@ -6682,7 +6780,7 @@ AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
@echo done
@echo this is the am__doit target
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
@ -6692,24 +6790,24 @@ am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# We grep out `Entering directory' and `Leaving directory'
# messages which can occur if `w' ends up in MAKEFLAGS.
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
fi
# Ignore all kinds of additional output from `make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
am__quote=
_am_result=GNU
;;
esac
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
am__quote="\""
_am_result=BSD
fi
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=.include
am__quote="\""
_am_result=BSD
;;
esac
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
@ -6717,16 +6815,51 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# serial 6
# AM_PROG_CC_C_O
# --------------
# Like AC_PROG_CC_C_O, but changed for automake.
AC_DEFUN([AM_PROG_CC_C_O],
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([compile])dnl
# FIXME: we rely on the cache variable name because
# there is no other way.
set dummy $CC
am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
if test "$am_t" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
# A longer-term fix would be to have automake use am__CC in this case,
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
CC="$am_aux_dir/compile $CC"
fi
dnl Make sure AC_PROG_CC is never called again, or it will override our
dnl setting of CC.
m4_define([AC_PROG_CC],
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 6
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
@ -6742,7 +6875,15 @@ AC_SUBST($1)])
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
AC_REQUIRE_AUX_FILE([missing])dnl
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
*)
MISSING="\${SHELL} $am_aux_dir/missing" ;;
esac
fi
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
@ -6752,7 +6893,7 @@ else
fi
])
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -6760,70 +6901,33 @@ fi
# AM_PROG_MKDIR_P
# ---------------
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
#
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
# created by `make install' are always world readable, even if the
# installer happens to have an overly restrictive umask (e.g. 077).
# This was a mistake. There are at least two reasons why we must not
# use `-m 0755':
# - it causes special bits like SGID to be ignored,
# - it may be too restrictive (some setups expect 775 directories).
#
# Do not use -m 0755 and let people choose whatever they expect by
# setting umask.
#
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
# Some implementations (such as Solaris 8's) are not thread-safe: if a
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
# concurrently, both version can detect that a/ is missing, but only
# one can create it and the other will error out. Consequently we
# restrict ourselves to GNU make (using the --version option ensures
# this.)
# Check for `mkdir -p'.
AC_DEFUN([AM_PROG_MKDIR_P],
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
# We used to keeping the `.' as first argument, in order to
# allow $(mkdir_p) to be used without argument. As in
# $(mkdir_p) $(somedir)
# where $(somedir) is conditionally defined. However this is wrong
# for two reasons:
# 1. if the package is installed by a user who cannot write `.'
# make install will fail,
# 2. the above comment should most certainly read
# $(mkdir_p) $(DESTDIR)$(somedir)
# so it does not work when $(somedir) is undefined and
# $(DESTDIR) is not.
# To support the latter case, we have to write
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
# so the `.' trick is pointless.
mkdir_p='mkdir -p --'
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
for d in ./-p ./--version;
do
test -d $d && rmdir $d
done
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
if test -f "$ac_aux_dir/mkinstalldirs"; then
mkdir_p='$(mkinstalldirs)'
else
mkdir_p='$(install_sh) -d'
fi
fi
AC_SUBST([mkdir_p])])
[AC_PREREQ([2.60])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
dnl while keeping a definition of mkdir_p for backward compatibility.
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
dnl Makefile.ins that do not define MKDIR_P, so we do our own
dnl adjustment using top_builddir (which is defined more often than
dnl MKDIR_P).
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
case $mkdir_p in
[[\\/$]]* | ?:[[\\/]]*) ;;
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
esac
])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3
# serial 4
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@ -6840,7 +6944,7 @@ AC_DEFUN([_AM_SET_OPTION],
# ----------------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
@ -6848,14 +6952,14 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005
# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2006
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# serial 5
AC_DEFUN([AM_C_PROTOTYPES],
[AC_REQUIRE([AC_C_PROTOTYPES])
@ -6866,23 +6970,24 @@ else
fi
# Ensure some checks needed by ansi2knr itself.
AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_HEADERS(string.h)
AC_SUBST(U)dnl
AC_SUBST(ANSI2KNR)dnl
AC_CHECK_HEADERS([string.h])
AC_SUBST([U])dnl
AC_SUBST([ANSI2KNR])dnl
_AM_SUBST_NOTMAKE([ANSI2KNR])dnl
])
AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# serial 5
# AM_SANITY_CHECK
# ---------------
@ -6891,16 +6996,29 @@ AC_DEFUN([AM_SANITY_CHECK],
# Just in case
sleep 1
echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
'
case `pwd` in
*[[\\\"\#\$\&\'\`$am_lf]]*)
AC_MSG_ERROR([unsafe absolute working directory name]);;
esac
case $srcdir in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
esac
# 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 conftest.file 2> /dev/null`
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftest.file`
set X `ls -t "$srcdir/configure" conftest.file`
fi
rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
@ -6950,9 +7068,28 @@ dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.

View file

@ -1,8 +1,9 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.
@ -18,15 +19,12 @@
# in sbindir. Now that we offer a choice, look in the "other" installation
# subdir to warn folks if there is another version there.
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@ -41,7 +39,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
ANSI2KNR = ../util/ansi2knr
bin_PROGRAMS = @MAKE_ADJTIMED@
EXTRA_PROGRAMS = adjtimed$(EXEEXT)
DIST_COMMON = README $(srcdir)/../bincheck.mf $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
@ -57,32 +54,32 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
adjtimed_SOURCES = adjtimed.c
adjtimed_OBJECTS = adjtimed$U.$(OBJEXT)
adjtimed_LDADD = $(LDADD)
adjtimed_DEPENDENCIES = ../libntp/libntp.a
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = adjtimed.c
DIST_SOURCES = adjtimed.c
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
ARLIB_DIR = @ARLIB_DIR@
@ -98,10 +95,6 @@ CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
@ -114,11 +107,10 @@ EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
HAVE_INLINE = @HAVE_INLINE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_LIBOPTS_FALSE = @INSTALL_LIBOPTS_FALSE@
INSTALL_LIBOPTS_TRUE = @INSTALL_LIBOPTS_TRUE@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
@ -132,6 +124,7 @@ LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LSCF = @LSCF@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@
@ -145,8 +138,7 @@ MAKE_NTPTIME = @MAKE_NTPTIME@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
NEED_LIBOPTS_FALSE = @NEED_LIBOPTS_FALSE@
NEED_LIBOPTS_TRUE = @NEED_LIBOPTS_TRUE@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
@ -156,6 +148,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
@ -169,16 +162,11 @@ STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@ -190,30 +178,43 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = ../util/ansi2knr
bin_PROGRAMS = @MAKE_ADJTIMED@
AM_CPPFLAGS = -I$(top_srcdir)/include
LDADD = ../libntp/libntp.a
ETAGS_ARGS = Makefile.am
@ -225,14 +226,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../bincheck.mf $(am__con
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign adjtimed/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign adjtimed/Makefile
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign adjtimed/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign adjtimed/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@ -250,37 +251,53 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
|| test -f $$p1 \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
else :; fi; \
done
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
adjtimed$(EXEEXT): $(adjtimed_OBJECTS) $(adjtimed_DEPENDENCIES)
@rm -f adjtimed$(EXEEXT)
$(LINK) $(adjtimed_LDFLAGS) $(adjtimed_OBJECTS) $(adjtimed_LDADD) $(LIBS)
$(LINK) $(adjtimed_OBJECTS) $(adjtimed_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@ -288,7 +305,7 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
../util/ansi2knr:
cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
$(am__cd) ../util && $(MAKE) $(AM_MAKEFLAGS) ./ansi2knr
mostlyclean-kr:
-test "$U" = "" || rm -f *_.c
@ -296,22 +313,22 @@ mostlyclean-kr:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimed$U.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@ -325,83 +342,85 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/..
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@ -410,7 +429,7 @@ check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@ -432,6 +451,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@ -444,7 +464,7 @@ distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
distclean-tags
dvi: dvi-am
@ -452,20 +472,39 @@ dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-binPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
@ -486,19 +525,23 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
uninstall-am: uninstall-binPROGRAMS
.MAKE: ../util/ansi2knr install-am install-exec-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-exec \
install-exec-am install-exec-hook install-info install-info-am \
install-man install-strip installcheck installcheck-am \
install-binPROGRAMS install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-exec-hook \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-kr mostlyclean-libtool pdf pdf-am ps ps-am tags \
uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am
uninstall uninstall-am uninstall-binPROGRAMS
install-exec-hook:
@ -512,6 +555,7 @@ install-exec-hook:
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:

Some files were not shown because too many files have changed in this diff Show more