# 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)
#!/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
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}" ]
/*
* 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>
*/
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;
}
/* 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) {
return 1;
}
- token = strsep(&strp, "\n\"\'");
+ token = strtok(&strp, "\n\"\'");
}
}
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)
# 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=""