integrate changes by Tobias Oetiker from SmokePing distribution: fping-2.4b2_to4-ipv6

pull/5/merge 2.4b2_to4-ipv6
David Schweikert 13 years ago
parent 873bc1df2d
commit 66909a30c5

@ -1,3 +1,161 @@
Mon Dec 21 2009
Tobi Oetiker <tobi@oetiker.ch>
- Revision v2.4b2-to3-ipv6
* added -On option to set the TOS octet
* Removed unused variables from code
* updated to current autoconf standards
* Merged Debian changes (see below)
----------------------------------------------------------------------
fping (2.4b2-to-ipv6-16) unstable; urgency=low
* Fix the following bugs
- Network byte order sensitivity was missing completely.
Added hopefully all missing calls.
- The sequence numbering scheme used led to packet drops.
Changed it to a more senseful numbering scheme.
- Some minor C programming mistakes ('=' instead of '==').
Patch by Stephan Fuhrmann; closes: #502569
* Add support for command line select timeout setting
Patch by Marton Balint; closes: #502575
* Remove symlinks in /usr/sbin; closes: #377732
* Standards-Version is 3.8.0
-- Anibal Monsalve Salazar <anibal@debian.org> Sat, 18 Oct 2008 12:04:52 +1100
fping (2.4b2-to-ipv6-15) unstable; urgency=low
* Added interface binding (-I) for fping
Patch by Peter Naulls <peter@mushroomnetworks.com>
Closes: #439014
* Fixed a couple of typos in fping.8. Closes: #423180
* Added homepage control header
* Bumped Standards-Version to 3.7.3
* Fixed the following lintian issue:
- debian-rules-sets-DH_COMPAT
-- Anibal Monsalve Salazar <anibal@debian.org> Mon, 03 Mar 2008 17:46:17 +1100
fping (2.4b2-to-ipv6-13) unstable; urgency=low
* Fixed stdout flush problem, closes: #340146.
Patch by Bart Martens <bart.martens@advalvas.be>.
-- Anibal Monsalve Salazar <anibal@debian.org> Fri, 30 Dec 2005 08:30:09 +1100
fping (2.4b2-to-ipv6-12) unstable; urgency=low
* Fixed "problem with option -r (retry limit)", closes: #318402.
Patch by Qingning Huo <qingningh@lanware.co.uk>.
-- Anibal Monsalve Salazar <anibal@debian.org> Sat, 08 Oct 2005 21:26:35 +1000
fping (2.4b2-to-ipv6-11) unstable; urgency=low
* Fixed "would be useful to specify 'source address' like ping for multi
homed machines", closes: #198486.
Patch by Marc Haber <mh+debian-bugs@zugschlus.de>.
-- Anibal Monsalve Salazar <anibal@debian.org> Thu, 02 Jun 2005 08:14:54 +1000
fping (2.4b2-to-ipv6-10) unstable; urgency=low
* Fixed "unnecessary delay with the -c option after the last packet"
(Closes: #293856). Patch by Niko Tyni <ntyni@iki.fi>
-- Anibal Monsalve Salazar <anibal@debian.org> Sun, 06 Feb 2005 23:25:57 +1100
fping (2.4b2-to-ipv6-9) unstable; urgency=low
* Fixed "fping6 always does reverse lookup" (Closes: #273647).
Patch by Jeroen Massar and forwarded by Bernhard Schmidt <berni@birkenwald.de>
-- Anibal Monsalve Salazar <A.Monsalve.Salazar@IEEE.org> Mon, 10 Jan 2005 00:01:32 +1100
fping (2.4b2-to-ipv6-7) unstable; urgency=low
* Build fping in build/ipv[46] instead of build and build-ipv6.
* Made DNS errors non-fatal for IPv6 (closes: #198056).
-- Herbert Xu <herbert@debian.org> Fri, 20 Jun 2003 21:36:30 +1000
fping (2.4b2-to-ipv6-6) unstable; urgency=low
* Do not use incorrect linux.h file (closes: #85468).
-- Herbert Xu <herbert@debian.org> Sat, 17 May 2003 14:13:11 +1000
fping (2.4b2-to-ipv6-5) unstable; urgency=low
* Fixed yet another divide by zero bug (closes: #148445).
-- Herbert Xu <herbert@debian.org> Tue, 4 Jun 2002 12:18:03 +1000
fping (2.4b2-to-ipv6-4) unstable; urgency=low
* Made fping6 setuid (closes: #136386).
* Moved fping back into bin.
* Partially applied IPv6 patch to fix IPv6 checksums (closes: #136479).
-- Herbert Xu <herbert@debian.org> Sun, 7 Apr 2002 20:36:56 +1000
fping (2.4b2-to-ipv6-3) unstable; urgency=low
* Added compatibility symlink for fping (closes: #135203).
-- Herbert Xu <herbert@debian.org> Sat, 23 Feb 2002 08:34:11 +1100
fping (2.4b2-to-ipv6-2) unstable; urgency=low
* Fixed another divide by zero error (closes: #132370).
-- Herbert Xu <herbert@debian.org> Thu, 7 Feb 2002 20:10:48 +1100
fping (2.4b2-to-ipv6-1) unstable; urgency=low
* New upstream release.
* Install fping into sbin as done by upstream.
-- Herbert Xu <herbert@debian.org> Fri, 1 Feb 2002 22:11:59 +1100
fping (2.2b2-3) unstable; urgency=low
* Removed INSTALL file from package (closes: #84050).
* Fixed alignment bug.
-- Herbert Xu <herbert@debian.org> Sat, 10 Feb 2001 19:25:18 +1100
fping (2.2b2-2) unstable; urgency=low
* Made changes for dpkg-statoverride (closes: #83838).
-- Herbert Xu <herbert@debian.org> Sun, 28 Jan 2001 21:53:05 +1100
fping (2.2b2-1) unstable; urgency=low
* New upstream release.
* Fixed typo that prevented -d from working (closes: #83255).
* Drop root privileges after opening the socket (closes: #81589).
* Fixed the options [tip], they were out by a factor of 10
(Richard Kettlewell, closes: #83742).
-- Herbert Xu <herbert@debian.org> Sun, 28 Jan 2001 00:09:41 +1100
fping (2.2b1-2) unstable; urgency=low
* Fixed typo in control file, spotted by William Ono (closes: #49909).
-- Herbert Xu <herbert@debian.org> Mon, 15 May 2000 12:27:03 +1000
fping (2.2b1-1) unstable; urgency=low
* Initial release.
* Fixed divide by zero error (closes: #29902).
-- Herbert Xu <herbert@debian.org> Sat, 30 Oct 1999 16:36:19 +1000
---------------------------------------------------------------------------------
Wed Jan 16 2002
Jeroen Massar
- Revision v2.4b2-to-IPv6
@ -9,304 +167,304 @@ Jeroen Massar
- num_unreachable was counted twice when a sendto() generated errors.
- See http://unfix.org/projects/ipv6/
Tue Mar 14 2001
Jason Ewasiuk <jasone@remote.net>
- Revision v2.4b1
- added -g option for generating IPs from a start to an end value
- two available options, generate IPs from start IP to end IP
or from a passed netmask, such as 192.168.1.0/24
Thu Feb 15 2001
Jason Ewasiuk <jasone@remote.net>
- Revision v2.3b1
- formatting changes to code layout (fping.c)
NOTE: Best viewed with a tab stop of 4
- merged in changes from Debian c/o Herbert Xu
<herbert@gondor.apana.org.au>
- Compilation fix on alphas with glibc
- Alignment issues (note from JE: in wait_for_reply())
- A typo with the time specified on the command line
(note from JE: bug was using 10 instead of 100)
- Drop privileges after obtaining socket
(note from JE: might be moot, since prog exits if
user is not root)
- touched all files in package to this date
- couple new #ifdefs added for future WIN32 support
(Haven't got to adding this yet, will take a lot of rewriting.)
Fri Dec 8 10:33:13 2000 Roland Schemers <schemers@stanford.edu>
* stop using sys_errlist and start using strerror
fixed bug in output of -C
Wed Jan 8 11:18:37 1997 Roland Schemers <schemers@stanford.edu>
* Created ChangeLog file. What follows was from the CHANGES file.
* Revision 2.0 1994/10/31 21:26:23 morgan
Substantial rewrite, including new features:
support some traditional ping features:
loop mode
specify size of data packets
specify how many pings to send
show per-response data
interpret ICMPs other than ICMP Echo response
also
rewrote main loop completely
make timings in tenths of milliseconds
do exponential backoff on retries
port to more systems
add some debugging stuff
do better checking on whether received ICMP is for us
* Revision 1.24 1993/12/10 23:11:39 schemers
commented out seteuid(getuid()) since it isn't needed
* Revision 1.23 1993/12/10 18:33:41 schemers
Took out the -f option for non-root users. This can be enabled by
defining ENABLE_F_OPTION before compiling. There is a call to
access before opening the file, but there is a race condition.
Reading from stdin is much safer.
* Revision 1.22 1993/11/16 19:49:24 schemers
Took out setuid(getuid()) and used access() system call to
check for access to the file specified with "-f".
* Revision 1.21 1993/07/20 18:08:19 schemers
commented out the test to make sure the ping packet came from the
same IP address as the one we sent to. This could cause problems on
multi-homed hosts.
* Revision 1.20 1993/02/23 00:16:38 schemers
fixed syntax error (should have compiled before checking in...)
* Revision 1.19 1993/02/23 00:15:15 schemers
turned off printing of "is alive" when -a is specified.
* Revision 1.18 1992/07/28 15:16:44 schemers
added a fflush(stdout) call before the summary is sent to stderr, so
everything shows up in the right order.
* Revision 1.17 1992/07/23 03:29:42 schemers
* Revision 1.16 1992/07/22 19:24:37 schemers
Fixed declaration of timeval_diff. Didn't notice the problem because
I use 'cc' in stead of gcc under Ultrix. Time to switch? :-)
Modified file reaing so it would skip blank lines or lines starting
with a '#'. Now you can do something like:
fping -ad < /etc/hosts
* Revision 1.15 1992/07/21 17:07:18 schemers
Put in sanity checks so only root can specify "dangerous" options.
Changed usage to show switchs in alphabetical order.
* Revision 1.14 1992/07/21 16:40:52 schemers
* Revision 1.13 1992/07/17 21:02:17 schemers
Changed the default timeout to 2500 msec, and retry to 3. This was
due to suggestions from people with slow (WAN) networks. The default
1 sec timeout was too fast.
Added '-e' option for showing elapsed (round-trip) times on pakets, and
modified the -s option to include min, max, and average round-trip times,
and over all elapsed time.
Modified action taken when a error is returned from sendto. The action
taken now considers the host unreachable and prints the hostname
followed by the errno message. The program will not exit and will continue
to try other hosts.
* Revision 1.12 1992/07/17 16:38:54 schemers
* Revision 1.11 1992/07/17 16:28:38 schemers
move socket create call so I could do a setuid(getuid()) before the
fopen call is made. Once the socket is created root privs aren't needed
to send stuff out on it.
moved num_timeout counter. It really was for debug purposes and didn't
make sense to the general public :-) Now it is the number of timeouts
(pings that didn't get received with the time limit).
* Revision 1.10 1992/07/16 16:24:38 schemers
* Revision 1.9 1992/07/16 16:00:04 schemers
* Revision 1.8 1992/07/16 05:44:41 schemers
Added _NO_PROTO stuff for older compilers, and _POSIX_SOURCE
for unistd.h, and _POSIX_SOURCE for stdlib.h. Also added
check for __cplusplus.
Now compiles ok under Ultrix 3.1, and Sun4 using cc. Also compiled
ok using g++ 2.2.2.
Changed '-a' and '-u' flags to be mutually exclusive (makes sense, since
specifiying both '-a' and '-u' is the same as not specifiying anything.
Since '-a' and '-u' are mutually exclusive, these options now only print
the hostname, and not the 'is alive' or 'is unreachable' messages.
This makes it much easier to do stuff like:
#!/usr/local/bin/perl
$hosts_to_backup=`cat /etc/hosts.backup|fping -a`;
Since you don't have to strip off the 'is alive' messages.
Changed usage to and stats to print to stderr instead of stdout.
-----------------------------------------------------------------------------
RCS header info from original fping.c package (no longer required)
/*
***************************************************
*
* Standard RCS Header information (see co(1))
*
* $Author: schemers $
*
* $Date: 1997/01/08 20:29:33 $
*
* $Revision: 2.2 $
*
* $Locker: $
*
* $Source: /afs/ir/group/networking/src/fping/fping-2.2/src/RCS/fping.c,v $
*
* $State: Exp $
*
* $Log: fping.c,v $
*
* Revision 2.2 1997/01/08 20:29:33 schemers
* changes for autoconf/automake
*
* Revision 2.1 1997/01/08 19:07:18 schemers
* checked in RL "Bob"'s changes before configure'ing
*
* Revision 2.0 1994/10/31 21:26:23 schemers
* many changes by RL "Bob" Morgan
* add timing data collection, loop mode, per-packet output, etc
*
* Revision 1.24 1993/12/10 23:11:39 schemers
* commented out seteuid(getuid()) since it isn't needed
*
* Revision 1.23 1993/12/10 18:33:41 schemers
* Took out the -f option for non-root users. This can be enabled by
* defining ENABLE_F_OPTION before compiling. There is a call to
* access before opening the file, but there is a race condition.
* Reading from stdin is much safer.
*
* Revision 1.22 1993/11/16 19:49:24 schemers
* Took out setuid(getuid()) and used access() system call to
* check for access to the file specified with "-f".
*
* Revision 1.21 1993/07/20 18:08:19 schemers
* commented out the test to make sure the ping packet came from the
* same IP address as the one we sent to. This could cause problems on
* multi-homed hosts.
*
* Revision 1.20 1993/02/23 00:16:38 schemers
* fixed syntax error (should have compiled before checking in...)
*
* Revision 1.19 1993/02/23 00:15:15 schemers
* turned off printing of "is alive" when -a is specified.
*
* Revision 1.18 1992/07/28 15:16:44 schemers
* added a fflush(stdout) call before the summary is sent to stderr, so
* everything shows up in the right order.
*
* Revision 1.17 1992/07/23 03:29:42 schemers
* fixed declaration of timeval_diff.
*
* Revision 1.16 1992/07/22 19:24:37 schemers
* Modified file reading so it would skip blanks lines or lines starting
* with a '#'. Now you can do something like:
*
* fping -ad < /etc/hosts
*
* Revision 1.15 1992/07/21 17:07:18 schemers
* Put in sanity checks so only root can specify "dangerous" options.
* Changed usage to show switchs in alphabetical order.
*
* Revision 1.14 1992/07/21 16:40:52 schemers
* Now when sendto returns an error, the host is considered unreachable and
* and the error message (from errno) is displayed.
*
* Revision 1.13 1992/07/17 21:02:17 schemers
* changed default timeout to 2500 msec (for WANs), and default try
* to 3. This gives 10 second overall timeout.
*
* Added -e option for showing elapsed (round-trip) time on packets
*
* Modified -s option to inlude to round-trip stats
*
* Added #ifndef DEFAULT_* stuff its easier to change the defaults
*
* Reorganized main loop.
*
* cleaned up timeval stuff. removed set_timeval and timeval_expired
* since they aren't needed anymore. Just use timeval_diff.
*
* Revision 1.12 1992/07/17 16:38:54 schemers
* move socket create call so I could do a setuid(getuid()) before the
* fopen call is made. Once the socket is created root privs aren't needed
* to send stuff out on it.
*
* Revision 1.11 1992/07/17 16:28:38 schemers
* moved num_timeout counter. It really was for debug purposes and didn't
* make sense to the general public :-) Now it is the number of timeouts
* (pings that didn't get received with the time limit).
*
* Revision 1.10 1992/07/16 16:24:38 schemers
* changed usage() to use fprintf(stderr,"...");
*
* Revision 1.9 1992/07/16 16:00:04 schemers
* Added _NO_PROTO stuff for older compilers, and _POSIX_SOURCE
* for unistd.h, and _POSIX_SOURCE for stdlib.h. Also added
* check for __cplusplus.
*
* Revision 1.8 1992/07/16 05:44:41 schemers
* changed -a and -u to only show hostname in results. This is
* for easier parsing. Also added -v flag
*
* Revision 1.7 1992/07/14 18:45:23 schemers
* initialized last_time in add_host function
*
* Revision 1.6 1992/07/14 18:32:40 schemers
* changed select to use FD_ macros
*
* Revision 1.5 1992/07/14 17:21:22 schemers
* standardized exit status codes
*
* Revision 1.4 1992/06/26 15:25:35 schemers
* changed name from rrping to fping
*
* Revision 1.3 1992/06/24 15:39:32 schemers
* added -d option for unreachable systems
*
* Revision 1.2 1992/06/23 03:01:23 schemers
* misc fixes from R.L. "Bob" Morgan
*
* Revision 1.1 1992/06/19 18:23:52 schemers
* Initial revision
*
*--------------------------------------------------
* Copyright (c) 1992, 1994, 1997 Board of Trustees
* Leland Stanford Jr. University
***************************************************
*/
Tue Mar 14 2001
Jason Ewasiuk <jasone@remote.net>
- Revision v2.4b1
- added -g option for generating IPs from a start to an end value
- two available options, generate IPs from start IP to end IP
or from a passed netmask, such as 192.168.1.0/24
Thu Feb 15 2001
Jason Ewasiuk <jasone@remote.net>
- Revision v2.3b1
- formatting changes to code layout (fping.c)
NOTE: Best viewed with a tab stop of 4
- merged in changes from Debian c/o Herbert Xu
<herbert@gondor.apana.org.au>
- Compilation fix on alphas with glibc
- Alignment issues (note from JE: in wait_for_reply())
- A typo with the time specified on the command line
(note from JE: bug was using 10 instead of 100)
- Drop privileges after obtaining socket
(note from JE: might be moot, since prog exits if
user is not root)
- touched all files in package to this date
- couple new #ifdefs added for future WIN32 support
(Haven't got to adding this yet, will take a lot of rewriting.)
Fri Dec 8 10:33:13 2000 Roland Schemers <schemers@stanford.edu>
* stop using sys_errlist and start using strerror
fixed bug in output of -C
Wed Jan 8 11:18:37 1997 Roland Schemers <schemers@stanford.edu>
* Created ChangeLog file. What follows was from the CHANGES file.
* Revision 2.0 1994/10/31 21:26:23 morgan
Substantial rewrite, including new features:
support some traditional ping features:
loop mode
specify size of data packets
specify how many pings to send
show per-response data
interpret ICMPs other than ICMP Echo response
also
rewrote main loop completely
make timings in tenths of milliseconds
do exponential backoff on retries
port to more systems
add some debugging stuff
do better checking on whether received ICMP is for us
* Revision 1.24 1993/12/10 23:11:39 schemers
commented out seteuid(getuid()) since it isn't needed
* Revision 1.23 1993/12/10 18:33:41 schemers
Took out the -f option for non-root users. This can be enabled by
defining ENABLE_F_OPTION before compiling. There is a call to
access before opening the file, but there is a race condition.
Reading from stdin is much safer.
* Revision 1.22 1993/11/16 19:49:24 schemers
Took out setuid(getuid()) and used access() system call to
check for access to the file specified with "-f".
* Revision 1.21 1993/07/20 18:08:19 schemers
commented out the test to make sure the ping packet came from the
same IP address as the one we sent to. This could cause problems on
multi-homed hosts.
* Revision 1.20 1993/02/23 00:16:38 schemers
fixed syntax error (should have compiled before checking in...)
* Revision 1.19 1993/02/23 00:15:15 schemers
turned off printing of "is alive" when -a is specified.
* Revision 1.18 1992/07/28 15:16:44 schemers
added a fflush(stdout) call before the summary is sent to stderr, so
everything shows up in the right order.
* Revision 1.17 1992/07/23 03:29:42 schemers
* Revision 1.16 1992/07/22 19:24:37 schemers
Fixed declaration of timeval_diff. Didn't notice the problem because
I use 'cc' in stead of gcc under Ultrix. Time to switch? :-)
Modified file reaing so it would skip blank lines or lines starting
with a '#'. Now you can do something like:
fping -ad < /etc/hosts
* Revision 1.15 1992/07/21 17:07:18 schemers
Put in sanity checks so only root can specify "dangerous" options.
Changed usage to show switchs in alphabetical order.
* Revision 1.14 1992/07/21 16:40:52 schemers
* Revision 1.13 1992/07/17 21:02:17 schemers
Changed the default timeout to 2500 msec, and retry to 3. This was
due to suggestions from people with slow (WAN) networks. The default
1 sec timeout was too fast.
Added '-e' option for showing elapsed (round-trip) times on pakets, and
modified the -s option to include min, max, and average round-trip times,
and over all elapsed time.
Modified action taken when a error is returned from sendto. The action
taken now considers the host unreachable and prints the hostname
followed by the errno message. The program will not exit and will continue
to try other hosts.
* Revision 1.12 1992/07/17 16:38:54 schemers
* Revision 1.11 1992/07/17 16:28:38 schemers
move socket create call so I could do a setuid(getuid()) before the
fopen call is made. Once the socket is created root privs aren't needed
to send stuff out on it.
moved num_timeout counter. It really was for debug purposes and didn't
make sense to the general public :-) Now it is the number of timeouts
(pings that didn't get received with the time limit).
* Revision 1.10 1992/07/16 16:24:38 schemers
* Revision 1.9 1992/07/16 16:00:04 schemers
* Revision 1.8 1992/07/16 05:44:41 schemers
Added _NO_PROTO stuff for older compilers, and _POSIX_SOURCE
for unistd.h, and _POSIX_SOURCE for stdlib.h. Also added
check for __cplusplus.
Now compiles ok under Ultrix 3.1, and Sun4 using cc. Also compiled
ok using g++ 2.2.2.
Changed '-a' and '-u' flags to be mutually exclusive (makes sense, since
specifiying both '-a' and '-u' is the same as not specifiying anything.
Since '-a' and '-u' are mutually exclusive, these options now only print
the hostname, and not the 'is alive' or 'is unreachable' messages.
This makes it much easier to do stuff like:
#!/usr/local/bin/perl
$hosts_to_backup=`cat /etc/hosts.backup|fping -a`;
Since you don't have to strip off the 'is alive' messages.
Changed usage to and stats to print to stderr instead of stdout.
-----------------------------------------------------------------------------
RCS header info from original fping.c package (no longer required)
/*
***************************************************
*
* Standard RCS Header information (see co(1))
*
* $Author: schemers $
*
* $Date: 1997/01/08 20:29:33 $
*
* $Revision: 2.2 $
*
* $Locker: $
*
* $Source: /afs/ir/group/networking/src/fping/fping-2.2/src/RCS/fping.c,v $
*
* $State: Exp $
*
* $Log: fping.c,v $
*
* Revision 2.2 1997/01/08 20:29:33 schemers
* changes for autoconf/automake
*
* Revision 2.1 1997/01/08 19:07:18 schemers
* checked in RL "Bob"'s changes before configure'ing
*
* Revision 2.0 1994/10/31 21:26:23 schemers
* many changes by RL "Bob" Morgan
* add timing data collection, loop mode, per-packet output, etc
*
* Revision 1.24 1993/12/10 23:11:39 schemers
* commented out seteuid(getuid()) since it isn't needed
*
* Revision 1.23 1993/12/10 18:33:41 schemers
* Took out the -f option for non-root users. This can be enabled by
* defining ENABLE_F_OPTION before compiling. There is a call to
* access before opening the file, but there is a race condition.
* Reading from stdin is much safer.
*
* Revision 1.22 1993/11/16 19:49:24 schemers
* Took out setuid(getuid()) and used access() system call to
* check for access to the file specified with "-f".
*
* Revision 1.21 1993/07/20 18:08:19 schemers
* commented out the test to make sure the ping packet came from the
* same IP address as the one we sent to. This could cause problems on
* multi-homed hosts.
*
* Revision 1.20 1993/02/23 00:16:38 schemers
* fixed syntax error (should have compiled before checking in...)
*
* Revision 1.19 1993/02/23 00:15:15 schemers
* turned off printing of "is alive" when -a is specified.
*
* Revision 1.18 1992/07/28 15:16:44 schemers
* added a fflush(stdout) call before the summary is sent to stderr, so
* everything shows up in the right order.
*
* Revision 1.17 1992/07/23 03:29:42 schemers
* fixed declaration of timeval_diff.
*
* Revision 1.16 1992/07/22 19:24:37 schemers
* Modified file reading so it would skip blanks lines or lines starting
* with a '#'. Now you can do something like:
*
* fping -ad < /etc/hosts
*
* Revision 1.15 1992/07/21 17:07:18 schemers
* Put in sanity checks so only root can specify "dangerous" options.
* Changed usage to show switchs in alphabetical order.
*
* Revision 1.14 1992/07/21 16:40:52 schemers
* Now when sendto returns an error, the host is considered unreachable and
* and the error message (from errno) is displayed.
*
* Revision 1.13 1992/07/17 21:02:17 schemers
* changed default timeout to 2500 msec (for WANs), and default try
* to 3. This gives 10 second overall timeout.
*
* Added -e option for showing elapsed (round-trip) time on packets
*
* Modified -s option to inlude to round-trip stats
*
* Added #ifndef DEFAULT_* stuff its easier to change the defaults
*
* Reorganized main loop.
*
* cleaned up timeval stuff. removed set_timeval and timeval_expired
* since they aren't needed anymore. Just use timeval_diff.
*
* Revision 1.12 1992/07/17 16:38:54 schemers
* move socket create call so I could do a setuid(getuid()) before the
* fopen call is made. Once the socket is created root privs aren't needed
* to send stuff out on it.
*
* Revision 1.11 1992/07/17 16:28:38 schemers
* moved num_timeout counter. It really was for debug purposes and didn't
* make sense to the general public :-) Now it is the number of timeouts
* (pings that didn't get received with the time limit).
*
* Revision 1.10 1992/07/16 16:24:38 schemers
* changed usage() to use fprintf(stderr,"...");
*
* Revision 1.9 1992/07/16 16:00:04 schemers
* Added _NO_PROTO stuff for older compilers, and _POSIX_SOURCE
* for unistd.h, and _POSIX_SOURCE for stdlib.h. Also added
* check for __cplusplus.
*
* Revision 1.8 1992/07/16 05:44:41 schemers
* changed -a and -u to only show hostname in results. This is
* for easier parsing. Also added -v flag
*
* Revision 1.7 1992/07/14 18:45:23 schemers
* initialized last_time in add_host function
*
* Revision 1.6 1992/07/14 18:32:40 schemers
* changed select to use FD_ macros
*
* Revision 1.5 1992/07/14 17:21:22 schemers
* standardized exit status codes
*
* Revision 1.4 1992/06/26 15:25:35 schemers
* changed name from rrping to fping
*
* Revision 1.3 1992/06/24 15:39:32 schemers
* added -d option for unreachable systems
*
* Revision 1.2 1992/06/23 03:01:23 schemers
* misc fixes from R.L. "Bob" Morgan
*
* Revision 1.1 1992/06/19 18:23:52 schemers
* Initial revision
*
*--------------------------------------------------
* Copyright (c) 1992, 1994, 1997 Board of Trustees
* Leland Stanford Jr. University
***************************************************
*/

@ -1,5 +1,5 @@
sbin_PROGRAMS = fping
fping_SOURCES = fping.c options.h linux.h
fping_SOURCES = fping.c options.h
man_MANS = fping.8
AUTOMAKE_OPTIONS=foreign
EXTRA_DIST = $(man_MANS)
EXTRA_DIST = $(man_MANS) autogen.sh

@ -1,6 +1,9 @@
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 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.
@ -10,386 +13,690 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
CC = @CC@
CPP = @CPP@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
sbin_PROGRAMS = fping
fping_SOURCES = fping.c options.h linux.h
man_MANS = fping.8
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = $(man_MANS)
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
sbin_PROGRAMS = fping$(EXEEXT)
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure COPYING ChangeLog INSTALL config.guess \
config.sub depcomp install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(sbin_PROGRAMS)
DEFS = @DEFS@ -I. -I$(srcdir) -I.
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
fping_OBJECTS = fping.o
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"
PROGRAMS = $(sbin_PROGRAMS)
am_fping_OBJECTS = fping.$(OBJEXT)
fping_OBJECTS = $(am_fping_OBJECTS)
fping_LDADD = $(LDADD)
fping_DEPENDENCIES =
fping_LDFLAGS =
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
DEFAULT_INCLUDES = -I.@am__isrc@
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)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(fping_SOURCES)
DIST_SOURCES = $(fping_SOURCES)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
man8dir = $(mandir)/man8
MANS = $(man_MANS)
NROFF = nroff
DIST_COMMON = README ./stamp-h.in COPYING ChangeLog INSTALL Makefile.am \
Makefile.in acconfig.h aclocal.m4 config.h.in configure configure.in \
install-sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
MANS = $(man_MANS)
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)"; }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
SOURCES = $(fping_SOURCES)
OBJECTS = $(fping_OBJECTS)
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
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@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
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@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
fping_SOURCES = fping.c options.h
man_MANS = fping.8
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = $(man_MANS) autogen.sh
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .o .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(ACLOCAL_M4): configure.in
cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
.SUFFIXES: .c .o .obj
am--refresh:
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
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 \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
config.h: stamp-h
@if test ! -f $@; then \
rm -f stamp-h; \
$(MAKE) stamp-h; \
else :; fi
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
$(SHELL) ./config.status
@echo timestamp > stamp-h 2> /dev/null
$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
config.h: stamp-h1
@if test ! -f $@; then \
rm -f $(srcdir)/stamp-h.in; \
$(MAKE) $(srcdir)/stamp-h.in; \
rm -f stamp-h1; \
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
mostlyclean-hdr:
clean-hdr:
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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h
maintainer-clean-hdr:
mostlyclean-sbinPROGRAMS:
clean-sbinPROGRAMS:
-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
distclean-sbinPROGRAMS:
maintainer-clean-sbinPROGRAMS:
-rm -f config.h stamp-h1
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(sbindir)
@list='$(sbin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p; \
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) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
} \
; done
uninstall-sbinPROGRAMS:
@$(NORMAL_UNINSTALL)
list='$(sbin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
done
.c.o:
$(COMPILE) -c $<
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || 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)$(sbindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(sbindir)" && rm -f $$files
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
clean-sbinPROGRAMS:
-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
fping$(EXEEXT): $(fping_OBJECTS) $(fping_DEPENDENCIES)
@rm -f fping$(EXEEXT)
$(LINK) $(fping_OBJECTS) $(fping_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.o core *.core
clean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fping.Po@am__quote@
fping: $(fping_OBJECTS) $(fping_DEPENDENCIES)
@rm -f fping
$(LINK) $(fping_LDFLAGS) $(fping_OBJECTS) $(fping_LDADD) $(LIBS)
install-man8:
$(mkinstalldirs) $(DESTDIR)$(man8dir)
@list='$(man8_MANS)'; \
l2='$(man_MANS)'; for i in $$l2; do \
case "$$i" in \
*.8*) list="$$list $$i" ;; \
esac; \
.c.o:
@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@ $(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) '$<'`
install-man8: $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
@list=''; test -n "$(man8dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.8[a-z]*$$/p'; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do \
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
else file=$$i; fi; \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst; \
done
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
done; }
uninstall-man8:
@list='$(man8_MANS)'; \
l2='$(man_MANS)'; for i in $$l2; do \
case "$$i" in \
*.8*) list="$$list $$i" ;; \
esac; \
done; \
for i in $$list; do \
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f $(DESTDIR)$(man8dir)/$$inst"; \
rm -f $(DESTDIR)$(man8dir)/$$inst; \
done
install-man: $(MANS)
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-man8
uninstall-man:
@$(NORMAL_UNINSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-man8
@list=''; test -n "$(man8dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.8[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
test -z "$$files" || { \
echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
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; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
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; 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; \
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) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
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; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
maintainer-clean-tags:
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
distdir: $(DISTFILES)
@list='$(MANS)'; if test -n "$$list"; then \
list=`for p in $$list; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
if test -n "$$list" && \
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
echo " typically \`make maintainer-clean' will remove them" >&2; \
exit 1; \
else :; fi; \
else :; fi
$(am__remove_distdir)
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; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
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" \
|| exit 1; \
fi; \
done
-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 $(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)
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)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-rm -rf $(distdir)
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
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*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
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-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
@banner="$(distdir).tar.gz is ready for distribution"; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
mkdir $(distdir)
-chmod 777 $(distdir)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(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 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
all-recursive-am: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
install-exec-am: install-sbinPROGRAMS
all-am: Makefile $(PROGRAMS) $(MANS) config.h
installdirs:
for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data-am: install-man
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-sbinPROGRAMS uninstall-man
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) $(MANS) config.h
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man8
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-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:
mostlyclean-am: mostlyclean-hdr mostlyclean-sbinPROGRAMS \
mostlyclean-compile mostlyclean-tags \
mostlyclean-generic
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
mostlyclean: mostlyclean-am
clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
clean-am: clean-hdr clean-sbinPROGRAMS clean-compile clean-tags \
clean-generic mostlyclean-am
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-tags
clean: clean-am
dvi: dvi-am
distclean-am: distclean-hdr distclean-sbinPROGRAMS distclean-compile \
distclean-tags distclean-generic clean-am
dvi-am:
distclean: distclean-am
-rm -f config.status
html: html-am
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-sbinPROGRAMS \
maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
html-am:
info: info-am
info-am:
install-data-am: install-man
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-sbinPROGRAMS
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man: install-man8
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f config.status
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
mostlyclean-sbinPROGRAMS distclean-sbinPROGRAMS clean-sbinPROGRAMS \
maintainer-clean-sbinPROGRAMS uninstall-sbinPROGRAMS \
install-sbinPROGRAMS mostlyclean-compile distclean-compile \
clean-compile maintainer-clean-compile install-man8 uninstall-man8 \
install-man uninstall-man tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
check-am installcheck-am installcheck all-recursive-am install-exec-am \
install-exec install-data-am install-data install-am install \
uninstall-am uninstall all-redirect all-am all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-man uninstall-sbinPROGRAMS
uninstall-man: uninstall-man8
.MAKE: all install-am install-strip
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-generic clean-sbinPROGRAMS ctags dist dist-all \
dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ dist-xz \
dist-zip distcheck distclean distclean-compile \
distclean-generic distclean-hdr distclean-tags distcleancheck \
distdir distuninstallcheck dvi dvi-am html html-am info \
info-am install install-am install-data install-data-am \
install-dvi install-dvi-am install-exec install-exec-am \
install-html install-html-am install-info install-info-am \
install-man install-man8 install-pdf install-pdf-am install-ps \
install-ps-am install-sbinPROGRAMS install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-man uninstall-man8 \
uninstall-sbinPROGRAMS
# Tell versions [3.59,3.63) of GNU make to not export all variables.

@ -12,7 +12,7 @@ fping website: http://www.fping.com
Original author: Roland Schemers (schemers@stanford.edu)
Previous maintainer: RL "Bob" Morgan (morgan@stanford.edu)
IPv6 Support: Jeroen Massar (jeroen@unfix.org / jeroen@ipng.nl)
to enable IPV6 compile with -DIPV6
Suggestions and patches:

1038
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

@ -0,0 +1,4 @@
#!/bin/sh
PATH="/usr/pack/automake-1.11-to/amd64-linux-debian3.1/:/usr/pack/automake-1.11-to/amd64-linux-ubuntu8.04/bin:$PATH"
export PATH
autoreconf --force --install --verbose

1561
config.guess vendored

File diff suppressed because it is too large Load Diff

@ -1,32 +1,70 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* config.h.in. Generated from configure.in by autoheader. */
#ifndef CONFIG_H
#define CONFIG_H
/* VERSION (from configure.in) */
#undef VERSION
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
/* Define to 1 if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define if you have the <stdlib.h> header file. */
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if you have the <sys/file.h> header file. */
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
/* Define if you have the <sys/select.h> header file. */
/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define if you have the nsl library (-lnsl). */
#undef HAVE_LIBNSL
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define if you have the socket library (-lsocket). */
#undef HAVE_LIBSOCKET
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
@ -38,3 +76,5 @@
#endif
#endif /* CONFIG_H */

1686
config.sub vendored

File diff suppressed because it is too large Load Diff

6759
configure vendored

File diff suppressed because it is too large Load Diff

@ -1,13 +1,15 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(fping.c)
AM_INIT_AUTOMAKE(fping, 2.4b2_to_ipv6)
AM_CONFIG_HEADER(config.h)
#VERSION=2.4b2
#PACKAGE=fping
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(VERSION,"$VERSION")
dnl Minimum Autoconf version required.
AC_PREREQ(2.59)
AC_INIT([fping],[2.4b2_to4-ipv6])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
AC_CONFIG_HEADERS([config.h])
dnl Checks for programs.
@ -26,7 +28,24 @@ if test $ac_cv_func_connect = no; then
AC_CHECK_LIB(socket, connect)
fi
AH_TOP([
#ifndef CONFIG_H
#define CONFIG_H
])
AH_BOTTOM([
/* some OSes do not define this ... lets take a wild guess */
#ifndef INADDR_NONE
# define INADDR_NONE 0xffffffffU
#endif
#endif /* CONFIG_H */
])
dnl Checks for header files.
AC_CHECK_HEADERS(unistd.h sys/file.h stdlib.h sys/select.h)
AC_OUTPUT(Makefile)

@ -0,0 +1,630 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
# Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u="sed s,\\\\\\\\,/,g"
depmode=msvisualcpp
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no eat=no
for arg
do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvcmsys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

@ -131,6 +131,8 @@ a target will be made, not including the first try.
Print cumulative statistics upon exit.
.IP \fB-S\fIaddr\fR 5
Set source address.
.IP \fB-I\fIif\fR 5
Set the interface (requires SO_BINDTODEVICE support)
.IP \fB-t\fIn\fR 5
Initial target timeout in milliseconds (default 500). In the default
mode, this is the amount of time that
@ -141,6 +143,8 @@ multiplied by the backoff factor.
Select timeout in seconds (default 10).
.IP \fB-u\fR 5
Show targets that are unreachable.
.IP \fB-T\fIn\fR 5
Set the typ of service flag (TOS). \fIn\fR can be either decimal or hexadecimal (0xh) format.
.IP \fB-v\fR 5
Print
.B fping

@ -25,6 +25,7 @@
* Original author: Roland Schemers <schemers@stanford.edu>
* IPv6 Support: Jeroen Massar <jeroen@unfix.org / jeroen@ipng.nl>
* Bugfixes, byte order & senseful seq.-numbers: Stephan Fuhrmann (stephan.fuhrmann AT 1und1.de)
* Debian Merge, TOS settings: Tobi Oetiker <tobi@oetiker.ch>
*
*
* RCS header information no longer used. It has been moved to the
@ -127,8 +128,8 @@ extern int h_errno;
/*** Constants ***/
#define REV_DATE "2002/01/16 00:33:42"
#define EMAIL "david@remote.net"
#define REV_DATE "2010/12/21 11:07:00"
#define EMAIL "dzubint@vcn.bc.ca"
/*** Ping packet defines ***/
@ -190,7 +191,7 @@ char *icmp_type_str[19] =
"",
"",
"ICMP Time Exceeded", /* 11 */
"ICMP Parameter Problem", /* 12 */
"ICMP Paramter Problem", /* 12 */
"ICMP Timestamp Request", /* 13 */
"ICMP Timestamp Reply", /* 14 */
"ICMP Information Request", /* 15 */
@ -413,6 +414,8 @@ int main( int argc, char **argv )
struct protoent *proto;
char *buf;
uid_t uid;
int tos = 0;
#ifndef IPV6
struct sockaddr_in sa;
#else
@ -530,7 +533,7 @@ int main( int argc, char **argv )
/* get command line options */
while( ( c = getopt( argc, argv, "gedhlmnqusaAvz:t:i:p:f:r:c:b:C:Q:B:S:I:T:" ) ) != EOF )
while( ( c = getopt( argc, argv, "gedhlmnqusaAvz:t:i:p:f:r:c:b:C:Q:B:S:I:T:O:" ) ) != EOF )
{
switch( c )
{
@ -645,7 +648,7 @@ int main( int argc, char **argv )
#endif /* DEBUG || _DEBUG */
case 'v':
printf( "%s: Version %s $Date: %s $\n", argv[0], VERSION, REV_DATE );
printf( "%s: Version %s $Date: 2009-12-31 16:57:28 +0100 $\n", argv[0], VERSION, REV_DATE );
printf( "%s: comments to %s\n", argv[0], EMAIL );
exit( 0 );
@ -692,11 +695,10 @@ int main( int argc, char **argv )
#ifdef SO_BINDTODEVICE
if (setsockopt(s, SOL_SOCKET, SO_BINDTODEVICE, optarg,
strlen(optarg)))
err(1, "setsockopt(AF_INET, SO_BINDTODEVICE)");
perror("binding to specific interface (SO_BINTODEVICE)");
#else
fprintf( stderr,
"Warning: SO_BINDTODEVICE not supported, argument -I %s ignored\n",
optarg );
printf( "%s: cant bind to a particular net interface since SO_BINDTODEVICE is not supported on your os.\n", argv[0] );
exit(3);;
#endif
break;
@ -704,7 +706,13 @@ int main( int argc, char **argv )
if ( ! ( select_time = ( u_int )atoi( optarg ) * 100 ) )
usage();
break;
case 'O':
if (sscanf(optarg,"%i",&tos)){
if ( setsockopt(s, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))) {
perror("setting type of service octet IP_TOS");
}
}
break;
default:
usage();
break;
@ -743,7 +751,7 @@ int main( int argc, char **argv )
if( ( ping_data_size > MAX_PING_DATA ) || ( ping_data_size < MIN_PING_DATA ) )
{
fprintf( stderr, "%s: data size %u not valid, must be between %u and %u\n",
fprintf( stderr, "%s: data size %u not valid, must be between %lu and %u\n",
prog, ping_data_size, MIN_PING_DATA, MAX_PING_DATA );
usage();
@ -786,6 +794,7 @@ int main( int argc, char **argv )
}/* IF */
trials = ( count > retry + 1 ) ? count : retry + 1;
#if defined( DEBUG ) || defined( _DEBUG )
@ -916,7 +925,6 @@ int main( int argc, char **argv )
int iBitpos;
int iMask = 1;
int failed = 0;
unsigned long uTemp;
/* two possible forms are allowed here */
@ -1325,7 +1333,7 @@ void print_per_system_stats()
void print_per_system_stats( void )
#endif /* _NO_PROTO */
{
int i, j, k, avg;
int i, j, avg;
HOST_ENTRY *h;
char *buf;
int bufsize;
@ -1434,11 +1442,10 @@ void print_per_system_splits()
void print_per_system_splits( void )
#endif /* _NO_PROTO */
{
int i, j, k, avg;
int i, avg;
HOST_ENTRY *h;
char *buf;
int bufsize;
int resp;
struct tm *curr_tm;
bufsize = max_hostname_len + 1;
@ -1578,6 +1585,7 @@ void send_ping( int s, HOST_ENTRY *h )
FPING_ICMPHDR *icp;
PING_DATA *pdp;
int n;
int myseq;
buffer = ( char* )malloc( ( size_t )ping_pkt_size );
if( !buffer )
@ -1587,7 +1595,7 @@ void send_ping( int s, HOST_ENTRY *h )
icp = ( FPING_ICMPHDR* )buffer;
gettimeofday( &h->last_send_time, &tz );
int myseq = h->num_sent * num_hosts + h->i;
myseq = h->num_sent * num_hosts + h->i;
max_seq_sent = myseq > max_seq_sent ? myseq : max_seq_sent;
#ifndef IPV6
@ -1940,7 +1948,6 @@ int handle_random_icmp( FPING_ICMPHDR *p, int psize, FPING_SOCKADDR *addr )
#endif /* _NO_PROTO */
{
FPING_ICMPHDR *sent_icmp;
struct ip *sent_ip;
u_char *c;
HOST_ENTRY *h;
#ifdef IPV6
@ -2717,7 +2724,7 @@ int u_sec;
void u_sleep( int u_sec )
#endif /* _NO_PROTO */
{
int nfound, slen, n;
int nfound;
struct timeval to;
fd_set readset, writeset;
@ -2760,7 +2767,8 @@ int s; char *buf; int len; FPING_SOCKADDR *saddr; int timo;
int recvfrom_wto( int s, char *buf, int len, FPING_SOCKADDR *saddr, int timo )
#endif /* _NO_PROTO */
{
int nfound, slen, n;
unsigned int slen;
int nfound, n;
struct timeval to;
fd_set readset, writeset;
@ -2821,7 +2829,7 @@ void usage( void )
fprintf( stderr, " -f file read list of targets from a file ( - means stdin) (only if no -g specified)\n" );
fprintf( stderr, " -g generate target list (only if no -f specified)\n" );
fprintf( stderr, " (specify the start and end IP in the target list, or supply a IP netmask)\n" );
fprintf( stderr, " (ex. %s -g 192.168.1.0 192.168.1.255 or %s -g 192.168.1.0/24)\n", prog, prog );
fprintf( stderr, " (ex. %s -g 192.168.1.0 192.168.1.255 or %s -g 192.168.1.0/24)\n", prog, prog );
fprintf( stderr, " -i n interval between sending ping packets (in millisec) (default %d)\n", interval / 100 );
fprintf( stderr, " -l loop sending pings forever\n" );
fprintf( stderr, " -m ping multiple interfaces on target host\n" );
@ -2832,11 +2840,16 @@ void usage( void )
fprintf( stderr, " -Q n same as -q, but show summary every n seconds\n" );
fprintf( stderr, " -r n number of retries (default %d)\n", DEFAULT_RETRY );
fprintf( stderr, " -s print final stats\n" );
#ifdef SO_BINDTODEVICE
fprintf( stderr, " -I if bind to a particular interface\n");
#endif
fprintf( stderr, " -S addr set source address\n" );
fprintf( stderr, " -t n individual target initial timeout (in millisec) (default %d)\n", timeout / 100 );
fprintf( stderr, " -T n set select timeout (default %d)\n", select_time / 100 );
fprintf( stderr, " -u show targets that are unreachable\n" );
fprintf( stderr, " -O n set the type of service (tos) flag on the ICMP packets\n" );
fprintf( stderr, " -v show version\n" );
fprintf( stderr, " targets list of targets to check (if no -f specified)\n" );
fprintf( stderr, "\n");
exit( 3 );

@ -1,7 +1,38 @@
#! /bin/sh
#
#!/bin/sh
# install - install a program, script, or datafile
# This comes from X11R5.
scriptversion=2009-04-28.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
@ -9,230 +40,481 @@
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
true
doit_exec=$doit
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
else
instcmd=mkdir
fi
else
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
posix_mkdir=
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
src=
dst=
dir_arg=
dst_arg=
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
copy_on_change=false
no_target_directory=
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
Options:
--help display this help and exit.
--version display version info and exit.
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
pathcomp=''
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
while test $# -ne 0; do
case $1 in
-c) ;;
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
-C) copy_on_change=true;;
pathcomp="${pathcomp}/"
done
fi
-d) dir_arg=true;;
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
-g) chgrpcmd="$chgrpprog $2"
shift;;
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
--help) echo "$usage"; exit $?;;
# If we're going to rename the final executable, determine the name now.
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
-o) chowncmd="$chownprog $2"
shift;;
# don't allow the sed command to completely eliminate the filename
-s) stripcmd=$stripprog;;
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
-t) dst_arg=$2
shift;;
# Make a temp file name in the proper directory.
-T) no_target_directory=true;;
dsttmp=$dstdir/#inst.$$#
--version) echo "$0 $scriptversion"; exit $?;;
# Move or copy the file name to the temp name
--) shift
break;;
$doit $instcmd $src $dsttmp &&
-*) echo "$0: invalid option: $1" >&2
exit 1;;
trap "rm -f ${dsttmp}" 0 &&
*) break;;
esac
shift
done
# and set any options; do chmod last to preserve setuid bits
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
done
fi
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
# Now rename the file to the real destination.
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst;;
esac
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
fi &&
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
-*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

@ -1,7 +1,11 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
# 2008, 2009 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -14,16 +18,48 @@
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
case "$1" in
run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-h|--h|--he|--hel|--help)
echo "\
@ -35,21 +71,32 @@ error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
\`g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing - GNU libit 0.0"
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
@ -58,35 +105,77 @@ Supported PROGRAM values:
exit 1
;;
aclocal)
esac
# normalize program name to check for.
program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program). This is about non-GNU programs, so use $1 not
# $program.
case $1 in
lex*|yacc*)
# Not GNU programs, they don't have --version.
;;
tar*)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case $program in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`configure.in'. You might want
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
autoconf*)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`configure.in'. You might want to install the
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
autoheader*)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`configure.in'. You might want
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
@ -95,10 +184,10 @@ WARNING: \`$1' is missing on your system. You should only need it if
touch $touch_files
;;
automake)
automake*)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
@ -106,81 +195,170 @@ WARNING: \`$1' is missing on your system. You should only need it if
while read f; do touch "$f"; done
;;
bison|yacc)
autom4te*)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison*|yacc*)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
if test $# -ne 1; then
eval LASTARG="\${$#}"
case "$LASTARG" in
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
if test ! -f y.tab.h; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
lex*|flex*)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
if test $# -ne 1; then
eval LASTARG="\${$#}"
case "$LASTARG" in
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
makeinfo)
help2man*)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit $?
fi
;;
makeinfo*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '
/^@setfilename/{
s/.* \([^ ]*\) *$/\1/
p
q
}' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar*)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
@ -188,3 +366,11 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
esac
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

Loading…
Cancel
Save