annotate syscalls.c @ 31:03592ca4d37e

Port tempctrl.c from AVR. I removed the beep code as I don't have a beeper on the STM32 board. Reworked the heat/cool stuff so it can use separate ports.
author Daniel O'Connor <darius@dons.net.au>
date Tue, 27 Nov 2012 13:20:52 +1030
parents 435c6330896c
children d3b7d4964807
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
1 /*
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
2 * syscalls.c
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
3 *
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
4 * Created on: 03.12.2009
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
5 * Author: Martin Thomas, 3BSD license
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
6 */
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
7
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
8 #include <stdio.h>
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
9 #include <reent.h>
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
10 #include <errno.h>
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
11 #include <stdlib.h> /* abort */
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
12 #include <sys/types.h>
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
13 #include <sys/stat.h>
3
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
14 #include <sys/time.h>
0
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
15
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
16 #include "comm.h"
30
435c6330896c Set tv_usec in gettimeofday() by using the prescaler counter.
Daniel O'Connor <darius@dons.net.au>
parents: 23
diff changeset
17 #include "rtc.h"
0
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
18 #include "stm32f10x.h" /* for _get_PSP() from core_cm3.h*/
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
19
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
20 #undef errno
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
21 extern int errno;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
22
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
23 int
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
24 _kill(int pid, int sig) {
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
25 pid = pid; sig = sig; /* avoid warnings */
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
26 errno = EINVAL;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
27 return -1;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
28 }
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
29
3
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
30 void
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
31 _exit(int status) {
23
2bce4dbf52b8 Use CR/LF to printfs (should probably do the conversion in _write)
Daniel O'Connor <darius@dons.net.au>
parents: 3
diff changeset
32 printf("_exit called with parameter %d\r\n", status);
2bce4dbf52b8 Use CR/LF to printfs (should probably do the conversion in _write)
Daniel O'Connor <darius@dons.net.au>
parents: 3
diff changeset
33 __disable_irq();
0
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
34 while(1)
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
35 ;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
36 }
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
37
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
38 int
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
39 _getpid(void) {
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
40 return 1;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
41 }
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
42
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
43 extern char _end; /* Defined by the linker */
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
44 static char *heap_end;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
45
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
46 char *
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
47 get_heap_end(void) {
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
48 return (char*) heap_end;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
49 }
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
50
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
51 char *
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
52 get_stack_top(void) {
3
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
53 /* Use MSP (vs PSP) - the processor is in Thread mode out of reset */
0
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
54 return (char*) __get_MSP();
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
55 }
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
56
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
57 caddr_t
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
58 _sbrk(int incr) {
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
59 char *prev_heap_end;
3
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
60
0
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
61 if (heap_end == 0) {
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
62 heap_end = &_end;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
63 }
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
64 prev_heap_end = heap_end;
3
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
65
0
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
66 if (heap_end + incr > get_stack_top()) {
23
2bce4dbf52b8 Use CR/LF to printfs (should probably do the conversion in _write)
Daniel O'Connor <darius@dons.net.au>
parents: 3
diff changeset
67 printf("Heap and stack collision\r\n");
0
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
68 abort();
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
69 }
3
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
70
0
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
71 heap_end += incr;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
72 return (caddr_t) prev_heap_end;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
73 }
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
74
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
75 int
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
76 _close(int file) {
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
77 file = file; /* avoid warning */
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
78 return -1;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
79 }
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
80
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
81 int
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
82 _fstat(int file, struct stat *st) {
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
83 file = file; /* avoid warning */
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
84 st->st_mode = S_IFCHR;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
85 return 0;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
86 }
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
87
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
88 int
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
89 _isatty(int file) {
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
90 file = file; /* avoid warning */
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
91 return 1;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
92 }
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
93
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
94 int
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
95 _lseek(int file, int ptr, int dir) {
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
96 file = file; /* avoid warning */
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
97 ptr = ptr; /* avoid warning */
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
98 dir = dir; /* avoid warning */
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
99 return 0;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
100 }
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
101
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
102 int
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
103 _read(int file, char *ptr, int len) {
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
104 file = file; /* avoid warning */
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
105 ptr = ptr; /* avoid warning */
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
106 len = len; /* avoid warning */
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
107 return 0;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
108 }
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
109
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
110 int
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
111 _write(int file, char *ptr, int len) {
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
112 int todo;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
113
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
114 file = file; /* avoid warning */
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
115 for (todo = 0; todo < len; todo++) {
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
116 comm_put(*ptr++);
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
117 }
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
118 return len;
c59513fd84fb Initial commit of STM32 test code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
119 }
3
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
120
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
121 int
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
122 _gettimeofday_r(struct _reent *reent __attribute__((unused)), struct timeval *tp, void *tzp __attribute__((unused))) {
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
123 tp->tv_sec = RTC_GetCounter();
30
435c6330896c Set tv_usec in gettimeofday() by using the prescaler counter.
Daniel O'Connor <darius@dons.net.au>
parents: 23
diff changeset
124 tp->tv_usec = RTC_PS2USEC(RTC_GetDivider());
435c6330896c Set tv_usec in gettimeofday() by using the prescaler counter.
Daniel O'Connor <darius@dons.net.au>
parents: 23
diff changeset
125
3
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
126 return 0;
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
127 }
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
128
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
129 int
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
130 settimeofday(const struct timeval *tp, const struct timezone *tzp __attribute__((unused))) {
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
131 RTC_SetCounter(tp->tv_sec);
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
132
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
133 return 0;
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
134 }
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
135
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
136 clock_t
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
137 _clock (void) {
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
138 return RTC_GetCounter();
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
139 }
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
140
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
141 void
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
142 __tz_lock (void) {
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
143 }
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
144
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
145
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
146 void
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
147 __tz_unlock (void) {
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
148 }
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
149
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
150 static __tzinfo_type tzinfo = {1, 0,
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
151 { {'J', 0, 0, 0, 0, (time_t)0, 0L },
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
152 {'J', 0, 0, 0, 0, (time_t)0, 0L }
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
153 }
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
154 };
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
155
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
156 __tzinfo_type *
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
157 __gettzinfo (void) {
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
158 return &tzinfo;
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
159 }
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
160
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
161 /* Stub, required for strftime?! */
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
162 int
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
163 _open(const char *name __attribute__((unused)), int mode __attribute__((unused)), ...) {
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
164 return -1;
74e9b3baac1e Jumbo commit to make things work.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
165 }