This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] AmigaOS 4 port contribution
- From: DJ Delorie <dj at redhat dot com>
- To: marcus at mc dot pp dot se
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 7 Oct 2003 12:05:00 -0400
- Subject: Re: [PATCH] AmigaOS 4 port contribution
- References: <yf9ad8fr6mp.fsf@mc.pp.se>
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.