summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getcwd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Avoid a transient PLT entry for the internal __getcwd syscall stub forguenther2016-05-071-1/+2
| | | | slightly better code on some archs
* Use a Thread Information Block in both single and multi-threaded programs.guenther2016-05-071-1/+2
| | | | | | | | | | | | | | | | | This stores errno, the cancelation flags, and related bits for each thread and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable! Make libpthread dlopen'able by moving the cancelation wrappers into libc and doing locking and fork/errno handling via callbacks that libpthread registers when it first initializes. 'errno' *must* be declared via <errno.h> now! Clean up libpthread's symbol exports like libc. On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec. Testing by various, particularly sthen@ and patrick@ ok kettenis@
* Use PATH_MAX, NAME_MAX and LOGIN_NAME_MAX not MAXPATHNAMELEN,millert2013-09-301-3/+3
| | | | MAXNAMLEN or MAXLOGNAME where possible. OK deraadt@
* add some prototypes, casts, includes, parenthesis, and whatnot totedu2013-04-171-1/+2
| | | | silence some warnings.
* System calls return -1 upon failure, so check for -1pedro2006-05-271-2/+2
| | | | Pointed out by deraadt@
* Don't leak memory if getcwd() was passed NULL and __getcwd() failspedro2006-05-271-3/+10
| | | | Okay miod@ sturm@ deraadt@
* Make libc's getcwd() use the new __getcwd() system callpedro2006-05-271-216/+22
| | | | Hacked by marius@ at c2k5, okay miod@ krw@ deraadt@
* zap remaining rcsid.espie2005-08-081-4/+1
| | | | | | Kill old files that are no longer compiled. okay theo
* Save errno from clobbering by clsoedir() in the err case.millert2005-06-011-1/+6
| | | | From Andrey Matveev; OK deraadt@
* deregister (and deauto!). ok millert@ marco@otto2005-03-251-7/+7
|
* Replace bcopy() with memcpy() and memmove() so it is obvious whatmillert2005-01-061-8/+7
| | | | | is a move and what is a copy. Also remove an unneeded variable. No functional change.
* Fix handling of memory allocation. Both the initial value of eupotto2005-01-051-8/+7
| | | | | | | | | | and the new value of bup after realloc() were bogus. This bug has been here since the net.2 days. Additionally, make the initial size of the malloc'ed pieces of mem more sane and kill a redundant test before free(). getcwd(3) is now able to return really long paths. Problem spotted by Peter Philipp <philipp at scan-plus dot de> ok millert@ deraadt@
* ansification; checked by pvalderaadt2003-06-111-4/+2
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Fix comment: s/trailing NULL/trailing NUL/, no code changes.cloder2002-11-241-2/+2
|
* off-by-one calculation error; getcwd() would return NULL if the buffer wasderaadt2000-07-191-2/+2
| | | | the needed length + terminating byte + 1; that 1 is not needed; assar
* realloc repairderaadt1998-08-141-4/+10
|
* Clean up some -Wall complaints.millert1997-07-091-2/+2
|
* Fix file descriptor leak on error. Noticed by bitblt.millert1996-11-271-2/+4
|
* Fix RCS idstholo1996-08-191-7/+1
| | | | Make sure everything uses {SYS,}LIBC_SCCS properly
* initial import of NetBSD treederaadt1995-10-181-0/+236