made IUTF8 conditional depending on its availability

This commit is contained in:
hyung-hwan 2020-04-22 11:41:37 +00:00
parent 22342148f5
commit 260ab078f8

View File

@ -73,31 +73,37 @@
#if defined(SOCK_CLOEXEC) #if defined(SOCK_CLOEXEC)
# define X_SOCK_CLOEXEC SOCK_CLOEXEC # define X_SOCK_CLOEXEC SOCK_CLOEXEC
#else #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 #endif
#if defined(SOCK_NONBLOCK) #if defined(SOCK_NONBLOCK)
# define X_SOCK_NONBLOCK SOCK_NONBLOCK # define X_SOCK_NONBLOCK SOCK_NONBLOCK
#else #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 #endif
#if defined(SO_REUSEPORT) #if defined(SO_REUSEPORT)
# define X_SO_REUSEPORT SO_REUSEPORT # define X_SO_REUSEPORT SO_REUSEPORT
#else #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 #endif
#if defined(OXTABS) #if defined(OXTABS)
# define X_OXTABS OXTABS # define X_OXTABS OXTABS
#else #else
# define X_OXTABS 0 # define X_OXTABS (0)
#endif #endif
#if defined(ONOEOT) #if defined(ONOEOT)
# define X_ONOEOT ONOEOT # define X_ONOEOT ONOEOT
#else #else
# define X_ONOEOT 0 # define X_ONOEOT (0)
#endif #endif
/* /*
@ -5023,7 +5029,7 @@ static inttab_t inttab[] =
{ HAWK_T("TC_IFLAG_INPCK"), { INPCK } }, { HAWK_T("TC_IFLAG_INPCK"), { INPCK } },
{ HAWK_T("TC_IFLAG_ISTRIP"), { ISTRIP } }, { HAWK_T("TC_IFLAG_ISTRIP"), { ISTRIP } },
{ HAWK_T("TC_IFLAG_IUCLC"), { IUCLC } }, { 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_IXANY"), { IXANY } },
{ HAWK_T("TC_IFLAG_IXOFF"), { IXOFF } }, { HAWK_T("TC_IFLAG_IXOFF"), { IXOFF } },
{ HAWK_T("TC_IFLAG_IXON"), { IXON } }, { HAWK_T("TC_IFLAG_IXON"), { IXON } },