summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/glob.c
Commit message (Collapse)AuthorAgeFilesLines
* Update glob(3) to add all the POSIX required options, specifically:mikeh2002-07-171-18/+20
| | | | | | | | | | - add GLOB_NOMATCH return value and use it when we don't get a match - rename GLOB_ABEND to GLOB_ABORTED and use it instead of returning 1 in some places - add GLOB_NOESCAPE flag and retire GLOB_QUOTE to compatibility section Suggestions/advice on correct usage of POSIX defines: wollman
* * Remove __P and convert to ANSI prototypes.obrien2002-02-011-33/+33
| | | | | * Remove 'register'. (some functions had 7+ register functions...) * Fix SCM ID's.
* Rename the GLOB_MAXPATH flag of glob(3) to GLOB_LIMIT to be compatiblemikeh2001-07-291-4/+8
| | | | | | | | | | with NetBSD and OpenBSD. glob(3) will now return GLOB_NOSPACE with errno set to 0 instead of GLOB_LIMIT when we match more than `gl_matchc' patterns. GLOB_MAXPATH has been left as an alias of GLOB_LIMIT to maintain backwards compatibility. Reviewed by: sheldonh, assar Obtained from: NetBSD/OpenBSD
* Mostly pick up OpenBSD's rev 1.14 by deraadt@ and millert@.peter2001-03-281-42/+39
| | | | | | I've left out a couple of unused args between internal functions. Use MAXPATHLEN, not MAXPATHLEN + 1 in a couple of places. Pass a pointer to the end of the target filename space.
* OpenBSD's g_Ctoc() returned a false error when the target buffer waspeter2001-03-281-16/+16
| | | | | | exactly the right size. Do it differently - pass a length rather than an end-of-string+1 pointer as this is more convenient anyway. Get rid of the bogus +1's.
* Fix g_Ctoc() interface, approximately based on OpenBSD's recent changes.peter2001-03-281-14/+36
| | | | | | | Also, set gl_pathv to NULL after we free it, especially when dealing with realloc failures. Obtained from: OpenBSD
* Introduce the GLOB_MAXPATH flag, which allows the user to limit thejlemon2001-03-191-39/+42
| | | | | | | number of paths which glob(3) will return. Remove the hardcoded limit from the last commit, which restores the previous unbounded behavior. Document the new flag in the manual page.
* Bump MAX_GLOBENTRIES up to 16384, so it is a power of two. Addjlemon2001-03-161-1/+7
| | | | | | some comments explaining that this is an arbitrary limit. Requested by: jkh
* Limit the number of paths that glob can return to MAX_GLOBENTRIES, whichjlemon2001-03-151-0/+7
| | | | | | | is currently set to 10000. This is intended to prevent glob from running amok when a highly recursive path is provided (such as "../*/../*/../*/...") Reviewed by: Diane Bruce <db@db.net>, jhb
* NetBSD kernels don't have issetugid(), so #ifdef this out whenjb1998-02-201-1/+5
| | | | | building FreeBSD's libc to run with a NetBSD kernel. We'll get to the alpha kernel later, I promise. 8-)
* Use getpwnam(getlogin()) before getpwuid(getuid())ache1997-08-271-3/+5
|
* Don't getenv(HOME) when set[ug]od. This can lead to a buffer overflow andimp1997-08-271-3/+4
| | | | | elevated privs. Obtained from: OpenBSD
* Speedup in case locale not usedache1997-04-041-1/+3
|
* Buffer overflow. Similar, but different, to the fix that Julian A submittedimp1997-03-231-9/+15
| | | | | | | | in PR 2580. Obtained from: BSDi by way of Keith Bostic Should be in 2.2 and 2.1.x. I'll merge into 2.2.
* collate_range_cmp -> __collate_range_cmpache1996-10-311-3/+4
|
* Convert to newly aded collate compare functionache1996-08-121-3/+3
|
* Remove static collcmp, ise new internal function nowache1996-08-121-35/+3
|
* Use collate for alpha character rangesache1996-08-121-1/+35
|
* Remove trailing whitespace.rgrimes1995-05-301-23/+23
|
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+846
OpenPOWER on IntegriCloud