Add errno setters to platform libs. (#1576)
This commit is contained in:
@@ -23,11 +23,20 @@ static int posix_errno() {
|
|||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void set_posix_errno(int value) {
|
||||||
|
errno = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Wrapper to access h_errno variable.
|
// Wrapper to access h_errno variable.
|
||||||
static int posix_h_errno() {
|
static int posix_h_errno() {
|
||||||
return h_errno;
|
return h_errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void set_posix_h_errno(int value) {
|
||||||
|
h_errno = value;
|
||||||
|
}
|
||||||
|
|
||||||
static int init_sockets() {
|
static int init_sockets() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,11 +22,19 @@ static int posix_errno() {
|
|||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void set_posix_errno(int value) {
|
||||||
|
errno = value;
|
||||||
|
}
|
||||||
|
|
||||||
// Wrapper to access h_errno variable.
|
// Wrapper to access h_errno variable.
|
||||||
static int posix_h_errno() {
|
static int posix_h_errno() {
|
||||||
return h_errno;
|
return h_errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void set_posix_h_errno(int value) {
|
||||||
|
h_errno = value;
|
||||||
|
}
|
||||||
|
|
||||||
static int init_sockets() {
|
static int init_sockets() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,11 +43,19 @@ static int posix_errno() {
|
|||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void set_posix_errno(int value) {
|
||||||
|
errno = value;
|
||||||
|
}
|
||||||
|
|
||||||
// Wrapper to access h_errno variable.
|
// Wrapper to access h_errno variable.
|
||||||
static int posix_h_errno() {
|
static int posix_h_errno() {
|
||||||
return h_errno;
|
return h_errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void set_posix_h_errno(int value) {
|
||||||
|
h_errno = value;
|
||||||
|
}
|
||||||
|
|
||||||
static short posix_htons(short x) {
|
static short posix_htons(short x) {
|
||||||
return htons(x);
|
return htons(x);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ static int posix_errno() {
|
|||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void set_posix_errno(int value) {
|
||||||
|
errno = value;
|
||||||
|
}
|
||||||
|
|
||||||
static short posix_htons(short x) {
|
static short posix_htons(short x) {
|
||||||
return htons(x);
|
return htons(x);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,11 +28,19 @@ static int posix_errno() {
|
|||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void set_posix_errno(int value) {
|
||||||
|
errno = value;
|
||||||
|
}
|
||||||
|
|
||||||
// Wrapper to access h_errno variable.
|
// Wrapper to access h_errno variable.
|
||||||
static int posix_h_errno() {
|
static int posix_h_errno() {
|
||||||
return h_errno;
|
return h_errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void set_posix_h_errno(int value) {
|
||||||
|
h_errno = value;
|
||||||
|
}
|
||||||
|
|
||||||
static short posix_htons(short x) {
|
static short posix_htons(short x) {
|
||||||
return htons(x);
|
return htons(x);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user