Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

UCHAR: #define, typedef, and __stdcall in win.h (lcc-win32)

299 views
Skip to first unread message

Olaf Dietrich

unread,
May 29, 2008, 3:13:24 AM5/29/08
to
/* I found this problem when compiling a single source file from
* the current Tcl source (8.5.2):
* lcc-win32 (version 3.8) reports an error with respect to its
* own win.h header file if a UCHAR macro is defined before
* inclusion of win.h.
* The problem is demonstrated in the following short example:
*/

#define UCHAR(c) ((unsigned char) (c))
typedef unsigned char UCHAR;

UCHAR __stdcall a(void);

int main(void) { return 0; }


/* The error message is:
*
* | Error testit.c: 4 Syntax error; missing semicolon before `a'
* | Warning testit.c: 4 no type specified. Defaulting to int
* | 1 error, 1 warning
*
* The same example compiles without problems with the
* Visual C++ compiler.
*
* Originally, the problem occured in line 14989 of
* ...\lcc\include\win.h, i.e. in the line:
*
* UCHAR APIENTRY Netbios(PNCB);
*
*
* Olaf
*/

jacob navia

unread,
May 29, 2008, 8:26:11 AM5/29/08
to

Hi Olaf

Just try writing _stdcall instead of __stdcall.

I think I should support both _stdcall and __stdcall but...
haven't done it yet.

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32

0 new messages