-#ifndef PERL_SYS_TERM
-# define PERL_SYS_TERM() HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM
-#endif
-#define dXSUB_SYS
-
-/*
- * 5.003_07 and earlier keyed on #ifdef MSDOS for determining if we were
- * running on DOS, *and* if we had to cope with 16 bit memory addressing
- * constraints, *and* we need to have memory allocated as unsigned long.
- *
- * with the advent of *real* compilers for DOS, they are not locked together.
- * MSDOS means "I am running on MSDOS". HAS_64K_LIMIT means "I have
- * 16 bit memory addressing constraints".
- *
- * if you need the last, try #DEFINE MEM_SIZE unsigned long.
- */
-#ifdef MSDOS
-# ifndef DJGPP
-# define HAS_64K_LIMIT
-# endif
+#ifndef PERL_SYS_TERM_BODY
+# define PERL_SYS_TERM_BODY() \
+ HINTS_REFCNT_TERM; OP_CHECK_MUTEX_TERM; \
+ OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM; LOCALE_TERM;