summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/alpm.c4
-rw-r--r--lib/libalpm/alpm.h10
-rw-r--r--lib/libalpm/error.c4
-rw-r--r--lib/libalpm/handle.c2
-rw-r--r--lib/libalpm/handle.h4
-rw-r--r--lib/libalpm/sync.c4
6 files changed, 14 insertions, 14 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 38843342..e957f1aa 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -47,9 +47,9 @@
* @return a context handle on success, NULL on error, err will be set if provided
*/
alpm_handle_t SYMEXPORT *alpm_initialize(const char *root, const char *dbpath,
- enum _alpm_errno_t *err)
+ alpm_errno_t *err)
{
- enum _alpm_errno_t myerr;
+ alpm_errno_t myerr;
const char *lf = "db.lck";
size_t lockfilelen;
alpm_handle_t *myhandle = _alpm_handle_new();
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 9fda9406..9b2d8a92 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -1115,7 +1115,7 @@ char *alpm_compute_sha256sum(const char *filename);
/** @addtogroup alpm_api_errors Error Codes
* @{
*/
-enum _alpm_errno_t {
+typedef enum _alpm_errno_t {
ALPM_ERR_MEMORY = 1,
ALPM_ERR_SYSTEM,
ALPM_ERR_BADPERMS,
@@ -1179,19 +1179,19 @@ enum _alpm_errno_t {
ALPM_ERR_LIBCURL,
ALPM_ERR_EXTERNAL_DOWNLOAD,
ALPM_ERR_GPGME
-};
+} alpm_errno_t;
/** Returns the current error code from the handle. */
-enum _alpm_errno_t alpm_errno(alpm_handle_t *handle);
+alpm_errno_t alpm_errno(alpm_handle_t *handle);
/** Returns the string corresponding to an error number. */
-const char *alpm_strerror(enum _alpm_errno_t err);
+const char *alpm_strerror(alpm_errno_t err);
/* End of alpm_api_errors */
/** @} */
alpm_handle_t *alpm_initialize(const char *root, const char *dbpath,
- enum _alpm_errno_t *err);
+ alpm_errno_t *err);
int alpm_release(alpm_handle_t *handle);
enum alpm_caps {
diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c
index b3f56819..044dec7c 100644
--- a/lib/libalpm/error.c
+++ b/lib/libalpm/error.c
@@ -29,12 +29,12 @@
#include "alpm.h"
#include "handle.h"
-enum _alpm_errno_t SYMEXPORT alpm_errno(alpm_handle_t *handle)
+alpm_errno_t SYMEXPORT alpm_errno(alpm_handle_t *handle)
{
return handle->pm_errno;
}
-const char SYMEXPORT *alpm_strerror(enum _alpm_errno_t err)
+const char SYMEXPORT *alpm_strerror(alpm_errno_t err)
{
switch(err) {
/* System */
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 7402be50..01f59555 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -339,7 +339,7 @@ static char *canonicalize_path(const char *path) {
return new_path;
}
-enum _alpm_errno_t _alpm_set_directory_option(const char *value,
+alpm_errno_t _alpm_set_directory_option(const char *value,
char **storage, int must_exist)
{
struct stat st;
diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h
index 8477dcae..d568fb42 100644
--- a/lib/libalpm/handle.h
+++ b/lib/libalpm/handle.h
@@ -93,7 +93,7 @@ struct __alpm_handle_t {
alpm_siglevel_t siglevel; /* Default signature verification level */
/* error code */
- enum _alpm_errno_t pm_errno;
+ alpm_errno_t pm_errno;
};
alpm_handle_t *_alpm_handle_new(void);
@@ -102,7 +102,7 @@ void _alpm_handle_free(alpm_handle_t *handle);
int _alpm_handle_lock(alpm_handle_t *handle);
int _alpm_handle_unlock(alpm_handle_t *handle);
-enum _alpm_errno_t _alpm_set_directory_option(const char *value,
+alpm_errno_t _alpm_set_directory_option(const char *value,
char **storage, int must_exist);
#endif /* _ALPM_HANDLE_H */
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 52049a8c..3de5c079 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -748,7 +748,7 @@ static int apply_deltas(alpm_handle_t *handle)
* @return 1 if file was removed, 0 otherwise
*/
static int prompt_to_delete(alpm_handle_t *handle, const char *filepath,
- enum _alpm_errno_t reason)
+ alpm_errno_t reason)
{
int doremove = 0;
QUESTION(handle, ALPM_QUESTION_CORRUPTED_PKG, (char *)filepath,
@@ -965,7 +965,7 @@ static int check_validity(alpm_handle_t *handle,
char *path;
alpm_siglist_t *siglist;
alpm_siglevel_t level;
- enum _alpm_errno_t error;
+ alpm_errno_t error;
};
size_t current = 0, current_bytes = 0;
alpm_list_t *i, *errors = NULL;