fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / firebird / firebird-c++11.patch.1
blobe8cb52d4d7fd03bfe6c5668ff3931f054fdf2049
1 # -*- Mode: Diff -*-
2 --- firebird/src/gpre/c_cxx.cpp
3 +++ firebird/src/gpre/c_cxx.cpp
4 @@ -876,7 +876,7 @@
5                 if (based_on->bas_flags & BAS_segment)
6                 {
7                         if (*variable != '*')
8 -                               fprintf(gpreGlob.out_file, "[%"SLONGFORMAT"]", length);
9 +                               fprintf(gpreGlob.out_file, "[%" SLONGFORMAT "]", length);
10                 }
11                 else if (field->fld_array_info)
12                 {
13 @@ -885,7 +885,7 @@
14                         for (const dim* dimension = field->fld_array_info->ary_dimension;
15                                 dimension; dimension = dimension->dim_next)
16                         {
17 -                               fprintf(gpreGlob.out_file, " [%"SLONGFORMAT"]", dimension->dim_upper - dimension->dim_lower + 1);
18 +                               fprintf(gpreGlob.out_file, " [%" SLONGFORMAT "]", dimension->dim_upper - dimension->dim_lower + 1);
19                         }
21                         if (field->fld_array_info->ary_dtype <= dtype_varying && field->fld_length > 1)
22 @@ -1577,7 +1577,7 @@
23         const gpre_dbb* db = (gpre_dbb*) action->act_object;
24         align(column);
26 -       fprintf(gpreGlob.out_file, "isc_drop_database (%s, %"SIZEFORMAT", \"%s\", rdb$k_db_type_gds);",
27 +       fprintf(gpreGlob.out_file, "isc_drop_database (%s, %" SIZEFORMAT ", \"%s\", rdb$k_db_type_gds);",
28                            status_vector(action),
29                            strlen(db->dbb_filename), db->dbb_filename);
30         set_sqlcode(action, column);
31 @@ -3471,7 +3471,7 @@
33  static void gen_type( const act* action, int column)
34  {
35 -       printa(column, "%"SLONGFORMAT, (SLONG)(IPTR)action->act_object);
36 +       printa(column, "%" SLONGFORMAT, (SLONG)(IPTR)action->act_object);
37  }
40 @@ -3623,7 +3623,7 @@
41         for (const dim* dimension = field->fld_array_info->ary_dimension; dimension;
42                  dimension = dimension->dim_next)
43         {
44 -               fprintf(gpreGlob.out_file, " [%"SLONGFORMAT"]", dimension->dim_upper - dimension->dim_lower + 1);
45 +               fprintf(gpreGlob.out_file, " [%" SLONGFORMAT "]", dimension->dim_upper - dimension->dim_lower + 1);
46         }
48         if (field->fld_array_info->ary_dtype <= dtype_varying)
49 --- firebird/src/gpre/exp.cpp
50 +++ firebird/src/gpre/exp.cpp
51 @@ -398,7 +398,7 @@
52         if (gpreGlob.token_global.tok_type != tok_number)
53                 CPR_s_error("<number>");
55 -       const char format[8] = "%"SQUADFORMAT;
56 +       const char format[8] = "%" SQUADFORMAT;
57         SINT64 n;
58         sscanf(gpreGlob.token_global.tok_string, format, &n);
60 @@ -428,7 +428,7 @@
62         const SLONG n = atoi(gpreGlob.token_global.tok_string);
63         char buffer[32];
64 -       sprintf(buffer, "%"SLONGFORMAT, n);
65 +       sprintf(buffer, "%" SLONGFORMAT, n);
66         if (strcmp(buffer, gpreGlob.token_global.tok_string) != 0)
67                 PAR_error("Numeric value out of range");
69 @@ -478,7 +478,7 @@
71         const ULONG n = atoi(gpreGlob.token_global.tok_string);
72         char buffer[32];
73 -       sprintf(buffer, "%"ULONGFORMAT, n);
74 +       sprintf(buffer, "%" ULONGFORMAT, n);
75         if (strcmp(buffer, gpreGlob.token_global.tok_string) != 0)
76                 PAR_error("Numeric value out of range");
78 --- firebird/src/gpre/gpre.cpp
79 +++ firebird/src/gpre/gpre.cpp
80 @@ -2525,9 +2525,9 @@
81                                 if (line_pending)
82                                 {
83                                         if (line == 1)
84 -                                               fprintf(gpreGlob.out_file, "#line %"SLONGFORMAT" \"%s\"\n", line, backlash_fixed_file_name);
85 +                                               fprintf(gpreGlob.out_file, "#line %" SLONGFORMAT " \"%s\"\n", line, backlash_fixed_file_name);
86                                         else
87 -                                               fprintf(gpreGlob.out_file, "\n#line %"SLONGFORMAT" \"%s\"", line, backlash_fixed_file_name);
88 +                                               fprintf(gpreGlob.out_file, "\n#line %" SLONGFORMAT " \"%s\"", line, backlash_fixed_file_name);
90                                         line_pending = false;
91                                 }
92 @@ -2668,7 +2668,7 @@
93         {
94                 if (c == '\n' && line_pending)
95                 {
96 -                       fprintf(gpreGlob.out_file, "\n#line %"SLONGFORMAT" \"%s\"", line + 1, backlash_fixed_file_name);
97 +                       fprintf(gpreGlob.out_file, "\n#line %" SLONGFORMAT " \"%s\"", line + 1, backlash_fixed_file_name);
98                         line_pending = false;
99                 }
100                 if (c == EOF)
101 --- firebird/src/gpre/int_cxx.cpp
102 +++ firebird/src/gpre/int_cxx.cpp
103 @@ -290,7 +290,7 @@
104         fprintf(gpreGlob.out_file, "if (!%s)", request->req_handle);
105         align(column);
106         fprintf(gpreGlob.out_file,
107 -               "%s = CMP_compile2 (tdbb, (UCHAR*) jrd_%"ULONGFORMAT", sizeof(jrd_%"ULONGFORMAT"), true);",
108 +               "%s = CMP_compile2 (tdbb, (UCHAR*) jrd_%" ULONGFORMAT ", sizeof(jrd_%" ULONGFORMAT "), true);",
109                            request->req_handle, request->req_ident, request->req_ident);
112 @@ -478,7 +478,7 @@
115         fprintf(gpreGlob.out_file,
116 -                          "EXE_receive (tdbb, %s, %d, %d, (UCHAR*) &jrd_%"ULONGFORMAT");",
117 +                          "EXE_receive (tdbb, %s, %d, %d, (UCHAR*) &jrd_%" ULONGFORMAT ");",
118                            request->req_handle, port->por_msg_number, port->por_length,
119                            port->por_ident);
121 @@ -495,7 +495,7 @@
122         if (!(request->req_flags & REQ_exp_hand))
123                 fprintf(gpreGlob.out_file, "static void\t*%s;\t// request handle \n", request->req_handle);
125 -       fprintf(gpreGlob.out_file, "static const UCHAR\tjrd_%"ULONGFORMAT" [%d] =",
126 +       fprintf(gpreGlob.out_file, "static const UCHAR\tjrd_%" ULONGFORMAT " [%d] =",
127                            request->req_ident, request->req_length);
128         align(INDENT);
129         fprintf(gpreGlob.out_file, "{\t// blr string \n");
130 @@ -588,7 +588,7 @@
131         }
132         align(column);
134 -       fprintf(gpreGlob.out_file, "EXE_send (tdbb, %s, %d, %d, (UCHAR*) &jrd_%"ULONGFORMAT");",
135 +       fprintf(gpreGlob.out_file, "EXE_send (tdbb, %s, %d, %d, (UCHAR*) &jrd_%" ULONGFORMAT ");",
136                            request->req_handle, port->por_msg_number, port->por_length, port->por_ident);
139 @@ -716,7 +716,7 @@
140                         fprintf(gpreGlob.out_file, fmtstr, reference->ref_ident, name);
141         }
142         align(column);
143 -       fprintf(gpreGlob.out_file, "} jrd_%"ULONGFORMAT";", port->por_ident);
144 +       fprintf(gpreGlob.out_file, "} jrd_%" ULONGFORMAT ";", port->por_ident);
148 --- firebird/src/gpre/pat.cpp
149 +++ firebird/src/gpre/pat.cpp
150 @@ -417,7 +417,7 @@
151                         }
152                 }
153                 else if (long_flag) {
154 -                       sprintf(p, "%"SLONGFORMAT, long_value);
155 +                       sprintf(p, "%" SLONGFORMAT , long_value);
156                 }
157                 else {
158                         sprintf(p, "%d", value);
159 --- firebird/src/common/classes/alloc.cpp
160 +++ firebird/src/common/classes/alloc.cpp
161 @@ -1100,7 +1100,7 @@
162                                 if (blk->mbk_flags & MBK_LAST)
163                                         break;
164                         }
165 -                       fprintf(file, "Blocks %"SIZEFORMAT" min %"SIZEFORMAT" max %"SIZEFORMAT" size %"SIZEFORMAT" \n\n",
166 +                       fprintf(file, "Blocks %" SIZEFORMAT " min %" SIZEFORMAT " max %" SIZEFORMAT " size %" SIZEFORMAT " \n\n",
167                                         cnt, min, max, sum);
168                 }
170 @@ -1303,7 +1303,7 @@
171                 FreeMemoryBlock* freeBlock = blockToPtr<FreeMemoryBlock*>(blk);
172                 freeBlock->fbk_next_fragment = NULL;
174 -               BlockInfo temp = {blockLength, freeBlock};
175 +               BlockInfo temp = {static_cast<size_t>(blockLength), freeBlock};
176                 pool->freeBlocks.add(temp);
177                 if (!pool->parent_redirect)
178                 {
179 --- firebird/src/common/cvt.cpp
180 +++ firebird/src/common/cvt.cpp
181 @@ -144,7 +144,7 @@
183  #ifndef NATIVE_QUAD
184  #ifndef WORDS_BIGENDIAN
185 -static const SQUAD quad_min_int = { 0, SLONG_MIN };
186 +static const SQUAD quad_min_int = { 0, static_cast<ULONG>(SLONG_MIN) };
187  static const SQUAD quad_max_int = { -1, SLONG_MAX };
188  #else
189  static const SQUAD quad_min_int = { SLONG_MIN, 0 };
190 --- firebird/src/jrd/perf.cpp
191 +++ firebird/src/jrd/perf.cpp
192 @@ -164,20 +164,20 @@
193                         case 'b':
194                         case 'c':
195                         case 'x':
196 -                               sprintf(p, "%"SQUADFORMAT, delta);
197 +                               sprintf(p, "%" SQUADFORMAT , delta);
198                                 while (*p)
199                                         p++;
200                                 break;
202                         case 'u':
203                         case 's':
204 -                               sprintf(p, "%"SQUADFORMAT".%.2"SQUADFORMAT, delta / TICK, (delta % TICK) * 100 / TICK);
205 +                               sprintf(p, "%" SQUADFORMAT ".%.2" SQUADFORMAT , delta / TICK, (delta % TICK) * 100 / TICK);
206                                 while (*p)
207                                         p++;
208                                 break;
210                         case 'e':
211 -                               sprintf(p, "%"SQUADFORMAT".%.2"SQUADFORMAT, delta / 100, delta % 100);
212 +                               sprintf(p, "%" SQUADFORMAT ".%.2" SQUADFORMAT , delta / 100, delta % 100);
213                                 while (*p)
214                                         p++;
215                                 break;