Hi John.
Giving a value to __STDC_WANT_LIB_EXT2__ solves the problem.
#define __STDC_WANT_LIB_EXT2__ 1
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <io.h>
This comes from the test in stdio.h and string.h:
#if __STDC_WANT_LIB_EXT2__
It would have worked should it have been:
#ifdef __STDC_WANT_LIB_EXT2__
I don't know if this could be a bug. I would expect that the preprocessor should resolve to a value=0 for both undefined symbol and for a definition without a value.
P.S. PellesC help anyway states:
To enable the extended functions in Pelles C, define the macro __STDC_WANT_LIB_EXT2__ as the integer constant 1.
EDIT: OK I have got it. #if deals only with numbers, and the code:
#if something
Is equivalent by default to:
#if something != 0
The definition of a symbol without a value is an undefined type and triggers the error.
Not a bug.