mirror of https://github.com/bebbo/amiga-gcc.git
refs #222: apply __stdargs to all clib/*protos.h
This commit is contained in:
parent
ce57d355fc
commit
ebed8dfa39
14
Makefile
14
Makefile
|
@ -676,6 +676,10 @@ $(BUILD)/ndk-include_ndk: $(BUILD)/ndk-include_ndk0 $(NDK_INCLUDE_INLINE) $(NDK_
|
|||
$(BUILD)/ndk-include_ndk0: projects/$(NDK_FOLDER_NAME).info $(NDK_INCLUDE) $(BUILD)/fd2sfd/_done $(BUILD)/fd2pragma/_done
|
||||
@mkdir -p $(PREFIX)/m68k-amigaos/ndk-include
|
||||
@rsync -a $(PWD)/projects/$(NDK_FOLDER_NAME_H)/* $(PREFIX)/m68k-amigaos/ndk-include --exclude proto --exclude inline
|
||||
$(L0)"STDARGing ndk"$(L1) for i in $$(find $(PREFIX)/m68k-amigaos/ndk-include/clib/*protos.h -type f); do \
|
||||
echo $$i; \
|
||||
LC_CTYPE=C sed -i.bak -E 's/([a-zA-Z0-9 _]*)([[:blank:]]+|\*)([a-zA-Z0-9_]+)\(/\1\2 __stdargs \3(/g' $$i; \
|
||||
rm $$i.bak; done $(L2)
|
||||
@rsync -a $(PWD)/projects/$(NDK_FOLDER_NAME_I)/* $(PREFIX)/m68k-amigaos/ndk-include
|
||||
@mkdir -p $(PREFIX)/m68k-amigaos/ndk/lib/fd
|
||||
@mkdir -p $(PREFIX)/m68k-amigaos/ndk/lib/sfd
|
||||
|
@ -729,10 +733,6 @@ projects/$(NDK_FOLDER_NAME).info: $(BUILD)/_lha_done download/$(NDK_ARC_NAME).lh
|
|||
if [[ "$$i" == *.diff ]] ; \
|
||||
then j=$${i:8}; patch -N "projects/$${j%.diff}" "$$i"; \
|
||||
else cp -pv "$$i" "projects/$${i:8}"; fi ; done $(L2)
|
||||
# $(L0)"STDARGing ndk"$(L1) for i in $$(find projects/$(NDK_FOLDER_NAME_H)/clib/*protos.h -type f); do \
|
||||
# echo $$i; \
|
||||
# LC_CTYPE=C sed -i.bak -E 's/([a-zA-Z0-9 _]*)([[:blank:]]+|\*)([a-zA-Z0-9_]+)\(/__stdargs \1\2\3(/g' $$i; \
|
||||
# rm $$i.bak; done $(L2)
|
||||
@touch projects/$(NDK_FOLDER_NAME).info
|
||||
|
||||
download/$(NDK_ARC_NAME).lha:
|
||||
|
@ -750,7 +750,7 @@ $(BUILD)/ndk-include_ndk13: $(BUILD)/ndk-include_ndk $(BUILD)/fd2sfd/_done $(BUI
|
|||
$(L0)"extract ndk13"$(L1) while read p; do p=$$(echo $$p|tr -d '\n'); \
|
||||
mkdir -p $(PREFIX)/m68k-amigaos/ndk13-include/$$(dirname $$p); \
|
||||
if grep V36 $(PREFIX)/m68k-amigaos/ndk-include/$$p; then \
|
||||
LC_CTYPE=C sed -n -e '/#ifndef[[:space:]]*CLIB/,/V36/p' $(PREFIX)/m68k-amigaos/ndk-include/$$p >$(PREFIX)/m68k-amigaos/ndk13-include/$$p; \
|
||||
LC_CTYPE=C sed -n -e '/#ifndef[[:space:]]*CLIB/,/V36/p' $(PREFIX)/m68k-amigaos/ndk-include/$$p | sed -e 's/__stdargs//g' >$(PREFIX)/m68k-amigaos/ndk13-include/$$p; \
|
||||
echo -e "#ifdef __cplusplus\n}\n#endif /* __cplusplus */\n#endif" >>$(PREFIX)/m68k-amigaos/ndk13-include/$$p; \
|
||||
else cp $(PREFIX)/m68k-amigaos/ndk-include/$$p $(PREFIX)/m68k-amigaos/ndk13-include/$$p; fi \
|
||||
done < patches/ndk13/chfiles $(L2)
|
||||
|
@ -765,6 +765,10 @@ $(BUILD)/ndk-include_ndk13: $(BUILD)/ndk-include_ndk $(BUILD)/fd2sfd/_done $(BUI
|
|||
sfdc --target=m68k-amigaos --mode=macros --output=$(PREFIX)/m68k-amigaos/ndk13-include/inline/$$(basename $$i _lib.sfd).h $$i; \
|
||||
sfdc --target=m68k-amigaos --mode=proto --output=$(PREFIX)/m68k-amigaos/ndk13-include/proto/$$(basename $$i _lib.sfd).h $$i; \
|
||||
done $(L2)
|
||||
$(L0)"STDARGing ndk13"$(L1) for i in $$(find $(PREFIX)/m68k-amigaos/ndk13-include/clib/*protos.h -type f); do \
|
||||
echo $$i; \
|
||||
LC_CTYPE=C sed -i.bak -E 's/([a-zA-Z0-9 _]*)([[:blank:]]+|\*)([a-zA-Z0-9_]+)\(/\1\2 __stdargs \3(/g' $$i; \
|
||||
rm $$i.bak; done $(L2)
|
||||
@echo "done" >$@
|
||||
|
||||
# =================================================
|
||||
|
|
|
@ -1,137 +0,0 @@
|
|||
--- NDK_3.9/Include/include_h/clib/alib_protos.h 2001-12-17 15:14:42.000000000 +0100
|
||||
+++ NDK_3.9/Include/include_h/clib/alib_protos.h 2018-01-22 19:33:39.671085000 +0100
|
||||
@@ -45,54 +45,54 @@
|
||||
|
||||
/* Exec support functions */
|
||||
|
||||
-VOID BeginIO( struct IORequest *ioReq );
|
||||
-struct IORequest *CreateExtIO( CONST struct MsgPort *port, LONG ioSize );
|
||||
-struct MsgPort *CreatePort( CONST_STRPTR name, LONG pri );
|
||||
-struct IOStdReq *CreateStdIO( CONST struct MsgPort *port );
|
||||
-struct Task *CreateTask( CONST_STRPTR name, LONG pri, CONST APTR initPC, ULONG stackSize );
|
||||
-VOID DeleteExtIO( struct IORequest *ioReq );
|
||||
-VOID DeletePort( struct MsgPort *ioReq );
|
||||
-VOID DeleteStdIO( struct IOStdReq *ioReq );
|
||||
-VOID DeleteTask( struct Task *task );
|
||||
-VOID NewList( struct List *list );
|
||||
-APTR LibAllocPooled( APTR poolHeader, ULONG memSize );
|
||||
-APTR LibCreatePool( ULONG memFlags, ULONG puddleSize, ULONG threshSize );
|
||||
-VOID LibDeletePool( APTR poolHeader );
|
||||
-VOID LibFreePooled( APTR poolHeader, APTR memory, ULONG memSize );
|
||||
+__stdargs VOID BeginIO( struct IORequest *ioReq );
|
||||
+__stdargs struct IORequest *CreateExtIO( CONST struct MsgPort *port, LONG ioSize );
|
||||
+__stdargs struct MsgPort *CreatePort( CONST_STRPTR name, LONG pri );
|
||||
+__stdargs struct IOStdReq *CreateStdIO( CONST struct MsgPort *port );
|
||||
+__stdargs struct Task *CreateTask( CONST_STRPTR name, LONG pri, CONST APTR initPC, ULONG stackSize );
|
||||
+__stdargs VOID DeleteExtIO( struct IORequest *ioReq );
|
||||
+__stdargs VOID DeletePort( struct MsgPort *ioReq );
|
||||
+__stdargs VOID DeleteStdIO( struct IOStdReq *ioReq );
|
||||
+__stdargs VOID DeleteTask( struct Task *task );
|
||||
+__stdargs VOID NewList( struct List *list );
|
||||
+__stdargs APTR LibAllocPooled( APTR poolHeader, ULONG memSize );
|
||||
+__stdargs APTR LibCreatePool( ULONG memFlags, ULONG puddleSize, ULONG threshSize );
|
||||
+__stdargs VOID LibDeletePool( APTR poolHeader );
|
||||
+__stdargs VOID LibFreePooled( APTR poolHeader, APTR memory, ULONG memSize );
|
||||
|
||||
/* Assorted functions in amiga.lib */
|
||||
|
||||
-ULONG FastRand( ULONG seed );
|
||||
-UWORD RangeRand( ULONG maxValue );
|
||||
+__stdargs ULONG FastRand( ULONG seed );
|
||||
+__stdargs UWORD RangeRand( ULONG maxValue );
|
||||
|
||||
/* Graphics support functions in amiga.lib */
|
||||
|
||||
-VOID AddTOF( struct Isrvstr *i, LONG (*p)(APTR args), APTR a );
|
||||
-VOID RemTOF( struct Isrvstr *i );
|
||||
-VOID waitbeam( LONG b );
|
||||
+__stdargs VOID AddTOF( struct Isrvstr *i, LONG (*p)(APTR args), APTR a );
|
||||
+__stdargs VOID RemTOF( struct Isrvstr *i );
|
||||
+__stdargs VOID waitbeam( LONG b );
|
||||
|
||||
/* math support functions in amiga.lib */
|
||||
|
||||
-FLOAT afp( CONST_STRPTR string );
|
||||
-VOID arnd( LONG place, LONG exp, STRPTR string );
|
||||
-FLOAT dbf( ULONG exp, ULONG mant );
|
||||
-LONG fpa( FLOAT fnum, BYTE *string );
|
||||
-VOID fpbcd( FLOAT fnum, BYTE *string );
|
||||
+__stdargs FLOAT afp( CONST_STRPTR string );
|
||||
+__stdargs VOID arnd( LONG place, LONG exp, STRPTR string );
|
||||
+__stdargs FLOAT dbf( ULONG exp, ULONG mant );
|
||||
+__stdargs LONG fpa( FLOAT fnum, BYTE *string );
|
||||
+__stdargs VOID fpbcd( FLOAT fnum, BYTE *string );
|
||||
|
||||
/* Timer support functions in amiga.lib (V36 and higher only) */
|
||||
|
||||
-LONG TimeDelay( LONG unit, ULONG secs, ULONG microsecs );
|
||||
-LONG DoTimer( struct timeval *, LONG unit, LONG command );
|
||||
+__stdargs LONG TimeDelay( LONG unit, ULONG secs, ULONG microsecs );
|
||||
+__stdargs LONG DoTimer( struct timeval *, LONG unit, LONG command );
|
||||
|
||||
/* Commodities functions in amiga.lib (V36 and higher only) */
|
||||
|
||||
-VOID ArgArrayDone( VOID );
|
||||
-STRPTR *ArgArrayInit( LONG argc, CONST_STRPTR *argv );
|
||||
-LONG ArgInt( CONST_STRPTR *tt, CONST_STRPTR entry, LONG defaultval );
|
||||
-STRPTR ArgString( CONST_STRPTR *tt, CONST_STRPTR entry, CONST_STRPTR defaultstring );
|
||||
-CxObj *HotKey( CONST_STRPTR description, struct MsgPort *port, LONG id );
|
||||
-struct InputEvent *InvertString( CONST_STRPTR str, CONST struct KeyMap *km );
|
||||
-VOID FreeIEvents( struct InputEvent *events );
|
||||
+__stdargs VOID ArgArrayDone( VOID );
|
||||
+__stdargs STRPTR *ArgArrayInit( LONG argc, CONST_STRPTR *argv );
|
||||
+__stdargs LONG ArgInt( CONST_STRPTR *tt, CONST_STRPTR entry, LONG defaultval );
|
||||
+__stdargs STRPTR ArgString( CONST_STRPTR *tt, CONST_STRPTR entry, CONST_STRPTR defaultstring );
|
||||
+__stdargs CxObj *HotKey( CONST_STRPTR description, struct MsgPort *port, LONG id );
|
||||
+__stdargs struct InputEvent *InvertString( CONST_STRPTR str, CONST struct KeyMap *km );
|
||||
+__stdargs VOID FreeIEvents( struct InputEvent *events );
|
||||
|
||||
/* Commodities Macros */
|
||||
|
||||
@@ -105,9 +105,9 @@
|
||||
|
||||
/* ARexx support functions in amiga.lib */
|
||||
|
||||
-BOOL CheckRexxMsg( CONST struct RexxMsg *rexxmsg );
|
||||
-LONG GetRexxVar( CONST struct RexxMsg *rexxmsg, CONST_STRPTR name, STRPTR *result );
|
||||
-LONG SetRexxVar( struct RexxMsg *rexxmsg, CONST_STRPTR name, CONST_STRPTR value, LONG length );
|
||||
+__stdargs BOOL CheckRexxMsg( CONST struct RexxMsg *rexxmsg );
|
||||
+__stdargs LONG GetRexxVar( CONST struct RexxMsg *rexxmsg, CONST_STRPTR name, STRPTR *result );
|
||||
+__stdargs LONG SetRexxVar( struct RexxMsg *rexxmsg, CONST_STRPTR name, CONST_STRPTR value, LONG length );
|
||||
|
||||
/* Intuition hook and boopsi support functions in amiga.lib. */
|
||||
/* These functions do not require any particular ROM revision */
|
||||
@@ -115,22 +115,22 @@
|
||||
/* in V36. These functions would work with compatibly-implemented */
|
||||
/* hooks or objects under V34. */
|
||||
|
||||
-ULONG CallHookA( struct Hook *hookPtr, Object *obj, APTR message );
|
||||
-ULONG CallHook( struct Hook *hookPtr, Object *obj, ... );
|
||||
-ULONG DoMethodA( Object *obj, Msg message );
|
||||
-ULONG DoMethod( Object *obj, ULONG methodID, ... );
|
||||
-ULONG DoSuperMethodA( struct IClass *cl, Object *obj, Msg message );
|
||||
-ULONG DoSuperMethod( struct IClass *cl, Object *obj, ULONG methodID, ... );
|
||||
-ULONG CoerceMethodA( struct IClass *cl, Object *obj, Msg message );
|
||||
-ULONG CoerceMethod( struct IClass *cl, Object *obj, ULONG methodID, ... );
|
||||
-ULONG HookEntry( struct Hook *hookPtr, Object *obj, APTR message );
|
||||
-ULONG SetSuperAttrs( struct IClass *cl, Object *obj, ULONG tag1, ... );
|
||||
+__stdargs ULONG CallHookA( struct Hook *hookPtr, Object *obj, APTR message );
|
||||
+__stdargs ULONG CallHook( struct Hook *hookPtr, Object *obj, ... );
|
||||
+__stdargs ULONG DoMethodA( Object *obj, Msg message );
|
||||
+__stdargs ULONG DoMethod( Object *obj, ULONG methodID, ... );
|
||||
+__stdargs ULONG DoSuperMethodA( struct IClass *cl, Object *obj, Msg message );
|
||||
+__stdargs ULONG DoSuperMethod( struct IClass *cl, Object *obj, ULONG methodID, ... );
|
||||
+__stdargs ULONG CoerceMethodA( struct IClass *cl, Object *obj, Msg message );
|
||||
+__stdargs ULONG CoerceMethod( struct IClass *cl, Object *obj, ULONG methodID, ... );
|
||||
+__stdargs ULONG HookEntry( struct Hook *hookPtr, Object *obj, APTR message );
|
||||
+__stdargs ULONG SetSuperAttrs( struct IClass *cl, Object *obj, ULONG tag1, ... );
|
||||
|
||||
/* Network-support functions in amiga.lib. */
|
||||
/* ACrypt() first appeared in later V39 versions of amiga.lib, but */
|
||||
/* operates correctly under V37 and up. */
|
||||
|
||||
-STRPTR ACrypt( STRPTR buffer, CONST_STRPTR password, CONST_STRPTR username );
|
||||
+__stdargs STRPTR ACrypt( STRPTR buffer, CONST_STRPTR password, CONST_STRPTR username );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
--- NDK_3.9/Include/include_h/clib/alib_stdio_protos.h 2001-12-17 15:14:44.000000000 +0100
|
||||
+++ NDK_3.9/Include/include_h/clib/alib_stdio_protos.h 2018-01-22 19:33:55.310761400 +0100
|
||||
@@ -21,16 +21,16 @@
|
||||
|
||||
/* stdio functions that duplicate those in a typical C library */
|
||||
|
||||
-LONG printf( CONST_STRPTR fmt, ... );
|
||||
-LONG sprintf( CONST_STRPTR buffer, CONST_STRPTR fmt, ... );
|
||||
-LONG fclose( LONG stream );
|
||||
-LONG fgetc( LONG stream );
|
||||
-LONG fprintf( LONG stream, CONST_STRPTR fmt, ... );
|
||||
-LONG fputc( LONG c, LONG stream );
|
||||
-LONG fputs( CONST_STRPTR s, LONG stream );
|
||||
-LONG getchar( VOID );
|
||||
-LONG putchar( ULONG c );
|
||||
-LONG puts( CONST_STRPTR s );
|
||||
+__stdargs LONG printf( CONST_STRPTR fmt, ... );
|
||||
+__stdargs LONG sprintf( CONST_STRPTR buffer, CONST_STRPTR fmt, ... );
|
||||
+__stdargs LONG fclose( LONG stream );
|
||||
+__stdargs LONG fgetc( LONG stream );
|
||||
+__stdargs LONG fprintf( LONG stream, CONST_STRPTR fmt, ... );
|
||||
+__stdargs LONG fputc( LONG c, LONG stream );
|
||||
+__stdargs LONG fputs( CONST_STRPTR s, LONG stream );
|
||||
+__stdargs LONG getchar( VOID );
|
||||
+__stdargs LONG putchar( ULONG c );
|
||||
+__stdargs LONG puts( CONST_STRPTR s );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
Loading…
Reference in New Issue