diff --git a/CMakeLists.txt b/CMakeLists.txt index f2ecd10..1c9f7e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) project (winflexbison) if(NOT MSVC) - message( FATAL_ERROR "Visual Studio Build supported only" ) + message( WARNING "Visual Studio Build supported only" ) endif() add_definitions(-D_CRT_SECURE_NO_WARNINGS) diff --git a/common/m4/lib/clean-temp.h b/common/m4/lib/clean-temp.h index 8411b23..f5697b6 100644 --- a/common/m4/lib/clean-temp.h +++ b/common/m4/lib/clean-temp.h @@ -1,10 +1,10 @@ /* Temporary directories and temporary files with automatic cleanup. - Copyright (C) 2006, 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2006, 2011-2022 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -78,6 +78,11 @@ struct temp_dir /* More fields are present here, but not public. */ }; +/* Remove all registered files and subdirectories inside DIR and DIR itself. + DIR cannot be used any more after this call. + Return 0 upon success, or -1 if there was some problem. */ +extern int cleanup_temp_dir (struct temp_dir *dir); + /* Create a temporary directory. PREFIX is used as a prefix for the name of the temporary directory. It should be short and still give an indication about the program. @@ -89,7 +94,8 @@ struct temp_dir is shown and NULL is returned. */ extern struct temp_dir * create_temp_dir (const char *prefix, const char *parentdir, - bool cleanup_verbose); + bool cleanup_verbose) + _GL_ATTRIBUTE_DEALLOC (cleanup_temp_dir, 1); /* Register the given ABSOLUTE_FILE_NAME as being a file inside DIR, that needs to be removed before DIR can be removed. @@ -130,12 +136,9 @@ extern int cleanup_temp_subdir (struct temp_dir *dir, Return 0 upon success, or -1 if there was some problem. */ extern int cleanup_temp_dir_contents (struct temp_dir *dir); -/* Remove all registered files and subdirectories inside DIR and DIR itself. - DIR cannot be used any more after this call. - Return 0 upon success, or -1 if there was some problem. */ -extern int cleanup_temp_dir (struct temp_dir *dir); - +#if !defined (__GNUC__) && !defined (__clang__) typedef int mode_t; +#endif /* ================== Opening and closing temporary files ================== */ diff --git a/common/misc/config.h b/common/misc/config.h index 8d9ab89..5bc5023 100644 --- a/common/misc/config.h +++ b/common/misc/config.h @@ -31,7 +31,7 @@ #define _GL_ATTRIBUTE_COLD #define _GL_ASYNC_SAFE #define GNULIB_XALLOC_DIE 1 -#define _GL_HAVE__STATIC_ASSERT +#define _GL_HAVE__STATIC_ASSERT 1 #define _Static_assert(a, b) #define __PGI @@ -39,16 +39,21 @@ #define _GL_CMP(a, b) (a) == (b) #define __getopt_argv_const +#if !defined (__MSYS__) && !defined (__MINGW32__) /* defined in sys/cdefs.h */ #define _Noreturn +#endif #ifndef _GL_INLINE #define _GL_INLINE inline #endif +/* should be set by including "filename.h" #ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE #define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1 -#endif +#endif */ +#if !defined (__MSYS__) && !defined (__MINGW32__) /* defined in sys/stat.h */ #define S_ISDIR(mode) (mode & _S_IFDIR) +#endif -extern char* _stpcpy(char *yydest, const char *yysrc); +extern char* _stpcpy(char *yydest, const char *yysrc); \ No newline at end of file