Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Comments

Move win #define sleep out of #ifdef _MSC_VER#721

Closed
rubensf wants to merge 1 commit intogoogle:masterfrom
rubensf:sleep
Closed

Move win #define sleep out of #ifdef _MSC_VER#721
rubensf wants to merge 1 commit intogoogle:masterfrom
rubensf:sleep

Conversation

@rubensf
Copy link

@rubensf rubensf commented Oct 7, 2021

sleep (with lowercase 's') is also not defined on MinGW GCC,
so we have to define it even when not using MSVC.

sleep (with lowercase 's') is also not defined on MinGW GCC,
so we have to define it even when not using MSVC.
@google-cla google-cla bot added the cla: yes label Oct 7, 2021
@sergiud
Copy link
Contributor

sergiud commented Oct 7, 2021

I'm wondering why the CI did not catch this problem?

@rubensf
Copy link
Author

rubensf commented Oct 8, 2021

Ah, this was my bad.

I'm using glog @ 96a2f23dca4cc7180821ca5f32e526314395d26a and with gn (instead of cmake), so there are no generated headers. Instead, the build caught src/windows/glog/logging.h which was removed in #625. That one has the #include unistd.h removed, so even though I tried -DHAVE_UNISTD_H, unistd.h wouldn't be included :/.

#if 0
# include <unistd.h>
#endif

Somehow I can't find the correct unistd.h in https://github.com/mirror/mingw-w64, but my code locally does find it :)

Thanks for the comment!

@rubensf rubensf closed this Oct 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants