summaryrefslogtreecommitdiffstats
path: root/Parser/pgenmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/pgenmain.c')
-rw-r--r--Parser/pgenmain.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Parser/pgenmain.c b/Parser/pgenmain.c
index 2a284bc..d25cbd4 100644
--- a/Parser/pgenmain.c
+++ b/Parser/pgenmain.c
@@ -13,6 +13,7 @@
- check for duplicate definitions of names (instead of fatal err)
*/
+#include "Python.h"
#include "pgenheaders.h"
#include "grammar.h"
#include "node.h"
@@ -182,6 +183,16 @@ PyOS_Readline(char *prompt)
return PyMem_REALLOC(p, n+1);
}
+#ifdef WITH_UNIVERSAL_NEWLINES
+/* No-nonsense fgets */
+char *
+Py_UniversalNewlineFgets(char *buf, int n, FILE *stream, PyObject *fobj)
+{
+ return fgets(buf, n, stream);
+}
+#endif
+
+
#include <stdarg.h>
void