Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=5db2ecc3e3213a5b688c99027d7e626b08e31c16
commit 5db2ecc3e3213a5b688c99027d7e626b08e31c16 Author: Michel Hermier <[email protected]> Date: Thu Jul 31 08:44:59 2014 +0200 libpacman: Move compatibility definition to the bottom of pacman.h and allow to undef them with PACMAN_NO_COMPAT. diff --git a/lib/libpacman/pacman.h b/lib/libpacman/pacman.h index bb3439e..4cf48cc 100644 --- a/lib/libpacman/pacman.h +++ b/lib/libpacman/pacman.h @@ -58,19 +58,6 @@ typedef struct __pmlist_iterator_t pmlist_iterator_t; typedef struct __pmpkg_t pmpkg_t; typedef struct __pmsyncpkg_t pmsyncpkg_t; -/* Compatibility definitions */ -typedef struct __pmlist_t PM_LIST; -typedef struct __pmdb_t PM_DB; -typedef struct __pmpkg_t PM_PKG; -typedef struct __pmgrp_t PM_GRP; -typedef struct __pmsyncpkg_t PM_SYNCPKG; -typedef struct __pmdepmissing_t PM_DEPMISS; -typedef struct __pmconflict_t PM_CONFLICT; - -#define pacman_list_first pacman_list_begin -#define pacman_list_next pacman_list_iterator_next -#define pacman_list_getdata pacman_list_iterator_getdata - /* * Library */ @@ -540,6 +527,22 @@ extern enum __pmerrno_t { char *pacman_strerror(int err); enum __pmerrno_t pacman_geterror(void); +#ifndef PACMAN_NO_COMPAT + +typedef struct __pmlist_t PM_LIST; +typedef struct __pmdb_t PM_DB; +typedef struct __pmpkg_t PM_PKG; +typedef struct __pmgrp_t PM_GRP; +typedef struct __pmsyncpkg_t PM_SYNCPKG; +typedef struct __pmdepmissing_t PM_DEPMISS; +typedef struct __pmconflict_t PM_CONFLICT; + +#define pacman_list_first pacman_list_begin +#define pacman_list_next pacman_list_iterator_next +#define pacman_list_getdata pacman_list_iterator_getdata + +#endif /* PACMAN_NO_COMPAT */ + #ifdef __cplusplus } #endif _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
