From owner-freebsd-hackers Wed Aug 16 12:31:52 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from io.yi.org (24.67.218.186.bc.wave.home.com [24.67.218.186]) by hub.freebsd.org (Postfix) with ESMTP id 8690637C3CD; Wed, 16 Aug 2000 12:18:55 -0700 (PDT) (envelope-from jburkhol@home.com) Received: from io.yi.org (localhost.gvcl1.bc.wave.home.com [127.0.0.1]) by io.yi.org (Postfix) with ESMTP id DFE17BA69; Wed, 16 Aug 2000 12:19:25 -0700 (PDT) X-Mailer: exmh version 2.1.1 10/15/1999 To: Sheldon Hearn Cc: freebsd-hackers@FreeBSD.ORG, obrien@FreeBSD.ORG, jake@io.yi.org Subject: Re: weird error messages from __COPYRIGHT macro In-Reply-To: Message from Sheldon Hearn of "Wed, 16 Aug 2000 12:56:16 +0200." <16713.966423376@axl.ops.uunet.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 16 Aug 2000 12:19:25 -0700 From: Jake Burkholder Message-Id: <20000816191925.DFE17BA69@io.yi.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [...] > I'm led to believe that these error messages are not present on a NetBSD > box. So is this broken usage of __COPYRIGHT(), or is this pre-processor > or assembler breakage? Looks like breakage of the ELF __IDSTRING macro. #if defined(__GNUC__) && defined(__ELF__) #define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"") #else #define __IDSTRING(name,string) static const char name[] __unused = string #endif This seems to work: #define __IDSTRING(name,string) __asm__(".ident\t" #string) #define __COPYRIGHT(s) __IDSTRING(copyright,s) __COPYRIGHT("@(#) Copyright (c) 1983, 1988, 1993\n" "The Regents of the University of California." " All rights reserved.\n"); int main(void) { exit(0); } Jake To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message