# endif
# define mach_type_known
# endif
+# if defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__)
+# define NIOS2 /* Altera NIOS2 */
+# define mach_type_known
+# endif
# if defined(__or1k__)
# define OR1K /* OpenRISC/or1k */
# define mach_type_known
# endif
# endif
+# ifdef NIOS2
+# define CPP_WORDSZ 32
+# define MACH_TYPE "NIOS2"
+# ifdef LINUX
+# define OS_TYPE "LINUX"
+# define DYNAMIC_LOADING
+ extern int _end[];
+ extern int __data_start[];
+# define DATASTART ((ptr_t)(__data_start))
+# define DATAEND ((ptr_t)(_end))
+# define ALIGNMENT 4
+# ifndef HBLKSIZE
+# define HBLKSIZE 4096
+# endif
+# define LINUX_STACKBOTTOM
+# endif /* Linux */
+# endif
+
# ifdef OR1K
# define CPP_WORDSZ 32
# define MACH_TYPE "OR1K"
#if ((defined(UNIX_LIKE) && (defined(DARWIN) || defined(HURD) \
|| defined(OPENBSD) || defined(ARM32) \
|| defined(MIPS) || defined(AVR32) \
- || defined(OR1K))) \
+ || defined(OR1K) || defined(NIOS2))) \
|| (defined(LINUX) && !defined(__gnu_linux__)) \
|| (defined(RTEMS) && defined(I386)) || defined(PLATFORM_ANDROID)) \
&& !defined(NO_GETCONTEXT)