Skip to content
Tcl Source Code View Ticket
Login

View Ticket

c++ & tcl.h inclusion of varargs.h

Closed / Duplicate419694ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2001-04-28 03:57:48
Regarding the inclusion of stdarg.h vs varargs.h in
tcl.h.

The ISO C++ standard, Section 16.8, says that whether
__STDC__ is set, and the value it is set to, is
implementation-defined.  I.e., it's useless for C++. 
As a matter of fact, some C++ compilers (e.g. KAI's
KCC) define it or not define it according to the custom 
of the vendor's C++ compiler, since the vendor's
headers expect likewise. 

The proper fix is for the header file to adhere to the
rules in Section 16.8, and use: 

#if defined(__STDC__) || defined(HAS_STDARG) || \  
defined(__cplusplus)
#   include <stdarg.h>

etc.  Alternately define HAS_STDARG if __cplusplus
is defined.
dgpplain2001-04-28 11:24:39
Logged In: YES 
user_id=80530

Duplicate of 419692 (Must have clicked "submit" twice)
Log in (anonymous is fine) to add a comment.