From abff6d226a55f3453b085c0d920e02973b971743 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 17 Dec 2010 14:49:40 +0000 Subject: 2010-12-17 Joel Sherrill Jennifer Averett Add RTEMS Scheduler Simulator. This is the shell scripting portion. * .cvsignore, ChangeLog, Makefile.am, schedsim_priority/.cvsignore, schedsim_priority/Makefile.am, schedsim_priority/config.c, schedsim_priority/printheir_executing.c, schedsim_priority/schedsim.cc, schedsim_priority/wrap_thread_dispatch.c, scripts/script01, scripts/script02, scripts/script03, scripts/script04, scripts/script05, scripts/script06, shared/.cvsignore, shared/Makefile.am, shared/commands.c, shared/getopt.c, shared/lookup_semaphore.c, shared/lookup_task.c, shared/main_clocktick.c, shared/main_echo.c, shared/main_executing.c, shared/main_heir.c, shared/main_help.c, shared/main_rtemsinit.c, shared/main_semcreate.c, shared/main_semdelete.c, shared/main_semflush.c, shared/main_semobtain.c, shared/main_semrelease.c, shared/main_taskcreate.c, shared/main_taskdelete.c, shared/main_taskmode.c, shared/main_taskpriority.c, shared/main_taskresume.c, shared/main_tasksuspend.c, shared/main_taskwakeafter.c, shared/schedsim_shell.h, shared/shell_cmdset.c, shared/shell_makeargs.c, shared/include/shell.h, shared/include/newlib/_ansi.h, shared/include/newlib/getopt.h: New files. --- tools/schedsim/shell/shared/include/newlib/_ansi.h | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 tools/schedsim/shell/shared/include/newlib/_ansi.h (limited to 'tools/schedsim/shell/shared/include/newlib/_ansi.h') diff --git a/tools/schedsim/shell/shared/include/newlib/_ansi.h b/tools/schedsim/shell/shared/include/newlib/_ansi.h new file mode 100644 index 0000000000..c52ba606d9 --- /dev/null +++ b/tools/schedsim/shell/shared/include/newlib/_ansi.h @@ -0,0 +1,99 @@ +/* Provide support for both ANSI and non-ANSI environments. */ + +/* Some ANSI environments are "broken" in the sense that __STDC__ cannot be + relied upon to have it's intended meaning. Therefore we must use our own + concoction: _HAVE_STDC. Always use _HAVE_STDC instead of __STDC__ in newlib + sources! + + To get a strict ANSI C environment, define macro __STRICT_ANSI__. This will + "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header + files aren't affected). */ + +#ifndef _ANSIDECL_H_ +#define _ANSIDECL_H_ + +/* #include */ +/* #include */ + +/* First try to figure out whether we really are in an ANSI C environment. */ +/* FIXME: This probably needs some work. Perhaps sys/config.h can be + prevailed upon to give us a clue. */ + +#ifdef __STDC__ +#define _HAVE_STDC +#endif + +#ifdef _HAVE_STDC +#define _PTR void * +#define _AND , +#define _NOARGS void +#define _CONST const +#define _VOLATILE volatile +#define _SIGNED signed +#define _DOTS , ... +#define _VOID void +#ifdef __CYGWIN__ +#define _EXFUN(name, proto) __cdecl name proto +#define _EXPARM(name, proto) (* __cdecl name) proto +#else +#define _EXFUN(name, proto) name proto +#define _EXPARM(name, proto) (* name) proto +#endif +#define _DEFUN(name, arglist, args) name(args) +#define _DEFUN_VOID(name) name(_NOARGS) +#define _CAST_VOID (void) +#ifndef _LONG_DOUBLE +#define _LONG_DOUBLE long double +#endif +#ifndef _LONG_LONG +#define _LONG_LONG long long +#endif +#ifndef _PARAMS +#define _PARAMS(paramlist) paramlist +#endif +#else +#define _PTR char * +#define _AND ; +#define _NOARGS +#define _CONST +#define _VOLATILE +#define _SIGNED +#define _DOTS +#define _VOID void +#define _EXFUN(name, proto) name() +#define _DEFUN(name, arglist, args) name arglist args; +#define _DEFUN_VOID(name) name() +#define _CAST_VOID +#define _LONG_DOUBLE double +#define _LONG_LONG long +#ifndef _PARAMS +#define _PARAMS(paramlist) () +#endif +#endif + +/* Support gcc's __attribute__ facility. */ + +#ifdef __GNUC__ +#define _ATTRIBUTE(attrs) __attribute__ (attrs) +#else +#define _ATTRIBUTE(attrs) +#endif + +/* ISO C++. */ + +#ifdef __cplusplus +#if !(defined(_BEGIN_STD_C) && defined(_END_STD_C)) +#ifdef _HAVE_STD_CXX +#define _BEGIN_STD_C namespace std { extern "C" { +#define _END_STD_C } } +#else +#define _BEGIN_STD_C extern "C" { +#define _END_STD_C } +#endif +#endif +#else +#define _BEGIN_STD_C +#define _END_STD_C +#endif + +#endif /* _ANSIDECL_H_ */ -- cgit v1.2.3