File: skip-const-probe.patch

package info (click to toggle)
procmail 3.24%2Breally3.22-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,380 kB
  • sloc: ansic: 9,888; sh: 1,920; makefile: 105
file content (63 lines) | stat: -rw-r--r-- 2,054 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From: Santiago Vila <sanvila@debian.org>
Subject: Skip probe for const
Bug-Debian: https://bugs.debian.org/1097653
X-Debian-version: 3.24+really3.22-5

--- a/src/autoconf
+++ b/src/autoconf
@@ -703,55 +703,6 @@
 
 
 cat >_autotst.c <<HERE
-#include "$ACONF"
-#ifndef UNISTD_H_MISSING
-#include <unistd.h>		/* execvp() */
-#endif
-int a(b)const int b[];
-{ return *++b;				  /* watcom 10.6 on QNX refuses this */
-}
-int main()
-{ char r[]="",*const*p;char*q="";const char*s="";
-  static const char*const nullp=0,*const*d= &nullp;	/* AIX 3.2.3 failure */
-  static struct{const int a;int b;}c[2]={{0,0},{0,0}};/* IRIX 7.3.1 compiler */
-			    /* requires initializers on static const objects */
-  --(c+1)->b;				 /* AIX 3.1.5 machines can't do this */
-  p= &q;
-  ;{ int pip[2];
-     pipe(pip);
-     if(fork())		       /* this should hide core dumps from the shell */
-      { close(pip[1]);				    /* close the writing end */
-	return 1==read(pip[0],r,1)?0:1;		   /* wait for the rendevouz */
-      }
-     close(pip[0]);				    /* close the writing end */
-     if(!*d&&c[1].b)		      /* some magic to confuse the optimiser */
-	d=(const char*const*)p;		     /* core dumps Ultrix 4.3 ANSI C */
-     else /* so that it can't complain about the uselessness of this program */
-	execvp(q,p);   /* IRIX 4.0.1 system-includes are wrong on this point */
-     if(write(pip[1],r,1)!=1)		      /* notify mam that we survived */
-	return 1;				   /* oops, lost mam somehow */
-   }
-  return r==s;		    /* Domain/OS warns here, not about "r==s" though */
-}
-HERE
-
-echo 'Testing for const'
-if $MAKE _autotst.$O 2>&1 | $FGREP -v include/ >_autotst.rrr
-  test -f _autotst.$O && $MAKE _autotst >$DEVNULL 2>&1 && _autotst
-then
-  grepfor const '#define NO_const'
-else
-  echo '#define NO_const' >>$ACONF
-  set dummy *core*
-  if test -f $2 -a $nocore = yes
-  then
-     echo "Removing core file (bogus readonly segment)"
-     $RM *core*
-  fi
-fi
-$RM _autotst.$O _autotst
-
-cat >_autotst.c <<HERE
 int main(){volatile int i;return (i=0);}
 HERE