aboutsummaryrefslogtreecommitdiffstats
path: root/rpmtools.xs
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-05-22 13:36:17 +0000
committerFrancois Pons <fpons@mandriva.com>2001-05-22 13:36:17 +0000
commit6de0ff3b3f1739639690884c5b03519b81dcfce7 (patch)
tree1ee96a60ab1285c00612f36600e77f770b5d8431 /rpmtools.xs
parent2dc9f9ce082bb03b63d9007e32b06f544245a217 (diff)
downloadrpmtools-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.xs9
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