From db4227c6acc95a8a72df4dab8cfb592983e529d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 23 May 2005 13:16:43 +0000 Subject: [PATCH] rc now also builds under R5 with TARGET_PLATFORM haiku. Since we currently use the same build for the host and for the target, this is only a temporary fix - we should build it twice. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12783 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tools/rc/Jamfile | 8 ++++++++ src/tools/rc/rc.cpp | 10 ---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/tools/rc/Jamfile b/src/tools/rc/Jamfile index a5a0d6439f..629a4bcb48 100644 --- a/src/tools/rc/Jamfile +++ b/src/tools/rc/Jamfile @@ -9,5 +9,13 @@ StaticLibrary rdef : BinCommand rc : rc.cpp + + # these two are needed for R5 only + strlcpy.c + strlcat.c : librdef.a libstdc++.r4.so libbe.so ; + +SEARCH on [ FGristFiles + strlcat.c strlcpy.c + ] = [ FDirName $(OBOS_TOP) src system libroot posix string ] ; diff --git a/src/tools/rc/rc.cpp b/src/tools/rc/rc.cpp index 2eb3ae4690..6d289ccae7 100644 --- a/src/tools/rc/rc.cpp +++ b/src/tools/rc/rc.cpp @@ -153,12 +153,7 @@ cut_extension(char *name, const char *ext) static void add_extension(char *name, const char *ext) { -#ifdef __HAIKU__ strlcat(name, ext, B_PATH_NAME_LENGTH); -#else - strncat(name, ext, B_PATH_NAME_LENGTH); - name[B_PATH_NAME_LENGTH - 1] = '\0'; -#endif } @@ -235,12 +230,7 @@ parse_options(int argc, char *argv[]) if (sOutputFile[0] == '\0') { // no output file name was given, use the name of the // first source file as base -#ifdef __HAIKU__ strlcpy(sOutputFile, sFirstInputFile, sizeof(sOutputFile)); -#else - strncpy(sOutputFile, sFirstInputFile, sizeof(sOutputFile) - 1); - sOutputFile[sizeof(sOutputFile) - 1] = '\0'; -#endif cut_extension(sOutputFile, sDecompile ? ".rsrc" : ".rdef"); add_extension(sOutputFile, sDecompile ? ".rdef" : ".rsrc");