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/] [fputs-lib.c] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
#include <stdio.h>
2
#include <stddef.h>
3
extern void abort (void);
4
extern int inside_main;
5
extern size_t strlen(const char *);
6
int
7
fputs(const char *string, FILE *stream)
8
{
9
  size_t n = strlen(string);
10
  size_t r;
11
#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
12
  if (inside_main)
13
    abort();
14
#endif
15
  r = fwrite (string, 1, n, stream);
16
  return n > r ? EOF : 0;
17
}
18
 
19
/* Locking stdio doesn't matter for the purposes of this test.  */
20
int
21
fputs_unlocked(const char *string, FILE *stream)
22
{
23
  return fputs (string, stream);
24
}

powered by: WebSVN 2.1.0

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