Project

General

Profile

Actions

Bug #10825

closed

Fix build error in sdbm under Windows

Added by orodley (Owen Rodley) over 9 years ago. Updated about 9 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0dev (2015-02-03) [i386-mingw32]
[ruby-core:67987]

Description

Hi,

The attached patch fixes an error I was getting while attempting to compile
revision 49476 of Ruby under Windows (mingw), specifically in ext/sdbm/_sdbm.c.
One of the printf macros defined in "ruby/ruby.h" (PRIdPTRDIFF) is being
used, but the header does not get included, so the macro is undefined.

I believe the issue was introduced in revision 49021, with the addition of
this macro to the file. I guess there is some difference in configuration
between Windows and other platforms that causes the header to get included
appropriately under other platforms, but not under Windows.

I just included "ruby/ruby.h" in _sdbm.c explicitly to fix the issue, but
since I don't know how it is working under other platforms I'm not sure if
this is the best way to fix it. Please let me know.


Files

restore-windows-build.patch (182 Bytes) restore-windows-build.patch orodley (Owen Rodley), 02/03/2015 10:29 PM
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 9 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Applied in changeset r49490.


_sdbm.c: ruby/ruby.h for PRIdPTRDIFF

  • ext/sdbm/_sdbm.c: include ruby/ruby.h for PRIdPTRDIFF when a
    macro DEBUG is defined. based on the patch by Owen Rodley in
    [ruby-core:67987]. [Bug #10825]

Updated by usa (Usaku NAKAMURA) about 9 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED
Actions #3

Updated by naruse (Yui NARUSE) about 9 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE

ruby_2_2 r49643 merged revision(s) 49490.

Updated by usa (Usaku NAKAMURA) about 9 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE to 2.0.0: DONE, 2.1: REQUIRED, 2.2: DONE

ruby_2_0_0 r49736 merged revision(s) 49490,49494.

Actions #5

Updated by nagachika (Tomoyuki Chikanaga) about 9 years ago

  • Backport changed from 2.0.0: DONE, 2.1: REQUIRED, 2.2: DONE to 2.0.0: DONE, 2.1: DONE, 2.2: DONE

Backported into ruby_2_1 branch at r49994.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0