From 84f2736904a911587ccd1cf1e4543493fcab31f4 Mon Sep 17 00:00:00 2001 From: Igor Kozhukhov Date: Mon, 3 Jul 2017 21:41:31 +0300 Subject: 8454 libzpool build fails if no LINTLIB after 7431 Reviewed by: Matthew Ahrens Approved by: Dan McDonald --- usr/src/lib/libzpool/Makefile.com | 3 ++- usr/src/uts/common/fs/zfs/lua/lstrlib.c | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/usr/src/lib/libzpool/Makefile.com b/usr/src/lib/libzpool/Makefile.com index 68a878d4d3..ae65fc5887 100644 --- a/usr/src/lib/libzpool/Makefile.com +++ b/usr/src/lib/libzpool/Makefile.com @@ -48,7 +48,7 @@ SRCDIR= ../common # There should be a mapfile here MAPFILES = -LIBS += $(LINTLIB) $(DYNLIB) +LIBS += $(DYNLIB) $(LINTLIB) INCS += -I../common INCS += -I../../../uts/common/fs/zfs @@ -61,6 +61,7 @@ CLEANFILES += $(EXTPICS) $(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC) $(LINTLIB): ../common/zfs.h +$(LIBS): ../common/zfs.h CSTD= $(CSTD_GNU99) C99LMODE= -Xc99=%all diff --git a/usr/src/uts/common/fs/zfs/lua/lstrlib.c b/usr/src/uts/common/fs/zfs/lua/lstrlib.c index eef8508c4d..82c585a5f1 100644 --- a/usr/src/uts/common/fs/zfs/lua/lstrlib.c +++ b/usr/src/uts/common/fs/zfs/lua/lstrlib.c @@ -34,7 +34,6 @@ */ #define tolower(C) (((C) >= 'A' && (C) <= 'Z') ? (C) - 'A' + 'a' : (C)) #define toupper(C) (((C) >= 'a' && (C) <= 'z') ? (C) - 'a' + 'A': (C)) -#define iscntrl(C) ((((C) >= 0) && ((C) <= 0x1f)) || ((C) == 0x7f)) #define isgraph(C) ((C) >= 0x21 && (C) <= 0x7E) #define ispunct(C) (((C) >= 0x21 && (C) <= 0x2F) || \ ((C) >= 0x3A && (C) <= 0x40) || \ @@ -287,6 +286,13 @@ static const char *classend (MatchState *ms, const char *p) { } +static int +iscntrl(int c) +{ + return ((c < 0x20) || (c == 0x7f)); +} + + static int match_class (int c, int cl) { int res; switch (tolower(cl)) { -- cgit v1.2.3