c8f3b10909
. also disable stack protection feature for gcc, causes build errors for pkgsrc gcc on minix Change-Id: I1c6e2bcb4d948098d642543d7b2711284ee55c72
18 lines
602 B
C
18 lines
602 B
C
#include "sysutil.h"
|
|
#include <string.h>
|
|
|
|
/*=========================================================================*
|
|
* env_panic *
|
|
*=========================================================================*/
|
|
void env_panic(key)
|
|
char *key; /* environment variable whose value is bogus */
|
|
{
|
|
static char value[EP_BUF_SIZE] = "<unknown>";
|
|
int s;
|
|
if ((s=env_get_param(key, value, sizeof(value))) == 0) {
|
|
if (s != ESRCH) /* only error allowed */
|
|
printf("WARNING: env_get_param() failed in env_panic(): %d\n", s);
|
|
}
|
|
panic("Bad environment setting: '%s = %s'\n", key, value);
|
|
}
|
|
|