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)
604604}
605605
606606#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-
639607void
640608sincos (double x , double * sine , double * cosine ) {
641609 * sine = sin (x );
Original file line number Diff line number Diff line change 2424#endif
2525#include <stdlib.h>
2626
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+
2734/* defines to use real host stdio routines */
2835
2936#define __io_fclose (fp ) fclose(fp)
You can’t perform that action at this time.
0 commit comments