progress on x11
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
inline com_std_fd com_std_open(char *path, uint32_t flags) {
|
||||
inline com_std_fd com_std_open(char const *path, uint32_t flags) {
|
||||
com_std_assert(flags != 0);
|
||||
uint32_t mode = flags & COM_STD_OPEN_READ && flags & COM_STD_OPEN_WRITE
|
||||
? O_RDWR
|
||||
@@ -26,7 +26,7 @@ inline com_std_fd com_std_open(char *path, uint32_t flags) {
|
||||
return (void *)ret;
|
||||
}
|
||||
|
||||
inline bool com_std_write(com_std_fd fd, char const *data, uint32_t bytes) {
|
||||
inline bool com_std_write(com_std_fd fd, void const *data, uint32_t bytes) {
|
||||
long ret;
|
||||
__asm__ volatile("syscall"
|
||||
: "=a"(ret)
|
||||
@@ -35,7 +35,7 @@ inline bool com_std_write(com_std_fd fd, char const *data, uint32_t bytes) {
|
||||
return ret == bytes;
|
||||
}
|
||||
|
||||
inline int32_t com_std_read(com_std_fd fd, char *data, uint32_t upto) {
|
||||
inline int32_t com_std_read(com_std_fd fd, void *data, uint32_t upto) {
|
||||
long ret;
|
||||
__asm__ volatile("syscall"
|
||||
: "=a"(ret)
|
||||
@@ -67,7 +67,8 @@ inline com_std_fd com_std_socket(bool isnetwork) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline bool com_std_connect(com_std_fd fd, bool isnetwork, char *address) {
|
||||
inline bool com_std_connect(com_std_fd fd, bool isnetwork,
|
||||
char const *address) {
|
||||
com_std_assert(address != NULL);
|
||||
if (!isnetwork) {
|
||||
struct sockaddr_un addr = {.sun_family = AF_UNIX};
|
||||
|
||||
Reference in New Issue
Block a user