Module Name: src
Committed By: christos
Date: Mon May 9 21:38:27 UTC 2016
Modified Files:
src/lib/libedit: Makefile sys.h
Removed Files:
src/lib/libedit: editline.c
Log Message:
Instead of compiling all the source files together in one big file, use
protected visibility to achieve the same effect.
To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/lib/libedit/Makefile
cvs rdiff -u -r1.1 -r0 src/lib/libedit/editline.c
cvs rdiff -u -r1.25 -r1.26 src/lib/libedit/sys.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libedit/Makefile
diff -u src/lib/libedit/Makefile:1.61 src/lib/libedit/Makefile:1.62
--- src/lib/libedit/Makefile:1.61 Mon May 2 10:12:09 2016
+++ src/lib/libedit/Makefile Mon May 9 17:38:27 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.61 2016/05/02 14:12:09 wiz Exp $
+# $NetBSD: Makefile,v 1.62 2016/05/09 21:38:27 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 6/4/93
USE_SHLIBDIR= yes
@@ -14,9 +14,10 @@ COPTS+= -Wunused-parameter
CWARNFLAGS.gcc+= -Wconversion
CWARNFLAGS.clang+= -Wno-cast-qual
-OSRCS= chared.c common.c el.c eln.c emacs.c filecomplete.c \
- hist.c keymacro.c map.c chartype.c \
- parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c
+SRCS = chared.c chartype.c common.c el.c eln.c emacs.c filecomplete.c \
+ hist.c history.c historyn.c keymacro.c map.c \
+ parse.c prompt.c read.c readline.c refresh.c search.c sig.c \
+ terminal.c tokenizer.c tokenizern.c tty.c vi.c
MAN= editline.3 editrc.5 editline.7
@@ -64,13 +65,6 @@ editline.3 tok_wline.3 \
editline.3 tok_wreset.3 \
editline.3 tok_wstr.3
-# For speed and debugging
-#SRCS= ${OSRCS}
-# For protection
-SRCS= editline.c
-
-SRCS += history.c historyn.c tokenizer.c tokenizern.c readline.c
-
LIBEDITDIR?=${.CURDIR}
INCS= histedit.h
Index: src/lib/libedit/sys.h
diff -u src/lib/libedit/sys.h:1.25 src/lib/libedit/sys.h:1.26
--- src/lib/libedit/sys.h:1.25 Mon Apr 11 14:56:31 2016
+++ src/lib/libedit/sys.h Mon May 9 17:38:27 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: sys.h,v 1.25 2016/04/11 18:56:31 christos Exp $ */
+/* $NetBSD: sys.h,v 1.26 2016/05/09 21:38:27 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -58,10 +58,8 @@
# endif
#endif
-#ifndef protected
-# define protected /* Redefined from elsewhere to "static" */
- /* When we want to hide everything */
-#endif
+/* If your compiler does not support this, define it to be empty. */
+#define protected __attribute__((__visibility__("hidden")))
#ifndef __arraycount
# define __arraycount(a) (sizeof(a) / sizeof(*(a)))