configure.in: Don't check for putenv.
* configure.in: Don't check for putenv. * configure: Regenerate. * gcc.c (putenv): Don't define. * vax/xm-vms.h: Handle putenv. From-SVN: r41005
This commit is contained in:
parent
32ff70d299
commit
79cb7361fa
@ -1,3 +1,10 @@
|
|||||||
|
2001-04-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||||
|
|
||||||
|
* configure.in: Don't check for putenv.
|
||||||
|
* configure: Regenerate.
|
||||||
|
* gcc.c (putenv): Don't define.
|
||||||
|
* vax/xm-vms.h: Handle putenv.
|
||||||
|
|
||||||
2001-04-02 Jakub Jelinek <jakub@redhat.com>
|
2001-04-02 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* ifcvt.c (noce_emit_move_insn): New.
|
* ifcvt.c (noce_emit_move_insn): New.
|
||||||
|
@ -101,6 +101,14 @@ Boston, MA 02111-1307, USA. */
|
|||||||
/* vprintf() has been available since VMS V4.6. */
|
/* vprintf() has been available since VMS V4.6. */
|
||||||
|
|
||||||
#define HAVE_VPRINTF
|
#define HAVE_VPRINTF
|
||||||
|
|
||||||
|
/* Early versions of VAX C for VMS do not have putenv. Comment out
|
||||||
|
the following define if your system doesn't have putenv. */
|
||||||
|
#define HAVE_PUTENV
|
||||||
|
|
||||||
|
#ifndef HAVE_PUTENV
|
||||||
|
#define putenv(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(VAXC) || defined(__DECC)
|
#if defined(VAXC) || defined(__DECC)
|
||||||
|
|
||||||
|
4
gcc/configure
vendored
4
gcc/configure
vendored
@ -2018,7 +2018,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Find some useful tools
|
# Find some useful tools
|
||||||
for ac_prog in gawk mawk nawk awk
|
for ac_prog in mawk gawk nawk awk
|
||||||
do
|
do
|
||||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||||
set dummy $ac_prog; ac_word=$2
|
set dummy $ac_prog; ac_word=$2
|
||||||
@ -3099,7 +3099,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
for ac_func in strtoul bsearch putenv popen \
|
for ac_func in strtoul bsearch popen \
|
||||||
strchr strrchr kill getrlimit setrlimit atoll atoq \
|
strchr strrchr kill getrlimit setrlimit atoll atoq \
|
||||||
sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
|
sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
|
||||||
fputs_unlocked getrusage iconv nl_langinfo
|
fputs_unlocked getrusage iconv nl_langinfo
|
||||||
|
@ -544,7 +544,7 @@ fi
|
|||||||
dnl Disabled until we have a complete test for buggy enum bitfields.
|
dnl Disabled until we have a complete test for buggy enum bitfields.
|
||||||
dnl gcc_AC_C_ENUM_BF_UNSIGNED
|
dnl gcc_AC_C_ENUM_BF_UNSIGNED
|
||||||
|
|
||||||
AC_CHECK_FUNCS(strtoul bsearch putenv popen \
|
AC_CHECK_FUNCS(strtoul bsearch popen \
|
||||||
strchr strrchr kill getrlimit setrlimit atoll atoq \
|
strchr strrchr kill getrlimit setrlimit atoll atoq \
|
||||||
sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
|
sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
|
||||||
fputs_unlocked getrusage iconv nl_langinfo)
|
fputs_unlocked getrusage iconv nl_langinfo)
|
||||||
|
54
gcc/gcc.c
54
gcc/gcc.c
@ -2009,60 +2009,6 @@ clear_failure_queue ()
|
|||||||
failure_delete_queue = 0;
|
failure_delete_queue = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Routine to add variables to the environment. We do this to pass
|
|
||||||
the pathname of the gcc driver, and the directories search to the
|
|
||||||
collect2 program, which is being run as ld. This way, we can be
|
|
||||||
sure of executing the right compiler when collect2 wants to build
|
|
||||||
constructors and destructors. Since the environment variables we
|
|
||||||
use come from an obstack, we don't have to worry about allocating
|
|
||||||
space for them. */
|
|
||||||
|
|
||||||
#ifndef HAVE_PUTENV
|
|
||||||
|
|
||||||
void
|
|
||||||
putenv (str)
|
|
||||||
char *str;
|
|
||||||
{
|
|
||||||
#ifndef VMS /* nor about VMS */
|
|
||||||
|
|
||||||
extern char **environ;
|
|
||||||
char **old_environ = environ;
|
|
||||||
char **envp;
|
|
||||||
int num_envs = 0;
|
|
||||||
int name_len = 1;
|
|
||||||
int str_len = strlen (str);
|
|
||||||
char *p = str;
|
|
||||||
int ch;
|
|
||||||
|
|
||||||
while ((ch = *p++) != '\0' && ch != '=')
|
|
||||||
name_len++;
|
|
||||||
|
|
||||||
if (!ch)
|
|
||||||
abort ();
|
|
||||||
|
|
||||||
/* Search for replacing an existing environment variable, and
|
|
||||||
count the number of total environment variables. */
|
|
||||||
for (envp = old_environ; *envp; envp++)
|
|
||||||
{
|
|
||||||
num_envs++;
|
|
||||||
if (!strncmp (str, *envp, name_len))
|
|
||||||
{
|
|
||||||
*envp = str;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Add a new environment variable */
|
|
||||||
environ = (char **) xmalloc (sizeof (char *) * (num_envs + 2));
|
|
||||||
*environ = str;
|
|
||||||
memcpy ((char *) (environ + 1), (char *) old_environ,
|
|
||||||
sizeof (char *) * (num_envs + 1));
|
|
||||||
|
|
||||||
#endif /* VMS */
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* HAVE_PUTENV */
|
|
||||||
|
|
||||||
/* Build a list of search directories from PATHS.
|
/* Build a list of search directories from PATHS.
|
||||||
PREFIX is a string to prepend to the list.
|
PREFIX is a string to prepend to the list.
|
||||||
If CHECK_DIR_P is non-zero we ensure the directory exists.
|
If CHECK_DIR_P is non-zero we ensure the directory exists.
|
||||||
|
Loading…
Reference in New Issue
Block a user