diff options
author | William Pitcock <nenolod@dereferenced.org> | 2011-07-16 04:28:41 -0500 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2011-07-16 04:28:41 -0500 |
commit | 37a682e5606d1214f0209180d2a6e6b682382989 (patch) | |
tree | a3a936b811fc600cfd694991ffcffe7c8630fd43 /src | |
parent | 1c54d1361455e6788a9556ad820de676b4512817 (diff) | |
download | apk-tools-37a682e5606d1214f0209180d2a6e6b682382989.tar.gz apk-tools-37a682e5606d1214f0209180d2a6e6b682382989.tar.bz2 apk-tools-37a682e5606d1214f0209180d2a6e6b682382989.tar.xz apk-tools-37a682e5606d1214f0209180d2a6e6b682382989.zip |
apk_database: move APK_DEFAULT_ARCH to headers so that we can use it in version().
Diffstat (limited to 'src')
-rw-r--r-- | src/apk_database.h | 10 | ||||
-rw-r--r-- | src/database.c | 8 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/apk_database.h b/src/apk_database.h index b28a77b..e0c04ed 100644 --- a/src/apk_database.h +++ b/src/apk_database.h @@ -18,6 +18,16 @@ #include "apk_package.h" #include "apk_io.h" +/* default architecture for APK packages. */ +#if defined(__x86_64__) +#define APK_DEFAULT_ARCH "x86_64" +#elif defined(__i386__) +#define APK_DEFAULT_ARCH "x86" +#else +#warning APK_DEFAULT_ARCH is not set for this architecture +#define APK_DEFAULT_ARCH "noarch" +#endif + #define APK_MAX_REPOS 32 #define APK_CACHE_CSUM_BYTES 4 diff --git a/src/database.c b/src/database.c index 9a977f4..ade8a90 100644 --- a/src/database.c +++ b/src/database.c @@ -34,14 +34,6 @@ #include "apk_archive.h" #include "apk_print.h" -#if defined(__x86_64__) -#define APK_DEFAULT_ARCH "x86_64" -#elif defined(__i386__) -#define APK_DEFAULT_ARCH "x86" -#else -#define APK_DEFAULT_ARCH "noarch" -#endif - enum { APK_DISALLOW_RMDIR = 0, APK_ALLOW_RMDIR = 1 |