summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* kill the undeadPeter Wemm1997-07-1345-4578/+0
| | | | Notes: svn path=/head/; revision=27369
* Fixed quoting of backslash.Bruce Evans1997-07-131-1/+1
| | | | Notes: svn path=/head/; revision=27355
* Add a quick description of sysctlbyname() and link sysctl.3 toPeter Wemm1997-07-122-2/+13
| | | | | | | sysctlbyname.3 Notes: svn path=/head/; revision=27344
* Have sysctlbyname() take a const first arg (the ascii string)Peter Wemm1997-07-121-3/+5
| | | | Notes: svn path=/head/; revision=27343
* execve of interpreter filesAdam David1997-07-081-2/+2
| | | | | | | reword for grammar/clarity Notes: svn path=/head/; revision=27280
* Rework previous commit.. I was confused by the number of diffs in the PRPeter Wemm1997-07-061-8/+29
| | | | | | | | | | | | | | | | | | | | and forgot what I was trying to do originally and accidently zapped a feature. :-] The problem is that we are converting a counted buffer in a malloc pool into a null terminated C-style string. I was calling realloc originally to shrink the buffer to the desired size. If realloc failed, we still returned the valid buffer - the only thing wrong was it was a tad too large. The previous commit disabled this. This commit now handles the three cases.. 1: the buffer is exactly right for the null byte to terminate the string (we don't call realloc). 2: it's got h.left = 0, so we must expand it to make room. If realloc fails here, it's fatal. 3: if there's too much room, we realloc to shrink it - a failed realloc is not fatal, we use the original buffer which is still valid. Notes: svn path=/head/; revision=27248
* Fix off-by-one errorPeter Wemm1997-07-061-4/+6
| | | | | | | | PR: 3451 Submitted by: Tim Vanderhoek <ac199@hwcn.org> Notes: svn path=/head/; revision=27245
* This commit was generated by cvs2svn to compensate for changes in r27180,Bruce Evans1997-07-0345-0/+4578
|\ | | | | | | | | | | | | which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=27181
| * Import Lite2's src/lib, except for non-i386 machine-dependent directories,Bruce Evans1997-07-0352-0/+7051
| | | | | | | | | | | | | | | | libc/db, libc/gen/crypt.* and libtelnet. All affected files except 3 unimportant ones have already left the vendor branch. Notes: svn path=/vendor/CSRG/dist/; revision=27180
* | Have another go at the malloc-sysv initialization.Poul-Henning Kamp1997-07-021-12/+11
| | | | | | | | | | | | | | | | PR: 4002 Pointed out by: bde Notes: svn path=/head/; revision=27179
* | malloc_sysv used before initialized, reported in PR4002 byPoul-Henning Kamp1997-07-014-40/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru> Various cleanup from Keith Bostic Reinstate calloc() as a separate funtion, in its own source/object file. leave the manpage integrated with malloc.3 and friends. Too many things were broken in this respect. PR: 4002 Reviewed by: phk Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru> Submitted by: Keith Bostic <bostic@bostic.com> Notes: svn path=/head/; revision=27152
* | Add 64 bit int support to scanf()Jordan K. Hubbard1997-07-012-14/+32
| | | | | | | | | | | | | | | | PR: 2080 Submitted by: David Dawes <dawes@rf900.physics.usyd.edu.au> Notes: svn path=/head/; revision=27151
* | _err() -> err().Jordan K. Hubbard1997-06-291-3/+3
| | | | | | | | Notes: svn path=/head/; revision=27039
* | replace the OpenBSD fd_set sizing code with something more efficient.Peter Wemm1997-06-281-9/+16
| | | | | | | | | | | | | | | | | | | | Only call malloc() if the fd is too big for the compiled in fd_set size, and don't use calloc either. This should reduce the impact of conflicts with private malloc implementations etc. When using the fd_set on the stack, only zero what is needed rather than all 1024 bits like FD_ZERO did. Notes: svn path=/head/; revision=27016
* | Dynamically size fd_set in select rather than fail if too many filesPeter Wemm1997-06-271-8/+9
| | | | | | | | | | | | | | | | are open. Obtained from: OpenBSD; by deraadt and dm Notes: svn path=/head/; revision=26983
* | compensate for res_send <-> __res_send changesPeter Wemm1997-06-271-2/+4
| | | | | | | | Notes: svn path=/head/; revision=26976
* | Merge in bind-4.9.6 resolver changes. Note that they resolve thePeter Wemm1997-06-2710-69/+97
| | | | | | | | | | | | | | overflow problem differently. Notes: svn path=/head/; revision=26974
* | Add stringlist functions from NetBSD. (required for the new ftp(1)Mike Smith1997-06-253-5/+246
| | | | | | | | | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=26925
* | Add tickadj to struct clockinfo, like NetBSD and OpenBSD.John Hay1997-06-241-1/+1
| | | | | | | | Notes: svn path=/head/; revision=26898
* | Show the real revision date and not the date that thisSteve Price1997-06-2323-24/+24
| | | | | | | | | | | | | | manpage is being viewed. Notes: svn path=/head/; revision=26826
* | Integrate calloc with the rest of the gang.Poul-Henning Kamp1997-06-225-478/+390
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Various portability and stylistic cleanups. Kill MALLOC_STATS & the 'D' option. Fix the 'V' option. Major overhaul of the man-page. You milage should not vary. Reviewed by: Keith Bostic <bostic@bostic.com> Submitted by: Keith Bostic <bostic@bostic.com> Notes: svn path=/head/; revision=26816
* | Hm... wonder how long this has been here.Bill Paul1997-06-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic in get_myaddress() is broken: it always returns the loopback address due to the following rule: if ((ifreq.ifr_flags & IFF_UP) && ifr->ifr_addr.sa_family == AF_INET && (loopback == 1 && (ifreq.ifr_flags & IFF_LOOPBACK))) { The idea is that we want to select the interface address only if it's up and it's in the AF_INET family. If it turns uout we don't have such an interface available, we make a second pass through the loop, this time settling for the loopback interface. But the logic inadvertently locks out all cases when loopback == 0, so nothing is ever selected until the second pass (when loopback == 1). This is changed to: if (((ifreq.ifr_flags & IFF_UP) && ifr->ifr_addr.sa_family == AF_INET) || (loopback == 1 && (ifreq.ifr_flags & IFF_LOOPBACK))) { which I think does the right thing. This is yet another bogon I discovered during NIS+ testing; I need get_myaddress() to work correctly so that the callback code in the client library will work. Notes: svn path=/head/; revision=26752
* | Typo.Philippe Charnier1997-06-181-2/+3
| | | | | | | | Notes: svn path=/head/; revision=26721
* | Remember to zero sockaddr_in struct before calling uaddr_to_sockaddr() toBill Paul1997-06-151-0/+1
| | | | | | | | | | | | | | | | populate it. Not doing this can result in a garbage sockaddr_in, which will cause connect() to block inside clnttcp_create(). Notes: svn path=/head/; revision=26666
* | srandomdev: use stack junk value in the fallback code tooAndrey A. Chernov1997-06-151-2/+3
| | | | | | | | Notes: svn path=/head/; revision=26665
* | Change u_char which require special include to unsigned charAndrey A. Chernov1997-06-141-1/+1
| | | | | | | | Notes: svn path=/head/; revision=26629
* | Add arc4random() functions from OpenBSD. They are almost same as ourAndrey A. Chernov1997-06-143-5/+261
| | | | | | | | | | | | | | | | | | | | srandomdev(), but can be used inside libraries. random() can't be used inside libraries because it breaks its possible predictable sequence. arc4random() is true random as designed, so its usage is library-safe. Obtained from: OpenBSD Notes: svn path=/head/; revision=26628
* | Instead of copying fallback code over and over in each program,Andrey A. Chernov1997-06-142-15/+17
| | | | | | | | | | | | | | | | | | implement (better) falback code inside srandomdev() itself. Change return type from int to void (binary compatibility surprisely achieved). Userland code will be changed soon. Notes: svn path=/head/; revision=26624
* | Add MAXHOSTNAMELEN checkAndrey A. Chernov1997-06-131-1/+3
| | | | | | | | | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=26616
* | getnetid() crashes if no /etc/netid file is present (it tries to fclose()Bill Paul1997-06-121-1/+2
| | | | | | | | | | | | | | a FILE * handle that wasn't really open). Notes: svn path=/head/; revision=26583
* | Add yet an option, this time on how to deal with malloc(0) and realloc(ptr.0)Poul-Henning Kamp1997-06-122-8/+27
| | | | | | | | | | | | | | Prompted by: X11 & XFree86 Notes: svn path=/head/; revision=26579
* | Style optimization in newly added POSIX range []] conformance, redoAndrey A. Chernov1997-06-071-6/+6
| | | | | | | | | | | | | | 'for' loop as do...while and remove variable unneded now Notes: svn path=/head/; revision=26492
* | Add missing FNM_PERIOD check for '[' rangeAndrey A. Chernov1997-06-061-4/+10
| | | | | | | | | | | | | | | | Don't treat !^ as first characters in the range, just as negate sign [/] never match if FNM_PATHNAME Notes: svn path=/head/; revision=26486
* | 1) Now conforms POSIX.2 2.8.3.2 requirements about []] patternAndrey A. Chernov1997-06-061-11/+35
| | | | | | | | | | | | | | 2) Treat unclosed [ range in pattern as regular characters (bash style) Notes: svn path=/head/; revision=26484
* | Fix mutex initialization.John Birrell1997-06-041-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Malloc cannot use pthread_mutex_init() to initialize a mutex because the mutex initialization process does a malloc! libc_r internals skip the malloc and assign an initializer to a static structure and point the opaque type (pthread_mutex_t in this case) to that structure. This is done on the assumption that the mutex will never be destroyed. This style of initialization is only valid inside libc_r because the structure that is assigned is opaque to the user. This fix allows a simple program to get to main() again. 8-) Notes: svn path=/head/; revision=26444
* | Re-activate the nanosleep style using code, but with the signal handlingPeter Wemm1997-06-022-110/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | semantics of the old sleep for compatability with a few decades of expected side effects. Apache breaks if we just use nanosleep() for some reason, here we use a new signanosleep() syscall which is kinda like a hybrid of sigsuspend and nanosleep.. Reviewed by: ache (and tested on his apache that was failing when sleep used plain nanosleep) Notes: svn path=/head/; revision=26385
* | Submitted by: Whistle Communications (archie Cobbs)Julian Elischer1997-06-024-5/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These changes add the ability to specify that a UFS file/directory cannot be unlinked. This is basically a scaled back version of the IMMUTABLE flag. The reason is to allow an administrator to create a directory hierarchy that a group of users can arbitrarily add/delete files from, but that the hierarchy itself is safe from removal by them. If the NOUNLINK definition is set to 0 then this results in no change to what happens normally. (and results in identical binary (in the kernel)). It can be proven that if this bit is never set by the admin, no new behaviour is introduced.. Several "good idea" comments from reviewers plus one grumble about creeping featurism. This code is in production in 2.2 based systems Notes: svn path=/head/; revision=26360
* | Add xref to signanosleep(2)Peter Wemm1997-06-011-0/+1
| | | | | | | | Notes: svn path=/head/; revision=26340
* | Doc signanosleep, add to linksPeter Wemm1997-06-012-4/+28
| | | | | | | | Notes: svn path=/head/; revision=26339
* | Update the sleep(3)/usleep(3) code to use signanosleep(2) if compiled withPeter Wemm1997-06-012-17/+117
| | | | | | | | | | | | | | | | | | | | -DUSE_NANOSLEEP. Also, seperate the code for _THREAD_SAFE so that it uses the simpler threaded nanosleep() call in libc_r.. We don't go to the same extremes for emulating traditional sleep semantics (ie: eating any SIGALRM that might happen) which things like apache seem to depend on. Notes: svn path=/head/; revision=26338
* | Generate signanosleep(2) syscall wrapperPeter Wemm1997-06-011-2/+3
| | | | | | | | Notes: svn path=/head/; revision=26337
* | sysctlbyname allows acces to sysctl variables by name.Poul-Henning Kamp1997-05-302-2/+35
| | | | | | | | | | | | | | | | | | | | The manpage has been sent to linquistic decontamination and will arrive when released from the quarantine Reviewed by: peter Notes: svn path=/head/; revision=26285
* | Malloc flag X makes malloc behave like the canonical xmalloc() wrapper.Poul-Henning Kamp1997-05-302-19/+69
| | | | | | | | | | | | | | | | | | | | Untested support for Solaris from John-Mark Gurney Reviewed by: phk Submitted by: (partially) John-Mark Gurney <gurney_j@resnet.uoregon.edu> Notes: svn path=/head/; revision=26284
* | Fix other small things that got lost in the merge:Bill Paul1997-05-282-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | - bde's change to includes section in getrpcent.3 - Lost comment in svc_run.c (the code here was actually the same since I had fixed the 'fds + 1' bug in my stuff at home before mailing Peter about it, but I didn't notce that he'd made a change to the comment right above the changed line). Also pointed out by the ever vigilant: bde Notes: svn path=/head/; revision=26250
* | Restore Id.Bill Paul1997-05-281-0/+1
| | | | | | | | | | | | | | Pointed out by: bde Notes: svn path=/head/; revision=26249
* | Resolve conflicts.Bill Paul1997-05-2833-84/+425
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This concludes tonight's entertainment. Once I'm sure I haven't destroyed the world with all these changes, I'll import the utilities. Everything should continue to work as before. If it doesn't let me know. Special thanks to Mark Murray for running a test 'make world' for me to shake out the bugs, which, hopefully, I have fixed. (And there was much rejoicing.) Notes: svn path=/head/; revision=26221
* | This commit was generated by cvs2svn to compensate for changes in r26219,Bill Paul1997-05-2820-0/+4989
|\ \ | | | | | | | | | | | | | | | | | | which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=26220
| * | Now the biggest step: import the changes to the main RPC code.Bill Paul1997-05-2859-968/+6508
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: you'll need to rinstalkl all your includes before compiling libc the next time you update your sources in order for all this to work. Reviewed by: Mark Murray Notes: svn path=/cvs2svn/branches/WPAUL/dist/; revision=26219
* | | Resolve conflicts.Bill Paul1997-05-289-11/+10
| | | | | | | | | | | | Notes: svn path=/head/; revision=26218
* | | This commit was generated by cvs2svn to compensate for changes in r26216,Bill Paul1997-05-281-0/+163
|\| | | | | | | | | | | | | | | | | | | | which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=26217