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

1614 Коммитов

Автор SHA1 Сообщение Дата
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