2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

Use __linux__ instead of LINUX_DATAPATH in C code.

The LINUX_DATAPATH C preprocessor symbol was originally meant to be used as
a signal for whether the Linux datapath module could be used, but it was
used as a proxy for a lot of other stuff that is really just Linux
specific.  This commit switches all of these users to just test for
__linux__, which is more straightforward and should have the same result.

CC: Luigi Rizzo <rizzo@iet.unipi.it>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ben Pfaff
2014-01-23 15:33:25 -08:00
parent 96d878178d
commit 2f51a7ebda
6 changed files with 35 additions and 32 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2009, 2010, 2011, 2013 Nicira, Inc.
* Copyright (c) 2008, 2009, 2010, 2011, 2013, 2014 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -93,7 +93,7 @@ run_command(int argc, char *argv[], const struct command commands[])
/* Process title. */
#ifdef LINUX_DATAPATH
#ifdef __linux__
static struct ovs_mutex proctitle_mutex = OVS_MUTEX_INITIALIZER;
/* Start of command-line arguments in memory. */
@@ -199,7 +199,7 @@ proctitle_restore(void)
}
ovs_mutex_unlock(&proctitle_mutex);
}
#else /* !LINUX_DATAPATH*/
#else /* !__linux__ */
/* Stubs that don't do anything on non-Linux systems. */
void
@@ -219,4 +219,4 @@ void
proctitle_restore(void)
{
}
#endif /* !LINUX_DATAPATH */
#endif /* !__linux__ */