vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 821a40f0907ba526f60ee73086b64097305f0791 parent 2a8532c222ba3264ca4db1a8f8e8a124c8b7a9a4 Author: Marc André Tanner <mat@brain-dump.org> Date: Thu, 23 Oct 2014 22:10:17 +0200 Move feature test macros to config.mk Diffstat:
| M | config.mk | | | 3 | ++- |
| M | editor.c | | | 2 | -- |
| M | text.c | | | 2 | -- |
| M | vis.c | | | 4 | ---- |
| M | window.c | | | 1 | - |
5 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/config.mk b/config.mk @@ -9,7 +9,8 @@ MANPREFIX = ${PREFIX}/share/man INCS = -I. LIBS = -lc -lncursesw -CFLAGS += -std=c99 -Os ${INCS} -DVERSION=\"${VERSION}\" -DNDEBUG +CFLAGS += -std=c99 -Os ${INCS} -DVERSION=\"${VERSION}\" -DNDEBUG -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 + LDFLAGS += ${LIBS} DEBUG_CFLAGS = ${CFLAGS} -UNDEBUG -O0 -g -ggdb -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter diff --git a/editor.c b/editor.c @@ -1,5 +1,3 @@ -#define _DEFAULT_SOURCE -#define _BSD_SOURCE #include <stdlib.h> #include <string.h> #include <stdarg.h> diff --git a/text.c b/text.c @@ -13,8 +13,6 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define _DEFAULT_SOURCE -#define _BSD_SOURCE #include <unistd.h> #include <stdio.h> #include <stdlib.h> diff --git a/vis.c b/vis.c @@ -13,10 +13,6 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define _DEFAULT_SOURCE -#define _POSIX_SOURCE -/* Necessary for SIGWINCH on OpenBSD */ -#define _BSD_SOURCE #include <locale.h> #include <stdlib.h> #include <unistd.h> diff --git a/window.c b/window.c @@ -13,7 +13,6 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define _XOPEN_SOURCE #include <string.h> #include <stdlib.h> #include <wchar.h>