Mercurial > ~darius > hgwebdir.cgi > stm32temp
comparison syscalls.c @ 36:2ecde7a4bc55
Don't use evil errno kludge, write a function that libc can use.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Tue, 26 Mar 2013 15:09:46 +1030 |
parents | d3b7d4964807 |
children | 5b7d21698a80 |
comparison
equal
deleted
inserted
replaced
35:1fdfbad9eca7 | 36:2ecde7a4bc55 |
---|---|
15 | 15 |
16 #include "comm.h" | 16 #include "comm.h" |
17 #include "rtc.h" | 17 #include "rtc.h" |
18 #include "stm32f10x.h" /* for _get_PSP() from core_cm3.h*/ | 18 #include "stm32f10x.h" /* for _get_PSP() from core_cm3.h*/ |
19 | 19 |
20 #undef errno | 20 int * |
21 extern int errno; | 21 __errno(void) { |
22 static int _errno; | |
23 | |
24 return(&errno); | |
25 } | |
22 | 26 |
23 int | 27 int |
24 _kill(int pid, int sig) { | 28 _kill(int pid, int sig) { |
25 pid = pid; sig = sig; /* avoid warnings */ | 29 pid = pid; sig = sig; /* avoid warnings */ |
26 errno = EINVAL; | 30 errno = EINVAL; |