X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fputenv.c;h=ee3ccc04a7017900671d434849c6562a1faa80b0;hb=0aaee99cbb17d6508bef411304056c88ef6b3a89;hp=4c161a420d3796c45244771f494029c67e71c4cb;hpb=87346956de5c7c632b885c1fb300b37f537b013b;p=gnulib.git diff --git a/lib/putenv.c b/lib/putenv.c index 4c161a420..ee3ccc04a 100644 --- a/lib/putenv.c +++ b/lib/putenv.c @@ -15,34 +15,40 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ +along with this program; if not, write to the Free Software Foundation, +Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #ifdef HAVE_CONFIG_H -#include +# include #endif +/* Define-away any (possibly conflicting) prototype of putenv. + Many systems omit the `const' attribute on the argument. */ +#define putenv _sys_putenv + #if defined (__GNU_LIBRARY__) || defined (HAVE_STDLIB_H) -#include +# include #endif #if defined (__GNU_LIBRARY__) || defined (HAVE_STRING_H) -#include +# include #endif #if defined (__GNU_LIBRARY__) || defined (HAVE_UNISTD_H) -#include +# include #endif +#undef putenv + #if !defined (__GNU_LIBRARY__) && !defined (HAVE_STRCHR) -#define strchr index +# define strchr index #endif #if !defined (__GNU_LIBRARY__) && !defined (HAVE_MEMCPY) -#define memcpy(d,s,n) bcopy ((s), (d), (n)) +# define memcpy(d,s,n) bcopy ((s), (d), (n)) #endif #if HAVE_GNU_LD -#define environ __environ +# define environ __environ #else extern char **environ; #endif