History log of /freebsd-10.0-release/lib/libc/Makefile
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 258750 29-Nov-2013 gjb

MFC r258537, r258587:

r258537 (hrs):
Add ICONV_{GET,SET}_ILSEQ_INVALID iconvctl. GNU iconv returns
EILSEQ when there is an invalid character in the output codeset
while it is valid in the input. However, POSIX requires iconv()
to perform an implementation-defined conversion on the character.
So, Citrus iconv converts such a character to a special character
which means it is invalid in the output codeset.

This is not a problem in most cases but some software like libxml2
depends on GNU's behavior to determine if a character is output
as-is or another form such as a character entity (&#NNN;).

r258587 (peter):
Move the iconv wrapper source from libc_nonshared to libc/iconv so
that it is all in the one place again. Rename libc/iconv/iconv.c
to bsd_iconv.c. Compile the wrappers into libc.a so that
WITHOUT_DYNAMICROOT works again.

Approved by: re (kib)
Sponsored by: The FreeBSD Foundation


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 255219 04-Sep-2013 pjd

Change the cap_rights_t type from uint64_t to a structure that we can extend
in the future in a backward compatible (API and ABI) way.

The cap_rights_t represents capability rights. We used to use one bit to
represent one right, but we are running out of spare bits. Currently the new
structure provides place for 114 rights (so 50 more than the previous
cap_rights_t), but it is possible to grow the structure to hold at least 285
rights, although we can make it even larger if 285 rights won't be enough.

The structure definition looks like this:

struct cap_rights {
uint64_t cr_rights[CAP_RIGHTS_VERSION + 2];
};

The initial CAP_RIGHTS_VERSION is 0.

The top two bits in the first element of the cr_rights[] array contain total
number of elements in the array - 2. This means if those two bits are equal to
0, we have 2 array elements.

The top two bits in all remaining array elements should be 0.
The next five bits in all array elements contain array index. Only one bit is
used and bit position in this five-bits range defines array index. This means
there can be at most five array elements in the future.

To define new right the CAPRIGHT() macro must be used. The macro takes two
arguments - an array index and a bit to set, eg.

#define CAP_PDKILL CAPRIGHT(1, 0x0000000000000800ULL)

We still support aliases that combine few rights, but the rights have to belong
to the same array element, eg:

#define CAP_LOOKUP CAPRIGHT(0, 0x0000000000000400ULL)
#define CAP_FCHMOD CAPRIGHT(0, 0x0000000000002000ULL)

#define CAP_FCHMODAT (CAP_FCHMOD | CAP_LOOKUP)

There is new API to manage the new cap_rights_t structure:

cap_rights_t *cap_rights_init(cap_rights_t *rights, ...);
void cap_rights_set(cap_rights_t *rights, ...);
void cap_rights_clear(cap_rights_t *rights, ...);
bool cap_rights_is_set(const cap_rights_t *rights, ...);

bool cap_rights_is_valid(const cap_rights_t *rights);
void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src);
void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src);
bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little);

Capability rights to the cap_rights_init(), cap_rights_set(),
cap_rights_clear() and cap_rights_is_set() functions are provided by
separating them with commas, eg:

cap_rights_t rights;

cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_FSTAT);

There is no need to terminate the list of rights, as those functions are
actually macros that take care of the termination, eg:

#define cap_rights_set(rights, ...) \
__cap_rights_set((rights), __VA_ARGS__, 0ULL)
void __cap_rights_set(cap_rights_t *rights, ...);

Thanks to using one bit as an array index we can assert in those functions that
there are no two rights belonging to different array elements provided
together. For example this is illegal and will be detected, because CAP_LOOKUP
belongs to element 0 and CAP_PDKILL to element 1:

cap_rights_init(&rights, CAP_LOOKUP | CAP_PDKILL);

Providing several rights that belongs to the same array's element this way is
correct, but is not advised. It should only be used for aliases definition.

This commit also breaks compatibility with some existing Capsicum system calls,
but I see no other way to do that. This should be fine as Capsicum is still
experimental and this change is not going to 9.x.

Sponsored by: The FreeBSD Foundation


# 251668 12-Jun-2013 jlh

Turn libc.so into an ld script rather than a symlink pointing to the
real shared object and libssp_nonshared.a.

This was the last showstopper that prevented from enabling SSP for ports
by default. portmgr@ performed a buildworld which showed no significant
breakage with this patch.

Details:

On i386 for PIC objects, gcc uses the __stack_chk_fail_local hidden
symbol instead of calling __stack_chk_fail directly [1]. This happen
not only with our gcc-4.2.1 but also with the latest gcc-4.8. If you
want the very nasty details, see [2].

OTOH the problem doesn't exist on other architectures. It also doesn't
exist with Clang as the latter will somehow manage to create the
function in the object file at compile time (contrary to only
referencing it through a symbol that will be brought in at link time).

In a perfect world, when an object file is compiled with
-fstack-protector, it will be linked into a binary or a DSO with this
same flag as well, so GCC will add libssp_nonshared.a to the linker
command-line. Unfortunately, we don't control softwares in ports and we
may have such broken DSO. This is the whole point of this patch.

You can reproduce the problem on i386 by compiling a source file into an
object file with "-fstack-protector-all -fPIE" and linking it
into a binary without "-fstack-protector".

This ld script automatically proposes libssp_nonshared.a along with the
real libc DSO to the linker. It is important to understand that the
object file contained in this library will be pulled in the resulting
binary _only if_ the linker notices one of its symbols is needed (i.e.
one of the SSP symbol is missing).

A theorical performance impact could be when compiling, but my testing
showed less than 0.1% of difference.

[1] For 32-bit code gcc saves the PIC register setup by using
__stack_chk_fail_local hidden function instead of calling
__stack_chk_fail directly. See comment line 19460 in:
src/contrib/gcc/config/i386/i386.c

[2] When compiling a source file to an object file, if you use something
which is external to the compilation unit, GCC doesn't know yet if
this symbol will be inside or outside the DSO. So it expects the
worst case and routes the symbol through the GOT, which means
additional space and extra relocation for rtld(1).

Declaring a symbol has hidden tells GCC to use the optimal route (no
GOT), but on the other hand this means the symbol has to be provided
in the same DSO (namely libssp_nonshared.a).

On i386, GCC actually uses an hidden symbol for SSP in PIC objects
to save PIC register setup, as said in [1].

PR: ports/138228
PR: ports/168010
Reviewed by: kib, kan


# 235720 21-May-2012 gleb

Disable NLS catalog use in libc if built with WITHOUT_NLS option.

Functions affected: strerror, strsignal, gai_strerror.


# 235653 19-May-2012 marcel

Don't link against libssp if MK_SSP is set to no.
Note that this still misses a proper dependency at this time.


# 234370 17-Apr-2012 jasone

Import jemalloc 9ef7f5dc34ff02f50d401e41c8d9a4a928e7c2aa (dev branch,
prior to 3.0.0 release) as contrib/jemalloc, and integrate it into libc.
The code being imported by this commit diverged from
lib/libc/stdlib/malloc.c in March 2010, which means that a portion of
the jemalloc 1.0.0 ChangeLog entries are relevant, as are the entries
for all subsequent releases.


# 229368 03-Jan-2012 ed

Merge index() and strchr() together.

As I looked through the C library, I noticed the FreeBSD MIPS port has a
hand-written version of index(). This is nice, if it weren't for the
fact that most applications call strchr() instead.

Also, on the other architectures index() and strchr() are identical,
meaning we have two identical pieces of code in the C library and
statically linked applications.

Solve this by naming the actual file strchr.[cS] and let it use
__strong_reference()/STRONG_ALIAS() to provide the index() routine. Do
the same for rindex()/strrchr().

This seems to make the C libraries and static binaries slightly smaller,
but this reduction in size seems negligible.


# 219019 24-Feb-2011 gabor

Add the BSD-licensed Citrus iconv to the base system with default off
setting. It can be built by setting the WITH_ICONV knob. While this
knob is unset, the library part, the binaries, the header file and
the metadata files will not be built or installed so it makes no impact
on the system if left turned off.

This work is based on the iconv implementation in NetBSD but a great
number of improvements and feature additions have been included:

- Some utilities have been added. There is a conversion table generator,
which can compare conversion tables to reference data generated by
GNU libiconv. This helps ensuring conversion compatibility.
- UTF-16 surrogate support and some endianness issues have been fixed.
- The rather chaotic Makefiles to build metadata have been refactored
and cleaned up, now it is easy to read and it is also easier to add
support for new encodings.
- A bunch of new encodings and encoding aliases have been added.
- Support for 1->2, 1->3 and 1->4 mappings, which is needed for
transliterating with flying accents as GNU does, like "u.
- Lots of warnings have been fixed, the major part of the code is
now WARNS=6 clean.
- New section 1 and section 5 manual pages have been added.
- Some GNU-specific calls have been implemented:
iconvlist(), iconvctl(), iconv_canonicalize(), iconv_open_into()
- Support for GNU's //IGNORE suffix has been added.
- The "-" argument for stdin is now recognized in iconv(1) as per POSIX.
- The Big5 conversion module has been fixed.
- The iconv.h header files is supposed to be compatible with the
GNU version, i.e. sources should build with base iconv.h and
GNU libiconv. It also includes a macro magic to deal with the
char ** and const char ** incompatibility.
- GNU compatibility: "" or "char" means the current local
encoding in use
- Various cleanups and style(9) fixes.

Approved by: delphij (mentor)
Obtained from: The NetBSD Project
Sponsored by: Google Summer of Code 2009


# 217942 27-Jan-2011 jchandra

Fix n32 compile.

These changes are needed to fix n32 compile after the recent change of
mips n32 MACHINE_ARCH to mipsn32eb/mipsn32el.

Reviewed by: imp, bz (earlier version)


# 217123 07-Jan-2011 imp

Retire TARGET_ABI.

Implement MACHINE_ARCH=mips64e[lb] to build N64 images. This replaces
MACHINE_ARCH=mipse[lb] TARGET_ABI=n64.

MACHINE_ARCH=mipsn32e[lb] has been added, but currently requires
WITHOUT_CDDL due to atomic issues in libzfs. I've not investigated
this much, but implemented this to preserve as much of the TARGET_ABI
functionality that I could. Since its presence doesn't affect the
working cases, I've kept it in for now.

Added mips64e[lb] to make universe, so more kernels build.

And I think this (finally) closes the curtain on the tbemd tree.


# 213153 24-Sep-2010 davidxu

To support stack unwinding for cancellation points, add -fexceptions flag
for them, two functions _pthread_cancel_enter and _pthread_cancel_leave
are added to let thread enter and leave a cancellation point, it also
makes it possible that other functions can be cancellation points in
libraries without having to be rewritten in libthr.


# 211822 25-Aug-2010 nwhitehorn

Allow ABIs to provide their own LIBC_ARCH in a more generic way. As a side
effect, this fixes the build on powerpc64.

Reviewed by: imp


# 211778 24-Aug-2010 imp

Fix an accidental sed...


# 211774 24-Aug-2010 imp

Powerpc is special here. powerpc and powerpc64 use different ABIs, so
their implementations aren't in the same files. Introduce LIBC_ARCH
and use that in preference to MACHINE_CPUARCH. Tested by amd64 and
powerpc64 builds (thanks nathanw@)


# 211725 23-Aug-2010 imp

MFtbemd:

Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.


# 211704 23-Aug-2010 kib

Style.

MFC after: 3 days


# 210731 01-Aug-2010 rpaulo

Disable all warnings when building gdtoa. This allows building libc with
clang.
The general idea is that the vendor will not accept our compilation
patches and so disabling the warnings is the best way to go as it makes
future imports bearable.

Submitted by: Dimitry Andric <dimitry at andric.com>
Discussed with: das


# 209878 10-Jul-2010 nwhitehorn

Provide 64-bit PowerPC support in libc.

Obtained from: projects/ppc64


# 209233 16-Jun-2010 jchandra

Merge jmallett@'s n64 work into HEAD - changeset 2

Update libc Makefiles.
Add makecontext implementation.

Changes from http://svn.freebsd.org/base/user/jmallett/octeon

Approved by: rrs(mentor), jmallett


# 201859 08-Jan-2010 imp

Merge r195030 from project/mips to head by hand

r195030 | gonzo | 2009-06-25 19:27:31 -0600 (Thu, 25 Jun 2009) | 4 lines
- Switch to libc softfloat from libgcc implementation. The problem
with latter is that it is not complete, fpsetXXX/fpgetXXX
functions are missing.


# 195697 14-Jul-2009 kan

Second attempt at eliminating .text relocations in shared libraries
compiled with stack protector.

Use libssp_nonshared library to pull __stack_chk_fail_local symbol into
each library that needs it instead of pulling it from libc. GCC
generates local calls to this function which result in absolute
relocations put into position-independent code segment, making dynamic
loader do extra work every time given shared library is being relocated
and making affected text pages non-shareable.

Reviewed by: kib
Approved by: re (kib)


# 195152 28-Jun-2009 kan

Back out previous revision until better tested fix is ready.

Approved by: re (impliciti, by approving previos check-in)


# 195151 28-Jun-2009 kan

Eliminate .text relocations in shared libraries compiled with stack protector.

Use libssp_nonshared library to pull __stack_chk_fail_local symbol into
each library that needs it instead of pulling it from libc. GCC generates
local calls to this function which result in absolute relocations put into
position-independent code segment, making dynamic loader do extra work everys
time given shared library is being relocated and making affected text pages
non-shareable.

Reviewed by: kib
Approved by: re (kensmith)


# 189765 13-Mar-2009 gabor

- Reenable Native Language Support in libc. This feature was disabled due
to possible breakages in the catalog handling code. Since then, that
code has been replaced by the secure code from NetBSD but NLS in libc
remained turned off. Tests have shown that the feature is stable and
working so we can now turn it on again.

- Add several new catalog files:
- ca_ES.ISO8859-1
- de_DE.ISO8859-1
- el_GR.ISO8859-7 (by manolis@ and keramida@)
- es_ES.ISO8859-1 (kern/123179, by carvay@)
- fi_FI.ISO8859-1
- fr_FR.ISO8859-1 (kern/78756, by thierry@)
- hu_HU.ISO8859-2 (by gabor@)
- it_IT.ISO8859-15
- nl_NL.ISO8859-1 (corrections by rene@)
- no_NO.ISO8859-1
- mn_MN.UTF-8 (by ganbold@)
- sk_SK.ISO8859-2
- sv_SE.ISO8859-1
(The catalogs without explicit source has been obtained from NetBSD.)

Approved by: attilio


# 180012 25-Jun-2008 ru

Enable GCC stack protection (aka Propolice) for userland:
- It is opt-out for now so as to give it maximum testing, but it may be
turned opt-in for stable branches depending on the consensus. You
can turn it off with WITHOUT_SSP.
- WITHOUT_SSP was previously used to disable the build of GNU libssp.
It is harmless to steal the knob as SSP symbols have been provided
by libc for a long time, GNU libssp should not have been much used.
- SSP is disabled in a few corners such as system bootstrap programs
(sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves.
- It should be safe to use -fstack-protector-all to build world, however
libc will be automatically downgraded to -fstack-protector because it
breaks rtld otherwise.
- This option is unavailable on ia64.

Enable GCC stack protection (aka Propolice) for kernel:
- It is opt-out for now so as to give it maximum testing.
- Do not compile your kernel with -fstack-protector-all, it won't work.

Submitted by: Jeremie Le Hen <jeremie@le-hen.org>


# 172401 01-Oct-2007 ru

Fixed "make checkdpadd" (missing library dependencies).

Approved by: re (kensmith)


# 169771 19-May-2007 kan

Use LDADD to add -lgcc to the end of linker command line. Using LDFLAGS
puts it before library's object files, making the whole constuct useless.


# 169720 19-May-2007 kan

Make sure GCC will not try to link libc with itself.


# 169524 13-May-2007 deischen

Enable symbol versioning by default. Use WITHOUT_SYMVER to disable it.
Warning, after symbol versioning is enabled, going back is not easy
(use WITHOUT_SYMVER at your own risk).

Change the default thread library to libthr.

There most likely still needs to be a version bump for at least the
thread libraries. If necessary, this will happen later.


# 167199 04-Mar-2007 simon

Disable RPC exponential back-off for FreeBSD.org systems (IE. hidden
behind _FREEFALL_CONFIG). This is done mainly to make NIS even more
resistant to packet loss.

This is not enabled by default for "normal" FreeBSD since it might cause
the server providing the RPC service to be hit heavily with RPC traffic
in case of problems. freefall.FreeBSD.org and hub.FreeBSD.org have been
running with a patch similar to this for a couple of weeks.

MFC after: 1 week
Discussed with: peter


# 161526 22-Aug-2006 ru

Remove alpha left-overs.


# 158809 22-May-2006 ache

Remove pending actions asked in comments for SHLIB_MAJOR bump, done.

Reviewed by: ume


# 158794 21-May-2006 ume

Bump library majro version for gethostbyaddr(3).


# 158115 28-Apr-2006 ume

- Extend the nsswitch to support Services, Protocols and Rpc
databases.
- Make nsswitch support caching.

Submitted by: Michael Bushkov <bushman__at__rsu.ru>
Sponsored by: Google Summer of Code 2005


# 156960 21-Mar-2006 ume

Update the resolver in libc to BIND9's one.

Since, res_sendsigned(3) and the friends use MD5 functions, it is
hard to include them without having MD5 functions in libc. So,
res_sendsigned(3) is not merged into libc.

Since, res_update(3) in BIND9 is not binary compatible with our
res_update(3), res_update(3) is leaved as is, except some
necessary modifications.
The res_update(3) and the friends are not essential part of the
resolver. They are not defined in resolv.h but defined in
res_update.h separately in BIND9. Further, they are not called from
our tree. So, I hide them from our resolv.h, but leave them only
for binary backward compatibility (perhaps, no one calls them).

Since, struct __res_state_ext is not exposed in BIND9, I hide it
from our resolv.h. And, global variable _res_ext is removed. It
breaks binary backward compatibility. But, since it is not used from
outside of our libc, I think it is safe.

Reviewed by: arch@ (no objection)


# 156837 18-Mar-2006 ru

Provide alternate default for SHLIBDIR before bsd.own.mk does this.

Reported by: phk


# 156813 17-Mar-2006 ru

Reimplementation of world/kernel build options. For details, see:

http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)


# 156773 16-Mar-2006 deischen

Allow bsd.lib.mk to generate the symbol version map.


# 156769 16-Mar-2006 ru

Desupport the undocumented NO_QUAD option, just don't compile
the quad support on 64-bit platforms.


# 156609 12-Mar-2006 deischen

Add hooks to build libc with symbol versioning. This is
disabled by default; add SYMVER_ENABLED=true to /etc/make.conf
to enable it. libc should get a version bump before this is
enabled by default.

Reviewed by: davidxu


# 153815 29-Dec-2005 grehan

gmon now supported on powerpc


# 148796 06-Aug-2005 phk

Respect the YES_HESIOD build variable.


# 140279 15-Jan-2005 das

Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc.
The purpose of having a separate file involved an abandoned scheme that
would have kept contrib/gdtoa out of the include path for the rest of libc.


# 137675 13-Nov-2004 bz

Add knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
If turned on no NIS support and related programs will be built.

Lost parts rediscovered by: Danny Braniss <danny at cs.huji.ac.il>
PR: bin/68303
No objections: des, gshapiro, nectar
Reviewed by: ru
Approved by: rwatson (mentor)
MFC after: 2 weeks


# 136910 24-Oct-2004 ru

For variables that are only checked with defined(), don't provide
any fake value.


# 136603 16-Oct-2004 tjr

Bump the libc major version number to 6.


# 129202 14-May-2004 cognet

Import the FreeBSD/arm libc bits.

Obtained from: NetBSD


# 128820 02-May-2004 das

Add option NO_FP_LIBC, which disables floating-point support in
*printf() and *scanf(). Currently, this reduces the size of libc.so
by 9K on i386. But the real savings are for static binaries that use
*printf() or *scanf() but not strtod(); with an FP-disabled libc,
these binaries will not depend on the gdtoa routines, making each
binary about 22K smaller.


# 124723 19-Jan-2004 nectar

libc is now WARNS=2 clean with the exception of the gdtoa bits (which
are now not built with warnings enabled at all).


# 124483 13-Jan-2004 des

Add and document ffsl(), fls() and flsl().


# 124374 11-Jan-2004 ru

Replaced an ugly hack to selectively disable warnings
in contributed sources with just a hack made possible
by bsd.sys.mk,v 1.33. This is better because it just
nulls out the warning flags rather than adding gcc(1)
specific -w option to CFLAGS.


# 123440 11-Dec-2003 bde

Fixed English error in previous commit. Fixed some older English errors.
Removed a redundant clause.


# 123393 10-Dec-2003 mikeh

Add reference to standards/55112 for next time SHLIB_MAJOR is bumped.

Suggested by: wollman


# 122831 17-Nov-2003 nectar

Baby steps. Set WARNS=1 for libc.


# 119151 19-Aug-2003 wollman

Add a kluge suggested by Marcel to paper over the difference between
gethostname()'s old and new signatures without requiring a library
bump. Note that programs which called gethostname() with a negative
argument were already broken, since the same type conversion was done
by the old implementation. Add a note in the Makefile so that whoever
next bumps the libc revision will delete the kluge at the same time
(as it will no longer be necessary). This is only operative on 64-bit
platforms.

Submitted by: marcel


# 119071 18-Aug-2003 obrien

style.Makefile(5)


# 119017 17-Aug-2003 gordon

Stage 3 of dynamic root support. Make all the libraries needed to run
binaries in /bin and /sbin installed in /lib. Only the versioned files
reside in /lib, the .so symlink continues to live /usr/lib so the
toolchain doesn't need to be modified.


# 117120 01-Jul-2003 ru

Axe AINC.

Submitted by: bde


# 112202 13-Mar-2003 obrien

Clean up the way gdtoa sources are found.

OK'ed by: das


# 112163 12-Mar-2003 das

Replace our ancient dtoa/strtod implementation with the gdtoa
package, a more recent, generalized set of routines. Among the
changes:
- Declare strtof() and strtold() in stdlib.h.
- Add glue to libc to support these routines for all kinds
of ``long double''.
- Update printf() to reflect the fact that dtoa works slightly
differently now.

As soon as I see that nothing has blown up, I will kill
src/lib/libc/stdlib/strtod.c. Soon printf() will be able
to use the new routines to output long doubles without loss
of precision, but numerous bugs in the existing code must
be addressed first.

Reviewed by: bde (briefly), mike (mentor), obrien


# 110566 08-Feb-2003 mike

Implement fpclassify():
o Add a MD header private to libc called _fpmath.h; this header
contains bitfield layouts of MD floating-point types.
o Add a MI header private to libc called fpmath.h; this header
contains bitfield layouts of MI floating-point types.
o Add private libc variables to lib/libc/$arch/gen/infinity.c for
storing NaN values.
o Add __double_t and __float_t to <machine/_types.h>, and provide
double_t and float_t typedefs in <math.h>.
o Add some C99 manifest constants (FP_ILOGB0, FP_ILOGBNAN, HUGE_VALF,
HUGE_VALL, INFINITY, NAN, and return values for fpclassify()) to
<math.h> and others (FLT_EVAL_METHOD, DECIMAL_DIG) to <float.h> via
<machine/float.h>.
o Add C99 macro fpclassify() which calls __fpclassify{d,f,l}() based
on the size of its argument. __fpclassifyl() is never called on
alpha because (sizeof(long double) == sizeof(double)), which is good
since __fpclassifyl() can't deal with such a small `long double'.

This was developed by David Schultz and myself with input from bde and
fenner.

PR: 23103
Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU>
(significant portions)
Reviewed by: bde, fenner (earlier versions)


# 107052 18-Nov-2002 ru

libc_r wasn't so tied to libc for 22 months.


# 104941 11-Oct-2002 peter

Zap the early-adopter transition aid before we get into serious
5.0-R territory, as threatened. This only affects antique 5.0
systems that have not had a 'make world' done for well over a year.


# 104073 27-Sep-2002 peter

Zap now-unused SHLIB_MINOR


# 93254 26-Mar-2002 obrien

Embellish more.


# 93253 26-Mar-2002 obrien

Embellish the comment.


# 93048 23-Mar-2002 obrien

Update comments. We uniformly use __FBSDID in libc now.


# 81600 13-Aug-2001 peter

Rip out the old __stdin/out/err stuff. It was completely 100% useless. :-(
It was foiled because of dynamic copy relocations that caused compile-time
space to be reserved in .bss and at run time a blob of data was copied to
that space and everything used the .bss version.. The problem is that
the space is reserved at compile time, not runtime... So we *still* could
not change the size of FILE. Sigh. :-(

Replace it with something that does actually work and really does let us
make 'FILE' extendable. It also happens to be the same as Linux does in
glibc, but has the slight cost of a pointer. Note that this is the
same cost that 'fp = fopen(), fprintf(fp, ...); fclose(fp);' has.
Fortunately, actual references to stdin/out/err are not all that common
since we have implicit stdin/out/err-using versions of functions
(printf() vs. fprintf()).


# 72529 16-Feb-2001 imp

Fix the current libc breakage in current:
o Back out the __std* stuff. Can't figure out how to do this right now,
so we'll save it for late.
o use _up as a pointer for extra fields that we need to access.
o back out the libc major version bump.

Submitted by: green
reviewed by: peter, imp, green, obrien (to varying degrees).

We'll fix the "how do we stop encoding sizeof(FILE) in binaries" part
later.


# 72472 14-Feb-2001 peter

Commit a libc fix going by the current state of the version numbering
bikeshed in -arch. It isn't quite over, but it has been well established
that this can be adjusted or refined. But we do seem to have consensis
on a major bump of some sort. After this, it should reasonably safe
to build world again.

This change is to get rid of __sF[] and use seperate __stdin/out/err
handles. This means we can pad on extra bits onto the end of FILE
at will without going through this all over again. __sF[] was evil
because it compiled the sizeof(FILE) into every stdio using program.

Asbestos suit on: check!
Peril sensitive sunglasses on: check!
*gulp!*


# 71770 29-Jan-2001 deischen

Clean up syscall generation in libc by removing HIDDEN_SYSCALLS
and treating (almost) all system calls the same way:

__sys_foo - actual syscall
foo, _foo - weak definitions to __sys_foo

Change PSEUDO syscalls (currently only _exit and _getlogin) to
be __sys_foo (T) and _foo (W).

Add $FreeBSD$ to a few files to satisfy commitprep.

Suggested by: bde


# 71662 26-Jan-2001 deischen

Comment change only; s/_thread_sys_/__sys_/


# 71579 24-Jan-2001 deischen

Remove _THREAD_SAFE and make libc thread-safe by default by
adding (weak definitions to) stubs for some of the pthread
functions. If the threads library is linked in, the real
pthread functions will pulled in.

Use the following convention for system calls wrapped by the
threads library:
__sys_foo - actual system call
_foo - weak definition to __sys_foo
foo - weak definition to __sys_foo

Change all libc uses of system calls wrapped by the threads
library from foo to _foo. In order to define the prototypes
for _foo(), we introduce namespace.h and un-namespace.h
(suggested by bde). All files that need to reference these
system calls, should include namespace.h before any standard
includes, then include un-namespace.h after the standard
includes and before any local includes. <db.h> is an exception
and shouldn't be included in between namespace.h and
un-namespace.h namespace.h will define foo to _foo, and
un-namespace.h will undefine foo.

Try to eliminate some of the recursive calls to MT-safe
functions in libc/stdio in preparation for adding a mutex
to FILE. We have recursive mutexes, but would like to avoid
using them if possible.

Remove uneeded includes of <errno.h> from a few files.

Add $FreeBSD$ to a few files in order to pass commitprep.

Approved by: -arch


# 68699 14-Nov-2000 obrien

Bump the shared lib version. There seems to have been an incompatible
change committed to RELENG_4 where a bump there is now necessary.
We've got to go before RELENG_4 does.


# 51794 29-Sep-1999 marcel

sigset_t change (part 5 of 5)
-----------------------------

Most of the userland changes are in libc. For both the alpha
and the i386 setjmp has been changed to accomodate for the
new sigset_t. Internally, libc is mostly rewritten to use the
new syscalls. The exception is in compat-43/sigcompat.c

The POSIX thread library has also been rewritten to use the
new sigset_t. Except, that it currently only handles NSIG
signals instead of the maximum _SIG_MAXSIG. This should not
be a problem because current applications don't use any
signals higher than NSIG.

There are version bumps for the following libraries:
libdialog
libreadline
libc
libc_r
libedit
libftpio
libss

These libraries either a) have one of the modified structures
visible in the interface, or b) use sigset_t internally and
may cause breakage if new binaries are used against libraries
that don't have the sigset_t change. This not an immediate
issue, but will be as soon as applications start using the
new range to its fullest.

NOTE: libncurses already had an version bump and has not been
given one now.

NOTE: doscmd is a real casualty and has been disconnected for
the moment. Reconnection will eventually happen after
doscmd has been fixed. I'm aware that being the last one
to touch it, I'm automaticly promoted to being maintainer.
According to good taste this means that I will receive a
badge which either will be glued or mechanically stapled,
drilled or otherwise violently forced onto me :-)

NOTE: pcvt/vttest cannot be compiled with -traditional. The
change cause sys/types to be included along the way which
contains the const and volatile modifiers. I don't consider
this a solution, but more a workaround.


# 50476 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 38995 09-Sep-1998 kato

Change i386 in a few paths to ${MACHINE} to support MACHINE=pc98.


# 34372 09-Mar-1998 jb

Add an include path to private linc/libc_r/libpthread header files.

Define the HIDDEN_SYSCALLS macro as empty because libc doesn't have
renamed syscalls. This avoids an undefined macro error when
libc/sys/Makefile.inc goes to look though it. HIDDEN_SYSCALLS is
used by the equivalent makefile to this one in lib/libc_r to list
those syscalls that it needs to rename so that libc_r can provide
replacement functions.


# 33263 11-Feb-1998 nate

- Bump the minor # due to the addition of the stringlist functions.

Reviewed by: asami


# 26047 23-May-1997 asami

Use ${DESTDIR} correctly in front of absolute paths.


# 25401 03-May-1997 jb

Changed all paths to be relative to src/lib instead of src/lib/libc
so that all these makefiles can be used to build libc_r too.

Added .if ${LIB} == "c" tests to restrict man page builds to libc
to avoid needlessly building them with libc_r too.

Split libc Makefile into Makefile and Makefile.inc to allow the
libc_r Makefile to include Makefile.inc too.


# 24861 13-Apr-1997 jkh

Support GLOBAL style tags.


# 17580 13-Aug-1996 ache

Back out minor bumping per Peter suggestion


# 17573 13-Aug-1996 ache

Bump minor number - new function added


# 13940 06-Feb-1996 wollman

Remove support for OSI networking in user-land (#ifdef OSI aor CCITT)
in preparation for its removal from the kernel source tree. NB: because
a function was deleted, libc is now at version 3.0 (was 2.2 previously).


# 10012 09-Aug-1995 asami

Bump shlib minor because xdr_* functions have been enabled. Do NOT
bump it again if something else is added before 2.2.

The xdr_* functions are enabled only in the 2.2 (-current) branch
so far. If that modification is moved to the 2.1 (-stable) branch,
this one should, too.

Reviewed by: the mailing lists


# 9972 06-Aug-1995 bde

Install non-source files with the optional flag ${COPY}, not with the flag -c.


# 9970 06-Aug-1995 bde

Change `install' to `${INSTALL}' so that default install flags can be
specified in the top level Makefiles.

Previously I missed dozens of Makefiles that skip the install after
using `cmp -s' to decide that the install isn't necessary.


# 7493 30-Mar-1995 jkh

Add nls include to Makefile.


# 7421 27-Mar-1995 nate

Bump the shared library minor # because of the additions of the
strhash() functions.


# 5789 22-Jan-1995 dg

Changed LIB_SCCS and SYSLIB_SCCS #defines to LIB_RCS and SYSLIB_RCS.


# 2741 13-Sep-1994 wollman

Use latest Arthur Olson timezone code rather than that supplied with
4.4. The code is almost identical to the 4.4 versions, but this organization
should make it easier to merge new versions in the future.


# 2299 26-Aug-1994 wollman

libc.so should be installed immutable.


# 2203 22-Aug-1994 dg

WINE/user LDT support from John Brezak, ported to FreeBSD by Jeffrey Hsu
<hsu@soda.berkeley.edu>.
...Moved over from 1.1.5. Other portions of this commit were done by moving
the RCS files into place directly.


# 1919 07-Aug-1994 wollman

Add back in the YP code from 1.1.5. (This attribution brought to you
by Theo de Raadt.) Added a new make flag variable, NO_YP_LIBC, which
disables YP entirely. User-land programs to come later.


# 1916 07-Aug-1994 wollman

More directory cleanup after YP merge.


# 1849 04-Aug-1994 wollman

First crack at making libc work with the new make macros. It compiles on
my machine, and a simple static (genassym) and shared (sysctl) executable
both work. Still to be done: RPCand YP merge.


# 1574 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1573,
which included commits to RCS files with non-trunk default branches.


# 1573 27-May-1994 rgrimes

BSD 4.4 Lite Lib Sources