Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 69731 Details for
Bug 107902
eselect-compiler: g/fbsd support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
compiler-config-2.0.0_beta1-fbsd.patch
compiler-config-2.0.0_beta1-fbsd.patch (text/plain), 7.97 KB, created by
Diego Elio Pettenò (RETIRED)
on 2005-10-02 08:49:22 UTC
(
hide
)
Description:
compiler-config-2.0.0_beta1-fbsd.patch
Filename:
MIME Type:
Creator:
Diego Elio Pettenò (RETIRED)
Created:
2005-10-02 08:49:22 UTC
Size:
7.97 KB
patch
obsolete
>Index: compiler-config-2.0.0_beta1/configure.in >=================================================================== >--- compiler-config-2.0.0_beta1.orig/configure.in >+++ compiler-config-2.0.0_beta1/configure.in >@@ -49,6 +49,9 @@ AC_DEFINE_DIR(USER_CONFIGURATION_DIR,use > evallibexecdir="${libexecdir}" > AC_DEFINE_DIR(EVALLIBEXEC_DIR,evallibexecdir,[Eval'd libexecdir]) > >+AC_CHECK_HEADERS([alloca.h]) >+AC_CHECK_FUNCS([strndup strnlen]) >+ > AC_OUTPUT([ > Makefile > conf/Makefile >Index: compiler-config-2.0.0_beta1/src/compiler-wrapper/compiler-wrapper.c >=================================================================== >--- compiler-config-2.0.0_beta1.orig/src/compiler-wrapper/compiler-wrapper.c >+++ compiler-config-2.0.0_beta1/src/compiler-wrapper/compiler-wrapper.c >@@ -62,7 +62,10 @@ > #include "config.h" > #endif > >+#ifdef HAVE_ALLOCA_H > #include <alloca.h> >+#endif >+ > #include <stdarg.h> > #include <stdio.h> > #include <stdlib.h> >Index: compiler-config-2.0.0_beta1/src/libcommon/Makefile.am >=================================================================== >--- compiler-config-2.0.0_beta1.orig/src/libcommon/Makefile.am >+++ compiler-config-2.0.0_beta1/src/libcommon/Makefile.am >@@ -1,4 +1,4 @@ > EXTRA_DIST = *.h > > noinst_LIBRARIES = libcommon.a >-libcommon_a_SOURCES = sort.c hash.c parse_conf.c install_conf.c selection_conf.c >+libcommon_a_SOURCES = sort.c hash.c parse_conf.c install_conf.c selection_conf.c strndup.c strnlen.c >Index: compiler-config-2.0.0_beta1/src/libcommon/strndup.c >=================================================================== >--- /dev/null >+++ compiler-config-2.0.0_beta1/src/libcommon/strndup.c >@@ -0,0 +1,37 @@ >+/* >+ Copyright (C) 2005 Gentoo Foundation >+ >+ This program is free software; you can redistribute it and/or >+ modify it under the terms of the GNU General Public License >+ as published by the Free Software Foundation; either version 2 >+ of the License, or (at your option) any later version. >+ >+ This program is distributed in the hope that it will be useful, >+ but WITHOUT ANY WARRANTY; without even the implied warranty of >+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+ GNU General Public License for more details. >+ >+ You should have received a copy of the GNU General Public License >+ along with this program; if not, write to the Free Software >+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US >+*/ >+ >+#ifndef HAVE_STRNDUP >+ >+#include <stdlib.h> >+ >+char *strndup(const char *s, size_t n) >+{ >+ char *ret; >+ >+ n = strnlen(s, n); >+ ret = malloc(n+1); >+ if (!ret) >+ return NULL; >+ memcpy(ret, s, n); >+ ret[n] = 0; >+ >+ return ret; >+} >+ >+#endif >Index: compiler-config-2.0.0_beta1/src/libcommon/strnlen.c >=================================================================== >--- /dev/null >+++ compiler-config-2.0.0_beta1/src/libcommon/strnlen.c >@@ -0,0 +1,30 @@ >+/* >+ Copyright (C) 2005 Gentoo Foundation >+ >+ This program is free software; you can redistribute it and/or >+ modify it under the terms of the GNU General Public License >+ as published by the Free Software Foundation; either version 2 >+ of the License, or (at your option) any later version. >+ >+ This program is distributed in the hope that it will be useful, >+ but WITHOUT ANY WARRANTY; without even the implied warranty of >+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+ GNU General Public License for more details. >+ >+ You should have received a copy of the GNU General Public License >+ along with this program; if not, write to the Free Software >+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US >+*/ >+ >+#ifndef HAVE_STRNLEN >+#include <stdlib.h> >+ >+size_t strnlen(const char *s, size_t n) >+{ >+ int i; >+ for (i=0; s[i] && i<n; i++) >+ /* noop */ ; >+ return i; >+} >+ >+#endif >Index: compiler-config-2.0.0_beta1/src/profile-manager/compiler.eselect.in >=================================================================== >--- compiler-config-2.0.0_beta1.orig/src/profile-manager/compiler.eselect.in >+++ compiler-config-2.0.0_beta1/src/profile-manager/compiler.eselect.in >@@ -30,7 +30,7 @@ show_extra_help_text() { > ### Helpers ### > > eval_pm() { >- local tmp=$(mktemp) >+ local tmp=$(mktemp -t tmp.XXXXXX) > local retval > > ${PROFILE_MANAGER} --config-dir="${CONFIG_D}" "${@}" > ${tmp} >@@ -53,7 +53,7 @@ list_all_profiles() { > echo -n " " > fi > >- profiles_v="COMPILER_CONFIG_PROFILES_${ctarget//-/_}" >+ profiles_v="COMPILER_CONFIG_PROFILES_${ctarget//[-.]/_}" > echo -n ${!profiles_v} > done > >@@ -126,7 +126,7 @@ do_list() { > for ctarget in ${COMPILER_CONFIG_ALL_CTARGETS} ; do > write_list_start "Available compilers for CTARGET $(highlight "${ctarget}")" > >- profiles_v="COMPILER_CONFIG_PROFILES_${ctarget//-/_}" >+ profiles_v="COMPILER_CONFIG_PROFILES_${ctarget//[-.]/_}" > for profile in ${!profiles_v} ; do > ((i++)) > write_numbered_list_entry $i "${profile}" >@@ -137,7 +137,7 @@ do_list() { > > write_list_start "Activated profiles:" > for ctarget in ${COMPILER_CONFIG_SET_CTARGETS} ; do >- set_v="COMPILER_CONFIG_SET_${ctarget//-/_}" >+ set_v="COMPILER_CONFIG_SET_${ctarget//[-.]/_}" > if [[ ${ctarget} == ${COMPILER_CONFIG_DEFAULT_CTARGET} ]] ; then > write_kv_list_entry "${ctarget} $(highlight "${active}")" "${!set_v}" > else >@@ -174,7 +174,7 @@ do_show() { > ctarget=${COMPILER_CONFIG_DEFAULT_CTARGET} > fi > >- local set_v="COMPILER_CONFIG_SET_${ctarget//-/_}" >+ local set_v="COMPILER_CONFIG_SET_${ctarget//[-.]/_}" > if [[ -n ${!set_v} ]] ; then > echo ${!set_v} > return 0 >@@ -272,7 +272,7 @@ do_set() { > fi > > # Figure out what bins are installed for the old profile for this CTARGET >- set_v="COMPILER_CONFIG_SET_${ctarget//-/_}" >+ set_v="COMPILER_CONFIG_SET_${ctarget//[-.]/_}" > if [[ -n ${!set_v} ]] ; then > oldprofile=${!set_v} > >@@ -333,7 +333,7 @@ set_bins() { > # Get data on the new profile > eval_pm ${preopts} get-profiles || die -q "Failed to get data on installed profiles after updating config." > >- local set_v="COMPILER_CONFIG_SET_${ctarget//-/_}" >+ local set_v="COMPILER_CONFIG_SET_${ctarget//[-.]/_}" > local profile=${!set_v} > > [[ -z ${profile} ]] && return 1 >@@ -373,7 +373,7 @@ set_env() { > eval_pm ${preopts} get-profiles || die -q "Failed to get data on installed profiles." > # Build up the variables for all the active profiles > for ctarget in ${COMPILER_CONFIG_SET_CTARGETS} ; do >- set_v="COMPILER_CONFIG_SET_${ctarget//-/_}" >+ set_v="COMPILER_CONFIG_SET_${ctarget//[-.]/_}" > if eval_pm ${preopts} get-profile ${!set_v}; then > [[ -n ${COMPILER_CONFIG_MANPATH} ]] && > env_manpath="${env_manpath:+"${env_manpath}:"}${COMPILER_CONFIG_MANPATH}" >@@ -424,7 +424,7 @@ do_unset() { > > eval_pm ${preopts} get-profiles || die -q "Failed to get data on installed profiles." > >- set_v="COMPILER_CONFIG_SET_${ctarget//-/_}" >+ set_v="COMPILER_CONFIG_SET_${ctarget//[-.]/_}" > if eval_pm ${preopts} get-profile ${!set_v} ; then > local bins="$(get_bins "${ROOT}/${COMPILER_CONFIG_BINPATH}") ${COMPILER_CONFIG_ALIASES}" > local bin >Index: compiler-config-2.0.0_beta1/src/profile-manager/profile-manager.c >=================================================================== >--- compiler-config-2.0.0_beta1.orig/src/profile-manager/profile-manager.c >+++ compiler-config-2.0.0_beta1/src/profile-manager/profile-manager.c >@@ -14,6 +14,7 @@ > * global config dir. > * > * Note below that <CTARGET/-/_> means the CTARGET with -s replaced with _s >+ * (and the .s also replaced with _ to work on versioned CTARGETs) > * commands: > * > * get-profiles >@@ -266,7 +267,7 @@ static void doGetProfiles(const Selectio > if(!ctargetul) > die("Memory allocation failure."); > for(s = ctargetul; *s; s++) { >- if(*s == '-') >+ if(*s == '-' || *s == '.') > *s = '_'; > } > >@@ -298,7 +299,7 @@ static void doGetProfiles(const Selectio > if(!ctargetul) > die("Memory allocation failure."); > for(s = ctargetul; *s; s++) { >- if(*s == '-') >+ if(*s == '-' || *s == '.') > *s = '_'; > } > fprintf(fd, "COMPILER_CONFIG_SET_%s=\"%s/%s\"\n", ctargetul, profile->installConf->name, profile->name);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 107902
: 69731