Print this page
5396 gcc 4.8.2 longjmp errors for cscope-fast

@@ -18,10 +18,11 @@
  *
  * CDDL HEADER END
  */
 
 /*
+ * Copyright 2015 Gary Mills
  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*      Copyright (c) 1988 AT&T */
 /*        All Rights Reserved   */

@@ -61,11 +62,11 @@
 /* get a character from the terminal */
 
 int
 mygetch(void)
 {
-        SIGTYPE (*savesig)();           /* old value of signal */
+        SIGTYPE (*volatile savesig)() = SIG_DFL; /* old value of signal */
         int     c;
 
         /* change an interrupt signal to a break key character */
         if (setjmp(env) == 0) {
                 savesig = signal(SIGINT, catchint);