Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit Instead of compiling all the source files togeth...
details: https://anonhg.NetBSD.org/src/rev/c1ab0db6c73b
branches: trunk
changeset: 815285:c1ab0db6c73b
user: christos <christos%NetBSD.org@localhost>
date: Mon May 09 21:38:27 2016 +0000
description:
Instead of compiling all the source files together in one big file, use
protected visibility to achieve the same effect.
diffstat:
lib/libedit/Makefile | 16 +++++-----------
lib/libedit/editline.c | 21 ---------------------
lib/libedit/sys.h | 8 +++-----
3 files changed, 8 insertions(+), 37 deletions(-)
diffs (84 lines):
diff -r 53904c2632d9 -r c1ab0db6c73b lib/libedit/Makefile
--- a/lib/libedit/Makefile Mon May 09 21:37:34 2016 +0000
+++ b/lib/libedit/Makefile Mon May 09 21:38:27 2016 +0000
@@ -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 @@
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_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
diff -r 53904c2632d9 -r c1ab0db6c73b lib/libedit/editline.c
--- a/lib/libedit/editline.c Mon May 09 21:37:34 2016 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-#define protected static
-#define SCCSID
-#include "chared.c"
-#include "common.c"
-#include "el.c"
-#include "eln.c"
-#include "emacs.c"
-#include "filecomplete.c"
-#include "hist.c"
-#include "keymacro.c"
-#include "map.c"
-#include "chartype.c"
-#include "parse.c"
-#include "prompt.c"
-#include "read.c"
-#include "refresh.c"
-#include "search.c"
-#include "sig.c"
-#include "terminal.c"
-#include "tty.c"
-#include "vi.c"
diff -r 53904c2632d9 -r c1ab0db6c73b lib/libedit/sys.h
--- a/lib/libedit/sys.h Mon May 09 21:37:34 2016 +0000
+++ b/lib/libedit/sys.h Mon May 09 21:38:27 2016 +0000
@@ -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)))
Home |
Main Index |
Thread Index |
Old Index