| 59051 |
murdoch |
1 |
/*
|
|
|
2 |
* R : A Computer Language for Statistical Data Analysis
|
| 74076 |
ripley |
3 |
* Copyright (C) 2001-2018 The R Core Team
|
| 59051 |
murdoch |
4 |
*
|
|
|
5 |
* This program is free software; you can redistribute it and/or modify
|
|
|
6 |
* it under the terms of the GNU General Public License as published by
|
|
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
|
|
8 |
* (at your option) any later version.
|
|
|
9 |
*
|
|
|
10 |
* This program is distributed in the hope that it will be useful,
|
|
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
13 |
* GNU General Public License for more details.
|
|
|
14 |
*
|
|
|
15 |
* You should have received a copy of the GNU General Public License
|
|
|
16 |
* along with this program; if not, a copy is available at
|
| 68949 |
ripley |
17 |
* https://www.R-project.org/Licenses/
|
| 59051 |
murdoch |
18 |
*/
|
|
|
19 |
|
| 74076 |
ripley |
20 |
/* This appears not to currently be needed: in 2018-01 no Fortran I/O
|
|
|
21 |
* is done. But left as future-proofing and as an example (mentioned
|
|
|
22 |
* in 'Writing R Extensions').
|
|
|
23 |
*/
|
|
|
24 |
|
| 59051 |
murdoch |
25 |
#ifdef HAVE_CONFIG_H
|
|
|
26 |
#include <config.h>
|
|
|
27 |
#endif
|
|
|
28 |
|
| 65805 |
ripley |
29 |
#ifdef _WIN32
|
| 59051 |
murdoch |
30 |
# include <fcntl.h>
|
|
|
31 |
|
|
|
32 |
static void __attribute__((constructor))
|
|
|
33 |
init(void)
|
|
|
34 |
{
|
|
|
35 |
/* gfortran initialization sets these to _O_BINARY */
|
|
|
36 |
setmode(1,_O_TEXT); /* stdout */
|
|
|
37 |
setmode(2,_O_TEXT); /* stderr */
|
|
|
38 |
return;
|
|
|
39 |
}
|
|
|
40 |
#endif
|