1) In some (older) C library implementations, rand is a much worse random
number generator than random. Using rand might be OK today.

2) No idea.

3) / and \ should both work equally well as path separators on Windows. You
just can't use / as a pathname separator on a command line that command.exe
(or the like) is going to parse, because it takes it as an option starter
instead. So you can probably just change it to / and leave it.

4, 5) No comment.

On Thu, Jan 5, 2012 at 8:10 AM, Byrial Jensen <[email protected]>wrote:

> Hi,
>
> I have tried to see if I could cross copmile Winboard in Linux in order to
> be able to see if any code changes I make will break Winboard.
>
> It was relatively easy to do with a ready-made minGW cross compiler I just
> had to install, and the cross compiled Winboard.exe runs fine with Wine.
>
> But I had to make a few changes in the sources:
>
> 1) I replaced the functions random() and srandom() with the standard C
> functions rand() and srand() in backend.c and zippy.c.
>
> Is there any particular reason to use the non-standard versions of these
> function?
>
> 2) I replaced the include file <Windowsx.h> with <windowsx.h> in
> winboard/wsettings.c and winboard/wchat.c.
>
> I have no idea about what the include file does. I just found one with a
> similar name to replace a non-existing file - and saw that it could compile
> with no errors. Is it safe to replace Windowsx.h with windowsx.h?
>
> 3) I changed the reference to "res\\winboard.exe.manifest" in
> winboard/winboard.rc to use "/" instead of "\"
>
> Is there any any need to have that file in a subdirectory. It would be
> easier for me if it could be referenced without the need of path separator.
>
> 4) I replaced windres with i586-mingw32msvc-windres in the makefile and
> added --include-dir /usr/i586-mingw32msvc/include to its call arguments.
>
> 5) I removed $(PROJ).exe's dependency of $(PROJ).hlp in the makefile, as I
> cannot build the help file (I found nothing to replace "C:/Program
> Files/Help Workshop/hcrtf"). That dependency seems unnecessary to me anyway.
>
>

Reply via email to