Update upstream source from tag 'upstream/20190113+ds1'
Update to upstream version '20190113+ds1'
with Debian dir d4e1536d6837ab6c2c93a711ef965b5632529233
Peter Pentchev
5 years ago
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 | ||
0 | 7 | 20181119: |
1 | 8 | - consistently use CLOCK_MONOTONIC if available |
2 | 9 | (patch by Peter Pentchev) |
0 | 0 | #! /bin/sh |
1 | 1 | # 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. | |
3 | 3 | # |
4 | 4 | # |
5 | 5 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. |
576 | 576 | # Identity of this package. |
577 | 577 | PACKAGE_NAME='mbuffer' |
578 | 578 | PACKAGE_TARNAME='mbuffer' |
579 | PACKAGE_VERSION='20181119' | |
580 | PACKAGE_STRING='mbuffer 20181119' | |
579 | PACKAGE_VERSION='20190113' | |
580 | PACKAGE_STRING='mbuffer 20190113' | |
581 | 581 | PACKAGE_BUGREPORT='' |
582 | 582 | PACKAGE_URL='' |
583 | 583 | |
1261 | 1261 | # Omit some internal or obsolete options to make the list less imposing. |
1262 | 1262 | # This message is too long to be a string in the A/UX 3.1 sh. |
1263 | 1263 | 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. | |
1265 | 1265 | |
1266 | 1266 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1267 | 1267 | |
1328 | 1328 | |
1329 | 1329 | if test -n "$ac_init_help"; then |
1330 | 1330 | case $ac_init_help in |
1331 | short | recursive ) echo "Configuration of mbuffer 20181119:";; | |
1331 | short | recursive ) echo "Configuration of mbuffer 20190113:";; | |
1332 | 1332 | esac |
1333 | 1333 | cat <<\_ACEOF |
1334 | 1334 | |
1417 | 1417 | test -n "$ac_init_help" && exit $ac_status |
1418 | 1418 | if $ac_init_version; then |
1419 | 1419 | cat <<\_ACEOF |
1420 | mbuffer configure 20181119 | |
1420 | mbuffer configure 20190113 | |
1421 | 1421 | generated by GNU Autoconf 2.69 |
1422 | 1422 | |
1423 | 1423 | Copyright (C) 2012 Free Software Foundation, Inc. |
1893 | 1893 | This file contains any messages produced by compilers while |
1894 | 1894 | running configure, to aid debugging if configure makes a mistake. |
1895 | 1895 | |
1896 | It was created by mbuffer $as_me 20181119, which was | |
1896 | It was created by mbuffer $as_me 20190113, which was | |
1897 | 1897 | generated by GNU Autoconf 2.69. Invocation command line was |
1898 | 1898 | |
1899 | 1899 | $ $0 $@ |
5431 | 5431 | return 0; |
5432 | 5432 | } |
5433 | 5433 | _ACEOF |
5434 | for ac_lib in '' resolv socket nsl; do | |
5434 | for ac_lib in '' resolv socket nsl ; do | |
5435 | 5435 | if test -z "$ac_lib"; then |
5436 | 5436 | ac_res="none required" |
5437 | 5437 | else |
5463 | 5463 | |
5464 | 5464 | $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h |
5465 | 5465 | |
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;} | |
5466 | 5469 | fi |
5467 | 5470 | |
5468 | 5471 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 |
6593 | 6596 | # report actual input values of CONFIG_FILES etc. instead of their |
6594 | 6597 | # values after options handling. |
6595 | 6598 | 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 | |
6597 | 6600 | generated by GNU Autoconf 2.69. Invocation command line was |
6598 | 6601 | |
6599 | 6602 | CONFIG_FILES = $CONFIG_FILES |
6655 | 6658 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
6656 | 6659 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
6657 | 6660 | ac_cs_version="\\ |
6658 | mbuffer config.status 20181119 | |
6661 | mbuffer config.status 20190113 | |
6659 | 6662 | configured by $0, generated by GNU Autoconf 2.69, |
6660 | 6663 | with options \\"\$ac_cs_config\\" |
6661 | 6664 |
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]) | |
1 | 20 | AC_CONFIG_HEADER([config.h]) |
2 | 21 | AC_CONFIG_SRCDIR([mbuffer.c]) |
3 | 22 | AC_LANG([C]) |
106 | 125 | AC_SEARCH_LIBS(seteuid,c,AC_DEFINE([HAVE_SETEUID], [1], [Define to 1 if you have the seteuid() function]),) |
107 | 126 | AC_SEARCH_LIBS(atoll,c,,AC_DEFINE([atoll],[atol],[Define to 1 if you do not have the atoll() function to use atol() instead])) |
108 | 127 | 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)) | |
110 | 129 | AC_SEARCH_LIBS(socket,socket,,AC_MSG_ERROR(could not find the library containing network functions!)) |
111 | 130 | AC_SEARCH_LIBS(gethostbyname,nsl,,AC_MSG_ERROR(could not find the library containing name convertion functions!)) |
112 | 131 | AC_SEARCH_LIBS(sendfile,sendfile,AC_DEFINE([HAVE_SENDFILE],[1],[libsendfile is available]),) |
0 | 0 | /* |
1 | * Copyright (C) 2000-2017, Thomas Maier-Komor | |
1 | * Copyright (C) 2000-2019, Thomas Maier-Komor | |
2 | 2 | * |
3 | 3 | * This is the source code of mbuffer. |
4 | 4 | * |
51 | 51 | |
52 | 52 | void setVerbose(const char *arg) |
53 | 53 | { |
54 | long l = strtol(arg,0,0); | |
54 | char c = *arg; | |
55 | 55 | if (0 == strcasecmp(arg,"fatal")) |
56 | 56 | Verbose = fatals; |
57 | 57 | else if (0 == strcasecmp(arg,"error")) |
64 | 64 | Verbose = debugs; |
65 | 65 | else if (0 == strcasecmp(arg,"io")) |
66 | 66 | 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'); | |
69 | 73 | 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); | |
71 | 76 | } |
72 | 77 | |
73 | 78 |
0 | 0 | /* |
1 | * Copyright (C) 2000-2017, Thomas Maier-Komor | |
1 | * Copyright (C) 2000-2019, Thomas Maier-Komor | |
2 | 2 | * |
3 | 3 | * This is the source code of mbuffer. |
4 | 4 | * |
337 | 337 | portstr = host; |
338 | 338 | host = ""; |
339 | 339 | } else if (portstr == host) { |
340 | portstr = host + 1; | |
340 | *portstr = 0; | |
341 | ++portstr; | |
341 | 342 | host = ""; |
342 | *portstr = 0; | |
343 | 343 | } else { |
344 | 344 | *portstr = 0; |
345 | 345 | ++portstr; |
357 | 357 | int out; |
358 | 358 | unsigned short pnr; |
359 | 359 | |
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); | |
361 | 361 | if (1 != sscanf(dest->port,"%hu",&pnr)) |
362 | 362 | fatal("port must be given by its number, not service name\n"); |
363 | 363 | out = socket(PF_INET, SOCK_STREAM, 0); |
387 | 387 | infomsg("connecting to server at %s...\n",inet_ntoa(saddr.sin_addr)); |
388 | 388 | if (0 > connect(out, (struct sockaddr *) &saddr, sizeof(saddr))) { |
389 | 389 | 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); | |
391 | 391 | (void) close(out); |
392 | 392 | out = -1; |
393 | 393 | } |
0 | 0 | /* |
1 | * Copyright (C) 2000-2018, Thomas Maier-Komor | |
1 | * Copyright (C) 2000-2019, Thomas Maier-Komor | |
2 | 2 | * |
3 | 3 | * This is the source code of mbuffer. |
4 | 4 | * |
528 | 528 | { |
529 | 529 | (void) fprintf(stderr, |
530 | 530 | "mbuffer version "PACKAGE_VERSION"\n"\ |
531 | "Copyright 2001-2018 - T. Maier-Komor\n"\ | |
531 | "Copyright 2001-2019 - T. Maier-Komor\n"\ | |
532 | 532 | "License: GPLv3 - see file LICENSE\n"\ |
533 | 533 | "This program comes with ABSOLUTELY NO WARRANTY!!!\n" |
534 | 534 | "Donations via PayPal to thomas@maier-komor.de are welcome and support this work!\n" |