8000 merge revision(s) 3e47e7a499acd256be549935fcb559d3c82e556c, b48b84137… · github/ruby@65e02ab · GitHub
[go: up one dir, main page]

Skip to content {"props":{"docsUrl":"https://docs.github.com/get-started/accessibility/keyboard-shortcuts"}}

Commit 65e02ab

Browse files
committed
merge revision(s) 3e47e7a, b48b841, 2fe8b9c: [Backport #21327]
Fix redefinition of `clock_gettime` and `clock_getres` winpthreads-git 12.0.0.r720 provides `clock_gettime` and `clock_getres` as inline functions. digest.so needs ruby/digest.h which is installed by build-ext Copy to path with the base name
1 parent 862480a commit 65e02ab

File tree

8 files changed

+22
-9
lines changed

8 files changed

+22
-9
lines changed

common.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ RUN_OPTS = --disable-gems
4646
# GITPULLOPTIONS = --no-tags
4747

4848
PRISM_SRCDIR = $(srcdir)/prism
49-
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(PRISM_SRCDIR) -I$(UNICODE_HDR_DIR) $(incflags)
49+
INCFLAGS = -I. -I$(arch_hdrdir) -I$(ext_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(PRISM_SRCDIR) -I$(UNICODE_HDR_DIR) $(incflags)
5050

5151
GEM_HOME =
5252
GEM_PATH =
@@ -853,6 +853,9 @@ clean-platform distclean-platform realclean-platform:
853853
-$(Q) $(RMDIR) $(PLATFORM_DIR) 2> $(NULL) || $(NULLCMD)
854854

855855
RUBYSPEC_CAPIEXT = spec/ruby/optional/capi/ext
856+
RUBYSPEC_CAPIEXT_SRCDIR = $(srcdir)/$(RUBYSPEC_CAPIEXT)
857+
RUBYSPEC_CAPIEXT_DEPS = $(RUBYSPEC_CAPIEXT_SRCDIR)/rubyspec.h $(RUBY_H_INCLUDES) $(LIBRUBY) build-ext
858+
856859
clean-spec: PHONY
857860
-$(Q) $(RM) $(RUBYSPEC_CAPIEXT)/*.$(OBJEXT) $(RUBYSPEC_CAPIEXT)/*.$(DLEXT)
858861
-$(Q) $(RMDIRS) $(RUBYSPEC_CAPIEXT) 2> $(NULL) || $(NULLCMD)

defs/gmake.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ update-deps:
505505

506506
# order-only-prerequisites doesn't work for $(RUBYSPEC_CAPIEXT)
507507
# because the same named directory exists in the source tree.
508-
$(RUBYSPEC_CAPIEXT)/%.$(DLEXT): $(srcdir)/$(RUBYSPEC_CAPIEXT)/%.c $(srcdir)/$(RUBYSPEC_CAPIEXT)/rubyspec.h $(RUBY_H_INCLUDES) $(LIBRUBY)
508+
$(RUBYSPEC_CAPIEXT)/%.$(DLEXT): $(srcdir)/$(RUBYSPEC_CAPIEXT)/%.c $(RUBYSPEC_CAPIEXT_DEPS)
509509
$(ECHO) building $@
510510
$(Q) $(MAKEDIRS) $(@D)
511511
$(Q) $(DLDSHARED) -L. $(XDLDFLAGS) $(XLDFLAGS) $(LDFLAGS) $(INCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ $< $(LIBRUBYARG)
@@ -519,7 +519,6 @@ rubyspec-capiext: $(RUBYSPEC_CAPIEXT_SO)
519519
@ $(NULLCMD)
520520

521521
ifeq ($(ENABLE_SHARED),yes)
522-
ruby: $(if $(LIBRUBY_SO_UPDATE),$(RUBYSPEC_CAPIEXT_SO))
523522
exts: rubyspec-capiext
524523
endif
525524

include/ruby/win32.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,15 @@ typedef unsigned int uintptr_t;
126126
#define O_SHARE_DELETE 0x20000000 /* for rb_w32_open(), rb_w32_wopen() */
127127

128128
typedef int clockid_t;
129+
#if defined(__MINGW32__)
130+
#undef CLOCK_PROCESS_CPUTIME_ID
131+
#undef CLOCK_THREAD_CPUTIME_ID
132+
#undef CLOCK_REALTIME_COARSE
133+
#endif
134+
#if defined(HAVE_CLOCK_GETTIME) && !defined(CLOCK_REALTIME)
129135
#define CLOCK_REALTIME 0
130136
#define CLOCK_MONOTONIC 1
137+
#endif
131138

132139
#undef utime
133140
#undef lseek

lib/mkmf.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2578,7 +2578,7 @@ def create_makefile(target, srcprefix = nil)
25782578
dest = "#{dir}/#{File.basename(f)}"
25792579
mfile.print("do-install-rb#{sfx}: #{dest}\n")
25802580
mfile.print("#{dest}: #{f} #{timestamp_file(dir, target_prefix)}\n")
2581-
mfile.print("\t$(Q) $(#{$extout ? 'COPY' : 'INSTALL_DATA'}) #{f} $(@D)\n")
2581+
mfile.print("\t$(Q) $(#{$extout ? 'COPY' : 'INSTALL_DATA'}) #{f} $@\n")
25822582
if defined?($installed_list) and !$extout
25832583
mfile.print("\t@echo #{dest}>>$(INSTALLED_LIST)\n")
25842584
end

template/Makefile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ DOCTARGETS = @RDOCTARGET@ @CAPITARGET@
7777

7878
EXTOUT = @EXTOUT@
7979
TIMESTAMPDIR = $(EXTOUT)/.timestamp
80-
arch_hdrdir = $(EXTOUT)/include/$(arch)
80+
ext_hdrdir = $(EXTOUT)/include
81+
arch_hdrdir = $(ext_hdrdir)/$(arch)
8182
VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/missing
8283

8384
empty =

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
1212
#define RUBY_VERSION_TEENY 3
1313
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
14-
#define RUBY_PATCHLEVEL 33
14+
#define RUBY_PATCHLEVEL 34
1515

1616
#include "ruby/version.h"
1717
#include "ruby/internal/abi.h"

win32/Makefile.sub

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,8 @@ ENCOBJS = dmyenc.$(OBJEXT)
496496
EXTOBJS = dmyext.$(OBJEXT)
497497
!endif
498498

499-
arch_hdrdir = $(EXTOUT)/include/$(arch)
499+
ext_hdrdir = $(EXTOUT)/include
500+
arch_hdrdir = $(ext_hdrdir)/$(arch)
500501
top_srcdir = $(srcdir)
501502
hdrdir = $(srcdir)/include
502503
VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/missing;$(win_srcdir)
@@ -1460,8 +1461,6 @@ loadpath: verconf.h
14601461
sed -e '1,/^const char ruby_initial_load_paths/d;/;/,$$d' \
14611462
-e '/^^ /!d;s/ *"\\\\0"$$//;s/" *"//g'
14621463

1463-
RUBYSPEC_CAPIEXT_SRCDIR = $(srcdir)/$(RUBYSPEC_CAPIEXT)
1464-
RUBYSPEC_CAPIEXT_DEPS = $(RUBYSPEC_CAPIEXT_SRCDIR)/rubyspec.h $(RUBY_H_INCLUDES) $(LIBRUBY)
14651464
RUBYSPEC_CAPIEXT_EXTS =
14661465

14671466
!if [echo>rubyspec-capiext.mk RUBYSPEC_CAPIEXT_EXTS = \]

win32/win32.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4790,6 +4790,7 @@ gettimeofday(struct timeval *tv, struct timezone *tz)
47904790
return 0;
47914791
}
47924792

4793+
#if !defined(__MINGW32__) || !defined(HAVE_CLOCK_GETTIME)
47934794
/* License: Ruby's */
47944795
int
47954796
clock_gettime(clockid_t clock_id, struct timespec *sp)
@@ -4829,7 +4830,9 @@ clock_gettime(clockid_t clock_id, struct timespec *sp)
48294830
return -1;
48304831
}
48314832
}
4833+
#endif
48324834

4835+
#if !defined(__MINGW32__) || !defined(HAVE_CLOCK_GETRES)
48334836
/* License: Ruby's */
48344837
int
48354838
clock_getres(clockid_t clock_id, struct timespec *sp)
@@ -4857,6 +4860,7 @@ clock_getres(clockid_t clock_id, struct timespec *sp)
48574860
return -1;
48584861
}
48594862
}
4863+
#endif
48604864

48614865
/* License: Ruby's */
48624866
static char *

0 commit comments

Comments
 (0)
0