Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-4591

ruby.h includes config.h and standard libraries -- should be first include for ruby client

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.9.x
    • ---
    • bindings_swig_ruby
    • None

    Description

      since ruby.h includes config.h correctly prior to including standard libraries,
      this causes warnings and potentially erroneous behaviour if any standard
      libraries are include prior to ruby.h.
      
      Example:
      --- subversion/bindings/swig/ruby/core.lo ---
      In file included from
      /tmp/pkgsrc/devel/ruby-subversion/work/.buildlink/include/ruby-2.0.0/ruby/ruby.h:24:0,
                       from
      /tmp/pkgsrc/devel/ruby-subversion/work/.buildlink/include/ruby-2.0.0/ruby.h:33,
                       from subversion/bindings/swig/ruby/core.c:821:
      /tmp/pkgsrc/devel/ruby-subversion/work/.buildlink/include/ruby-2.0.0/i486-solaris2.11/ruby/config.h:51:0:
      warning: "_FILE_OFFSET_BITS" redefined
       #define _FILE_OFFSET_BITS 64
       ^
      In file included from /usr/include/iso/string_iso.h:49:0,
                       from
      /opt/local/gcc49/lib/gcc/i486-sun-solaris2.11/4.9.3/include-fixed/string.h:42,
                       from subversion/bindings/swig/ruby/core.c:406:
      /opt/local/gcc49/lib/gcc/i486-sun-solaris2.11/4.9.3/include-fixed/sys/feature_tests.h:231:0:
      note: this is the location of the previous definition
       #define _FILE_OFFSET_BITS 32
       ^
      
      also happens with:
      subversion/bindings/swig/ruby/svn_client.lo
      subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.lo
      subversion/bindings/swig/ruby/svn_delta.lo
      subversion/bindings/swig/ruby/svn_ra.lo
      subversion/bindings/swig/ruby/svn_repos.lo
      subversion/bindings/swig/ruby/svn_diff.lo
      subversion/bindings/swig/ruby/svn_fs.lo
      subversion/bindings/swig/ruby/svn_wc.lo
      

      Original issue reported by risto3

      Attachments

        Activity

          People

            Unassigned Unassigned
            subversion-importer Subversion Importer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: