rails-sqlserver / tiny_tds

TinyTDS - Simple and fast FreeTDS bindings for Ruby using DB-Library.
Other
606 stars 190 forks source link

2.1.4 Compilation error on Amazon Linux 1 loop initial declarations are only allowed in C99 mode #495

Closed januszm closed 3 years ago

januszm commented 3 years ago

Environment

Operating System

Amazon Linux 1 (4.14.225-121.362.amzn1.x86_64) with GCC 4.8 (x86_64-amazon-linux gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC))

TinyTDS Version and Information

Problem occurs only on tiny_tds v 2.1.4.

# tsql -C
Compile-time settings (established with the "configure" script)
                            Version: freetds v1.00.112
             freetds.conf directory: /usr/local/etc
     MS db-lib source compatibility: no
        Sybase binary compatibility: no
                      Thread safety: yes
                      iconv library: yes
                        TDS version: 7.4
                              iODBC: no
                           unixodbc: no
              SSPI "trusted" logins: no
                           Kerberos: no
                            OpenSSL: yes
                             GnuTLS: no
                               MARS: no

FreeTDS Version

Any, tested on FreeTDS 1.2.21 , 1.1.40, 1.0.86

Description

result.c:107:7: error: ‘for’ loop initial declarations are only allowed in C99 mode
       for (short int j = i; j < userdata->nonblocking_errors_length; j++) {
januszm commented 3 years ago

tiny_tds 2.1.3 compiles just fine