/programs/develop/libraries/kolibri-libc/source/Makefile |
---|
1,7 → 1,6 |
ifndef GCC |
GCC=kos32-gcc |
endif |
CC=kos32-gcc |
KPACK=kpack |
FASM=fasm |
15,11 → 14,8 |
mkdir -p exports ../lib |
../linuxtools/ExportGen symbols.txt exports/exports.c |
$(FASM) crt/crt0.asm ../lib/crt0.o |
$(GCC) $(CFLAGS) $(SRC) -o $(LIB) |
$(CC) $(CFLAGS) $(SRC) -o $(LIB) |
$(KPACK) $(LIB) |
../linuxtools/LoaderGen symbols.txt ../loader |
../linuxtools/LoaderBuild ../loader |
rm -rf exports |
install: |
cp -f ../lib/libc.obj ~/.kex/root/RD/1/LIB |
/programs/develop/libraries/kolibri-libc/include/sys/ksys.h |
---|
49,6 → 49,15 |
}ksys_oskey_t; |
typedef struct{ |
unsigned handle; |
unsigned io_code; |
unsigned *input; |
int inp_size; |
void *output; |
int out_size; |
}ksys_ioctl_t; |
typedef struct{ |
void *data; |
size_t size; |
}ksys_ufile_t; |
143,17 → 152,6 |
void* func_ptr; |
}ksys_coff_etable_t; |
typedef void* ksys_drv_hand_t; |
typedef struct{ |
ksys_drv_hand_t handler; |
unsigned func_num; |
void* in_data_ptr; |
unsigned in_data_size; |
void* out_data_ptr; |
unsigned out_data_size; |
}ksys_drv_ctl_t; |
#pragma pack(pop) |
enum KSYS_EVENTS { |
1001,33 → 999,6 |
); |
} |
/* Driver functions */ |
static inline |
ksys_drv_hand_t _ksys_load_driver(char *driver_name) |
{ |
ksys_drv_hand_t driver_h; |
asm_inline( |
"int $0x40" |
:"=a"(driver_h) |
:"a"(68), "b"(16), "c"(driver_name) |
); |
return driver_h; |
} |
static inline |
unsigned _ksys_work_driver(ksys_drv_ctl_t *ioctl) |
{ |
unsigned status; |
asm_inline( |
"int $0x40" |
:"=a"(status) |
:"a"(68), "b"(17), "c"(ioctl) |
:"memory" |
); |
return status; |
} |
#ifdef __cplusplus |
} |
#endif |
/programs/develop/libraries/kolibri-libc/samples/tmpdisk_work.c |
---|
File deleted |
\ No newline at end of file |
/programs/develop/libraries/kolibri-libc/samples/Makefile |
---|
1,5 → 1,5 |
KTCC=../../../ktcc/trunk/bin/kos32-tcc |
KTCC=../linuxtools/kos32-tcc |
KPACK = kpack |
CFLAGS = -I../include |
LDFLAGS = -nostdlib -L../lib ../lib/crt0.o |
11,7 → 11,6 |
string_test.kex \ |
whois.kex \ |
file_io.kex \ |
tmpdisk_work.kex |
all: $(BIN) |