freebsd-dev/lib/libc/stdlib
Andrey A. Chernov 5f5a50728c 1) Although unpublished version of standard
http://austingroupbugs.net/view.php?id=385#c713
(Resolved state) recommend this way for the current standard (called
"earlier" in the text)

"However, earlier versions of this standard did not require this, and the
same example had to be written as:

    // buf was obtained by malloc(buflen)
    ret = write(fd, buf, buflen);
    if (ret < 0) {
        int save = errno;
        free(buf);
        errno = save;
        return ret;
    }
"

from feedback I have for previous commit it seems that many people prefer
to avoid mass code change needed for current standard compliance
and prefer to track unpublished standard instead, which requires now
that free() itself must save errno, not its usage code.

So, I back out "save errno across free()" part of previous commit,
and will fill PR for changing free() isntead.

2) Remove now unused serrno.

MFC after:      1 week
2012-06-05 16:16:33 +00:00
..
jemalloc Import jemalloc 9ef7f5dc34ff02f50d401e41c8d9a4a928e7c2aa (dev branch, 2012-04-17 07:22:14 +00:00
_Exit.c
a64l.3 Revise markup in recently added manpages. 2006-09-30 10:34:13 +00:00
a64l.c Correct decoding a string containing '/'. 2006-05-19 19:06:38 +00:00
abort.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
abort.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
abs.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
abs.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
alloca.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
at_quick_exit.3 Remove trailing whitespace per mdoc lint warning 2012-03-29 05:02:12 +00:00
atexit.3 Implement quick_exit() / at_quick_exit() from C++11 / C1x. Also add a 2011-12-07 15:25:48 +00:00
atexit.c Do not call __pthread_cxa_finalize with invalid struct dl_phdr_info. 2010-08-27 19:57:17 +00:00
atexit.h Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
atof.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
atof.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
atoi.3 Remove out of date notes, the atoi code is thread-safe and async-cancel 2007-10-19 06:23:39 +00:00
atoi.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
atol.3 "-isoC-99" should be spelled without 'c'. 2009-03-01 05:44:28 +00:00
atol.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
atoll.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
bsearch.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
bsearch.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
div.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
div.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
exit.3 Implement quick_exit() / at_quick_exit() from C++11 / C1x. Also add a 2011-12-07 15:25:48 +00:00
exit.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getenv.3 General mdoc(7) and typo fixes. 2012-05-11 20:06:46 +00:00
getenv.c Revert behavior change to setenv(), unsetenv() and putenv() until a more 2009-12-07 00:22:10 +00:00
getopt_long.3 Add missing opening and closing brackets in getopt_long.3 and getsubopt.3 2011-12-26 03:14:37 +00:00
getopt_long.c Keep compatible parts in sync with OpenBSD v1.21, add some comments. 2006-09-23 14:48:31 +00:00
getopt.3 mdoc: remove unbalanced quotes 2010-08-02 13:11:41 +00:00
getopt.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getsubopt.3 Add missing opening and closing brackets in getopt_long.3 and getsubopt.3 2011-12-26 03:14:37 +00:00
getsubopt.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
hcreate.3 mdoc: order prologue macros consistently by Dd/Dt/Os 2010-04-14 19:08:06 +00:00
hcreate.c - remove superfluous word 2008-07-06 11:31:20 +00:00
heapsort.c Use size_t to avoid overflow when sorting arrays larger than 2 GB. 2008-01-13 02:11:10 +00:00
imaxabs.3
imaxabs.c
imaxdiv.3
imaxdiv.c
insque.3
insque.c
l64a.c Add a64l(), l64a(), and l64a_r() XSI extentions. These functions convert 2005-12-24 22:37:59 +00:00
labs.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
labs.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ldiv.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ldiv.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
llabs.3
llabs.c
lldiv.3
lldiv.c
lsearch.3 Sort sections. 2005-01-20 09:17:07 +00:00
lsearch.c
Makefile.inc Import jemalloc 9ef7f5dc34ff02f50d401e41c8d9a4a928e7c2aa (dev branch, 2012-04-17 07:22:14 +00:00
memory.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
merge.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ptsname.3 mdoc: order prologue macros consistently by Dd/Dt/Os 2010-04-14 19:08:06 +00:00
ptsname.c Fix whitespace inconsistencies in libc in files copyrighted by me. 2011-06-26 18:27:17 +00:00
qsort_r.c
qsort.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
qsort.c Changing 'r' to a size_t in the previous commit turned quicksort 2008-01-14 09:21:34 +00:00
quick_exit.3 Some fixes to the man pages for [at_]quick_exit(3) 2011-12-07 21:02:35 +00:00
quick_exit.c Small style(9) improvements. 2011-12-15 11:16:41 +00:00
radixsort.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
radixsort.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
rand.3 Missed space. 2010-10-06 09:24:33 +00:00
rand.c Fix typo in the comment 2007-12-11 20:39:32 +00:00
random.3 Add cross-references to lrand48(3) and arc4random(3) from rand(3) 2010-10-06 09:05:47 +00:00
random.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
reallocf.3 Import jemalloc 9ef7f5dc34ff02f50d401e41c8d9a4a928e7c2aa (dev branch, 2012-04-17 07:22:14 +00:00
reallocf.c In reallocf(3), free the memory only when size != 0. Otherwise, when the 2010-03-03 15:43:26 +00:00
realpath.3 According to SUSv4, realpath(3) must fail if 2012-05-11 11:29:08 +00:00
realpath.c 1) Although unpublished version of standard 2012-06-05 16:16:33 +00:00
remque.c
strfmon.3 General mdoc(7) and typo fixes. 2012-05-11 20:06:46 +00:00
strfmon.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
strtod.3 mdoc: drop redundant .Pp and .LP calls 2010-10-08 12:40:16 +00:00
strtoimax.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
strtol.3 Swap "underflow"/"overflow" in the table header. 2007-04-10 11:17:00 +00:00
strtol.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
strtoll.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
strtonum.3 Revert to r214147, errno is not clobbered as originally 2010-10-22 08:51:49 +00:00
strtonum.c POSIXed strtoll() (and ours one too) can set errno to EINVAL, so check 2006-03-14 19:53:03 +00:00
strtoq.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
strtoul.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
strtoul.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
strtoull.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
strtoumax.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
strtouq.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
Symbol.map Import jemalloc 9ef7f5dc34ff02f50d401e41c8d9a4a928e7c2aa (dev branch, 2012-04-17 07:22:14 +00:00
system.3 Mark the section describing return values with an appropriate section flag. 2008-06-26 08:24:59 +00:00
system.c Fix many "function declaration isn't a prototype" warnings in libc. 2009-12-05 19:31:38 +00:00
tdelete.c
tfind.c
tsearch.3 twalk() expects an `action' function not a comparison function. 2006-06-23 13:36:33 +00:00
tsearch.c
twalk.c