diff options
author | Francois Pons <fpons@mandriva.com> | 2001-05-22 13:36:17 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-05-22 13:36:17 +0000 |
commit | 6de0ff3b3f1739639690884c5b03519b81dcfce7 (patch) | |
tree | 1ee96a60ab1285c00612f36600e77f770b5d8431 /rpmtools.xs | |
parent | 2dc9f9ce082bb03b63d9007e32b06f544245a217 (diff) | |
download | rpmtools-6de0ff3b3f1739639690884c5b03519b81dcfce7.tar rpmtools-6de0ff3b3f1739639690884c5b03519b81dcfce7.tar.gz rpmtools-6de0ff3b3f1739639690884c5b03519b81dcfce7.tar.bz2 rpmtools-6de0ff3b3f1739639690884c5b03519b81dcfce7.tar.xz rpmtools-6de0ff3b3f1739639690884c5b03519b81dcfce7.zip |
added arch support.
Diffstat (limited to 'rpmtools.xs')
-rw-r--r-- | rpmtools.xs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rpmtools.xs b/rpmtools.xs index 4aeebd1..c270994 100644 --- a/rpmtools.xs +++ b/rpmtools.xs @@ -2,6 +2,7 @@ #include "perl.h" #include "XSUB.h" +#include <sys/utsname.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -290,6 +291,14 @@ void callback_empty(void) {} MODULE = rpmtools PACKAGE = rpmtools +char * +arch() + CODE: + struct utsname u; + if (uname(&u) == 0) RETVAL = u.machine; else RETVAL = NULL; + OUTPUT: + RETVAL + void* db_open(prefix) char *prefix |