alloca problem?
Heikki Suonsivu
hsu at santra.UUCP
Thu Nov 3 12:41:10 AEST 1988
Why this fails,
huu(name)
char *name;
{
char *d;
d = strcpy(alloca(strlen(name) + 1), name);
....
}
but this works?
huu(name)
char *name;
{
char *d;
d = alloca(strlen(name) + 1);
strcpy(d, name);
....
}
I would like to have macro like
#define strasave(s) strcpy(alloca(strlen(s) + 1), s);
Problem appears when using microport 386 V.3 release 2.2. Is it a problem
in me or alloca?
Inet: hsu at santra ................. Kuutamokatu 5 A 7
Uucp: ...!mcvax!santra!hsu ....... 02210 Espoo .....
Fido: Heikki Suonsivu at 2:504/1 . FINLAND .........
More information about the Comp.unix.wizards
mailing list