--- adaint.c~1 2006-02-26 17:34:04.000000000 +0000
+++ adaint.c 2006-02-26 21:38:28.000000000 +0000
@@ -96,6 +96,9 @@
#endif
#if defined (__EMX__) || defined (MSDOS) || defined (_WIN32)
+
+#include <ctype.h>
+
#elif defined (VMS)
/* Header files and definitions for __gnat_set_file_time_name. */
@@ -372,7 +375,9 @@
char *buf ATTRIBUTE_UNUSED,
size_t bufsiz ATTRIBUTE_UNUSED)
{
-#if defined (MSDOS) || defined (_WIN32) || defined (__EMX__)
+#if defined (__DJGPP__) && (__DJGPP__>2 || (__DJGPP__==2 && __DJGPP_MINOR__>=4))
+ return readlink (path, buf, bufsiz);
+#elif defined (MSDOS) || defined (_WIN32) || defined (__EMX__)
return -1;
#elif defined (__INTERIX) || defined (VMS)
return -1;
@@ -391,7 +396,10 @@
__gnat_symlink (char *oldpath ATTRIBUTE_UNUSED,
char *newpath ATTRIBUTE_UNUSED)
{
-#if defined (MSDOS) || defined (_WIN32) || defined (__EMX__)
+#if defined (__DJGPP__) && (__DJGPP__>2 || (__DJGPP__==2 && __DJGPP_MINOR__>=4))
+/* Newer DJGPP versions supports symlinks */
+ return symlink (oldpath, newpath);
+#elif defined (MSDOS) || defined (_WIN32) || defined (__EMX__)
return -1;
#elif defined (__INTERIX) || defined (VMS)
return -1;
@@ -484,7 +492,11 @@
__gnat_get_maximum_file_name_length (void)
{
#if defined (MSDOS)
+#ifdef __DJGPP__
+ return (_use_lfn(".")) ? -1 : 8;
+#else
return 8;
+#endif
#elif defined (VMS)
if (getenv ("GNAT$EXTENDED_FILE_SPECIFICATIONS"))
return -1;
@@ -979,6 +991,7 @@
unsigned file_hour = fs.ft_hour;
unsigned file_min = fs.ft_min;
unsigned file_tsec = fs.ft_tsec;
+ return ret;
#endif
/* Calculate the seconds since epoch from the time components. First count
@@ -1042,7 +1055,7 @@
void
__gnat_set_file_time_name (char *name, time_t time_stamp)
{
-#if defined (__EMX__) || defined (MSDOS) || defined (__vxworks)
+#if defined (__EMX__) || defined (__vxworks)
/* Code to implement __gnat_set_file_time_name for these systems. */
@@ -1274,9 +1287,10 @@
void
__gnat_set_env_value (char *name, char *value)
{
-#ifdef MSDOS
+/* #ifdef MSDOS */
-#elif defined (VMS)
+/* #elif defined (VMS) */
+#if defined (VMS)
struct descriptor_s name_desc;
/* Put in JOB table for now, so that the project stuff at least works. */
struct descriptor_s table_desc = {7, 0, "LNM$JOB"};
@@ -1561,6 +1575,9 @@
#if defined (__vxworks)
return 0;
+#elif defined (__DJGPP__) && (__DJGPP__==2) && (__DJGPP_MINOR__<4)
+ return 0;
+
#elif defined (_AIX) || defined (__APPLE__) || defined (__unix__)
int ret;
struct stat statbuf;
syntax highlighted by Code2HTML, v. 0.9.1