Moved the pipe definition out of the API, and use the system asprintf declaration when available
This commit is contained in:
parent
9c58e8d1e1
commit
9969604915
4 changed files with 15 additions and 5 deletions
|
@ -24,13 +24,21 @@
|
|||
#ifndef CRITERION_ASPRINTF_COMPAT_H_
|
||||
# define CRITERION_ASPRINTF_COMPAT_H_
|
||||
|
||||
# ifdef __UNIX__
|
||||
# define _GNU_SOURCE 1
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
# include <cstdarg>
|
||||
# else
|
||||
# include <stdarg.h>
|
||||
# endif
|
||||
|
||||
# include "common.h"
|
||||
# ifdef __UNIX__
|
||||
# include <stdio.h>
|
||||
# else
|
||||
|
||||
# include "common.h"
|
||||
|
||||
CR_BEGIN_C_API
|
||||
|
||||
|
@ -40,4 +48,6 @@ CR_API int vasprintf(char **strp, const char *fmt, va_list ap) CR_NOTHROW;
|
|||
|
||||
CR_END_C_API
|
||||
|
||||
# endif
|
||||
|
||||
#endif /* !CRITERION_ASPRINTF_COMPAT_H_ */
|
||||
|
|
|
@ -26,17 +26,13 @@
|
|||
|
||||
# ifdef __cplusplus
|
||||
# include <cstddef>
|
||||
# include <cstdio>
|
||||
# else
|
||||
# include <stddef.h>
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# include "common.h"
|
||||
|
||||
CR_BEGIN_C_API
|
||||
|
||||
extern FILE *g_event_pipe;
|
||||
|
||||
CR_API void send_event(int kind, void *data, size_t size);
|
||||
|
||||
CR_END_C_API
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
# define EVENT_H_
|
||||
|
||||
# include "criterion/event.h"
|
||||
# include <stdio.h>
|
||||
|
||||
extern FILE *g_event_pipe;
|
||||
|
||||
struct event {
|
||||
int kind;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
#include <stdbool.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <setjmp.h>
|
||||
#include <dyncall.h>
|
||||
#include <assert.h>
|
||||
|
|
Loading…
Add table
Reference in a new issue