summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-06-12 07:24:22 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2022-06-12 08:08:33 -0700
commit06f2392bb648d84f231e4f19be79336870d26ed3 (patch)
treeae9359bfa6ace3a66ef4803ebfb00b2cdd7f999a /lib
parent68af318083ef21048e41b6e31aeb48bd6acbe924 (diff)
downloadpaxutils-06f2392bb648d84f231e4f19be79336870d26ed3.tar.gz
Modernize to current gettext, gnulib
* .gitignore, po/.gitignore: Revamp to match current source. * README: Fix typo in file name. * am/rmt.m4 (PU_RMT): Modernize to use AC_PREPROC_IFELSE instead of AC_TRY_CPP. * am/rmt.m4 (PU_RMT): * configure.ac: Modernize to use AS_HELP_STRING instead of AC_HELP_STRING. * am/system.m4 (PU_SYSTEM): * configure.ac: Remove obsolescent AC_HEADER_STDC. Use AC_CHECK_MEMBERS([struct stat.st_blksize]) instead of AC_STRUCT_ST_BLKSIZE. * am/system.m4 (PU_SYSTEM): Use AC_CHECK_HEADERS_ONCE([sys/time.h]) instead of obsolescent AC_HEADER_TIME. * bootstrap: Sync from Gnulib. * build-aux/bootstrap: Remove. * bootstrap.conf: Simplify. Don’t make m4, $source_base. (bootstrap_post_import_hook): New function, replacing a direct write. * configure.ac: Remove calls to no-longer-needed macros AC_ISC_POSIX, AM_STDBOOL_H, AC_HEADER_STDC, AC_TYPE_SIGNAL. Modernize to use AC_COMPILE_ELSE instead of AC_TRY_COMPILE. Remove MU_DEBUG_MODE, paxutils_GNULIB (not sure what those were from). Fix quoting in warning Remove Iconv code, as the iconv module should do this now. Update Gettext version from 0.12.1 (2003) to 0.21 (2020). Use AC_CONFIG_FILES. All uses of corresponding C macros changed. * gnulib.modules, paxlib.modules: Switch from gettext to gettext-h. * paxlib.modules: Add iconv.
Diffstat (limited to 'lib')
-rw-r--r--lib/rtapelib.c11
-rw-r--r--lib/system.h7
2 files changed, 6 insertions, 12 deletions
diff --git a/lib/rtapelib.c b/lib/rtapelib.c
index d7b8b36..a901624 100644
--- a/lib/rtapelib.c
+++ b/lib/rtapelib.c
@@ -1,7 +1,6 @@
/* Functions for communicating with a remote tape drive.
- Copyright (C) 1988, 1992, 1994, 1996, 1997, 1999, 2000, 2001, 2004,
- 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright 1988-2022 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
@@ -69,10 +68,6 @@
/* FIXME: Size of buffers for reading and writing commands to rmt. */
#define COMMAND_BUFFER_SIZE 64
-#ifndef RETSIGTYPE
-# define RETSIGTYPE void
-#endif
-
/* FIXME: Maximum number of simultaneous remote tape connections. */
#define MAXUNIT 4
@@ -122,7 +117,7 @@ do_command (int handle, const char *buffer)
/* Save the current pipe handler and try to make the request. */
size_t length = strlen (buffer);
- RETSIGTYPE (*pipe_handler) (int) = signal (SIGPIPE, SIG_IGN);
+ void (*pipe_handler) (int) = signal (SIGPIPE, SIG_IGN);
ssize_t written = full_write (WRITE_SIDE (handle), buffer, length);
signal (SIGPIPE, pipe_handler);
@@ -626,7 +621,7 @@ size_t
rmt_write__ (int handle, char *buffer, size_t length)
{
char command_buffer[sizeof "W\n" + INT_STRLEN_BOUND (size_t)];
- RETSIGTYPE (*pipe_handler) (int);
+ void (*pipe_handler) (int);
size_t written;
sprintf (command_buffer, "W%zu\n", length);
diff --git a/lib/system.h b/lib/system.h
index 0690363..fcc87a1 100644
--- a/lib/system.h
+++ b/lib/system.h
@@ -1,7 +1,6 @@
/* System dependent definitions for GNU tar.
- Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003,
- 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright 1994-2022 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
@@ -347,7 +346,7 @@ extern int errno;
#define DEFAULT_ST_BLKSIZE 512
-#if !HAVE_ST_BLKSIZE
+#ifndef HAVE_STRUCT_STAT_ST_BLKSIZE
# define ST_BLKSIZE(statbuf) DEFAULT_ST_BLKSIZE
#else
# define ST_BLKSIZE(statbuf) \
@@ -437,7 +436,7 @@ char *getenv ();
#endif
#include <time.h>
-#ifdef TIME_WITH_SYS_TIME
+#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif