Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions amx/amx.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,13 @@ typedef int (AMXAPI *AMX_IDLE)(struct tagAMX *amx, int AMXAPI Exec(struct tagAMX
#pragma warning(disable:4103) /* disable warning message 4103 that complains about pragma pack in a header file */
#pragma warning(disable:4127) /* "conditional expression is constant" (needed for static_assert) */
#pragma warning(disable:4996) /* POSIX name is deprecated */
#elif defined __GNUC__
#elif defined __clang__
#pragma GCC diagnostic ignored "-Wlogical-op-parentheses"
#pragma GCC diagnostic ignored "-Wbitwise-op-parentheses"
#pragma clang diagnostic ignored "-Wlogical-op-parentheses"
#pragma clang diagnostic ignored "-Wbitwise-op-parentheses"
#pragma clang diagnostic ignored "-Wint-to-pointer-cast"
#elif defined __GNUC__
#pragma GCC diagnostic ignored "-Wint-to-pointer-cast"
#pragma GCC diagnostic ignored "-Wpointer-to-int-cast"
#endif

/* Some compilers do not support the #pragma align, which should be fine. Some
Expand Down Expand Up @@ -380,7 +383,7 @@ enum {
AMX_ERR_PARAMS, /* parameter error */
AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */
AMX_ERR_GENERAL, /* general error (unknown or unspecific error) */
AMX_ERR_OVERLAY, /* overlays are unsupported (JIT) or uninitialized */
AMX_ERR_OVERLAY /* overlays are unsupported (JIT) or uninitialized */
};

#define AMX_FLAG_OVERLAY 0x01 /* all function calls use overlays */
Expand Down
2 changes: 1 addition & 1 deletion amx/amxfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
#define _tgetenv getenv
#define _tremove remove
#define _trename rename
#if defined __APPLE__
#if defined __LINUX__ || defined __FreeBSD__ || defined __OpenBSD__ || defined MACOS || defined __APPLE__
#define _tmkdir mkdir
#define _trmdir rmdir
#define _tstat stat
Expand Down
3 changes: 3 additions & 0 deletions amx/minIni.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@
#if !defined _totupper
#define _totupper toupper
#endif
#if !defined toupper
#define toupper(c) ( (c)>='A' && (c)<='Z' ? (c) + 'A' - 'a' : (c) )
#endif

#if !defined INI_LINETERM
#if defined __LINUX__ || defined __FreeBSD__ || defined __OpenBSD__ || defined __APPLE__
Expand Down
22 changes: 12 additions & 10 deletions compiler/sc1.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <assert.h>
#include <ctype.h>
#include <limits.h>
#include <process.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
Expand All @@ -37,6 +36,7 @@
#if defined __WIN32__ || defined _WIN32 || defined __MSDOS__
#include <conio.h>
#include <io.h>
#include <process.h>
#endif
#if defined __GNUC__ || defined __clang__
#include <unistd.h>
Expand Down Expand Up @@ -638,15 +638,17 @@ int pc_compile(int argc, char *argv[])
make_report(&glbtab,frep,get_sourcefile(0),&makestategraph);
fclose(frep);
} /* if */
if (makestategraph) {
/* run stategraph to create a dot file */
char dotname[_MAX_PATH];
char pgmname[_MAX_PATH];
strcpy(dotname,reportname);
set_extension(dotname,".dot",TRUE);
sprintf(pgmname,"%s%cstategraph.exe",sc_binpath,DIRSEP_CHAR);
spawnl(P_WAIT,pgmname,pgmname,reportname,dotname,NULL);
}
#if defined __WIN32__ || defined _WIN32 || defined __MSDOS__
if (makestategraph) {
/* run stategraph to create a dot file */
char dotname[_MAX_PATH];
char pgmname[_MAX_PATH];
strcpy(dotname,reportname);
set_extension(dotname,".dot",TRUE);
sprintf(pgmname,"%s%cstategraph.exe",sc_binpath,DIRSEP_CHAR);
spawnl(P_WAIT,pgmname,pgmname,reportname,dotname,NULL);
}
#endif
} /* if */
if (pc_globaldoc!=NULL) {
free(pc_globaldoc);
Expand Down