ruby-changes:53690
From: odaira <ko1@a...>
Date: Thu, 22 Nov 2018 05:39:18 +0900 (JST)
Subject: [ruby-changes:53690] odaira:r65906 (trunk): errno.h must be included after config.h because config.h might define
odaira 2018-11-22 05:39:09 +0900 (Thu, 22 Nov 2018) New Revision: 65906 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65906 Log: errno.h must be included after config.h because config.h might define _REENTRANT, _THREAD_SAFE, etc., which affect how errno is defined on some architectures * ext/openssl/ossl.h: include errno.h after ruby.h * include/ruby/io.h: include errno.h after ruby/config.h Modified files: trunk/ext/openssl/ossl.h trunk/include/ruby/io.h Index: ext/openssl/ossl.h =================================================================== --- ext/openssl/ossl.h (revision 65905) +++ ext/openssl/ossl.h (revision 65906) @@ -13,8 +13,8 @@ https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl.h#L13 #include RUBY_EXTCONF_H #include <assert.h> -#include <errno.h> #include <ruby.h> +#include <errno.h> #include <ruby/io.h> #include <ruby/thread.h> #include <openssl/opensslv.h> Index: include/ruby/io.h =================================================================== --- include/ruby/io.h (revision 65905) +++ include/ruby/io.h (revision 65906) @@ -24,7 +24,6 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/io.h#L24 #endif #include <stdio.h> -#include <errno.h> #include "ruby/encoding.h" #if defined(HAVE_STDIO_EXT_H) @@ -32,6 +31,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/io.h#L31 #endif #include "ruby/config.h" +#include <errno.h> #if defined(HAVE_POLL) # ifdef _AIX # define reqevents events -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/