Post Reply 
libhpcalcs: portable (Windows / MacOS X / Linux) connectivity kit library
12-26-2013, 05:27 PM (This post was last modified: 12-26-2013 05:33 PM by Egan Ford.)
Post: #41
RE: libhpcalcs: portable (Windows / MacOS X / Linux) connectivity kit library
(12-26-2013 08:17 AM)debrouxl Wrote:  Which caused you to add -std=c99 yourself Wink
Since pretty much everyone using autoreconf/configure/make directly hits the problem, I'm adding AC_PROG_CC_C99 to configure.ac, and AC_MSG_ERROR(...) if ac_cv_prog_cc_c99 is "no", as described in the autoconf manual. Will commit after more testing, if successful.

C99 is only required because of a few lines of code in typesprime.c, e.g.:

Code:

    uint32_t i;
    for (i = 0; i < sizeof(PRIME_CONST)/sizeof(PRIME_CONST[0]) - 1; i++) {
    //for (uint32_t i = 0; i < sizeof(PRIME_CONST)/sizeof(PRIME_CONST[0]) - 1; i++) {

The commented out code is the orig, and the two lines above my changes. IOW, for standard ANSI C the variable declaration needs to be outside of the for block. I'd recommend changing the code and avoid the requirement for C99.

BTW, I read elsewhere that some where having issues with GCC 4.2 included with OS/X CLI tools. I am not having any issues.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: libhpcalcs: portable (Windows / MacOS X / Linux) connectivity kit library - Egan Ford - 12-26-2013 05:27 PM



User(s) browsing this thread: 6 Guest(s)