/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1993, 2004, 2006-2013 Free Software Foundation,
- Inc.
+ Copyright (C) 1989-1993, 2004, 2006-2014, 2016-2017, 2020-2021 Free
+ Software Foundation, Inc.
This file is part of GNU M4.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/* Handling of path search of included files via the builtins "include"
static FILE *
m4_fopen (const char *file)
{
- FILE *fp = fopen (file, "r");
+ FILE *fp = fopen (file, "re");
if (fp)
{
struct stat st;
errno = EISDIR;
return NULL;
}
- if (set_cloexec_flag (fd, true) != 0)
- M4ERROR ((warning_status, errno,
- "Warning: cannot protect input file across forks"));
}
return fp;
}
#ifdef DEBUG_INCL
-static void M4_GNUC_UNUSED
+static void MAYBE_UNUSED
include_dump (void)
{
includes *incl;