Skip to content

Conversation

nshalman
Copy link
Contributor

Fixes the following error message on SmartOS:

$ go get github.com/mattn/go-sqlite3
In file included from /usr/include/stdio.h:37:0,
from go/src/github.com/mattn/go-sqlite3/sqlite3.c:8422:
/opt/local/gcc47/lib/gcc/i386-sun-solaris2.11/4.7.3/include-fixed/sys/feature_tests.h:366:2: error: #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications require the use of c99"

Fixes the following error message on SmartOS:

$ go get github.com/mattn/go-sqlite3
In file included from /usr/include/stdio.h:37:0,
                 from go/src/github.com/mattn/go-sqlite3/sqlite3.c:8422:
/opt/local/gcc47/lib/gcc/i386-sun-solaris2.11/4.7.3/include-fixed/sys/feature_tests.h:366:2: error: #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications  require the use of c99"
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling ae25191 on nshalman:c99 into c9a0db5 on mattn:master.

@mattn
Copy link
Owner

mattn commented Dec 19, 2014

I wonder this works with clang?

@nshalman
Copy link
Contributor Author

According do the clang documentation this should be fine. The clang users manual says:

clang supports the -std option, which changes what language mode clang uses. The supported modes for C are c89, gnu89, c94, c99, gnu99, c11, gnu11, and various aliases for those modes. If no -std option is specified, clang defaults to gnu11 mode. Many C99 and C11 features are supported in earlier modes as a conforming extension, with a warning. Use -pedantic-errors to request an error if a feature from a later standard revision is used in an earlier mode.

mattn added a commit that referenced this pull request Dec 19, 2014
set CFLAGS: -std=gnu99 (fixes SmartOS)
@mattn mattn merged commit 6dcf015 into mattn:master Dec 19, 2014
@mattn
Copy link
Owner

mattn commented Dec 19, 2014

Thank you.

@nshalman nshalman deleted the c99 branch December 19, 2014 00:50
@nshalman
Copy link
Contributor Author

Thank you as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants