This is my first time using UWIN.
I installed
uwin-base.2009-11-02.win32.i386.exe
and
uwin-dev.2009-11-02.win32.i386.exe
into directory C:\Program Files\UWIN
and have installed MinGW into directory C:\MinGW

I seem to of found a problem with your preprocessor
#define JACOB .
#define HI(name) <JACOB/std##name>
#warning HI(io.h)
#include HI(io.h)

should properly #include the <./stdio.h> header,

but I get the output:
cpp: "main.c", line 3: warning: <./stdio.h>
cpp: "main.c", line 4: JACOB/stdio.h: cannot find include file
so the #warning directive correctly handles the macro replacement
however the #include directive does not...

this leads to the following problems with some simple code...
$ cat main.c
#define JACOB .
#define HI(name) <JACOB/std##name>
#warning HI(io.h)
#include HI(io.h)
[this one actually works via stdio.h->./ast/ast_stdio.h->./ast/ast_std.h->...]
[...->stdarg.h etc.]
#include <stdio.h>

int main() {
 return 0;
}
$ echo $PACKAGE_cc
C:\MinGW[I have also tried /C/MinGW]
$ cc -c main.c
[this line only happened the first time]
probing C language processor /usr/bin/cc for pp information
cpp: "main.c", line 3: warning: <./stdio.h>
cpp: "main.c", line 4: JACOB/stdio.h: cannot find include file
cpp: "/usr/include/stdarg.h", line 10: _STD_INCLUDE_DIR/stdarg.h: cannot find
include file
cpp: "/usr/include/stdlib.h", line 44: _STD_INCLUDE_DIR/stdlib.h: cannot find
include file
cpp: "/usr/include/stddef.h", line 31: _STD_INCLUDE_DIR/stddef.h: cannot find
include file
cpp: "/usr/include/string.h", line 26: _STD_INCLUDE_DIR/string.h: cannot find
include file
cpp: "/usr/include/limits.h", line 12: _STD_INCLUDE_DIR/limits.h: cannot find
include file
cpp: "/usr/include/locale.h", line 10: _STD_INCLUDE_DIR/locale.h: cannot find
include file
cpp: "/usr/include/varargs.h", line 4: ERROR: stdarg.h already included

$ cat /usr/include/astwin32.h[ this seems to be included even in a program that]
[has no #include's]
[...]
[at this point _STD_INCLUDE_DIR seems to be defined as ...]
[via]
[#ifdef _STD_INCLUDE_DIR]
[#warning _SDT_INCLUDE_DIR]
[resulting in:]
[cpp: "/usr/include/astwin32.h", line 8: warning: ...]
[and since astwin32.h is the only header that I can find that defines]
[_STD_INCLUDE_DIR then I can only assume that somehow /usr/src/cmd/cc/pcc.c and]
[the corresponding /usr/bin/pcc executable and /usr/lib/probe/C/pp/probe.ini
[have something to do with it behind the scenes...]
#ifndef _STD_INCLUDE_DIR
#   ifdef __GNUC__
#    define _STD_INCLUDE_DIR mingw32
#   else
#    ifdef __STDPP__
#        define _STD_INCLUDE_DIR ...
#    else
#        define _STD_INCLUDE_DIR include
#    endif
#   endif
#endif
#if defined(__DMC__)  &&  !defined(__STDPP__)
#   define    _STD_HEADER(name)    <include/name>
#else
[by changing this to]
[#   define     _STD_HEADER(name)     <../../C/MinGW/include/name>]
[most, but not all, of the problems disappear]
#   define    _STD_HEADER(name)    <_STD_INCLUDE_DIR/name>
#   define    _SDK_HEADER(name)    <_SDK_INCLUDE_DIR/name>
#endif

_______________________________________________
uwin-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/uwin-users

Reply via email to