Use #ifdef for BUILDOPT instead of #if

More prep for `-Werror=undef`. Ideally we'd actually have these be defined but
that seems painful with autotools; for a later date.

Closes: #1156
Approved by: jlebon
This commit is contained in:
Colin Walters 2017-12-15 10:07:22 -05:00 committed by Atomic Bot
parent 6d1918581b
commit 8d176e1f92
3 changed files with 4 additions and 4 deletions

View File

@ -366,7 +366,7 @@ rpmostree_context_new_system (OstreeRepo *repo,
* otherwise we keep calling _rpmostree_reset_rpm_sighandlers() in
* various places.
*/
#if BUILDOPT_HAVE_RPMSQ_SET_INTERRUPT_SAFETY
#ifdef BUILDOPT_HAVE_RPMSQ_SET_INTERRUPT_SAFETY
rpmsqSetInterruptSafety (FALSE);
#endif
@ -2452,7 +2452,7 @@ delete_package_from_root (RpmOstreeContext *self,
GCancellable *cancellable,
GError **error)
{
#if BUILDOPT_HAVE_RPMFILES /* use rpmfiles API if possible, rpmteFI is deprecated */
#ifdef BUILDOPT_HAVE_RPMFILES /* use rpmfiles API if possible, rpmteFI is deprecated */
g_auto(rpmfiles) files = rpmteFiles (pkg);
g_auto(rpmfi) fi = rpmfilesIter (files, RPMFI_ITER_FWD);
#else

View File

@ -923,7 +923,7 @@ rpmostree_sighandler_reset_cleanup (RpmSighandlerResetCleanup *cleanup)
/* Forcibly override rpm/librepo SIGINT handlers. We always operate
* in a fully idempotent/atomic mode, and can be killed at any time.
*/
#if !BUILDOPT_HAVE_RPMSQ_SET_INTERRUPT_SAFETY
#ifndef BUILDOPT_HAVE_RPMSQ_SET_INTERRUPT_SAFETY
signal (SIGINT, SIG_DFL);
signal (SIGTERM, SIG_DFL);
#endif

View File

@ -70,7 +70,7 @@ G_DEFINE_AUTO_CLEANUP_FREE_FUNC(Header, headerFree, NULL)
G_DEFINE_AUTO_CLEANUP_FREE_FUNC(rpmfi, rpmfiFree, NULL)
G_DEFINE_AUTO_CLEANUP_FREE_FUNC(rpmts, rpmtsFree, NULL)
G_DEFINE_AUTO_CLEANUP_FREE_FUNC(rpmdbMatchIterator, rpmdbFreeIterator, NULL)
#if BUILDOPT_HAVE_RPMFILES
#ifdef BUILDOPT_HAVE_RPMFILES
G_DEFINE_AUTO_CLEANUP_FREE_FUNC(rpmfiles, rpmfilesFree, NULL)
#endif