From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dhruva Krishnamurthy Newsgroups: gmane.emacs.devel Subject: Fix for getopt1.c and getopt.c on SOLARIS Date: Tue, 28 Jun 2005 15:04:14 +0530 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1119952811 2832 80.91.229.2 (28 Jun 2005 10:00:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 28 Jun 2005 10:00:11 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 28 12:00:02 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DnCsJ-0001Yj-7n for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2005 11:59:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DnD07-0000a1-ST for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2005 06:07:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DnCs1-00078F-Qj for emacs-devel@gnu.org; Tue, 28 Jun 2005 05:59:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DnCs0-00077z-Lm for emacs-devel@gnu.org; Tue, 28 Jun 2005 05:59:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DnCqS-0006IY-EU for emacs-devel@gnu.org; Tue, 28 Jun 2005 05:57:32 -0400 Original-Received: from [139.15.237.2] (helo=smtp-v.fe.bosch.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DnCdT-00037o-M5 for emacs-devel@gnu.org; Tue, 28 Jun 2005 05:44:07 -0400 Original-Received: from mta1.fe.internet.bosch.com (unknown [10.4.98.30]) by imta7.fe.bosch.de (Postfix) with ESMTP id 7D0033C006 for ; Tue, 28 Jun 2005 11:39:34 +0200 (CEST) Original-Received: from si-imc01.de.bosch.com (virusscan6.fe.internet.bosch.com [10.4.98.11]) by mta1.fe.internet.bosch.com (Postfix) with ESMTP id 6C9728C033 for ; Tue, 28 Jun 2005 11:39:34 +0200 (CEST) Original-Received: from si-gwy02.de.bosch.com ([10.3.5.80]) by si-imc01.de.bosch.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 28 Jun 2005 11:39:33 +0200 Original-Received: from kormail01.in.bosch.com ([173.148.5.99]) by si-gwy02.de.bosch.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 28 Jun 2005 11:39:33 +0200 Original-Received: from nh2mail01.in.bosch.com ([10.47.65.2]) by kormail01.in.bosch.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 28 Jun 2005 15:08:23 +0530 Original-Received: from rayserv.ban.in.bosch.com ([173.148.8.2]) by nh2mail01.in.bosch.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 28 Jun 2005 15:08:22 +0530 X-Mailer: emacs 22.0.50.2 (via feedmail 8 I) Original-To: Emacs Development X-Attribution: dk User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (usg-unix-v) X-OriginalArrivalTime: 28 Jun 2005 09:38:22.0864 (UTC) FILETIME=[202ED100:01C57BC5] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:39779 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:39779 Hello, I had to make a small modification to build CVS Emacs on SOLARIS emacs-version: GNU Emacs 22.0.50.2 (sparc-sun-solaris2.8, X toolkit) of 2005-06-28 The problem was in lib-src/getopt.c and lib-src/getopt1.c and my changes are as follows (we should not be defining const to nothing because the /usr/include/stdlib.h and /usr/include/stdio.h has a proto for getopt as extern int getopt(int, char *const *, const char *). This has a conflict with the proto on the getopt.c where the 'const' get removed). I know my hack is just to get it working but not a clean fix. I request someone to incorporate a cleaner fix. --- getopt1.c 2005-06-23 18:36:41.555250000 +0530 +++ H:/stub/build/emacs/emacs/lib-src/getopt1.c 2005-06-27 12:23:45.000000000 +0530 @@ -31,7 +31,7 @@ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const -#define const +#define const const #endif #endif --- getopt.c 2005-06-23 18:36:34.524000000 +0530 +++ H:/stub/build/emacs/emacs/lib-src/getopt.c 2005-06-27 12:23:35.000000000 +0530 @@ -34,7 +34,7 @@ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ # ifndef const -# define const +# define const const # endif #endif with best regards, dhruva -- Name : Dhruva Krishnamurthy (dk) Phone: +91-(0)80-22999190 Proud FSF member: #1935