* *
* Auxiliary C functions for Interfaces.C.Streams *
* *
- * Copyright (C) 1992-2009, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2011, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
* *
****************************************************************************/
-/* Routines required for implementing routines in Interfaces.C.Streams */
+/* Routines required for implementing routines in Interfaces.C.Streams. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
#ifdef __vxworks
#include "vxWorks.h"
#endif
+/* Don't use macros versions of this functions on VxWorks since they cause
+ imcompatible changes in some VxWorks versions */
+#ifdef __vxworks
+#undef getchar
+#undef putchar
+#undef feof
+#undef ferror
+#undef fileno
+#endif
+
/* The _IONBF value in MINGW32 stdio.h is wrong. */
#if defined (WINNT) || defined (_WINNT)
#if OLD_MINGW
int ret;
GNAT_STRUCT_STAT statbuf;
-#ifdef __EMX__
- /* Programs using screen I/O may need to reset the FPU after
- initialization of screen-handling related DLL's, so force
- DLL initialization by doing a null-write and then reset the FPU */
-
- DosWrite (0, &ret, 0, &ret);
- __gnat_init_float();
-#endif
-
ret = GNAT_FSTAT (fd, &statbuf);
return (!ret && S_ISREG (statbuf.st_mode));
}
else
buffer[0] = '\0';
-#elif defined(__EMX__) || defined (__MINGW32__)
- /* If this is a device file return it as is; under Windows NT and
- OS/2 a device file end with ":". */
+#elif defined (__MINGW32__)
+ /* If this is a device file return it as is;
+ under Windows NT a device file ends with ":". */
if (nam[strlen (nam) - 1] == ':')
strcpy (buffer, nam);
else
*p = '\\';
}
-#elif defined (MSDOS)
- _fixpath (nam, buffer);
-
#elif defined (sgi) || defined (__FreeBSD__)
/* Use realpath function which resolves links and references to . and ..
return buffer;
}
+
+#ifdef __cplusplus
+}
+#endif