diff options
author | Brian Behlendorf <[email protected]> | 2010-09-04 13:26:23 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-09-08 12:38:56 -0700 |
commit | 6283f55ea1b91e680386388c17d14b89e344fa8d (patch) | |
tree | 2d475646019ffc2cf23c62a64de77cd220c53ebd /lib/libuutil | |
parent | 5e6121455c0b941f4612ceb2c1f312d527534b46 (diff) |
Support custom build directories and move includes
One of the neat tricks an autoconf style project is capable of
is allow configurion/building in a directory other than the
source directory. The major advantage to this is that you can
build the project various different ways while making changes
in a single source tree.
For example, this project is designed to work on various different
Linux distributions each of which work slightly differently. This
means that changes need to verified on each of those supported
distributions perferably before the change is committed to the
public git repo.
Using nfs and custom build directories makes this much easier.
I now have a single source tree in nfs mounted on several different
systems each running a supported distribution. When I make a
change to the source base I suspect may break things I can
concurrently build from the same source on all the systems each
in their own subdirectory.
wget -c http://github.com/downloads/behlendorf/zfs/zfs-x.y.z.tar.gz
tar -xzf zfs-x.y.z.tar.gz
cd zfs-x-y-z
------------------------- run concurrently ----------------------
<ubuntu system> <fedora system> <debian system> <rhel6 system>
mkdir ubuntu mkdir fedora mkdir debian mkdir rhel6
cd ubuntu cd fedora cd debian cd rhel6
../configure ../configure ../configure ../configure
make make make make
make check make check make check make check
This change also moves many of the include headers from individual
incude/sys directories under the modules directory in to a single
top level include directory. This has the advantage of making
the build rules cleaner and logically it makes a bit more sense.
Diffstat (limited to 'lib/libuutil')
-rw-r--r-- | lib/libuutil/Makefile.am | 30 | ||||
-rw-r--r-- | lib/libuutil/Makefile.in | 119 | ||||
-rw-r--r-- | lib/libuutil/include/libuutil.h | 390 | ||||
-rw-r--r-- | lib/libuutil/include/libuutil_common.h | 35 | ||||
-rw-r--r-- | lib/libuutil/include/libuutil_impl.h | 181 |
5 files changed, 67 insertions, 688 deletions
diff --git a/lib/libuutil/Makefile.am b/lib/libuutil/Makefile.am index 6edca7313..6ff181d7a 100644 --- a/lib/libuutil/Makefile.am +++ b/lib/libuutil/Makefile.am @@ -3,25 +3,21 @@ include $(top_srcdir)/config/Rules.am AM_CFLAGS += $(DEBUG_STACKFLAGS) $(FRAME_LARGER_THAN) DEFAULT_INCLUDES += \ - -I${top_srcdir}/lib/libuutil/include \ - -I${top_srcdir}/lib/libspl/include \ - -I${top_srcdir}/module/avl/include + -I$(top_srcdir)/include \ + -I$(top_srcdir)/lib/libspl/include lib_LTLIBRARIES = libuutil.la -libuutil_la_LIBADD = ${top_srcdir}/lib/libavl/libavl.la +libuutil_la_LIBADD = $(top_builddir)/lib/libavl/libavl.la libuutil_la_SOURCES = \ - ${top_srcdir}/lib/libuutil/uu_alloc.c \ - ${top_srcdir}/lib/libuutil/uu_avl.c \ - ${top_srcdir}/lib/libuutil/uu_dprintf.c \ - ${top_srcdir}/lib/libuutil/uu_ident.c \ - ${top_srcdir}/lib/libuutil/uu_list.c \ - ${top_srcdir}/lib/libuutil/uu_misc.c \ - ${top_srcdir}/lib/libuutil/uu_open.c \ - ${top_srcdir}/lib/libuutil/uu_pname.c \ - ${top_srcdir}/lib/libuutil/uu_string.c \ - ${top_srcdir}/lib/libuutil/uu_strtoint.c \ - ${top_srcdir}/lib/libuutil/include/libuutil.h \ - ${top_srcdir}/lib/libuutil/include/libuutil_common.h \ - ${top_srcdir}/lib/libuutil/include/libuutil_impl.h + $(top_srcdir)/lib/libuutil/uu_alloc.c \ + $(top_srcdir)/lib/libuutil/uu_avl.c \ + $(top_srcdir)/lib/libuutil/uu_dprintf.c \ + $(top_srcdir)/lib/libuutil/uu_ident.c \ + $(top_srcdir)/lib/libuutil/uu_list.c \ + $(top_srcdir)/lib/libuutil/uu_misc.c \ + $(top_srcdir)/lib/libuutil/uu_open.c \ + $(top_srcdir)/lib/libuutil/uu_pname.c \ + $(top_srcdir)/lib/libuutil/uu_string.c \ + $(top_srcdir)/lib/libuutil/uu_strtoint.c diff --git a/lib/libuutil/Makefile.in b/lib/libuutil/Makefile.in index 01d8b98bf..34a1248a4 100644 --- a/lib/libuutil/Makefile.in +++ b/lib/libuutil/Makefile.in @@ -98,7 +98,7 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) -libuutil_la_DEPENDENCIES = ${top_srcdir}/lib/libavl/libavl.la +libuutil_la_DEPENDENCIES = $(top_builddir)/lib/libavl/libavl.la am_libuutil_la_OBJECTS = uu_alloc.lo uu_avl.lo uu_dprintf.lo \ uu_ident.lo uu_list.lo uu_misc.lo uu_open.lo uu_pname.lo \ uu_string.lo uu_strtoint.lo @@ -146,14 +146,12 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BUILDDIR = @BUILDDIR@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ -CMDDIR = @CMDDIR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -191,7 +189,6 @@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBLKID = @LIBBLKID@ -LIBDIR = @LIBDIR@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ @@ -206,7 +203,6 @@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ -MODDIR = @MODDIR@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -225,7 +221,6 @@ RPM = @RPM@ RPMBUILD = @RPMBUILD@ RPMBUILD_VERSION = @RPMBUILD_VERSION@ RPM_VERSION = @RPM_VERSION@ -SCRIPTDIR = @SCRIPTDIR@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -235,7 +230,6 @@ SPL_SYMBOLS = @SPL_SYMBOLS@ SPL_VERSION = @SPL_VERSION@ STRIP = @STRIP@ TARGET_ASM_DIR = @TARGET_ASM_DIR@ -TOPDIR = @TOPDIR@ VENDOR = @VENDOR@ VERSION = @VERSION@ ZFS_CONFIG = @ZFS_CONFIG@ @@ -306,10 +300,8 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -DEFAULT_INCLUDES = -include ${top_srcdir}/zfs_config.h \ - -I${top_srcdir}/lib/libuutil/include \ - -I${top_srcdir}/lib/libspl/include \ - -I${top_srcdir}/module/avl/include +DEFAULT_INCLUDES = -include ${top_builddir}/zfs_config.h \ + -I$(top_srcdir)/include -I$(top_srcdir)/lib/libspl/include AM_LIBTOOLFLAGS = --silent AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing \ ${DEBUG_CFLAGS} -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT \ @@ -317,21 +309,18 @@ AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing \ -D_LARGEFILE64_SOURCE -DTEXT_DOMAIN=\"zfs-linux-user\" \ $(DEBUG_STACKFLAGS) $(FRAME_LARGER_THAN) lib_LTLIBRARIES = libuutil.la -libuutil_la_LIBADD = ${top_srcdir}/lib/libavl/libavl.la +libuutil_la_LIBADD = $(top_builddir)/lib/libavl/libavl.la libuutil_la_SOURCES = \ - ${top_srcdir}/lib/libuutil/uu_alloc.c \ - ${top_srcdir}/lib/libuutil/uu_avl.c \ - ${top_srcdir}/lib/libuutil/uu_dprintf.c \ - ${top_srcdir}/lib/libuutil/uu_ident.c \ - ${top_srcdir}/lib/libuutil/uu_list.c \ - ${top_srcdir}/lib/libuutil/uu_misc.c \ - ${top_srcdir}/lib/libuutil/uu_open.c \ - ${top_srcdir}/lib/libuutil/uu_pname.c \ - ${top_srcdir}/lib/libuutil/uu_string.c \ - ${top_srcdir}/lib/libuutil/uu_strtoint.c \ - ${top_srcdir}/lib/libuutil/include/libuutil.h \ - ${top_srcdir}/lib/libuutil/include/libuutil_common.h \ - ${top_srcdir}/lib/libuutil/include/libuutil_impl.h + $(top_srcdir)/lib/libuutil/uu_alloc.c \ + $(top_srcdir)/lib/libuutil/uu_avl.c \ + $(top_srcdir)/lib/libuutil/uu_dprintf.c \ + $(top_srcdir)/lib/libuutil/uu_ident.c \ + $(top_srcdir)/lib/libuutil/uu_list.c \ + $(top_srcdir)/lib/libuutil/uu_misc.c \ + $(top_srcdir)/lib/libuutil/uu_open.c \ + $(top_srcdir)/lib/libuutil/uu_pname.c \ + $(top_srcdir)/lib/libuutil/uu_string.c \ + $(top_srcdir)/lib/libuutil/uu_strtoint.c all: all-am @@ -442,85 +431,85 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< -uu_alloc.lo: ${top_srcdir}/lib/libuutil/uu_alloc.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_alloc.lo -MD -MP -MF $(DEPDIR)/uu_alloc.Tpo -c -o uu_alloc.lo `test -f '${top_srcdir}/lib/libuutil/uu_alloc.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_alloc.c +uu_alloc.lo: $(top_srcdir)/lib/libuutil/uu_alloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_alloc.lo -MD -MP -MF $(DEPDIR)/uu_alloc.Tpo -c -o uu_alloc.lo `test -f '$(top_srcdir)/lib/libuutil/uu_alloc.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_alloc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uu_alloc.Tpo $(DEPDIR)/uu_alloc.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='${top_srcdir}/lib/libuutil/uu_alloc.c' object='uu_alloc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/libuutil/uu_alloc.c' object='uu_alloc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_alloc.lo `test -f '${top_srcdir}/lib/libuutil/uu_alloc.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_alloc.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_alloc.lo `test -f '$(top_srcdir)/lib/libuutil/uu_alloc.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_alloc.c -uu_avl.lo: ${top_srcdir}/lib/libuutil/uu_avl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_avl.lo -MD -MP -MF $(DEPDIR)/uu_avl.Tpo -c -o uu_avl.lo `test -f '${top_srcdir}/lib/libuutil/uu_avl.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_avl.c +uu_avl.lo: $(top_srcdir)/lib/libuutil/uu_avl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_avl.lo -MD -MP -MF $(DEPDIR)/uu_avl.Tpo -c -o uu_avl.lo `test -f '$(top_srcdir)/lib/libuutil/uu_avl.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_avl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uu_avl.Tpo $(DEPDIR)/uu_avl.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='${top_srcdir}/lib/libuutil/uu_avl.c' object='uu_avl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/libuutil/uu_avl.c' object='uu_avl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_avl.lo `test -f '${top_srcdir}/lib/libuutil/uu_avl.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_avl.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_avl.lo `test -f '$(top_srcdir)/lib/libuutil/uu_avl.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_avl.c -uu_dprintf.lo: ${top_srcdir}/lib/libuutil/uu_dprintf.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_dprintf.lo -MD -MP -MF $(DEPDIR)/uu_dprintf.Tpo -c -o uu_dprintf.lo `test -f '${top_srcdir}/lib/libuutil/uu_dprintf.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_dprintf.c +uu_dprintf.lo: $(top_srcdir)/lib/libuutil/uu_dprintf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_dprintf.lo -MD -MP -MF $(DEPDIR)/uu_dprintf.Tpo -c -o uu_dprintf.lo `test -f '$(top_srcdir)/lib/libuutil/uu_dprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_dprintf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uu_dprintf.Tpo $(DEPDIR)/uu_dprintf.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='${top_srcdir}/lib/libuutil/uu_dprintf.c' object='uu_dprintf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/libuutil/uu_dprintf.c' object='uu_dprintf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_dprintf.lo `test -f '${top_srcdir}/lib/libuutil/uu_dprintf.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_dprintf.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_dprintf.lo `test -f '$(top_srcdir)/lib/libuutil/uu_dprintf.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_dprintf.c -uu_ident.lo: ${top_srcdir}/lib/libuutil/uu_ident.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_ident.lo -MD -MP -MF $(DEPDIR)/uu_ident.Tpo -c -o uu_ident.lo `test -f '${top_srcdir}/lib/libuutil/uu_ident.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_ident.c +uu_ident.lo: $(top_srcdir)/lib/libuutil/uu_ident.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_ident.lo -MD -MP -MF $(DEPDIR)/uu_ident.Tpo -c -o uu_ident.lo `test -f '$(top_srcdir)/lib/libuutil/uu_ident.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_ident.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uu_ident.Tpo $(DEPDIR)/uu_ident.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='${top_srcdir}/lib/libuutil/uu_ident.c' object='uu_ident.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/libuutil/uu_ident.c' object='uu_ident.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_ident.lo `test -f '${top_srcdir}/lib/libuutil/uu_ident.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_ident.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_ident.lo `test -f '$(top_srcdir)/lib/libuutil/uu_ident.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_ident.c -uu_list.lo: ${top_srcdir}/lib/libuutil/uu_list.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_list.lo -MD -MP -MF $(DEPDIR)/uu_list.Tpo -c -o uu_list.lo `test -f '${top_srcdir}/lib/libuutil/uu_list.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_list.c +uu_list.lo: $(top_srcdir)/lib/libuutil/uu_list.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_list.lo -MD -MP -MF $(DEPDIR)/uu_list.Tpo -c -o uu_list.lo `test -f '$(top_srcdir)/lib/libuutil/uu_list.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_list.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uu_list.Tpo $(DEPDIR)/uu_list.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='${top_srcdir}/lib/libuutil/uu_list.c' object='uu_list.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/libuutil/uu_list.c' object='uu_list.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_list.lo `test -f '${top_srcdir}/lib/libuutil/uu_list.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_list.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_list.lo `test -f '$(top_srcdir)/lib/libuutil/uu_list.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_list.c -uu_misc.lo: ${top_srcdir}/lib/libuutil/uu_misc.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_misc.lo -MD -MP -MF $(DEPDIR)/uu_misc.Tpo -c -o uu_misc.lo `test -f '${top_srcdir}/lib/libuutil/uu_misc.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_misc.c +uu_misc.lo: $(top_srcdir)/lib/libuutil/uu_misc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_misc.lo -MD -MP -MF $(DEPDIR)/uu_misc.Tpo -c -o uu_misc.lo `test -f '$(top_srcdir)/lib/libuutil/uu_misc.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_misc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uu_misc.Tpo $(DEPDIR)/uu_misc.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='${top_srcdir}/lib/libuutil/uu_misc.c' object='uu_misc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/libuutil/uu_misc.c' object='uu_misc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_misc.lo `test -f '${top_srcdir}/lib/libuutil/uu_misc.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_misc.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_misc.lo `test -f '$(top_srcdir)/lib/libuutil/uu_misc.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_misc.c -uu_open.lo: ${top_srcdir}/lib/libuutil/uu_open.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_open.lo -MD -MP -MF $(DEPDIR)/uu_open.Tpo -c -o uu_open.lo `test -f '${top_srcdir}/lib/libuutil/uu_open.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_open.c +uu_open.lo: $(top_srcdir)/lib/libuutil/uu_open.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_open.lo -MD -MP -MF $(DEPDIR)/uu_open.Tpo -c -o uu_open.lo `test -f '$(top_srcdir)/lib/libuutil/uu_open.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_open.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uu_open.Tpo $(DEPDIR)/uu_open.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='${top_srcdir}/lib/libuutil/uu_open.c' object='uu_open.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/libuutil/uu_open.c' object='uu_open.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_open.lo `test -f '${top_srcdir}/lib/libuutil/uu_open.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_open.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_open.lo `test -f '$(top_srcdir)/lib/libuutil/uu_open.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_open.c -uu_pname.lo: ${top_srcdir}/lib/libuutil/uu_pname.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_pname.lo -MD -MP -MF $(DEPDIR)/uu_pname.Tpo -c -o uu_pname.lo `test -f '${top_srcdir}/lib/libuutil/uu_pname.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_pname.c +uu_pname.lo: $(top_srcdir)/lib/libuutil/uu_pname.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_pname.lo -MD -MP -MF $(DEPDIR)/uu_pname.Tpo -c -o uu_pname.lo `test -f '$(top_srcdir)/lib/libuutil/uu_pname.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_pname.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uu_pname.Tpo $(DEPDIR)/uu_pname.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='${top_srcdir}/lib/libuutil/uu_pname.c' object='uu_pname.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/libuutil/uu_pname.c' object='uu_pname.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_pname.lo `test -f '${top_srcdir}/lib/libuutil/uu_pname.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_pname.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_pname.lo `test -f '$(top_srcdir)/lib/libuutil/uu_pname.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_pname.c -uu_string.lo: ${top_srcdir}/lib/libuutil/uu_string.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_string.lo -MD -MP -MF $(DEPDIR)/uu_string.Tpo -c -o uu_string.lo `test -f '${top_srcdir}/lib/libuutil/uu_string.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_string.c +uu_string.lo: $(top_srcdir)/lib/libuutil/uu_string.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_string.lo -MD -MP -MF $(DEPDIR)/uu_string.Tpo -c -o uu_string.lo `test -f '$(top_srcdir)/lib/libuutil/uu_string.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_string.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uu_string.Tpo $(DEPDIR)/uu_string.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='${top_srcdir}/lib/libuutil/uu_string.c' object='uu_string.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/libuutil/uu_string.c' object='uu_string.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_string.lo `test -f '${top_srcdir}/lib/libuutil/uu_string.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_string.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_string.lo `test -f '$(top_srcdir)/lib/libuutil/uu_string.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_string.c -uu_strtoint.lo: ${top_srcdir}/lib/libuutil/uu_strtoint.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_strtoint.lo -MD -MP -MF $(DEPDIR)/uu_strtoint.Tpo -c -o uu_strtoint.lo `test -f '${top_srcdir}/lib/libuutil/uu_strtoint.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_strtoint.c +uu_strtoint.lo: $(top_srcdir)/lib/libuutil/uu_strtoint.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uu_strtoint.lo -MD -MP -MF $(DEPDIR)/uu_strtoint.Tpo -c -o uu_strtoint.lo `test -f '$(top_srcdir)/lib/libuutil/uu_strtoint.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_strtoint.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uu_strtoint.Tpo $(DEPDIR)/uu_strtoint.Plo @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='${top_srcdir}/lib/libuutil/uu_strtoint.c' object='uu_strtoint.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(top_srcdir)/lib/libuutil/uu_strtoint.c' object='uu_strtoint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_strtoint.lo `test -f '${top_srcdir}/lib/libuutil/uu_strtoint.c' || echo '$(srcdir)/'`${top_srcdir}/lib/libuutil/uu_strtoint.c +@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uu_strtoint.lo `test -f '$(top_srcdir)/lib/libuutil/uu_strtoint.c' || echo '$(srcdir)/'`$(top_srcdir)/lib/libuutil/uu_strtoint.c mostlyclean-libtool: -rm -f *.lo diff --git a/lib/libuutil/include/libuutil.h b/lib/libuutil/include/libuutil.h deleted file mode 100644 index 667542446..000000000 --- a/lib/libuutil/include/libuutil.h +++ /dev/null @@ -1,390 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. - */ - -#ifndef _LIBUUTIL_H -#define _LIBUUTIL_H - -#include <sys/types.h> -#include <stdarg.h> -#include <stdio.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Standard flags codes. - */ -#define UU_DEFAULT 0 - -/* - * Standard error codes. - */ -#define UU_ERROR_NONE 0 /* no error */ -#define UU_ERROR_INVALID_ARGUMENT 1 /* invalid argument */ -#define UU_ERROR_UNKNOWN_FLAG 2 /* passed flag invalid */ -#define UU_ERROR_NO_MEMORY 3 /* out of memory */ -#define UU_ERROR_CALLBACK_FAILED 4 /* callback-initiated error */ -#define UU_ERROR_NOT_SUPPORTED 5 /* operation not supported */ -#define UU_ERROR_EMPTY 6 /* no value provided */ -#define UU_ERROR_UNDERFLOW 7 /* value is too small */ -#define UU_ERROR_OVERFLOW 8 /* value is too value */ -#define UU_ERROR_INVALID_CHAR 9 /* value contains unexpected char */ -#define UU_ERROR_INVALID_DIGIT 10 /* value contains digit not in base */ - -#define UU_ERROR_SYSTEM 99 /* underlying system error */ -#define UU_ERROR_UNKNOWN 100 /* error status not known */ - -/* - * Standard program exit codes. - */ -#define UU_EXIT_OK (*(uu_exit_ok())) -#define UU_EXIT_FATAL (*(uu_exit_fatal())) -#define UU_EXIT_USAGE (*(uu_exit_usage())) - -/* - * Exit status profiles. - */ -#define UU_PROFILE_DEFAULT 0 -#define UU_PROFILE_LAUNCHER 1 - -/* - * Error reporting functions. - */ -uint32_t uu_error(void); -const char *uu_strerror(uint32_t); - -/* - * Program notification functions. - */ -extern void uu_alt_exit(int); -extern const char *uu_setpname(char *); -extern const char *uu_getpname(void); -/*PRINTFLIKE1*/ -extern void uu_warn(const char *, ...); -extern void uu_vwarn(const char *, va_list); -/*PRINTFLIKE1*/ -extern void uu_die(const char *, ...) __NORETURN; -extern void uu_vdie(const char *, va_list) __NORETURN; -/*PRINTFLIKE2*/ -extern void uu_xdie(int, const char *, ...) __NORETURN; -extern void uu_vxdie(int, const char *, va_list) __NORETURN; - -/* - * Exit status functions (not to be used directly) - */ -extern int *uu_exit_ok(void); -extern int *uu_exit_fatal(void); -extern int *uu_exit_usage(void); - -/* - * string->number conversions - */ -extern int uu_strtoint(const char *, void *, size_t, int, int64_t, int64_t); -extern int uu_strtouint(const char *, void *, size_t, int, uint64_t, uint64_t); - -/* - * Debug print facility functions. - */ -typedef struct uu_dprintf uu_dprintf_t; - -typedef enum { - UU_DPRINTF_SILENT, - UU_DPRINTF_FATAL, - UU_DPRINTF_WARNING, - UU_DPRINTF_NOTICE, - UU_DPRINTF_INFO, - UU_DPRINTF_DEBUG -} uu_dprintf_severity_t; - -extern uu_dprintf_t *uu_dprintf_create(const char *, uu_dprintf_severity_t, - uint_t); -/*PRINTFLIKE3*/ -extern void uu_dprintf(uu_dprintf_t *, uu_dprintf_severity_t, - const char *, ...); -extern void uu_dprintf_destroy(uu_dprintf_t *); -extern const char *uu_dprintf_getname(uu_dprintf_t *); - -/* - * Identifier test flags and function. - */ -#define UU_NAME_DOMAIN 0x1 /* allow SUNW, or com.sun, prefix */ -#define UU_NAME_PATH 0x2 /* allow '/'-delimited paths */ - -int uu_check_name(const char *, uint_t); - -/* - * File creation functions. - */ -extern int uu_open_tmp(const char *dir, uint_t uflags); - -/* - * Convenience functions. - */ -#define UU_NELEM(a) (sizeof (a) / sizeof ((a)[0])) - -/*PRINTFLIKE1*/ -extern char *uu_msprintf(const char *format, ...); -extern void *uu_zalloc(size_t); -extern char *uu_strdup(const char *); -extern void uu_free(void *); - -extern boolean_t uu_strcaseeq(const char *a, const char *b); -extern boolean_t uu_streq(const char *a, const char *b); -extern char *uu_strndup(const char *s, size_t n); -extern boolean_t uu_strbw(const char *a, const char *b); -extern void *uu_memdup(const void *buf, size_t sz); -extern void uu_dump(FILE *out, const char *prefix, const void *buf, size_t len); - -/* - * Comparison function type definition. - * Developers should be careful in their use of the _private argument. If you - * break interface guarantees, you get undefined behavior. - */ -typedef int uu_compare_fn_t(const void *__left, const void *__right, - void *__private); - -/* - * Walk variant flags. - * A data structure need not provide support for all variants and - * combinations. Refer to the appropriate documentation. - */ -#define UU_WALK_ROBUST 0x00000001 /* walk can survive removes */ -#define UU_WALK_REVERSE 0x00000002 /* reverse walk order */ - -#define UU_WALK_PREORDER 0x00000010 /* walk tree in pre-order */ -#define UU_WALK_POSTORDER 0x00000020 /* walk tree in post-order */ - -/* - * Walk callback function return codes. - */ -#define UU_WALK_ERROR -1 -#define UU_WALK_NEXT 0 -#define UU_WALK_DONE 1 - -/* - * Walk callback function type definition. - */ -typedef int uu_walk_fn_t(void *_elem, void *_private); - -/* - * lists: opaque structures - */ -typedef struct uu_list_pool uu_list_pool_t; -typedef struct uu_list uu_list_t; - -typedef struct uu_list_node { - uintptr_t uln_opaque[2]; -} uu_list_node_t; - -typedef struct uu_list_walk uu_list_walk_t; - -typedef uintptr_t uu_list_index_t; - -/* - * lists: interface - * - * basic usage: - * typedef struct foo { - * ... - * uu_list_node_t foo_node; - * ... - * } foo_t; - * - * static int - * foo_compare(void *l_arg, void *r_arg, void *private) - * { - * foo_t *l = l_arg; - * foo_t *r = r_arg; - * - * if (... l greater than r ...) - * return (1); - * if (... l less than r ...) - * return (-1); - * return (0); - * } - * - * ... - * // at initialization time - * foo_pool = uu_list_pool_create("foo_pool", - * sizeof (foo_t), offsetof(foo_t, foo_node), foo_compare, - * debugging? 0 : UU_AVL_POOL_DEBUG); - * ... - */ -uu_list_pool_t *uu_list_pool_create(const char *, size_t, size_t, - uu_compare_fn_t *, uint32_t); -#define UU_LIST_POOL_DEBUG 0x00000001 - -void uu_list_pool_destroy(uu_list_pool_t *); - -/* - * usage: - * - * foo_t *a; - * a = malloc(sizeof(*a)); - * uu_list_node_init(a, &a->foo_list, pool); - * ... - * uu_list_node_fini(a, &a->foo_list, pool); - * free(a); - */ -void uu_list_node_init(void *, uu_list_node_t *, uu_list_pool_t *); -void uu_list_node_fini(void *, uu_list_node_t *, uu_list_pool_t *); - -uu_list_t *uu_list_create(uu_list_pool_t *, void *_parent, uint32_t); -#define UU_LIST_DEBUG 0x00000001 -#define UU_LIST_SORTED 0x00000002 /* list is sorted */ - -void uu_list_destroy(uu_list_t *); /* list must be empty */ - -size_t uu_list_numnodes(uu_list_t *); - -void *uu_list_first(uu_list_t *); -void *uu_list_last(uu_list_t *); - -void *uu_list_next(uu_list_t *, void *); -void *uu_list_prev(uu_list_t *, void *); - -int uu_list_walk(uu_list_t *, uu_walk_fn_t *, void *, uint32_t); - -uu_list_walk_t *uu_list_walk_start(uu_list_t *, uint32_t); -void *uu_list_walk_next(uu_list_walk_t *); -void uu_list_walk_end(uu_list_walk_t *); - -void *uu_list_find(uu_list_t *, void *, void *, uu_list_index_t *); -void uu_list_insert(uu_list_t *, void *, uu_list_index_t); - -void *uu_list_nearest_next(uu_list_t *, uu_list_index_t); -void *uu_list_nearest_prev(uu_list_t *, uu_list_index_t); - -void *uu_list_teardown(uu_list_t *, void **); - -void uu_list_remove(uu_list_t *, void *); - -/* - * lists: interfaces for non-sorted lists only - */ -int uu_list_insert_before(uu_list_t *, void *_target, void *_elem); -int uu_list_insert_after(uu_list_t *, void *_target, void *_elem); - -/* - * avl trees: opaque structures - */ -typedef struct uu_avl_pool uu_avl_pool_t; -typedef struct uu_avl uu_avl_t; - -typedef struct uu_avl_node { -#ifdef _LP64 - uintptr_t uan_opaque[3]; -#else - uintptr_t uan_opaque[4]; -#endif -} uu_avl_node_t; - -typedef struct uu_avl_walk uu_avl_walk_t; - -typedef uintptr_t uu_avl_index_t; - -/* - * avl trees: interface - * - * basic usage: - * typedef struct foo { - * ... - * uu_avl_node_t foo_node; - * ... - * } foo_t; - * - * static int - * foo_compare(void *l_arg, void *r_arg, void *private) - * { - * foo_t *l = l_arg; - * foo_t *r = r_arg; - * - * if (... l greater than r ...) - * return (1); - * if (... l less than r ...) - * return (-1); - * return (0); - * } - * - * ... - * // at initialization time - * foo_pool = uu_avl_pool_create("foo_pool", - * sizeof (foo_t), offsetof(foo_t, foo_node), foo_compare, - * debugging? 0 : UU_AVL_POOL_DEBUG); - * ... - */ -uu_avl_pool_t *uu_avl_pool_create(const char *, size_t, size_t, - uu_compare_fn_t *, uint32_t); -#define UU_AVL_POOL_DEBUG 0x00000001 - -void uu_avl_pool_destroy(uu_avl_pool_t *); - -/* - * usage: - * - * foo_t *a; - * a = malloc(sizeof(*a)); - * uu_avl_node_init(a, &a->foo_avl, pool); - * ... - * uu_avl_node_fini(a, &a->foo_avl, pool); - * free(a); - */ -void uu_avl_node_init(void *, uu_avl_node_t *, uu_avl_pool_t *); -void uu_avl_node_fini(void *, uu_avl_node_t *, uu_avl_pool_t *); - -uu_avl_t *uu_avl_create(uu_avl_pool_t *, void *_parent, uint32_t); -#define UU_AVL_DEBUG 0x00000001 - -void uu_avl_destroy(uu_avl_t *); /* list must be empty */ - -size_t uu_avl_numnodes(uu_avl_t *); - -void *uu_avl_first(uu_avl_t *); -void *uu_avl_last(uu_avl_t *); - -void *uu_avl_next(uu_avl_t *, void *); -void *uu_avl_prev(uu_avl_t *, void *); - -int uu_avl_walk(uu_avl_t *, uu_walk_fn_t *, void *, uint32_t); - -uu_avl_walk_t *uu_avl_walk_start(uu_avl_t *, uint32_t); -void *uu_avl_walk_next(uu_avl_walk_t *); -void uu_avl_walk_end(uu_avl_walk_t *); - -void *uu_avl_find(uu_avl_t *, void *, void *, uu_avl_index_t *); -void uu_avl_insert(uu_avl_t *, void *, uu_avl_index_t); - -void *uu_avl_nearest_next(uu_avl_t *, uu_avl_index_t); -void *uu_avl_nearest_prev(uu_avl_t *, uu_avl_index_t); - -void *uu_avl_teardown(uu_avl_t *, void **); - -void uu_avl_remove(uu_avl_t *, void *); - -#ifdef __cplusplus -} -#endif - -#endif /* _LIBUUTIL_H */ diff --git a/lib/libuutil/include/libuutil_common.h b/lib/libuutil/include/libuutil_common.h deleted file mode 100644 index 52ac4887f..000000000 --- a/lib/libuutil/include/libuutil_common.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _LIBUUTIL_COMMON_H -#define _LIBUUTIL_COMMON_H - - - -#include <libuutil.h> -#include <libuutil_impl.h> - -#endif /* _LIBUUTIL_COMMON_H */ diff --git a/lib/libuutil/include/libuutil_impl.h b/lib/libuutil/include/libuutil_impl.h deleted file mode 100644 index f978b475e..000000000 --- a/lib/libuutil/include/libuutil_impl.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _LIBUUTIL_IMPL_H -#define _LIBUUTIL_IMPL_H - - - -#include <libuutil.h> -#include <pthread.h> - -#include <sys/avl_impl.h> -#include <sys/byteorder.h> - -#ifdef __cplusplus -extern "C" { -#endif - -void uu_set_error(uint_t); - - -/*PRINTFLIKE1*/ -void uu_panic(const char *format, ...); - - -struct uu_dprintf { - char *uud_name; - uu_dprintf_severity_t uud_severity; - uint_t uud_flags; -}; - -/* - * For debugging purposes, libuutil keeps around linked lists of all uu_lists - * and uu_avls, along with pointers to their parents. These can cause false - * negatives when looking for memory leaks, so we encode the pointers by - * storing them with swapped endianness; this is not perfect, but it's about - * the best we can do without wasting a lot of space. - */ -#ifdef _LP64 -#define UU_PTR_ENCODE(ptr) BSWAP_64((uintptr_t)(void *)(ptr)) -#else -#define UU_PTR_ENCODE(ptr) BSWAP_32((uintptr_t)(void *)(ptr)) -#endif - -#define UU_PTR_DECODE(ptr) ((void *)UU_PTR_ENCODE(ptr)) - -/* - * uu_list structures - */ -typedef struct uu_list_node_impl { - struct uu_list_node_impl *uln_next; - struct uu_list_node_impl *uln_prev; -} uu_list_node_impl_t; - -struct uu_list_walk { - uu_list_walk_t *ulw_next; - uu_list_walk_t *ulw_prev; - - uu_list_t *ulw_list; - int8_t ulw_dir; - uint8_t ulw_robust; - uu_list_node_impl_t *ulw_next_result; -}; - -struct uu_list { - uintptr_t ul_next_enc; - uintptr_t ul_prev_enc; - - uu_list_pool_t *ul_pool; - uintptr_t ul_parent_enc; /* encoded parent pointer */ - size_t ul_offset; - size_t ul_numnodes; - uint8_t ul_debug; - uint8_t ul_sorted; - uint8_t ul_index; /* mark for uu_list_index_ts */ - - uu_list_node_impl_t ul_null_node; - uu_list_walk_t ul_null_walk; /* for robust walkers */ -}; - -#define UU_LIST_PTR(ptr) ((uu_list_t *)UU_PTR_DECODE(ptr)) - -#define UU_LIST_POOL_MAXNAME 64 - -struct uu_list_pool { - uu_list_pool_t *ulp_next; - uu_list_pool_t *ulp_prev; - - char ulp_name[UU_LIST_POOL_MAXNAME]; - size_t ulp_nodeoffset; - size_t ulp_objsize; - uu_compare_fn_t *ulp_cmp; - uint8_t ulp_debug; - uint8_t ulp_last_index; - pthread_mutex_t ulp_lock; /* protects null_list */ - uu_list_t ulp_null_list; -}; - -/* - * uu_avl structures - */ -typedef struct avl_node uu_avl_node_impl_t; - -struct uu_avl_walk { - uu_avl_walk_t *uaw_next; - uu_avl_walk_t *uaw_prev; - - uu_avl_t *uaw_avl; - void *uaw_next_result; - int8_t uaw_dir; - uint8_t uaw_robust; -}; - -struct uu_avl { - uintptr_t ua_next_enc; - uintptr_t ua_prev_enc; - - uu_avl_pool_t *ua_pool; - uintptr_t ua_parent_enc; - uint8_t ua_debug; - uint8_t ua_index; /* mark for uu_avl_index_ts */ - - struct avl_tree ua_tree; - uu_avl_walk_t ua_null_walk; -}; - -#define UU_AVL_PTR(x) ((uu_avl_t *)UU_PTR_DECODE(x)) - -#define UU_AVL_POOL_MAXNAME 64 - -struct uu_avl_pool { - uu_avl_pool_t *uap_next; - uu_avl_pool_t *uap_prev; - - char uap_name[UU_AVL_POOL_MAXNAME]; - size_t uap_nodeoffset; - size_t uap_objsize; - uu_compare_fn_t *uap_cmp; - uint8_t uap_debug; - uint8_t uap_last_index; - pthread_mutex_t uap_lock; /* protects null_avl */ - uu_avl_t uap_null_avl; -}; - -/* - * atfork() handlers - */ -void uu_avl_lockup(void); -void uu_avl_release(void); - -void uu_list_lockup(void); -void uu_list_release(void); - -#ifdef __cplusplus -} -#endif - -#endif /* _LIBUUTIL_IMPL_H */ |