aboutsummaryrefslogtreecommitdiffstats
path: root/libc/include
diff options
context:
space:
mode:
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/errno.h1
-rw-r--r--libc/include/pthread.h1
-rw-r--r--libc/include/resolv.h18
-rw-r--r--libc/include/sha1.h15
-rw-r--r--libc/include/sys/_system_properties.h3
5 files changed, 29 insertions, 9 deletions
diff --git a/libc/include/errno.h b/libc/include/errno.h
index 2b2685af4..cae0e3b78 100644
--- a/libc/include/errno.h
+++ b/libc/include/errno.h
@@ -45,6 +45,7 @@ __BEGIN_DECLS
extern int __set_errno(int error);
/* internal function returning the address of the thread-specific errno */
+__attribute__((const))
extern volatile int* __errno(void);
/* a macro expanding to the errno l-value */
diff --git a/libc/include/pthread.h b/libc/include/pthread.h
index f4591f1a0..6407a1991 100644
--- a/libc/include/pthread.h
+++ b/libc/include/pthread.h
@@ -146,6 +146,7 @@ void pthread_exit(void * retval);
int pthread_join(pthread_t thid, void ** ret_val);
int pthread_detach(pthread_t thid);
+__attribute__((const))
pthread_t pthread_self(void);
int pthread_equal(pthread_t one, pthread_t two);
diff --git a/libc/include/resolv.h b/libc/include/resolv.h
index 4247d68b7..7257d343d 100644
--- a/libc/include/resolv.h
+++ b/libc/include/resolv.h
@@ -34,12 +34,13 @@
#include <sys/socket.h>
#include <stdio.h>
#include <arpa/nameser.h>
+#include <netinet/in.h>
__BEGIN_DECLS
struct res_state;
-extern struct __res_state *__res_state(void);
+extern struct __res_state *__res_state(void) __attribute__((const));
#define _res (*__res_state())
/* Base-64 functions - because some code expects it there */
@@ -49,6 +50,21 @@ extern struct __res_state *__res_state(void);
extern int b64_ntop(u_char const *, size_t, char *, size_t);
extern int b64_pton(char const *, u_char *, size_t);
+/* Set name of default interface */
+extern void _resolv_set_default_iface(const char* ifname);
+
+/* set name servers for an interface */
+extern void _resolv_set_nameservers_for_iface(const char* ifname, char** servers, int numservers);
+
+/* tell resolver of the address of an interface */
+extern void _resolv_set_addr_of_iface(const char* ifname, struct in_addr* addr);
+
+/* flush the cache associated with the default interface */
+extern void _resolv_flush_cache_for_default_iface();
+
+/* flush the cache associated with a certain interface */
+extern void _resolv_flush_cache_for_iface(const char* ifname);
+
__END_DECLS
#endif /* _RESOLV_H_ */
diff --git a/libc/include/sha1.h b/libc/include/sha1.h
index f7ada46a5..bc51ac0c2 100644
--- a/libc/include/sha1.h
+++ b/libc/include/sha1.h
@@ -13,19 +13,20 @@
#include <sys/types.h>
#define SHA1_DIGEST_LENGTH 20
-#define SHA1_DIGEST_STRING_LENGTH 41
+#define SHA1_BLOCK_SIZE 64
typedef struct {
- uint32_t state[5];
- uint32_t count[2];
- u_char buffer[64];
+ uint64_t count;
+ uint32_t state[SHA1_DIGEST_LENGTH / 4];
+ uint8_t buffer[SHA1_BLOCK_SIZE];
} SHA1_CTX;
__BEGIN_DECLS
-void SHA1Transform(uint32_t[5], const u_char[64]);
+void SHA1Transform(uint32_t[SHA1_DIGEST_LENGTH/4],
+ const uint8_t[SHA1_BLOCK_SIZE]);
void SHA1Init(SHA1_CTX *);
-void SHA1Update(SHA1_CTX *, const u_char *, u_int);
-void SHA1Final(u_char[SHA1_DIGEST_LENGTH], SHA1_CTX *);
+void SHA1Update(SHA1_CTX *, const uint8_t *, unsigned int);
+void SHA1Final(uint8_t[SHA1_DIGEST_LENGTH], SHA1_CTX *);
__END_DECLS
#endif /* _SYS_SHA1_H_ */
diff --git a/libc/include/sys/_system_properties.h b/libc/include/sys/_system_properties.h
index 42a7f6c0f..95652c322 100644
--- a/libc/include/sys/_system_properties.h
+++ b/libc/include/sys/_system_properties.h
@@ -74,7 +74,8 @@ struct prop_msg
};
#define PROP_MSG_SETPROP 1
-
+#define PROP_MSG_SETPROP_SYNC 2
+
/*
** Rules:
**