Remove the _FORTIFY_SOURCE workarounds 44/14644/2
Clément DAVID [Mon, 9 Jun 2014 09:14:54 +0000 (11:14 +0200)]
Change-Id: I6a314960d8f6b75f82a6df8173f6a0ccf061c01c

scilab/configure
scilab/configure.ac
scilab/modules/core/src/c/callinterf.c
scilab/modules/core/src/c/signal_mgmt.c
scilab/modules/core/src/c/tmpdir.c
scilab/modules/elementary_functions/src/c/xerhlt.c
scilab/modules/fileio/sci_gateway/c/sci_copyfile.c
scilab/modules/fileio/sci_gateway/c/sci_movefile.c
scilab/modules/fileio/src/c/getFullFilename.c
scilab/modules/gui/src/nogui/nogui.c

index 60546f6..261bae7 100755 (executable)
@@ -9860,8 +9860,7 @@ case "$CC" in
 
    if test "$enable_debug_C" = yes; then
       DEBUG_CFLAGS="-pipe -Wformat -Wshadow -Wfloat-equal -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations  -Wstrict-prototypes  -Wmissing-noreturn -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wwrite-strings -Winline -Wredundant-decls -Wall -Wchar-subscripts -Wextra  -Wuninitialized -Wno-format-y2k -Wmissing-format-attribute -Wno-missing-field-initializers -Wno-strict-aliasing  -Wold-style-definition -g3 -Wunsafe-loop-optimizations"
-      # used to be -O
-      # -D_FORTIFY_SOURCE=2
+      # used to be -O0
       case "$host" in
       *-linux-gnu )
       # Only doing that under Linux
index 3a6f991..4f3f5af 100644 (file)
@@ -559,8 +559,7 @@ case "$CC" in
 
    if test "$enable_debug_C" = yes; then
       DEBUG_CFLAGS="-pipe -Wformat -Wshadow -Wfloat-equal -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations  -Wstrict-prototypes  -Wmissing-noreturn -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wwrite-strings -Winline -Wredundant-decls -Wall -Wchar-subscripts -Wextra  -Wuninitialized -Wno-format-y2k -Wmissing-format-attribute -Wno-missing-field-initializers -Wno-strict-aliasing  -Wold-style-definition -g3 -Wunsafe-loop-optimizations"
-      # used to be -O
-      # -D_FORTIFY_SOURCE=2
+      # used to be -O0
       case "$host" in
       *-linux-gnu )
       # Only doing that under Linux
index 4ad609d..4361b79 100644 (file)
  *
  */
 /*--------------------------------------------------------------------------*/
+
 #include <string.h>
-#if defined(__linux__)
-#define __USE_FORTIFY_LEVEL 0 /* Avoid dependency on GLIBC_2.11 (__longjmp_chk) */
-#endif
 #include <setjmp.h>
 #include <stdio.h>
 #include <ctype.h>
index 8b378c0..cf66a57 100644 (file)
@@ -17,6 +17,7 @@
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
 #include <libintl.h>
 
-#if defined(__linux__)
-#define __USE_FORTIFY_LEVEL 0   /* Avoid dependency on GLIBC_2.11 (__longjmp_chk) */
-#endif
-#include <setjmp.h>             /* this declaration should remain close the __USE_FORTIFY_LEVEL define */
+#include <setjmp.h>
 
 #include <sys/types.h>          /* getpid */
 #include <unistd.h>             /* gethostname */
@@ -36,7 +34,6 @@
 #include "localization.h"
 #include "backtrace.h"
 #include "signal_mgmt.h"
-#include "machine.h"
 #include "Scierror.h"
 #include "suspendProcess.h"
 #include "scilabmode.h"
index a08acd9..c26ba86 100644 (file)
@@ -11,6 +11,8 @@
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  */
+
+
 #include <stdio.h>
 #include <string.h>
 
@@ -20,9 +22,6 @@
 #endif
 
 #if defined(__STDC__) || defined(_MSC_VER)
-#if defined(__linux__)
-#define __USE_FORTIFY_LEVEL 0 /* Avoid dependency on GLIBC_2.4 (__realpath_chk) */
-#endif
 #include <stdlib.h>
 #ifndef _MSC_VER
 #include <sys/types.h>
index 980d576..e2176b2 100644 (file)
  */
 
 /*--------------------------------------------------------------------------*/
+
 #include <string.h>
-#if defined(__linux__)
-#define __USE_FORTIFY_LEVEL 0 /* Avoid dependency on GLIBC_2.11 (__longjmp_chk) */
-#endif
 #include <setjmp.h>
 #include "xerhlt.h"
 /*--------------------------------------------------------------------------*/
index 8f8f7dd..5acd573 100644 (file)
@@ -10,9 +10,7 @@
 *
 */
 /*--------------------------------------------------------------------------*/
-#if defined(__linux__)
-#undef _FORTIFY_SOURCE /* Avoid dependency on GLIBC_2.4 (__wcscat_chk/__wcscpy_chk) */
-#endif
+
 #ifndef _MSC_VER
 #include <errno.h>
 #else
index ca2362f..7129e62 100644 (file)
@@ -10,9 +10,7 @@
 *
 */
 /*--------------------------------------------------------------------------*/
-#if defined(__linux__)
-#undef _FORTIFY_SOURCE /* Avoid dependency on GLIBC_2.4 (__wcscat_chk/__wcscpy_chk) */
-#endif
+
 #ifndef _MSC_VER
 #include <errno.h>
 #else
index 84d2bf9..874120a 100644 (file)
@@ -10,9 +10,6 @@
 *
 */
 /*--------------------------------------------------------------------------*/
-#if defined(__linux__)
-#undef _FORTIFY_SOURCE /* Avoid dependency on GLIBC_2.4 (__wcscat_chk/__wcscpy_chk) */
-#endif
 #include "getFullFilename.h"
 #include "charEncoding.h"
 #include "MALLOC.h"
index 7fa1efc..8ba18de 100644 (file)
@@ -15,7 +15,6 @@
 #ifndef _MSC_VER
 #include <errno.h>
 #include <stdio.h> /* fileno */
-#define __USE_FORTIFY_LEVEL 0 /* Avoid dependency on GLIBC_2.15 __fdelt_chk */
 #include <sys/select.h> /* fd_set */
 #include "core_math.h" /* Max */
 #include "sciprint.h"
@@ -153,12 +152,12 @@ int Xorgetchar(int interrupt)
             {
                 state = 0;
             }
-            return(i);
+            return (i);
         }
 
         if (interrupt && (ismenu() == 1))
         {
-            return(-1);
+            return (-1);
         }
 
     }