summaryrefslogtreecommitdiff
path: root/include/ruby/subst.h
AgeCommit message (Collapse)Author
2020-04-13add #include guard hack卜部昌平
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 Notes: Merged: https://github.com/ruby/ruby/pull/3023
2011-12-05* include/ruby/{subst.h,win32.h}, ext/socket/rubysocket.h: revertusa
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
2011-12-01* include/ruby/subst.h: reverted r33916, since some names in vm.inc conflict.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-01* include/ruby/subst.h: removed arguments lists so that functionnobu
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
2011-11-28* include/ruby/subst.h: typo of r33876.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-28* include/ruby/subst.h: moved Windows specific substitions fromnobu
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
2010-08-07* include/ruby/subst.h (snprintf): redefinition moved from ruby.h.akr
(vsnprintf): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07* include/ruby/subst.h: new file for substitute standard functions..akr
* 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