Граф коммитов

1667 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 9299703b39
Make uenvarea thread exclusive 2021-03-08 17:46:07 +09:00
Nobuyoshi Nakada 8c943e3be8
Make the flag in thread_exclusive unique 2021-03-08 17:46:07 +09:00
Nobuyoshi Nakada 1a00402987
Enclose crtitical sections in `thread_exclusive` block 2021-03-08 17:45:02 +09:00
Nobuyoshi Nakada a12e950816
Revert "Enclose crtitical sections in `thread_exclusive` block"
19cc24b34b and fixups.
2021-02-24 03:13:07 +09:00
Nobuyoshi Nakada 7563d542d6
Use the system getenv in setup_debug_log
As ruby_set_debug_option() is called before ruby_sysinit(),
CRITICAL_SECTIONs are not initialized yet.
2021-02-23 23:11:44 +09:00
Nobuyoshi Nakada 819dd464de
Fixed commit miss at 41eb4fbf86 2021-02-23 21:23:46 +09:00
Nobuyoshi Nakada 5a4742a0b4
Make uenvarea thread exclusive 2021-02-23 21:19:25 +09:00
Nobuyoshi Nakada 41eb4fbf86
Fixed commit miss at 19cc24b34b 2021-02-23 20:46:40 +09:00
Nobuyoshi Nakada da18d6f015
Constified possible data 2021-02-23 19:28:03 +09:00
Nobuyoshi Nakada 19cc24b34b Enclose crtitical sections in `thread_exclusive` block 2021-02-23 19:03:54 +09:00
Andrew Aladjev 0d76636117 added mutexes for socket and connection lists on win32 2021-02-23 16:20:01 +09:00
Nobuyoshi Nakada 67d2619463 Expand final path name buffer for namespace prefix
As final path name includes the namespace prefix, so expand room
for it in path name buffer.
2021-02-22 19:48:15 +09:00
Nobuyoshi Nakada 4e32a4ab81 Search subclasses from constants 2021-02-22 13:24:27 +09:00
Nobuyoshi Nakada cc8e966e3c
MSys is a variant of Cygwin 2021-02-20 23:33:22 +09:00
Nobuyoshi Nakada 169c726f60
[Win32] Fixed preprocessed file path
Output preprocessed files under the corresponding directory to the
source files.
2021-02-20 21:05:57 +09:00
S.H 837e77e020
Fix link msdn.microsoft.com (#4202) 2021-02-19 11:10:21 -08:00
YO4 (Yoshinao Muramatsu) b94b7965c4
Fixed fallback ENABLE_VIRTUAL_TERMINAL_PROCESSING value [Bug #17639] 2021-02-20 00:50:57 +09:00
xtkoba (Tee KOBAYASHI) a681c484a3
Fixed codepage for utime [Bug #17626]
Should use the given codepage argument.

Co-Authored-By: Nobuyoshi Nakada <nobu@ruby-lang.org>
2021-02-14 19:44:41 +09:00
卜部昌平 73e948afd5 win32/win32.c:getcwd_value: delete OBJ_TAINT
Makes no sense any longer.
2021-01-27 09:30:15 +09:00
卜部昌平 a2c069fca9 win32/file.c:rb_file_expand_path_internal: delete OBJ_TAINT
Makes no sense any longer.
2021-01-27 09:30:15 +09:00
Nobuyoshi Nakada 977252421b
ifchange: check the number of arguments 2021-01-04 15:54:09 +09:00
Nobuyoshi Nakada ecfbd97292
win32: Removed never used/worked functions
Almost certainly, these have never been used in external extension
libraries.  If any had, these would have had to be declared in
headers.
2020-12-27 16:50:10 +09:00
Nobuyoshi Nakada 90dd482061
win32: Declared wait and fixed the return type 2020-12-27 16:49:27 +09:00
U.Nakamura 09f939d3a0 Enable escape sequence on Windows10 console
* win32/win32.c (init_stdhandle): enable escape sequence on
	  Windows10 console to show `ruby --help` colors correctly.
2020-12-21 17:29:09 +09:00
Nobuyoshi Nakada 37987d9994 win32: Deprecate file CP version functions 2020-12-20 18:34:04 +09:00
Nobuyoshi Nakada 95862ae440 win32: Added rb_w32_ureaddir only for UTF-8 [Feature #12654] 2020-12-20 18:34:04 +09:00
Nobuyoshi Nakada 5b98b2ce39 win32: Use UTF-8 as filesystem encoding [Feature #12654]
Co-Authored-By: Dāvis Mosāns <davispuh@gmail.com>
2020-12-20 18:34:04 +09:00
Nobuyoshi Nakada d44671c819
Revived the getenv macro for dln_find.c
This partially reverts commit "Windows: Improve readablity of
getenv() encoding" 14453a256d.

The `getenv` macro defined here is to also substitute the function
in dln_find.c, not only in this file.
2020-12-20 01:57:51 +09:00
Nobuyoshi Nakada ddb93c3d64 Made LARGEFILE_SUPPORT mandatory 2020-12-16 19:10:37 +09:00
Nobuyoshi Nakada 4d2ad8d737
Removed obsolete autoconf checks
Use regular `AC_CHECK_MEMBERS` instead of:
* `AC_STRUCT_ST_BLKSIZE`
* `AC_STRUCT_ST_BLOCKS`
* `AC_STRUCT_ST_RDEV`
2020-12-12 17:23:44 +09:00
Nobuyoshi Nakada 0df67a4695 Signal handler type should be void 2020-12-12 17:02:42 +09:00
Nobuyoshi Nakada 21c5726418 Omit checks for C89 standard or later
Now we require C99, these features available of course.

* prototypes
* stdarg prototypes
* token pasting
* stringization
* string literal concatenation
2020-12-12 17:02:42 +09:00
Lars Kanis ca76337a00
Windows: Read ENV names and values as UTF-8 encoded Strings (#3818)
* Windows: Read ENV names and values as UTF-8 encoded Strings

Implements issue #12650: fix https://bugs.ruby-lang.org/issues/12650

This also removes the special encoding for ENV['PATH'] and some
complexity in the code that is unnecessary now.

* Windows: Improve readablity of getenv() encoding

getenv() did use the expected codepage as an implicit parameter of the macro.
This is mis-leading since include/ruby/win32.h has a different definition.
Using the "cp" variable explicit (like the other function calls) makes it
more readable and consistent.

* Windows: Change external C-API macros getenv() and execv() to use UTF-8

They used to process and return strings with locale encoding,
but since all ruby-internal spawn and environment functions use UTF-8,
it makes sense to change the C-API equally.
2020-12-08 02:00:39 +09:00
Nobuyoshi Nakada 3db21cf25f
Revived the getenv macro for dln_find.c
This partially reverts commit "Windows: Improve readablity of
getenv() encoding" 14453a256d.

The `getenv` macro defined here is to also substitute the function
in dln_find.c, not only in this file.
2020-11-28 18:47:56 +09:00
Lars Kanis 14453a256d
Windows: Improve readablity of getenv() encoding
getenv() did use the expected codepage as an implicit parameter of the macro.
This is mis-leading since include/ruby/win32.h has a different definition.
Using the "cp" variable explicit (like the other function calls) makes it
more readable and consistent.
2020-11-28 17:49:47 +09:00
Nobuyoshi Nakada b958e2add8 Removed canonicalization for mathn 2020-11-10 11:14:15 +09:00
卜部昌平 21b3bc10d3 DEPRECATED_TYPE: is deprecated
Nobody uses this macro any longer.
2020-08-27 15:02:52 +09:00
Kazuhiro NISHIYAMA 946cd6c534
Use https instead of http 2020-07-28 19:51:54 +09:00
Nobuyoshi Nakada 047471c529
No GITPULLOPTIONS by default
To honor the environment variable, keep GITPULLOPTIONS unset by
default, and appended the option to VCSUP.
2020-06-04 13:16:24 +09:00
Nobuyoshi Nakada 17d17de0e8
Get rid of redefinition of memcpy on mingw 2020-05-26 16:58:40 +09:00
Nobuyoshi Nakada feb8dc55b6
Include wchar.h before wrapping memchr
On mingw, wmemcpy() is defined as an inline function using
memcpy(), and the static inline wrapper causes a warning.

```
In file included from include/ruby/ruby.h:39,
                 from win32/file.c:5:
include/ruby/internal/memory.h:284:16: warning: 'ruby_nonempty_memcpy' is static but used in inline function 'wmemcpy' which is not static
  284 | #define memcpy ruby_nonempty_memcpy
      |                ^~~~~~~~~~~~~~~~~~~~
```
2020-05-19 22:09:34 +09:00
Nobuyoshi Nakada 3fcf7f0271
win32/mkexports.rb: do not export internal symbols
Functions using `rb_thread_t` and `rb_execution_context_t` are
internal use only.
2020-05-12 10:02:39 +09:00
卜部昌平 9e41a75255 sed -i 's|ruby/impl|ruby/internal|'
To fix build failures.
2020-05-11 09:24:08 +09:00
卜部昌平 d7f4d732c1 sed -i s|ruby/3|ruby/impl|g
This shall fix compile errors.
2020-05-11 09:24:08 +09:00
Nobuyoshi Nakada 93edbb4c08
Support version ranges for MSVC [Feature #16763] 2020-04-11 17:12:24 +09:00
卜部昌平 9e6e39c351
Merge pull request #2991 from shyouhei/ruby.h
Split ruby.h
2020-04-08 13:28:13 +09:00
Nobuyoshi Nakada 5ac4bf2cd8
[win32] Moved `MSC_VER` to verconf.mk and reduce running CPP 2020-04-08 12:28:32 +09:00
Nobuyoshi Nakada 8c8e64a295
[win32] Removed useless macro name that isn't expanded in `#error` 2020-04-08 11:51:27 +09:00
Nobuyoshi Nakada 21d0b40de2 Added tooldir variable 2020-04-05 09:26:57 +09:00
Nobuyoshi Nakada 43a3c88187
[win32] get rid of redefinition of reserved macro
```
warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
```
2020-03-05 12:03:39 +09:00
Nobuyoshi Nakada 5bb80b76b0
[win32] suppress false warning by mingw gcc 2020-03-04 23:13:18 +09:00
卜部昌平 49bb2e64cc avoid defining inline
Recent (since 2012 maybe?) MSVC ships a header named xkeycheck.h, which
(kindly!) aborts compilation on redefinition of C++ keywords.  Let's not
define this in case of C++.
2020-02-20 11:46:54 +09:00
卜部昌平 cdd75d4e7f support C++ std::nullptr_t
C++ keyword `nullptr` represents a null pointer (note also that NULL is
an integer in C++ due to its design flaw).  Its type is `std::nullptr_t`,
defined in <cstddef> standard header.  Why not support it when the
backend implementation can take a null pointer as an argument.
2020-01-31 13:01:52 +09:00
卜部昌平 5e22f873ed decouple internal.h headers
Saves comitters' daily life by avoid #include-ing everything from
internal.h to make each file do so instead.  This would significantly
speed up incremental builds.

We take the following inclusion order in this changeset:

1.  "ruby/config.h", where _GNU_SOURCE is defined (must be the very
    first thing among everything).
2.  RUBY_EXTCONF_H if any.
3.  Standard C headers, sorted alphabetically.
4.  Other system headers, maybe guarded by #ifdef
5.  Everything else, sorted alphabetically.

Exceptions are those win32-related headers, which tend not be self-
containing (headers have inclusion order dependencies).
2019-12-26 20:45:12 +09:00
Nobuyoshi Nakada db16629008
Fixed misspellings
Fixed misspellings reported at [Bug #16437], only in ruby and rubyspec.
2019-12-20 09:32:42 +09:00
Koichi Sasada 9c2807b2df remove prelude.c
prelude.c is an automatically generated file by template/prelude.c.tmpl.
However it does not contain any required functions. So remove it from
dependency.

Also miniprelude.c is included by mini_builtin.c and does not need
to make miniprelude.o.
2019-12-11 11:24:42 +09:00
NAKAMURA Usaku 7bd7a013b1
Fix `$(RMALL) -r` on Windows
`set recursive=1 &` sets `1 ` to `recursive`, not `1`.
2019-11-26 11:44:11 +09:00
Nobuyoshi Nakada 83900528ad
Turn C4047 warning into error
Warned at making precompiled header on mswin.

```
building rb_mjit_header-2.7.0.pch
vm.c
d:\a\ruby\ruby\src\vm_args.c(1117): warning C4047: '=': 'const rb_callable_method_entry_t *' differs in levels of indirection from 'int'
rb_mjit_header-2.7.0.pch updated
```
2019-11-20 16:28:18 +09:00
Nobuyoshi Nakada 11aa07c270
Define NULLCMD as printing NUL [Bug #16331] 2019-11-10 10:52:12 +09:00
Nobuyoshi Nakada 2c55ba7191
Define NULLCMD as an empty label [Bug #16331] 2019-11-10 10:10:31 +09:00
Nobuyoshi Nakada fcf37ca2fe Fix builtin scirpt paths
Do not search builtin scripts by using VPATH, to get rid of weird
nmake VPATH.
2019-11-09 21:16:05 +09:00
Nobuyoshi Nakada 7acf7a4f90
Add VPATH to rbinc rule for nmake 2019-11-08 18:49:18 +09:00
Nobuyoshi Nakada 4e8336bae8
Share test-bundled-gems-run in common.mk 2019-11-05 00:05:38 +09:00
Gabriel Nagy ddfb306e8e win32.c: Remove unused calls to StartSockets (#2312)
NtSocketsInitialized behavior changed in e33b1690, requiring
a call to rb_w32_sysinit for starting Windows Sockets.

This commit removes NtSocketsInitialized entirely to avoid confusion.

Signed-off-by: Gabriel Nagy <gabriel.nagy@puppet.com>
2019-10-11 13:48:02 +09:00
Nobuyoshi Nakada 0c6f36668a
Adjusted spaces [ci skip] 2019-09-27 10:20:56 +09:00
Nobuyoshi Nakada c3f03da494
[EXPERIMENTAL] MakeMakefile::CXX for C++ 2019-09-18 18:47:02 +09:00
卜部昌平 20e428ec40 fix CentOS 6 compile error
See also https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos6/ruby-master/log/20190910T003005Z.fail.html.gz
2019-09-10 12:25:36 +09:00
Kazuhiro NISHIYAMA 99bfa6c165
Try to fix compile error on win32
https://github.com/ruby/ruby/runs/213995386#step:7:810
```
cxxanyargs.cpp
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_malloc.h(54): error C2485: '__restrict': unrecognized extended attribute
```
2019-09-06 17:47:24 +09:00
卜部昌平 9ef51b0b89 drop-in type check for rb_define_method
The rb_define_method function takes a pointer to ANYARGS-ed functions,
which in fact varies 18 different prototypes.  We still need to
preserve ANYARGS for storages but why not check the consistencies if
possible.

Q&As:

Q: Where did the magic number "18" came from in the description above?

A: Count the case branch of vm_method.c:call_cfunc_invoker_func().
   Note also that the 18 branches has lasted for at least 25 years.
   See also 200e0ee2fd.

Q: What is this __weakref__ thing?

A: That is a kind of function overloading mechanism that GCC provides.
   In this case for instance rb_define_method0 is an alias of
   rb_define_method, with a strong type.

Q: What is this __transparent_union__ thing?

A: That is another kind of function overloading mechanism that GCC
   provides.  In this case the attributed function pointer is either
   VALUE(*)(int,VALUE*,VALUE) or VALUE(*)(int,const VALUE*,VALUE).

   This is better than void* or ANYARGS because we can reject all
   other possibilities than the two.

Q: What does this rb_define_method macro mean?

A: It selects appropriate alias of the rb_define_method function,
   depending on the arity.

Q: Why the prototype change of rb_f_notimplement?

A: Function pointer to rb_f_notimplement is special cased in
   vm_method.c:rb_add_method_cfunc().  That should be handled by the
   __builtin_choose_expr chain inside of rb_define_method macro
   expansion.  In order to do so, comparison like (func ==
   rb_f_notimplement) is inappropriate for __builtin_choose_expr's
   expression (which must be a compile-time integer constant but the
   address of rb_f_notimplement is not fixed until the linker).  So
   instead we are using __builtin_types_compatible_p, and in doing so
   we need to distinguish rb_f_notimplement from others, by type.
2019-08-29 18:34:09 +09:00
Nobuyoshi Nakada 2283411265
Added license comment [Bug #12230] [ci skip] 2019-08-27 07:59:50 +09:00
git 1f3f50fb5e * expand tabs. [ci skip] 2019-08-19 14:34:29 +09:00
Nobuyoshi Nakada 574a9edfb3
Set flag to allow unprivileged users to create symlinks (#2381)
* [Win32] set flag to allow unprivileged users to create symlinks
2019-08-19 14:34:13 +09:00
Nobuyoshi Nakada 7adc8c79ea
[DOC] "nmake check" is preferable to "nmake exam" now [ci skip]
[Feature #14187]
2019-08-04 08:15:05 +09:00
Nobuyoshi Nakada 9b38c84550
[DOC] updated about icons in win32/README.win32 [ci skip]
[Bug #13348]
2019-08-04 08:07:06 +09:00
Nobuyoshi Nakada 9733b47eb8
[DOC] "nmake check" is preferable to "nmake exam" now [ci skip]
[Feature #14187]
2019-08-04 07:14:30 +09:00
Nobuyoshi Nakada 6a1458caf2
[DOC] Mark up path names to show a backslash [ci skip] 2019-08-04 07:14:17 +09:00
Nobuyoshi Nakada 0a63c4d5fb
Fix errno at seeking socket/pipe on Windows
[Bug #12230]
2019-07-25 06:39:40 +09:00
Samuel Williams 7291fef55c
Improve build process and coroutine implementation selection. 2019-07-18 20:54:54 +12:00
Samuel Williams d17344cfc5 Remove IA64 support. 2019-06-19 23:30:04 +12:00
Nobuyoshi Nakada 0723c107f4
Do not export InitVM functions 2019-05-17 13:55:59 +09:00
Nobuyoshi Nakada 9a4d39b95e
No longer svn & git-svn are used 2019-05-10 15:22:54 +09:00
NAKAMURA Usaku 151b7d72bd
Forgotten to remove 2019-04-30 15:02:03 +09:00
NAKAMURA Usaku 320f0aba49
Revert previous commit; it was meaningless 2019-04-30 04:09:07 +09:00
git ae3a986204 * expand tabs. 2019-04-30 03:33:51 +09:00
NAKAMURA Usaku 09022b6d70 Use CreateToolhelp32Snapshot instead of NtQueryInformationProcess to get ppid on Windows
Try to get rid of a spec error.
2019-04-30 03:33:31 +09:00
Nobuyoshi Nakada fdcd640507
Makefiles need to be indented by tabs 2019-04-28 11:36:03 +09:00
NAKAMURA Usaku beaddd1d32 Now only supports Git repository 2019-04-22 11:33:56 +09:00
usa 5906bcc95a Remove debug lines
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21 04:53:44 +00:00
usa 66b6d76648 Show/unshow executing command as specified by `V`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-21 04:52:38 +00:00
nobu 958798851d FindFirstFile cannot glob share names
* win32/file.c (replace_to_long_name): do not try to glob host
  names and share names by FindFirstFile which is useless for that
  purpose.  [ruby-core:91656] [Bug #15633]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-03-04 08:13:25 +00:00
nobu bd8cb9f5d2 Parenthesize `for` to ignore errors
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-13 15:34:08 +00:00
nobu 43ee21f26d Ignore errors on cleaning
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-13 15:19:26 +00:00
nobu af479d54dc README.win32: [DOC] added modeline [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-05 06:00:25 +00:00
usa 9acd2b20c8 Update requirements
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-04 08:10:24 +00:00
nobu 8f8b51c6ac README.win32: mention GIT as well as SVN
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-02 07:25:07 +00:00
nobu c2781525ec README.win32: update required commands and platform names
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-02 07:18:50 +00:00
nobu 3f78209cd1 README.win32: use label-list
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-02 06:38:08 +00:00
nobu adbdbff2df README.win32: reformat as RDoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-01 13:40:10 +00:00
k0kubun 6c1ed519ef win32/Makefile.sub: try to use __restrict on Visual Studio 2013
as well. Follows up r66598.

https://bugs.ruby-lang.org/issues/15347#note-7 is saying __restrict
is supported on Visual Studio 2013.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-04 15:41:29 +00:00
nobu f826cde5a9 Add RUBY_API_VERSION to rbconfig.rb on mswin too
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-28 09:44:32 +00:00