summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Temporary cosmetic change to prevent gcc-2.95.2 from doing anMartin Cracauer2000-03-081-1/+1
| | | | | | | | | | | | | | | | optimization that generates code our current as doesn't understand. The result is bad code that damages dynamic symbol locations at runtime. Ouch. See PR bin/16862 and discussion in -current. This change will be backed out when gcc and gas are back in sync. PR: Fixes bin/16862, but not the underlying problem. Submitted by: bde Approved by: jdk Notes: svn path=/head/; revision=57822
* Replace structure copy form ifreq obtained by SIOCGIFADDRYoshinobu Inoue2000-03-032-2/+2
| | | | | | | | | to memcpy(), to avoid unaligned access trap on alpha. Approved by: jkh Notes: svn path=/head/; revision=57728
* CMSG_XXX macros alignment fixes to follow RFC2292.Yoshinobu Inoue2000-03-031-6/+18
| | | | | | | | | | Approved by: jkh Submitted by: Partly from tech@openbsd Reviewed by: itojun Notes: svn path=/head/; revision=57719
* Fixed wrong function return types in synopsis.Bruce Evans2000-03-032-4/+4
| | | | Notes: svn path=/head/; revision=57707
* -Reflect function name change.Yoshinobu Inoue2000-03-021-36/+83
| | | | | | | | | | | | | | | | | -Added more description. -Many grammer fix. -Fix hard sentence break. -Many other man style fix. Thanks for bde finding out the problem. Thanks for sheldon for the patient and thorough review. :-) Submitted by: bde Reviewed by: sheldonh Notes: svn path=/head/; revision=57699
* Remove more single-space hard sentence breaks.Sheldon Hearn2000-03-024-6/+12
| | | | Notes: svn path=/head/; revision=57695
* Remove single-space hard sentence breaks. These degrade the qualitySheldon Hearn2000-03-0247-147/+294
| | | | | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc. Notes: svn path=/head/; revision=57686
* Fix errors in .Xr usage.Nik Clayton2000-03-011-1/+1
| | | | | | | | PR: docs/17057 Submitted by: Submitted by: Udo Erdelhoff <ue@nathan.ruhr.de> Notes: svn path=/head/; revision=57666
* Add MAP_NOCORE to mmap(2), and MADV_NOCORE and MADV_CORE to madvise(2).Paul Saab2000-02-282-0/+8
| | | | | | | | | | | | | | | This This feature allows you to specify if mmap'd data is included in an application's corefile. Change the type of eflags in struct vm_map_entry from u_char to vm_eflags_t (an unsigned int). Reviewed by: dillon,jdp,alfred Approved by: jkh Notes: svn path=/head/; revision=57550
* Restore `[no]{s|u}unlnk' and `[no]opaque' support.Ruslan Ermilov2000-02-223-6/+21
| | | | | | | | | | Broken in src/bin/ls/stat_flags.c,v 1.12. PR: 16885 Approved by: jkh Notes: svn path=/head/; revision=57389
* Change IPv6 scoped addr format again based on recent standard discussion.Yoshinobu Inoue2000-02-192-9/+6
| | | | | | | | | | | | Sorry for the flapping, but no change will be done for 4.0 anymore. Official standard will be published around April or later. If different format would be adopted at that time, then support for the new format will be added to the succeeding FreeBSD 4.x. Approved by: jkh Notes: svn path=/head/; revision=57340
* Fix null-pointer dereference crash when the system is intentionallyMatthew Dillon2000-02-161-1/+2
| | | | | | | | | | | | | | | | | | | run out of KVM through a mmap()/fork() bomb that allocates hundreds of thousands of vm_map_entry structures. Add panic to make null-pointer dereference crash a little more verbose. Add a new sysctl, vm.max_proc_mmap, which specifies the maximum number of mmap()'d spaces (discrete vm_map_entry's in the process). The value defaults to around 9000 for a 128MB machine. The test is scaled for the number of processes sharing a vmspace (aka linux threads). Setting the value to 0 disables the feature. PR: kern/16573 Approved by: jkh Notes: svn path=/head/; revision=57263
* Add man pages for the sem_*() functions.Jason Evans2000-02-166-0/+503
| | | | | | | Approved by: jkh Notes: svn path=/head/; revision=57260
* Fix coredump in gethostbyaddr() when the returned answer is too large toBill Fenner2000-02-161-0/+4
| | | | | | | | | | | | fit in the static buffer. This fix causes it to look like there is no data available, which is also wrong but is better than dumping core. PR: bin/10344 Reviewed by: billf Approved by: jkh Notes: svn path=/head/; revision=57252
* Replace `.Os BSD' which caused a troff error with `.Bx' which alsoChris Costello2000-02-141-1/+1
| | | | | | | happens to be the correct macro to use in this situation. Notes: svn path=/head/; revision=57194
* Document the support in the kernel for hardware debug registers on theDavid E. O'Brien2000-02-121-1/+20
| | | | | | | | | ix86 platform which allows for hardware watchpoints, etc... Submitted by: Brian Dean <brdean@unx.sas.com> Notes: svn path=/head/; revision=57168
* Add more dual stack consideration.Yoshinobu Inoue2000-02-101-1/+5
| | | | | | | | | | | -Should not error return when rresvport_af() failed for one of dest addrs resolved by getaddrinfo(). Should retry until all dest addr fail. Approved by: jkh Notes: svn path=/head/; revision=57123
* Let getaddrinfo() and related functions supports traditional IPv4 formatYoshinobu Inoue2000-02-102-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | (shortend format, etc) Current KAME getaddrinfo() supports only d.d.d.d format IPv4 addr. But traditionally inet_aton() and etc support other formats. (shortend format and octal/deciaml/hex format) Aboud this, -As far as the discussion on freebsd-current, many people think traditional format should also be supported by getaddrinfo(). -X/Open spec requires getaddrinfo() also support those traditional IPv4 format. -RFC2553 say nothing about it. -As the result of confirmation in ietf/ipng list, there is no clear concensus yet, and the reply was, "RFC2553 update and X/Open spec will be in sync" So takeing these conditions into account, I think getaddrinfo() should also support traditional IPv4 format. Specified by: Marc Schneiders <marc@oldserver.demon.nl> Approved by: jkh Notes: svn path=/head/; revision=57107
* Replace the existing documentation for ``KERN_QUANTUM'' with a moreChris Costello2000-02-101-4/+2
| | | | | | | descriptive (and generally more useful) explanation. Notes: svn path=/head/; revision=57102
* IPv6 scoped addr format is changed as recent KAME change.Yoshinobu Inoue2000-02-092-6/+16
| | | | | | | | | | | | | | | | | KAME scoped addr format is changed recently. before: addr@scope now: scope%addr Because the end of IPv6 numeric addr is tend to be truncated in `netstat -rn ` output, so placing scope part at starting of addr will be convenient. Approved by: jkh Obtained from: KAME project Notes: svn path=/head/; revision=57069
* There is a problem in that one cannot use ctype.h at the same time as partsDavid E. O'Brien2000-02-082-49/+145
| | | | | | | | | | | | | | | | | of the C++ stdlib. Our ctype.h uses symbols of the form _<X> to denote the various character classes. Our ctype.h also extends the usual ctype.h offering by adding the "_T" (special) class. Problem is parts of the STL also use the symbol "_T" as its parameterized type. These two uses are incompatible. Thus change the form of the symbols used in ctype to something that fixes the current problem and is less likely to cause conflicts in the future. Requested by: Tomoaki NISHIYAMA <tomoaki@biol.s.u-tokyo.ac.jp> Ok'ed by: JKH Notes: svn path=/head/; revision=57035
* Revert part of the last commit, remove {g|s}etflags from the libcJosef Karthauser2000-02-051-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | interface, and statically link them to the programs using them. These functions, upon reflection and discussion, are too generically named for a library interface with such specific functionality. Also the api that they use, whilst ok for private use, isn't good enough for a libc function. Additionally there were complications with the build/install-world process. It depends heavily upon xinstall, which got broken by the change in api, and caused bootstrap problems and general mayhem. There is work in progress to address future problems that may be caused by changes in install-chain tools, and better names for {g|s}etflags can be derived when some future program requires them. For now the code has been left in src/lib/libc/gen (it started off in src/bin/ls). It's important to provide library functions for manipulating file flag strings if we ever want this interface to be adopted outside of the source tree, but now isn't necessarily the right moment with 4.0-release just around the corner. Approved: jkh Notes: svn path=/head/; revision=57003
* sync iruserok() extension API with other BSDsYoshinobu Inoue2000-02-011-28/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of rcmd related function is need to be updated to support IPv6. Some of them are already updated as standard document. But there is also several de-facto functions and they are not listed in standard documents. They are, iruserok() (used by rlogind, rshd) ruserok() (used by kerberos, etc) KAME package updated those functions in original way. iruserok_af() ruserok_af() But recently there was discussion on IETF IPng mailing list about how to sync those API, and it is decided, -Those function is not standard and not documented. -But let BSDs sync their API as de-facto. And after some discussion, it is announced that -add update to iruserok() as iruserok_sa() -no ruserok() API change(it is only updated internaly) So I sync those API before 4.0 is released. The changes are, -prototype changes -ruserok() internal update (use iruserok_sa() inside) -removal of ruserok_af() -change iruserok_af() as static functioin, and also prefix the name with __. -add iruserok_sa() (Just call __iruserok_af() inside) -adding flag AI_ALL to getipnodebyaddr() called from __icheckhost(). This is necessary to support IPv4 communication via AF_INET6 socket could be correctly authenticated via iruserok_sa() -irusreok_af() call is replaced to iruserok_sa() call in rlogind, and rshd. Approved by: jkh Notes: svn path=/head/; revision=56939
* Merge from RELENG_3 (oops):Chris Costello2000-01-291-5/+5
| | | | | | | | resolved_name -> resolved_path resolvedname -> resolved_path Notes: svn path=/head/; revision=56880
* Undo the ill-conceived breakage of the previous commit and really fix:Jason Evans2000-01-293-26/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For libc_r renamed syscalls, correct symbol naming from _thread_sys_foo() <-- _foo() to _thread_sys_foo() <-- _foo() <-- foo(). This is necessary for system calls which libc_r doesn't define foo(). Some weak symbols such as poll() are defined twice. From what I understand, depending on one weak symbol or the other to be used is a bad idea. All such weak symbols defined in the libc_r-specific code should therefore be made strong (non-weak?). Simplify PSEUDO() to not define any weak symbols, since they aren't ever needed. alpha/SYS.h: Correct reversed usage of WEAK_ALIAS(), which has reversed arguments from __weak_reference(). Also, fix reversal of symbols, so that syscall foo() is a weak alias for _foo(). Add WEAK_ALIAS() call to PRSYSCALL(), which unlike the i386 version of PRSYSCALL(), is not defined in terms of PSYSCALL(). Make PSEUDO() equivalent to the i386 version. Notes: svn path=/head/; revision=56809
* Fix various typos and mdoc style issues.Mike Pritchard2000-01-2911-54/+100
| | | | | | | Reviewed by: rwatson Notes: svn path=/head/; revision=56791
* Grammar fix: ``Different than'' should really be ``different from''.Chris Costello2000-01-291-1/+1
| | | | Notes: svn path=/head/; revision=56783
* Revive the warning that dllockinit() is experimental and subject toJohn Polstra2000-01-291-1/+6
| | | | | | | change. Notes: svn path=/head/; revision=56781
* For syscalls that are renamed to _thread_sys_foo, create a weak aliasJason Evans2000-01-283-16/+16
| | | | | | | called _foo, not _thread_sys_foo. Notes: svn path=/head/; revision=56773
* Introduce ACL man pages en masse for library calls, and general introduction.Robert Watson2000-01-2813-7/+1262
| | | | | | | | | | Introduce ACL man pages en masse for library calls, and general introduction. Also, fix acl_valid.c non-portable calls to include _np in their names, making them standard-happy as well as consistent with acl.h Notes: svn path=/head/; revision=56760
* There were so far only 42 different conversion specifications inJoerg Wunsch2000-01-282-0/+22
| | | | | | | | | | | | strftime(3), add another one. :) %z yields the local timezone's offset in hours and minutes, as used in RFC822 headers. There's a precedence for this in Lunux' libc, and Internet software (like Perl scripts) start using it. OKed by (wrt. the code freeze): jkh Notes: svn path=/head/; revision=56756
* Install setflags.3 and its link to getflags.3.Bruce Evans2000-01-281-1/+3
| | | | Notes: svn path=/head/; revision=56726
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),Jason Evans2000-01-2770-274/+277
| | | | | | | | | | | | | | | | | | | | just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcoming libpthread), this is adequate. In the case of libc_r, we still need three names, which are now _thread_sys_foo() <-- _foo() <-- foo(). Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(), nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo(). Remove all internal libc usage of: creat(), pause(), sleep(), system(), tcdrain(), wait(), and waitpid(). Make thread cancellation fully POSIX-compliant. Suggested by: deischen Notes: svn path=/head/; revision=56698
* Historically file flags (schg, uschg, etc) have been converted fromJosef Karthauser2000-01-277-13/+247
| | | | | | | | | | | | | | | | | | | | string to u_long and back using two functions, flags_to_string and string_to_flags, which co-existed with 'ls'. As time has progressed more and more other tools have used these private functions to manipulate the file flags. Recently I moved these functions from /usr/src/bin/ls to libutil, but after some discussion with bde it's been decided that they really ought to go in libc. There are two already existing libc functions for manipulating file modes: setmode and getmode. In keeping with these flags_to_string has been renamed getflags and string_to_flags to setflags. The manual page could probably be improved upon ;) Notes: svn path=/head/; revision=56692
* o Back out rev 1.4 - reallocf() failure clobbers existing `environ'.Ruslan Ermilov2000-01-271-3/+8
| | | | | | | | | | | o Do not override `environ' if realloc() fails, leave it intact. o Set `alloced' only when memory is actually allocated. PR: bin/5604 (2nd part) Reviewed by: bde Notes: svn path=/head/; revision=56676
* Allow reverse lookup for loopback addr.Yoshinobu Inoue2000-01-271-1/+1
| | | | | | | | | This is merge from recent KAME fix to be more compliant with RFC2553. Obtained from: KAME project Notes: svn path=/head/; revision=56671
* Fixed wrong includes in synopsis.Bruce Evans2000-01-271-8/+11
| | | | | | | | | | | | | | Updated date. 1987 was a while ago. Removed trailing comma in NAME section. Uncapitalised Bindresvport and Bindresvport_sa in DESCRIPTION section. Don't use .Nm there either. Added bindresvport_sa() to the RETURN VALUES and ERROR sections. Notes: svn path=/head/; revision=56660
* Document the memory leak that is inherent in FreeBSD's semanticsArchie Cobbs2000-01-261-0/+15
| | | | | | | | | for getenv()/putenv(). PR: 10341 5604 Notes: svn path=/head/; revision=56652
* A few more touchups:Robert Watson2000-01-263-73/+94
| | | | | | | | | | | | - clean up unneeded AFS ID type - Add Coda, NTFS, NWFS ACL types - Add acl_dup() prototype - Remove acl_calc_mask, which belongs in the editing library - Introduce posix1e.3, a man page introducing POSIX.1e library calls (more man pages to follow) Notes: svn path=/head/; revision=56638
* Removed 3rd arg from bindresvport_sa() call, because the 3rd arg have beenYoshinobu Inoue2000-01-261-2/+1
| | | | | | | | | already removed. Specified by: Philipp Mergenthaler <un1i@rz.uni-karlsruhe.de> Notes: svn path=/head/; revision=56636
* bindresvport related changesYoshinobu Inoue2000-01-264-75/+138
| | | | | | | | | | | | | -changed bindresvport2 to bindresvport_sa -merged the man into bindresvport.3 All discussion between Jean-Luc Richier <Jean-Luc.Richier@imag.fr>, Theo de Raadt <deraadt@cvs.openbsd.org>, itojun, is reflected to this code. (Actually Theo de Raadt write the code simultaneously as the discussion change.) Notes: svn path=/head/; revision=56629
* Fix getaddrinfo() behaviour to be more compliant with RFC2553. Patches areYoshinobu Inoue2000-01-261-116/+17
| | | | | | | | | | | | | | | obtained from itojun. -don't filter address families which are not supported by system at FQDN resolving. -don't do reverse lookup I think I checked all lib and tools which use getaddrinfo() if this change affect them. Obtained from: KAME project Notes: svn path=/head/; revision=56627
* Minor fixes to library interface to improve POSIX.1e compliance. ThisRobert Watson2000-01-269-78/+65
| | | | | | | | | | | | | adds _np to a couple of function prototypes that provided more broad/useful interfaces than POSIX.1e interfaces included. Also, move from using a heuristic to identify POSIX.1e-semantic ACLs to using different ACL types for non-POSIX.1e ACLs. This should clean up the existing fuzzy logic that determined when acl_sort() should be applied before kernel submission. Notes: svn path=/head/; revision=56625
* several tcp apps IPv6 updateYoshinobu Inoue2000-01-253-5/+33
| | | | | | | | | | | | | | | -inetd -rshd -rlogind -telnetd -rsh -rlogin Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project Notes: svn path=/head/; revision=56590
* Improve the explanation on the (in)security of mktemp(3).Sheldon Hearn2000-01-251-3/+6
| | | | Notes: svn path=/head/; revision=56589
* We _do_ support MS_ASYNCGuido van Rooij2000-01-241-1/+1
| | | | | | | Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Notes: svn path=/head/; revision=56542
* Clarify that we don't offer hard realtime.Alfred Perlstein2000-01-241-3/+8
| | | | | | | Split timeval options into 3 paragraphs, it's easier on my eyes. Notes: svn path=/head/; revision=56501
* Remove unnecessary alternate entry points for *setjmp(). Make the mainJason Evans2000-01-209-48/+69
| | | | | | | | | | entry point the standard name when not compiling libc_r (for example, longjmp is the main entry point instead of __longjmp). Suggested by: bde Notes: svn path=/head/; revision=56345
* Move ENTRY and ALTENTRY definitions to asm.h where they belong.Jason Evans2000-01-201-23/+0
| | | | | | | | | Unbreak profiling. Again. Submitted by: bde Notes: svn path=/head/; revision=56309
* Although it should be obvious that the 3-digit numeric values of theSheldon Hearn2000-01-1912-12/+23
| | | | | | | | characters shown are octal, state this explicitly for the easily misled. Notes: svn path=/head/; revision=56288