glsl/standalone_scaffolding: Add stub for _mesa_warning()

A subsequent patch will add mesa/main/imports.c as a dependency to the
compiler, which in turn requires that _mesa_warning() be defined.

The real definition of _mesa_warning() is in mesa/main/errors.c, but to
pull that file into the standalone scaffolding would require transitively
pulling in the dispatch tables.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Paul Berry <stereotype441@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
This commit is contained in:
Chad Versace
2013-01-16 12:56:34 -08:00
parent ee5921ad0d
commit 1fafd00839
2 changed files with 21 additions and 0 deletions
+18
View File
@@ -33,6 +33,24 @@
#include <string.h>
#include "ralloc.h"
void
_mesa_warning(struct gl_context *ctx, const char *fmt, ...)
{
va_list vargs;
(void) ctx;
va_start(vargs, fmt);
/* This output is not thread-safe, but that's good enough for the
* standalone compiler.
*/
fprintf(stderr, "Mesa warning: ");
vfprintf(stderr, fmt, vargs);
fprintf(stderr, "\n");
va_end(vargs);
}
void
_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
struct gl_shader *sh)
+3
View File
@@ -33,6 +33,9 @@
#include "main/mtypes.h"
extern "C" void
_mesa_warning(struct gl_context *ctx, const char *fmtString, ... );
extern "C" void
_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
struct gl_shader *sh);