Do not define POSIX.
It breaks integration with upstream re2 library on Chromium. Without patching re2 library, with this define, it produces the following error: ../../third_party/re2/re2/re2.h:254:5: error: expected identifier POSIX, // POSIX syntax, leftmost-longest match As we define POSIX on the command line, the C preprocessor changes RE2::POSIX to nothing and thus break the compilation. :( See chromium-dev mailing list for this discussion in https://groups.google.com/a/chromium.org/d/topic/chromium-dev/UXCHnX7pV44/discussion BUG=None TEST=ninja -C out/Debug, everything compiles as before R=sergeyu@chromium.org, tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/46049004 Patch from Thiago Farina <tfarina@chromium.org>. Cr-Commit-Position: refs/heads/master@{#9032}
This commit is contained in:
parent
d43ba89d00
commit
91543731c3
@ -133,7 +133,6 @@
|
||||
},
|
||||
'defines': [
|
||||
'HASH_NAMESPACE=__gnu_cxx',
|
||||
'POSIX',
|
||||
'WEBRTC_POSIX',
|
||||
'DISABLE_DYNAMIC_CAST',
|
||||
# The POSIX standard says we have to define this.
|
||||
|
@ -51,7 +51,7 @@ rtc::AsyncSocket* CreateClientSocket(int family) {
|
||||
rtc::Win32Socket* sock = new rtc::Win32Socket();
|
||||
sock->CreateT(family, SOCK_STREAM);
|
||||
return sock;
|
||||
#elif defined(POSIX)
|
||||
#elif defined(WEBRTC_POSIX)
|
||||
rtc::Thread* thread = rtc::Thread::Current();
|
||||
ASSERT(thread != NULL);
|
||||
return thread->socketserver()->CreateAsyncSocket(family, SOCK_STREAM);
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if defined(POSIX)
|
||||
#if defined(WEBRTC_POSIX)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
@ -25,9 +25,9 @@
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef POSIX
|
||||
#if defined(WEBRTC_POSIX)
|
||||
#include <errno.h>
|
||||
#endif // POSIX
|
||||
#endif // WEBRTC_POSIX
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
@ -29,11 +29,11 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef POSIX
|
||||
#if defined(WEBRTC_POSIX)
|
||||
#include <signal.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
#endif // POSIX
|
||||
#endif // WEBRTC_POSIX
|
||||
|
||||
#include "talk/examples/call/callclient.h"
|
||||
#include "talk/examples/call/console.h"
|
||||
@ -41,7 +41,7 @@
|
||||
#include "webrtc/base/messagequeue.h"
|
||||
#include "webrtc/base/stringutils.h"
|
||||
|
||||
#ifdef POSIX
|
||||
#ifdef WEBRTC_POSIX
|
||||
static void DoNothing(int unused) {}
|
||||
#endif
|
||||
|
||||
@ -147,7 +147,7 @@ void Console::RunConsole() {
|
||||
void Console::OnMessage(rtc::Message *msg) {
|
||||
switch (msg->message_id) {
|
||||
case MSG_START:
|
||||
#ifdef POSIX
|
||||
#if defined(WEBRTC_POSIX)
|
||||
// Install a no-op signal so that we can abort RunConsole() by raising
|
||||
// SIGUSR1.
|
||||
struct sigaction act;
|
||||
|
Loading…
x
Reference in New Issue
Block a user