Merge "Declare main in global NS, without extern "C"" into main
diff --git a/automotive/can/aidl/default/service.cpp b/automotive/can/aidl/default/service.cpp
index eb45167..ef04cfd 100644
--- a/automotive/can/aidl/default/service.cpp
+++ b/automotive/can/aidl/default/service.cpp
@@ -20,12 +20,11 @@
#include <android/binder_manager.h>
#include <android/binder_process.h>
-namespace android::hardware::automotive::can {
-
using namespace std::string_literals;
+using namespace android;
using ::aidl::android::hardware::automotive::can::CanController;
-extern "C" int main() {
+int main() {
base::SetDefaultTag("CanController");
base::SetMinimumLogSeverity(base::VERBOSE);
@@ -40,4 +39,3 @@
LOG(FATAL) << "CanController exited unexpectedly!";
return EXIT_FAILURE;
}
-} // namespace android::hardware::automotive::can
diff --git a/automotive/can/aidl/default/tools/configurator/canhalconfigurator.cpp b/automotive/can/aidl/default/tools/configurator/canhalconfigurator.cpp
index 94e77b4..87a4497 100644
--- a/automotive/can/aidl/default/tools/configurator/canhalconfigurator.cpp
+++ b/automotive/can/aidl/default/tools/configurator/canhalconfigurator.cpp
@@ -98,7 +98,11 @@
return true;
}
-extern "C" int main(int argc, char* argv[]) {
+} // namespace android::hardware::automotive::can
+
+int main(int argc, char* argv[]) {
+ using namespace android::hardware::automotive::can;
+
std::string configFilepath = static_cast<std::string>(kDefaultConfigPath);
// allow for CLI specification of a config file.
@@ -114,5 +118,3 @@
}
return 0;
}
-
-} // namespace android::hardware::automotive::can
diff --git a/macsec/aidl/default/service.cpp b/macsec/aidl/default/service.cpp
index faf3a09..9d5d3bf 100644
--- a/macsec/aidl/default/service.cpp
+++ b/macsec/aidl/default/service.cpp
@@ -20,12 +20,11 @@
#include <android/binder_manager.h>
#include <android/binder_process.h>
-namespace android::hardware::macsec {
-
using namespace std::string_literals;
+using namespace android;
using ::aidl::android::hardware::macsec::MacsecPskPlugin;
-extern "C" int main() {
+int main() {
base::SetDefaultTag("MacsecPskPlugin");
base::SetMinimumLogSeverity(base::VERBOSE);
@@ -40,4 +39,3 @@
LOG(FATAL) << "MacsecPskPlugin exited unexpectedly!";
return EXIT_FAILURE;
}
-} // namespace android::hardware::macsec