From 260ab078f81077f358c3e86c71687ee2c9f8fb41 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 22 Apr 2020 11:41:37 +0000 Subject: [PATCH] made IUTF8 conditional depending on its availability --- hawk/lib/mod-sys.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/hawk/lib/mod-sys.c b/hawk/lib/mod-sys.c index 08b987cc..f7062e89 100644 --- a/hawk/lib/mod-sys.c +++ b/hawk/lib/mod-sys.c @@ -73,31 +73,37 @@ #if defined(SOCK_CLOEXEC) # define X_SOCK_CLOEXEC SOCK_CLOEXEC #else -# define X_SOCK_CLOEXEC 0 /* 0 is effectless for a bit flag */ +# define X_SOCK_CLOEXEC (0) /* 0 is effectless for a bit flag */ #endif #if defined(SOCK_NONBLOCK) # define X_SOCK_NONBLOCK SOCK_NONBLOCK #else -# define X_SOCK_NONBLOCK 0 /* 0 is effectless for a bit flag */ +# define X_SOCK_NONBLOCK (0) /* 0 is effectless for a bit flag */ #endif #if defined(SO_REUSEPORT) # define X_SO_REUSEPORT SO_REUSEPORT #else -# define X_SO_REUSEPORT 9999999 /* this must be a non-existent code */ +# define X_SO_REUSEPORT (9999999) /* this must be a non-existent code */ +#endif + +#if defined(IUTF8) +# define X_IUTF8 IUTF8 +#else +# define X_IUTF8 (0) #endif #if defined(OXTABS) # define X_OXTABS OXTABS #else -# define X_OXTABS 0 +# define X_OXTABS (0) #endif #if defined(ONOEOT) # define X_ONOEOT ONOEOT #else -# define X_ONOEOT 0 +# define X_ONOEOT (0) #endif /* @@ -5023,7 +5029,7 @@ static inttab_t inttab[] = { HAWK_T("TC_IFLAG_INPCK"), { INPCK } }, { HAWK_T("TC_IFLAG_ISTRIP"), { ISTRIP } }, { HAWK_T("TC_IFLAG_IUCLC"), { IUCLC } }, - { HAWK_T("TC_IFLAG_IUTF8"), { IUTF8 } }, + { HAWK_T("TC_IFLAG_IUTF8"), { X_IUTF8 } }, { HAWK_T("TC_IFLAG_IXANY"), { IXANY } }, { HAWK_T("TC_IFLAG_IXOFF"), { IXOFF } }, { HAWK_T("TC_IFLAG_IXON"), { IXON } },