summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@jsg.id.au>2014-08-31 03:43:18 +1000
committerEmil Velikov <emil.l.velikov@gmail.com>2014-09-05 14:17:34 +0100
commitd3dee3df97e05f86792a1591a023f66ca195fb1c (patch)
treec0e800c81107b40607bda805e53ccbf1505e0d99
parent8bcd57a46ce9d4a960253fd89ad21bd3e1776f8b (diff)
st/xvmc/tests: avoid non portable error.h functions
To improve compatibility with OpenBSD. Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
-rw-r--r--src/gallium/state_trackers/xvmc/tests/test_blocks.c6
-rw-r--r--src/gallium/state_trackers/xvmc/tests/test_context.c6
-rw-r--r--src/gallium/state_trackers/xvmc/tests/test_rendering.c13
-rw-r--r--src/gallium/state_trackers/xvmc/tests/test_subpicture.c4
-rw-r--r--src/gallium/state_trackers/xvmc/tests/test_surface.c6
5 files changed, 22 insertions, 13 deletions
diff --git a/src/gallium/state_trackers/xvmc/tests/test_blocks.c b/src/gallium/state_trackers/xvmc/tests/test_blocks.c
index 0baed19a6e..a35838f330 100644
--- a/src/gallium/state_trackers/xvmc/tests/test_blocks.c
+++ b/src/gallium/state_trackers/xvmc/tests/test_blocks.c
@@ -26,7 +26,8 @@
**************************************************************************/
#include <assert.h>
-#include <error.h>
+#include <stdio.h>
+#include <stdlib.h>
#include "testlib.h"
int main(int argc, char **argv)
@@ -62,7 +63,8 @@ int main(int argc, char **argv)
))
{
XCloseDisplay(display);
- error(1, 0, "Error, unable to find a good port.\n");
+ fprintf(stderr, "Error, unable to find a good port.\n");
+ exit(1);
}
if (is_overlay)
diff --git a/src/gallium/state_trackers/xvmc/tests/test_context.c b/src/gallium/state_trackers/xvmc/tests/test_context.c
index 1b9b040679..344ac76dec 100644
--- a/src/gallium/state_trackers/xvmc/tests/test_context.c
+++ b/src/gallium/state_trackers/xvmc/tests/test_context.c
@@ -26,7 +26,8 @@
**************************************************************************/
#include <assert.h>
-#include <error.h>
+#include <stdio.h>
+#include <stdlib.h>
#include "testlib.h"
int main(int argc, char **argv)
@@ -58,7 +59,8 @@ int main(int argc, char **argv)
))
{
XCloseDisplay(display);
- error(1, 0, "Error, unable to find a good port.\n");
+ fprintf(stderr, "Error, unable to find a good port.\n");
+ exit(1);
}
if (is_overlay)
diff --git a/src/gallium/state_trackers/xvmc/tests/test_rendering.c b/src/gallium/state_trackers/xvmc/tests/test_rendering.c
index 5bfbea726b..b3b3794810 100644
--- a/src/gallium/state_trackers/xvmc/tests/test_rendering.c
+++ b/src/gallium/state_trackers/xvmc/tests/test_rendering.c
@@ -28,7 +28,7 @@
#include <assert.h>
#include <stdio.h>
#include <string.h>
-#include <error.h>
+#include <stdlib.h>
#include "testlib.h"
#define BLOCK_WIDTH 8
@@ -84,9 +84,9 @@ static void ParseArgs(int argc, char **argv, unsigned int *output_width, unsigne
}
if (fail)
- error
- (
- 1, 0,
+ {
+ fprintf(
+ stderr,
"Bad argument.\n"
"\n"
"Usage: %s [options]\n"
@@ -96,6 +96,8 @@ static void ParseArgs(int argc, char **argv, unsigned int *output_width, unsigne
"\t-p\tPrompt for quit\n",
argv[0]
);
+ exit(1);
+ }
}
static void Gradient(short *block, unsigned int start, unsigned int stop, int horizontal, unsigned int intra_unsigned)
@@ -166,7 +168,8 @@ int main(int argc, char **argv)
))
{
XCloseDisplay(display);
- error(1, 0, "Error, unable to find a good port.\n");
+ fprintf(stderr, "Error, unable to find a good port.\n");
+ exit(1);
}
if (is_overlay)
diff --git a/src/gallium/state_trackers/xvmc/tests/test_subpicture.c b/src/gallium/state_trackers/xvmc/tests/test_subpicture.c
index ae0bc8b5a7..57ba1c7513 100644
--- a/src/gallium/state_trackers/xvmc/tests/test_subpicture.c
+++ b/src/gallium/state_trackers/xvmc/tests/test_subpicture.c
@@ -26,7 +26,6 @@
**************************************************************************/
#include <assert.h>
-#include <error.h>
#include <stdio.h>
#include <stdlib.h>
#include "testlib.h"
@@ -87,7 +86,8 @@ int main(int argc, char **argv)
))
{
XCloseDisplay(display);
- error(1, 0, "Error, unable to find a good port.\n");
+ fprintf(stderr, "Error, unable to find a good port.\n");
+ exit(1);
}
if (is_overlay)
diff --git a/src/gallium/state_trackers/xvmc/tests/test_surface.c b/src/gallium/state_trackers/xvmc/tests/test_surface.c
index 8145686a0e..964ca82c50 100644
--- a/src/gallium/state_trackers/xvmc/tests/test_surface.c
+++ b/src/gallium/state_trackers/xvmc/tests/test_surface.c
@@ -26,7 +26,8 @@
**************************************************************************/
#include <assert.h>
-#include <error.h>
+#include <stdio.h>
+#include <stdlib.h>
#include "testlib.h"
int main(int argc, char **argv)
@@ -59,7 +60,8 @@ int main(int argc, char **argv)
))
{
XCloseDisplay(display);
- error(1, 0, "Error, unable to find a good port.\n");
+ fprintf(stderr, "Error, unable to find a good port.\n");
+ exit(1);
}
if (is_overlay)