1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
|
From 71276530be885bd3558d5f351a7bd0fb3bcb88d6 Mon Sep 17 00:00:00 2001
From: Mateusz Brzostek <mateuszb@poczta.onet.pl>
Date: Tue, 27 Nov 2018 09:21:36 +0100
Subject: [PATCH 3/3] move _fseeki64 and _ftelli64 functions from libmingwex to
libmsvcrt
_fseeki64 and _ftelli64 functions are already in libmsvcr90 and newer,
so we need to provide these functions only for libmsvcrt. In addition,
_ftelli64 function implementation is not compatible with ucrt.
Signed-off-by: Mateusz Brzostek <mateuszb@poczta.onet.pl>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
---
mingw-w64-crt/Makefile.am | 1 +
mingw-w64-crt/Makefile.in | 96 ++++++++++++++++---
mingw-w64-crt/lib32/msvcr100.def.in | 4 +-
mingw-w64-crt/lib32/msvcr90.def.in | 4 +-
mingw-w64-crt/lib64/msvcr100.def.in | 4 +-
mingw-w64-crt/lib64/msvcr90.def.in | 4 +-
mingw-w64-crt/stdio/fseeki64.c | 177 ++++++++++++++++++++++++++++++++++++
mingw-w64-crt/stdio/fseeko64.c | 131 --------------------------
mingw-w64-headers/crt/stdio.h | 5 +-
9 files changed, 272 insertions(+), 154 deletions(-)
create mode 100644 mingw-w64-crt/stdio/fseeki64.c
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 30f9f7fc..c4b19beb 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -210,6 +210,7 @@ src_msvcrt=\
secapi/vsprintf_s.c \
secapi/wmemcpy_s.c \
secapi/wmemmove_s.c \
+ stdio/fseeki64.c \
stdio/mingw_lock.c
src_ucrtbase=\
diff --git a/mingw-w64-crt/Makefile.in b/mingw-w64-crt/Makefile.in
index 4952edde..aea778a5 100644
--- a/mingw-w64-crt/Makefile.in
+++ b/mingw-w64-crt/Makefile.in
@@ -1341,8 +1341,9 @@ am__lib32_libmsvcrt_os_a_SOURCES_DIST = misc/onexit_table.c \
secapi/_wmktemp_s.c secapi/_wstrdate_s.c secapi/asctime_s.c \
secapi/memcpy_s.c secapi/memmove_s.c secapi/rand_s.c \
secapi/sprintf_s.c secapi/strerror_s.c secapi/vsprintf_s.c \
- secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/mingw_lock.c \
- misc/lc_locale_func.c lib-common/msvcrt.def.in
+ secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/fseeki64.c \
+ stdio/mingw_lock.c misc/lc_locale_func.c \
+ lib-common/msvcrt.def.in
am__objects_33 = misc/lib32_libmsvcrt_os_a-onexit_table.$(OBJEXT) \
misc/lib32_libmsvcrt_os_a-register_tls_atexit.$(OBJEXT) \
stdio/lib32_libmsvcrt_os_a-acrt_iob_func.$(OBJEXT)
@@ -1395,6 +1396,7 @@ am__objects_34 = $(am__objects_33) \
secapi/lib32_libmsvcrt_os_a-vsprintf_s.$(OBJEXT) \
secapi/lib32_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT) \
secapi/lib32_libmsvcrt_os_a-wmemmove_s.$(OBJEXT) \
+ stdio/lib32_libmsvcrt_os_a-fseeki64.$(OBJEXT) \
stdio/lib32_libmsvcrt_os_a-mingw_lock.$(OBJEXT)
am__objects_35 = $(am__objects_34) \
misc/lib32_libmsvcrt_os_a-lc_locale_func.$(OBJEXT)
@@ -2669,9 +2671,9 @@ am__lib64_libmsvcrt_os_a_SOURCES_DIST = misc/onexit_table.c \
secapi/_wmktemp_s.c secapi/_wstrdate_s.c secapi/asctime_s.c \
secapi/memcpy_s.c secapi/memmove_s.c secapi/rand_s.c \
secapi/sprintf_s.c secapi/strerror_s.c secapi/vsprintf_s.c \
- secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/mingw_lock.c \
- misc/__p___argv.c misc/__p__acmdln.c misc/__p__fmode.c \
- misc/__p__wcmdln.c lib-common/msvcrt.def.in
+ secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/fseeki64.c \
+ stdio/mingw_lock.c misc/__p___argv.c misc/__p__acmdln.c \
+ misc/__p__fmode.c misc/__p__wcmdln.c lib-common/msvcrt.def.in
am__objects_84 = misc/lib64_libmsvcrt_os_a-onexit_table.$(OBJEXT) \
misc/lib64_libmsvcrt_os_a-register_tls_atexit.$(OBJEXT) \
stdio/lib64_libmsvcrt_os_a-acrt_iob_func.$(OBJEXT)
@@ -2724,6 +2726,7 @@ am__objects_85 = $(am__objects_84) \
secapi/lib64_libmsvcrt_os_a-vsprintf_s.$(OBJEXT) \
secapi/lib64_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT) \
secapi/lib64_libmsvcrt_os_a-wmemmove_s.$(OBJEXT) \
+ stdio/lib64_libmsvcrt_os_a-fseeki64.$(OBJEXT) \
stdio/lib64_libmsvcrt_os_a-mingw_lock.$(OBJEXT)
am__objects_86 = $(am__objects_85) \
misc/lib64_libmsvcrt_os_a-__p___argv.$(OBJEXT) \
@@ -3863,9 +3866,9 @@ am__libarm32_libmsvcrt_os_a_SOURCES_DIST = misc/onexit_table.c \
secapi/_wmktemp_s.c secapi/_wstrdate_s.c secapi/asctime_s.c \
secapi/memcpy_s.c secapi/memmove_s.c secapi/rand_s.c \
secapi/sprintf_s.c secapi/strerror_s.c secapi/vsprintf_s.c \
- secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/mingw_lock.c \
- misc/__p___argv.c misc/__p__acmdln.c misc/__p__fmode.c \
- misc/__p__wcmdln.c lib-common/msvcrt.def.in
+ secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/fseeki64.c \
+ stdio/mingw_lock.c misc/__p___argv.c misc/__p__acmdln.c \
+ misc/__p__fmode.c misc/__p__wcmdln.c lib-common/msvcrt.def.in
am__objects_124 = misc/libarm32_libmsvcrt_os_a-onexit_table.$(OBJEXT) \
misc/libarm32_libmsvcrt_os_a-register_tls_atexit.$(OBJEXT) \
stdio/libarm32_libmsvcrt_os_a-acrt_iob_func.$(OBJEXT)
@@ -3918,6 +3921,7 @@ am__objects_125 = $(am__objects_124) \
secapi/libarm32_libmsvcrt_os_a-vsprintf_s.$(OBJEXT) \
secapi/libarm32_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT) \
secapi/libarm32_libmsvcrt_os_a-wmemmove_s.$(OBJEXT) \
+ stdio/libarm32_libmsvcrt_os_a-fseeki64.$(OBJEXT) \
stdio/libarm32_libmsvcrt_os_a-mingw_lock.$(OBJEXT)
am__objects_126 = $(am__objects_125) \
misc/libarm32_libmsvcrt_os_a-__p___argv.$(OBJEXT) \
@@ -4948,9 +4952,9 @@ am__libarm64_libmsvcrt_os_a_SOURCES_DIST = misc/onexit_table.c \
secapi/_wmktemp_s.c secapi/_wstrdate_s.c secapi/asctime_s.c \
secapi/memcpy_s.c secapi/memmove_s.c secapi/rand_s.c \
secapi/sprintf_s.c secapi/strerror_s.c secapi/vsprintf_s.c \
- secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/mingw_lock.c \
- misc/__p___argv.c misc/__p__acmdln.c misc/__p__fmode.c \
- misc/__p__wcmdln.c lib-common/msvcrt.def.in
+ secapi/wmemcpy_s.c secapi/wmemmove_s.c stdio/fseeki64.c \
+ stdio/mingw_lock.c misc/__p___argv.c misc/__p__acmdln.c \
+ misc/__p__fmode.c misc/__p__wcmdln.c lib-common/msvcrt.def.in
am__objects_160 = misc/libarm64_libmsvcrt_os_a-onexit_table.$(OBJEXT) \
misc/libarm64_libmsvcrt_os_a-register_tls_atexit.$(OBJEXT) \
stdio/libarm64_libmsvcrt_os_a-acrt_iob_func.$(OBJEXT)
@@ -5003,6 +5007,7 @@ am__objects_161 = $(am__objects_160) \
secapi/libarm64_libmsvcrt_os_a-vsprintf_s.$(OBJEXT) \
secapi/libarm64_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT) \
secapi/libarm64_libmsvcrt_os_a-wmemmove_s.$(OBJEXT) \
+ stdio/libarm64_libmsvcrt_os_a-fseeki64.$(OBJEXT) \
stdio/libarm64_libmsvcrt_os_a-mingw_lock.$(OBJEXT)
am__objects_162 = $(am__objects_161) \
misc/libarm64_libmsvcrt_os_a-__p___argv.$(OBJEXT) \
@@ -6925,6 +6930,7 @@ src_msvcrt = \
secapi/vsprintf_s.c \
secapi/wmemcpy_s.c \
secapi/wmemmove_s.c \
+ stdio/fseeki64.c \
stdio/mingw_lock.c
src_ucrtbase = \
@@ -11079,6 +11085,8 @@ secapi/lib32_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT): \
secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp)
secapi/lib32_libmsvcrt_os_a-wmemmove_s.$(OBJEXT): \
secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp)
+stdio/lib32_libmsvcrt_os_a-fseeki64.$(OBJEXT): stdio/$(am__dirstamp) \
+ stdio/$(DEPDIR)/$(am__dirstamp)
stdio/lib32_libmsvcrt_os_a-mingw_lock.$(OBJEXT): \
stdio/$(am__dirstamp) stdio/$(DEPDIR)/$(am__dirstamp)
misc/lib32_libmsvcrt_os_a-lc_locale_func.$(OBJEXT): \
@@ -12926,6 +12934,8 @@ secapi/lib64_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT): \
secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp)
secapi/lib64_libmsvcrt_os_a-wmemmove_s.$(OBJEXT): \
secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp)
+stdio/lib64_libmsvcrt_os_a-fseeki64.$(OBJEXT): stdio/$(am__dirstamp) \
+ stdio/$(DEPDIR)/$(am__dirstamp)
stdio/lib64_libmsvcrt_os_a-mingw_lock.$(OBJEXT): \
stdio/$(am__dirstamp) stdio/$(DEPDIR)/$(am__dirstamp)
misc/lib64_libmsvcrt_os_a-__p___argv.$(OBJEXT): misc/$(am__dirstamp) \
@@ -14664,6 +14674,8 @@ secapi/libarm32_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT): \
secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp)
secapi/libarm32_libmsvcrt_os_a-wmemmove_s.$(OBJEXT): \
secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp)
+stdio/libarm32_libmsvcrt_os_a-fseeki64.$(OBJEXT): \
+ stdio/$(am__dirstamp) stdio/$(DEPDIR)/$(am__dirstamp)
stdio/libarm32_libmsvcrt_os_a-mingw_lock.$(OBJEXT): \
stdio/$(am__dirstamp) stdio/$(DEPDIR)/$(am__dirstamp)
misc/libarm32_libmsvcrt_os_a-__p___argv.$(OBJEXT): \
@@ -16183,6 +16195,8 @@ secapi/libarm64_libmsvcrt_os_a-wmemcpy_s.$(OBJEXT): \
secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp)
secapi/libarm64_libmsvcrt_os_a-wmemmove_s.$(OBJEXT): \
secapi/$(am__dirstamp) secapi/$(DEPDIR)/$(am__dirstamp)
+stdio/libarm64_libmsvcrt_os_a-fseeki64.$(OBJEXT): \
+ stdio/$(am__dirstamp) stdio/$(DEPDIR)/$(am__dirstamp)
stdio/libarm64_libmsvcrt_os_a-mingw_lock.$(OBJEXT): \
stdio/$(am__dirstamp) stdio/$(DEPDIR)/$(am__dirstamp)
misc/libarm64_libmsvcrt_os_a-__p___argv.$(OBJEXT): \
@@ -20029,6 +20043,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib32_libmsvcr90_a-acrt_iob_func.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib32_libmsvcr90d_a-acrt_iob_func.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-acrt_iob_func.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-fseeki64.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-mingw_lock.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib32_libucrt_extra_a-ucrt__vsnprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib32_libucrt_extra_a-ucrt__vsnwprintf.Po@am__quote@
@@ -20141,6 +20156,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib64_libmsvcr90_a-acrt_iob_func.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib64_libmsvcr90d_a-acrt_iob_func.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-acrt_iob_func.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-fseeki64.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-mingw_lock.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib64_libucrt_extra_a-ucrt__vsnprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/lib64_libucrt_extra_a-ucrt__vsnwprintf.Po@am__quote@
@@ -20245,6 +20261,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm32_libmingwex_a-wtoll.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm32_libmsvcr110_a-acrt_iob_func.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-acrt_iob_func.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-fseeki64.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-mingw_lock.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm32_libucrt_extra_a-ucrt__vsnprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm32_libucrt_extra_a-ucrt__vsnwprintf.Po@am__quote@
@@ -20348,6 +20365,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm64_libmingwex_a-vwscanf2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm64_libmingwex_a-wtoll.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-acrt_iob_func.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-fseeki64.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-mingw_lock.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm64_libucrt_extra_a-ucrt__vsnprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@stdio/$(DEPDIR)/libarm64_libucrt_extra_a-ucrt__vsnwprintf.Po@am__quote@
@@ -30851,6 +30869,20 @@ secapi/lib32_libmsvcrt_os_a-wmemmove_s.obj: secapi/wmemmove_s.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o secapi/lib32_libmsvcrt_os_a-wmemmove_s.obj `if test -f 'secapi/wmemmove_s.c'; then $(CYGPATH_W) 'secapi/wmemmove_s.c'; else $(CYGPATH_W) '$(srcdir)/secapi/wmemmove_s.c'; fi`
+stdio/lib32_libmsvcrt_os_a-fseeki64.o: stdio/fseeki64.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/lib32_libmsvcrt_os_a-fseeki64.o -MD -MP -MF stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/lib32_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-fseeki64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/lib32_libmsvcrt_os_a-fseeki64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/lib32_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c
+
+stdio/lib32_libmsvcrt_os_a-fseeki64.obj: stdio/fseeki64.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/lib32_libmsvcrt_os_a-fseeki64.obj -MD -MP -MF stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/lib32_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-fseeki64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/lib32_libmsvcrt_os_a-fseeki64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/lib32_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi`
+
stdio/lib32_libmsvcrt_os_a-mingw_lock.o: stdio/mingw_lock.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/lib32_libmsvcrt_os_a-mingw_lock.o -MD -MP -MF stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-mingw_lock.Tpo -c -o stdio/lib32_libmsvcrt_os_a-mingw_lock.o `test -f 'stdio/mingw_lock.c' || echo '$(srcdir)/'`stdio/mingw_lock.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-mingw_lock.Tpo stdio/$(DEPDIR)/lib32_libmsvcrt_os_a-mingw_lock.Po
@@ -41099,6 +41131,20 @@ secapi/lib64_libmsvcrt_os_a-wmemmove_s.obj: secapi/wmemmove_s.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o secapi/lib64_libmsvcrt_os_a-wmemmove_s.obj `if test -f 'secapi/wmemmove_s.c'; then $(CYGPATH_W) 'secapi/wmemmove_s.c'; else $(CYGPATH_W) '$(srcdir)/secapi/wmemmove_s.c'; fi`
+stdio/lib64_libmsvcrt_os_a-fseeki64.o: stdio/fseeki64.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/lib64_libmsvcrt_os_a-fseeki64.o -MD -MP -MF stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/lib64_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-fseeki64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/lib64_libmsvcrt_os_a-fseeki64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/lib64_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c
+
+stdio/lib64_libmsvcrt_os_a-fseeki64.obj: stdio/fseeki64.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/lib64_libmsvcrt_os_a-fseeki64.obj -MD -MP -MF stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/lib64_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-fseeki64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/lib64_libmsvcrt_os_a-fseeki64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/lib64_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi`
+
stdio/lib64_libmsvcrt_os_a-mingw_lock.o: stdio/mingw_lock.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lib64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/lib64_libmsvcrt_os_a-mingw_lock.o -MD -MP -MF stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-mingw_lock.Tpo -c -o stdio/lib64_libmsvcrt_os_a-mingw_lock.o `test -f 'stdio/mingw_lock.c' || echo '$(srcdir)/'`stdio/mingw_lock.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-mingw_lock.Tpo stdio/$(DEPDIR)/lib64_libmsvcrt_os_a-mingw_lock.Po
@@ -50871,6 +50917,20 @@ secapi/libarm32_libmsvcrt_os_a-wmemmove_s.obj: secapi/wmemmove_s.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o secapi/libarm32_libmsvcrt_os_a-wmemmove_s.obj `if test -f 'secapi/wmemmove_s.c'; then $(CYGPATH_W) 'secapi/wmemmove_s.c'; else $(CYGPATH_W) '$(srcdir)/secapi/wmemmove_s.c'; fi`
+stdio/libarm32_libmsvcrt_os_a-fseeki64.o: stdio/fseeki64.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/libarm32_libmsvcrt_os_a-fseeki64.o -MD -MP -MF stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/libarm32_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-fseeki64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/libarm32_libmsvcrt_os_a-fseeki64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/libarm32_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c
+
+stdio/libarm32_libmsvcrt_os_a-fseeki64.obj: stdio/fseeki64.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/libarm32_libmsvcrt_os_a-fseeki64.obj -MD -MP -MF stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/libarm32_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-fseeki64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/libarm32_libmsvcrt_os_a-fseeki64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/libarm32_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi`
+
stdio/libarm32_libmsvcrt_os_a-mingw_lock.o: stdio/mingw_lock.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm32_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/libarm32_libmsvcrt_os_a-mingw_lock.o -MD -MP -MF stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-mingw_lock.Tpo -c -o stdio/libarm32_libmsvcrt_os_a-mingw_lock.o `test -f 'stdio/mingw_lock.c' || echo '$(srcdir)/'`stdio/mingw_lock.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-mingw_lock.Tpo stdio/$(DEPDIR)/libarm32_libmsvcrt_os_a-mingw_lock.Po
@@ -59565,6 +59625,20 @@ secapi/libarm64_libmsvcrt_os_a-wmemmove_s.obj: secapi/wmemmove_s.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o secapi/libarm64_libmsvcrt_os_a-wmemmove_s.obj `if test -f 'secapi/wmemmove_s.c'; then $(CYGPATH_W) 'secapi/wmemmove_s.c'; else $(CYGPATH_W) '$(srcdir)/secapi/wmemmove_s.c'; fi`
+stdio/libarm64_libmsvcrt_os_a-fseeki64.o: stdio/fseeki64.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/libarm64_libmsvcrt_os_a-fseeki64.o -MD -MP -MF stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/libarm64_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-fseeki64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/libarm64_libmsvcrt_os_a-fseeki64.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/libarm64_libmsvcrt_os_a-fseeki64.o `test -f 'stdio/fseeki64.c' || echo '$(srcdir)/'`stdio/fseeki64.c
+
+stdio/libarm64_libmsvcrt_os_a-fseeki64.obj: stdio/fseeki64.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/libarm64_libmsvcrt_os_a-fseeki64.obj -MD -MP -MF stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-fseeki64.Tpo -c -o stdio/libarm64_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-fseeki64.Tpo stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-fseeki64.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio/fseeki64.c' object='stdio/libarm64_libmsvcrt_os_a-fseeki64.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdio/libarm64_libmsvcrt_os_a-fseeki64.obj `if test -f 'stdio/fseeki64.c'; then $(CYGPATH_W) 'stdio/fseeki64.c'; else $(CYGPATH_W) '$(srcdir)/stdio/fseeki64.c'; fi`
+
stdio/libarm64_libmsvcrt_os_a-mingw_lock.o: stdio/mingw_lock.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarm64_libmsvcrt_os_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdio/libarm64_libmsvcrt_os_a-mingw_lock.o -MD -MP -MF stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-mingw_lock.Tpo -c -o stdio/libarm64_libmsvcrt_os_a-mingw_lock.o `test -f 'stdio/mingw_lock.c' || echo '$(srcdir)/'`stdio/mingw_lock.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-mingw_lock.Tpo stdio/$(DEPDIR)/libarm64_libmsvcrt_os_a-mingw_lock.Po
diff --git a/mingw-w64-crt/lib32/msvcr100.def.in b/mingw-w64-crt/lib32/msvcr100.def.in
index 53ccd37b..1c6ae3dc 100644
--- a/mingw-w64-crt/lib32/msvcr100.def.in
+++ b/mingw-w64-crt/lib32/msvcr100.def.in
@@ -880,7 +880,7 @@ _freefls@4
_fscanf_l
_fscanf_s_l
_fseek_nolock
-_fseeki64 DATA
+_fseeki64
_fseeki64_nolock
_fsopen
_fstat32
@@ -890,7 +890,7 @@ _fstat32i64
_fstat64
_fstat64i32
_ftell_nolock
-_ftelli64 DATA
+_ftelli64
_ftelli64_nolock
_ftime32
_ftime32_s
diff --git a/mingw-w64-crt/lib32/msvcr90.def.in b/mingw-w64-crt/lib32/msvcr90.def.in
index 69765e53..fd4ef944 100644
--- a/mingw-w64-crt/lib32/msvcr90.def.in
+++ b/mingw-w64-crt/lib32/msvcr90.def.in
@@ -507,7 +507,7 @@ _freefls@4
_fscanf_l
_fscanf_s_l
_fseek_nolock
-_fseeki64 DATA
+_fseeki64
_fseeki64_nolock
_fsopen
_fstat32
@@ -517,7 +517,7 @@ _fstat32i64
_fstat64
_fstat64i32
_ftell_nolock
-_ftelli64 DATA
+_ftelli64
_ftelli64_nolock
_ftime32
_ftime32_s
diff --git a/mingw-w64-crt/lib64/msvcr100.def.in b/mingw-w64-crt/lib64/msvcr100.def.in
index b1e3e073..68c09d6c 100644
--- a/mingw-w64-crt/lib64/msvcr100.def.in
+++ b/mingw-w64-crt/lib64/msvcr100.def.in
@@ -837,7 +837,7 @@ _freefls
_fscanf_l
_fscanf_s_l
_fseek_nolock
-_fseeki64 DATA
+_fseeki64
_fseeki64_nolock
_fsopen
_fstat32
@@ -847,7 +847,7 @@ _fstat32i64
_fstat64
_fstat64i32
_ftell_nolock
-_ftelli64 DATA
+_ftelli64
_ftelli64_nolock
_ftime32
_ftime32_s
diff --git a/mingw-w64-crt/lib64/msvcr90.def.in b/mingw-w64-crt/lib64/msvcr90.def.in
index 72f30700..49b57010 100644
--- a/mingw-w64-crt/lib64/msvcr90.def.in
+++ b/mingw-w64-crt/lib64/msvcr90.def.in
@@ -454,7 +454,7 @@ _freefls
_fscanf_l
_fscanf_s_l
_fseek_nolock
-_fseeki64 DATA
+_fseeki64
_fseeki64_nolock
_fsopen
_fstat32
@@ -464,7 +464,7 @@ _fstat32i64
_fstat64
_fstat64i32
_ftell_nolock
-_ftelli64 DATA
+_ftelli64
_ftelli64_nolock
_ftime32
_ftime32_s
diff --git a/mingw-w64-crt/stdio/fseeki64.c b/mingw-w64-crt/stdio/fseeki64.c
new file mode 100644
index 00000000..fdb8f1c1
--- /dev/null
+++ b/mingw-w64-crt/stdio/fseeki64.c
@@ -0,0 +1,177 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <stdio.h>
+#include <io.h>
+#include <errno.h>
+#include <internal.h>
+
+#define _IOYOURBUF 0x0100
+#define _IOSETVBUF 0x0400
+#define _IOFEOF 0x0800
+#define _IOFLRTN 0x1000
+#define _IOCTRLZ 0x2000
+#define _IOCOMMIT 0x4000
+
+/* General use macros */
+
+#define inuse(s) ((s)->_flag & (_IOREAD|_IOWRT|_IORW))
+#define mbuf(s) ((s)->_flag & _IOMYBUF)
+#define nbuf(s) ((s)->_flag & _IONBF)
+#define ybuf(s) ((s)->_flag & _IOYOURBUF)
+#define bigbuf(s) ((s)->_flag & (_IOMYBUF|_IOYOURBUF))
+#define anybuf(s) ((s)->_flag & (_IOMYBUF|_IONBF|_IOYOURBUF))
+
+#define _INTERNAL_BUFSIZ 4096
+#define _SMALL_BUFSIZ 512
+
+#define FOPEN 0x01 /* file handle open */
+#define FEOFLAG 0x02 /* end of file has been encountered */
+#define FCRLF 0x04 /* CR-LF across read buffer (in text mode) */
+#define FPIPE 0x08 /* file handle refers to a pipe */
+#define FNOINHERIT 0x10 /* file handle opened _O_NOINHERIT */
+#define FAPPEND 0x20 /* file handle opened O_APPEND */
+#define FDEV 0x40 /* file handle refers to device */
+#define FTEXT 0x80 /* file handle is in text mode */
+
+_CRTIMP __int64 __cdecl _lseeki64(int fh,__int64 pos,int mthd);
+__int64 __cdecl _ftelli64(FILE *str);
+
+#if !defined(__arm__) && !defined(__aarch64__) /* we have F_ARM_ANY(_fseeki64) in msvcrt.def.in */
+int __cdecl _flush (FILE *str);
+
+int __cdecl _flush (FILE *str)
+{
+ FILE *stream;
+ int rc = 0; /* assume good return */
+ __int64 nchar;
+
+ stream = str;
+ if ((stream->_flag & (_IOREAD | _IOWRT)) == _IOWRT && bigbuf(stream)
+ && (nchar = (__int64) (stream->_ptr - stream->_base)) > 0ll)
+ {
+ if ( _write(_fileno(stream), stream->_base, nchar) == nchar) {
+ if (_IORW & stream->_flag)
+ stream->_flag &= ~_IOWRT;
+ } else {
+ stream->_flag |= _IOERR;
+ rc = EOF;
+ }
+ }
+ stream->_ptr = stream->_base;
+ stream->_cnt = 0ll;
+ return rc;
+}
+
+int __cdecl _fseeki64(FILE *str,__int64 offset,int whence)
+{
+ FILE *stream;
+ /* Init stream pointer */
+ stream = str;
+ errno=0;
+ if(!stream || ((whence != SEEK_SET) && (whence != SEEK_CUR) && (whence != SEEK_END)))
+ {
+ errno=EINVAL;
+ return -1;
+ }
+ /* Clear EOF flag */
+ stream->_flag &= ~_IOEOF;
+
+ if (whence == SEEK_CUR) {
+ offset += _ftelli64(stream);
+ whence = SEEK_SET;
+ }
+ /* Flush buffer as necessary */
+ _flush(stream);
+
+ /* If file opened for read/write, clear flags since we don't know
+ what the user is going to do next. If the file was opened for
+ read access only, decrease _bufsiz so that the next _filbuf
+ won't cost quite so much */
+
+ if (stream->_flag & _IORW)
+ stream->_flag &= ~(_IOWRT|_IOREAD);
+ else if ( (stream->_flag & _IOREAD) && (stream->_flag & _IOMYBUF) &&
+ !(stream->_flag & _IOSETVBUF) )
+ stream->_bufsiz = _SMALL_BUFSIZ;
+
+ /* Seek to the desired locale and return. */
+
+ return (_lseeki64(_fileno(stream), offset, whence) == -1ll ? -1 : 0);
+}
+
+int __cdecl (*__MINGW_IMP_SYMBOL(_fseeki64))(FILE *, __int64, int) = _fseeki64;
+#endif /* !defined(__arm__) && !defined(__aarch64__) */
+
+__int64 __cdecl _ftelli64(FILE *str)
+{
+ FILE *stream;
+ size_t offset;
+ __int64 filepos;
+ register char *p;
+ char *max;
+ int fd;
+ size_t rdcnt = 0;
+
+ errno=0;
+ stream = str;
+ fd = _fileno(stream);
+ if (stream->_cnt < 0ll) stream->_cnt = 0ll;
+ if ((filepos = _lseeki64(fd, 0ll, SEEK_CUR)) < 0L)
+ return -1ll;
+
+ if (!bigbuf(stream)) /* _IONBF or no buffering designated */
+ return (filepos - (__int64) stream->_cnt);
+
+ offset = (size_t)(stream->_ptr - stream->_base);
+
+ if (stream->_flag & (_IOWRT|_IOREAD))
+ {
+ if (_osfile(fd) & FTEXT)
+ for (p = stream->_base; p < stream->_ptr; p++)
+ if (*p == '\n') /* adjust for '\r' */
+ offset++;
+ }
+ else if (!(stream->_flag & _IORW)) {
+ errno=EINVAL;
+ return -1ll;
+ }
+ if (filepos == 0ll)
+ return ((__int64)offset);
+
+ if (stream->_flag & _IOREAD) /* go to preceding sector */
+ {
+ if (stream->_cnt == 0ll) /* filepos holds correct location */
+ offset = 0ll;
+ else
+ {
+ rdcnt = ((size_t) stream->_cnt) + ((size_t) (size_t)(stream->_ptr - stream->_base));
+ if (_osfile(fd) & FTEXT) {
+ if (_lseeki64(fd, 0ll, SEEK_END) == filepos) {
+ max = stream->_base + rdcnt;
+ for (p = stream->_base; p < max; p++)
+ if (*p == '\n') /* adjust for '\r' */
+ rdcnt++;
+ if (stream->_flag & _IOCTRLZ)
+ ++rdcnt;
+ } else {
+ _lseeki64(fd, filepos, SEEK_SET);
+ if ( (rdcnt <= _SMALL_BUFSIZ) && (stream->_flag & _IOMYBUF) &&
+ !(stream->_flag & _IOSETVBUF))
+ rdcnt = _SMALL_BUFSIZ;
+ else
+ rdcnt = stream->_bufsiz;
+ if (_osfile(fd) & FCRLF)
+ ++rdcnt;
+ }
+ } /* end if FTEXT */
+ }
+ filepos -= (__int64)rdcnt;
+ } /* end else stream->_cnt != 0 */
+ return (filepos + (__int64)offset);
+}
+
+__int64 __cdecl (*__MINGW_IMP_SYMBOL(_ftelli64))(FILE *) = _ftelli64;
+
diff --git a/mingw-w64-crt/stdio/fseeko64.c b/mingw-w64-crt/stdio/fseeko64.c
index 5905aa22..99a54f77 100644
--- a/mingw-w64-crt/stdio/fseeko64.c
+++ b/mingw-w64-crt/stdio/fseeko64.c
@@ -76,33 +76,7 @@ static struct oserr_map local_errtab[] = {
{ ERROR_NOT_ENOUGH_QUOTA, ENOMEM }, { 0, -1 }
};
-_CRTIMP __int64 __cdecl _lseeki64(int fh,__int64 pos,int mthd);
-__int64 __cdecl _ftelli64(FILE *str);
void mingw_dosmaperr (unsigned long oserrno);
-int __cdecl _flush (FILE *str);
-
-int __cdecl _flush (FILE *str)
-{
- FILE *stream;
- int rc = 0; /* assume good return */
- __int64 nchar;
-
- stream = str;
- if ((stream->_flag & (_IOREAD | _IOWRT)) == _IOWRT && bigbuf(stream)
- && (nchar = (__int64) (stream->_ptr - stream->_base)) > 0ll)
- {
- if ( _write(_fileno(stream), stream->_base, nchar) == nchar) {
- if (_IORW & stream->_flag)
- stream->_flag &= ~_IOWRT;
- } else {
- stream->_flag |= _IOERR;
- rc = EOF;
- }
- }
- stream->_ptr = stream->_base;
- stream->_cnt = 0ll;
- return rc;
-}
int fseeko64 (FILE* stream, _off64_t offset, int whence)
{
@@ -130,111 +104,6 @@ int fseeko64 (FILE* stream, _off64_t offset, int whence)
return fsetpos (stream, &pos);
}
-int __cdecl _fseeki64(FILE *str,__int64 offset,int whence)
-{
- FILE *stream;
- /* Init stream pointer */
- stream = str;
- errno=0;
- if(!stream || ((whence != SEEK_SET) && (whence != SEEK_CUR) && (whence != SEEK_END)))
- {
- errno=EINVAL;
- return -1;
- }
- /* Clear EOF flag */
- stream->_flag &= ~_IOEOF;
-
- if (whence == SEEK_CUR) {
- offset += _ftelli64(stream);
- whence = SEEK_SET;
- }
- /* Flush buffer as necessary */
- _flush(stream);
-
- /* If file opened for read/write, clear flags since we don't know
- what the user is going to do next. If the file was opened for
- read access only, decrease _bufsiz so that the next _filbuf
- won't cost quite so much */
-
- if (stream->_flag & _IORW)
- stream->_flag &= ~(_IOWRT|_IOREAD);
- else if ( (stream->_flag & _IOREAD) && (stream->_flag & _IOMYBUF) &&
- !(stream->_flag & _IOSETVBUF) )
- stream->_bufsiz = _SMALL_BUFSIZ;
-
- /* Seek to the desired locale and return. */
-
- return (_lseeki64(_fileno(stream), offset, whence) == -1ll ? -1 : 0);
-}
-
-__int64 __cdecl _ftelli64(FILE *str)
-{
- FILE *stream;
- size_t offset;
- __int64 filepos;
- register char *p;
- char *max;
- int fd;
- size_t rdcnt = 0;
-
- errno=0;
- stream = str;
- fd = _fileno(stream);
- if (stream->_cnt < 0ll) stream->_cnt = 0ll;
- if ((filepos = _lseeki64(fd, 0ll, SEEK_CUR)) < 0L)
- return -1ll;
-
- if (!bigbuf(stream)) /* _IONBF or no buffering designated */
- return (filepos - (__int64) stream->_cnt);
-
- offset = (size_t)(stream->_ptr - stream->_base);
-
- if (stream->_flag & (_IOWRT|_IOREAD))
- {
- if (_osfile(fd) & FTEXT)
- for (p = stream->_base; p < stream->_ptr; p++)
- if (*p == '\n') /* adjust for '\r' */
- offset++;
- }
- else if (!(stream->_flag & _IORW)) {
- errno=EINVAL;
- return -1ll;
- }
- if (filepos == 0ll)
- return ((__int64)offset);
-
- if (stream->_flag & _IOREAD) /* go to preceding sector */
- {
- if (stream->_cnt == 0ll) /* filepos holds correct location */
- offset = 0ll;
- else
- {
- rdcnt = ((size_t) stream->_cnt) + ((size_t) (size_t)(stream->_ptr - stream->_base));
- if (_osfile(fd) & FTEXT) {
- if (_lseeki64(fd, 0ll, SEEK_END) == filepos) {
- max = stream->_base + rdcnt;
- for (p = stream->_base; p < max; p++)
- if (*p == '\n') /* adjust for '\r' */
- rdcnt++;
- if (stream->_flag & _IOCTRLZ)
- ++rdcnt;
- } else {
- _lseeki64(fd, filepos, SEEK_SET);
- if ( (rdcnt <= _SMALL_BUFSIZ) && (stream->_flag & _IOMYBUF) &&
- !(stream->_flag & _IOSETVBUF))
- rdcnt = _SMALL_BUFSIZ;
- else
- rdcnt = stream->_bufsiz;
- if (_osfile(fd) & FCRLF)
- ++rdcnt;
- }
- } /* end if FTEXT */
- }
- filepos -= (__int64)rdcnt;
- } /* end else stream->_cnt != 0 */
- return (filepos + (__int64)offset);
-}
-
void mingw_dosmaperr (unsigned long oserrno)
{
size_t i;
diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h
index d981f701..0ee6789d 100644
--- a/mingw-w64-headers/crt/stdio.h
+++ b/mingw-w64-headers/crt/stdio.h
@@ -611,10 +611,9 @@ int vsnprintf (char *__stream, size_t __n, const char *__format, __builtin_va_li
/* Shouldn't be any fseeko32 in glibc, 32bit to 64bit casting should be fine */
/* int fseeko32(FILE* stream, _off_t offset, int whence);*/ /* fseeko32 redirects to fseeko64 */
-#if __MSVCRT_VERSION__ >= 0x1400
- // Mark these as _CRTIMP to avoid trying to link in the mingwex versions.
_CRTIMP int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin);
_CRTIMP __int64 __cdecl _ftelli64(FILE *_File);
+#if __MSVCRT_VERSION__ >= 0x1400
__mingw_static_ovr int fseeko(FILE *_File, _off_t _Offset, int _Origin) {
return fseek(_File, _Offset, _Origin);
}
@@ -628,8 +627,6 @@ int vsnprintf (char *__stream, size_t __n, const char *__format, __builtin_va_li
return _ftelli64(_File);
}
#else
- __MINGW_EXTENSION int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin);
- __MINGW_EXTENSION __int64 __cdecl _ftelli64(FILE *_File);
int fseeko64(FILE* stream, _off64_t offset, int whence);
int fseeko(FILE* stream, _off_t offset, int whence);
/* Returns truncated 64bit off_t */
--
2.14.1
|