Commit Graph

141 Commits

Author SHA1 Message Date
joerg b9cf7d31ab Add the constant database reader (cdbr(3)) and writer ((cdbw(3)).
They implement a space efficent write-once database with fast access
path. Switch the services(5) database to use cdb. The size of the
database file decreases from 2.1MB disk space to 307KB. Access
performance is about the same if setservent(0) is used and about an
order of magnitude faster otherwise. services_mkdb defaults to the new
format, but can optionally create the old db(3) format as well for
statically linked legacy applications.
2010-04-25 00:54:44 +00:00
uebayasi 37469dacdd Provide the phony "tags" target as previous. Make it depend on the real
target.  In case someone assumes the target as an interface.
2009-12-06 12:56:59 +00:00
uebayasi c1fa6bf05b Make the local "tags" target an absolute path, ${.OBJDIR}/tags, otherwise
it conflicts with the "tags" target defined in bsd.own.mk, which is .PHONY,
which causes you to re-build "tags" everytime you re-run make.
2009-12-06 06:30:52 +00:00
dsl 05e1772663 Change (slightly) the way NO_SRCS is processed, update big comment!
Now the .c file is removed from SRCS for both .S and .c in NO_SRSC.
The .c file is added to LSRCS for .S files in NO_SRCS.
(.S files in SRCS have the same treatment - but also get compiled.)
Allows vax build to be fixed.
Also the previous version failed to add to LSRCS correctly.
2009-08-11 17:29:04 +00:00
dsl 0d34d14bb9 If SRCS contains any .S files then remove the corresponding .c file from
SRCS and add to LSRCS (for lint).
Change the 'string' Makefiles so that the arch/*/string/Makefile.inc
need only specify the .S files for that architecture and not the .c
files for all the files they don't override.
2009-07-30 20:57:15 +00:00
mrg 2f0d0e12bf define and use LIBCDIR in terms of .CURDIR. fixes compat/lib/libc build. 2008-10-26 07:43:07 +00:00
ad 7a21650601 Install manual pages for the atomic ops. 2008-06-23 10:22:40 +00:00
he c26a54ba24 Ensure that we pass -z initfirst to the linker. The mips gcc
was unhappy about the missing -Wl specification.
2007-12-08 18:34:51 +00:00
ad 558a5ffd0f rtld changes for PR bin/37347:
- Apply patch from J.T. Conklin to execute .init/.fini functions in order.
- Support DF_1_INITFIRST and mark libc with DF_1_INITFIRST. Shared libs
  should be recording a dependency on libc, but it's too late to do that.

Ok christos@.
2007-12-07 20:34:04 +00:00
ad ec4d182d4a - stack_protector.c doesn't really belong under sys/. Add a new directory
for misc support routines and put it there.
- Add a libc constructor. Use this to initialize threading and the
  stack protector stuff. libpthread cannot be initialized safely using
  its own constructor because libc and libpthread are deeply intertwined.
  PR bin/37347
2007-11-13 15:21:19 +00:00
tls 2368dc663d Move FORTIFY_SOURCE implementation from the somewhat ill-named "libssp"
(what other systems keep in libssp, we already have in libc) into libc
to match what other systems with FORTIFY_SOURCE do.  Goodbye, libssp
dependency in libraries and executables.  Discussed with christos and
mrg; Christos will merge the headers to get us the rest of the way to a
FORTIFY_SOURCE implementation that works as others' code expects.
2007-05-30 01:13:14 +00:00
tnozaki 037cfac899 revert to rev1.127 for iconv(3). 2007-03-19 12:27:22 +00:00
tnozaki 7ed1567506 don't use CPPPICFLAGS but CPICFLAGS.
CPPPICFLAGS obly affect *.s sources only,
but we want -D_I18N_DYNAMIC flag for *.c source
(src/lib/libc/citrus_module.c and so on).
use CPICFLAGS instead.

this fix suggested by tsutsui-san in current-users@, thanks.
2007-03-18 08:52:48 +00:00
matt e92466d560 Don't modify CSHPICFLAGS. (this causes .so file to be made when they shouldn't)
if MKPICLIB is "no", change CPPPICFLAGS otherwise add change CPPFLAGS
2007-03-15 00:59:32 +00:00
christos eb961d0e02 Add glue to build the compat library as a separate "libcold" turned off by
default. Clean up the libc Makefile and remove obsolete stuff such as copy
to libkern.
2006-03-11 21:07:18 +00:00
kleink 3cd8501c1e Drop in gdtoa as a replacement for dtoa, strtod() from stdlib/strtod.c. 2006-01-25 15:43:01 +00:00
christos e5548b402a Use reach-over sources from common/lib/libc 2005-12-20 19:31:47 +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
thorpej d93ab54e03 Use TOOL_GENASSYM. Part of PR toolchain/30350 2005-05-30 16:02:56 +00:00
matt 57947b7b48 Make longjmp on vax not use sigreturn. Instead it rewrites the
jmp_buf into one compatible with __longjmp14 and relies on that
to change that into a ucontext_t suitable for setcontext(2).
2005-05-03 04:37:33 +00:00
lukem 9505ced464 minor whitespace consistency 2005-01-10 02:32:46 +00:00
thorpej de1dfb1250 DCE 1.1 RPC compatible UUID routines for libc, adapted from FreeBSD.
Encode/decode to big/little endian binary blob routines adapted from
kernel.

PR 23470.
2004-09-13 21:44:54 +00:00
lukem 934fa4ac14 support MAKEVERBOSE in tags: 2004-07-31 14:13:05 +00:00
christos d14c1915e0 Finish bind9 resolver merge. 2004-05-21 02:30:03 +00:00
lukem 1f560b89c0 Append to AFLAGS rather than setting AINC. 2004-04-18 04:26:15 +00:00
ross 317058e147 Ignore errors when making tags here with the override target. (Now matches
the default target in bsd.dep.mk, which dashes the ctags commands.)
2004-04-07 03:49:16 +00:00
matt 3bd8b208cf Add support to generate an assym.h if corresponding ARCHDIR contains a
genassym.cf.
2004-03-03 22:57:26 +00:00
matt 3c12447a00 Make building IPv6 support controllable by MKINET6 2003-12-07 21:57:22 +00:00
lukem 001c68bd94 Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
2003-07-10 10:33:58 +00:00
tshiozak ff5c3e6895 Citrus iconv support(4)
add iconv external I/F (iconv.h - iconv_open()/iconv()/iconv_close()) and
iconv(1) utility.
TODO:
  - bump libc minor.
  - add iconv data files.
  - create manpages: iconv_open(3)/iconv(3)/iconv_close(3)/iconv(1)/
    mkesdb(1)/mkcsmapper(1).
2003-06-27 05:21:49 +00:00
salo 0db44986d2 Add slovak language libc message catalog. 2003-04-14 05:21:47 +00:00
jmmv 33b8c350b6 Add a Catalan libc message catalog file (plus everything else needed to
track the file).  Closes my own PR lib/19498.
2003-04-09 20:17:06 +00:00
thorpej 3fdac2b8c5 Merge the nathanw_sa branch. 2003-01-18 10:52:16 +00:00
lukem ec5dbc56b8 Explicitly move setting of NOxxx and USE_SHLIBDIR to the top of the
Makefile (before including <bsd.own.mk>)
2002-08-19 14:55:14 +00:00
lukem ebb6fc9eb8 Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path (etc).
(Reduces make output by ~ 20%)
2002-08-19 09:41:27 +00:00
yamt e8f5276e42 for _I18N_DYNAMIC, use CSHLIBFLAGS instead of CPICFLAGS. 2002-07-20 08:51:32 +00:00
thorpej 9c33b55e7c Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.

	* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
	  of the infratsructure (libraries, support programs, etc.)

	* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
	  building of support for using the corresponding API
	  in various libraries/programs that can use it.

As discussed on tech-toolchain.
2002-03-22 18:10:19 +00:00
tshiozak dc7d18ff88 refine i18n stuffs.
- add libc/citrus directory.
    this directory contains the common stuffs not only for locale
    but also other facilities relating to i18n (e.g. iconv).
  - To keep the binary compatibility for the ctype modules easily,
    the interface between libc and the modules is simplified.
  - For the future integrated extension, module pool is renamed
    from "/usr/lib/runemodule" to "/usr/lib/i18n".
    In the future, this directory will contain the modules for "iconv",
    "collation", etc.
  - some cosmetic changes.
  - Bug fix for runetype.h; __attribute__((__packed__)) is placed at
    the wrong position and it is invalid unintentionally.
    But, the all members of the structures seem well-aligned.  Thus,
    this bug causes no problem, hopefully.

HEADS UP:
  - /usr/lib/rumemodule is obsoleted.  If you use the multibyte locales,
    you need to install /usr/lib/i18n/* from sys/lib/i18n_module .
  - The binary compatibility of /usr/share/locale/*/LC_CTYPE is probably kept.
    Perhaps, the bug fix about __packed__ mentioned above breaks the
    compatibility...  Be careful especially on 64bit platforms.
2002-03-17 22:14:05 +00:00
thorpej 9656b77394 No need to reference .OBJDIR here. 2002-03-05 21:25:08 +00:00
tv 641ef06659 Make it possible for ctags to be a host tool. 2002-01-31 19:13:12 +00:00
lukem efcc9a4c9d * Add user-controlled mk.conf variables
- SHLIBDIR	Location to install shared libraries if ${USE_SHLIBDIR}
			is "yes".  Defaults to "/usr/lib".

	- USE_SHLIBDIR	If "yes", install shared libraries in ${SHLIBDIR}
			instead of ${LIBDIR}.  Defaults to "no".
			Sets ${_LIBSODIR} to the appropriate value.
			This may be set by individual Makefiles as well.

	- SHLINKDIR	Location of shared linker.  Defaults to "/usr/libexec".
			If != "/usr/libexec", change the dynamic-linker
			encoded in shared programs

* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
	libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
	libtermcap libutil libz

* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
  to ${_LIBSODIR}/${LIB}.so* for compatibility.

* Always install /sbin/init statically (for now)


The net effect of these changes depends on how the variables are set:

  1.)	If nothing is set or changed, there is no change from the
	current behaviour:
		- Static /bin, /sbin, and bits of /usr/*
		- Dynamic rest
		- Shared linker is /usr/libexec/ld*so

  2.)	If the following make variables are set:
		LDSTATIC=
		SHLINKDIR=/lib
		SHLIBDIR=/lib
	Then the behaviour becomes:
		- Dynamic tools
		- .so libraries used by /bin and /sbin are installed to /lib,
		  with symlinks from /usr/lib/lib*so to -> /lib/lib*so
		  where appropriate
		- Shared linker is /lib/ld*so

  3.)	As per 2.), but add the following variable:
		USE_SHLIBDIR=yes
	This forces all .so's to be instaleld in /lib (with compat
	symlinks), not just those tagged by their Makefiles to be.
	Again, compat symlinks are installed
2001-12-28 01:32:37 +00:00
zuntum beab4b57ef Add pl.msg file to nls/ directory and list it in the Makefile
-- now libc has polish messages

set LANG to "pl" in your environment to use it.
2001-09-02 13:13:41 +00:00
christos 261c265b50 I've had it. Raise the barrier on committing unlinted code. On the i386
make lint exit on warnings.
2001-02-06 18:47:09 +00:00
itojun 2dcdf0fcb8 (finally!) enable multibyte LC_CTYPE locale support.
the functionality will be available for dynamic-linked binary only, due to
limitation with dlopen() from within statically-linked binaries.
(statically-linked binary can still enjoy singlebyte LC_CTYPE locale support)

from citrus project.
2001-01-25 09:21:57 +00:00
tron 216b116e30 Remove duplicate "tags" target. 2001-01-16 12:10:29 +00:00
itojun 99b0df5333 use MACIHNE_CPU to determine architecture-dependent source code directory.
is use of exists(foo) safe enough?
TODO: many other places to fix
2001-01-08 08:29:59 +00:00
itojun f039f89ec5 prepare for sh3e[bl] split 2001-01-04 06:53:45 +00:00
bjh21 5aefcfdc06 Create shared ARM source for libc, and move arm26 port over to using it.
The code is (almost) a direct copy of the current arm26 sources.
It's identical to the current arm32 sources, with the following exceptions:
 - _C_LABEL is used on references to C labels from assembler.
 - Function returns in assembler have APCS-26 versions in #ifdef __APCS_26__.
 - It uses SoftFloat 2a rather than SoftFloat 1a.

The first two of these should be inconsequential.  I believe that SoftFloat 2a
should work on arm32 and be backward-compatible with existing code, but this
is not obviously true.  For now, arm32 remains using its own bits of libc.
2000-12-29 20:13:44 +00:00
christos 0c0e139779 Ignore empty translation unit errors. 2000-12-20 21:13:56 +00:00