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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [builtins/] [lib/] [fprintf.c] - Blame information for rev 688

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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