diff options
author | 2004-12-08 23:47:13 +0000 | |
---|---|---|
committer | 2004-12-08 23:47:13 +0000 | |
commit | 38c446571b8dca23d23352f3872d11660ed2f171 (patch) | |
tree | aadd798de7c626973423609b28122702c92413c6 /sys-devel | |
parent | new upstream version (diff) | |
download | historical-38c446571b8dca23d23352f3872d11660ed2f171.tar.gz historical-38c446571b8dca23d23352f3872d11660ed2f171.tar.bz2 historical-38c446571b8dca23d23352f3872d11660ed2f171.zip |
Portability patch #73617 by Sunil.
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/gcc-config/ChangeLog | 9 | ||||
-rw-r--r-- | sys-devel/gcc-config/files/digest-gcc-config-1.3.7-r6 (renamed from sys-devel/gcc-config/files/digest-gcc-config-1.3.7-r5) | 0 | ||||
-rwxr-xr-x | sys-devel/gcc-config/files/gcc-config-1.3.7 | 9 | ||||
-rw-r--r-- | sys-devel/gcc-config/files/wrapper-1.4.2.c | 20 | ||||
-rw-r--r-- | sys-devel/gcc-config/gcc-config-1.3.7-r6.ebuild (renamed from sys-devel/gcc-config/gcc-config-1.3.7-r5.ebuild) | 4 |
5 files changed, 21 insertions, 21 deletions
diff --git a/sys-devel/gcc-config/ChangeLog b/sys-devel/gcc-config/ChangeLog index df560ee6c3ae..c50cd3ff4231 100644 --- a/sys-devel/gcc-config/ChangeLog +++ b/sys-devel/gcc-config/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-devel/gcc-config # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.68 2004/12/05 08:10:16 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.69 2004/12/08 23:47:13 vapier Exp $ + +*gcc-config-1.3.7-r6 (08 Dec 2004) + + 08 Dec 2004; Mike Frysinger <vapier@gentoo.org> files/gcc-config-1.3.7, + files/wrapper-1.4.2.c, -gcc-config-1.3.7-r5.ebuild, + +gcc-config-1.3.7-r6.ebuild: + Portability patch #73617 by Sunil. *gcc-config-1.3.7-r5 (05 Dec 2004) diff --git a/sys-devel/gcc-config/files/digest-gcc-config-1.3.7-r5 b/sys-devel/gcc-config/files/digest-gcc-config-1.3.7-r6 index e69de29bb2d1..e69de29bb2d1 100644 --- a/sys-devel/gcc-config/files/digest-gcc-config-1.3.7-r5 +++ b/sys-devel/gcc-config/files/digest-gcc-config-1.3.7-r6 diff --git a/sys-devel/gcc-config/files/gcc-config-1.3.7 b/sys-devel/gcc-config/files/gcc-config-1.3.7 index 343fce0cc79a..d881b3ca2c14 100755 --- a/sys-devel/gcc-config/files/gcc-config-1.3.7 +++ b/sys-devel/gcc-config/files/gcc-config-1.3.7 @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.7,v 1.9 2004/12/05 21:07:43 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.7,v 1.10 2004/12/08 23:47:13 vapier Exp $ # Author: Martin Schlemmer <azarah@gentoo.org> trap ":" INT QUIT TSTP @@ -224,14 +224,11 @@ switch_profile() { fi fi done - # Only install cpp if the toolchain supports C++ + # Only install cpp if switching to a native one if ! is_cross_compiler then ${RM} -f "${ROOT}/lib/cpp" - if [ -x "${ROOT}/usr/bin/${REAL_CHOST}-g++" ] - then - ${CP} -f "${ROOT}/usr/lib/gcc-config/wrapper" "${ROOT}/lib/cpp" - fi + ${CP} -f "${ROOT}/usr/lib/gcc-config/wrapper" "${ROOT}/lib/cpp" fi if [ "${ROOT}" = "/" ] && [ "${OLD_CC_COMP}" != "${CC_COMP}" ] diff --git a/sys-devel/gcc-config/files/wrapper-1.4.2.c b/sys-devel/gcc-config/files/wrapper-1.4.2.c index 8269f3ab4d09..b3bc15074ba1 100644 --- a/sys-devel/gcc-config/files/wrapper-1.4.2.c +++ b/sys-devel/gcc-config/files/wrapper-1.4.2.c @@ -1,7 +1,7 @@ /* * Copyright 1999-2004 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/wrapper-1.4.2.c,v 1.3 2004/08/19 15:16:25 vapier Exp $ + * $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/wrapper-1.4.2.c,v 1.4 2004/12/08 23:47:13 vapier Exp $ * Author: Martin Schlemmer <azarah@gentoo.org> */ @@ -39,7 +39,9 @@ struct wrapper_data { static const char *wrapper_strerror(int err, struct wrapper_data *data) { - strerror_r(err, data->tmp, sizeof(data->tmp)); + /* this app doesn't use threads and strerror + * is more portable than strerror_r */ + strncpy(data->tmp, strerror(err), sizeof(data->tmp)); return data->tmp; } @@ -155,7 +157,7 @@ static int find_target_in_envd(struct wrapper_data *data) /* A bash variable may be unquoted, quoted with " or * quoted with ', so extract the value without those .. */ - token = strsep(&strp, "\n\"\'"); + token = strtok(&strp, "\n\"\'"); while (NULL != token) { @@ -165,7 +167,7 @@ static int find_target_in_envd(struct wrapper_data *data) return 1; } - token = strsep(&strp, "\n\"\'"); + token = strtok(&strp, "\n\"\'"); } } @@ -247,19 +249,15 @@ static void modify_path(struct wrapper_data *data) return; } - len = strlen(dname) + strlen(data->path) + 2; + len = strlen(dname) + strlen(data->path) + 2 + strlen("PATH") + 1; newpath = (char *)malloc(len); if (NULL == newpath) wrapper_exit("out of memory\n"); memset(newpath, 0, len); - snprintf(newpath, len, "%s:%s", dname, data->path); - setenv("PATH", newpath, 1); - - if (newpath) - free(newpath); - newpath = NULL; + snprintf(newpath, len, "PATH=%s:%s", dname, data->path); + putenv(newpath); } int main(int argc, char **argv) diff --git a/sys-devel/gcc-config/gcc-config-1.3.7-r5.ebuild b/sys-devel/gcc-config/gcc-config-1.3.7-r6.ebuild index 80c442502d7b..5116058d2929 100644 --- a/sys-devel/gcc-config/gcc-config-1.3.7-r5.ebuild +++ b/sys-devel/gcc-config/gcc-config-1.3.7-r6.ebuild @@ -1,14 +1,12 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/gcc-config-1.3.7-r5.ebuild,v 1.1 2004/12/05 08:10:16 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/gcc-config-1.3.7-r6.ebuild,v 1.1 2004/12/08 23:47:13 vapier Exp $ inherit toolchain-funcs # Version of .c wrapper to use W_VER="1.4.2" -DISABLE_GEN_GCC_WRAPPERS="yes" - DESCRIPTION="Utility to change the gcc compiler being used" HOMEPAGE="http://www.gentoo.org/" SRC_URI="" |