bug-gnu-emacs
[Top][All Lists]
Advanced

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

fix for OSF build failure with cc v6.4


From: Dave Love
Subject: fix for OSF build failure with cc v6.4
Date: 23 Nov 2001 12:29:11 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.30

I previously reported that building with that configuration failed.
I eventually spotted that the reason is that it has
  __STDC_VERSION__ == 199901L
and so regex.h defines `__restrict' as `restrict', which clashes with
regex.c's declarations.

The test in regex.h should probably be changed to use the c99 version
with gcc in c99 mode so it could be tested without a proprietary
compiler.

2001-11-08  Dave Love  <fx@gnu.org>

        * regex.c (regcomp, regexec): Make parameter declarations
        consistent with regex.h (for c99 compilers).

        * s/osf5-0.h (C_SWITCH_SYSTEM): Revert (ineffective) last change.

diff -c /home/fx/packages/emacs21-21.1.orig/src/s/osf5-0.h\~ 
/home/fx/packages/emacs21-21.1.orig/src/s/osf5-0.h
*** /home/fx/packages/emacs21-21.1.orig/src/s/osf5-0.h~ Wed Oct 10 13:24:16 2001
--- /home/fx/packages/emacs21-21.1.orig/src/s/osf5-0.h  Thu Nov  8 10:26:03 2001
***************
*** 8,18 ****
     with the system defintion.  This may be necessary also on OSF 4
     systems with dtk 6.4 installed.  */
  #undef C_SWITCH_SYSTEM
- #ifdef __GNUC__
  #define C_SWITCH_SYSTEM       -D_OSF_SOURCE
- #else
- #define C_SWITCH_SYSTEM       -D_OSF_SOURCE -nointrinsics
- #endif
  
  #define WAIT_USE_INT
  #define SYS_SIGLIST_DECLARED
--- 8,14 ----

Diff finished at Thu Nov  8 10:35:02
cd /home/fx/packages/emacs21-21.1.orig/src/
diff -c /home/fx/packages/emacs21-21.1.orig/src/regex.c\~ 
/home/fx/packages/emacs21-21.1.orig/src/regex.c
*** /home/fx/packages/emacs21-21.1.orig/src/regex.c~    Sat May 12 11:52:38 2001
--- /home/fx/packages/emacs21-21.1.orig/src/regex.c     Thu Nov  8 10:25:34 2001
***************
*** 5833,5840 ****
  
  int
  regcomp (preg, pattern, cflags)
!     regex_t *preg;
!     const char *pattern;
      int cflags;
  {
    reg_errcode_t ret;
--- 5833,5840 ----
  
  int
  regcomp (preg, pattern, cflags)
!     regex_t *__restrict preg;
!     const char *__restrict pattern;
      int cflags;
  {
    reg_errcode_t ret;
***************
*** 5918,5927 ****
  
  int
  regexec (preg, string, nmatch, pmatch, eflags)
!     const regex_t *preg;
!     const char *string;
      size_t nmatch;
!     regmatch_t pmatch[];
      int eflags;
  {
    int ret;
--- 5918,5927 ----
  
  int
  regexec (preg, string, nmatch, pmatch, eflags)
!     const regex_t *__restrict preg;
!     const char *__restrict string;
      size_t nmatch;
!     regmatch_t pmatch[__restrict_arr];
      int eflags;
  {
    int ret;

Diff finished at Thu Nov  8 10:35:54



reply via email to

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