diff options
author | Miguel de Icaza <miguel@ximian.com> | 2001-06-15 00:01:56 +0000 |
---|---|---|
committer | Miguel de Icaza <miguel@src.gnome.org> | 2001-06-15 00:01:56 +0000 |
commit | ab28405b836bfe993d50e528aa46a9b013e5d36a (patch) | |
tree | a4443afb7e912076e1b771ad7b5f030b13ebb4a3 | |
parent | 8a0d3a1d0761c222da7acf8b971d7cc59b52e054 (diff) | |
download | shared-mime-info-ab28405b836bfe993d50e528aa46a9b013e5d36a.tar.gz |
From David KAELBLING:
2001-06-14 Miguel de Icaza <miguel@ximian.com>
From David KAELBLING:
* gnomesupport.awk: Generate proper declarations for SGI.
* vsnprintf.c: Add SGI IRIX 6.5 support, by defining size_t as
ssize_t which is what vsnprintf uses.
svn path=/branches/gnome-libs-1-0/; revision=1796
-rw-r--r-- | support/ChangeLog | 9 | ||||
-rw-r--r-- | support/gnomesupport.awk | 10 | ||||
-rw-r--r-- | support/vsnprintf.c | 4 |
3 files changed, 22 insertions, 1 deletions
diff --git a/support/ChangeLog b/support/ChangeLog index 674ce896..f55ec0ff 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,12 @@ +2001-06-14 Miguel de Icaza <miguel@ximian.com> + + From David KAELBLING: + + * gnomesupport.awk: Generate proper declarations for SGI. + + * vsnprintf.c: Add SGI IRIX 6.5 support, by defining size_t as + ssize_t which is what vsnprintf uses. + 2000-02-26 Changwoo Ryu <cwryu@idis.co.kr> * poptint.h: Replaced `HAVE_DGETTEXT' cpp flag with diff --git a/support/gnomesupport.awk b/support/gnomesupport.awk index 2f89ab6a..a9d671ee 100644 --- a/support/gnomesupport.awk +++ b/support/gnomesupport.awk @@ -19,7 +19,8 @@ END { print "#include <stdarg.h>"; } - if (!def["HAVE_SCANDIR"] || def["NEED_DECLARATION_SCANDIR"]) { + if (!def["HAVE_SCANDIR"] || def["NEED_DECLARATION_SCANDIR"] || + !def["HAVE_VASPRINTF"] || !def["HAVE_VSNPRINTF"]) { print "#include <sys/types.h>"; if (def["HAVE_DIRENT_H"]) { @@ -178,10 +179,17 @@ END { if (!def["HAVE_VSNPRINTF"]) { print ""; print "/* Maximum chars of output to write is MAXLEN. */"; + print "#ifdef __sgi" + print "int vsnprintf (char */*str*/, ssize_t /*maxlen*/,"; + print " char */*fmt*/, va_list /*ap*/);"; + print "int snprintf (char */*str*/, ssize_t /*maxlen*/,"; + print " char */*fmt*/, ...);"; + print "#else" print "int vsnprintf (char */*str*/, size_t /*maxlen*/,"; print " char */*fmt*/, va_list /*ap*/);"; print "int snprintf (char */*str*/, size_t /*maxlen*/,"; print " char */*fmt*/, ...);"; + print "#endif" } if (!def["HAVE_REALPATH"]) { diff --git a/support/vsnprintf.c b/support/vsnprintf.c index a2dfb4ed..68280d90 100644 --- a/support/vsnprintf.c +++ b/support/vsnprintf.c @@ -41,6 +41,10 @@ #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) #endif +#ifdef __sgi +#define size_t ssize_t +#endif + static int pgsize; static char *curobj; static int caught; |