Xref: utzoo comp.unix.questions:10058 comp.unix.wizards:12103 Path: utzoo!utgpu!attcan!uunet!mcvax!enea!kth!draken!tut!santra!hsu From: hsu@santra.UUCP (Heikki Suonsivu) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: alloca problem? Keywords: alloca stack 386 sysv Message-ID: <17026@santra.UUCP> Date: 3 Nov 88 02:41:10 GMT Organization: Helsinki University of Technology, Finland Lines: 34 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@santra ................. Kuutamokatu 5 A 7 Uucp: ...!mcvax!santra!hsu ....... 02210 Espoo ..... Fido: Heikki Suonsivu at 2:504/1 . FINLAND .........