Commit Graph

8453 Commits

Author SHA1 Message Date
pooka
08fc937c06 make sysctl(8) work as a rump client 2010-11-05 15:55:23 +00:00
christos
ee29967bad scrub the whole array, not just the first n malloced entries. 2010-11-04 21:49:45 +00:00
plunky
5cf5f72e75 this page title is CDBW 2010-11-03 16:17:48 +00:00
christos
3954ad831d Handle the case where a program attempted to cleanup the environment by
setting *environ = NULL;
2010-11-03 15:01:07 +00:00
skrll
162991256a Spell immediately correctly. 2010-11-02 20:49:47 +00:00
enami
b447d18264 - Simplify the code
- Reword the comment.
2010-11-02 03:44:05 +00:00
enami
ee9d44a7c1 Double the array only when really necessary. Otherwise memory will be
exhausted if user modifies the variable envrion itself repeatedly..
2010-11-01 02:41:27 +00:00
wiz
51a05c8628 Fix a typo and remove trailing whitespace. 2010-10-27 19:18:00 +00:00
christos
de19ef9132 markup improvements, document ctype_r, time_t is not a "long integer" 2010-10-27 19:16:04 +00:00
wiz
83306973da Improve wording after consultation with njoly. 2010-10-26 22:34:33 +00:00
njoly
5d63576039 Make putenv(3) fails with EINVAL for a null pointer, or for a string
that either miss or start with a `=' character.

Adjust man page and testcase accordingly.
2010-10-25 20:35:36 +00:00
wiz
ecad7beb9c Bump date. 2010-10-25 07:37:11 +00:00
dholland
6d14a316d9 Mention err/warn. Note that they're generally preferred to perror().
Might want to strengthen the wording.
2010-10-24 23:10:51 +00:00
tron
1dc4fb4ea1 Double the size of the allocate environment vector when we resize it.
This should speed up extending the environment via setenv(3).
2010-10-24 17:53:27 +00:00
tron
410614d6b3 Replace _FPOS_OVERFLOW() macro with a static inline function called
__fpos_overflow() that doesn't cause any lint warnings.
2010-10-24 17:44:32 +00:00
christos
3dbfe3dd7e tell lint to shut up. 2010-10-23 14:12:50 +00:00
christos
13fa4dc134 not that it can happen, but make the test more robust. 2010-10-22 22:00:32 +00:00
christos
ec053f73a0 implement EOVERFLOW 2010-10-22 21:29:45 +00:00
christos
603e33ef32 Fix return value documentation. Add EOVERFLOW for ftell, but not for fseek. 2010-10-22 21:29:31 +00:00
njoly
4c968434a3 Make setenv(3) follow the standard, by rejecting invalid strings. It
now fails with EINVAL errno when variable is NULL, empty or contains
an `=' character; or value is NULL.

Adjust the man page accordingly, and exercize them in the existing
environment testcase.
2010-10-16 11:23:41 +00:00
skrll
e6cdac9c4b Implement dl_iterate_phdr.
Somewhat taken from FreeBSD. Manual page from OpenBSD.
2010-10-16 10:27:06 +00:00
enami
3cef3e6eba The was is not an argument but simply a part of sentense. 2010-10-07 00:14:14 +00:00
enami
4a94dc0b8f Avoid unnecessary malloc(). Since __findenv() kindly treats
equal sign as an end of string, we can pass the string of
form "key=value" to lookup "key".
2010-10-05 02:23:38 +00:00
tron
ae557324e5 Restore binary compatibility with applications which use putenv(3)
on constant strings (e.g. postdrop(1)):
- Don't write to the environment string passed to putenv(3).
- Don't overwrite the value of an existing environment string
  unless the memory was actually allocated by setenv(3).
2010-10-02 16:56:03 +00:00
tron
c3bcf19cf7 Make sure that all extra elements of the environment vector are set
to NULL. This stop su(1) from crashing.
2010-10-02 10:51:07 +00:00
tron
12c10b36d2 Remember that we didn't malloc() memory for an environment variable
if it has been set via putenv(3).
2010-10-02 10:05:55 +00:00
wiz
732dd678dd Fix a typo, remove trailing whitespace. 2010-10-01 20:57:50 +00:00
christos
7acc3301d8 make putenv POSIX compliant. 2010-10-01 20:11:32 +00:00
tron
2445ce72d2 Be slightly more careful about freeing memory allocated for environment
variables: only free memory if the current value points to the same
memory area as the allocated block. This will prevent crashes if an
application changes the order of the environment array.

Unfortunately this is still not enough to stop zsh 4.2.* from crashing.
zsh 4.3.* works fine before and after this change.
2010-09-30 12:41:33 +00:00
enami
be59ef257e If new length is exactly equals to the current length,
there is nothing to do.
2010-09-29 00:44:04 +00:00
enami
248290ef3a Don't put space before close paren. 2010-09-29 00:40:17 +00:00
enami
abfd061908 Add missing period at the end of sentense. 2010-09-28 00:39:56 +00:00
tnozaki
9ef74dfbcf validate flags/oflags from __sflag() befere call __sfp().
reviewed by enami-san, thanks.
2010-09-27 17:08:29 +00:00
tnozaki
6d102a3218 fix off-by-one, pointed out by enami-san, thanks! 2010-09-27 16:50:13 +00:00
yamt
ab5972b02c fix rewinddir on nfs. fix PR/42879 (and probably PR/40229.) 2010-09-26 02:26:59 +00:00
christos
0588f13b3b be more conservative about allocing. 2010-09-25 19:31:51 +00:00
tron
ed5e497e60 Remember the correct pointer which we will free later. 2010-09-25 19:10:37 +00:00
tron
1f5de17d4a Unlock the environment lock if __alocenv() fails. 2010-09-25 18:37:24 +00:00
tron
5cdca2e600 Remember memory used by allocated environment variables instead of
using a bitmap. This deals with the case where a variable is first
set via setenv(3) or putenv(3), then overwritten by changing
"environ" directory and afterwards overwritten with setenv(3) again.

This stops "zsh" from crashing under NetBSD-current.

Code reviewed by Christos Zoulas.
2010-09-25 18:11:40 +00:00
tron
ac440cccfd Change last commit to Use "ptrdiff_t" instead of "intptr_t" because the
former is more appropriate in this case.
2010-09-25 14:00:30 +00:00
tron
abf0c843b2 Add explicit cast to fix lint error on 32bit platforms. 2010-09-25 13:45:11 +00:00
wiz
14087bca56 Remove trailing whitespace, merge error sections for same error, nits. 2010-09-25 09:44:08 +00:00
uwe
46b35128cb Make groff happy. 2010-09-25 01:19:39 +00:00
christos
97fddff649 add man page as promised. 2010-09-24 21:50:56 +00:00
matt
3edad85883 If not using O32 on mips, we need to read ELF64 symbols too. 2010-09-24 15:57:15 +00:00
christos
da3a4052e4 protect the __allocenv call with the mutex; from Enami 2010-09-24 14:34:44 +00:00
christos
f6033a77ae Fix memory leaks; thanks Enami! 2010-09-24 14:31:15 +00:00
tnozaki
93b7363c93 add fmemopen(3) derrived from POSIX:2008.
libc minor bump.
2010-09-24 09:21:53 +00:00
christos
7db74b9a82 Use a bit array to keep track of malloced environment entries so we can
free them.
2010-09-23 17:30:49 +00:00
christos
e957123b85 PR/43899: Nicolas Joly: setenv(3)/unsetenv(3) memory leak.
Partial fix: Don't allocate a new string if the length is equal to the
old length, because presumably the old string was also nul terminated
so it has the extra byte needed.
The real fix is to keep an adjunct array of bits, one for each environment
variable and keep track if the entry was allocated or not so that we can
free it in unsetenv.
2010-09-23 16:02:41 +00:00
njoly
abdcf63ade Add empty line in ERRORS section. 2010-09-23 12:49:31 +00:00
wiz
98890d79a7 Bump date for O_DIRECTORY, more markup, merge two error sections. 2010-09-22 17:58:09 +00:00
chs
38b9dc3505 implement O_DIRECTORY as standardized in POSIX-2008,
for both native and linux emulations.
this fixes the rest of PR 43695.
2010-09-21 19:26:18 +00:00
yamt
53cf9ce3be - remove a wrong _DIAGASSERT
- update comments
- whitespace
2010-09-16 02:38:50 +00:00
matt
8e09c95f97 Resurrect this for MIPS softfloat. 2010-09-10 16:32:35 +00:00
drochner
927f8fc1e3 apply an 11 years old fix from FreeBSD:
if EBADF is returned due to a read from a write-only stream, also
set ferror()
found by a selftest of Python-2.6.6, thanks to obache for pointing
out the details
2010-09-10 10:29:23 +00:00
skrll
2a4732aadc Only do the __libc_init hack in libc, i.e. remove it from ld.elf_so.
This fixes hppa ld.elf_so by reducing the number of PLABELs required to
the number before the hack was applied.

Hi Joerg!
2010-09-09 10:19:31 +00:00
wiz
f1ecb8cf31 O_NOFOLLOW is not a non-standard extension any longer (2, 6 years? who counts). 2010-09-06 19:48:38 +00:00
wiz
c70635ec83 I assume "POSIX 200805" is IEEE Std 1003.1-2008 (POSIX.1), so use
appropriate .St.
2010-09-06 19:47:37 +00:00
jakllsch
a34ac1b5ed New vdprintf needs "namespace protection". 2010-09-06 17:49:56 +00:00
wiz
4dd873e1cd Note a difference to IEEE Std 2003.1-2008. Bump date. 2010-09-06 15:22:09 +00:00
christos
4ddc2fb37c add dprintf and vdprintf 2010-09-06 14:52:55 +00:00
christos
7d79ab9567 Add GLOB_STAR support from Greg Dionne. 2010-09-06 14:40:24 +00:00
wiz
d9898a950b Explain how O_NOFOLLOW may cause EFTYPE. From joerg.
While here, sort errors. Bump date.
2010-09-05 22:44:15 +00:00
ahoka
82e82fca50 Add libc glue for libtre.
tre will be compiled without approx and wchar/mulibyte support to
only match the minimum requirement to replace our spencer regex.

This needs a lot of testing.

Only enabled when USE_LIBTRE is set to `yes'.
2010-09-04 12:17:58 +00:00
matt
015f9bbf7a Pullup fixes from matt-nb5-mips64.
This makes setjmp/longjmp work again.
2010-09-03 17:22:51 +00:00
christos
33434557c9 dprintf is claimed by posix. 2010-08-29 15:40:35 +00:00
joerg
c1e0a5bd50 Replace the current usage of Elf64_Half with Elf64_Word and rename
NetBSD specific Elf64_Quarter to Elf64_Half. This restores compatibility
with the common ELF specifications.
2010-08-28 21:30:02 +00:00
christos
3991ffd1e1 add psiginfo. 2010-08-27 08:38:41 +00:00
pgoyette
a3f95ef31a Add a couple more possible return values. 2010-08-18 01:55:32 +00:00
christos
eaa5239efc weakasm for kevent so it can be a cancelation point. 2010-08-06 05:26:35 +00:00
tnozaki
9731566dda initialize fake FILE, not fp. 2010-07-31 08:47:34 +00:00
christos
e408681794 undo unrelated diff. 2010-07-31 07:58:22 +00:00
tnozaki
8c1984cdde fix coredump vfwprintf(stderr) reported in current-user@
rework rev1.9, _FILEEXT_SETUP() doesn't care wcio_data. so initialize it.
2010-07-31 07:24:52 +00:00
joerg
44b309378f Define a new __c99inline macro for compilers known to implement the C99
behavior.  This unbreaks GCC 4.4's libgfortran build with the old
signal.h logic, because GCC decided to put the body for the sigsetop
functions in multiple objects.
2010-07-31 00:04:42 +00:00
njoly
29a656f391 Improve _PC_NO_TRUNC description. From Matthew Mondor on
current-users@.
2010-07-26 12:30:16 +00:00
wiz
591b4ec0ca Bump date for _PC_NO_TRUNC description fix. 2010-07-22 19:28:25 +00:00
njoly
dcf57cdbc8 Fix wrong value (1 -> 0) in _PC_NO_TRUNC description. 2010-07-22 18:20:21 +00:00
tron
98e3b3e4ec Explicitly cast argument of ffs(3) to fix lint error. 2010-07-08 20:12:37 +00:00
rmind
cb0faac14c svc_getreq[set]: use unsigned when assigning to fds_bits.
XXX: This code should not invade fd_set internals at all.
2010-07-08 14:45:08 +00:00
christos
2c086933d8 Apply more limits to GLOB_LIMIT, number of stat(2) calls from me and number
of readdir(3) calls from Maksymilian Arciemowicz. Also reduce the memory
used by matches strings from Maksymilian Arciemowicz.
2010-07-06 14:59:22 +00:00
mrg
0b9686b0cc these were only relevant for a.out builds; time to sleep forever... 2010-07-06 06:04:58 +00:00
mrg
4c92852a80 remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format.  ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k.  this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
  down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
2010-07-06 05:59:50 +00:00
christos
6540fba480 consistency with c source 2010-07-05 00:45:19 +00:00
christos
9b94acc7a6 Avoid DoS attacks for patterns that have braces. Noted by Maksymilian
Arciemowicz.
XXX: Pullup to 5.x
2010-07-02 21:13:10 +00:00
jruoho
c8bb322856 Use .Fn instead of .Fa for functions. Also rearrange slightly. 2010-06-30 13:38:10 +00:00
seanb
10f798a007 - remove extra len check as per discussion on tech-net. 2010-06-29 14:44:19 +00:00
joerg
e883e926df Ensure that initfini.c is referenced by exit.c. The start up code has to
reference the latter as a return of main() results in a call to exit(3),
so this ensures that the libc constructors are run for statically linked
programs. Fixes PR 37454.
2010-06-28 21:58:02 +00:00
tnozaki
51c2514072 fix cross build breakage mklocale(1).
move inline finction that uses sys/ctype_bits.h to runetype_misc.h.
2010-06-20 02:23:15 +00:00
tnozaki
197b699328 null terminate 2010-06-19 14:48:16 +00:00
tnozaki
3cc4120729 1. refactoring new locale-db(RuneCT10) loading method with mmap(2).
2. remove unused field from _RuneLocale.
3. localeio(CITRUS=no) can read new locale-db(RuneCT10) now.
2010-06-19 13:26:51 +00:00
tnozaki
2a7af30c36 1. split runetype_local.h -> runetype_file.h
and remove renameing _Rune* -> _NBRune* namespace protection.

   FreeBSD traditionaly exposes struct _Rune* in runetype.h
   which included by ctype.h. it may cause conflicting type error
   in our cross build process, former we use renaming namespace
   to avoid this problem, now i reworked more resonable way.

2. merge rune_local.h to runetype_local.h, and remove it.
3. split bsdctype.h -> bsdctype_{file,local}.h
2010-06-13 04:14:56 +00:00
tnozaki
4935b908f2 s/_CTYPE_NUM_CHARS/_CTYPE_CACHE_SIZE/ 2010-06-12 18:02:31 +00:00
tnozaki
fd847aaa33 stop to renaming _CTYPE_* -> _RUNETYPE_*. 2010-06-12 05:54:05 +00:00
tnozaki
9efec5bce3 1. MB_LEN_MAX switch MD to MI.
2. unfortunately hppa's MB_LEN_MAX is defined incorrectly 6 instead of 32
   so we have to add more setlocale(3) __RENAME func, __setlocale50.
3. move setlocale1.c and setlocale32.c to lib/libc/compat/locale/*
   prepareing for next libc major crunk.
4. bump libc minor version.
2010-06-07 13:52:28 +00:00
tnozaki
0ab294f640 remove unused magic. 2010-06-05 16:37:13 +00:00
jruoho
bb1d0e97b1 Fix .Xr; dirent(5) -> dirent(3). 2010-06-04 05:42:24 +00:00
veego
51cdef0f36 Use MAP_FILE|MAP_SHARED instead of MAP_FILE for the flags parameter of mmap(2).
Patch is from martin.

Solves my own PR kern/43346
2010-06-03 12:40:52 +00:00
tnozaki
a07e73ee74 uint8_t -> unsigned char, int16_t -> short. 2010-06-02 16:04:52 +00:00
tnozaki
bf280d2720 remove duplicated towctrans internal function. 2010-06-02 15:47:25 +00:00
tnozaki
d8217122b9 refactoring old locale-db(BSDCTYPE) loading method with mmap(2). 2010-06-01 18:00:28 +00:00
tnozaki
9a35d7972b more split ctype.h -> sys/ctype_inline.h, sys/ctype_bits.h 2010-06-01 13:52:07 +00:00
njoly
7d9c448d51 Consistently use `.Brq Dv XXX' across syscalls man pages, for NAME_MAX
and PATH_MAX.
2010-05-31 12:16:20 +00:00
drochner
5170f0046a another POSIX compliance fix: sigwait(3) should not use errno but
return the error code directly
2010-05-31 11:02:24 +00:00
drochner
690a7f09c9 -fix internal use of sigwaitinfo(2) by sigwait(3): The former returns
the signal number now, as required by POSIX. The latter should just
 return 0 on success. Fixes a mysql problem reported by Kurt Schreiner.
-document the new behavior of sigwaitinfo and sigtimedwait
-retain non-POSIX behavior for NetBSD-5 binary compatibility -- the fix
 would likely not be polled into the .0-branches, and having 5.0.x and
 5.x behave differently would be confusing. Besides that, it was
 documented in the manpage all the time.
2010-05-30 19:31:39 +00:00
tnozaki
cdd31057f2 remove redundant guard. 2010-05-30 11:36:12 +00:00
tnozaki
cd71bcf609 1. fix build problem CITRUS=no
2. make CITRUS={yes,no} knob friendly with libc/compat.
2010-05-30 08:28:53 +00:00
wiz
82776533ea New sentence, new line. 2010-05-30 07:57:08 +00:00
dholland
2264536172 Note briefly how to avoid the problem where 0 can be a valid successful
return as well as an error. Suggested by Robert Elz in follow up to PR 39392.
2010-05-29 20:32:18 +00:00
tnozaki
04cc7786fc rework bulid breakage problem on linux.
ldef.h: s/1<<8/_CTYPE_CACHE_SIZE/
ctype_local.h: use limits.h instead of machine/limits.h
runetype_local.h: don't use HAVE_NBTOOL_CONFIG as evil way.
2010-05-22 18:15:21 +00:00
tnozaki
99f737b9cb fix cross build breakage under linux box, reported by Andreas Gustafsson, thanks!
runetype_local.h: don't include ctype_local.h when toolchain build.
2010-05-22 17:47:25 +00:00
tnozaki
b18f206e58 move __mb_len_max_runtime from rune_local.h -> setlocale_local.h. 2010-05-22 13:50:02 +00:00
tnozaki
bbed57c2e0 make _locale_impl_t.cache as pointer to maintain easily binary compatibility in future.
no ABI change was made.
2010-05-22 13:15:59 +00:00
tnozaki
32cc8c2e5f rune.h is not public, so merge with rune_local.h. 2010-05-22 08:13:18 +00:00
tnozaki
9763c57c60 rune.h is not public, so merge with rune_local.h 2010-05-22 07:18:43 +00:00
tnozaki
64a7d4fa9a 1. hide _CTYPE_PRIVATE section in ctype.h, move them to private header ctype_local.h.
2. do not use _CTYPE_NUM_CHARS macro to read data from LC_CTYPE(old BSDCTYPE style) database.
   because 1<<CHAR_BIT is MD, so i added MI macro _CTYPE_CACHE_SIZE(1<<8).
3. remove _NB_CACHED_RUNE macro, use _CTYPE_CACHE_SIZE instead.
2010-05-22 06:38:15 +00:00
jruoho
2096402883 Refer to sigevent(3). 2010-05-19 06:44:51 +00:00
wiz
d9175b29a9 Split "file system" and fix a typo. 2010-05-18 18:05:52 +00:00
jruoho
51e86d90ef Refer to timeval(3) and only describe the legacy struct timezone here.
Improve markup.
2010-05-18 07:14:18 +00:00
jruoho
4a800d153f Offset indent, .Dv. 2010-05-17 12:38:04 +00:00
jruoho
a6141e98fc Use -enum in the list for clarity. 2010-05-17 12:23:05 +00:00
jruoho
3ae57981ed Add subtitle. Break long paragraph. 2010-05-17 12:16:43 +00:00
jruoho
eb64068f04 Note that all stat-functions are standardized nowadays. 2010-05-17 12:12:35 +00:00
jruoho
5717af9360 Reference timeval(3). 2010-05-17 07:22:03 +00:00
jruoho
3dc60799a1 Try to describe the struct stat instead of copy-pasting it from the header.
Use xrefs to avoid duplication of effort. Note the S_IS*() macros.
2010-05-17 05:20:05 +00:00
jruoho
cbe8ce8cad Actually the previous is wrong; all of these can set the errno either via
each other or via something like malloc(3) or lseek(2).
2010-05-17 03:09:06 +00:00
jruoho
132817e96e Fix the note about errno in ERRORS; telldir(3), seekdir(3), and rewinddir(3)
do not set the errno.
2010-05-17 03:04:09 +00:00
wiz
972863c67c Sort sections. Fix typo. Fix xref. Improve wording in one case. 2010-05-16 11:37:06 +00:00
jruoho
fb6ead4add At least one markup-typo slipped through the cracks. 2010-05-16 08:01:14 +00:00
jruoho
ce1c570bfe Rewrite much of the page.
Provide much more detailed and structured discussion. Notably, try to gather
some of the conditions around the famous undefined behavior; these functions
(or the implementations) are quite prone to such behavior.

Add compatibility notes. (The big change here is that in SUSv4 it is no
longer mandated that the directory streams are implemented by using file
descriptors.)

XXX: Please proofread this. Consider also adding some additional notes. For
     instance, I left the semantics about "." and ".." out.  The returned
     errno's should be enumerated as well.
2010-05-16 07:52:58 +00:00
jruoho
f99f0278cc Move the more detailed discussion around the dirent-structure from
getdents(2) to dirent(5), and extend it with some compatibility notes.
2010-05-15 15:38:41 +00:00
pgoyette
c795d9ed89 Remove repeated text "After filling..."
XXX Someone else can decide whether we should refer to "U.S.A." or to
XXX "the United States" in the parenthetical.
2010-05-15 13:54:52 +00:00
jruoho
0e2d5f4d40 Use standard section headers. 2010-05-14 16:05:49 +00:00
joerg
8331b95fa9 Fix trailing whitespace 2010-05-14 03:22:49 +00:00
joerg
f0c7b477dc Fix markup 2010-05-14 03:04:32 +00:00
wiz
6f1249aa8e Join %U. 2010-05-13 23:30:52 +00:00
christos
96f5fe0aab PR/43300: Takahiro Kambe: LOG_PID and LOG_CONSOLE printed syslogp messages
to the console/stderr since the syslogp conversion.
2010-05-13 22:40:14 +00:00
joerg
332c9caca2 Use plain references and don't depend on multiple expansion runs. 2010-05-13 21:52:43 +00:00
joerg
fb270d1e3d Mask %U, it is a macro nowadays. 2010-05-13 21:50:11 +00:00
jruoho
f05bdd5ecd Remove the note about the standard recommending fgets(3);
should be clear enough from the big warning to "NEVER use gets()".
2010-05-13 18:38:24 +00:00
jruoho
b2368e5383 Move the structure inside the body text. Some additional markup improvements. 2010-05-13 18:04:58 +00:00
jruoho
08cdc5df90 Build links for syslogp(3), syslogp_r(3), vsyslogp(3), and vsyslogp_r(3).
From Takahiro Kambe in PR lib/43301.
2010-05-13 17:48:50 +00:00
mbalmer
c10c30d557 Correctly spell 'acknowledged'.
Found by Christian Brueffer.
2010-05-11 16:17:18 +00:00
wiz
968a574a9b Wording. 2010-05-08 11:35:14 +00:00
wiz
8add53fd8a Remove double quotes around missing function in BUGS section. 2010-05-08 11:22:58 +00:00
jruoho
c713a498a5 Note POSIX compliance. 2010-05-06 18:55:34 +00:00
jruoho
70a5142faf Note POSIX compliance. Reword a little around the example. 2010-05-06 11:46:11 +00:00
jruoho
5686044fbd .Nm -> .Fn. 2010-05-06 11:09:39 +00:00
jruoho
7f1766c2e5 Small improvements to markup and wording. 2010-05-06 09:46:49 +00:00
jruoho
fc240ff6c6 Small markup improvements. 2010-05-06 09:34:52 +00:00
jruoho
2184425c2a Note that EBADF is optional for fileno() in POSIX. 2010-05-06 09:18:06 +00:00
jruoho
dccc94a2b3 Put the historical note to its own section. Note that also the other
functions (except the _unlocked variants) were in early UNIX versions.
2010-05-06 09:01:34 +00:00
jruoho
aa18298cd3 Note POSIX compliance. 2010-05-06 08:58:57 +00:00
jruoho
4c0553eda5 Correct the discussion about return values: fileno() may fail and return -1.
Note that in such cases the NetBSD implementation does not set errno to
EBADF, hence diverging from the standard in this small detail.
2010-05-06 08:14:08 +00:00
wiz
c45196503b Sort errors. 2010-05-05 22:07:58 +00:00
jruoho
61d5c5bd31 Note the POSIX compliance (already since SUSv2, '97). 2010-05-05 06:55:57 +00:00
jruoho
12456d3098 Properly enumerate the two special cases. Also some markup improvements. 2010-05-05 06:04:19 +00:00
jruoho
29cfcc518e Upon lukem@'s request, put the list of functions back.
XXX: Someone needs to go through all standard I/O functions in the libc,
     update the list, and keep it updated. While at it, please convert the
     list to use .Xr so that we can have links in HTML pages.
2010-05-05 04:13:16 +00:00
jruoho
dd121e1e5b Remove the list of functions.
This list was updated only two times in nearly two decades.

(If people need to learn the standard I/O functions in C, it would be better
to mention K&R or some other textbook; if people need to know the list of
functions, it would be better to point out the location of the standard.)

In addition, some clean-up and structural editing.
2010-05-04 07:43:12 +00:00
jruoho
0fb5e18e02 Update the -- now quite big -- list of unsupported Linux options. 2010-05-04 06:13:43 +00:00
jruoho
26a87898ae Fix previous commit by also moving the type of _malloc_options. In addition,
add a (commented) note that _malloc_message should be documented better.
2010-05-03 08:23:20 +00:00
jruoho
60d71be703 Move the '_malloc_options' variable from malloc(3) to jemalloc(3). 2010-05-03 08:11:57 +00:00
jruoho
49bb3cb02e Note the problems with SSP. 2010-05-03 06:11:38 +00:00
jruoho
40c884b1c3 Note secure_path(3) in SEE ALSO. 2010-05-03 05:53:56 +00:00
jruoho
ef40c024f6 Move the examples to where they belong, in EXAMPLES. 2010-05-03 05:11:34 +00:00
jruoho
26e9ae259a Split the implementation details of malloc(3) to a separate jemalloc(3)
manual page. This way malloc(3) can follow the standard terse format used
elsewhere in the libc, while additional details can be added to jemalloc(3).

Note HISTORY and AUTHORS in jemalloc(3), and add some reading material to
SEE ALSO.
2010-05-03 05:01:53 +00:00
jruoho
a80a543b80 Add more markup. 2010-05-03 03:47:51 +00:00
jruoho
280488d6bc Note that the return type sould arguably be intmax_t instead of long long. 2010-05-01 08:35:52 +00:00
jruoho
061351141b Remove the (incorrect) note about inconsistent return values. Name the exit
code as EXIT_FAILURE instead of integer 1.
2010-05-01 08:30:00 +00:00
jruoho
413ef23a32 Add more bugs. Namely, besides the return values that are confusing, no
function in a modern standard C library, exposed by <stdlib.h>, should be as
easy to (buffer) overflow as strsuftollx(3).

In addition, improvements to wording and markup.
2010-05-01 08:12:30 +00:00
jruoho
4519228649 Improvements to wording and markup.
In addition, list more bugs and caveats. Namely, the NetBSD implementation
(like the FreeBSD one where this was ported to) requires that the comparison
keys are allocated dynamically, and that hdestroy() will try to free(3) each
key. This obviously severely limits the portability, given that other
implementations (for example, the Linux one) make no such assumptions. Both
approaches are legitimate, and thus the real bug is in the ambiguity of the
standard.
2010-05-01 06:18:03 +00:00
jruoho
a293ac8fcc Rewrite the HISTORY section. 2010-04-30 10:24:02 +00:00
jruoho
eecb0b5e2c Put the period outside the quotation marks. 2010-04-30 10:09:23 +00:00
jruoho
cb375ee477 Add STANDARDS and CAVEATS. The latter notes the ambiguity of tdelete() when
deleting the root node.
2010-04-30 10:06:52 +00:00
jruoho
68cb312101 Remove the note about eaccess(); no such thing in NetBSD. 2010-04-30 09:41:59 +00:00
jruoho
42e4725801 Also: in the example EOVERFLOW is probably better than ENOMEM. 2010-04-30 07:16:35 +00:00
jruoho
67e69a6bf8 As err(3) instructs, use EXIT_FAILURE in the example. 2010-04-30 07:14:15 +00:00
jruoho
75d4d306c5 Steal the "malloc() vs. calloc()" -idiom from the OpenBSD's malloc(3).
While it may be debated how useful this is, good idiomatic usage examples
are exactly the kind of thing one would hope to see more in manual pages.
2010-04-30 07:00:51 +00:00
wiz
779fbbb100 Wording. 2010-04-30 06:54:16 +00:00
wiz
5a5627574d Sort errors. 2010-04-30 06:51:52 +00:00
wiz
0264ec21bd Merge two entries for the same error. 2010-04-30 06:48:20 +00:00
jruoho
54f0f8584b Use a SECURITY CONSIDERATIONS instead of the BUGS section, and steal this
section from FreeBSD (with minor modifications).
2010-04-30 06:34:23 +00:00
jruoho
1ad0e6c25b Put SECURITY CONSIDERATIONS as the last section. 2010-04-30 06:23:56 +00:00
jruoho
2f941c83c7 Fix the mess in the sections; someone went to sleep in the middle of a
sentence...
2010-04-30 06:22:28 +00:00
jruoho
b0e9ddf609 They've finally made gets(3) obsolete (in POSIX, at least). 2010-04-30 06:00:14 +00:00
jruoho
1b80a21f09 Add HISTORY. 2010-04-30 05:56:14 +00:00
jruoho
fba71b9825 Marked as legacy already in SUSv2; removed in POSIX 2001. 2010-04-30 05:50:46 +00:00
jruoho
d307542670 Deprecated in POSIX (rev. 2008). 2010-04-30 05:09:23 +00:00
jruoho
4078f3e9d1 Also tmpnam(3) and tempnam(3) are now obsolete in POSIX. 2010-04-30 04:55:10 +00:00
jruoho
92370ee67d Interestingly, the committees plan to remove also isascii(3) and toascii(3)
in the future.
2010-04-30 04:46:18 +00:00
jruoho
70d2311835 More obsolete things. These are all already deprecated in NetBSD, but it is
worth noting that also the standard has marked these as legacy.
2010-04-30 04:39:16 +00:00
jruoho
a2ebffc113 Reference timeradd(3). 2010-04-30 04:17:45 +00:00
jruoho
eccc1c42e1 Add STANDARDS section. Note that both functions were marked as obsolescent
in POSIX (2008); "timer_gettime(2) and timer_settime(2) should be used".
2010-04-30 04:15:49 +00:00
jruoho
71a03dd7f6 Small improvements to wording and markup. 2010-04-30 04:06:20 +00:00
jruoho
c6d218be32 .Nm -> .Fn. 2010-04-30 03:52:13 +00:00
jruoho
ec4fdaa41e It was nice to expect fts(3) to appear in the '88 revision. But perhaps
people had too high hopes.
2010-04-29 17:39:03 +00:00
jruoho
934551e44a No more usleep(3) in POSIX; "use nanosleep(2) instead". 2010-04-29 17:29:56 +00:00
jruoho
6adec4717c Fix markup. 2010-04-29 17:17:18 +00:00
jruoho
3d0a5d8f1c Note that also POSIX has deprecated utime(3). 2010-04-29 17:07:00 +00:00
jruoho
648a1295d8 Fix the standards: utimes(2) is still in SUSv4, although marked as legacy. 2010-04-29 17:02:38 +00:00