Files
MINGW-packages/mingw-w64-firebird/004-external-sources-fixes.patch
2024-01-15 02:42:12 +08:00

101 lines
2.9 KiB
Diff

diff --git a/extern/btyacc/defs.h b/extern/btyacc/defs.h
index 7adb1d9a29..3d7841b430 100644
--- a/extern/btyacc/defs.h
+++ b/extern/btyacc/defs.h
@@ -297,7 +297,7 @@ extern Yshort nunused;
extern Yshort final_state;
/* system variable */
-#ifndef _MSC_VER
+#ifndef _WIN32
extern int errno;
#endif
diff --git a/extern/btyacc/mkpar.c b/extern/btyacc/mkpar.c
index c8e55d8c10..7b58722477 100644
--- a/extern/btyacc/mkpar.c
+++ b/extern/btyacc/mkpar.c
@@ -177,10 +177,12 @@ void unused_rules()
if (!rules_used[i]) ++nunused;
if (nunused)
+ {
if (nunused == 1)
fprintf(stderr, "%s: 1 rule never reduced\n", myname);
else
fprintf(stderr, "%s: %d rules never reduced\n", myname, nunused);
+ }
}
diff --git a/extern/cloop/src/cloop/Main.cpp b/extern/cloop/src/cloop/Main.cpp
index 348bae0a0f..fe093a6f3c 100644
--- a/extern/cloop/src/cloop/Main.cpp
+++ b/extern/cloop/src/cloop/Main.cpp
@@ -28,7 +28,7 @@
#include <string>
#include <stdexcept>
-using std::auto_ptr;
+using std::unique_ptr;
using std::cerr;
using std::endl;
using std::exception;
@@ -53,7 +53,7 @@ static void run(int argc, const char* argv[])
Parser parser(&lexer);
parser.parse();
- auto_ptr<Generator> generator;
+ unique_ptr<Generator> generator;
if (outFormat == "c++")
{
diff --git a/extern/decNumber/decDouble.h b/extern/decNumber/decDouble.h
index 2e789f6361..126991878f 100644
--- a/extern/decNumber/decDouble.h
+++ b/extern/decNumber/decDouble.h
@@ -46,7 +46,7 @@
uint8_t bytes[DECDOUBLE_Bytes]; /* fields: 1, 5, 8, 50 bits */
uint16_t shorts[DECDOUBLE_Bytes/2];
uint32_t words[DECDOUBLE_Bytes/4];
- #if DECUSE64
+ #ifdef DECUSE64
uint64_t longs[DECDOUBLE_Bytes/8];
#endif
} decDouble;
diff --git a/extern/decNumber/decQuad.h b/extern/decNumber/decQuad.h
index 829f39a0ba..95fffc4330 100644
--- a/extern/decNumber/decQuad.h
+++ b/extern/decNumber/decQuad.h
@@ -47,7 +47,7 @@
uint8_t bytes[DECQUAD_Bytes]; /* fields: 1, 5, 12, 110 bits */
uint16_t shorts[DECQUAD_Bytes/2];
uint32_t words[DECQUAD_Bytes/4];
- #if DECUSE64
+ #ifdef DECUSE64
uint64_t longs[DECQUAD_Bytes/8];
#endif
} decQuad;
diff --git a/extern/ttmath/ttmathtypes.h b/extern/ttmath/ttmathtypes.h
index 3d9ddbe7b0..ac92fc8e98 100644
--- a/extern/ttmath/ttmathtypes.h
+++ b/extern/ttmath/ttmathtypes.h
@@ -158,7 +158,7 @@ namespace ttmath
/*!
on 32 bit platform ulint and slint will be equal 64 bits
*/
- #ifdef _MSC_VER
+ #ifdef _WIN32
// long long on MS Windows (Visual and GCC mingw compilers) have 64 bits
// stdint.h is not available on Visual Studio prior to VS 2010 version
typedef unsigned long long int ulint;
@@ -205,7 +205,7 @@ namespace ttmath
/*!
on 64bit platforms one word (uint, sint) will be equal 64bits
*/
- #ifdef _MSC_VER
+ #ifdef _WIN32
/* in VC 'long' type has 32 bits, __int64 is VC extension */
typedef unsigned __int64 uint;
typedef signed __int64 sint;