summaryrefslogtreecommitdiff
path: root/lib/libc/gen/glob.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove incomplete support for running FreeBSD userland on old NetBSD kernelsTim J. Robbins2003-10-291-4/+1
| | | | | | | lacking the issetugid() and utrace() syscalls. Notes: svn path=/head/; revision=121667
* Update glob(3) to add all the POSIX required options, specifically:Mike Heffner2002-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 Notes: svn path=/head/; revision=100217
* * Remove __P and convert to ANSI prototypes.David E. O'Brien2002-02-011-33/+33
| | | | | | | | * Remove 'register'. (some functions had 7+ register functions...) * Fix SCM ID's. Notes: svn path=/head/; revision=90045
* Rename the GLOB_MAXPATH flag of glob(3) to GLOB_LIMIT to be compatibleMike Heffner2001-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 Notes: svn path=/head/; revision=80525
* Mostly pick up OpenBSD's rev 1.14 by deraadt@ and millert@.Peter Wemm2001-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. Notes: svn path=/head/; revision=74963
* OpenBSD's g_Ctoc() returned a false error when the target buffer wasPeter Wemm2001-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. Notes: svn path=/head/; revision=74921
* Fix g_Ctoc() interface, approximately based on OpenBSD's recent changes.Peter Wemm2001-03-281-14/+36
| | | | | | | | | | Also, set gl_pathv to NULL after we free it, especially when dealing with realloc failures. Obtained from: OpenBSD Notes: svn path=/head/; revision=74918
* Introduce the GLOB_MAXPATH flag, which allows the user to limit theJonathan Lemon2001-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. Notes: svn path=/head/; revision=74469
* Bump MAX_GLOBENTRIES up to 16384, so it is a power of two. AddJonathan Lemon2001-03-161-1/+7
| | | | | | | | | some comments explaining that this is an arbitrary limit. Requested by: jkh Notes: svn path=/head/; revision=74357
* Limit the number of paths that glob can return to MAX_GLOBENTRIES, whichJonathan Lemon2001-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 Notes: svn path=/head/; revision=74307
* NetBSD kernels don't have issetugid(), so #ifdef this out whenJohn Birrell1998-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-) Notes: svn path=/head/; revision=33664
* Use getpwnam(getlogin()) before getpwuid(getuid())Andrey A. Chernov1997-08-271-3/+5
| | | | Notes: svn path=/head/; revision=28836
* Don't getenv(HOME) when set[ug]od. This can lead to a buffer overflow andWarner Losh1997-08-271-3/+4
| | | | | | | | elevated privs. Obtained from: OpenBSD Notes: svn path=/head/; revision=28820
* Speedup in case locale not usedAndrey A. Chernov1997-04-041-1/+3
| | | | Notes: svn path=/head/; revision=24633
* Buffer overflow. Similar, but different, to the fix that Julian A submittedWarner Losh1997-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. Notes: svn path=/head/; revision=24158
* collate_range_cmp -> __collate_range_cmpAndrey A. Chernov1996-10-311-3/+4
| | | | Notes: svn path=/head/; revision=19276
* Convert to newly aded collate compare functionAndrey A. Chernov1996-08-121-3/+3
| | | | Notes: svn path=/head/; revision=17552
* Remove static collcmp, ise new internal function nowAndrey A. Chernov1996-08-121-35/+3
| | | | Notes: svn path=/head/; revision=17531
* Use collate for alpha character rangesAndrey A. Chernov1996-08-121-1/+35
| | | | Notes: svn path=/head/; revision=17528
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-23/+23
| | | | Notes: svn path=/head/; revision=8870
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+846
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573