1997-05-02 23:50:06 -04:00
|
|
|
# from @(#)Makefile.inc 8.3 (Berkeley) 2/4/95
|
1999-08-27 20:22:10 -04:00
|
|
|
# $FreeBSD$
|
1994-05-27 01:00:24 -04:00
|
|
|
|
|
|
|
|
# machine-independent stdlib sources
|
2014-03-03 21:19:39 -05:00
|
|
|
.PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/stdlib ${LIBC_SRCTOP}/stdlib
|
1994-05-27 01:00:24 -04:00
|
|
|
|
2016-09-15 23:04:48 -04:00
|
|
|
MISRCS+=C99_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \
|
2017-01-07 11:05:19 -05:00
|
|
|
bsearch.c \
|
|
|
|
|
cxa_thread_atexit.c cxa_thread_atexit_impl.c \
|
|
|
|
|
div.c exit.c getenv.c getopt.c getopt_long.c \
|
2015-12-27 02:50:11 -05:00
|
|
|
getsubopt.c hcreate.c hcreate_r.c hdestroy_r.c heapsort.c heapsort_b.c \
|
|
|
|
|
hsearch_r.c imaxabs.c imaxdiv.c \
|
2012-04-17 03:22:14 -04:00
|
|
|
insque.c l64a.c labs.c ldiv.c llabs.c lldiv.c lsearch.c \
|
Alter the prototype of qsort_r(3) to match POSIX, which adopted the
glibc-based interface.
Unfortunately, the glibc maintainers, despite knowing the existence
of the FreeBSD qsort_r(3) interface in 2004 and refused to add the
same interface to glibc based on grounds of the lack of standardization
and portability concerns, has decided it was a good idea to introduce
their own qsort_r(3) interface in 2007 as a GNU extension with a
slightly different and incompatible interface.
With the adoption of their interface as POSIX standard, let's switch
to the same prototype, there is no need to remain incompatible.
C++ and C applications written for the historical FreeBSD interface
get source level compatibility when building in C++ mode, or when
building with a C compiler with C11 generics support, provided that
the caller passes a fifth parameter of qsort_r() that exactly matches
the historical FreeBSD comparator function pointer type and does not
redefine the historical qsort_r(3) prototype in their source code.
Symbol versioning is used to keep old binaries working.
MFC: never
Relnotes: yes
Reviewed by: cem, imp, hps, pauamma
Differential revision: https://reviews.freebsd.org/D17083
2022-09-30 18:26:30 -04:00
|
|
|
merge.c mergesort_b.c ptsname.c qsort.c qsort_r.c qsort_r_compat.c \
|
|
|
|
|
qsort_s.c quick_exit.c radixsort.c rand.c \
|
2017-03-30 00:57:26 -04:00
|
|
|
random.c reallocarray.c reallocf.c realpath.c remque.c \
|
|
|
|
|
set_constraint_handler_s.c strfmon.c strtoimax.c \
|
2018-01-30 22:05:14 -05:00
|
|
|
strtol.c strtold.c strtoll.c strtoq.c strtoul.c strtonum.c strtoull.c \
|
2018-08-19 10:22:45 -04:00
|
|
|
strtoumax.c strtouq.c system.c tdelete.c tfind.c tsearch.c twalk.c
|
1994-05-27 01:00:24 -04:00
|
|
|
|
2021-07-23 14:04:21 -04:00
|
|
|
CFLAGS.qsort.c+= -Wsign-compare
|
|
|
|
|
|
2016-09-15 23:04:48 -04:00
|
|
|
# Work around an issue on case-insensitive file systems.
|
|
|
|
|
# libc has both _Exit.c and _exit.s and they both yield
|
|
|
|
|
# _exit.o (case insensitively speaking).
|
|
|
|
|
CLEANFILES+=C99_Exit.c
|
|
|
|
|
C99_Exit.c: ${LIBC_SRCTOP}/stdlib/_Exit.c .NOMETA
|
|
|
|
|
ln -sf ${.ALLSRC} ${.TARGET}
|
|
|
|
|
|
2014-03-03 21:19:39 -05:00
|
|
|
SYM_MAPS+= ${LIBC_SRCTOP}/stdlib/Symbol.map
|
2006-03-12 20:15:01 -05:00
|
|
|
|
1994-05-27 01:00:24 -04:00
|
|
|
# machine-dependent stdlib sources
|
2014-03-03 21:19:39 -05:00
|
|
|
.sinclude "${LIBC_SRCTOP}/${LIBC_ARCH}/stdlib/Makefile.inc"
|
1994-05-27 01:00:24 -04:00
|
|
|
|
2012-04-17 03:22:14 -04:00
|
|
|
MAN+= a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 \
|
2012-01-09 01:36:28 -05:00
|
|
|
atoi.3 atol.3 at_quick_exit.3 bsearch.3 \
|
Integrate the new MPSAFE TTY layer to the FreeBSD operating system.
The last half year I've been working on a replacement TTY layer for the
FreeBSD kernel. The new TTY layer was designed to improve the following:
- Improved driver model:
The old TTY layer has a driver model that is not abstract enough to
make it friendly to use. A good example is the output path, where the
device drivers directly access the output buffers. This means that an
in-kernel PPP implementation must always convert network buffers into
TTY buffers.
If a PPP implementation would be built on top of the new TTY layer
(still needs a hooks layer, though), it would allow the PPP
implementation to directly hand the data to the TTY driver.
- Improved hotplugging:
With the old TTY layer, it isn't entirely safe to destroy TTY's from
the system. This implementation has a two-step destructing design,
where the driver first abandons the TTY. After all threads have left
the TTY, the TTY layer calls a routine in the driver, which can be
used to free resources (unit numbers, etc).
The pts(4) driver also implements this feature, which means
posix_openpt() will now return PTY's that are created on the fly.
- Improved performance:
One of the major improvements is the per-TTY mutex, which is expected
to improve scalability when compared to the old Giant locking.
Another change is the unbuffered copying to userspace, which is both
used on TTY device nodes and PTY masters.
Upgrading should be quite straightforward. Unlike previous versions,
existing kernel configuration files do not need to be changed, except
when they reference device drivers that are listed in UPDATING.
Obtained from: //depot/projects/mpsafetty/...
Approved by: philip (ex-mentor)
Discussed: on the lists, at BSDCan, at the DevSummit
Sponsored by: Snow B.V., the Netherlands
dcons(4) fixed by: kan
2008-08-20 04:31:58 -04:00
|
|
|
div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \
|
2003-01-02 15:44:41 -05:00
|
|
|
hcreate.3 imaxabs.3 imaxdiv.3 insque.3 labs.3 ldiv.3 llabs.3 lldiv.3 \
|
2023-04-20 12:50:32 -04:00
|
|
|
lsearch.3 memory.3 ptsname.3 qsort.3 \
|
2011-12-07 10:25:48 -05:00
|
|
|
quick_exit.3 \
|
2018-08-19 10:39:57 -04:00
|
|
|
radixsort.3 rand.3 random.3 reallocarray.3 reallocf.3 realpath.3 \
|
|
|
|
|
set_constraint_handler_s.3 \
|
|
|
|
|
strfmon.3 strtod.3 strtol.3 strtonum.3 strtoul.3 system.3 \
|
2006-03-14 11:57:30 -05:00
|
|
|
tsearch.3
|
1994-05-27 01:00:24 -04:00
|
|
|
|
2005-12-24 17:37:59 -05:00
|
|
|
MLINKS+=a64l.3 l64a.3 a64l.3 l64a_r.3
|
2001-11-27 20:22:08 -05:00
|
|
|
MLINKS+=atol.3 atoll.3
|
2002-09-09 22:04:49 -04:00
|
|
|
MLINKS+=exit.3 _Exit.3
|
2023-03-13 18:01:12 -04:00
|
|
|
MLINKS+=getenv.3 clearenv.3 getenv.3 putenv.3 getenv.3 secure_getenv.3 \
|
|
|
|
|
getenv.3 setenv.3 getenv.3 unsetenv.3
|
2004-02-24 03:07:26 -05:00
|
|
|
MLINKS+=getopt_long.3 getopt_long_only.3
|
2001-05-15 03:08:20 -04:00
|
|
|
MLINKS+=hcreate.3 hdestroy.3 hcreate.3 hsearch.3
|
2014-07-21 11:22:48 -04:00
|
|
|
MLINKS+=hcreate.3 hcreate_r.3 hcreate.3 hdestroy_r.3 hcreate.3 hsearch_r.3
|
2002-10-16 10:00:46 -04:00
|
|
|
MLINKS+=insque.3 remque.3
|
2002-10-16 10:29:23 -04:00
|
|
|
MLINKS+=lsearch.3 lfind.3
|
2020-10-17 00:14:38 -04:00
|
|
|
MLINKS+=ptsname.3 grantpt.3 ptsname.3 ptsname_r.3 ptsname.3 unlockpt.3
|
2020-01-20 06:40:07 -05:00
|
|
|
MLINKS+=qsort.3 heapsort.3 qsort.3 mergesort.3 qsort.3 qsort_r.3 \
|
|
|
|
|
qsort.3 qsort_s.3
|
2019-12-14 03:28:10 -05:00
|
|
|
MLINKS+=rand.3 rand_r.3 rand.3 srand.3
|
1997-03-23 18:12:59 -05:00
|
|
|
MLINKS+=random.3 initstate.3 random.3 setstate.3 random.3 srandom.3 \
|
|
|
|
|
random.3 srandomdev.3
|
2004-05-12 04:13:40 -04:00
|
|
|
MLINKS+=radixsort.3 sradixsort.3
|
2018-08-19 10:39:57 -04:00
|
|
|
MLINKS+=set_constraint_handler_s.3 abort_handler_s.3
|
|
|
|
|
MLINKS+=set_constraint_handler_s.3 ignore_handler_s.3
|
2012-06-25 17:51:40 -04:00
|
|
|
MLINKS+=strfmon.3 strfmon_l.3
|
2003-04-05 02:33:46 -05:00
|
|
|
MLINKS+=strtod.3 strtof.3 strtod.3 strtold.3
|
2001-11-27 22:37:06 -05:00
|
|
|
MLINKS+=strtol.3 strtoll.3 strtol.3 strtoq.3 strtol.3 strtoimax.3
|
|
|
|
|
MLINKS+=strtoul.3 strtoull.3 strtoul.3 strtouq.3 strtoul.3 strtoumax.3
|
2001-03-14 20:53:17 -05:00
|
|
|
MLINKS+=tsearch.3 tdelete.3 tsearch.3 tfind.3 tsearch.3 twalk.3
|