Project

General

Profile

Actions

Bug #5243

closed

VC 2010 Has stdint.h - Patch to Fix Build Files

Added by cfis (Charlie Savage) over 12 years ago. Updated over 12 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.0.0dev (2011-10-29) [i386-mswin32_100]
Backport:
[ruby-core:39150]

Description

VC 2010 added the c99 include file <stdint.h>. However, the Ruby makefiles in win32 have not taken this into account.

This causes problems when compiling extensions that require <stdint.h>. A good example of this is the ffi gem.

Here is what happens:

  1. From config.h -> typedef signed char int8_t;
  2. Then from stdint.h -> typedef signed char int8_t;

That turns into:

typedef signed char signed char;

Which causes this error:

c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(17): warning C4114: same type qualifier used more than once

c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdint.h(17): error C2632: 'char' followed by 'char' is illegal

The attached patch updates win32/Makefile.sub to understand that VC2010 and higher have <stdint.h>. I have successfully built and tested this patch using VC 2010.


Files

win32_std_int.patch (2.08 KB) win32_std_int.patch cfis (Charlie Savage), 08/28/2011 08:11 AM

Updated by arton (Akio Tajima) over 12 years ago

  • Category changed from core to build
  • Status changed from Open to Assigned
  • Assignee set to arton (Akio Tajima)
  • Target version deleted (1.9.3)
  • Start date changed from 08/28/2011 to 10/29/2011
  • ruby -v changed from ruby 1.9.3dev (2011-08-28 revision 33105) [i386-mswin32_100] to ruby 2.0.0dev (2011-10-29) [i386-mswin32_100]

I've reproduced the bug and found it's harmful (one can't avoid it).
The patch is not fit for x64, so I reconfigure it. Thanks.

Actions #2

Updated by arton (Akio Tajima) over 12 years ago

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

This issue was solved with changeset r33556.
Charlie, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • win32/Makefile.sub (CONFIG_H): have stdint.h if VC2010. [Bug #5243]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0