WIN32: fix roken build
__declspec not _declspec Include "err.h" not <err.h> Include "roken.h" before "err.h" Indent "#if" as "# if" within roken.h.in when CPP rules must be copied into the generated "roken.h". Correct verr() attribute to be ROKEN_LIB_NORETURN_FUNCTION. Change-Id: I4289ecaba4a097175b4a5a1cde529b59038c72e3
This commit is contained in:
@@ -33,9 +33,10 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#include "roken.h"
|
||||||
#include "err.h"
|
#include "err.h"
|
||||||
|
|
||||||
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
|
ROKEN_LIB_NORETURN_FUNCTION void ROKEN_LIB_CALL
|
||||||
err(int eval, const char *fmt, ...)
|
err(int eval, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
@@ -51,7 +51,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#ifndef ROKEN_LIB_NORETURN_FUNCTION
|
#ifndef ROKEN_LIB_NORETURN_FUNCTION
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define ROKEN_LIB_NORETURN_FUNCTION _declspec(noreturn)
|
#define ROKEN_LIB_NORETURN_FUNCTION __declspec(noreturn)
|
||||||
#else
|
#else
|
||||||
#define ROKEN_LIB_NORETURN_FUNCTION
|
#define ROKEN_LIB_NORETURN_FUNCTION
|
||||||
#endif
|
#endif
|
||||||
|
@@ -32,11 +32,11 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(_WIN32) && _MSC_VER >= 1400
|
# if defined(_WIN32) && _MSC_VER >= 1400
|
||||||
/* _CRT_RAND_S must be defined before including stdlib.h */
|
/* _CRT_RAND_S must be defined before including stdlib.h */
|
||||||
# define _CRT_RAND_S
|
# define _CRT_RAND_S
|
||||||
# define HAVE_WIN32_RAND_S 1
|
# define HAVE_WIN32_RAND_S 1
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
# ifdef ROKEN_LIB_DYNAMIC
|
# ifdef ROKEN_LIB_DYNAMIC
|
||||||
# define ROKEN_LIB_NORETURN_FUNCTION __declspec(dllimport noreturn)
|
# define ROKEN_LIB_NORETURN_FUNCTION __declspec(dllimport noreturn)
|
||||||
# else
|
# else
|
||||||
# define ROKEN_LIB_NORETURN_FUNCTION _declspec(noreturn)
|
# define ROKEN_LIB_NORETURN_FUNCTION __declspec(noreturn)
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# define ROKEN_LIB_NORETURN_FUNCTION
|
# define ROKEN_LIB_NORETURN_FUNCTION
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
#include "roken.h"
|
#include "roken.h"
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
|
|
||||||
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
|
ROKEN_LIB_NORETURN_FUNCTION void ROKEN_LIB_CALL
|
||||||
verr(int eval, const char *fmt, va_list ap)
|
verr(int eval, const char *fmt, va_list ap)
|
||||||
{
|
{
|
||||||
rk_warnerr(1, fmt, ap);
|
rk_warnerr(1, fmt, ap);
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#include "roken.h"
|
||||||
#include "err.h"
|
#include "err.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Reference in New Issue
Block a user