Sming Framework API
()
Toggle main menu visibility
Sming
Arch
Host
Components
hostlib
include
hostlib
hostlib.h
Go to the documentation of this file.
1
20
#pragma once
21
22
// Required for sleep(), probably others
23
#undef _POSIX_C_SOURCE
24
#define _POSIX_C_SOURCE 200112L
25
26
#ifdef __WIN32
27
// Prevent early inclusion of winsock.h
28
#include <winsock2.h>
29
#endif
30
31
#include <fcntl.h>
32
#include <limits.h>
33
#include <stdint.h>
34
#include <stdbool.h>
35
#include <stddef.h>
36
#include <unistd.h>
37
38
#ifndef ARRAY_SIZE
39
#define ARRAY_SIZE(x) (int)(sizeof(x) / sizeof((x)[0]))
40
#endif
41
42
// Used for parameterised token pasting
43
#ifndef JOIN
44
#define JOIN_AGAIN(_a, _b) _a##_b
45
#define JOIN(_a, _b) JOIN_AGAIN(_a, _b)
46
#endif
47
48
#ifdef __cplusplus
49
extern
"C"
{
50
#endif
51
52
int
msleep
(
unsigned
ms);
53
60
size_t
getHostAppDir
(
char
* path,
size_t
bufSize);
61
62
#ifdef __cplusplus
63
}
64
#endif
getHostAppDir
size_t getHostAppDir(char *path, size_t bufSize)
Get directory where application is executing from.
msleep
int msleep(unsigned ms)
Generated by
1.8.13