Menu

#8 lorenz doesn't build on Solaris in 0.8.3

open
None
5
2009-04-22
2009-04-16
No

The new lorenz screensaver in 0.8.3 doesn't build on Solaris, since its
"time" variable conflicts with the system time() function.

The errors reported by the Sun compiler:

"lorenz.cpp", line 68: Error: Multiple declaration for time.
"lorenz.cpp", line 245: Error: Formal argument t of type float in call to coords_
at_time(float*, float, float*, float*, float*) is being passed extern "C" long(*)
(long*).
"lorenz.cpp", line 246: Error: The operation "extern "C" long(*)(long*) + int" is
illegal.
"lorenz.cpp", line 247: Error: The operation "extern "C" long(*)(long*) + int" is
illegal.
"lorenz.cpp", line 304: Error: The operation "extern "C" long(*)(long*) + int" is
illegal.
"lorenz.cpp", line 305: Error: The operation "extern "C" long(*)(long*) + int" is
illegal.
"lorenz.cpp", line 488: Error: The operand "time" cannot be assigned to.
"lorenz.cpp", line 546: Error: The operand "*time" cannot be assigned to.

The attached patch is what we're using in the OpenSolaris packages to
resolve this, by renaming the time variable to "time_n" (for lack of a
better name).

Discussion

  • Alan Coopersmith

     
  • Tugrul Galatali

    Tugrul Galatali - 2009-04-22
    • assigned_to: nobody --> tugrul
     

Log in to post a comment.

MongoDB Logo MongoDB