summaryrefslogtreecommitdiff
path: root/paxlib
Commit message (Collapse)AuthorAgeFilesLines
* Move sys_reset_uid_gid to libraryPaul Eggert2021-02-281-0/+23
| | | | | | | | | | | This fixes a problem where ‘gcc -fanalyzer -flto’ (GCC 10) complained that sys_reset_uid_gid was defined but not used in some modules. This function belonged in a .c file anyway. * lib/rtapelib.c (sys_reset_uid_gid): * paxlib/rtape.c (sys_reset_uid_gid): Move here from system.h. The code is now duplicated, but so is most of the rest of this file anyway. * lib/system.h (sys_reset_uid_gid): Remove.
* Use unsigned long int for ioctl opsPaul Eggert2021-02-282-7/+6
| | | | | | | | | | * lib/rtapelib.c (rmt_ioctl__): * paxlib/rtape.c (rmt_ioctl): Arg is now of type unsigned long int, not int. This works better on GNU/Linux, where some ioctl values used by this code do not fit in int. FreeBSD ioctl also has unsigned long int here, and old hosts where it’s int should still work when this is unsigned long int. Problem reported by clang.
* Avoid linking problem in sys_reset_uid_gidPaul Eggert2021-02-281-1/+4
| | | | | | | | * lib/system.h (sys_reset_uid_gid) [!MSDOS]: On failure, instead of invoking FATAL_ERROR set errno and return the name of the syscall that failed, so that the caller can decide what to do. This avoids some GNU Tar linking problems on compilers that do not inline this function. All callers changed.
* Port better to non-GCC compilersPaul Eggert2021-02-271-9/+9
| | | | | | | | | Gnulib now defines _Noreturn for us on pre-C11 compilers, so use that instead of the less-portable __attribute__ ((noreturn)). * lib/system.h (__attribute__): Remove; no longer used. * paxlib/paxlib.h: Use _Noreturn instead of __attribute__ ((noreturn)). * paxtest/paxtest.c (dump): First arg is char *, not unsigned char *, to avoid type mismatch.
* Implement pre-error-display hook.Sergey Poznyakoff2014-01-222-4/+26
| | | | | | | * paxlib/error.c (error_hook): New global. * paxlib/paxlib.h (error_hook): New extern. (WARN, ERROR, FATAL_ERROR) (USAGE_ERROR): Call error_hook (if defined) before error().
* Use AM_CPPFLAGS rather than INCLUDES in Makefile.am'sMike Frysinger2012-12-011-1/+1
|
* Omit and/or split out functions not needed for tar.Paul Eggert2010-11-236-26/+7
| | | | | | | | | | * paxlib/DISTFILES: Add exit-status.c. * paxlib/Makefile.am (libpax_a_SOURCES): Add exit-status.c. * paxlib/exit-status.c: New file. * paxlib/exit.c (exit_status): Move to exit-status.c. * paxlib/names.c (hash_string_insert, hash_string_lookup): Remove. * paxlib/paxlib.h: Don't include hash.h. (hash_string_insert, hash_string_lookup): Remove.
* paxutils: remove lint discovered by Sun C compilerPaul Eggert2010-09-041-1/+1
| | | | | | | | * paxlib/paxlib.h (pax_exit): Remove stray semicolon that I introduced in the previous patch; sorry about that. * tests/genfile.c (print_stat): Don't assume that mode_t promotes to unsigned int when calling a varargs function; that assumption is not portable.
* Remove some lint, found by gcc -W etc.Paul Eggert2010-06-162-8/+3
| | | | | | | | | | | | | | * lib/rtapelib.c (do_command, rmt_write__): Use function prototypes instead of old-style decls. * paxlib/error.c (write_fatal): Remove unused and undeclared function. * paxlib/paxlib.h (stat_fatal, pax_exit): Add noreturn attribute. (write_error_details): New decl. * rmt/rmt.c (rmt_read, rmt_write, rmt_reply, rmt_error_message): (rmt_error, xlat_kw, skip_ws, decode_open_flag, close_device): (lseek_device, read_device, write_device, iocop_device, status_device): Declare as static, since they're not exported. Use function prototypes (void) instead of old-style decls ().
* Migrate to GitSergey Poznyakoff2009-03-072-2/+5
|
* (safer_name_suffix): Fix variable typeSergey Poznyakoff2007-08-191-1/+1
|
* (hash_string_insert_prefix): New functionSergey Poznyakoff2007-08-171-12/+35
| | | | | | (hash_string_insert): Rewrite using hash_string_insert_prefix (safer_name_suffix): Use hash_string_insert_prefix to avoid stack allocation. Bug reported by Dmitry V. Levin
* Use last_component instead of base_name. Patch by Eric Blake.Sergey Poznyakoff2007-08-121-1/+1
|
* Relicense under GPLv3Sergey Poznyakoff2007-06-2712-24/+24
|
* (read_fatal_details): Fix wording of the error message.Sergey Poznyakoff2006-12-071-2/+2
|
* Initialize the variable to avoid bogus errorsSergey Poznyakoff2006-06-211-2/+2
| | | | | when linking on Darwin. Reported by EXCOFFIER, Denis <denis.excoffier@airbus.com>.
* * lib/DISTFILES: Add system-ioctl.h.Paul Eggert2006-02-201-2/+3
| | | | | | | | | | * lib/system.h: Move the MTIO* stuff into.... * lib/system-ioctl.h: New file. That way, the symbols defined by these includes won't collide with the symbols defined by <sys/filio.h> on Solaris when compiling misc.c. * lib/rtapelib.c: Include system-ioctl.h. * paxlib/rtape.c: Likewise. * rmt/rmt.c: Likewise.
* * lib/rtapelib.c (encode_oflag): Simplify code, since O_NONBLOCKPaul Eggert2005-11-293-10/+14
| | | | | | | | | | is always defined now. * paxlib/rtape.c (encode_oflag): Likewise. * lib/system.h (O_DIRCTORY, O_NOATIME, O_NONBLOCK): Define to 0 if not already defined. * paxlib/error.c (rmdir_error): New function. * paxlib/error.h (rmdir_error): New decl. * rmt/rmt.c (decode_oflag): Use '#if O_NONBLOCK", not ifdef.
* Improve support for time stamps and other wide integers.Paul Eggert2005-06-224-39/+4
| | | | | | | | | | | | | | | | | | | | * gnulib.modules: Add inttostr, quote, quotearg. * lib/system.h (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove. (INT_STRLEN_BOUND): Remove. Include "intprops.h" instead. (UINTMAX_STRSIZE_BOUND): Define in terms of INT_BUFSIZE_BOUND, not INT_STRLEN_BOUND. [HAVE_UTIME_H]: Don't include utime.h. * paxlib/DISTFILES: Remove convert.c. * paxlib/convert.c: Remove. * paxlib/error.c: Include quote.h, quotearg.h. * paxlib/paxlib.h: Include inttostr.h. (STRINGIFY_BIGINT): Define in terms of umaxtostr. (stringify_uintmax_t_backwards): Remove decl. * tests/genfile.c: Include <utimens.h> instead of rolling our own. (exec_checkpoint): Use utimens instead of rolling our own. Don't pass extra args to error. (main): Wrap message inside _().
* Rename paxerror.h to paxlib.hSergey Poznyakoff2005-05-212-2/+2
|
* Add names.c,paxlib.h; remove paxerror.hSergey Poznyakoff2005-05-212-2/+4
|
* Added to the repositorySergey Poznyakoff2005-05-212-0/+271
|
* *** empty log message ***Sergey Poznyakoff2005-05-211-98/+0
|
* (libpax_a_SOURCES): Add new files.Sergey Poznyakoff2005-05-191-0/+3
|
* Added to the repositorySergey Poznyakoff2005-05-195-0/+522
|
* Update FSF postal mail address.Paul Eggert2005-05-158-8/+8
|
* New fileSergey Poznyakoff2005-05-149-0/+1825