summaryrefslogtreecommitdiff
path: root/ext/nkf/nkf-utf8
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2021-04-29 15:02:19 +0200
committerBenoit Daloze <eregontp@gmail.com>2021-05-04 14:56:55 +0200
commit59a92a84c8145c3dffd9f2a0e570dbc61211c86c (patch)
treef4bb4b5d04257c84ebcf292b662605f07c6c9ae3 /ext/nkf/nkf-utf8
parentf1dcc3da5d89b0a03cbc280e7eafb845d63a1f6a (diff)
Fix -Wundef warnings in core extensions
* See [Feature #17752]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4428
Diffstat (limited to 'ext/nkf/nkf-utf8')
-rw-r--r--ext/nkf/nkf-utf8/nkf.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/nkf/nkf-utf8/nkf.h b/ext/nkf/nkf-utf8/nkf.h
index cd3037601b..b3a520da54 100644
--- a/ext/nkf/nkf-utf8/nkf.h
+++ b/ext/nkf/nkf-utf8/nkf.h
@@ -16,8 +16,8 @@
#define X0201_DEFAULT TRUE
#endif
-#if DEFAULT_NEWLINE == 0x0D0A
-#elif DEFAULT_NEWLINE == 0x0D
+#if defined(DEFAULT_NEWLINE) && DEFAULT_NEWLINE == 0x0D0A
+#elif defined(DEFAULT_NEWLINE) && DEFAULT_NEWLINE == 0x0D
#else
#define DEFAULT_NEWLINE 0x0A
#endif