www.delorie.com/djgpp/doc/libc/libc_842.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

unsetenv

Syntax

 
#include <stdlib.h>

int unsetenv(const char *name);

Description

This function removes the environment variable name from the environment. This will update the list of pointers to which the environ variable points. If the specified variable does not exist in the environment, the environment is not modified and this function is considered to have been sucessfully completed.

Return Value

If name is NULL, points to an empty string, or points to a string containing a `=', this function returns -1 and sets errno to EINVAL; otherwise it returns 0.

Portability

ANSI/ISO C No
POSIX 1003.2-1992; 1003.1-2001 (see note 1)

Notes:

  1. This function is new to the Posix 1003.1-200x draft

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004