Skip to content

Commit

Permalink
* replaced EUNIX with __unix
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn David Pringle, B.Sc committed Mar 30, 2024
1 parent 5ea0e8c commit 59d07e0
Show file tree
Hide file tree
Showing 21 changed files with 128 additions and 133 deletions.
7 changes: 1 addition & 6 deletions source/Makefile.gnu
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ ifeq "$(EMINGW)" "1"
else
EXE_EXT=
EPTHREAD=-pthread
EOSTYPE=-DEUNIX
EOSFLAGS=
EOSFLAGSCONSOLE=
EOSPCREFLAGS=
Expand Down Expand Up @@ -239,10 +238,6 @@ ifndef TESTFILE
COVERAGE_ERASE=-coverage-erase
endif

ifeq "$(ELINUX)" "1"
EBSDFLAG=-DELINUX
endif

# backwards compatibility
# don't make Unix users reconfigure for a MinGW-only change
ifndef CYPTRUNKDIR
Expand Down Expand Up @@ -481,7 +476,7 @@ BUILD_DIRS = \

clean :
-for f in $(BUILD_DIRS) ; do \
rm -r $${f} ; \
rm $${f}/*/*.o $${f}/*.o ; \
done ;
-rm -r $(BUILDDIR)/pcre
-rm -r $(BUILDDIR)/pcre_fpic
Expand Down
6 changes: 3 additions & 3 deletions source/be_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ void EFree(char *p)
}

#else
#if !defined(_WIN32) && !defined(EUNIX)
#if !defined(_WIN32) && !defined(__unix)
// Version of allocation routines for systems that might not return allocations
// that are 4-byte aligned.
char *EMalloc(unsigned long nbytes)
Expand Down Expand Up @@ -673,7 +673,7 @@ char *ERealloc(char *orig, uintptr_t newsize)

#endif

#ifndef EUNIX
#ifndef __unix
#ifndef _WIN32
#ifdef EXTRA_CHECK
#include <malloc.h>
Expand Down Expand Up @@ -716,7 +716,7 @@ int heap_dump(char *ptr)
}
#endif // EXTRA_CHECK
#endif // _WIN32
#endif // EUNIX
#endif // __unix

#ifndef ESIMPLE_MALLOC
char *ERealloc(char *orig, uintptr_t newsize)
Expand Down
6 changes: 3 additions & 3 deletions source/be_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ typedef struct block_list * block_list_ptr;
#endif

// Size of the usable space in an allocated block
#ifdef EUNIX
#ifdef __unix
#ifdef EBSD
#define block_size(p) 1 // length is not stored with the block
#else
Expand All @@ -155,7 +155,7 @@ typedef struct block_list * block_list_ptr;
#endif
#endif

#ifdef EUNIX
#ifdef __unix
#include <stdlib.h>
#endif
#if defined( ESIMPLE_MALLOC )
Expand Down Expand Up @@ -209,7 +209,7 @@ extern long copy_string(char *dest, char *src, size_t bufflen);
extern long append_string(char *dest, char *src, size_t bufflen);

extern void SpaceMessage()
#if defined(EUNIX) || defined(EMINGW)
#if defined(__unix) || defined(EMINGW)
__attribute__ ((noreturn))
#else
#pragma aux SpaceMessage aborts;
Expand Down
20 changes: 10 additions & 10 deletions source/be_execute.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ union pc_t {
: ((fp)->_cnt--,*(fp)->_ptr++))
#endif

#if defined(__WATCOMC__) || defined(EUNIX)
#if defined(__WATCOMC__) || defined(__unix)
// a bit faster:
# define mygetc(fp) \
((fp)->_cnt<=0 \
Expand Down Expand Up @@ -920,7 +920,7 @@ void threadpc3(void);
#endif
#endif // !defined(EMINGW)

#if defined(EUNIX) || defined(EMINGW)
#if defined(__unix) || defined(EMINGW)
// these GNU-based compilers support dynamic labels,
// so threading is much easier
#define thread() goto *((void *)*pc)
Expand Down Expand Up @@ -1053,7 +1053,7 @@ void InitExecute()
}

#ifndef INT_CODES
#if defined(EUNIX) || defined(EMINGW)
#if defined(__unix) || defined(EMINGW)
intptr_t **jumptab; // initialized in do_exec()
#else
#ifdef __WATCOMC__
Expand Down Expand Up @@ -1899,7 +1899,7 @@ void Execute(intptr_t *start_index)
}

#ifndef INT_CODES
#if defined(EUNIX) || defined(EMINGW)
#if defined(__unix) || defined(EMINGW)
// don't use switch/case - use special jump to label feature
#define case
#endif
Expand Down Expand Up @@ -1945,7 +1945,7 @@ void do_exec(intptr_t *start_pc)
object *block;
uintptr_t tuint;

#if defined(EUNIX) || defined(EMINGW)
#if defined(__unix) || defined(EMINGW)
#ifndef INT_CODES
static void *localjumptab[MAX_OPCODE] = {
&&L_LESS, &&L_GREATEREQ, &&L_EQUALS, &&L_NOTEQ, &&L_LESSEQ, &&L_GREATER,
Expand Down Expand Up @@ -2044,7 +2044,7 @@ void do_exec(intptr_t *start_pc)
#endif
#endif
if (start_pc == NULL) {
#if defined(EUNIX) || defined(EMINGW)
#if defined(__unix) || defined(EMINGW)
#ifndef INT_CODES
jumptab = (intptr_t **)localjumptab;
#endif
Expand Down Expand Up @@ -5040,15 +5040,15 @@ void do_exec(intptr_t *start_pc)
b = getKBchar();
}
else {
#ifdef EUNIX
#ifdef __unix
b = getc(last_r_file_ptr);
#else
b = mygetc(last_r_file_ptr);
#endif
}
}
else
#ifdef EUNIX
#ifdef __unix
b = getc(last_r_file_ptr);
#else
b = mygetc(last_r_file_ptr); /* don't use <a> ! */
Expand All @@ -5073,7 +5073,7 @@ void do_exec(intptr_t *start_pc)
deprintf("case L_PLATFORM:");
DeRef(*(object_ptr)pc[1]);
top = 1; // Unknown platform
#ifdef EUNIX
#ifdef __unix
top = 3; // (UNIX, called Linux for backwards compatibility)
#endif
#ifdef __FreeBSD__
Expand Down Expand Up @@ -5109,7 +5109,7 @@ void do_exec(intptr_t *start_pc)
}
top = MAKE_INT(get_key(FALSE));
if (top == ATOM_M1 && TraceOn) {
#ifdef EUNIX
#ifdef __unix
struct tms buf;
c0 = times(&buf) + 8 * clk_tck; // wait 8 real seconds
while (times(&buf)
Expand Down
2 changes: 1 addition & 1 deletion source/be_execute.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extern int il_file; /* we are processing a separate .il file */
extern intptr_t *tpc;

#ifndef INT_CODES
#if defined(EUNIX) || defined(EMINGW) || defined(EWATCOM)
#if defined(__unix) || defined(EMINGW) || defined(EWATCOM)
extern intptr_t **jumptab; // initialized in do_exec()
#else
#ifdef EWATCOM
Expand Down
Loading

0 comments on commit 59d07e0

Please sign in to comment.