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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [port/] [port.h] - Diff between revs 1528 and 1748

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 1528 Rev 1748
Line 1... Line 1...
#ifndef __STRNDUP__
/* port.h -- Portability interface header
#define __STRNDUP__
 
 
 
#include <stdlib.h>
   Copyright (C) 1999 Damjan Lampret, lampret@opencores.org
 
   Copyright (C) 2008 Embecosm Limited
 
 
#if !defined(HAVE_STRNDUP)
   Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
char * strndup (const char *s, size_t n);
 
 
   This file is part of OpenRISC 1000 Architectural Simulator.
 
 
 
   This program is free software; you can redistribute it and/or modify it
 
   under the terms of the GNU General Public License as published by the Free
 
   Software Foundation; either version 3 of the License, or (at your option)
 
   any later version.
 
 
 
   This program is distributed in the hope that it will be useful, but WITHOUT
 
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 
   more details.
 
 
 
   You should have received a copy of the GNU General Public License along
 
   with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 
 
/* This program is commented throughout in a fashion suitable for processing
 
   with Doxygen. */
 
 
 
 
 
#ifndef PORT__H
 
#define PORT__H
 
 
 
/* System includes */
 
#include <string.h>
 
#include <ctype.h>
 
 
 
#ifdef HAVE_INTTYPES_H
 
#include <inttypes.h>
#endif
#endif
 
 
 
 
 
/* Substitute strndup () if necessary */
 
#ifndef HAVE_STRNDUP
 
char * strndup (const char *s, size_t n);
#endif
#endif
 
 
 
/* Substitute isblank () if necessary */
#ifndef HAVE_ISBLANK
#ifndef HAVE_ISBLANK
int isblank(int c);
int isblank(int c);
#endif
#endif
 
 
 
/* Substitute all the inttypes fields that are missing */
 
 
#ifndef PRIx32
#ifndef PRIx32
# if SIZEOF_INT == 4
# if SIZEOF_INT == 4
#  define PRIx32 "x"
#  define PRIx32 "x"
# elif SIZEOF_LONG == 4
# elif SIZEOF_LONG == 4
#  define PRIx32 "lx"
#  define PRIx32 "lx"
Line 105... Line 140...
# if SIZEOF_CHAR == 1
# if SIZEOF_CHAR == 1
typedef signed char int8_t;
typedef signed char int8_t;
# endif
# endif
#endif
#endif
 
 
 No newline at end of file
 No newline at end of file
 
 
 
#endif  /* PORT__H */
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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