-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ior does not build without CFLAGS=-std=gnu99 #93
Comments
AC_PROG_CC_C99 in the configure will do it. I think it is safe for IOR to require C99 or even just jump to C11. FWIW, Open MPI requires C99 now and will require C11 in the future. |
I'm in favor of going to C99 at least. There shouldn't be any compiler
nowadays that does not do C99.
Nathan Hjelm <notifications@github.com> schrieb am Di., 2. Okt. 2018, 03:06:
… AC_PROG_CC_C99 in the configure will do it. I think it is safe for IOR to
require C99 or even just jump to C11.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#93 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AE1uyq6QrbpkHWSE7zRIF7fytZcKoIOUks5ugspAgaJpZM4XDJWh>
.
|
Indeed. Even Microsoft supports C99 now for the most part. They were the lone holdout for a long time. As of 2018 icc, gcc, pgcc, xlc, and sun cc all support all of C99 and most/all of C11. |
It turns out we already require C99 so the first half of this issue is not actually an issue. However the fact remains that
This is an issue of what magic switches autoconf should be looking for and shouldn't be hard to fix. More critically though, the following error is fatal:
I'll work on getting this all compiling using standard C. |
Great. The optarg one is a bug. Since the option parser is rewritten, there
should not be the need of using optarg.
Glenn K. Lockwood <notifications@github.com> schrieb am Di., 2. Okt. 2018,
05:51:
… It turns out we already require C99 so the first half of this issue is not
actually an issue. However the fact remains that -std=c99 reveals a bunch
of not-strictly-compliant behavior such as
CC libaiori_a-ior.o
../../src/ior.c(182): warning #266: function "strdup" declared implicitly
p->api = strdup(default_aiori);
^
This is an issue of what magic switches autoconf should be looking for and
shouldn't be hard to fix.
More critically though, the following error is fatal:
../../src/parse_options.c(543): error: identifier "optarg" is undefined
initialTestParams.memoryPerNode = NodeMemoryStringToBytes(optarg);
^
compilation aborted for ../../src/parse_options.c (code 2)
I'll work on getting this all compiling using standard C.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#93 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AE1uynM3tyX6E82NaeyTunw4AwK1Q60wks5ugvC4gaJpZM4XDJWh>
.
|
Making IOR actually comply with POSIX C now will require code changes that I don't want to hammer out before the 3.2 release, so this will have to wait until after 3.2. In particular, we use |
I made the changes from usleep to nanosleep at least. |
Thanks! I will try to get the rest of the patches tidied up and make a PR soon. |
Moved _XOPEN_SOURCE to config.h; resolves #93
A number of recent changes have essentially required that
for (int i = 0; ...)
#ifdef _GNU_SOURCE
type of issue or what)In particular, I am having lots of problems compiling ior's master using the Cray MPI environment (CLE6) and the Intel compiler, but I don't have the time to debug right now. In the long term, we should decide if we are OK with requiring C99 (and if so, add that to autoconf).
My personal preference is to use strict c89 and add that to the regression tests' compiler flags so we catch non-compliant C.
The text was updated successfully, but these errors were encountered: