File tree Expand file tree Collapse file tree 2 files changed +7
-32
lines changed Expand file tree Collapse file tree 2 files changed +7
-32
lines changed Original file line number Diff line number Diff line change @@ -604,38 +604,6 @@ __fortio_trunc(FIO_FCB *p, seekoffx_t length)
604
604
}
605
605
606
606
#ifdef _WIN32
607
- int
608
- __fortio_binary_mode (void * fp )
609
- {
610
- #if defined(WINNT )
611
- #include <fcntl.h>
612
-
613
- #if defined(WIN64 ) || defined(WIN32 )
614
- #define O_BINARY _O_BINARY
615
- #endif
616
-
617
- int mode ;
618
-
619
- mode = setmode (fileno ((FILE * )fp ), O_BINARY );
620
- if (mode == -1 ) {
621
- /* The mode argument is clearly legal, so this should not
622
- * happen. But, in a console app, setmode will fail on
623
- * the fd representing stdout.
624
- */
625
- return 0 ;
626
- }
627
- (void )setmode (fileno ((FILE * )fp ), mode );
628
- return (mode & O_BINARY );
629
- #else
630
- return 1 ;
631
- #endif
632
- }
633
-
634
- void
635
- __fortio_setmode_binary (FILE * f ) {
636
- _setmode (_fileno (f ), _O_BINARY );
637
- }
638
-
639
607
void
640
608
sincos (double x , double * sine , double * cosine ) {
641
609
* sine = sin (x );
Original file line number Diff line number Diff line change 24
24
#endif
25
25
#include <stdlib.h>
26
26
27
+ /* for some reason these are not correctly defined on WIN32 */
28
+ #ifdef _WIN32
29
+ #define __fortio_setmode_binary __io_setmode_binary
30
+ #define __fortio_binary_mode __io_binary_mode
31
+
32
+ #endif
33
+
27
34
/* defines to use real host stdio routines */
28
35
29
36
#define __io_fclose (fp ) fclose(fp)
You can’t perform that action at this time.
0 commit comments