mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
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>
This commit is contained in:
parent
8bcd57a46c
commit
d3dee3df97
5 changed files with 22 additions and 13 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue