Little win32/Signals.cpp patch

Don't forget about my recent patch to Path.cpp :slight_smile:

Uh... this may be a silly question, but why can't you include <stdio.h>?
It'd be much better than <iostream>.

Anyway, I think I'll try this weekend to come up with my own way of
building on Win32. I prefer that building on Windows depends only on
Microsoft and GNU tools, and the fewer of the latter the better.

My gut instinct is to capture all the files generated by configure on an
X86 system, tweak them for Windows and MSVC, then run GNU make and see
what happens. Then try and make it actually work :slight_smile: But I'm likely to
give up unless it turns out to be suprisingly easy to do.

Here's the patch to Signals.cpp. assuming that stdio.h is acceptable
(can't imagine it won't work).

Signals.diff (1.45 KB)

We prefer #include <cstdio>, since this is C++ after all. :slight_smile:

Sigh... take it up with Microsoft.

For the heck of it, I just checked to see if Sun's, HP's, or IBM's C++
compilers have <cstdio>. None of them do.

Seriously, if Microsoft's is the only "non-compliant" compiler you ever
have to deal with, consider yourselves very lucky. It is far better
than most.


The *one* place where we can relax the #include rules is in lib/System. The file that Jeff is working on is in lib/System. Outside of lib/System, I agree that the *only* non-LLVM headers that can be included into LLVM are the standard c++ headers (like <cstdio>). However, we have to give Jeff and others a little lattitude in lib/System to "do what it takes" to get the abstractions implemented with various compilers, etc. That is what the library is for, after all.


Misha Brukman wrote:

Well, I just tried to copy the files generated by configure to Windows
for building there. It's a non starter. They are totally dependent on
the Unix environment and it would be simpler to start from scratch. The
scons approach of generating VC project files is very interesting (but
what about the solution file?). Unfortunately, a serious attempt at
this would take far more time than I have available right now so I
cannot pursue it.

Along with the project file it generates also the solution file.
The current limitation is that you cannot generate one solution for multiple
projects (but you can handle multiple variant in the same project).

Usually I create manually an empty solution and manually add all the generated
projects to it. You have to do this only the first time.