I'm still experimenting with building from source and a /minimal/ base -- like
Visual C++ and the INIT package maybe.
Here is the first thing I notice, building ratz.
There are /some/ minimal toolsets without Windows headers.To be "malicious" I
removed the Windows stuff from %LIB% and %INCLUDE%.
If the dependency had been large, I'd just add them back. But they weren't.
cl \net\att\uwin\*ratz*c
I got an error about missing windows.h, so I did:
echo. > windows.h cl \net\att\uwin\*ratz*c -I.
I got an error about errno. So I did:
C:\uwin>type windows.h #define errno (*_errno()) int* _errno();
cl \net\att\uwin\*ratz*c -I.
It works. This is very hacky and /might/ be wrong for other Win32 toolsets.
What you should probably do:
1) add #include <errno.h> somewhere
2) move the #include windows.h to within the#if defined(_SEAR_SEEK) ||
defined(_SEAR_EXEC)
or similar, since that appears to need it, but by default it appears not needed.
To get a few fewer warnings, also
#define _CRT_SECURE_NO_DEPRECATEand #if _MSC_VER >= something #pragma
warning(disable:4996) /* ignore deprecations */ #endif
Where "something" is whatever version doesn't complain.I've got a bunch, let's
see:
Visual C++ 2.0:warning C4616: #pragma warning : warning number '4996' out of
range, must be between '4001' and '4799'
Visual C++ 4.0 no problem, so:
#if _MSC_VER >= 1000
or merely:
#ifdef _MSC_VER#pragma warning(disable:4616) /* ignore warning out of range
*/#pragma warning(disable:4996) /* ignore deprecations */#endif
works -- even with 1.5/8.0 (16 bit)
I can send a diff if you really need but this is trivial..
ok, something like:
C:\uwin>diff -c \net\att\uwin\ratz.2008-02-02.c \net\att\uwin\ratz.c***
\net\att\uwin\ratz.2008-02-02.c Thu Apr 10 23:57:28 2008---
\net\att\uwin\ratz.c Thu Apr 10 23:56:51 2008****************** 86,98
****--- 86,106 ---- #if !defined(_WINIX) && (_UWIN || __CYGWIN__ || __EMX__)
#define _WINIX 1 #endif++ #ifdef _MSC_VER+ #pragma
warning(disable:4616) /* ignore warning out of range on older versions */+
#pragma warning(disable:4996) /* ignore deprecations on newer versions */+
#endif
#if _WIN32 && !_WINIX
#include <direct.h> #include <io.h> #include <fcntl.h>+ #include <errno.h>+
#if defined(_SEAR_SEEK) || defined(_SEAR_EXEC) #include <windows.h>+ #endif
#define mkdir(a,b) mkdir(a)
Aha, with this, you don't need the #define nodeprecate.
- Jay
_______________________________________________
uwin-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/uwin-users