summaryrefslogtreecommitdiff
path: root/missing
Commit message (Collapse)AuthorAgeFilesLines
* Prefer ANSI-style prototypes over old K&R-style definitionsNobuyoshi Nakada2021-10-271-1/+1
|
* Use C99-defined signbit macroNobuyoshi Nakada2021-08-271-19/+0
|
* Use C99-defined macros to classify a floating-point numberNobuyoshi Nakada2021-08-275-140/+0
|
* Removed missing/dup2.cNobuyoshi Nakada2021-05-101-60/+0
| | | | | | This function should be always available, as POSIX-compliant or Windows platform are required since 1.9. Also the code in this file is MT-unsafe.
* Fixed race in dtoa [Bug #17612]Nobuyoshi Nakada2021-02-101-3/+10
| | | | | | | | | | Fixed the race condition when replacing `freelist` entry with its chained next element. At acquiring an entry, hold the entry once with the special value, then release by replacing it with the next element again after acquired. If another thread is holding the same entry at that time, spinning until the entry gets released. Co-Authored-By: Koichi Sasada <ko1@atdot.net>
* dtoa.c: make thread-safe by using atomic CASNobuyoshi Nakada2021-01-101-21/+54
|
* dtoa.c: constifiedNobuyoshi Nakada2021-01-101-1/+1
| | | | | clang seems to locate never modified local data in the const segment implicitly.
* dtoa.c: make compilable independentlyNobuyoshi Nakada2021-01-101-6/+18
| | | | Except for `-Dxmalloc=malloc -Dxfree=free`.
* Removed obsolete autoconf checksNobuyoshi Nakada2020-12-121-1/+0
| | | | | | | Use regular `AC_CHECK_MEMBERS` instead of: * `AC_STRUCT_ST_BLKSIZE` * `AC_STRUCT_ST_BLOCKS` * `AC_STRUCT_ST_RDEV`
* sed -i 's|ruby/impl|ruby/internal|'卜部昌平2020-05-115-5/+5
| | | | To fix build failures.
* sed -i s|ruby/3|ruby/impl|g卜部昌平2020-05-115-5/+5
| | | | This shall fix compile errors.
* [DOC] explicit_bzero exists in modern LinuxSorah Fukumori2020-04-261-2/+2
| | | | [ci skip]
* add #include guard hack卜部昌平2020-04-132-5/+3
| | | | | | | | | | | | | | | | | | | | | | 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
* Merge pull request #2991 from shyouhei/ruby.h卜部昌平2020-04-085-5/+5
| | | Split ruby.h
* internal/stdbool.h rework卜部昌平2019-12-261-20/+0
| | | | | | Noticed that internal/stdbool.h and addr2line.c are the only two place where missing/stdbool.h is included. Why not delete the file so that we can merge internal/stdbool.h and missing/stdbool.h into one.
* Get rid of false positive misspellingsNobuyoshi Nakada2019-12-241-1/+1
| | | | [Bug #16437]
* Renamed assembly file like as e64f71f812324d098bed12ed68c2bc1d6e780c90Nobuyoshi Nakada2019-11-181-0/+0
|
* missing/setproctitle.c: remove nonsense NULL checkYusuke Endoh2019-10-121-3/+2
| | | | | | | | | | If fmt is NULL, ptitle is uninitialized and used. SETPROCTITLE(3bsd) says "If fmt is NULL, the process title is restored", but looks like the feature is not implemented in missing/setproctitle.c. At least the source code of ruby does not pass NULL to the function. So I assume this function requires non-NULL fmt. This issue was found by Coverity Scan.
* missing/memcmp.c: suppress a `-Wparentheses` warningYusuke Endoh2019-08-191-1/+2
|
* NetBSD native support of explicit_bzero's like feature (#2145)David CARLIER2019-08-171-1/+7
|
* Split procstat_vm.cnobu2019-02-071-0/+85
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Split mt19937.cnobu2019-02-071-0/+158
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Split dtoa.cnobu2019-02-071-0/+3417
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h: unify our own stdtbool.h implementationk0kubun2019-01-061-11/+11
| | | | | | | | | | | | | | | because we had another one in missing/stdbool.h as well. Assuming that _Bool does not exist when stdbool.h is absent, I'm in favor of r57462 implementation rather than r61326. Note that Visual Studio 2013 has stdbool.h and thus r57462's commit message is somewhat misleading. This missing/stdbool.h is for Visual Studio 2012 or older, and for Oracle Solaris Studio 12.2 or older because it's added in 12.3 https://docs.oracle.com/cd/E24457_01/html/E21987/gkeza.html. missing/stdbool.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [ci skip] tabifyshyouhei2018-01-201-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add missing/nan.cshyouhei2018-01-201-0/+28
| | | | | | | | | instead of scattering #ifdef HAVE_NANF here and there define our own nan() unless defined elsewhere. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support C89 if possiblengoto2017-12-181-0/+20
| | | | | | | | | | | | | * addr2line.c: Because stdbool.h is a C99 feature, compile error occurs with some old compilers without specifying C99 options. Fix compile error with Oracle Solaris Studio 12.4 on Solaris 10. [Bug #14200] [ruby-dev:50366] * missing/stdbool.h: Alternative of stdbool.h for C89 compilers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: fix memory leak in String#cryptrhe2017-11-121-2/+0
| | | | | | | | | | | | Use ALLOCV to allocate struct crypt_data for slightly cleaner and less error-prone code. It is currently possible it leaks when an invalid argument is passed to String#crypt or rb_str_new_cstr() fails to allocate memory. SIZEOF_CRYPT_DATA macro in missing/crypt.h is removed since it is not used any longer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Drop to support NaCl platform.hsbt2017-10-231-1/+1
| | | | | | | | | | | Because NaCl and PNaCl are already sunset status. see https://bugs.chromium.org/p/chromium/issues/detail?id=239656#c160 configure.ac: Patch for this file was provided by @nobu. [Feature #14041][ruby-core:83497][fix GH-1726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: for small crypt_datanobu2017-05-241-0/+2
| | | | | | | * string.c (rb_str_crypt): struct crypt_data defined in missing/crypt.h is small enough. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix tgamma for inifitynobu2017-05-121-0/+21
| | | | | | | | | | * configure.in: do not use buggy tgamma() of mingw. * missing/tgamma.c (tgamma): merge fix for inifity from ruby_tgamma. since msvcr120.dll and later have tgamma, this implementation will not be used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tgamma.c: unify versions with/without lgamma_rnobu2017-05-121-26/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove missing/strtol.crhe2017-04-211-27/+0
| | | | | | | It is never used. We don't need it anyway as it's part of C89 which is our current minimum requirement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* get rid of sprintfnobu2016-12-261-1/+1
| | | | | | * missing/strerror.c (strerror): use snprintf instead of sprintf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rubystubnobu2016-08-201-0/+1
| | | | | | * rubystub.c: generalize win32/stub.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * missing/strl{cat,cpy}.c: Update latest upstream files.hsbt2016-07-212-100/+63
| | | | | | | [Misc #12205][ruby-core:74487] * LEGAL: Update license for missing/strl{cat,cpy}.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use LONG_LONGnobu2016-06-291-1/+12
| | | | | | | * missing/crypt.h (B64): use LONG_LONG instead of long long directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* des_tables.c: generation rulenobu2016-06-042-4/+16
| | | | | | | | | | * defs/gmake.mk (missing/des_tables.c): move the recipe from common.mk. this is less common. * missing/crypt.c (init_des): if des_tables.c is empty, initialize DES tables at runtime. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* crypt.h: remove initializednobu2016-06-042-16/+18
| | | | | | | | | | | | * missing/crypt.h (struct crypt_data): remove unnecessary member "initialized". * missing/crypt.c (des_setkey_r): nothing to be initialized in crypt_data. * configure.in (struct crypt_data): check for "initialized" in struct crypt_data, which may be only in glibc, and isn't on AIX at least. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* crypt.c: suppress warningsnobu2016-06-022-262/+262
| | | | | | | * missing/crypt.c (SPE): make unsigned so that literal integers do not exceed 32bit signed integer limit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* crypt.c: fix syntax error on mswinnobu2016-06-021-1/+1
| | | | | | | * missing/crypt.c (constdatablock): fix error on mswin. Visual C does not accept an empty initializer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* crypt.c: unused functionsnobu2016-06-011-1/+9
| | | | | | | * missing/crypt.c: suppress unused non-reentrant functions, by macro USE_NONREENTRANT_CRYPT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* crypt.h: get rid of conflictnobu2016-06-011-0/+238
| | | | | | | * missing/crypt.h: move crypt.h to get rid of conflict with the system header. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use system cryptnobu2016-06-011-0/+0
| | | | | | | | | * configure.in: revert r55237. replace crypt, not crypt_r, and check if crypt is broken more. * missing/crypt.c: move crypt_r.c * string.c (rb_str_crypt): use crypt_r if provided by the system. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* des_tables.cnobu2016-06-012-5/+1723
| | | | | | * missing/crypt_r.c: initialize DES tables statically. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* crypt_r.c: fix out of bounds accessnobu2016-06-011-10/+16
| | | | | | | * missing/crypt_r.c (a64toi): initialize statically and fix out of bounds access when salt is not 7bit clean. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* crypt_r.c: DES tablesnobu2016-06-011-10/+45
| | | | | | | * missing/crypt_r.c (des_tables): move sharable DES constant tables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* crypt_r.c: remove castsnobu2016-06-011-43/+33
| | | | | | | * missing/crypt_r.c: consitify and remove unnecessary pointer casts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* crypt_r.c: adjust stylenobu2016-06-011-5/+5
| | | | | | * missing/crypt_r.c: adjust style to BSD as the original. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use crypt_rnobu2016-06-011-0/+0
| | | | | | * string.c (rb_str_crypt): use reentrant crypt_r. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e