From owner-freebsd-questions Thu May 31 7:47:28 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.teledis.be (mail.teledis.be [217.117.32.52]) by hub.freebsd.org (Postfix) with ESMTP id BB46D37B423 for ; Thu, 31 May 2001 07:47:24 -0700 (PDT) (envelope-from lorenzo@linuxbe.org) Received: from natalie ([217.117.38.8]) by mail.teledis.be (Netscape Messaging Server 4.15) with SMTP id GE7FQW00.6YJ for ; Thu, 31 May 2001 16:47:20 +0200 Message-ID: <001c01c0e9e1$d78e1420$0201a8c0@teledisnet.be> From: "Sansonetti Laurent" To: References: <20010531143315.A83651@dogma.freebsd-uk.eu.org> Subject: Re: what's wrong with this macro? Date: Thu, 31 May 2001 16:56:15 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, I've build this on FreeBSD 4.2-RELEASE with gcc : ----------------------------------------------------- pinux@arrakis ~/Inpres> cat test.c #include #define COPY_BLOCK(target, source) { \ (target)[0] = (source)[0]; \ (target)[1] = (source)[1]; \ (target)[2] = (source)[2]; \ (target)[3] = (source)[3]; \ } /* COPY_BLOCK */ int main(void) { char plok[]={"1111"},gruik[]={"2222"}; printf("plok: %s && gruik: %s\n",plok,gruik); COPY_BLOCK(plok,gruik); printf("plok: %s && gruik: %s\n",plok,gruik); return (0); } pinux@arrakis ~/Inpres> cc test.c -o test && ./test plok: 1111 && gruik: 2222 plok: 2222 && gruik: 2222 ----------------------------------------------------- I hope this will help you... -- Sansonetti Laurent To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message