diff options
| author | Gordon Ross <gwr@nexenta.com> | 2011-07-15 10:20:38 -0400 |
|---|---|---|
| committer | Gordon Ross <gwr@nexenta.com> | 2011-07-15 10:20:38 -0400 |
| commit | 7c1d35456b77b833f089b886b99aa431a24e1377 (patch) | |
| tree | b66e01ba9de4de7612cd987e885b538aa5c4f82a /usr/src/lib | |
| parent | 017c01f878134ff71877f2c67cca171a4ad2cd93 (diff) | |
| download | illumos-joyent-7c1d35456b77b833f089b886b99aa431a24e1377.tar.gz | |
1168 want a libtermcap that does not force libcurses
Reviewed by: Garrett D'Amore <garrett@nexenta.com>
Reviewed by: Albert Lee <trisk@nexenta.com>
Reviewed by: Igor Kozhukhov <igor.kozhukhov@nexenta.com>
Approved by: Garrett D'Amore <garrett@nexenta.com>
Diffstat (limited to 'usr/src/lib')
| -rw-r--r-- | usr/src/lib/Makefile | 4 | ||||
| -rw-r--r-- | usr/src/lib/libcurses/Makefile.com | 80 | ||||
| -rw-r--r-- | usr/src/lib/libcurses/amd64/Makefile | 16 | ||||
| -rw-r--r-- | usr/src/lib/libcurses/sparcv9/Makefile | 16 | ||||
| -rw-r--r-- | usr/src/lib/libtermcap/Makefile | 44 | ||||
| -rw-r--r-- | usr/src/lib/libtermcap/Makefile.com | 23 | ||||
| -rw-r--r-- | usr/src/lib/libtermcap/amd64/Makefile | 22 | ||||
| -rw-r--r-- | usr/src/lib/libtermcap/common/llib-ltermcap | 16 | ||||
| -rw-r--r-- | usr/src/lib/libtermcap/common/mapfile-vers | 73 | ||||
| -rw-r--r-- | usr/src/lib/libtermcap/common/termcap.h | 53 | ||||
| -rw-r--r-- | usr/src/lib/libtermcap/i386/Makefile | 21 | ||||
| -rw-r--r-- | usr/src/lib/libtermcap/sparc/Makefile | 21 | ||||
| -rw-r--r-- | usr/src/lib/libtermcap/sparcv9/Makefile | 22 |
13 files changed, 342 insertions, 69 deletions
diff --git a/usr/src/lib/Makefile b/usr/src/lib/Makefile index b8f7513e34..a81ff37e5d 100644 --- a/usr/src/lib/Makefile +++ b/usr/src/lib/Makefile @@ -19,6 +19,7 @@ # CDDL HEADER END # +# Copyright 2011 Nexenta Systems, Inc. All rights reserved. # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. include ../Makefile.master @@ -85,6 +86,7 @@ SUBDIRS += \ libdtrace \ libdtrace_jni \ libcurses \ + libtermcap \ libgen \ libgss \ libpam \ @@ -387,6 +389,7 @@ HDRSUBDIRS= \ libcpc \ libctf \ libcurses \ + libtermcap \ libcryptoutil \ libdevice \ libdevid \ @@ -621,6 +624,7 @@ libzonecfg: libc libsocket libnsl libuuid libnvpair libsysevent libsec \ libbrand libpool libscf libproc: ../cmd/sgs/librtld_db ../cmd/sgs/libelf libctf libproject: libpool libproc libsecdb +libtermcap: libcurses libtsnet: libnsl libtsol libsecdb libwrap: libnsl libsocket libwanboot: libnvpair libresolv libnsl libsocket libdevinfo libinetutil \ diff --git a/usr/src/lib/libcurses/Makefile.com b/usr/src/lib/libcurses/Makefile.com index 6db4b1cc4e..19a25fc2ab 100644 --- a/usr/src/lib/libcurses/Makefile.com +++ b/usr/src/lib/libcurses/Makefile.com @@ -19,11 +19,10 @@ # CDDL HEADER END # # +# Copyright 2011 Nexenta Systems, Inc. All rights reserved. # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# LIBRARY= libcurses.a VERS= .1 @@ -145,12 +144,6 @@ $(LINTLIB):= SRCS=../screen/llib-lcurses LINTOUT= lint.out LINTSRC= $(LINTLIB:%.ln=%) -ROOTLINTDIR= $(ROOTLIBDIR) -ROOTLINT= $(LINTSRC:%=$(ROOTLINTDIR)/%) -ROOTLINTDIR64= $(ROOTLIBDIR64) -ROOTLINT64= $(LINTSRC:%=$(ROOTLINTDIR64)/%) -ROOTLINKS64= $(ROOTLIBDIR64)/$(LIBLINKS) - CLEANFILES += $(LINTOUT) $(LINTLIB) CFLAGS += $(CCVERBOSE) @@ -168,54 +161,55 @@ RM = rm -f # CLOBBERFILES= libcurses.so libcurses.so$(VERS) -.KEEP_STATE: - all: $(LIBS) lint: lintcheck -# install rule for 32-bit libcurses.a -$(ROOTLIBDIR)/%.a: %.a - $(INS.file) - cd $(ROOTLIBDIR); \ - $(RM) libtermlib.a libtermcap.a; \ - ln libcurses.a libtermlib.a; \ - ln libcurses.a libtermcap.a; +# +# Install rules for libtermlib.so links. +# Augments the rule in Makefile.targ +# +$(ROOTLIBDIR)/$(LIBLINKS) := INS.liblink= \ + $(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKS)$(VERS) $@; \ + cd $(ROOTLIBDIR); \ + $(RM) libtermlib.so libtermlib.so$(VERS); \ + $(SYMLINK) libcurses.so$(VERS) libtermlib.so$(VERS); \ + $(SYMLINK) libtermlib.so$(VERS) libtermlib.so; -# install rules for 32-bit libcurses.so in /usr/lib -$(ROOTLINKS) := INS.liblink= \ +$(ROOTLIBDIR64)/$(LIBLINKS) := INS.liblink64= \ $(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKS)$(VERS) $@; \ - cd $(ROOTLIBDIR); \ - $(RM) libtermlib.so$(VERS) libtermcap.so$(VERS); \ - $(RM) libtermlib.so libtermcap.so; \ + cd $(ROOTLIBDIR64); \ + $(RM) libtermlib.so libtermlib.so$(VERS);\ $(SYMLINK) libcurses.so$(VERS) libtermlib.so$(VERS); \ - $(SYMLINK) libcurses.so$(VERS) libtermcap.so$(VERS); \ - $(SYMLINK) libtermlib.so$(VERS) libtermlib.so; \ - $(SYMLINK) libtermcap.so$(VERS) libtermcap.so; + $(SYMLINK) libtermlib.so$(VERS) libtermlib.so; -# install rule for lint library target -$(ROOTLINTDIR)/%: ../screen/% - $(INS.file) - cd $(ROOTLINTDIR); \ - $(RM) llib-ltermcap llib-ltermlib ; \ - $(SYMLINK) ./llib-lcurses llib-ltermcap; \ - $(SYMLINK) ./llib-lcurses llib-ltermlib; \ - $(RM) llib-ltermcap.ln llib-ltermlib.ln ; \ - $(SYMLINK) ./llib-lcurses.ln llib-ltermcap.ln; \ +# +# Install rules for libtermlib.ln links. +# Augments a pattern rule in Makefile.targ +# +$(ROOTLIBDIR)/$(LINTLIB) := INS.file= \ + -$(RM) $@; $(INS) -s -m $(FILEMODE) -f $(@D) $(LINTLIB); \ + cd $(ROOTLIBDIR); \ + $(RM) llib-ltermlib.ln ; \ $(SYMLINK) ./llib-lcurses.ln llib-ltermlib.ln; -# install rule for 64 bit lint library target -$(ROOTLINTDIR64)/%: ../screen/% - $(INS.file) - cd $(ROOTLINTDIR64); \ - $(RM) llib-ltermcap llib-ltermlib ; \ - $(SYMLINK) ./llib-lcurses llib-ltermcap; \ - $(SYMLINK) ./llib-lcurses llib-ltermlib; \ - $(RM) llib-ltermcap.ln llib-ltermlib.ln ; \ - $(SYMLINK) ./llib-lcurses.ln llib-ltermcap.ln; \ +$(ROOTLIBDIR64)/$(LINTLIB) := INS.file= \ + -$(RM) $@; $(INS) -s -m $(FILEMODE) -f $(@D) $(LINTLIB); \ + cd $(ROOTLIBDIR64); \ + $(RM) llib-ltermlib.ln ; \ $(SYMLINK) ./llib-lcurses.ln llib-ltermlib.ln; # +# Install rule for the lint source, which is installed only in +# the default library dir, not MACH64 etc. +# +$(ROOTLINTDIR)/%: ../screen/% + $(INS.file) + cd $(ROOTLINTDIR); \ + $(RM) llib-ltermlib ; \ + $(SYMLINK) ./llib-lcurses llib-ltermlib; + +# # Include library targets # include ../../Makefile.targ diff --git a/usr/src/lib/libcurses/amd64/Makefile b/usr/src/lib/libcurses/amd64/Makefile index 5e8087fc09..57138967e0 100644 --- a/usr/src/lib/libcurses/amd64/Makefile +++ b/usr/src/lib/libcurses/amd64/Makefile @@ -19,26 +19,16 @@ # CDDL HEADER END # # +# Copyright 2011 Nexenta Systems, Inc. All rights reserved. # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# include ../Makefile.com include ../../Makefile.lib.64 .KEEP_STATE: -$(ROOTLIBDIR64)/$(LIBLINKS) := INS.liblink64 = \ - -$(RM) $@; \ - cd $(ROOTLIBDIR64); \ - $(RM) libtermlib.so$(VERS) libtermcap.so$(VERS);\ - $(RM) libtermlib.so libtermcap.so; \ - $(SYMLINK) $(LIBLINKS)$(VERS) $(LIBLINKS); \ - $(SYMLINK) libcurses.so$(VERS) libtermlib.so$(VERS); \ - $(SYMLINK) libcurses.so$(VERS) libtermcap.so$(VERS); \ - $(SYMLINK) libtermcap.so$(VERS) libtermcap.so; \ - $(SYMLINK) libtermlib.so$(VERS) libtermlib.so +all: $(LIBS) -install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64) +install: all $(ROOTLIBS64) $(ROOTLINKS64) diff --git a/usr/src/lib/libcurses/sparcv9/Makefile b/usr/src/lib/libcurses/sparcv9/Makefile index 5e8087fc09..57138967e0 100644 --- a/usr/src/lib/libcurses/sparcv9/Makefile +++ b/usr/src/lib/libcurses/sparcv9/Makefile @@ -19,26 +19,16 @@ # CDDL HEADER END # # +# Copyright 2011 Nexenta Systems, Inc. All rights reserved. # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# include ../Makefile.com include ../../Makefile.lib.64 .KEEP_STATE: -$(ROOTLIBDIR64)/$(LIBLINKS) := INS.liblink64 = \ - -$(RM) $@; \ - cd $(ROOTLIBDIR64); \ - $(RM) libtermlib.so$(VERS) libtermcap.so$(VERS);\ - $(RM) libtermlib.so libtermcap.so; \ - $(SYMLINK) $(LIBLINKS)$(VERS) $(LIBLINKS); \ - $(SYMLINK) libcurses.so$(VERS) libtermlib.so$(VERS); \ - $(SYMLINK) libcurses.so$(VERS) libtermcap.so$(VERS); \ - $(SYMLINK) libtermcap.so$(VERS) libtermcap.so; \ - $(SYMLINK) libtermlib.so$(VERS) libtermlib.so +all: $(LIBS) -install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64) +install: all $(ROOTLIBS64) $(ROOTLINKS64) diff --git a/usr/src/lib/libtermcap/Makefile b/usr/src/lib/libtermcap/Makefile new file mode 100644 index 0000000000..dc822135d0 --- /dev/null +++ b/usr/src/lib/libtermcap/Makefile @@ -0,0 +1,44 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2011 Nexenta Systems, Inc. All rights reserved. +# + + +include ../Makefile.lib + +HDRS = termcap.h +HDRDIR= common +SUBDIRS= $(MACH) +$(BUILD64)SUBDIRS += $(MACH64) + +all := TARGET= all +clean := TARGET= clean +clobber := TARGET= clobber +install := TARGET= install + +.KEEP_STATE: + +all clean clobber install: $(SUBDIRS) + +lint: + +install_h: $(ROOTHDRS) + +check: $(CHECKHDRS) + +$(SUBDIRS): FRC + @cd $@; pwd; $(MAKE) $(TARGET) + +FRC: + +include ../Makefile.targ diff --git a/usr/src/lib/libtermcap/Makefile.com b/usr/src/lib/libtermcap/Makefile.com new file mode 100644 index 0000000000..514da01eb8 --- /dev/null +++ b/usr/src/lib/libtermcap/Makefile.com @@ -0,0 +1,23 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2011 Nexenta Systems, Inc. All rights reserved. +# + +# install this library in the root filesystem +include ../../Makefile.rootfs + +LIBRARY = libtermcap.a +VERS = .1 +LIBS += $(LINTLIB) + +DYNFLAGS += $(ZLOADFLTR) diff --git a/usr/src/lib/libtermcap/amd64/Makefile b/usr/src/lib/libtermcap/amd64/Makefile new file mode 100644 index 0000000000..3e04fa59f3 --- /dev/null +++ b/usr/src/lib/libtermcap/amd64/Makefile @@ -0,0 +1,22 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2011 Nexenta Systems, Inc. All rights reserved. +# + +include $(SRC)/lib/Makefile.filter.com +include ../Makefile.com +include $(SRC)/lib/Makefile.lib.64 + +install: $(ROOTLIBS64) $(ROOTLINKS64) + +include $(SRC)/lib/Makefile.filter.targ diff --git a/usr/src/lib/libtermcap/common/llib-ltermcap b/usr/src/lib/libtermcap/common/llib-ltermcap new file mode 100644 index 0000000000..5ca6ced455 --- /dev/null +++ b/usr/src/lib/libtermcap/common/llib-ltermcap @@ -0,0 +1,16 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + */ + +#include <termcap.h> diff --git a/usr/src/lib/libtermcap/common/mapfile-vers b/usr/src/lib/libtermcap/common/mapfile-vers new file mode 100644 index 0000000000..d7ad09164d --- /dev/null +++ b/usr/src/lib/libtermcap/common/mapfile-vers @@ -0,0 +1,73 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2011 Nexenta Systems, Inc. All rights reserved. +# + +# +# MAPFILE HEADER START +# +# WARNING: STOP NOW. DO NOT MODIFY THIS FILE. +# Object versioning must comply with the rules detailed in +# +# usr/src/lib/README.mapfiles +# +# You should not be making modifications here until you've read the most current +# copy of that file. If you need help, contact a gatekeeper for guidance. +# +# MAPFILE HEADER END +# + +$mapfile_version 2 + +# +# This is a mapfile that defines a filter for libcurses so that +# libraries such as libreadline can link with this and NOT force +# the choice of which curses library will be used. The NODIRECT +# flag lets other libraries earlier in the link order provide the +# symbols below, in which case those will be used by all calls +# to these functions _instead_ of the libcurses ones. Cool, eh? +# + +SYMBOL_VERSION ILLUMOS_0.1 { + global: + +$if _ELF32 + BC { TYPE = COMMON; SIZE = 4; FLAGS = NODIRECT; + FILTER = libcurses.so.1; }; + UP { TYPE = COMMON; SIZE = 4; FLAGS = NODIRECT; + FILTER = libcurses.so.1; }; +$endif +$if _ELF64 + BC { TYPE = COMMON; SIZE = 8; FLAGS = NODIRECT; + FILTER = libcurses.so.1; }; + UP { TYPE = COMMON; SIZE = 8; FLAGS = NODIRECT; + FILTER = libcurses.so.1; }; +$endif + PC { TYPE = COMMON; SIZE = 1; FLAGS = NODIRECT; + FILTER = libcurses.so.1; }; + ospeed { TYPE = COMMON; SIZE = 2; FLAGS = NODIRECT; + FILTER = libcurses.so.1; }; + + tgetent { TYPE = FUNCTION; FLAGS = NODIRECT; + FILTER = libcurses.so.1; }; + tgetflag { TYPE = FUNCTION; FLAGS = NODIRECT; + FILTER = libcurses.so.1 }; + tgetnum { TYPE = FUNCTION; FLAGS = NODIRECT; + FILTER = libcurses.so.1 }; + tgetstr { TYPE = FUNCTION; FLAGS = NODIRECT; + FILTER = libcurses.so.1 }; + tgoto { TYPE = FUNCTION; FLAGS = NODIRECT; + FILTER = libcurses.so.1 }; + tputs { TYPE = FUNCTION; FLAGS = NODIRECT; + FILTER = libcurses.so.1 }; +}; diff --git a/usr/src/lib/libtermcap/common/termcap.h b/usr/src/lib/libtermcap/common/termcap.h new file mode 100644 index 0000000000..20cd9bcb05 --- /dev/null +++ b/usr/src/lib/libtermcap/common/termcap.h @@ -0,0 +1,53 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + */ + +#ifndef _TERMCAP_H_ +#define _TERMCAP_H_ + +/* + * This declares the public functions exported by the + * "filter" library: libtermcap. That exports only + * the traditional BSD-style functions and data. + * + * Note that the libtermcap filter library uses NODIRECT + * linker bindings when filtering what libcurses exports + * so that an application can link with an alternative + * curses library providing the symbols below, and those + * will be used instead of the ones in libcurses. + */ + +#ifdef __cplusplus +extern "C" { +#endif + +extern char PC, *UP, *BC; +extern short ospeed; + +/* + * These are intentionally the same as term.h declares + * so the compiler won't bark if you include that too. + */ +extern int tgetent(char *, char *); +extern int tgetflag(char *); +extern int tgetnum(char *); +extern char *tgetstr(char *, char **); +extern char *tgoto(char *, int, int); +extern int tputs(char *, int, int (*)(char)); + +#ifdef __cplusplus +} +#endif + +#endif /* _TERMCAP_H_ */ diff --git a/usr/src/lib/libtermcap/i386/Makefile b/usr/src/lib/libtermcap/i386/Makefile new file mode 100644 index 0000000000..e8b506ccb3 --- /dev/null +++ b/usr/src/lib/libtermcap/i386/Makefile @@ -0,0 +1,21 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2011 Nexenta Systems, Inc. All rights reserved. +# + +include $(SRC)/lib/Makefile.filter.com +include ../Makefile.com + +install: $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) + +include $(SRC)/lib/Makefile.filter.targ diff --git a/usr/src/lib/libtermcap/sparc/Makefile b/usr/src/lib/libtermcap/sparc/Makefile new file mode 100644 index 0000000000..e8b506ccb3 --- /dev/null +++ b/usr/src/lib/libtermcap/sparc/Makefile @@ -0,0 +1,21 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2011 Nexenta Systems, Inc. All rights reserved. +# + +include $(SRC)/lib/Makefile.filter.com +include ../Makefile.com + +install: $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) + +include $(SRC)/lib/Makefile.filter.targ diff --git a/usr/src/lib/libtermcap/sparcv9/Makefile b/usr/src/lib/libtermcap/sparcv9/Makefile new file mode 100644 index 0000000000..3e04fa59f3 --- /dev/null +++ b/usr/src/lib/libtermcap/sparcv9/Makefile @@ -0,0 +1,22 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2011 Nexenta Systems, Inc. All rights reserved. +# + +include $(SRC)/lib/Makefile.filter.com +include ../Makefile.com +include $(SRC)/lib/Makefile.lib.64 + +install: $(ROOTLIBS64) $(ROOTLINKS64) + +include $(SRC)/lib/Makefile.filter.targ |
