In HP-UX, time_t
changes to type long. This change may cause source files that compile
without error using HP C++ for HP-UX 10.10 or 10.20 to not compile
with the 11.0 release. The example below shows one example of what
may occur.
1: #include <time.h> 2: time_t ff (time_t t) { return t; } 3: time_t ff (long t) { return t; } 4: int main () { long tt = ff (1L); return 0; }
|
In the example, ff is overloaded
to take either a time_t or a long
parameter. On a 10.10 or 10.20 system, where time_t
is an int, the code compiles. On
an 11.0 system, however, where time_t
is a long, the code fails to compile:
CC: "tm.c", line 4: error: two definitions of ff() (1034)
|