[Uml-devel] compilation problems with version 1.1 beta 1

E.L. Willighagen egonw at sci.kun.nl
Tue Sep 17 03:31:05 UTC 2002


On Tuesday 17 September 2002 12:13, E.L. Willighagen wrote:
> I've got some more problems with compiling on SunOS 5.8:
>
> 1. setenv is unkown function (commenting it makes it compile):

This function is called putenv on SunOS 5.8.

from the manpage:

SYNOPSIS
     #include <stdlib.h>

     int putenv(char *string);

DESCRIPTION
     The putenv() function makes the  value  of  the  environment
     variable  name  equal to value by altering an existing vari-
     able or creating a new  one.  In  either  case,  the  string
     pointed  to  by  string  becomes part of the environment, so
     altering the string will change the environment.

     The  string  argument  points  to  a  string  of  the   form
     name=value.  The space used by string is no longer used once
     a new string-defining name is passed to putenv().

     The  putenv()  function  uses  malloc(3C)  to  enlarge   the
     environment.

     After putenv() is called, environment variables are  not  in
     alphabetical order.

RETURN VALUES
     The putenv() functions returns a non-zero value  if  it  was
     unable  to  obtain  enough  space  using   malloc(3C) for an
     expanded environment. Otherwise, 0 is returned.

ERRORS
     The putenv() function may fail if:

     ENOMEM
           Insufficient memory was available.

Egon




More information about the umbrello-devel mailing list