This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] AmigaOS 4 port contribution


Some comments on the libiberty changes:

make-temp-file.c: It would be nice to replace os-specific ifdefs with
os-specific arrays of strings to try, then just loop through however
many there are.  However, a simpler simplification would be to just
hard-code "T:" in the amigaos-specific block:

+#ifndef __amigaos__
   /* Try /var/tmp, /usr/tmp, then /tmp.  */
   base = try (vartmp, base);
   base = try (usrtmp, base);
   base = try (tmp, base);
+#else /* __amigaos__ */
+  /* Try T: */
+  base = try ("T:", base);
+#endif /* __amigaos__ */


The other ones are done the way they are because DIR_SEPARATOR might
change.  That is not true for amigaos, so there's no point in making
the code more complex for it.

Also, the code to avoid replicating a trailing dir separator can be
platform-independent.  While amigaos is the only platform that needs
it, all platforms can use it.

Aside from code formatting issues, the rest looks OK.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]