magic/utils
Darryl L. Miles 6b0bc5bbdc SunOS: FOPEN rename to magicFOPEN due to sys/file.h definition
Example build issue using SunOS Solaris solaris 5.11 11.4.42.111.0 i86pc i386
with gcc version 5.5.0 (GCC).

It turns out the definition is not used by the magic codebase.  So only the
macro name is changed by this commit.

This platform also has a definition for FREAD but the MacOS patch can be used
to rename that.

 In file included from DBio.c:51:0:
 ../utils/magic.h:141:0: warning: "FOPEN" redefined
      #define FOPEN    gzopen
  ^
 In file included from DBio.c:30:0:
 /usr/include/sys/file.h:74:0: note: this is the location of the previous definition
  #define FOPEN  0xffffffff
  ^

 In file included from DBio.c:51:0:
 ../utils/magic.h:144:0: warning: "FREAD" redefined
      #define FREAD(a,b,c,d)    gzread(d,a,b*c)
  ^
 In file included from DBio.c:30:0:
 /usr/include/sys/file.h:75:0: note: this is the location of the previous definition
  #define FREAD  0x01 /* <sys/aiocb.h> LIO_READ must be identical */
  ^
2025-07-29 10:50:32 -04:00
..
LIBdbio.c Added the ability to read compressed .mag files (writing is not yet 2022-11-02 17:12:46 -04:00
LIBmain.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
LIBtextio.c LIBtextio.c: printf style constify fmt call-site 2025-01-03 09:08:14 +00:00
Makefile Moved new work on magic-8.4 (experimental merging of micromagic bplane structure 2019-03-22 19:58:47 -04:00
args.c utils/*.c: K&R conversion to ANSI 2025-01-06 16:14:34 +00:00
child.c utils/*.c: K&R conversion to ANSI 2025-01-06 16:14:34 +00:00
displays.proto Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00
dqueue.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
dqueue.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
finddisp.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
flock.c utils/magic_zlib.h: limit #include <zlib.h> to files that need it 2025-07-29 10:50:32 -04:00
flsbuf.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
fraction.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
geofast.h header file #ifndef guard presence consistency 2025-07-29 10:50:32 -04:00
geometry.c utils/*.c: K&R conversion to ANSI 2025-01-06 16:14:34 +00:00
geometry.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
getrect.c 35 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
hash.c Revised some code from PR#352 in response to questions from Darryl 2024-12-26 15:29:54 -05:00
hash.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
heap.c hash.c: K&R conversion to ANSI and constify arguments / callback 2025-01-06 16:15:58 +00:00
heap.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
ihash.c ihash.c: cleanup warning use of void* with pointer arithmetic 2025-01-06 16:21:22 +00:00
ihash.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
list.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
list.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
lookup.c util/lookup*.c: fix integer pointer arithmetic not using pointertype 2024-12-26 15:20:58 -05:00
lookupany.c utils/lookup*.c: constify the API 2024-12-26 15:20:58 -05:00
lookupfull.c util/lookup*.c: fix integer pointer arithmetic not using pointertype 2024-12-26 15:20:58 -05:00
macros.c TCL9: ClientData macro assignment and access usage 2025-01-04 11:08:01 -05:00
macros.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
magic.h SunOS: FOPEN rename to magicFOPEN due to sys/file.h definition 2025-07-29 10:50:32 -04:00
magic_alloca.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
magic_assert.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
magic_stdbool.h C23: use AC_HEADER_STDBOOL #include <stdbool.h> 2025-07-26 17:44:45 -04:00
magic_zlib.h utils/magic_zlib.h: limit #include <zlib.h> to files that need it 2025-07-29 10:50:32 -04:00
magsgtty.h utils/magsgtty.h: detect termio/ioctl headers 2025-07-29 10:50:32 -04:00
main.c fix: add missing #include <unistd.h> 2025-07-28 21:28:24 -04:00
main.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
malloc.c quick and dirty emscripten port 2023-07-12 00:31:37 +09:00
malloc.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
match.c utils/*.c: K&R conversion to ANSI 2025-01-06 16:14:34 +00:00
maxrect.c Plane[GS]etHint() added to encapsulate access to Plane->pl_hint 2025-04-09 15:02:59 -04:00
maxrect.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
netlist.c netlist.c: whitespace only cleanup 2025-07-27 12:44:42 -04:00
netlist.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
niceabort.c niceabort.c: include <time.h> remove preC89 declarations 2025-07-29 10:50:32 -04:00
parser.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
parsetest.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
path.c utils/magic_zlib.h: limit #include <zlib.h> to files that need it 2025-07-29 10:50:32 -04:00
paths.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
pathvisit.c 35 x warning: suggest parentheses around assignment used as truth value 2024-10-09 21:12:55 -04:00
pathvisit.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
port.c utils/*.c: K&R conversion to ANSI 2025-01-06 16:14:34 +00:00
printstuff.c Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00
runstats.c Use HAVE_SYS_TIME_H and TIME_WITH_SYS_TIME from autoconf where possible 2025-07-27 12:43:04 -04:00
runstats.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
set.c utils/*.c: K&R conversion to ANSI 2025-01-06 16:14:34 +00:00
show.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
signals.c Use HAVE_SYS_TIME_H and TIME_WITH_SYS_TIME from autoconf where possible 2025-07-27 12:43:04 -04:00
signals.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
stack.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
stack.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
strdup.c utils/strdup.c: StrDup() and mode constifiy impl 2024-12-26 15:10:35 -05:00
styles.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
tech.c configuration: #ifdef ROUTE_MODULE 2025-07-26 17:48:31 -04:00
tech.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
touchingtypes.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
touchtypes.c Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
undo.c utils/undo.c: Wrong type of arguments to formatting function 2024-10-01 12:36:12 -04:00
undo.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00
utils.h header file #ifndef guard namespace consistency (global change) 2025-07-29 10:50:32 -04:00