Back to index

cell-binutils  2.17cvs20070401
Defines | Functions
putenv.c File Reference
#include "ansidecl.h"

Go to the source code of this file.

Defines

#define putenv   libiberty_putenv

Functions

char * alloca ()
int putenv (const char *string)

Define Documentation

#define putenv   libiberty_putenv

Definition at line 42 of file putenv.c.


Function Documentation

char* alloca ( )
int putenv ( const char *  string)

Definition at line 70 of file putenv.c.

{
  const char *const name_end = strchr (string, '=');

  if (name_end)
    {
      char *name = (char *) alloca (name_end - string + 1);
      memcpy (name, string, name_end - string);
      name[name_end - string] = '\0';
      return setenv (name, name_end + 1, 1);
    }

  unsetenv (string);
  return 0;
}

Here is the call graph for this function: