* configure.in: Call BFD_NEED_DECLARATION on getenv.
* acconfig.h (NEED_DECLARATION_GETENV): New macro.
* sysdep.h (getenv): Declare if NEED_DECLARATION_GETENV.
* ldemul.c (ld_emul_default_target): Do not cast getenv return
value.
* ldmain.c (get_emulation): Likewise.
* configure, config.in: Rebuild.
/* Whether sbrk must be declared even if <unistd.h> is included. */
#undef NEED_DECLARATION_SBRK
+
+/* Whether getenv must be declared even if <stdlib.h> is included. */
+#undef NEED_DECLARATION_GETENV
@TOP@
/* Do we need to use the b modifier when opening binary files? */