Commit 4913aa7e authored by l.gombos@samsung.com's avatar l.gombos@samsung.com

In general the project should avoid using OS() guards when possible.

In this particular case both OS() and PTHREAD_KEYS_MAX are used as a guard, even though using PTHREAD_KEYS_MAX as a guard is sufficient. Not only that this solution works not just for ANDROID but also for other systems where chromium might be ported to (in or out of the tree). 

As an example the proposed change would work on HURD systems as well (the support for HURD is not maintained in the tree, but it demonstrates that the change handles those systems as well).

Review URL: https://codereview.chromium.org/351683007

git-svn-id: svn://svn.chromium.org/blink/trunk@177115 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 9d9011a2
...@@ -37,14 +37,12 @@ ...@@ -37,14 +37,12 @@
#include "wtf/Assertions.h" #include "wtf/Assertions.h"
#include "wtf/WTF.h" #include "wtf/WTF.h"
#if OS(ANDROID) #include <limits.h>
// PTHREAD_KEYS_MAX is not defined in bionic, so explicitly define it here.
// PTHREAD_KEYS_MAX might be not defined (e.g. in certain bionic versions), so explicitly define it here.
#ifndef PTHREAD_KEYS_MAX #ifndef PTHREAD_KEYS_MAX
#define PTHREAD_KEYS_MAX 1024 #define PTHREAD_KEYS_MAX 1024
#endif // PTHREAD_KEYS_MAX #endif // PTHREAD_KEYS_MAX
#else
#include <limits.h>
#endif
namespace WTF { namespace WTF {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment