Codebase list mbuffer / b33fbc7
Update upstream source from tag 'upstream/20190113+ds1' Update to upstream version '20190113+ds1' with Debian dir d4e1536d6837ab6c2c93a711ef965b5632529233 Peter Pentchev 5 years ago
6 changed file(s) with 58 addition(s) and 24 deletion(s). Raw diff Collapse all Expand all
0 20190113:
1 - fix for network initialization for systems without getaddrinfo
2 (patch by Peter Pentchev)
3 - support suppressing messages with Verbose=silent and Verbose=none
4 - fix detection of invalid arguments to option -v
5 - Copyright update to 2019
6
07 20181119:
18 - consistently use CLOCK_MONOTONIC if available
29 (patch by Peter Pentchev)
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for mbuffer 20181119.
2 # Generated by GNU Autoconf 2.69 for mbuffer 20190113.
33 #
44 #
55 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
576576 # Identity of this package.
577577 PACKAGE_NAME='mbuffer'
578578 PACKAGE_TARNAME='mbuffer'
579 PACKAGE_VERSION='20181119'
580 PACKAGE_STRING='mbuffer 20181119'
579 PACKAGE_VERSION='20190113'
580 PACKAGE_STRING='mbuffer 20190113'
581581 PACKAGE_BUGREPORT=''
582582 PACKAGE_URL=''
583583
12611261 # Omit some internal or obsolete options to make the list less imposing.
12621262 # This message is too long to be a string in the A/UX 3.1 sh.
12631263 cat <<_ACEOF
1264 \`configure' configures mbuffer 20181119 to adapt to many kinds of systems.
1264 \`configure' configures mbuffer 20190113 to adapt to many kinds of systems.
12651265
12661266 Usage: $0 [OPTION]... [VAR=VALUE]...
12671267
13281328
13291329 if test -n "$ac_init_help"; then
13301330 case $ac_init_help in
1331 short | recursive ) echo "Configuration of mbuffer 20181119:";;
1331 short | recursive ) echo "Configuration of mbuffer 20190113:";;
13321332 esac
13331333 cat <<\_ACEOF
13341334
14171417 test -n "$ac_init_help" && exit $ac_status
14181418 if $ac_init_version; then
14191419 cat <<\_ACEOF
1420 mbuffer configure 20181119
1420 mbuffer configure 20190113
14211421 generated by GNU Autoconf 2.69
14221422
14231423 Copyright (C) 2012 Free Software Foundation, Inc.
18931893 This file contains any messages produced by compilers while
18941894 running configure, to aid debugging if configure makes a mistake.
18951895
1896 It was created by mbuffer $as_me 20181119, which was
1896 It was created by mbuffer $as_me 20190113, which was
18971897 generated by GNU Autoconf 2.69. Invocation command line was
18981898
18991899 $ $0 $@
54315431 return 0;
54325432 }
54335433 _ACEOF
5434 for ac_lib in '' resolv socket nsl; do
5434 for ac_lib in '' resolv socket nsl ; do
54355435 if test -z "$ac_lib"; then
54365436 ac_res="none required"
54375437 else
54635463
54645464 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
54655465
5466 else
5467 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: support for systems without getaddrinfo is deprecated and will be removed in the future" >&5
5468 $as_echo "$as_me: WARNING: support for systems without getaddrinfo is deprecated and will be removed in the future" >&2;}
54665469 fi
54675470
54685471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
65936596 # report actual input values of CONFIG_FILES etc. instead of their
65946597 # values after options handling.
65956598 ac_log="
6596 This file was extended by mbuffer $as_me 20181119, which was
6599 This file was extended by mbuffer $as_me 20190113, which was
65976600 generated by GNU Autoconf 2.69. Invocation command line was
65986601
65996602 CONFIG_FILES = $CONFIG_FILES
66556658 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66566659 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66576660 ac_cs_version="\\
6658 mbuffer config.status 20181119
6661 mbuffer config.status 20190113
66596662 configured by $0, generated by GNU Autoconf 2.69,
66606663 with options \\"\$ac_cs_config\\"
66616664
0 AC_INIT([mbuffer],[20181119])
0 #
1 # Copyright (C) 2000-2019, Thomas Maier-Komor
2 #
3 # This is the source code of mbuffer.
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #
18
19 AC_INIT([mbuffer],[20190113])
120 AC_CONFIG_HEADER([config.h])
221 AC_CONFIG_SRCDIR([mbuffer.c])
322 AC_LANG([C])
106125 AC_SEARCH_LIBS(seteuid,c,AC_DEFINE([HAVE_SETEUID], [1], [Define to 1 if you have the seteuid() function]),)
107126 AC_SEARCH_LIBS(atoll,c,,AC_DEFINE([atoll],[atol],[Define to 1 if you do not have the atoll() function to use atol() instead]))
108127 AC_SEARCH_LIBS(hstrerror,resolv socket nsl,AC_DEFINE([HAVE_HSTRERROR], [1], [Define to 1 if you have the hstrerror() function]),)
109 AC_SEARCH_LIBS(getaddrinfo,resolv socket nsl,AC_DEFINE([HAVE_GETADDRINFO], [1], [Define to 1 if you have the getaddrinfo() function]),)
128 AC_SEARCH_LIBS(getaddrinfo,resolv socket nsl ,AC_DEFINE([HAVE_GETADDRINFO], [1], [Define to 1 if you have the getaddrinfo() function]) ,AC_MSG_WARN(support for systems without getaddrinfo is deprecated and will be removed in the future))
110129 AC_SEARCH_LIBS(socket,socket,,AC_MSG_ERROR(could not find the library containing network functions!))
111130 AC_SEARCH_LIBS(gethostbyname,nsl,,AC_MSG_ERROR(could not find the library containing name convertion functions!))
112131 AC_SEARCH_LIBS(sendfile,sendfile,AC_DEFINE([HAVE_SENDFILE],[1],[libsendfile is available]),)
00 /*
1 * Copyright (C) 2000-2017, Thomas Maier-Komor
1 * Copyright (C) 2000-2019, Thomas Maier-Komor
22 *
33 * This is the source code of mbuffer.
44 *
5151
5252 void setVerbose(const char *arg)
5353 {
54 long l = strtol(arg,0,0);
54 char c = *arg;
5555 if (0 == strcasecmp(arg,"fatal"))
5656 Verbose = fatals;
5757 else if (0 == strcasecmp(arg,"error"))
6464 Verbose = debugs;
6565 else if (0 == strcasecmp(arg,"io"))
6666 Verbose = iomsgs;
67 else if (((l > 0) && (l <= 6)) || ((l == 0) && (errno != EINVAL)))
68 Verbose = (verbose_t) l;
67 else if (0 == strcasecmp(arg,"silent"))
68 Verbose = silent;
69 else if (0 == strcasecmp(arg,"none"))
70 Verbose = silent;
71 else if ((arg[1] == 0) && (c >= '0') && (c <= '6'))
72 Verbose = (verbose_t) (c-'0');
6973 else
70 errormsg("invalid argument '%s' for setting verbosity level\n",arg);
74 errormsg("Invalid argument '%s' for setting verbosity level.\n"
75 "Valid values are: none, silent, fatal, error, warning, info, io, debug, and 0-6\n",arg);
7176 }
7277
7378
00 /*
1 * Copyright (C) 2000-2017, Thomas Maier-Komor
1 * Copyright (C) 2000-2019, Thomas Maier-Komor
22 *
33 * This is the source code of mbuffer.
44 *
337337 portstr = host;
338338 host = "";
339339 } else if (portstr == host) {
340 portstr = host + 1;
340 *portstr = 0;
341 ++portstr;
341342 host = "";
342 *portstr = 0;
343343 } else {
344344 *portstr = 0;
345345 ++portstr;
357357 int out;
358358 unsigned short pnr;
359359
360 debugmsg("creating socket for output to %s:%d...\n",dest->name,dest->port);
360 debugmsg("creating socket for output to %s:%s...\n",dest->name,dest->port);
361361 if (1 != sscanf(dest->port,"%hu",&pnr))
362362 fatal("port must be given by its number, not service name\n");
363363 out = socket(PF_INET, SOCK_STREAM, 0);
387387 infomsg("connecting to server at %s...\n",inet_ntoa(saddr.sin_addr));
388388 if (0 > connect(out, (struct sockaddr *) &saddr, sizeof(saddr))) {
389389 dest->result = strerror(errno);
390 errormsg("could not connect to %s:%d: %s\n",dest->name,dest->port,dest->result);
390 errormsg("could not connect to %s:%s: %s\n",dest->name,dest->port,dest->result);
391391 (void) close(out);
392392 out = -1;
393393 }
00 /*
1 * Copyright (C) 2000-2018, Thomas Maier-Komor
1 * Copyright (C) 2000-2019, Thomas Maier-Komor
22 *
33 * This is the source code of mbuffer.
44 *
528528 {
529529 (void) fprintf(stderr,
530530 "mbuffer version "PACKAGE_VERSION"\n"\
531 "Copyright 2001-2018 - T. Maier-Komor\n"\
531 "Copyright 2001-2019 - T. Maier-Komor\n"\
532532 "License: GPLv3 - see file LICENSE\n"\
533533 "This program comes with ABSOLUTELY NO WARRANTY!!!\n"
534534 "Donations via PayPal to thomas@maier-komor.de are welcome and support this work!\n"