* Fix for getopt1.c and getopt.c on SOLARIS
@ 2005-06-28 9:34 Dhruva Krishnamurthy
0 siblings, 0 replies; only message in thread
From: Dhruva Krishnamurthy @ 2005-06-28 9:34 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-06-28 9:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-28 9:34 Fix for getopt1.c and getopt.c on SOLARIS Dhruva Krishnamurthy
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).