From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18469 invoked by alias); 24 Feb 2011 21:27:46 -0000 Received: (qmail 18460 invoked by uid 22791); 24 Feb 2011 21:27:45 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.fgznet.ch (HELO smtp.fgznet.ch) (81.92.96.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Feb 2011 21:27:40 +0000 Received: from deuterium.andreas.nets (dhclient-91-190-8-131.flashcable.ch [91.190.8.131]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id p1OLRZnT000317 for ; Thu, 24 Feb 2011 22:27:36 +0100 (CET) (envelope-from andreast-list@fgznet.ch) Message-ID: <4D66CD47.7010206@fgznet.ch> Date: Thu, 24 Feb 2011 21:49:00 -0000 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [patch] testsuite gdb.base/jit-main.c Content-Type: multipart/mixed; boundary="------------040302050407010400080508" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00738.txt.bz2 This is a multi-part message in MIME format. --------------040302050407010400080508 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 291 Hi all, on non Linux platforms (FreeBSD for example) this test case fails due to ElfW being not defined. The below tries to achieve this shortcoming. Tested on FreeBSD x86_64/amd64 (64-bit), FreeBSD powerpc (32-bit) and also on linux-ppc (32-bit). What do you think? Thanks, Andreas --------------040302050407010400080508 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="jit-main.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="jit-main.diff" Content-length: 793 Index: jit-main.c =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/jit-main.c,v retrieving revision 1.1 diff -u -r1.1 jit-main.c --- jit-main.c 31 Jan 2011 21:44:52 -0000 1.1 +++ jit-main.c 24 Feb 2011 20:45:39 -0000 @@ -29,6 +29,19 @@ #include #include +/* ElfW is coming from linux. On other platforms it does not exist. + Let us define it here. */ +#ifndef ElfW +# if (defined (_LP64) || defined (__LP64__)) +# define WORDSIZE 64 +# else +# define WORDSIZE 32 +# endif /* _LP64 || __LP64__ */ +#define ElfW(type) _ElfW (Elf, WORDSIZE, type) +#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t) +#define _ElfW_1(e,w,t) e##w##t +#endif /* !ElfW */ + typedef enum { JIT_NOACTION = 0, --------------040302050407010400080508--