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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr50723.c] - Rev 801

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

/* { dg-do compile } */
 
typedef short unsigned int wchar_t;
typedef unsigned int size_t;
int* _errno(void);
int WideCharToMultiByte (wchar_t *);
int __attribute__ ((__nonnull__ (1)))
__wcrtomb_cp (char *dst, wchar_t wc, const unsigned int cp,
	      const unsigned int mb_max)
{
  if (cp == 0)     {
      if (wc > 255) 
	(*_errno()) = 42;
      return 1;
  }
  else 
    return WideCharToMultiByte (&wc);
}
void wcsrtombs (char *dst, const wchar_t *pwc, unsigned int cp,
		unsigned int mb_max)
{
  if ((__wcrtomb_cp (dst, *pwc, cp, mb_max)) <= 0)
    return;
  if ((__wcrtomb_cp (dst, *pwc, cp, mb_max)) <= 0)
    return;
}
 

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

powered by: WebSVN 2.1.0

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