<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/include/ruby/subst.h, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>include/ruby/subst.h: skip doxygen</title>
<updated>2021-09-10T11:00:06+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2021-06-09T05:00:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4912260b7050ce24c2fde345bc8ea206152e02aa'/>
<id>4912260b7050ce24c2fde345bc8ea206152e02aa</id>
<content type='text'>
Nothing worth documenting in this file. [ci skip]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Nothing worth documenting in this file. [ci skip]
</pre>
</div>
</content>
</entry>
<entry>
<title>add #include guard hack</title>
<updated>2020-04-13T07:06:00+00:00</updated>
<author>
<name>卜部昌平</name>
<email>shyouhei@ruby-lang.org</email>
</author>
<published>2020-04-10T05:11:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4ff3f205408ff8bb413d69151105d301858136ba'/>
<id>4ff3f205408ff8bb413d69151105d301858136ba</id>
<content type='text'>
According to MSVC manual (*1), cl.exe can skip including a header file
when that:

- contains #pragma once, or
- starts with #ifndef, or
- starts with #if ! defined.

GCC has a similar trick (*2), but it acts more stricter (e. g. there
must be _no tokens_ outside of #ifndef...#endif).

Sun C lacked #pragma once for a looong time.  Oracle Developer Studio
12.5 finally implemented it, but we cannot assume such recent version.

This changeset modifies header files so that each of them include
strictly one #ifndef...#endif.  I believe this is the most portable way
to trigger compiler optimizations. [Bug #16770]

*1: https://docs.microsoft.com/en-us/cpp/preprocessor/once
*2: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to MSVC manual (*1), cl.exe can skip including a header file
when that:

- contains #pragma once, or
- starts with #ifndef, or
- starts with #if ! defined.

GCC has a similar trick (*2), but it acts more stricter (e. g. there
must be _no tokens_ outside of #ifndef...#endif).

Sun C lacked #pragma once for a looong time.  Oracle Developer Studio
12.5 finally implemented it, but we cannot assume such recent version.

This changeset modifies header files so that each of them include
strictly one #ifndef...#endif.  I believe this is the most portable way
to trigger compiler optimizations. [Bug #16770]

*1: https://docs.microsoft.com/en-us/cpp/preprocessor/once
*2: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
</pre>
</div>
</content>
</entry>
<entry>
<title>* include/ruby/{subst.h,win32.h}, ext/socket/rubysocket.h: revert</title>
<updated>2011-12-05T05:29:31+00:00</updated>
<author>
<name>usa</name>
<email>usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2011-12-05T05:29:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1dea1927752dfb4e09b2db6fc13589eb16a7e336'/>
<id>1dea1927752dfb4e09b2db6fc13589eb16a7e336</id>
<content type='text'>
  r33876.  [ruby-core:41475] [Bug #5706]

* ext/socket/extconf.rb: the alternative hack for [Bug #5675].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  r33876.  [ruby-core:41475] [Bug #5706]

* ext/socket/extconf.rb: the alternative hack for [Bug #5675].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* include/ruby/subst.h: reverted r33916, since some names in vm.inc conflict.</title>
<updated>2011-12-01T06:19:57+00:00</updated>
<author>
<name>nobu</name>
<email>nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2011-12-01T06:19:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=abb40f8eb315e847e8811db1d72337a4995c2b13'/>
<id>abb40f8eb315e847e8811db1d72337a4995c2b13</id>
<content type='text'>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* include/ruby/subst.h: removed arguments lists so that function</title>
<updated>2011-12-01T05:48:05+00:00</updated>
<author>
<name>nobu</name>
<email>nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2011-12-01T05:48:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f274088eec6b2e069c01e2d71d218bb91ffdce06'/>
<id>f274088eec6b2e069c01e2d71d218bb91ffdce06</id>
<content type='text'>
  calls with zero arguments can be substituted.  aliasing in .def
  file has no effect for static library.  [ruby-core:41370]
  [Bug#5681]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  calls with zero arguments can be substituted.  aliasing in .def
  file has no effect for static library.  [ruby-core:41370]
  [Bug#5681]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* include/ruby/subst.h: typo of r33876.</title>
<updated>2011-11-28T02:00:53+00:00</updated>
<author>
<name>usa</name>
<email>usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2011-11-28T02:00:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d81c20771d440001295945086d0c58e4125b5660'/>
<id>d81c20771d440001295945086d0c58e4125b5660</id>
<content type='text'>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* include/ruby/subst.h: moved Windows specific substitions from</title>
<updated>2011-11-28T01:36:09+00:00</updated>
<author>
<name>nobu</name>
<email>nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2011-11-28T01:36:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1510ad86c4c8ab2e28387b8a8327a752f062782e'/>
<id>1510ad86c4c8ab2e28387b8a8327a752f062782e</id>
<content type='text'>
  win32.h.
* ext/socket/rubysocket.h: include ruby/subst.h.  [Bug #5675]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  win32.h.
* ext/socket/rubysocket.h: include ruby/subst.h.  [Bug #5675]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* include/ruby/subst.h (snprintf): redefinition moved from ruby.h.</title>
<updated>2010-08-07T22:19:17+00:00</updated>
<author>
<name>akr</name>
<email>akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2010-08-07T22:19:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d82dd262d076c4b43fdc95c9c648badf3dec5692'/>
<id>d82dd262d076c4b43fdc95c9c648badf3dec5692</id>
<content type='text'>
  (vsnprintf): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  (vsnprintf): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* include/ruby/subst.h: new file for substitute standard functions..</title>
<updated>2010-08-07T15:44:27+00:00</updated>
<author>
<name>akr</name>
<email>akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2010-08-07T15:44:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bb0ef922db4682dc57f5150c065b1a3fe2fc1f02'/>
<id>bb0ef922db4682dc57f5150c065b1a3fe2fc1f02</id>
<content type='text'>
* include/ruby/missing.h: don't substitute "close", etc. here.

* include/ruby/ruby.h: include ruby/subst.h at last.
  This prevents substituting "close" in unitstd.h.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* include/ruby/missing.h: don't substitute "close", etc. here.

* include/ruby/ruby.h: include ruby/subst.h at last.
  This prevents substituting "close" in unitstd.h.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
</feed>
