OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [builtins/] [lib/] [printf.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
#include <stdio.h>
2
#include <stdarg.h>
3
extern void abort (void);
4
extern int inside_main;
5
 
6
int
7
printf (const char *string, ...)
8
{
9
  va_list ap;
10
  int r;
11
#ifdef __OPTIMIZE__
12
  if (inside_main)
13
    abort();
14
#endif
15
  va_start (ap, string);
16
  r = vprintf (string, ap);
17
  va_end (ap);
18
  return r;
19
}
20
 
21
 
22
/* Locking stdio doesn't matter for the purposes of this test.  */
23
int
24
printf_unlocked (const char *string, ...)
25
{
26
  va_list ap;
27
  int r;
28
#ifdef __OPTIMIZE__
29
  if (inside_main)
30
    abort();
31
#endif
32
  va_start (ap, string);
33
  r = vprintf (string, ap);
34
  va_end (ap);
35
  return r;
36
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.