[gnumeric] OpenBSD: work around powerof2 macro in system headers.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] OpenBSD: work around powerof2 macro in system headers.
- Date: Mon, 27 Jun 2011 13:07:43 +0000 (UTC)
commit 0dc2eece10cbd4d4afe69f42ff42ade5cbed3504
Author: Morten Welinder <terra gnome org>
Date: Mon Jun 27 09:07:13 2011 -0400
OpenBSD: work around powerof2 macro in system headers.
src/dialogs/dialog-preferences.c | 6 +++---
src/sheet.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/dialogs/dialog-preferences.c b/src/dialogs/dialog-preferences.c
index 5d047d7..4b40d0e 100644
--- a/src/dialogs/dialog-preferences.c
+++ b/src/dialogs/dialog-preferences.c
@@ -378,7 +378,7 @@ int_pref_create_widget (GOConfNode *node, GtkWidget *table,
}
static gboolean
-powerof2 (int i)
+powerof_2 (int i)
{
return i > 0 && (i & (i - 1)) == 0;
}
@@ -388,9 +388,9 @@ cb_power_of_2 (GtkAdjustment *adj)
{
int val = (int)gtk_adjustment_get_value (adj);
- if (powerof2 (val - 1))
+ if (powerof_2 (val - 1))
gtk_adjustment_set_value (adj, (val - 1) * 2);
- else if (powerof2 (val + 1))
+ else if (powerof_2 (val + 1))
gtk_adjustment_set_value (adj, (val + 1) / 2);
}
diff --git a/src/sheet.c b/src/sheet.c
index 32ec828..9d786c2 100644
--- a/src/sheet.c
+++ b/src/sheet.c
@@ -1078,7 +1078,7 @@ gnm_sheet_visibility_get_type (void)
/* ------------------------------------------------------------------------- */
static gboolean
-powerof2 (int i)
+powerof_2 (int i)
{
return i > 0 && (i & (i - 1)) == 0;
}
@@ -1088,10 +1088,10 @@ gnm_sheet_valid_size (int cols, int rows)
{
return (cols >= GNM_MIN_COLS &&
cols <= GNM_MAX_COLS &&
- powerof2 (cols) &&
+ powerof_2 (cols) &&
rows >= GNM_MIN_ROWS &&
rows <= GNM_MAX_ROWS &&
- powerof2 (rows)
+ powerof_2 (rows)
#if 0
&& 0x80000000u / (unsigned)(cols / 2) >= (unsigned)rows
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]