Skip to content
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

Had very minor issue compiling on Solaris 10 spardc #196

Open
GoogleCodeExporter opened this issue Mar 12, 2015 · 0 comments
Open

Had very minor issue compiling on Solaris 10 spardc #196

GoogleCodeExporter opened this issue Mar 12, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Compile of Solaris 10 6/06 u3 with gcc 3.4.3
2. Have issue of"CLK_TCK is not static initializer value, use 
sysconf(_SC_CLK_TCK) instead"
3. Slightly change cstdlib/time.c for solaris platform


I changed line 13 of time.c to something like:

#ifdef CLK_TCK
/** @bug CLK_TCK is not static initializer value
static int CLK_TCKValue = CLK_TCK; use sysconf(_SC_CLK_TCK) instead*/
        #ifdef HOST_SOLARIS
        static int CLK_TCKValue = 1;
        #else
        static int CLK_TCKValue = CLK_TCK;
        #endif
#endif


And I changed the line like:

VariableDefinePlatformVar(NULL, "CLK_TCK", &IntType, (union AnyValue 
*)&CLK_TCKValue, FALSE);


to:

#ifdef CLK_TCK
        #ifdef HOST_SOLARIS
    CLK_TCKValue = sysconf(_SC_CLK_TCK);
    #endif
    VariableDefinePlatformVar(NULL, "CLK_TCK", &IntType, (union AnyValue *)&CLK_TCKValue, FALSE);
#endif


And then if I define HOST_SOLARIS when building on solaris, no problem, and it 
still works as per usual on other platforms for me so I made these changes 
locally its good enough for me so far.

Original issue reported on code.google.com by me4t...@gmail.com on 5 May 2014 at 3:02

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

No branches or pull requests

1 participant