Skip to content

tests: use a more broad __unix__ to consider generic Unix OSes - #463

Open
pinotree wants to merge 1 commit into
cameron314:masterfrom
pinotree:tests-time-unix
Open

pinotree wants to merge 1 commit into
cameron314:masterfrom
pinotree:tests-time-unix

Conversation

@pinotree

Copy link
Copy Markdown
Contributor

No need to explicitly lists OSes there, simply use __unix__ for generic Unix OSes. In case it is needed, exceptions can still be added in the same way as ST_WINDOWS and ST_APPLE.

Comment thread tests/common/systemtime.h
#elif defined(__APPLE__) && defined(__MACH__)
#define ST_APPLE
#elif defined(__linux__) || defined(__FreeBSD__) || defined(BSD)
#elif defined(__unix__)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems safer?

Suggested change
#elif defined(__unix__)
#elif defined(__unix__) || defined(__linux__) || defined(__FreeBSD__) || defined(BSD)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#elif defined(__unix__) || defined(__linux__) || defined(__FreeBSD__) || defined(BSD)

Considering that Linux and BSDs are Unix systems (so __unix__ is defined for them), this is suggestion is redundant.

No need to explicitly lists OSes there, simply use __unix__ for generic
Unix OSes. In case it is needed, exceptions can still be added in the
same way as ST_WINDOWS and ST_APPLE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants