[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] New include/mint/sysbind.h



Frank Naumann wrote:
Any objections if I change over to the generated system call bindings?

-> osbind.h/mintbind.h/falcon.h/metados.h only include sysbind.h

After some reflexion, it seems clean to have separated the traps into trap1.h, trap13.h and trap14.h. It can be seen as the low-level support for any other source requiring direct trap usage.

About the monolithic sysbind.h, it annoys me that if I want to write pure TOS software, I include only <osbind.h>, then I will get the MiNT system calls, too. So I could use dependencies to MiNT without knowing it. Same thing about Metados, etc.

One solution could be to protect some parts of sysbind.h with defines, such as:
#ifdef _NEED_MINT_SUPPORT
#define Fchdir(a) trap_1_ww(0x181,(short)a)
...
Then define _NEED_MINT_SUPPORT at the top of mintbind.h, before including sysbind.h

Another solution would be to generate separate include files for the different OS parts. For example, you could generate _metados.h with the Metados OS calls (implemented with trap14.h), then the official metados.h could include the generated _metados.h plus the additional types and defines.

Well, these are just ideas to clean-up things...

--
Vincent Rivière