bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

setenv: update for relocatable


From: Bruno Haible
Subject: setenv: update for relocatable
Date: Sat, 3 Mar 2007 20:42:30 +0100
User-agent: KMail/1.5.4

Likewise for setenv.

2007-03-03  Bruno Haible  <address@hidden>

        * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
        * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.

*** m4/setenv.m4        3 Mar 2007 19:10:05 -0000       1.7
--- m4/setenv.m4        3 Mar 2007 19:38:57 -0000
***************
*** 1,4 ****
! # setenv.m4 serial 7
  dnl Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # setenv.m4 serial 8
  dnl Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
***************
*** 13,18 ****
--- 13,25 ----
    fi
  ])
  
+ # Like gl_FUNC_SETENV, except prepare for separate compilation (no AC_LIBOBJ).
+ AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
+ [
+   AC_CHECK_FUNCS_ONCE([setenv])
+   gl_PREREQ_SETENV
+ ])
+ 
  AC_DEFUN([gl_FUNC_UNSETENV],
  [
    AC_CHECK_FUNCS([unsetenv])
*** lib/setenv.c        13 Sep 2006 22:38:14 -0000      1.18
--- lib/setenv.c        3 Mar 2007 19:38:57 -0000
***************
*** 1,4 ****
! /* Copyright (C) 1992,1995-1999,2000-2003,2005,2006 Free Software Foundation, 
Inc.
     This file is part of the GNU C Library.
  
     This program is free software; you can redistribute it and/or modify
--- 1,4 ----
! /* Copyright (C) 1992,1995-1999,2000-2003,2005-2007 Free Software Foundation, 
Inc.
     This file is part of the GNU C Library.
  
     This program is free software; you can redistribute it and/or modify
***************
*** 31,36 ****
--- 32,39 ----
  # include <unistd.h>
  #endif
  
+ #if _LIBC || !HAVE_SETENV
+ 
  #if !_LIBC
  # include "allocsa.h"
  #endif
***************
*** 326,328 ****
--- 329,333 ----
  weak_alias (__setenv, setenv)
  weak_alias (__clearenv, clearenv)
  #endif
+ 
+ #endif /* _LIBC || !HAVE_SETENV */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]