summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorRichard PALO <richard@NetBSD.org>2015-09-05 13:08:15 +0200
committerRichard Lowe <richlowe@richlowe.net>2015-09-21 11:13:25 -0400
commit6b1aed11aada50610fd9f5a9e033c24ca7ee5f0c (patch)
tree44aebe8c499e932547cd8d4b793e75bec2c5f629 /usr/src
parent228fe137d4532f2991e203d0fd551ac158452f94 (diff)
downloadillumos-gate-6b1aed11aada50610fd9f5a9e033c24ca7ee5f0c.tar.gz
6201 cleanup issues between sys/ctype.h and sys/kobj_lex.h when both included
Reviewed by: Josef Sipek <jeffpc@josefsipek.net> Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/sys/ctype.h30
-rw-r--r--usr/src/uts/common/sys/kobj_lex.h12
-rw-r--r--usr/src/uts/intel/fcp/Makefile3
3 files changed, 24 insertions, 21 deletions
diff --git a/usr/src/uts/common/sys/ctype.h b/usr/src/uts/common/sys/ctype.h
index a4370a7406..51ea781c44 100644
--- a/usr/src/uts/common/sys/ctype.h
+++ b/usr/src/uts/common/sys/ctype.h
@@ -22,13 +22,13 @@
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2015 PALO, Richard. All rights reserved.
*/
#ifndef _SYS_CTYPE_H
#define _SYS_CTYPE_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#ifdef __cplusplus
@@ -57,55 +57,65 @@ extern "C" {
(ISALPHA(_c) || \
ISDIGIT(_c))
+#define ISPRINT(_c) \
+ ((_c) >= ' ' && (_c) <= '~')
+
#define ISSPACE(_c) \
((_c) == ' ' || \
(_c) == '\t' || \
(_c) == '\r' || \
(_c) == '\n')
-static boolean_t
+static __GNU_INLINE boolean_t /* LINTED E_STATIC_UNUSED */
isdigit(char c)
{
return (ISDIGIT(c));
}
#pragma inline(isdigit)
-static boolean_t
+static __GNU_INLINE boolean_t /* LINTED E_STATIC_UNUSED */
isxdigit(char c)
{
return (ISXDIGIT(c));
}
-#pragma inline(isdigit)
+#pragma inline(isxdigit)
-static boolean_t
+static __GNU_INLINE boolean_t /* LINTED E_STATIC_UNUSED */
islower(char c)
{
return (ISLOWER(c));
}
#pragma inline(islower)
-static boolean_t
+static __GNU_INLINE boolean_t /* LINTED E_STATIC_UNUSED */
isupper(char c)
{
return (ISUPPER(c));
}
#pragma inline(isupper)
-static boolean_t
+static __GNU_INLINE boolean_t /* LINTED E_STATIC_UNUSED */
isalpha(char c)
{
return (ISALPHA(c));
}
#pragma inline(isalpha)
-static boolean_t
+static __GNU_INLINE boolean_t /* LINTED E_STATIC_UNUSED */
isalnum(char c)
{
return (ISALNUM(c));
}
#pragma inline(isalnum)
-static boolean_t
+static __GNU_INLINE boolean_t /* LINTED E_STATIC_UNUSED */
+isprint(char c)
+{
+ return (ISPRINT(c));
+}
+#pragma inline(isprint)
+
+static __GNU_INLINE boolean_t /* LINTED E_STATIC_UNUSED */
isspace(char c)
{
return (ISSPACE(c));
diff --git a/usr/src/uts/common/sys/kobj_lex.h b/usr/src/uts/common/sys/kobj_lex.h
index 27f77be335..ca6ef40f6a 100644
--- a/usr/src/uts/common/sys/kobj_lex.h
+++ b/usr/src/uts/common/sys/kobj_lex.h
@@ -22,12 +22,14 @@
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2015 PALO, Richard. All rights reserved.
*/
#ifndef _SYS_KOBJ_LEX_H
#define _SYS_KOBJ_LEX_H
-#pragma ident "%Z%%M% %I% %E% SMI"
+#include <sys/ctype.h>
#ifdef __cplusplus
extern "C" {
@@ -48,14 +50,6 @@ extern "C" {
#define isnewline(ch) ((ch) == '\n' || (ch) == '\r' || (ch) == '\f')
-#define isdigit(ch) ((ch) >= '0' && (ch) <= '9')
-
-#define isxdigit(ch) (isdigit(ch) || ((ch) >= 'a' && (ch) <= 'f') || \
- ((ch) >= 'A' && (ch) <= 'F'))
-
-#define isalpha(ch) (((ch) >= 'a' && (ch) <= 'z') || \
- ((ch) >= 'A' && (ch) <= 'Z'))
-
#define isalphanum(ch) (isalpha(ch) || isdigit(ch))
#define isnamechar(ch) (isalphanum(ch) || (ch) == '_' || (ch) == '-')
diff --git a/usr/src/uts/intel/fcp/Makefile b/usr/src/uts/intel/fcp/Makefile
index 8bfcc253c4..9f22448393 100644
--- a/usr/src/uts/intel/fcp/Makefile
+++ b/usr/src/uts/intel/fcp/Makefile
@@ -63,11 +63,10 @@ LDFLAGS += -dy -Nmisc/fctl -Nmisc/scsi
#
LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
-LINTTAGS += -erroff=E_STATIC_UNUSED
+LINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += -_gcc=-Wno-switch
-CERRWARN += -_gcc=-Wno-unused-function
CERRWARN += -_gcc=-Wno-uninitialized
#