From d113c00b5ac2cc233ff95bc887d4a32194c91e62 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 23 Nov 2018 16:29:57 -0500 Subject: [PATCH] Remove more HOST_PLATFORM_SUNOS cruft. --- build/jam/BuildSetup | 6 +---- src/bin/addattr/main.cpp | 6 ----- src/bin/keymap/main.cpp | 4 ---- src/bin/mimeset.cpp | 4 ---- src/bin/rc/rc.cpp | 48 ++++++++++++++++++---------------------- src/bin/setversion.cpp | 4 ---- 6 files changed, 22 insertions(+), 50 deletions(-) diff --git a/build/jam/BuildSetup b/build/jam/BuildSetup index d0611404ff..229f5a9a55 100644 --- a/build/jam/BuildSetup +++ b/build/jam/BuildSetup @@ -503,12 +503,8 @@ if $(HOST_PLATFORM_HAIKU_COMPATIBLE) { HOST_NETWORK_LIBS = network ; HOST_NETAPI_LIB = bnetapi ; HOST_SELECT_UNAME_ETC_LIB = ; # libroot -} else if $(HOST_PLATFORM) = "sunos" { - HOST_NETWORK_LIBS = xnet ; - HOST_NETAPI_LIB = ; - HOST_SELECT_UNAME_ETC_LIB = ; } else { - # Linux,... + # Linux, ... HOST_NETWORK_LIBS = ; HOST_NETAPI_LIB = ; HOST_SELECT_UNAME_ETC_LIB = ; diff --git a/src/bin/addattr/main.cpp b/src/bin/addattr/main.cpp index 1f03d40193..385f728cd3 100644 --- a/src/bin/addattr/main.cpp +++ b/src/bin/addattr/main.cpp @@ -29,14 +29,8 @@ static struct option const kLongOptions[] = { }; -#ifndef HAIKU_HOST_PLATFORM_SUNOS extern const char *__progname; -#endif -#ifdef HAIKU_HOST_PLATFORM_SUNOS -static const char *kProgramName = "addattr"; -#else static const char *kProgramName = __progname; -#endif // supported types (if you add any, make sure that writeAttr() handles diff --git a/src/bin/keymap/main.cpp b/src/bin/keymap/main.cpp index 7746d99ba2..a22d3d5ac2 100644 --- a/src/bin/keymap/main.cpp +++ b/src/bin/keymap/main.cpp @@ -19,12 +19,8 @@ #include "Keymap.h" -#ifdef HAIKU_HOST_PLATFORM_SUNOS -static const char *sProgramName = "keymap"; -#else extern char *__progname; static const char *sProgramName = __progname; -#endif static void diff --git a/src/bin/mimeset.cpp b/src/bin/mimeset.cpp index 18f5b7640e..b83b4a96f9 100644 --- a/src/bin/mimeset.cpp +++ b/src/bin/mimeset.cpp @@ -24,12 +24,8 @@ using namespace BPrivate::Storage::Mime; -#ifdef HAIKU_HOST_PLATFORM_SUNOS -static const char* sProgramName = "mimeset"; -#else extern const char* __progname; static const char* sProgramName = __progname; -#endif // options bool gFiles = true; diff --git a/src/bin/rc/rc.cpp b/src/bin/rc/rc.cpp index b24e2df834..bbc605b9cc 100644 --- a/src/bin/rc/rc.cpp +++ b/src/bin/rc/rc.cpp @@ -1,22 +1,22 @@ /* * Copyright (c) 2003 Matthijs Hollemans - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in + * + * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ @@ -29,16 +29,10 @@ #include "rdef.h" -#ifndef HAIKU_HOST_PLATFORM_SUNOS extern const char *__progname; -#endif static const char *kTitle = "Haiku Resource Compiler 1.1"; -#ifdef HAIKU_HOST_PLATFORM_SUNOS -static const char *kProgramName = "rc"; -#else static const char *kProgramName = __progname; -#endif static bool sQuiet = false; @@ -81,7 +75,7 @@ error(const char *format, ...) } -static void +static void usage() { printf("%s\n\n" @@ -133,7 +127,7 @@ version() } -static bool +static bool has_extension(char *name, const char *ext) { size_t nameLength = strlen(name); @@ -242,7 +236,7 @@ parse_options(int argc, char *argv[]) } if (sOutputFile[0] == '\0') { - // no output file name was given, use the name of the + // no output file name was given, use the name of the // first source file as base strlcpy(sOutputFile, sFirstInputFile, sizeof(sOutputFile)); @@ -252,7 +246,7 @@ parse_options(int argc, char *argv[]) } -static void +static void compile() { if (!has_extension(sOutputFile, ".rsrc")) @@ -262,7 +256,7 @@ compile() } -static void +static void decompile() { if (!has_extension(sOutputFile, ".rdef")) @@ -272,7 +266,7 @@ decompile() } -static void +static void report_error() { switch (rdef_err) { diff --git a/src/bin/setversion.cpp b/src/bin/setversion.cpp index 1c56fbfbd3..b27ba12762 100644 --- a/src/bin/setversion.cpp +++ b/src/bin/setversion.cpp @@ -15,13 +15,9 @@ #include -#ifdef HAIKU_HOST_PLATFORM_SUNOS -const char *kProgramName = "setversion"; -#else extern const char *__progname; const char *kProgramName = __progname; -#endif enum arg_needed {