Commit graph

31 commits

Author SHA1 Message Date
H. Peter Anvin
fefaa2cc5c autoconf: modernize and modularize
Use my modular m4 library used for other things as well; update
autoconf macros to 2.71 standard.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-06-10 18:24:53 -07:00
H. Peter Anvin
33051a296c signals: require and always use sigaction()
tftpd already requires sigaction() to compile, so there is no reason
to use anything else. It also allows for nicer combination of flags.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-06-10 14:36:28 -07:00
H. Peter Anvin
1f4b33a1f7 Modernize: use sigaction() whenever possible. Remove uses of common.
bsd_signal() may not be defined, and there is really no reason to even
try to use it if sigaction() is avaiable; using sigaction() guarantees
the semantics we really want.

Replace uses of common variables with explicit instantiation and
extern declarations in a header file.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-05-29 15:34:57 -07:00
H. Peter Anvin
9c0908a778 autoconf: remove workarounds for some very old systems
Remove workarounds for some ridiculously old systems; these
workarounds are basically untestable.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-05-29 15:15:34 -07:00
H. Peter Anvin
128e6a3905 Support IPv6 on MacOS X systems
Add feature test macros for MacOS X, and don't require
IPV6_RECVPKTINFO to exist.

Reported-by: YJZ <vollkommen@gmx.net>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2012-03-01 22:44:32 -08:00
H. Peter Anvin
dd50e8b75c If AI_CANONNAME or AI_ADDRCONFIG don't exist, set them to zero
If the AI_CANONNAME or AI_ADDRCONFIG flags are missing, just set them
to zero.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-11-14 08:31:03 -08:00
Роман Донченко
ac5f0ab996 Compilation of tftp-hpa's Git HEAD with no IPv6, and misc
This patch does two things:
a) makes tftp-hpa to compile on systems with no IPv6 support (there were
some IPv6 macros used unconditionally);
b) removes a stray binary character, which was annoying.
2008-10-20 15:06:24 -07:00
H. Peter Anvin
e4d3083006 tftpd: switch to getopt_long()
Switch to using getopt_long(); include a version in case the platform
lacks it.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-07-30 17:16:00 -07:00
Karsten Keil
7fe0fb941c IPv6 infrastructure support
Add autoconf rules to detect IPv6 availability and some of the neeeded
support functions. Add stubs for getaddrinfo and inet_ntop.
You can disable IPv6 at compile time with
./configure --without-ipv6

Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-07-23 14:24:19 -04:00
H. Peter Anvin
57ca281980 Remove more obsolete $Id$ tags
Additional $Id$ tags from the CVS era...
2008-07-22 15:07:24 -04:00
H. Peter Anvin
22accddda0 Reformat the source code
The source code was a mix of different styles; normalize on NASM
style; basically K&R style with 4 space indentation.
2008-07-08 17:14:44 -04:00
H. Peter Anvin
d15a61abe6 Prototype cleanup; use "config.h" where appropriate 2007-01-15 01:20:41 -08:00
H. Peter Anvin
14993bc916 Introduce socklen_t; detect non-local (e.g. broadcast) receive addresses 2006-10-04 21:54:04 -07:00
hpa
0ca2afec32 Fix handling of getopt variables. 2004-09-03 00:42:33 +00:00
hpa
5fbd57b61a Use the correct magic for long long 2004-01-15 20:21:42 +00:00
hpa
d05bd6fa96 Makefile/configure cleanups; prepare for release 2004-01-08 20:48:51 +00:00
hpa
530706aebe #include <sys/socket.h> if it exists;
Add option to control the max blksize negotiated.
2003-08-23 00:31:20 +00:00
hpa
64ae5fda79 -> Clean up the use of autoconf macros a bit.
-> Always pass O_TEXT/O_BINARY and "t"/"b" respectively, as appropriate.
2001-11-29 22:02:52 +00:00
hpa
98d7543721 Working on version 0.29.
Initial work for compiling on Win32/Cygwin.

Posixly correctness.
2001-11-27 10:05:13 +00:00
hpa
78fd7348ea Add the -p option for using regular Unix permissions. 2001-11-17 01:55:08 +00:00
hpa
3d401fa4c9 Be paranoid about multiple inclusions (apparently some systems don't like
it for certain header files.)  Be a little bit more careful in setting
up the standard environment in config.h.  This is AIX portability work.
2001-11-16 20:15:27 +00:00
hpa
818a5408bd Try to deal with severe AIX <inttypes.h> braindamage 2001-11-15 22:29:51 +00:00
hpa
7edb3d5b92 Display configuration information when using the -V option... 2001-11-14 04:16:23 +00:00
hpa
5ec55f35e9 Move feature test macros into configure.in -> CFLAGS so we don't
end up with mismatch between "configure" and compile time
2001-11-14 02:54:25 +00:00
hpa
06bfb2bf4f - Better parsing of the "connect" command (tftp).
- Move missing header file stuff consistently into config.h.
- Make "make -j" work correctly.
2001-11-13 19:58:32 +00:00
hpa
9570005ba2 Yet more portability hacks. 2001-11-12 21:44:05 +00:00
hpa
c61e3c499e Work around Solaris 8 braindamage 2001-11-12 20:27:40 +00:00
hpa
403b4a48ff Add #define _XOPEN_SOURCE (for Solaris)
Create "make autoconf" target
2001-11-12 20:02:23 +00:00
hpa
b46e220d49 A few more renames; fix <inttypes.h> emulation. 2001-11-12 18:14:14 +00:00
hpa
cba23571e2 Define _XPG4_2 on Solaris 2001-11-12 10:07:57 +00:00
hpa
2c31169f57 Major overhaul of the portability stuff; port to autoconf 2.52 2001-11-12 10:03:04 +00:00