mirror of https://github.com/FDOS/kernel.git
ia16-elf-gcc port: use CDECL = __attribute__((cdecl)) instead of varargs.
This commit is contained in:
parent
ca7fb8e71b
commit
8ee8135d4f
|
@ -483,14 +483,14 @@ extern request /* I/O Request packets */
|
||||||
ASM CharReqHdr, ASM IoReqHdr, ASM MediaReqHdr;
|
ASM CharReqHdr, ASM IoReqHdr, ASM MediaReqHdr;
|
||||||
|
|
||||||
/* dsk.c */
|
/* dsk.c */
|
||||||
COUNT ASMCFUNC FAR blk_driver(rqptr rp, ...);
|
COUNT ASMCFUNC FAR blk_driver(rqptr rp);
|
||||||
ddt * getddt(int dev);
|
ddt * getddt(int dev);
|
||||||
|
|
||||||
/* error.c */
|
/* error.c */
|
||||||
COUNT char_error(request * rq, struct dhdr FAR * lpDevice);
|
COUNT char_error(request * rq, struct dhdr FAR * lpDevice);
|
||||||
COUNT block_error(request * rq, COUNT nDrive, struct dhdr FAR * lpDevice, int mode);
|
COUNT block_error(request * rq, COUNT nDrive, struct dhdr FAR * lpDevice, int mode);
|
||||||
/* sysclk.c */
|
/* sysclk.c */
|
||||||
WORD ASMCFUNC FAR clk_driver(rqptr rp, ...);
|
WORD ASMCFUNC FAR clk_driver(rqptr rp);
|
||||||
|
|
||||||
/* execrh.asm */
|
/* execrh.asm */
|
||||||
#if defined(__WATCOMC__) && _M_IX86 >= 300
|
#if defined(__WATCOMC__) && _M_IX86 >= 300
|
||||||
|
|
|
@ -153,7 +153,7 @@ static inline void enable(void)
|
||||||
asm volatile("sti");
|
asm volatile("sti");
|
||||||
}
|
}
|
||||||
#define far __far
|
#define far __far
|
||||||
#define CDECL
|
#define CDECL __attribute__((cdecl))
|
||||||
#define VA_CDECL
|
#define VA_CDECL
|
||||||
#define PASCAL
|
#define PASCAL
|
||||||
|
|
||||||
|
@ -232,7 +232,11 @@ typedef unsigned size_t;
|
||||||
as 'ASMCFUNC', and is (and will be ?-) cdecl */
|
as 'ASMCFUNC', and is (and will be ?-) cdecl */
|
||||||
#define ASMCFUNC CDECL
|
#define ASMCFUNC CDECL
|
||||||
#define ASMPASCAL PASCAL
|
#define ASMPASCAL PASCAL
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#define ASM
|
||||||
|
#else
|
||||||
#define ASM ASMCFUNC
|
#define ASM ASMCFUNC
|
||||||
|
#endif
|
||||||
|
|
||||||
/* variables that can be near or far: redefined in init-dat.h */
|
/* variables that can be near or far: redefined in init-dat.h */
|
||||||
#define DOSFAR
|
#define DOSFAR
|
||||||
|
|
|
@ -630,7 +630,7 @@ struct memdiskinfo {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* query_memdisk() based on similar subroutine in Eric Auer's public domain getargs.asm which is based on IFMEMDSK */
|
/* query_memdisk() based on similar subroutine in Eric Auer's public domain getargs.asm which is based on IFMEMDSK */
|
||||||
struct memdiskinfo FAR * ASMCFUNC query_memdisk(UBYTE drive, ...);
|
struct memdiskinfo FAR * ASMCFUNC query_memdisk(UBYTE drive);
|
||||||
|
|
||||||
struct memdiskopt {
|
struct memdiskopt {
|
||||||
BYTE * name;
|
BYTE * name;
|
||||||
|
|
|
@ -170,7 +170,7 @@ static dsk_proc * const dispatch[NENTRY] =
|
||||||
/* F U N C T I O N S --------------------------------------------------- */
|
/* F U N C T I O N S --------------------------------------------------- */
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
||||||
COUNT ASMCFUNC FAR blk_driver(rqptr rp, ...)
|
COUNT ASMCFUNC FAR blk_driver(rqptr rp)
|
||||||
{
|
{
|
||||||
if (rp->r_unit >= blk_dev.dh_name[0] && rp->r_command != C_INIT)
|
if (rp->r_unit >= blk_dev.dh_name[0] && rp->r_command != C_INIT)
|
||||||
return failure(E_UNIT);
|
return failure(E_UNIT);
|
||||||
|
|
|
@ -363,7 +363,7 @@ VOID ASMCFUNC FAR cpm_entry(VOID)
|
||||||
/*INRPT FAR handle_break(VOID) */ ;
|
/*INRPT FAR handle_break(VOID) */ ;
|
||||||
COUNT ASMCFUNC
|
COUNT ASMCFUNC
|
||||||
CriticalError(COUNT nFlag, COUNT nDrive, COUNT nError,
|
CriticalError(COUNT nFlag, COUNT nDrive, COUNT nError,
|
||||||
struct dhdr FAR * lpDevice, ...);
|
struct dhdr FAR * lpDevice);
|
||||||
|
|
||||||
VOID ASMCFUNC FAR CharMapSrvc(VOID);
|
VOID ASMCFUNC FAR CharMapSrvc(VOID);
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -198,7 +198,7 @@ void ASMPASCAL set_DTA(void far *dta);
|
||||||
|
|
||||||
/* irqstack.asm */
|
/* irqstack.asm */
|
||||||
VOID ASMCFUNC init_stacks(VOID FAR * stack_base, COUNT nStacks,
|
VOID ASMCFUNC init_stacks(VOID FAR * stack_base, COUNT nStacks,
|
||||||
WORD stackSize, ...);
|
WORD stackSize);
|
||||||
|
|
||||||
/* inthndlr.c */
|
/* inthndlr.c */
|
||||||
VOID ASMCFUNC FAR int0_handler(void);
|
VOID ASMCFUNC FAR int0_handler(void);
|
||||||
|
@ -223,7 +223,7 @@ VOID ASMCFUNC FAR cpm_entry(void);
|
||||||
|
|
||||||
/* kernel.asm */
|
/* kernel.asm */
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
VOID ASMCFUNC init_call_p_0(struct config FAR *Config, ...) asm("init_call_p_0");
|
VOID ASMCFUNC init_call_p_0(struct config FAR *Config) asm("init_call_p_0");
|
||||||
#else
|
#else
|
||||||
VOID ASMCFUNC FAR init_call_p_0(struct config FAR *Config); /* P_0, actually */
|
VOID ASMCFUNC FAR init_call_p_0(struct config FAR *Config); /* P_0, actually */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -63,7 +63,7 @@ struct HugeSectorBlock {
|
||||||
/* variables needed for the rest of the handler. */
|
/* variables needed for the rest of the handler. */
|
||||||
/* this here works on the users stack !! and only very few functions
|
/* this here works on the users stack !! and only very few functions
|
||||||
are allowed */
|
are allowed */
|
||||||
VOID ASMCFUNC int21_syscall(iregs FAR * irp, ...)
|
VOID ASMCFUNC int21_syscall(iregs FAR * irp)
|
||||||
{
|
{
|
||||||
Int21AX = irp->AX;
|
Int21AX = irp->AX;
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ int int21_fat32(lregs *r)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VOID ASMCFUNC int21_service(iregs FAR * r, ...)
|
VOID ASMCFUNC int21_service(iregs FAR * r)
|
||||||
{
|
{
|
||||||
COUNT rc;
|
COUNT rc;
|
||||||
long lrc;
|
long lrc;
|
||||||
|
@ -1625,7 +1625,7 @@ struct int25regs {
|
||||||
/*
|
/*
|
||||||
this function is called from an assembler wrapper function
|
this function is called from an assembler wrapper function
|
||||||
*/
|
*/
|
||||||
VOID ASMCFUNC int2526_handler(WORD mode, struct int25regs FAR * r, ...)
|
VOID ASMCFUNC int2526_handler(WORD mode, struct int25regs FAR * r)
|
||||||
{
|
{
|
||||||
ULONG blkno;
|
ULONG blkno;
|
||||||
UWORD nblks;
|
UWORD nblks;
|
||||||
|
@ -1734,7 +1734,7 @@ struct int2f12regs {
|
||||||
/* WARNING: modifications in `r' are used outside of int2F_12_handler()
|
/* WARNING: modifications in `r' are used outside of int2F_12_handler()
|
||||||
* On input r.AX==0x12xx, 0x4A01 or 0x4A02
|
* On input r.AX==0x12xx, 0x4A01 or 0x4A02
|
||||||
*/
|
*/
|
||||||
VOID ASMCFUNC int2F_12_handler(struct int2f12regs r, ...)
|
VOID ASMCFUNC int2F_12_handler(struct int2f12regs r)
|
||||||
{
|
{
|
||||||
COUNT rc;
|
COUNT rc;
|
||||||
long lrc;
|
long lrc;
|
||||||
|
|
|
@ -509,7 +509,7 @@ VOID DosUpMem(VOID FAR * str, unsigned len)
|
||||||
* the HiByte of the first argument must remain unchanged.
|
* the HiByte of the first argument must remain unchanged.
|
||||||
* See NLSSUPT.ASM -- 2000/03/30 ska
|
* See NLSSUPT.ASM -- 2000/03/30 ska
|
||||||
*/
|
*/
|
||||||
unsigned char ASMCFUNC DosUpChar(unsigned char ch, ...)
|
unsigned char ASMCFUNC DosUpChar(unsigned char ch)
|
||||||
/* upcase a single character */
|
/* upcase a single character */
|
||||||
{
|
{
|
||||||
log(("NLS: DosUpChar(): in ch=%u (%c)\n", ch, ch > 32 ? ch : ' '));
|
log(("NLS: DosUpChar(): in ch=%u (%c)\n", ch, ch > 32 ? ch : ' '));
|
||||||
|
@ -667,7 +667,7 @@ VOID FAR *DosGetDBCS(void)
|
||||||
Return value: AL register to be returned
|
Return value: AL register to be returned
|
||||||
if AL == 0, Carry must be cleared, otherwise set
|
if AL == 0, Carry must be cleared, otherwise set
|
||||||
*/
|
*/
|
||||||
UWORD ASMCFUNC syscall_MUX14(DIRECT_IREGS, ...)
|
UWORD ASMCFUNC syscall_MUX14(DIRECT_IREGS)
|
||||||
{
|
{
|
||||||
struct nlsPackage FAR *nls; /* addressed NLS package */
|
struct nlsPackage FAR *nls; /* addressed NLS package */
|
||||||
|
|
||||||
|
|
|
@ -260,7 +260,7 @@ BYTE DosYesNo(UWORD ch);
|
||||||
#ifndef DosUpMem
|
#ifndef DosUpMem
|
||||||
VOID DosUpMem(VOID FAR * str, unsigned len);
|
VOID DosUpMem(VOID FAR * str, unsigned len);
|
||||||
#endif
|
#endif
|
||||||
unsigned char ASMCFUNC DosUpChar(unsigned char ch, ...);
|
unsigned char ASMCFUNC DosUpChar(unsigned char ch);
|
||||||
VOID DosUpString(char FAR * str);
|
VOID DosUpString(char FAR * str);
|
||||||
VOID DosUpFMem(VOID FAR * str, unsigned len);
|
VOID DosUpFMem(VOID FAR * str, unsigned len);
|
||||||
unsigned char DosUpFChar(unsigned char ch);
|
unsigned char DosUpFChar(unsigned char ch);
|
||||||
|
@ -276,7 +276,7 @@ COUNT DosSetCountry(UWORD cntry);
|
||||||
COUNT DosGetCodepage(UWORD * actCP, UWORD * sysCP);
|
COUNT DosGetCodepage(UWORD * actCP, UWORD * sysCP);
|
||||||
COUNT DosSetCodepage(UWORD actCP, UWORD sysCP);
|
COUNT DosSetCodepage(UWORD actCP, UWORD sysCP);
|
||||||
VOID FAR *DosGetDBCS(void);
|
VOID FAR *DosGetDBCS(void);
|
||||||
UWORD ASMCFUNC syscall_MUX14(DIRECT_IREGS, ...);
|
UWORD ASMCFUNC syscall_MUX14(DIRECT_IREGS);
|
||||||
|
|
||||||
/* prf.c */
|
/* prf.c */
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -383,7 +383,7 @@ UWORD get_machine_name(BYTE FAR * netname);
|
||||||
VOID set_machine_name(BYTE FAR * netname, UWORD name_num);
|
VOID set_machine_name(BYTE FAR * netname, UWORD name_num);
|
||||||
|
|
||||||
/* procsupt.asm */
|
/* procsupt.asm */
|
||||||
VOID ASMCFUNC exec_user(iregs FAR * irp, int disable_a20, ...);
|
VOID ASMCFUNC exec_user(iregs FAR * irp, int disable_a20);
|
||||||
|
|
||||||
/* new by TE */
|
/* new by TE */
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ STATIC void DayToBcd(BYTE * x, unsigned mon, unsigned day, unsigned yr)
|
||||||
x[2] = ByteToBcd(yr % 100);
|
x[2] = ByteToBcd(yr % 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
WORD ASMCFUNC FAR clk_driver(rqptr rp, ...)
|
WORD ASMCFUNC FAR clk_driver(rqptr rp)
|
||||||
{
|
{
|
||||||
BYTE bcd_days[4], bcd_minutes, bcd_hours, bcd_seconds;
|
BYTE bcd_days[4], bcd_minutes, bcd_hours, bcd_seconds;
|
||||||
|
|
||||||
|
|
|
@ -800,7 +800,7 @@ COUNT DosExec(COUNT mode, exec_blk FAR * ep, BYTE FAR * lp)
|
||||||
#include "config.h" /* config structure definition */
|
#include "config.h" /* config structure definition */
|
||||||
|
|
||||||
/* start process 0 (the shell) */
|
/* start process 0 (the shell) */
|
||||||
VOID ASMCFUNC P_0(struct config FAR *Config, ...)
|
VOID ASMCFUNC P_0(struct config FAR *Config)
|
||||||
{
|
{
|
||||||
BYTE *tailp, *endp;
|
BYTE *tailp, *endp;
|
||||||
exec_blk exb;
|
exec_blk exb;
|
||||||
|
|
Loading…
Reference in New Issue