Bill-Gray / PDCursesMod

Public Domain Curses - a curses library for environments that don't fit the termcap/terminfo model, modified and extended from the 'official' version
https://www.projectpluto.com/win32a.htm
337 stars 72 forks source link

speed.c demo update suggestion #185

Closed ceka closed 3 years ago

ceka commented 3 years ago

building demos on windows10 returns error:

speed.c
../demos\speed.c(49): fatal error C1083: Cannot open include file: 'sys/time.h': No such file or directory
NMAKE : fatal error U1077: 'D:\apps\vs2019\VC\Tools\MSVC\14.25.28610\bin\HostX86\x86\cl.exe' : return code '0x2'
Stop.

resolution:

add

|| defined(_MSC_VER)

to line:

#if defined(__TURBOC__) || defined(__EMX__) || defined(__DJGPP__) || \
    defined( __DMC__) || defined(__WATCOMC__)

result:

#if defined(__TURBOC__) || defined(__EMX__) || defined(__DJGPP__) || \
    defined( __DMC__) || defined(__WATCOMC__) || defined(_MSC_VER)
#include <sys/timeb.h>

fortunately sys/timeb is available on Microsoft platform :)

GitMensch commented 3 years ago

Thank you very much do you mind doing this in the source via GitHub? Just browse to the file below "<>code" then click on "edit" then on "save" and on "create pull request"?

ceka commented 3 years ago

ah, so that's how it is done. np. one sec

ceka commented 3 years ago

186

GitMensch commented 3 years ago

That looks good, thanks. I've run the CI build on Appveyor manually (@Bill-Gray, we really should get #135 working again), but without #184 the builds there (which use CMake) don't even get to the demos. Side note: the SDL-builds are broken on win32, too - @ceka if you could try to fix these, too - this would be marvelous!

ceka commented 3 years ago

Do you mean sdl1 catalog ? sdl2 builds fine.

GitMensch commented 3 years ago

According to Appveyor SDL2 is broken: https://ci.appveyor.com/project/Bill-Gray/PDCurses/build/job/48id344y3dt9px38 - but I've just seen that #187 was supposed to fix that...

ceka commented 3 years ago

please see #188 only for nmake. i will check if i could do something with cmake.

GitMensch commented 3 years ago

I was told that cmake should be fine, let's see what the build says that I've started after merging #188.