src/gedlib/locales.c
/*==========================================
 * llsetenv -- assign a value to an environment variable
 * Workaround for systems without HAVE_SETLOCALE && HAVE_LC_MESSAGES
 * Returns value if it succeeded
 *========================================*/
- assign a value to an environment variable
Workaround for systems without HAVE_SETLOCALE && HAVE_LC_MESSAGES
Returns value if it succeeded
- assign a value to an environment variable Workaround for systems without HAVE_SETLOCALE && HAVE_LC_MESSAGES Returns value if it succeeded
static STRING
llsetenv (STRING name, STRING value)
{
	char buffer[128];
	STRING str = 0;
	buffer[0] = 0;
	llstrappf(buffer, sizeof(buffer), uu8, "%s=%s", name, value);
#ifdef HAVE_SETENV
	if (setenv(name, value, 1) != -1)
		str = value;
#else
#ifdef HAVE_PUTENV
	if (putenv(buffer) != -1)
		str = value;
#else
#ifdef HAVE__PUTENV
	if (_putenv(buffer) != -1)
		str = value;
#endif 
#endif 
#endif 
	return str;
}
static STRING llsetenv ( STRING name , STRING value ) { char buffer [ 128 ] ; STRING str = 0 ; buffer [ 0 ] = 0 ; llstrappf ( buffer , sizeof ( buffer ) , uu8 , " " , name , value ) ; #ifdef HAVE_SETENV if ( setenv ( name , value , 1 ) != -1 ) str = value ; #else #ifdef HAVE_PUTENV if ( putenv ( buffer ) != -1 ) str = value ; #else #ifdef HAVE__PUTENV if ( _putenv ( buffer ) != -1 ) str = value ; #endif #endif #endif return str ; }
llsetenv -- assign a value to an environment variable
 Workaround for systems without HAVE_SETLOCALE && HAVE_LC_MESSAGES
 Returns value if it succeeded
llsetenv -- assign a value to an environment variable Workaround for systems without HAVE_SETLOCALE && HAVE_LC_MESSAGES Returns value if it succeeded
/* HAVE__PUTENV */ /* HAVE_PUTENV */ /* HAVE_SETENV */