Chapter 5 UNIX Compiler/Linker Issues
LabWindows/CVI Programmer Reference Manual 5-10
©
National Instruments Corporation
Incompatibilities among LabWindows/CVI, Sun Solaris, and ANSI C
Under the ANSI C standard, the programmer who implements the library chooses how certain
functions behave. As a result, two implementations of a function can behave differently and
still conform to the ANSI standard. Because LabWindows/CVI now uses the Sun Solaris C
library, incompatibilities arise from the following sources:
Differences between LabWindows/CVI and the ANSI standard
Differences between LabWindows/CVI and the Sun Solaris standard
This section outlines these incompatibilities.
Note None of these incompatibilities interfere with development of projects and
standalone executables in LabWindows/CVI for Sun.

Between LabWindows/CVI and ANSI C

The following incompatibilities exist between LabWindows/CVI and ANSI C:
LabWindows/CVI for Solaris 1 defines size_t as a signed integer instead of an
unsigned integer as the ANSI C standard requires. National Instruments uses the
signed integer definition to make LabWindows/CVI compatible with the Sun Solaris
headerfiles.
LabWindows/CVI for Solaris 1 uses the Sun Solaris version of the ANSI function
strftime, which incorrectly interprets the "%W" control string as the one-based week
number instead of the zero-based week number as ANSI specifies.
In LabWindows/CVI for Solaris 1, ungetc works improperly in certain cases:
-fsetpos fails to erase all memory of pushback characters by ungetc.
-ungetc does not clear the end-of-file indicator on success.
-ungetc fails in certain cases after reading to the end of a file.
In LabWindows/CVI for Solaris 1, signal handlers you install with the signal function
remain installed after invocation of the handler. The ANSI standard specifies that these
handlers be removed before they are invoked.
In standalone executables LabWindows/CVI creates for Solaris 1, the function abort
and the macro assert do not terminate the program if you install a signal handler for the
SIGABRT signal and the handler returns rather than calling longjmp. The ANSI standard
specifies that the program terminate in these cases.
Under some versions of Sun Solaris 2 (for example, Solaris 2.5), the ANSI function
setlocale does not work properly when running programs in the LabWindows/CVI
development environment. LabWindows/CVI links programs in the development
environment to the Sun Solaris static library libc.a, which contains a limited version

00ProRef.book : 06chap05.fm Page 10 Monday, March 9, 1998 3:23 PM