summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Replace rev 1.33 with a real fix. The problem was integer overflowsPeter Wemm2002-12-021-8/+2
| | | | | | | | | | | | | | | | | | | when trying to store the year in a signed int. The maximum time_t on ia64 is around 292 billion years in the future, but 'int' and struct tm.tm_year can only represent then ext 2.1 billion years or so. This solves the problem of mktime/localtime looping on ia64. Unfortunately, the standards say that tm_year is an 'int', so we are still stuck with a y2147483647 bug. bash2's configure script looks for bugs in mktime() and fails on ia64 because of this. However, mktime() on FreeBSD fails the test normally anyway so this is no big loss. This change does not affect any other platforms besides ia64. Approved by: re Notes: svn path=/head/; revision=107480
* mdoc(7) police: sweep.Ruslan Ermilov2002-11-2915-88/+92
| | | | Notes: svn path=/head/; revision=107392
* mdoc(7) police: sweep.Ruslan Ermilov2002-11-292-12/+14
| | | | Notes: svn path=/head/; revision=107391
* mdoc(7) police: formatting nits.Ruslan Ermilov2002-11-2915-33/+59
| | | | | | | Approved by: re Notes: svn path=/head/; revision=107387
* try SIOCGIFINDEX 1st to be able to use network aliasing.Hajimu UMEMOTO2002-11-281-0/+13
| | | | | | | | Submitted by: jlemon Approved by: re Notes: svn path=/head/; revision=107378
* Describe newly added fields in the KSE and thread mailboxes.Archie Cobbs2002-11-221-0/+28
| | | | | | | Approved by: re Notes: svn path=/head/; revision=107179
* libc_r wasn't so tied to libc for 22 months.Ruslan Ermilov2002-11-1831-153/+107
| | | | Notes: svn path=/head/; revision=107052
* This file has reincarnated as src/include/uuid.h with a whole newMarcel Moolenaar2002-11-181-59/+0
| | | | | | | future ahead of it. Notes: svn path=/head/; revision=107047
* libc header files are normally in src/include. Therefore, uuid.h hasMarcel Moolenaar2002-11-181-2/+0
| | | | | | | | | | | | | been repo-copied from src/lib/libc/uuid to src/include. Update the makefiles. While in src/include/Makefile, reformat and resort INCS. Reverting the functional change only involves removing uuid.h. Pompted by: ru Notes: svn path=/head/; revision=107046
* Update SYNOPSIS to reflect the standardized header. Add STANDARDSMike Barcroft2002-11-171-4/+13
| | | | | | | | | section. PR: 43270 Notes: svn path=/head/; revision=107021
* goto break; != break;Doug Barton2002-11-171-3/+3
| | | | | | | | | I've no idea if this is the right behavior for the library, but this at least fixes the build, and matches what seems to be alfred's intent in the commit message for 1.19. Notes: svn path=/head/; revision=107000
* Rework the sysconf(3) interaction with aio:Alfred Perlstein2002-11-171-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | sysconf.c: Use 'break' rather than 'goto yesno' in sysconf.c so that we report a '0' return value from the kernel sysctl. vfs_aio.c: Make aio reset its configuration parameters to -1 after unloading instead of 0. posix4_mib.c: Initialize the aio configuration parameters to -1 to indicate that it is not loaded. Add a facility (p31b_iscfg()) to determine if a posix4 facility has been initialized to avoid having to re-order the SYSINITs. Use p31b_iscfg() to determine if aio has had a chance to run yet which is likely if it is compiled into the kernel and avoid spamming its values. Introduce a macro P31B_VALID() instead of doing the same comparison over and over. posix4.h: Prototype p31b_iscfg(). Notes: svn path=/head/; revision=106998
* Disconnect the userland get/set/swapcontext() functions fromDaniel Eischen2002-11-164-6/+6
| | | | | | | | | | | | libc. I want to keep these in some version for the thread library/ies, but don't know whether to have them repo-copied to libc_r or renamed and kept in libc. Change the name of an alpha macro that was changed with the system call commit. Notes: svn path=/head/; revision=106980
* Provide more correct default values for sysconf(3) reporting of the AIOAlfred Perlstein2002-11-161-0/+3
| | | | | | | | | | | | | | | | subsystems capabilities: _SC_AIO_LISTIO_MAX returns the default of _POSIX_AIO_LISTIO_MAX _SC_AIO_MAX returns the default _POSIX_AIO_MAX _SC_AIO_PRIO_DELTA_MAX returns the default of 0 Without these adjustments the values returned are -1 even when the aio side of the kernel returns '0' for them which is incorrect. Noticed by: Craig Rodrigues <rodrigc@attbi.com> Notes: svn path=/head/; revision=106976
* Sort SRCS.Marcel Moolenaar2002-11-161-5/+4
| | | | Notes: svn path=/head/; revision=106973
* Define `Sudden_Underflow' when compiling for the AlphaRobert Drehmel2002-11-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | architecture, mainly to avoid getting a SIGFPE signal sent when calling strtod(3) with certain input. The SIGFPE has been sent because the code was not aware that a Gradual Underflow is handled in software via traps on the Alpha architecture, but is not implemented in our Alpha kernel layer. With `Sudden_Underflow' defined, strtod(3) should not depend on Gradual Underflow and adjust its calculations accordingly, which means that other, more subtle errors than the sending of SIGFPE could be solved by this. Discussed with: bde PR: alpha/12623 PR: alpha/17032 PR: alpha/43567 MFC after: 7 days Notes: svn path=/head/; revision=106918
* bde points out that the LIBC_MAJOR macro doesn't exist and requestsWarner Losh2002-11-141-3/+6
| | | | | | | | | | that we not use it here. In its place I've put a comment about the current state of play. Submitted by: bde Notes: svn path=/head/; revision=106915
* Reset LogTag to NULL in closelog(3). This fixes mysterious crashesRuslan Ermilov2002-11-141-0/+1
| | | | | | | | | | | | | | caused by dynamic PAM modules that call openlog(3) and closelog(3), e.g. ports/security/pam_pwdfile. What happened here is that the module first registered its "ident" with openlog(3), then PAM library unloaded module with dlclose(3), and the next call to syslog(3) resulted in SIGSEGV. MFC after: 3 days Notes: svn path=/head/; revision=106911
* o Fix _longjmp() to return 1 when the return value is given as 0.Marcel Moolenaar2002-11-141-52/+25
| | | | | | | | | | | | | | | | o Remove the unwanted smartness in _longjmp() where it compares the current ar.bspstore with the saved ar.bspstore and restores ar.rnat based on it. This either avoids saving ar.rnat in the jmp_buf or is the consequence of not saving ar.rnat. All this complexity breaks libc_r where we use longjmp() to switch to different threads and the current ar.bspstore has no relation to the saved ar.bspstore. Thus: we save ar.rnat in setjmp() and simply restore ar.bspstore and ar.rnat in longjmp(). This code needs a cleanup. Notes: svn path=/head/; revision=106904
* Argh, change declaration of two-dimensional array so that it actuallyDaniel Eischen2002-11-132-2/+3
| | | | | | | builds. Notes: svn path=/head/; revision=106880
* Make this compile with whatever error-checking is enabled in buildworldDaniel Eischen2002-11-131-2/+2
| | | | | | | and/or beast. Notes: svn path=/head/; revision=106870
* Use a jump table (a la Solaris) for pthread routines with defaultDaniel Eischen2002-11-134-401/+230
| | | | | | | | | | | | | entries in the table being stubs. While I'm here, add macros to auto-generate the stubs. A conforming threads library can override the stub routines by filling in the jump table. Add some entries to namespace.h and sync un-namespace.h to it. Also add a comment to remind folks to update un-namespace.h when changing namespace.h. Notes: svn path=/head/; revision=106866
* ia64 ABI breaker:Marcel Moolenaar2002-11-113-38/+6
| | | | | | | | | | | | | | | | Don't force 16-byte alignment at run-time. Do it at compile-time. This saves us the pointer fiddling by the setjmp functions and reduces complexity. While here, increase the jmp_buf by 16 bytes to an even 512 bytes. Coincidentally, due to the way alignment was handled prior to this change, the jmp_buf has not changed in size, but only in how the space is used. Prior to this change the 16 bytes were reserved for enforcing alignment; now they are reserved by us for future extensions. Therefore, this ABI breaker is relatively save: the failure is always an alignment trap. Notes: svn path=/head/; revision=106755
* Given that we have 3 places to document UUID related information,Marcel Moolenaar2002-11-111-9/+69
| | | | | | | | | | | | | | | | | | namely uuidgen(1), uuidgen(2) and uuid(3), the following division has been choosen: uuidgen(1) A description of the command line utility, and other user oriented UUID information. uuidgen(2) A mostly technical description of UUIDs. uuid(3) A description of the functions and other programmer oriented UUID information. According to the division: add more technical contents. Contributed by: Hiten Pandya <hiten@uk.FreeBSD.org> Edited and enhanced: marcel Notes: svn path=/head/; revision=106748
* Add cross references to mbrtowc(3) and wcrtomb(3).Tim J. Robbins2002-11-101-1/+3
| | | | Notes: svn path=/head/; revision=106728
* Don't check whether the first byte of the buffer is a null byte whenTim J. Robbins2002-11-101-7/+1
| | | | | | | the buffer has zero length (n == 0). Notes: svn path=/head/; revision=106725
* Restore Peter's version of static __sF. There's too much pain for itWarner Losh2002-11-101-1/+4
| | | | | | | | | | | | | | | to be static for 5.0. I may remove this for 5.1 or 5.2. No more binaries or libarires will be generated with __sF starting as of yesterday. Originally the plan had been to eliminate this for 5.0, but we didn't get the __std{in,out,err}p changes merged into -stable until yesterday (rather than in September 2001 like it should have been). Given that didn't happen on time, we can't do the other part of the scheme now. # Please do not change this without talking to me first. Notes: svn path=/head/; revision=106721
* Describe the `n' and `ps' arguments to mbrlen().Tim J. Robbins2002-11-091-2/+17
| | | | Notes: svn path=/head/; revision=106694
* Typo: pointer to -> pointed toTim J. Robbins2002-11-091-1/+1
| | | | Notes: svn path=/head/; revision=106693
* Use wide character ctype functions directly instead of relying onTim J. Robbins2002-11-091-2/+2
| | | | | | | 4.4BSD extensions to the single-byte ctype functions. Notes: svn path=/head/; revision=106687
* Add a missing return statement for the pwcs == NULL case (XSI extension).Tim J. Robbins2002-11-091-0/+1
| | | | Notes: svn path=/head/; revision=106685
* Update acl.3 to xref getfacl(1) and setfacl(1), the recommended tools forRobert Watson2002-11-081-6/+10
| | | | | | | | | | manipulating file ACLs. Update the status of the implementation a bit, update the copyright, etc. Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=106629
* o Make the COMPATIBILITY section a bit less redundant.Chris Costello2002-11-061-1/+1
| | | | | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Labs Notes: svn path=/head/; revision=106510
* o Update man page to reflect the new prototypes for mac_{to,from}_text.Chris Costello2002-11-061-43/+15
| | | | | | | | | | o Remove a (currently) no-longer-pertinent entry from errors. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Labs Notes: svn path=/head/; revision=106509
* Hook up the userland wrapper for __mac_execve().Robert Watson2002-11-062-0/+43
| | | | | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=106482
* Wrap function prototype declarations in __BEGIN_DECLS to do the right thingJuli Mallett2002-11-051-0/+2
| | | | | | | | | with them in non-C cases. Requested by: Patrick Hartling <patrick@137.org> Notes: svn path=/head/; revision=106452
* License update authorized by NAI: remove clause 3.Robert Watson2002-11-051-7/+4
| | | | Notes: svn path=/head/; revision=106436
* Clarify language relating to ACLs, Capabtilities, and MAC, since theRobert Watson2002-11-041-28/+36
| | | | | | | | implementation status of these services has changed substantially since this man page was last updated. Notes: svn path=/head/; revision=106432
* Update license, historical information.Robert Watson2002-11-041-7/+8
| | | | Notes: svn path=/head/; revision=106430
* Point out that the MAC Framework is considered experimental.Robert Watson2002-11-041-0/+9
| | | | Notes: svn path=/head/; revision=106429
* After waiting for help with the markup, I finally decided to just patchNick Sayer2002-11-041-3/+3
| | | | | | | | | | | | the page myself. The new language is more accurate than what was there before, but the most accurate way of describing the funcionality eludes me. PR: kern/33904 MFC after: 1 month Notes: svn path=/head/; revision=106423
* Add descriptions for some _PC_* variables from <sys/unistd.h> thatTim J. Robbins2002-11-041-1/+40
| | | | | | | were missing. Notes: svn path=/head/; revision=106401
* Backout "compatibility hack" for __sF.Alfred Perlstein2002-11-042-9/+1
| | | | | | | Requested by: Steve Kargl <sgk@troutmask.apl.washington.edu> (submitter) Notes: svn path=/head/; revision=106396
* Provide a hook to make __sF visible outside of libc for commercial appsAlfred Perlstein2002-11-022-1/+9
| | | | | | | | | if WANT_COMPAT4_STDIO is defined when compiling libc. Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu> Notes: svn path=/head/; revision=106352
* Track the number of non-data chararacters stored in socket buffers so thatKelly Yancey2002-11-011-1/+1
| | | | | | | | | | | | | | the data value returned by kevent()'s EVFILT_READ filter on non-TCP sockets accurately reflects the amount of data that can be read from the sockets by applications. PR: 30634 Reviewed by: -net, -arch Sponsored by: NTT Multimedia Communications Labs MFC after: 2 weeks Notes: svn path=/head/; revision=106313
* * Add stubs for pthread_cond_broadcast.Doug Rabson2002-11-013-28/+246
| | | | | | | | | | | | | * Fix typos in rwlock stubs. * Add pthread_XXX counterparts to the _pthread_XXX stubs which libraries like libX11 can use to ensure thread-safety without requiring the use of a thread library. Submitted by: Terry Lambert (pthread_cond_broadcast) Reviewed by: deischen Notes: svn path=/head/; revision=106288
* No need to include floatio.h here: vfscanf() no longer uses anythingTim J. Robbins2002-11-012-2/+0
| | | | | | | it defines. Notes: svn path=/head/; revision=106282
* Re-apply the previously backed-out commit that fixes the problem whereArchie Cobbs2002-10-315-5/+5
| | | | | | | | | | | HUGE_VAL is not properly aligned on some architectures. The previous fix now works because the two versions of 'math.h' (include/math.h and lib/msun/src/math.h) have since been merged into one. PR: bin/43544 Notes: svn path=/head/; revision=106268
* Make __sF static. This can not be allowed to exist in 5.x.Alfred Perlstein2002-10-311-1/+1
| | | | Notes: svn path=/head/; revision=106230
* Add two additional references to the See Also section, which contain muchTim J. Robbins2002-10-301-2/+16
| | | | | | | better descriptions of UTF-8 and related issues. Notes: svn path=/head/; revision=106201