diff --git a/src/xpdev/conwrap.c b/src/xpdev/conwrap.c
index 470b7b4f7cba549d1783433af5661fcf14329f35..e659b84d972abfe08d9dae4f0719380c670097f9 100644
--- a/src/xpdev/conwrap.c
+++ b/src/xpdev/conwrap.c
@@ -65,7 +65,7 @@ void _termios_reset(void)
 #if defined(__BORLANDC__)
         #pragma argsused
 #endif
-#ifndef __EMSCRIPTEN_major__
+#ifndef __EMSCRIPTEN__
 void _sighandler_stop(int sig)
 {
     /* clean up the terminal */
@@ -105,7 +105,7 @@ void _termios_setup(void)
     atexit(_termios_reset);
 
     /* install the Ctrl-Z handler */
-#ifndef __EMSCRIPTEN_major__
+#ifndef __EMSCRIPTEN__
     signal(SIGTSTP, _sighandler_stop);
 #endif
     signal(SIGCONT, _sighandler_cont);
diff --git a/src/xpdev/dat_file.c b/src/xpdev/dat_file.c
index c098a9f650d49fbc490f2be3ae50958576ae1cbb..9912843294c55864d2d9d51ddd4870ed02e48d2a 100644
--- a/src/xpdev/dat_file.c
+++ b/src/xpdev/dat_file.c
@@ -206,7 +206,7 @@ str_list_t dataCreateList(const str_list_t records[], const str_list_t columns,
 BOOL dataWriteFile(FILE* fp, const str_list_t records[], const str_list_t columns, const char* separator
 				   ,dataLineCreator_t lineCreator)
 {
-#ifdef __EMSCRIPTEN_major__
+#ifdef __EMSCRIPTEN__
 	fprintf(stderr, "%s not implemented.\n", __func__);
 	return FALSE;
 #else
diff --git a/src/xpdev/datewrap.c b/src/xpdev/datewrap.c
index 7f3f228f549589383ae4db44b76f17ce023abc09..f8b3c2f83bb964995e4cbf8b93a294dfdaac33e1 100644
--- a/src/xpdev/datewrap.c
+++ b/src/xpdev/datewrap.c
@@ -157,7 +157,7 @@ void gettime(struct time* nyt)
 
 #endif	/* !Borland */
 
-#if (!defined(__unix__)) || defined(__EMSCRIPTEN_major__)
+#if (!defined(__unix__)) || defined(__EMSCRIPTEN__)
 
 /****************************************************************************/
 /* Win32 implementations of the recursive (thread-safe) versions of std C	*/
diff --git a/src/xpdev/datewrap.h b/src/xpdev/datewrap.h
index e17b2afd0fb8659f1ecd53c02d111815d1412a79..6fcdc2551a09ec99e13190cf2b95ecef2bab4aa5 100644
--- a/src/xpdev/datewrap.h
+++ b/src/xpdev/datewrap.h
@@ -44,7 +44,7 @@ DLLEXPORT struct tm*	localtime32(const time32_t* t, struct tm* tm);
 /* Win32 implementations of recursive (thread-safe) std C time functions on Unix */
 /*********************************************************************************/
 
-#if (!defined(__unix__)) || defined(__EMSCRIPTEN_major__)
+#if (!defined(__unix__)) || defined(__EMSCRIPTEN__)
 
 	#include <time.h>		/* time_t, etc. */
 
@@ -60,7 +60,7 @@ DLLEXPORT struct tm*	localtime32(const time32_t* t, struct tm* tm);
 	#define timegm _mkgmtime
 #endif
 
-#if defined(__EMSCRIPTEN_major__)
+#if defined(__EMSCRIPTEN__)
 	#define timegm	mktime
 #endif
 
diff --git a/src/xpdev/dirwrap.c b/src/xpdev/dirwrap.c
index cc8cb2ca893029cae1ed666fa2eb8657a873159b..8629db7851d354950eb4f5b4b465c271e8b19868 100644
--- a/src/xpdev/dirwrap.c
+++ b/src/xpdev/dirwrap.c
@@ -814,7 +814,7 @@ int delfiles(const char *inpath, const char *spec, size_t keep)
 				errors++;
 			continue;
 		}
-#ifndef __EMSCRIPTEN_major__
+#ifndef __EMSCRIPTEN__
 		(void)CHMOD(fpath, S_IWRITE);	/* In case it's been marked RDONLY */
 #endif
 		if(remove(fpath)==0)
@@ -1220,7 +1220,7 @@ int mkpath(const char* path)
 #if !defined _WIN32
 BOOL CopyFile(const char* src, const char* dest, BOOL failIfExists)
 {
-#ifdef __EMSCRIPTEN_major__
+#ifdef __EMSCRIPTEN__
 	fprintf(stderr, "%s not implemented\n", __func__);
 	return FALSE;
 #else
diff --git a/src/xpdev/filewrap.c b/src/xpdev/filewrap.c
index 82c71d2f9ffae5ba408a739b3272d46bd1bd8048..22afcba36b0698d8665faa221ebe444020cf6419 100644
--- a/src/xpdev/filewrap.c
+++ b/src/xpdev/filewrap.c
@@ -371,7 +371,7 @@ long getdelim(char **linep, size_t *linecapp, int delimiter, FILE *stream)
 #ifdef __unix__
 FILE *_fsopen(const char *pszFilename, const char *pszMode, int shmode)
 {
-#ifdef __EMSCRIPTEN_major__
+#ifdef __EMSCRIPTEN__
 	fprintf(stderr, "%s not implemented\n", __func__);
 	return NULL;
 #else
diff --git a/src/xpdev/genwrap.c b/src/xpdev/genwrap.c
index a1969854a5472ea523d317a84d0ffc30ecc2fc7b..5116ce8a8572191f42962f6832fb070701a31ba0 100644
--- a/src/xpdev/genwrap.c
+++ b/src/xpdev/genwrap.c
@@ -983,7 +983,7 @@ uint64_t xp_timer64(void)
 /* Returns TRUE if specified process is running */
 BOOL check_pid(pid_t pid)
 {
-#ifdef __EMSCRIPTEN_major__
+#ifdef __EMSCRIPTEN__
 	fprintf(stderr, "%s not implemented", __func__);
 	return FALSE;
 #else
@@ -1009,7 +1009,7 @@ BOOL check_pid(pid_t pid)
 /* Terminate (unconditionally) the specified process */
 BOOL terminate_pid(pid_t pid)
 {
-#ifdef __EMSCRIPTEN_major__
+#ifdef __EMSCRIPTEN__
 	fprintf(stderr, "%s not implemented", __func__);
 	return FALSE;
 #else
@@ -1042,7 +1042,7 @@ char* safe_strerror(int errnum, char *buf, size_t buflen)
 
 #if defined(_MSC_VER)
 	strerror_s(buf, buflen, errnum);
-#elif defined(_WIN32) || defined(__EMSCRIPTEN_major__)
+#elif defined(_WIN32) || defined(__EMSCRIPTEN__)
 	strncpy(buf, strerror(errnum), buflen);
 	buf[buflen - 1] = 0;
 #elif defined(_GNU_SOURCE)
diff --git a/src/xpdev/genwrap.h b/src/xpdev/genwrap.h
index 8c238ec656ddfbea9837d0e4d7c7860cc01dee34..cb9b97d66ebd58d53d65c59faf047e9e57fef205 100644
--- a/src/xpdev/genwrap.h
+++ b/src/xpdev/genwrap.h
@@ -201,7 +201,7 @@ extern "C" {
 	#define ARCHITECTURE_DESC "ppc"
 #elif defined(_M_IA64) || defined(__ia64__)
 	#define ARCHITECTURE_DESC "ia64"
-#elif defined(__EMSCRIPTEN_major__)
+#elif defined(__EMSCRIPTEN__)
 	#define ARCHITECTURE_DESC "wasm"
 #else
 	#ifdef UNAME_ARCHITECTURE_DESC
diff --git a/src/xpdev/strwrap.c b/src/xpdev/strwrap.c
index f39df09641dedb41020a3996fc9951736f9988db..ba15a8437b9d2f4704b731bbcc6f7f48fb455225 100644
--- a/src/xpdev/strwrap.c
+++ b/src/xpdev/strwrap.c
@@ -76,7 +76,7 @@ strndup(const char *str, size_t maxlen)
 }
 #endif
 
-#if defined(__EMSCRIPTEN_major__)
+#if defined(__EMSCRIPTEN__)
 char *
 strdup(const char *str)
 {
diff --git a/src/xpdev/strwrap.h b/src/xpdev/strwrap.h
index 97d77bc82ef05e71618c39a771aeda772e8c8519..c4e6f62e0054f6f6cbd578b54ccc853276b9b27f 100644
--- a/src/xpdev/strwrap.h
+++ b/src/xpdev/strwrap.h
@@ -36,7 +36,7 @@ size_t strnlen(const char *s, size_t maxlen);
 #if defined(__cplusplus)
 extern "C" {
 #endif
-#if defined(__EMSCRIPTEN_major__)
+#if defined(__EMSCRIPTEN__)
 char * strdup(const char *str);
 char * strtok_r(char *str, const char *delim, char **saveptr);
 #endif
diff --git a/src/xpdev/xpbeep.c b/src/xpdev/xpbeep.c
index 8d9b13c899e58a98b4cdc3360f0a5804983ef189..d94d04673395e2e2a45d424d8a25d175ad69c7f9 100644
--- a/src/xpdev/xpbeep.c
+++ b/src/xpdev/xpbeep.c
@@ -13,7 +13,7 @@
 #elif defined(__unix__)
 	#include <fcntl.h>
 	#include <sys/ioctl.h>
-	#ifndef __EMSCRIPTEN_major__
+	#ifndef __EMSCRIPTEN__
 		#if SOUNDCARD_H_IN==1
 			#include <sys/soundcard.h>
 		#elif SOUNDCARD_H_IN==2
@@ -1198,7 +1198,7 @@ void unix_beep(int freq, int dur)
 	}
 #endif
 
-#if !defined(__GNU__) && !defined(__QNX__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(__HAIKU__) && !defined(__EMSCRIPTEN_major__)
+#if !defined(__GNU__) && !defined(__QNX__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(__HAIKU__) && !defined(__EMSCRIPTEN__)
 	if(console_fd == -1) 
   		console_fd = open("/dev/console", O_NOCTTY);