Changeset 441 for EcnlProtoTool/trunk/ntshell/src/shellif.h
- Timestamp:
- Jul 10, 2020, 9:09:25 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/ntshell/src/shellif.h
r439 r441 50 50 * @(#) $Id$ 51 51 */ 52 #ifndef SHELLIF_H53 #define SHELLIF_H52 #ifndef _SHELLIF_H_ 53 #define _SHELLIF_H_ 54 54 55 55 #ifdef _MSC_VER 56 # include <time.h>56 #undef NULL 57 57 #endif 58 58 … … 92 92 #include "../musl-1.1.18/include/bits/stat.h" 93 93 #include "../musl-1.1.18/include/sys/select.h" 94 #ifndef _MSC_VER95 94 #include "../musl-1.1.18/include/time.h" 96 #endif97 95 #include "../musl-1.1.18/include/signal.h" 98 96 #include "../musl-1.1.18/include/stdio.h" … … 107 105 #include <stdarg.h> 108 106 107 #define DebugBreak() asm("bkpt #0") 108 109 #ifdef __cplusplus 110 extern "C" { 111 #endif 112 109 113 // time.h 110 114 #define CLOCK_REALTIME 0 115 int shell_nanosleep(const struct timespec *req, struct timespec *rem); 111 116 112 117 // dirent.h … … 154 159 // signal.h 155 160 int shell_sigprocmask(int how, const sigset_t *restrict set, sigset_t *restrict old); 156 int shell_sigaction(int sig, const struct sigaction *restrict sa, struct sigaction *restrict old); 161 struct k_sigaction; 162 int shell_sigaction(int sig, const struct k_sigaction *restrict sa, 163 struct k_sigaction *restrict old, size_t size); 157 164 // socket.h 158 165 int shell_socket(int, int, int); 159 166 int shell_connect(int, const struct sockaddr *, socklen_t); 160 ssize_t shell_send(int, const void *, size_t, int);161 167 ssize_t shell_sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t); 162 168 ssize_t shell_sendmsg(int, const struct msghdr *, int); 163 169 int shell_bind(int, const struct sockaddr *, socklen_t); 164 170 int shell_listen(int, int); 165 int shell_accept(int, struct sockaddr *__restrict, socklen_t *__restrict); 166 ssize_t shell_recv(int, void *, size_t, int); 167 ssize_t shell_recvfrom(int, void *__restrict, size_t, int, struct sockaddr *__restrict, socklen_t *__restrict); 171 int shell_accept(int, struct sockaddr *restrict, socklen_t *restrict); 172 ssize_t shell_recvfrom(int, void *restrict, size_t, int, struct sockaddr *restrict, socklen_t *restrict); 168 173 ssize_t shell_recvmsg(int, struct msghdr *, int); 169 int shell_getsockopt(int, int, int, void * __restrict, socklen_t *__restrict);174 int shell_getsockopt(int, int, int, void *restrict, socklen_t *restrict); 170 175 int shell_setsockopt(int, int, int, const void *, socklen_t); 171 176 int shell_shutdown(int, int); 177 int shell_getpeername(int fd, struct sockaddr *restrict addr, socklen_t *restrict len); 178 int shell_getsockname(int fd, struct sockaddr *restrict addr, socklen_t *restrict len); 172 179 // select.h 173 int shell_select(int, fd_set * __restrict, fd_set *__restrict, fd_set *__restrict, struct timeval *__restrict);180 int shell_select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict, struct timeval *restrict); 174 181 // syslog.h 175 182 void vsyslog (int, const char *, va_list); 176 183 // termios.h 177 int sio_tcgetattr (int, struct termios *);178 int sio_tcsetattr(int, int, const struct termios *);184 int tcgetattr (int, struct termios *); 185 int tcsetattr(int, int, const struct termios *); 179 186 // fcntl.h 180 187 int shell_open(const char *, int, void *arg); … … 196 203 int shell_chmod(const char *, mode_t); 197 204 int shell_mkdir(const char *, mode_t); 198 int shell_stat(const char * __restrict, struct stat *__restrict);205 int shell_stat(const char *restrict, struct stat *restrict); 199 206 int shell_fstat(int, struct stat *); 200 int shell_lstat(const char * __restrict, struct stat *__restrict);207 int shell_lstat(const char *restrict, struct stat *restrict); 201 208 202 209 int shell_clock_getres(clockid_t clk_id, struct timespec *res); … … 215 222 int shell_mprotect(void *addr, size_t len, int prot); 216 223 // TODO 224 int shell_clone(int, int); 225 int shell_dup2(int, int); 226 int shell_execve(const char *, char *const [], char *const []); 227 int shell_faccessat(int, const char *, int, int); 228 int shell_fchmodat(int, const char *, mode_t, int); 229 int shell_flock(int, int); 230 int shell_fork(); 231 int shell_futex(volatile int *, int, int, void *); 232 int shell_futimesat(int, const char *, struct timeval *); 233 int shell_getegid(); 234 int shell_geteuid(); 235 int shell_getgid(); 236 int shell_gettid(); 237 int shell_getuid(); 217 238 int shell_madvise(void *, size_t, int); 239 int shell_mremap(void *, size_t, size_t, int, void *); 240 int shell_munmap(void *, size_t); 241 int shell_pipe(int [2]); 242 int shell_pipe2(int [2], int); 243 int shell_ppoll(struct pollfd *, nfds_t, const struct timespec *,const sigset_t *); 244 int shell_pselect6(int, fd_set *restrict, fd_set *restrict, 245 fd_set *restrict, const struct timespec *restrict, const sigset_t *restrict); 246 int shell_setpgid(pid_t, pid_t); 247 int shell_setsid(); 248 int shell_symlink(const char *, const char *); 249 int shell_tkill(int, int); 250 int shell_umask(mode_t); 218 251 int shell_uname(struct utsname *); 252 int shell_utimensat(int, const char *, const struct timespec [2], int); 253 int shell_utimes(const char *, struct timeval *); 254 // sys/resource.h 255 struct rusage; 256 int shell_wait4(pid_t, int *, int, struct rusage *); 257 ssize_t shell_getrandom(void *buf, size_t buflen, unsigned int flags); 219 258 // âââmusl 220 259 … … 239 278 void __mbedcall_cp_asm(); 240 279 280 #include "ff.h" 281 WCHAR Utf8_to_Utf16(const char *, int *); /* in ff.c */ 282 void Utf16_to_Utf8(unsigned char *, int *, UINT); /* in ff.c */ 283 241 284 #ifdef __cplusplus 242 285 extern "C" { 243 286 #endif 244 voidKernel_StartExternal(int argc, char **argv);287 int Kernel_StartExternal(int argc, char **argv); 245 288 #ifdef __cplusplus 246 289 } 247 290 #endif 248 291 249 #endif /* SHELLIF_H */ 292 void *malloc(size_t size); 293 void *calloc(size_t size, size_t count); 294 void *realloc(void *ptr, size_t size); 295 void free(void *ptr); 296 297 #ifdef __cplusplus 298 } 299 #endif 300 301 #endif /* _SHELLIF_H_ */
Note:
See TracChangeset
for help on using the changeset viewer.