Commit Graph

73 Commits

Author SHA1 Message Date
Ruslan Ermilov
71ce49ae8d Fixed "make checkdpadd" (missing library dependencies).
Approved by:	re (kensmith)
2007-10-01 18:15:11 +00:00
Alexander Kabaev
0212104ba9 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.
2007-05-19 16:38:39 +00:00
Alexander Kabaev
e20b165899 Make sure GCC will not try to link libc with itself. 2007-05-19 04:32:56 +00:00
Daniel Eischen
00fb440c1a 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.
2007-05-13 14:12:40 +00:00
Simon L. B. Nielsen
3dd425f70b 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
2007-03-04 12:25:03 +00:00
Ruslan Ermilov
2b46c64c9c Remove alpha left-overs. 2006-08-22 08:03:01 +00:00
Andrey A. Chernov
55cd304ad1 Remove pending actions asked in comments for SHLIB_MAJOR bump, done.
Reviewed by:    ume
2006-05-22 05:12:44 +00:00
Hajimu UMEMOTO
794063c03f Bump library majro version for gethostbyaddr(3). 2006-05-21 15:15:21 +00:00
Hajimu UMEMOTO
06a99fe36f - 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
2006-04-28 12:03:38 +00:00
Hajimu UMEMOTO
5342d17f09 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)
2006-03-21 16:11:11 +00:00
Ruslan Ermilov
fcaa466865 Provide alternate default for SHLIBDIR before bsd.own.mk does this.
Reported by:	phk
2006-03-18 11:01:06 +00:00
Ruslan Ermilov
e1fe3dba5c 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)
2006-03-17 18:54:44 +00:00
Daniel Eischen
96e022f7f3 Allow bsd.lib.mk to generate the symbol version map. 2006-03-16 15:16:23 +00:00
Ruslan Ermilov
3029eff743 Desupport the undocumented NO_QUAD option, just don't compile
the quad support on 64-bit platforms.
2006-03-16 14:22:19 +00:00
Daniel Eischen
c053f1f8ac 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
2006-03-13 00:56:02 +00:00
Peter Grehan
ec9cc1fc12 gmon now supported on powerpc 2005-12-29 04:10:52 +00:00
Poul-Henning Kamp
3d86554c20 Respect the YES_HESIOD build variable. 2005-08-06 16:53:55 +00:00
David Schultz
bd15659f64 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.
2005-01-15 05:23:58 +00:00
Bjoern A. Zeeb
6c58990d47 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
2004-11-13 20:40:32 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
Tim J. Robbins
6bc2b4b7db Bump the libc major version number to 6. 2004-10-17 01:52:48 +00:00
Olivier Houchard
2357939bc2 Import the FreeBSD/arm libc bits.
Obtained from:	NetBSD
2004-05-14 12:04:31 +00:00
David Schultz
757edc654e 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.
2004-05-02 10:55:07 +00:00
Jacques Vidrine
8e1b0bc697 libc is now WARNS=2 clean with the exception of the gdtoa bits (which
are now not built with warnings enabled at all).
2004-01-19 16:16:53 +00:00
Dag-Erling Smørgrav
f434fe1237 Add and document ffsl(), fls() and flsl(). 2004-01-13 16:05:47 +00:00
Ruslan Ermilov
042a0b7e95 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.
2004-01-11 10:42:47 +00:00
Bruce Evans
e481bf775f Fixed English error in previous commit. Fixed some older English errors.
Removed a redundant clause.
2003-12-11 09:53:25 +00:00
Mike Heffner
9e1cf49390 Add reference to standards/55112 for next time SHLIB_MAJOR is bumped.
Suggested by: wollman
2003-12-10 16:33:17 +00:00
Jacques Vidrine
8d870a43f9 Baby steps. Set WARNS=1 for libc. 2003-11-17 04:20:02 +00:00
Garrett Wollman
89a26fd1fc 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
2003-08-19 23:01:46 +00:00
David E. O'Brien
4f4a104ee8 style.Makefile(5) 2003-08-18 15:25:39 +00:00
Gordon Tetlow
41d8423f71 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.
2003-08-17 08:28:46 +00:00
Ruslan Ermilov
0b3cbc5c38 Axe AINC.
Submitted by:	bde
2003-07-01 15:07:01 +00:00
David E. O'Brien
120a95cb50 Clean up the way gdtoa sources are found.
OK'ed by:	das
2003-03-13 18:55:14 +00:00
David Schultz
6a66acb565 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
2003-03-12 20:30:00 +00:00
Mike Barcroft
8cf5ed5125 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)
2003-02-08 20:37:55 +00:00
Ruslan Ermilov
c51d717f0c libc_r wasn't so tied to libc for 22 months. 2002-11-18 09:50:57 +00:00
Peter Wemm
74a4ba21f7 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.
2002-10-11 22:38:17 +00:00
Peter Wemm
224af215a6 Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00
David E. O'Brien
57f8b17ed0 Embellish more. 2002-03-26 23:09:34 +00:00
David E. O'Brien
54a5fb6c94 Embellish the comment. 2002-03-26 23:08:42 +00:00
David E. O'Brien
ecaaecd7a4 Update comments. We uniformly use __FBSDID in libc now. 2002-03-23 20:08:00 +00:00
Peter Wemm
2b618987fe 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()).
2001-08-13 21:48:44 +00:00
Warner Losh
91e1be28dc 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.
2001-02-16 06:11:22 +00:00
Peter Wemm
ff9dc074b5 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!*
2001-02-14 05:00:20 +00:00
Daniel Eischen
c37592a194 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
2001-01-29 03:23:46 +00:00
Daniel Eischen
c701da2b6e Comment change only; s/_thread_sys_/__sys_/ 2001-01-26 02:27:06 +00:00
Daniel Eischen
d201fe46e3 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
2001-01-24 13:01:12 +00:00
David E. O'Brien
fe17fef5d2 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.
2000-11-14 02:46:23 +00:00
Marcel Moolenaar
3cf3c5d9dd 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.
1999-09-29 15:18:46 +00:00