Changeset 13367 in project


Ignore:
Timestamp:
02/20/09 02:53:24 (11 years ago)
Author:
Jim Ursetto
Message:

posixunix: unsetenv didn't work on OS X

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/chicken-3/posixunix.scm

    r13178 r13367  
    195195#define C_sleep             sleep
    196196
    197 #define C_putenv(s)         C_fix(putenv((char *)C_data_pointer(s)))
    198197#define C_stat(fn)          C_fix(stat((char *)C_data_pointer(fn), &C_statbuf))
    199198#define C_lstat(fn)         C_fix(lstat((char *)C_data_pointer(fn), &C_statbuf))
     
    213212
    214213#ifdef C_GNU_ENV
     214# define C_unsetenv(s)      (unsetenv((char *)C_data_pointer(s)), C_SCHEME_TRUE)
    215215# define C_setenv(x, y)     C_fix(setenv((char *)C_data_pointer(x), (char *)C_data_pointer(y), 1))
    216216#else
     217# define C_unsetenv(s)      C_fix(putenv((char *)C_data_pointer(s)))
    217218static C_word C_fcall C_setenv(C_word x, C_word y) {
    218219  char *sx = C_data_pointer(x),
     
    18901891(define (unsetenv var)
    18911892  (##sys#check-string var 'unsetenv)
    1892   (##core#inline "C_putenv" (##sys#make-c-string var))
     1893  (##core#inline "C_unsetenv" (##sys#make-c-string var))
    18931894  (void) )
    18941895
Note: See TracChangeset for help on using the changeset viewer.