emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix for getopt1.c and getopt.c on SOLARIS


From: Dhruva Krishnamurthy
Subject: Fix for getopt1.c and getopt.c on SOLARIS
Date: Tue, 28 Jun 2005 15:04:14 +0530
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (usg-unix-v)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]