check-error.c 1.44 KB
Newer Older
1 2 3 4 5 6 7 8
/*
 * This work is part of the White Rabbit project
 *
 * Copyright (C) 2013 - 2015 CERN (www.cern.ch)
 * Author: Alessandro Rubini <rubini@gnudd.com>
 *
 * Released according to the GNU GPL, version 2 or any later version.
 */
9 10 11 12 13 14 15 16 17 18

/*
 * This file includes stuff we don't want to link, so if it is
 * called in error we get a clear error message, rather than a
 * "doesn't fit in ram" error
 */
#include <stdio.h>

extern void __you_should_not_call_printf_from_wrpc_sw(void);
extern void __you_should_not_divide_ll_in_wrpc_sw(void);
19 20
extern void __please_call_pp_printf_not_mprintf(void);
int mprintf(const char *fmt, ...);
21

22 23
long long __moddi3 (long long A, long long B);
long long __divdi3 (long long A, long long B);
24
long long __udivdi3 (long long A, long long B);
25

26 27 28 29 30 31
int printf(const char *fmt, ...)
{
	__you_should_not_call_printf_from_wrpc_sw();
	return 0;
}

32 33 34 35 36 37 38

int mprintf(const char *fmt, ...)
{
	__please_call_pp_printf_not_mprintf();
	return 0;
}

39 40 41 42 43 44 45 46
#ifdef CONFIG_PPSI /* with ppsi we can avoid libgcc code for division */
/* was used twice in picos_to_ts  */
long long __moddi3 (long long A, long long B)
{
	__you_should_not_divide_ll_in_wrpc_sw();
	return 0;
}

47 48 49 50 51 52 53
/* picos_to_ts again */
long long __udivdi3 (long long A, long long B)
{
	__you_should_not_divide_ll_in_wrpc_sw();
	return 0;
}

54 55 56 57 58 59 60
/* was used in set_phase_shift, phase_to_cf_units */
long long __divdi3 (long long A, long long B)
{
	__you_should_not_divide_ll_in_wrpc_sw();
	return 0;
}
#endif /* config_ppsi */