gnucomp.c

来自「这是一个符合posix.13 pse51的实时内核」· C语言 代码 · 共 44 行

C
44
字号
/* Project: 	HARTIK 3.0      				*/
/* Description: Hard Real TIme Kernel for 386 & higher machines */
/* Author:	Gerardo Lamastra				*/
/* Date:	9/5/96 						*/
/* Revision:	2.0/GNU-C					*/

/* File: GNU-COMP.C			   		  */
/* System calls for X extender 			  	  */
/* These function provide access to system tabels GDT/IDT */
/* and X <-> Phisical address conversion		  */

#include <xsys.h>
#include <cons.h>
#include <mem.h>
#include <math.h>

/*
    The Math Library libm.a has been hacked from the original
    Linux Library! It was necessary to do so in order to support
    the Linux gcc & the interface with the math functions...
    I hope this can work, but we should make a libc.a & libm.a
    to use with Hartik, eventually by recompiling the original
    Linux library...

    This is only necessary if we use the Linux cross-development,
    since the libm.a in the DOS environment work perfectly well

*/

/* This is for compatibility with Linux libm.a */
static int linux_errno_location;
extern int *__errno_location = &linux_errno_location;

double infnan(int __error) __attribute__ ((noreturn));

double infnan(int __error)
{
    cprintf("Math Error!\n");
    exit(-1);
}

DWORD errno = 0;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?