Commit Graph

365 Commits

Author SHA1 Message Date
christos
4ca73ce810 Don't expose _ss functions for 4.0. Requested by core. 2006-11-22 17:23:24 +00:00
christos
f45c81bb89 set n properly so that we can terminate. 2006-10-30 05:10:40 +00:00
christos
9984f7540a fix name in weak alias. 2006-10-29 16:22:17 +00:00
christos
78921a0243 Initialize decimal_point. 2006-10-28 15:02:02 +00:00
christos
f71e448c3b initialize floating_point as needed. 2006-10-28 14:38:55 +00:00
christos
abca035cf3 Add signal-safe versions of snprintf and vsnprintf 2006-10-27 19:59:58 +00:00
thorpej
2e2d300f43 Grr, adjust last so that it works with our busted lint(1). 2006-10-07 21:40:46 +00:00
thorpej
569c003c39 Use explicit initializers in STDEXT 2006-10-07 20:46:59 +00:00
tnozaki
44eb8f042e fix gcc -Werror -Wmissing-braces problem
mbstate_t(this is opaque object)'s initializer should be ``{ 0 }'',
so changed 1st field of union from character array to integer.
2006-10-04 13:51:59 +00:00
tnozaki
0490c7eba2 fwprintf(stderr) may coredump, when LC_CTYPE locale is set none C/POSIX.
make sure to initialize struct __sfileext in FILE.
2006-10-01 10:29:21 +00:00
martin
77d6e4c5bd As suggested by Johan Veenhuizen in PR 32981, reword slightly to avoid
the impression return values would always be -1.
Approved by christos.
2006-09-25 08:55:33 +00:00
jld
04316d3cd7 Remove inappropriate comma. 2006-08-04 20:55:45 +00:00
tnozaki
c98a8494d4 SUSv3 said, if an encoding error occurs, the error indicator
for the stream shall be set.
2006-07-03 17:06:36 +00:00
mrg
084c052803 quell GCC 4.1 uninitialised variable warnings.
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-10 21:53:14 +00:00
wiz
cfed86b6c3 Mark up NULL and -. 2006-03-19 10:46:21 +00:00
rumble
43d45c06c6 Note that for asprintf and vasprintf it is more portable to check for
a -1 return, rather than ret being set to NULL on error.

From Otto Moerbeek.
2006-03-18 05:46:04 +00:00
chris
165401a5bd Move strlen(s) to after s is known to be not NULL, or set to "(null)" .
Fixes Coverity CID 2353.
2006-03-17 02:25:23 +00:00
christos
c975cdc86c - s/notyet/WIDE_DOUBLE/
- Add a little more glue for WIDE_DOUBLE; not done yet.
- s/def FLOATING_POINT/ndef NO_FLOATING_POINT/ to reduce diffs with FreeBSD.
- fix memory leak where each double formatted leaked 24 by calling __freedtoa()
  appropriately. the new gdtoa keeps a list of memory chunks allocated by
  malloc(), and it must maintained properly by calling __freedtoa() on the
  results of __dtoa() Hi Klaus!
- in vfwprintf() make cvt return char * and convert it using __mbsconv(),
  instead of having it return wchar_t *.

This should fix the memory leaks people have been reporting (eg. in top etc.)
2006-02-16 23:26:19 +00:00
kleink
9cbc15a5b4 Must include "namespace.h" for strerror_r()'s internal name. 2006-01-26 11:13:42 +00:00
kleink
464456b75a Must include "namespace.h" for fseeko()'s internal name. 2006-01-26 10:48:18 +00:00
kleink
13de3b4945 bcopy -> memcpy 2006-01-26 10:40:12 +00:00
yamt
4470fd926f redo the previous (WARNS=4) differently. consitify rather than making
strings writable.
2005-12-02 14:45:24 +00:00
yamt
bc6aedb03c remove an unnecessary __UNCONST. 2005-12-02 13:51:22 +00:00
christos
03256c6e55 WARNS=4 2005-11-29 03:11:58 +00:00
christos
5b84b3983f compat core reorg. 2005-09-13 01:44:08 +00:00
christos
86741d79ab - Fix the remaining indr_references so that they define lint symbols.
- Add an internal symbol for strerror_r (thanks klaus for noticing)
- Remove internal __strerror
2005-07-30 15:21:20 +00:00
christos
1cf13731b1 PR/30845: Luke Mewburn: strerror_r(3) missing
- Merge 4.4BSD strerror.3 man page changes that summarize information
  for all the error printing functions. This makes the perror(3) page
  obsolete.
- Implement all error functions in terms of strerror_r(), including
  __strerror() which is not used internally. Can it be removed?
- Bump version for strerror_r
2005-07-28 16:26:29 +00:00
drochner
06666adadb get the trailing-slash logics right 2005-07-27 13:23:07 +00:00
christos
f44796a7b7 PR/30839: Tomas Skäre: Buffer underflow in lib/libc/stdio/tempnam.c
when *dir == "".
2005-07-26 16:12:49 +00:00
christos
b255b1535e PR/30971: Noriyuki Soda: Fix %ll prints long long, and %q is not portable. 2005-07-20 13:31:15 +00:00
christos
07c1b4dc67 If the string to be printed is NULL substitute "(null)". Approved by core.
This is a workaround to make gcc's behavior consistent, since gcc can
transform:
    printf("%s\n", s) -> puts(s)
    fprintf(fp, "%s", s) -> fputs(s, fp)
as an optimization.
I've left the _DIAGASSERT's that make sure that s != NULL alone because we
should really still abort in a debugging environment.
2005-06-22 19:45:22 +00:00
christos
098f26dce7 Document that passing NULL to %s prints "(null)". 2005-06-21 18:43:17 +00:00
lukem
d249206e30 use "tempnam" instead of "tmpname" 2005-06-18 10:50:25 +00:00
he
12d0c406c7 Initialize expsize to appease -Wuninitialized for sh3 and m68000.
Marked with XXXGCC -Wuninitialized [sh3,m68000].
2005-06-15 09:31:27 +00:00
lukem
0f879c5d2a vfwprintf.c and vfwscanf.c now compile with -Wuninitialized 2005-06-12 05:49:12 +00:00
lukem
ef7b3cd60b Appease gcc -Wuninitialized 2005-06-12 05:48:41 +00:00
lukem
81c4b0d591 Ensure nconv isn't used in __mbsconv() before being initialized.
Appease gcc -Wuninitialized elsewhere.
2005-06-12 05:45:38 +00:00
lukem
88c3eadbfa Add missing __RCSID() 2005-06-12 05:21:25 +00:00
wiz
649ba88889 Sort options. 2005-06-03 20:32:20 +00:00
lukem
7fbaf47f83 Compile the following files with -Wno-uninitialized:
vfprintf.c	See rev 1.46 for why we can't fix this.
vfwprintf.c	Needs some effort
vfwscanf.c	Needs some effort
2005-06-01 11:06:01 +00:00
kleink
13034da908 Add restrict qualifiers to fopen()/freopen() arguments. 2005-05-25 16:01:24 +00:00
christos
f432bbb6fd Add the missing wide char support functions from freebsd.
XXX: long double support is missing until we get gdtoa, and add the
necessary wide functions.
2005-05-14 23:51:02 +00:00
dsl
7f90294800 Re-implement in terms of fseek0() 2005-03-04 16:25:20 +00:00
dsl
28c48df97b de __P 2005-03-04 16:04:58 +00:00
kleink
fd5cb0acea A little libc namespace housekeeping exercise:
* Make vfprintf_unlocked() an internal function, c.f. __svfscanf_unlocked().
* Add internal names for arc4random(), endnetpath(), fhstatvfs(),
  fstatvfs(), mkstemp(), shquote(), statvfs(), taddr2uaddr(), uaddr2taddr(),
  uuid_create_nil(), uuid_is_nil(), and wcwidth().
* Include namespace.h where supposed to.
2005-02-09 21:35:46 +00:00
christos
b725a0a1fa add a cast and remove another. 2005-01-09 05:04:02 +00:00
christos
4b9f9bad8c remove __UNCONST definition; it is now in <sys/cdefs.h> 2004-07-02 03:00:01 +00:00
jmc
b2f782612f Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
2004-06-20 22:20:14 +00:00
drochner
f56a8e5871 make this build in the tools/compat reachover
case if HAVE_FPARSELN is not present
patch from Christian Limpach
2004-05-11 17:31:04 +00:00
drochner
d1a752ca4b put back the CAVEATS section
pointed out by wiz
2004-05-10 17:15:28 +00:00