rewrite comments into one, unified style
This commit is contained in:
1 parent
6260de0085
commit
467a58c9c6
163 files changed
+3560
-2556
No files matched your search
@@ -1,3 +1,5 @@
|
||||
// POSIX compatibility support for posix.
|
||||
|
||||
#pragma once
|
||||
// posix.h - POSIX type and constant definitions for posix.dll
|
||||
// Covers just what open/read/write/close/lseek/spawn/pthread/chdir need.
|
||||
@@ -6,9 +8,7 @@
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// errno
|
||||
// ---------------------------------------------------------------------------
|
||||
// errno.
|
||||
#ifdef errno
|
||||
#undef errno
|
||||
#endif
|
||||
@@ -59,9 +59,7 @@ extern int errno; // defined in posix_fd.c; single global in v1
|
||||
#define ETIMEDOUT 116
|
||||
#define ECONNRESET 104
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// open() flags
|
||||
// ---------------------------------------------------------------------------
|
||||
// open() flags.
|
||||
#define O_RDONLY 0x0000
|
||||
#define O_WRONLY 0x0001
|
||||
#define O_RDWR 0x0002
|
||||
@@ -69,25 +67,19 @@ extern int errno; // defined in posix_fd.c; single global in v1
|
||||
#define O_TRUNC 0x0200
|
||||
#define O_APPEND 0x0400
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// lseek() whence
|
||||
// ---------------------------------------------------------------------------
|
||||
// lseek() whence.
|
||||
#define SEEK_SET 0
|
||||
#define SEEK_CUR 1
|
||||
#define SEEK_END 2
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Scalar types
|
||||
// ---------------------------------------------------------------------------
|
||||
// Scalar types.
|
||||
typedef int32_t pid_t;
|
||||
typedef int32_t off_t;
|
||||
typedef uint32_t mode_t;
|
||||
typedef int64_t ssize_t;
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Sockets
|
||||
// ---------------------------------------------------------------------------
|
||||
// Sockets.
|
||||
typedef uint16_t sa_family_t;
|
||||
typedef uint16_t in_port_t;
|
||||
typedef uint32_t in_addr_t;
|
||||
@@ -195,25 +187,19 @@ __declspec(dllexport) struct hostent* gethostbyname(const char* name);
|
||||
__declspec(dllexport) int getaddrinfo(const char* node, const char* service, const struct addrinfo* hints, struct addrinfo** res);
|
||||
__declspec(dllexport) void freeaddrinfo(struct addrinfo* res);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// pthread types
|
||||
// ---------------------------------------------------------------------------
|
||||
// pthread types.
|
||||
typedef struct { uint32_t Tid; } pthread_t;
|
||||
typedef struct { uint32_t Handle; } pthread_mutex_t;
|
||||
typedef void* pthread_attr_t; // unused in v1
|
||||
typedef void* pthread_mutexattr_t;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// posix_spawn types (file_actions and attrp both ignored in v1)
|
||||
// ---------------------------------------------------------------------------
|
||||
// posix_spawn types (file_actions and attrp both ignored in v1).
|
||||
typedef void* posix_spawn_file_actions_t;
|
||||
typedef void* posix_spawnattr_t;
|
||||
|
||||
__declspec(dllexport) const char* posix_get_command_line(void);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// dirent (used by posix_dir.c)
|
||||
// ---------------------------------------------------------------------------
|
||||
// dirent (used by posix_dir.c).
|
||||
#define NAME_MAX 259
|
||||
|
||||
typedef struct dirent {
|
||||
|
||||
Reference in new issue
Block a user