History log of /src/lib/libutil/Makefile
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
# 1.87 03-Jun-2023 lukem

bsd.own.mk: rename GCC_NO_* to CC_WNO_*

Rename compiler-warning-disable variables from
GCC_NO_warning
to
CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.


# 1.86 28-Mar-2023 rillig

lint: warn about extern declarations outside headers

https://mail-index.netbsd.org/tech-userlevel/2023/03/15/msg013727.html


Revision tags: netbsd-10-1-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
# 1.85 13-Oct-2019 mrg

introduce some common variables for use in GCC warning disables:

GCC_NO_FORMAT_TRUNCATION -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints. many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."


# 1.84 08-Oct-2019 christos

-Wstringop-truncation is only gcc.


# 1.83 04-Oct-2019 christos

Ignore strncpy(foo, bar, sizeof(foo)) for the wtmp fields where we don't
want NUL termination. We can't use pragma's because the old gcc complains
about the new warnings it does not understand.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407
# 1.82 04-Apr-2018 kre

branches: 1.82.2;

Document opendisk1() - it has been around long enough.
(pity about the name...)

XXX pullup-8


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.81 01-Apr-2017 abhinav

branches: 1.81.10;
Add man page links for:
EV_SET to kqueue(2)
getmntoptstr, getmntoptnum, freemntopts to getmntopts(3)

Reviewed by wiz@


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.80 29-Dec-2016 christos

branches: 1.80.2;
Make this portable to other OSs


Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.79 10-Apr-2016 roy

branches: 1.79.2;
Implement pidfile_lock, pidfile_read and pidfile_clean.

Discussed on tech-net@, ok core@.


# 1.78 24-Sep-2015 christos

Add kinfo_getvmmap from FreeBSD


# 1.77 26-Jul-2015 kamil

Add ereallocarr(3) to libutil

ereallocarr(3) wraps reallocarr(3) and embeds return status validation.

Older version reviewed by <riastradh> and <christos>


# 1.76 18-Jan-2015 christos

add estro{i,u} (Kamil Rytarowski)


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base tls-maxphys-base
# 1.75 20-Jun-2013 christos

document login_getpwclass(3)


# 1.74 02-May-2013 matt

Add getbyteorder() call.


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4
# 1.73 07-Apr-2012 christos

branches: 1.73.2;
- add getdiskrawname.
- exit on error for lint.


# 1.72 07-Apr-2012 christos

add getfsspecname


# 1.71 21-Mar-2012 matt

These directories default to WARNS?=5


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.70 07-Jan-2012 christos

- add strspct
- be explicit about string not being NUL terminated if bufsiz == 0


# 1.69 13-Nov-2011 christos

add manual page


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.68 21-Oct-2011 christos

branches: 1.68.2;
Add proc_compare


# 1.67 21-Oct-2011 christos

Don't use = to assing SRCS, but += so that we can remove snprintb.c,
which was added elsewhere.


# 1.66 30-Aug-2011 bouyer

Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.


# 1.65 29-Aug-2011 jruoho

Build libutil(3) as a link to util(3).


# 1.64 28-Aug-2011 christos

add strpct, requested by joerg


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.63 27-Jan-2010 drochner

retire pw_policy(3) -- it is not found useful, there are other
(more common) ways to enforce a password strength policy
approved by elad


Revision tags: matt-premerge-20091211
# 1.62 20-Jun-2009 christos

add a link to pw_copyx; from anon ymous


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.61 13-May-2009 pgoyette

Implement snprintb_m(3) to provide multi-line bit/bit-field decode.
Discussed on tech-kern.


# 1.60 18-Jan-2009 lukem

branches: 1.60.2;
WARNS=4


# 1.59 11-Jan-2009 christos

merge christos-time_t


Revision tags: christos-time_t-base
# 1.58 26-Dec-2008 christos

branches: 1.58.2;
document pw_getpwconf.


# 1.57 16-Dec-2008 christos

move snprintb to common


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.56 25-Sep-2007 lukem

Add raise_default_signal(3) -- raise the default signal handler.
Can be used by applications that have their own SIGINT (et al)
handlers and want to exit in a manner that correctly
signals to the parent that the process was terminated by a signal.
See http://www.cons.org/cracauer/sigint.html for more info.
Discussed on tech-userlevel@.


Revision tags: matt-mips64-base
# 1.55 01-Jul-2007 pooka

branches: 1.55.4;
add estrndup()


# 1.54 14-Dec-2006 christos

moved string_to_flags and flags_to_string from ls to libutil.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base netbsd-4-base
# 1.53 20-Nov-2006 christos

rename getdate to parsedate to avoid conflict with posix function


# 1.52 17-Nov-2006 christos

add getdate.


# 1.51 20-Oct-2006 christos

include ecalloc() from our anonymous user.


# 1.50 26-Aug-2006 christos

Add efun(3)


Revision tags: abandoned-netbsd-4-base
# 1.49 14-Sep-2005 elad

Add pw_policy.3.
From Hisashi T Fujinaka, thanks!


# 1.48 14-Sep-2005 elad

Introduce pw_policy(3), an easily extendable way of defining password
policies and enforcing them in programs.

Man-page written with much help and tips from David Maxwell, Hubert
Feyrer, and Thomas Klausner.

This bumps libutil minor to 7.

XXX: Need default policy to go in /etc/passwd.conf, and integration
into local/yp/PAM password changing code.

PR/10206.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.47 11-Dec-2004 christos

WARNS=3; fix cast-qual issues.


# 1.46 20-Nov-2004 christos

Add a manual page.


# 1.45 19-Nov-2004 christos

Add sockaddr_snprintf; XXX: Needs a man page.


# 1.44 11-Nov-2004 dsl

Add if_media.c, functions for converting media to/from strings.
(from ifconfig.c)


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.43 22-Mar-2003 jdolecek

branches: 1.43.4;
move getmntopts(3) to libutil, build and install also it's manpage
bump libutil minor
adjust individual mount_*/Makefile to use libutil getmntopts(3)


Revision tags: fvdl_fs64_base
# 1.42 12-Dec-2002 scw

Add getlabelsector() and getlabeloffset() as wrappers around the
KERN_LABELSECTOR and KERN_LABELOFFSET sysctls.


# 1.41 30-Nov-2002 lukem

- Migrate fparseln(3) from libutil to libc, where it should have been in
the first place...
- Bump libutil major (to 7.0) and libc minor (to 12.91).


# 1.40 12-Oct-2002 elric

Added two functions disklabel_dkcksum() and disklabel_scan() to libutil
so that they can be shared by disklabel(8) and cgdconfig(8).


# 1.39 27-Sep-2002 jdolecek

put utmpx/wtmpx routines to separate files, so that programs overriding the
utmp/wtmp routines could still be linked static
fixes e.g. static build of ftpd


# 1.38 27-Sep-2002 wiz

Add documentation for utmpx and some related functions.
Thanks for some explanations to christos, and for some STANDARDS hints
to Klaus Klein.


# 1.37 20-Sep-2002 christos

Add snprintb(3) inspired from bitmask_snprintf(9), but made to look like
more like snprintf(3). Discussed with thorpej.


# 1.36 22-Aug-2002 abs

Move humanize_number(3) from libutil to libc as per discussion on tech-misc
Revert minor number bump on libutil (with note to skip it next update), and
bump libc.


# 1.35 19-Aug-2002 lukem

Explicitly move setting of NOxxx and USE_SHLIBDIR to the top of the
Makefile (before including <bsd.own.mk>)


# 1.34 19-Aug-2002 lukem

Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path (etc).
(Reduces make output by ~ 20%)


# 1.33 08-Aug-2002 abs

Add humanize_number.3 from Tomas Svensson in PR lib/15508.
Bump version of libutil


Revision tags: netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.32 28-Dec-2001 lukem

branches: 1.32.2;
* 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


# 1.31 23-Nov-2001 gmcgarry

Add a catch-all man page for libutil.


# 1.30 20-Aug-2001 wiz

Rename secure_path(3) source file from securepath.c to secure_path.c.


# 1.29 06-Apr-2001 wiz

Add getbootfile(3) to libutil, and a man page.
Bump libutil version to 5.5.


# 1.28 06-Dec-2000 tron

Add two new passwd file update functions:
- The pw_setprefix() function defines the root directory used for passwd
file updates. If the prefix is set to /newroot pw_lock() will operate on
/newroot/etc/ptmp afterwards. The default prefix is an empty string.
- The pw_getprefix() function returns the root directory which is currently
used for passwd file updates.


# 1.27 07-Jul-2000 itojun

rename securepath.3 into secure_path.3, as the function is named secure_path().
it is too hard to guess...


# 1.26 06-Jul-2000 ad

Documentation for pw_getconf(). From OpenBSD.


Revision tags: netbsd-1-5-base minoura-xpg4dl-base
# 1.25 12-May-2000 mjl

branches: 1.25.4;
Correct typos which prevent man pages from being installed.
Fixes PR/10104 by Greg Woods.


# 1.24 12-Jan-2000 mjl

Add necessary support routines for login.conf.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.23 02-Jul-1999 simonb

More trailing white space.


# 1.22 06-Jun-1999 thorpej

Add pidfile(3), which write a pid file in /var/run, and arranges for it
to be removed on normal exit.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.21 15-Jan-1999 bouyer

Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.


# 1.20 14-Oct-1998 kleink

Kill __LIBUTIL_BUILD in favor of the newly added _LIBC indicator completely;
suggested by Jason Thorpe.


# 1.19 27-Jun-1998 thorpej

Put pw_scan() back into libutil and pretent that libutil.so.5.0 never
existed.


# 1.18 18-Mar-1998 bouyer

Add bswap{16,32,64} functions to libutil. Because of this, bump minor.


# 1.17 16-Nov-1997 christos

PR/4475: Jason R. Thorpe: there is no common function to parse a continued
line.


# 1.16 23-Oct-1997 lukem

use CPPFLAGS instead of CFLAGS, remove -Wall et al (WARNS=1 already does this)


Revision tags: netbsd-1-3-base
# 1.15 11-Oct-1997 cjs

branches: 1.15.2;
Add pidlock, ttylock, ttyunlock functions.


# 1.14 09-Oct-1997 lukem

- define WARNS?=1 in the top-level Makefile.inc, and don't define
anywhere else.
- for now, override WARNS=0 in librpcsvc and libwrap, until they're
cleaned up
- rcsid police

lib is now clean (except for librpcsvc and libwrap) on the i386, and
this should motivate the other ports to fix any other minor problems
that their compilers pick up that the i386 version doesn't.


# 1.13 09-Oct-1997 lukem

WARNSify


# 1.12 25-Sep-1997 lukem

implement opendisk(3), as discussed with Jason Thorpe


# 1.11 29-Jun-1997 christos

Add ttymsg.3 to the man pages.


# 1.10 29-Jun-1997 christos

- RCSID police
- Add ttymsg.3


# 1.9 14-Nov-1996 gwr

Add ttyaction.3 and ttyaction.c


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.8 16-May-1996 thorpej

Add two functions to libutil:

- getmaxpartitions: get the value of MAXPARTITIONS for the
currently running system

- getrawpartition: get the value of RAW_PART for the
currently running system

These functions are necessary since the value of MAXPARTITIONS might
be different across platforms which are binary compatible (e.g. amiga
and sun3).


# 1.7 15-May-1996 jtc

Minor reorganization of libutil, including the addition of passward
locking and editing functions.
From Greg Hudson <ghudson@MIT.EDU>


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.6 04-May-1994 cgd

minor cleanup; kill unnecessary casts


# 1.5 27-Jan-1994 cgd

get rid of stuff that doesn't belong here


# 1.4 06-Aug-1993 mycroft

Add getbsize() from Berkeley, somewhat modified.


# 1.3 01-Aug-1993 mycroft

Add RCS identifiers.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.2 17-Jun-1993 mycroft

Don't need -I/sys any more.


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision