aboutsummaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add fairly minimal documentation for the nmount() syscall.Tim J. Robbins2004-03-162-3/+35
| | | | Notes: svn path=/head/; revision=127060
* Don't try to pass off a struct sockaddr as a struct sockaddr_in when itDag-Erling Smørgrav2004-03-151-2/+2
| | | | | | | | | | may in fact very well be a struct sockaddr_in6. Just use plain struct sockaddr. This brings us yet another step closer to a clean -O2 build. Notes: svn path=/head/; revision=127028
* Add -DDEBUG to DEBUG_FLAGS if PAM_DEBUG is defined.Dag-Erling Smørgrav2004-03-151-0/+4
| | | | Notes: svn path=/head/; revision=127023
* Document additional reasons that sysctl(3) can return ENOMEM (due toDon Lewis2004-03-151-0/+11
| | | | | | | vslock() failure). Notes: svn path=/head/; revision=127015
* Make this compile with -O2. A proper fix would use a struct to representDag-Erling Smørgrav2004-03-151-22/+22
| | | | | | | | vectors, instead of requiring the caller to keep track of element size and count and pass them in by reference. Notes: svn path=/head/; revision=127012
* Whitespace nits.Dag-Erling Smørgrav2004-03-151-4/+4
| | | | Notes: svn path=/head/; revision=127011
* Fixed a misspelling of 0 as NULL.Bruce Evans2004-03-142-2/+2
| | | | Notes: svn path=/head/; revision=126952
* Fixed a misspelling of 0 as NULL. Removed a spelling of NULL as 0.Bruce Evans2004-03-141-1/+1
| | | | Notes: svn path=/head/; revision=126950
* Fixed misspellings of '\0' as NULL.Bruce Evans2004-03-141-2/+2
| | | | Notes: svn path=/head/; revision=126949
* Initial support for C99's (or is it POSIX.1-2001's?) MATH_ERRNO,Bruce Evans2004-03-121-0/+6
| | | | | | | | | | | | | | MATH_ERREXCEPTION and math_errhandling, so that C99 applications at least have the possibility of determining that errno is not set for math functions. Set math_errhandling to the non-standard-conforming value of 0 for now to indicate that we don't support either method of reporting errors. We intentionally don't support MATH_ERRNO because errno is a mistake, and we are missing support for MATH_ERREXCEPTION (<fenv.h>, compiler support for <fenv.h>, and actually setting the exception flags correctly). Notes: svn path=/head/; revision=126871
* Fixed misspellings of 0 as NULL.Bruce Evans2004-03-111-3/+2
| | | | Notes: svn path=/head/; revision=126835
* Set stream orientation in ungetc() instead of __ungetc(). This avoidsTim J. Robbins2004-03-101-2/+1
| | | | | | | | setting it redundantly when called from ungetwc(), vfscanf() etc., which already set the orientation. Notes: svn path=/head/; revision=126809
* Remove duplicate check for EOF from ungetc(); __ungetc() already checks.Tim J. Robbins2004-03-101-2/+0
| | | | Notes: svn path=/head/; revision=126808
* Call __sputc() directly in fputc() instead of taking an expensiveTim J. Robbins2004-03-101-1/+1
| | | | | | | detour through putc(). Notes: svn path=/head/; revision=126806
* Call __sgetc() directly in getchar() instead of taking an expensiveTim J. Robbins2004-03-101-1/+1
| | | | | | | detour through getc(). Notes: svn path=/head/; revision=126804
* Set the stream orientation explicitly in fgetln() instead of relying onTim J. Robbins2004-03-101-0/+1
| | | | | | | __srefill() to do it. Notes: svn path=/head/; revision=126802
* Set stream orientation in puts().Tim J. Robbins2004-03-101-0/+2
| | | | Notes: svn path=/head/; revision=126800
* Put libypclnt behind NO_YP_LIBCPoul-Henning Kamp2004-03-101-2/+6
| | | | Notes: svn path=/head/; revision=126799
* Make libgeom usable by C++ programs:John Baldwin2004-03-092-127/+140
| | | | | | | | | | | | | - Add DECL wrappers to libgeom.h. - Rename structure members in libgeom.h to use a lg_ prefix for member names. This is required because a few structures had members named 'class' which made g++ very unhappy. - Catch gstat(8) and gconcat(8) up to these API changes. Reviewed by: phk Notes: svn path=/head/; revision=126786
* Many fixes.Tim Kientzle2004-03-0937-203/+448
| | | | | | | | | | | | | | | | | | | Portability: Thanks to Juergen Lock, libarchive now compiles cleanly on Linux. Along the way, I cleaned up a lot of error return codes and reorganized some code to simplify conditional compilation of certain sections. Bug fixes: * pax format now actually stores filenames that are 101-154 characters long. * pax format now allows newline characters in extended attributes (this fixes a long-standing bug in ACL handling) * mtime/atime are now restored for directories * directory list is now sorted prior to fix-up to permit correct restore of non-writable dir heirarchies Notes: svn path=/head/; revision=126782
* Backout the previous revision due to objections.John Birrell2004-03-092-10/+4
| | | | Notes: svn path=/head/; revision=126765
* On 4.X it was possible for an application to initialise a local FILEJohn Birrell2004-03-092-4/+10
| | | | | | | | | | | | structure and call stdio functions. In 5.X this was broken when FILE locking was introduced into libc. This change makes most (relevant) stdio functions work again when the _extra file in FILE isn't initialised (and can't be without a libc function to do it since the __sFILEX structure is private to libc). Notes: svn path=/head/; revision=126760
* String the consumers into the list of the provider they are attached to.Poul-Henning Kamp2004-03-081-1/+5
| | | | | | | Noticed by: jhb Notes: svn path=/head/; revision=126748
* Rearrange (centralize) initialization of mallocs internals to always bePoul-Henning Kamp2004-03-071-19/+13
| | | | | | | | | done before the first call, even if this is a malloc(0) call. PR: 62859 Notes: svn path=/head/; revision=126727
* Add manpages for the gctl API.Poul-Henning Kamp2004-03-072-4/+118
| | | | | | | | Submitted by: le Tweaks by: phk Notes: svn path=/head/; revision=126721
* Recognize hardlinks when reading cpio files.Tim Kientzle2004-03-071-5/+100
| | | | | | | | | | | | This doesn't yet address the issue of selective restore of hardlinked files. With cpio format, it's possible to correctly restore any linked file; the API doesn't yet fully support this. (There's no way for the library to inform a client whether or not there's a file body associated with this entry. The assumption right now is that "hardlink" entries have no file body.) Notes: svn path=/head/; revision=126705
* Merge some fixes from NetBSD's getopt.3 v1.31:Andrey A. Chernov2004-03-061-43/+88
| | | | | | | cleanup, add more sections, better explanation, declaration Notes: svn path=/head/; revision=126697
* Merge some fixes from NetBSD's getopt.c v1.26:Andrey A. Chernov2004-03-061-26/+43
| | | | | | | | | | | cleanups, handling 'ls -l-', handling '--*' Note this is in the same time back out of our v1.3 "Don't print an error message if the bad option is '?'" because it directly violates POSIX. Notes: svn path=/head/; revision=126696
* Fix typo, was 'W'; instead of `W;'Andrey A. Chernov2004-03-061-1/+1
| | | | Notes: svn path=/head/; revision=126693
* Make GNU-compatible following case:Andrey A. Chernov2004-03-062-23/+27
| | | | | | | single '-' in command line and '-' (non-first) in options Notes: svn path=/head/; revision=126692
* Minor API tweak: The format-specific write_header function now setsTim Kientzle2004-03-063-36/+110
| | | | | | | | | | | | | | | | | | | | | the size in the archive_entry object to zero if that format doesn't store a body for that file type. This allows the client to determine whether or not it should feed the file body to the archive. In particular, cpio stores the file body for hardlinks, tar and shar don't. With this change, bsdtar now correctly archives hardlinks in all supported formats. While I'm here, make shar output be more aggressive about creating directories. Before this, commands such as: bsdtar -cv -F shar some/explicit/path/to/a/file wouldn't create the directory. Some simple logic to remember the last directory creation helps reduce unnecessary mkdirs here. At this point, I think the only flaw in libarchive's cpio support is the failure to recognize hardlinks when reading. Notes: svn path=/head/; revision=126684
* Remove last evidence of a long-dead function.Tim Kientzle2004-03-062-18/+0
| | | | Notes: svn path=/head/; revision=126680
* Add ARCHIVE_EXTRACT_UNLINK option to permit clients toTim Kientzle2004-03-063-0/+7
| | | | | | | | control how archive_extract handles pre-existing files. (Not implemented yet, but documented.) Notes: svn path=/head/; revision=126679
* Correctly read symlinks from cpio files.Tim Kientzle2004-03-061-1/+15
| | | | | | | | | While I'm here, fix a bug in reading filenames from cpio files. (Copy should count the length of the name, not the number of bytes available for input.) Notes: svn path=/head/; revision=126678
* Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)Mark Murray2004-03-058-11/+12
| | | | | | | | | | | | | | | | | | that this provokes. "Wherever possible" means "In the kernel OR NOT C++" (implying C). There are places where (void *) pointers are not valid, such as for function pointers, but in the special case of (void *)0, agreement settles on it being OK. Most of the fixes were NULL where an integer zero was needed; many of the fixes were NULL where ascii <nul> ('\0') was needed, and a few were just "other". Tested on: i386 sparc64 Notes: svn path=/head/; revision=126643
* Correctly read SCHILY.nlink from pax-format archives.Tim Kientzle2004-03-051-0/+2
| | | | | | | | In particular, -tv output for pax-format archives now lists everything that ls -l does. Notes: svn path=/head/; revision=126621
* Document missing EFAULT errno value.Diomidis Spinellis2004-03-031-0/+8
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=126553
* Make return code in noarg case GNU-compatibleAndrey A. Chernov2004-03-032-20/+24
| | | | Notes: svn path=/head/; revision=126535
* Be more GNU-compatible in diagnosticsAndrey A. Chernov2004-03-031-11/+61
| | | | Notes: svn path=/head/; revision=126518
* If handed a file pointer we can't write to, set errno properly to EBADFJordan K. Hubbard2004-03-021-1/+4
| | | | | | | | | | in order to get SUSv2 conformant behavior in higher level calls like fputs() and puts(). Reviewed by: bde Notes: svn path=/head/; revision=126506
* Hook libthr to the build for PowerPCPeter Grehan2004-03-021-1/+1
| | | | Notes: svn path=/head/; revision=126477
* libthr powerpc support.Peter Grehan2004-03-022-0/+63
| | | | | | | | Submitted by: Suleiman Souhlal <refugee@segfaulted.com> Tested with: most libpthread tests, Apache 'worker' MDM Notes: svn path=/head/; revision=126476
* makecontext lib call.Peter Grehan2004-03-023-3/+167
| | | | | | | Submitted by: Suleiman Souhlal <refugee@segfaulted.com> Notes: svn path=/head/; revision=126475
* Improve GNU compatibility in several places, use internal GNU_COMPATIBLEAndrey A. Chernov2004-03-012-29/+49
| | | | | | | | | | define for it. Don't catch POSIXLY_CORRECT env. into static variable, it can be changed on the fly by program. Use P1003.2 standartized illoptchar[] Notes: svn path=/head/; revision=126452
* Comment out things related to getopt() replacement we not useAndrey A. Chernov2004-03-011-36/+36
| | | | Notes: svn path=/head/; revision=126440
* Change "-"-started options when POSIX_CORRECTLY is set handlingAndrey A. Chernov2004-03-011-17/+17
| | | | | | | | in favour of GNU instead of NetBSD, because configure's use us and expect GNU. Notes: svn path=/head/; revision=126439
* Change "-"-started options when POSIX_CORRECTLY is set handlingAndrey A. Chernov2004-03-011-1/+5
| | | | | | | | in favour of GNU instead of NetBSD, because configure's use us and expect GNU. Notes: svn path=/head/; revision=126438
* Back out the "clean_environment()" function from libutil.Tim Kientzle2004-02-293-211/+4
| | | | | | | | | | Further contemplation has convinced me that this was not going to really solve the problem of environment-poisoning without raising serious administrative headaches. There must be a better way... Notes: svn path=/head/; revision=126419
* Make consistent with the better written wcsrtombs function:Diomidis Spinellis2004-02-271-4/+5
| | | | | | | | | - Fix syntax - Remove the (slightly wrong) duplicate explanation of the error condition - Change reference to invalid multibyte character into invalid wide character Notes: svn path=/head/; revision=126313
* Add the clean_environment call to libutil.h also.Tim Kientzle2004-02-261-0/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=126299