tools-utils: Drop redefinition of fopen when BAD_FTS is defined
authorDodji Seketeli <dodji@redhat.com>
Wed, 26 Feb 2020 10:48:44 +0000 (11:48 +0100)
committerDodji Seketeli <dodji@redhat.com>
Wed, 26 Feb 2020 11:05:35 +0000 (12:05 +0100)
When the BAD_FTS macro was defined at compile time (to handle the use
of fts.h on glibc < 2.23), we needed to re-map fopen to fopen64 if
_FILE_OFFSET_BITS=64 was defined.  We do not need this anymore because
we don't use fopen in that module anymore.  Furthermore, as we now use
fstream, doing the fopen to fopen64 remapping is now preventing the
fstream c++ headers to compile on el6 systems.

This patch just simply does away with the fopen to fopen64 remapping and
thus fixes the compilation on el6 systems.

* src/abg-tools-utils.cc: Do not remap fopen to fopen64 as we
don't use fopen explicitly anymore.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-tools-utils.cc

index 7705faa..7c9d256 100644 (file)
 // For package configuration macros.
 #include "config.h"
 
+#ifndef BAD_FTS
+  #include <sys/types.h>
+  #include <fts.h>
+#endif
+
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <ctype.h>
 #include <errno.h>
 #include <libgen.h>
-// If fts.h is included before config.h, its indirect inclusions may
-// not give us the right LFS aliases of these functions, so map them
-// manually.
-#ifdef BAD_FTS
-  #ifdef _FILE_OFFSET_BITS
-    #define open open64
-    #define fopen fopen64
-  #endif
-#else
-  #include <sys/types.h>
-  #include <fts.h>
-#endif
 
 #include <fstream>
 #include <iostream>