[babl] babl-verify: fix win32 compile, with s/setenv/putenv/g
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] babl-verify: fix win32 compile, with s/setenv/putenv/g
- Date: Wed, 23 Nov 2016 21:25:31 +0000 (UTC)
commit 6cc3c3e1ce30bdb84742d35f4163212e1723f984
Author: Edward E <develinthedetail gmail com>
Date: Wed Nov 23 14:35:39 2016 -0600
babl-verify: fix win32 compile, with s/setenv/putenv/g
Wouldn't compile on windows because putenv() takes 1 arg, not 2.
Win32 has no setenv(), pippin said try using putenv() on all platforms.
tools/babl-verify.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/tools/babl-verify.c b/tools/babl-verify.c
index 3e2a7e4..80174db 100644
--- a/tools/babl-verify.c
+++ b/tools/babl-verify.c
@@ -2,10 +2,6 @@
#include <stdlib.h>
#include "babl/babl.h"
-#ifdef _WIN32
-#define setenv(a,b,c) putenv((a),(b))
-#endif
-
int main (int argc, char **argv)
{
if (argc != 3)
@@ -13,8 +9,8 @@ int main (int argc, char **argv)
fprintf (stderr, "need two args, from and to babl-formats\n");
return -1;
}
- setenv ("BABL_DEBUG_CONVERSIONS", "1", 0);
- setenv ("BABL_TOLERANCE", "100000.0", 0);
+ putenv ("BABL_DEBUG_CONVERSIONS" "=" "1");
+ putenv ("BABL_TOLERANCE" "=" "100000.0");
babl_init ();
babl_fish (babl_format(argv[1]), babl_format (argv[2]));
babl_exit ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]