Commit Graph

8247 Commits

Author SHA1 Message Date
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
jruoho
61564b38a1 Note the ambiguity of the return value in the BUGS section.
From Christian Biere <christianbiere@gmx.de> in PR #39392.
2010-04-29 10:03:12 +00:00
jruoho
c25207d763 Note POSIX compliance. 2010-04-29 08:06:21 +00:00
wiz
0c57838d7b Sort errors. 2010-04-29 07:31:02 +00:00
wiz
3292536e4b Add punctuation. 2010-04-29 07:27:30 +00:00
wiz
a917229f2a Improve a sentence. 2010-04-29 07:26:39 +00:00
jruoho
c792ab3e8e Note that utimes(2) no longer enjoys the blessing of POSIX. 2010-04-29 07:14:35 +00:00