diff --git a/abis/aero/auxv.h b/abis/aero/auxv.h index a196fb55b..d46348dcc 100644 --- a/abis/aero/auxv.h +++ b/abis/aero/auxv.h @@ -6,4 +6,4 @@ #define AT_RANDOM 25 #define AT_EXECFN 31 -#endif // _ABIBITS_AUXV_H +#endif /* _ABIBITS_AUXV_H */ diff --git a/abis/ironclad/access.h b/abis/ironclad/access.h index bc19728c4..984bbed08 100644 --- a/abis/ironclad/access.h +++ b/abis/ironclad/access.h @@ -6,4 +6,4 @@ #define W_OK 4 #define X_OK 8 -#endif // _ABIBITS_ACCESS_H +#endif /* _ABIBITS_ACCESS_H */ diff --git a/abis/ironclad/blkcnt_t.h b/abis/ironclad/blkcnt_t.h index 51c151981..1222088fa 100644 --- a/abis/ironclad/blkcnt_t.h +++ b/abis/ironclad/blkcnt_t.h @@ -1,7 +1,7 @@ #ifndef _ABIBITS_BLKCNT_T_H #define _ABIBITS_BLKCNT_T_H -// TODO: use int64_t? +/* TODO: use int64_t? */ typedef long blkcnt_t; -#endif // _ABIBITS_BLKCNT_T_H +#endif /* _ABIBITS_BLKCNT_T_H */ diff --git a/abis/ironclad/blksize_t.h b/abis/ironclad/blksize_t.h index 9f87294c7..a0f23b25f 100644 --- a/abis/ironclad/blksize_t.h +++ b/abis/ironclad/blksize_t.h @@ -1,8 +1,8 @@ #ifndef _ABIBITS_BLKSIZE_T_H #define _ABIBITS_BLKSIZE_T_H -// TODO: use int64_t? +/* TODO: use int64_t? */ typedef long blksize_t; -#endif // _ABIBITS_BLKSIZE_T_H +#endif /* _ABIBITS_BLKSIZE_T_H */ diff --git a/abis/ironclad/dev_t.h b/abis/ironclad/dev_t.h index 0b63fe5de..bb83c72eb 100644 --- a/abis/ironclad/dev_t.h +++ b/abis/ironclad/dev_t.h @@ -3,4 +3,4 @@ typedef unsigned long dev_t; -#endif // _ABIBITS_DEV_T_H +#endif /* _ABIBITS_DEV_T_H */ diff --git a/abis/ironclad/epoll.h b/abis/ironclad/epoll.h index 49969d5f7..71ec2d532 100644 --- a/abis/ironclad/epoll.h +++ b/abis/ironclad/epoll.h @@ -3,4 +3,4 @@ #define EPOLL_CLOEXEC 1 -#endif // _ABIBITS_EPOLL_H +#endif /* _ABIBITS_EPOLL_H */ diff --git a/abis/ironclad/errno.h b/abis/ironclad/errno.h index f8c720300..b62182864 100644 --- a/abis/ironclad/errno.h +++ b/abis/ironclad/errno.h @@ -123,4 +123,4 @@ #define EIEIO 1524152434 -#endif // _ABIBITS_ERRNO_H +#endif /* _ABIBITS_ERRNO_H */ diff --git a/abis/ironclad/fcntl.h b/abis/ironclad/fcntl.h index 10188deb1..9bdda03b3 100644 --- a/abis/ironclad/fcntl.h +++ b/abis/ironclad/fcntl.h @@ -1,7 +1,7 @@ #ifndef _ABIBITS_FCNTL_H #define _ABIBITS_FCNTL_H -// Flags supported by the kernel. +/* Flags supported by the kernel. */ #define O_ACCMODE 0b000011 #define O_RDONLY 00000001 #define O_WRONLY 0b000010 @@ -11,15 +11,15 @@ #define O_NOFOLLOW 0b010000 #define O_NONBLOCK 0b100000 -// Flags emulated by userland, we just have to make sure they dont overlap with -// kernel flags. +/* Flags emulated by userland, we just have to make sure they dont overlap with */ +/* kernel flags. */ #define O_CREAT 0b0010000000 #define O_EXCL 0b0100000000 #define O_TRUNC 0b1000000000 -// Stubbed flags, the value really doesnt matter as long as they dont overlap -// with usable ones. -// Implemented here as some software needs them to compile. +/* Stubbed flags, the value really doesnt matter as long as they dont overlap */ +/* with usable ones. */ +/* Implemented here as some software needs them to compile. */ #define O_SEARCH 0b000000000010000000000 #define O_EXEC 0b000000000100000000000 #define O_NOCTTY 0b000000001000000000000 @@ -32,7 +32,7 @@ #define O_NOATIME 0b010000000000000000000 #define O_TMPFILE 0b100000000000000000000 -// Fcntl flags. +/* Fcntl flags. */ #define FD_CLOEXEC 1 #define F_DUPFD 1 #define F_DUPFD_CLOEXEC 2 @@ -50,7 +50,7 @@ #define F_UNLCK 2 #define F_WRLCK 3 -// Stubbed fcntl flags. +/* Stubbed fcntl flags. */ #define F_GETOWN 10 #define F_SETOWN 11 @@ -61,7 +61,7 @@ #define F_ADD_SEALS 1033 #define F_GET_SEALS 1034 -// At flags. +/* At flags. */ #define AT_REMOVEDIR 500 #define AT_EACCESS 512 #define AT_FDCWD 0x7FFFFFFF @@ -76,4 +76,4 @@ #define POSIX_FADV_WILLNEED 5 #define POSIX_FADV_RANDOM 6 -#endif // _ABIBITS_FCNTL_H +#endif /* _ABIBITS_FCNTL_H */ diff --git a/abis/ironclad/gid_t.h b/abis/ironclad/gid_t.h index 252321f53..c10e7aa85 100644 --- a/abis/ironclad/gid_t.h +++ b/abis/ironclad/gid_t.h @@ -3,4 +3,4 @@ typedef unsigned int gid_t; -#endif // _ABIBITS_GID_T_H +#endif /* _ABIBITS_GID_T_H */ diff --git a/abis/ironclad/in.h b/abis/ironclad/in.h index 3c736e3a3..2b703585c 100644 --- a/abis/ironclad/in.h +++ b/abis/ironclad/in.h @@ -165,4 +165,4 @@ struct group_source_req { #define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP #define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP -#endif // _ABIBITS_IN_H +#endif /* _ABIBITS_IN_H */ diff --git a/abis/ironclad/ino_t.h b/abis/ironclad/ino_t.h index 264d888f4..825a8126e 100644 --- a/abis/ironclad/ino_t.h +++ b/abis/ironclad/ino_t.h @@ -1,7 +1,7 @@ #ifndef _ABIBITS_INO_T_H #define _ABIBITS_INO_T_H -// TODO: use (u)int64_t? +/* TODO: use (u)int64_t? */ typedef long ino_t; -#endif // _ABIBITS_INO_T_H +#endif /* _ABIBITS_INO_T_H */ diff --git a/abis/ironclad/inotify.h b/abis/ironclad/inotify.h index 38c9c77da..f30a0bce1 100644 --- a/abis/ironclad/inotify.h +++ b/abis/ironclad/inotify.h @@ -4,4 +4,4 @@ #define IN_CLOEXEC 1 #define IN_NONBLOCK 2 -#endif // _ABIBITS_INOTIFY_H +#endif /* _ABIBITS_INOTIFY_H */ diff --git a/abis/ironclad/limits.h b/abis/ironclad/limits.h index 6aac6221f..9c7bdf1fd 100644 --- a/abis/ironclad/limits.h +++ b/abis/ironclad/limits.h @@ -3,12 +3,12 @@ #define IOV_MAX 1024 -// Niceness related +/* Niceness related */ #define NZERO 20 -// Maximum hostname length, posix defines it as 255 +/* Maximum hostname length, posix defines it as 255 */ #define HOST_NAME_MAX 255 #define OPEN_MAX 256 -#endif //_ABIBITS_LIMITS_H +#endif /*_ABIBITS_LIMITS_H */ diff --git a/abis/ironclad/mode_t.h b/abis/ironclad/mode_t.h index 77f75a9bd..d2158b214 100644 --- a/abis/ironclad/mode_t.h +++ b/abis/ironclad/mode_t.h @@ -3,4 +3,4 @@ typedef int mode_t; -#endif // _ABIBITS_MODE_T_H +#endif /* _ABIBITS_MODE_T_H */ diff --git a/abis/ironclad/nlink_t.h b/abis/ironclad/nlink_t.h index 30e178c70..009bbaa77 100644 --- a/abis/ironclad/nlink_t.h +++ b/abis/ironclad/nlink_t.h @@ -3,4 +3,4 @@ typedef int nlink_t; -#endif // _ABIBITS_NLINK_T_H +#endif /* _ABIBITS_NLINK_T_H */ diff --git a/abis/ironclad/packet.h b/abis/ironclad/packet.h index ee1a424f3..ae4b92eb2 100644 --- a/abis/ironclad/packet.h +++ b/abis/ironclad/packet.h @@ -3,4 +3,4 @@ #define PACKET_HOST 0 -#endif // _ABIBITS_PACKET_H +#endif /* _ABIBITS_PACKET_H */ diff --git a/abis/ironclad/pid_t.h b/abis/ironclad/pid_t.h index 5ffbd06b8..8ebf9ed86 100644 --- a/abis/ironclad/pid_t.h +++ b/abis/ironclad/pid_t.h @@ -3,4 +3,4 @@ typedef int pid_t; -#endif // _ABIBITS_PID_T_H +#endif /* _ABIBITS_PID_T_H */ diff --git a/abis/ironclad/poll.h b/abis/ironclad/poll.h index e0fe1a57c..c2ef284ab 100644 --- a/abis/ironclad/poll.h +++ b/abis/ironclad/poll.h @@ -13,4 +13,4 @@ #define POLLWRBAND 0x200 #define POLLRDBAND 0x400 -#endif // _ABIBITS_POLL_H +#endif /* _ABIBITS_POLL_H */ diff --git a/abis/ironclad/ptrace.h b/abis/ironclad/ptrace.h index 6f35eacc5..158bf678b 100644 --- a/abis/ironclad/ptrace.h +++ b/abis/ironclad/ptrace.h @@ -53,4 +53,4 @@ #define PTRACE_PEEKSIGINFO_SHARED 1 -#endif // _ABIBITS_PTRACE_H +#endif /* _ABIBITS_PTRACE_H */ diff --git a/abis/ironclad/reboot.h b/abis/ironclad/reboot.h index aadc18f2e..01bccec87 100644 --- a/abis/ironclad/reboot.h +++ b/abis/ironclad/reboot.h @@ -9,4 +9,4 @@ #define RB_SW_SUSPEND 0xd000fce2 #define RB_KEXEC 0x45584543 -#endif // _ABIBITS_REBOOT_H +#endif /* _ABIBITS_REBOOT_H */ diff --git a/abis/ironclad/resource.h b/abis/ironclad/resource.h index 927588b4b..6cb82b262 100644 --- a/abis/ironclad/resource.h +++ b/abis/ironclad/resource.h @@ -50,4 +50,4 @@ struct rusage { } #endif -#endif // _ABIBITS_RESOURCE_H +#endif /* _ABIBITS_RESOURCE_H */ diff --git a/abis/ironclad/seek-whence.h b/abis/ironclad/seek-whence.h index 617b6f41e..f7f8e7a8d 100644 --- a/abis/ironclad/seek-whence.h +++ b/abis/ironclad/seek-whence.h @@ -5,4 +5,4 @@ #define SEEK_CUR 2 #define SEEK_END 4 -#endif // _ABIBITS_SEEK_WHENCE_H +#endif /* _ABIBITS_SEEK_WHENCE_H */ diff --git a/abis/ironclad/signal.h b/abis/ironclad/signal.h index 2d2031582..3ecabad04 100644 --- a/abis/ironclad/signal.h +++ b/abis/ironclad/signal.h @@ -25,7 +25,7 @@ typedef struct { extern "C" { #endif -// Argument for signal() +/* Argument for signal() */ typedef void (*__sighandler) (int); #define SIG_ERR ((__sighandler)(void *)(-1)) @@ -68,13 +68,13 @@ typedef void (*__sighandler) (int); #define SIGRTMAX 33 #define SIGCANCEL SIGSYS -// siginfo->si_info constants -// SIGBUS +/* siginfo->si_info constants */ +/* SIGBUS */ #define BUS_ADRALN 1 #define BUS_ADRERR 2 #define BUS_OBJERR 3 -// SIGILL +/* SIGILL */ #define ILL_ILLOPC 1 #define ILL_ILLOPN 2 #define ILL_ILLADR 3 @@ -85,16 +85,16 @@ typedef void (*__sighandler) (int); #define ILL_BADSTK 8 #define ILL_BADIADDR 9 -// SIGSEGV +/* SIGSEGV */ #define SEGV_MAPERR 1 #define SEGV_ACCERR 2 -// TODO: replace this by uint64_t +/* TODO: replace this by uint64_t */ typedef long sigset_t; #define SIGUNUSED SIGSYS -// constants for sigprocmask() +/* constants for sigprocmask() */ #define SIG_BLOCK 1 #define SIG_UNBLOCK 2 #define SIG_SETMASK 3 @@ -118,7 +118,7 @@ typedef struct __stack { int ss_flags; } stack_t; -// constants for sigev_notify of struct sigevent +/* constants for sigev_notify of struct sigevent */ #define SIGEV_NONE 1 #define SIGEV_SIGNAL 2 #define SIGEV_THREAD 3 @@ -148,7 +148,7 @@ struct sigevent { int sigev_signo; union sigval sigev_value; void (*sigev_notify_function)(union sigval); - // MISSING: sigev_notify_attributes + /* MISSING: sigev_notify_attributes */ }; struct sigaction { @@ -161,7 +161,7 @@ struct sigaction { }; #if defined(__x86_64__) || defined(__aarch64__) -// TODO: This is wrong for AArch64. +/* TODO: This is wrong for AArch64. */ typedef struct { unsigned long oldmask; @@ -189,4 +189,4 @@ typedef struct __ucontext { } #endif -#endif // _ABIBITS_SIGNAL_H +#endif /* _ABIBITS_SIGNAL_H */ diff --git a/abis/ironclad/socket.h b/abis/ironclad/socket.h index 48b8178b9..d7754f456 100644 --- a/abis/ironclad/socket.h +++ b/abis/ironclad/socket.h @@ -44,7 +44,7 @@ struct cmsghdr { #define SCM_TIMESTAMP SO_TIMESTAMP #define SCM_TIMESTAMPNS SO_TIMESTAMPNS -//MISSING: CMSG_DATA, CMSG_NXTHDR, CMSG_FIRSTHDR +/*MISSING: CMSG_DATA, CMSG_NXTHDR, CMSG_FIRSTHDR */ #define SCM_CREDENTIALS 0x02 @@ -108,13 +108,13 @@ struct cmsghdr { #define MSG_FIN 0x200 #define MSG_CONFIRM 0x800 -// Linux extensions. +/* Linux extensions. */ #define MSG_DONTWAIT 0x1000 #define MSG_CMSG_CLOEXEC 0x2000 #define MSG_MORE 0x4000 #define MSG_FASTOPEN 0x20000000 -// GNU (?) extension: Protocol family constants. +/* GNU (?) extension: Protocol family constants. */ #define PF_INET 1 #define PF_INET6 2 diff --git a/abis/ironclad/stat.h b/abis/ironclad/stat.h index 3f55970e0..37f6aaa01 100644 --- a/abis/ironclad/stat.h +++ b/abis/ironclad/stat.h @@ -66,4 +66,4 @@ struct stat { } #endif -#endif // _ABIBITS_STAT_H +#endif /* _ABIBITS_STAT_H */ diff --git a/abis/ironclad/statvfs.h b/abis/ironclad/statvfs.h index d4fc41669..3b73bd817 100644 --- a/abis/ironclad/statvfs.h +++ b/abis/ironclad/statvfs.h @@ -8,7 +8,7 @@ #define ST_NOSUID 2 #define ST_MANDLOCK 64 -// On Linux, this struct is not directly used by the kernel. +/* On Linux, this struct is not directly used by the kernel. */ struct statvfs { unsigned long f_bsize; unsigned long f_frsize; diff --git a/abis/ironclad/termios.h b/abis/ironclad/termios.h index 4dd598763..475cd5bd5 100644 --- a/abis/ironclad/termios.h +++ b/abis/ironclad/termios.h @@ -5,7 +5,7 @@ typedef unsigned int cc_t; typedef unsigned int speed_t; typedef unsigned int tcflag_t; -// indices for the c_cc array in struct termios +/* indices for the c_cc array in struct termios */ #define NCCS 11 #define VEOF 0 #define VEOL 1 @@ -19,7 +19,7 @@ typedef unsigned int tcflag_t; #define VSUSP 9 #define VTIME 10 -// bitwise flags for c_iflag in struct termios +/* bitwise flags for c_iflag in struct termios */ #define BRKINT 0x0001 #define ICRNL 0x0002 #define IGNBRK 0x0004 @@ -36,7 +36,7 @@ typedef unsigned int tcflag_t; #define IMAXBEL 0020000 #define ECHOKE 0004000 -// bitwise flags for c_oflag in struct termios +/* bitwise flags for c_oflag in struct termios */ #define OPOST 0x0001 #define ONLCR 0x0002 #define OCRNL 0x0004 @@ -73,7 +73,7 @@ typedef unsigned int tcflag_t; #define FF0 0x0000 #define FF1 0x4000 -// bitwise constants for c_cflag in struct termios +/* bitwise constants for c_cflag in struct termios */ #define CSIZE 0x0003 #define CS5 0x0000 #define CS6 0x0001 @@ -91,7 +91,7 @@ typedef unsigned int tcflag_t; #define CBAUD 0x100F #endif -// bitwise constants for c_lflag in struct termios +/* bitwise constants for c_lflag in struct termios */ #define ECHO 0x0001 #define ECHOE 0x0002 #define ECHOK 0x0004 diff --git a/abis/ironclad/time.h b/abis/ironclad/time.h index 3f49db3c4..dfc342ed2 100644 --- a/abis/ironclad/time.h +++ b/abis/ironclad/time.h @@ -12,4 +12,4 @@ struct itimerval { #define ITIMER_VIRTUAL 1 #define ITIMER_PROF 2 -#endif // _ABIBITS_TIME_H +#endif /* _ABIBITS_TIME_H */ diff --git a/abis/ironclad/uid_t.h b/abis/ironclad/uid_t.h index 1688d07f7..d39fa5fcc 100644 --- a/abis/ironclad/uid_t.h +++ b/abis/ironclad/uid_t.h @@ -3,4 +3,4 @@ typedef unsigned int uid_t; -#endif // _ABIBITS_UID_T_H +#endif /* _ABIBITS_UID_T_H */ diff --git a/abis/ironclad/utsname.h b/abis/ironclad/utsname.h index 2cd222652..598746ff0 100644 --- a/abis/ironclad/utsname.h +++ b/abis/ironclad/utsname.h @@ -9,4 +9,4 @@ struct utsname { char machine[65]; }; -#endif // _ABIBITS_UTSNAME_T_H +#endif /* _ABIBITS_UTSNAME_T_H */ diff --git a/abis/ironclad/vm-flags.h b/abis/ironclad/vm-flags.h index a686cd3c0..86628a487 100644 --- a/abis/ironclad/vm-flags.h +++ b/abis/ironclad/vm-flags.h @@ -36,11 +36,11 @@ #define MADV_DONTNEED 4 #define MADV_FREE 8 -// Linux extensions: +/* Linux extensions: */ #define MREMAP_MAYMOVE 1 #define MREMAP_FIXED 2 #define MFD_CLOEXEC 1U #define MFD_ALLOW_SEALING 2U -#endif // _ABIBITS_MMAP_FLAGS_H +#endif /* _ABIBITS_MMAP_FLAGS_H */ diff --git a/abis/ironclad/wait.h b/abis/ironclad/wait.h index 5aa6bb820..f7fd89c2b 100644 --- a/abis/ironclad/wait.h +++ b/abis/ironclad/wait.h @@ -22,4 +22,4 @@ #define WTERMSIG(x) (((x) & 0xFF000000) >> 24) #define WCOREDUMP(x) ((x) & WCOREFLAG) -#endif //_ABIBITS_WAIT_H +#endif /*_ABIBITS_WAIT_H */ diff --git a/abis/linux/access.h b/abis/linux/access.h index f76ca620b..320044a6f 100644 --- a/abis/linux/access.h +++ b/abis/linux/access.h @@ -6,4 +6,4 @@ #define W_OK 2 #define R_OK 4 -#endif // _ABIBITS_ACCESS_H +#endif /* _ABIBITS_ACCESS_H */ diff --git a/abis/linux/auxv.h b/abis/linux/auxv.h index 8eb80491f..0206fd111 100644 --- a/abis/linux/auxv.h +++ b/abis/linux/auxv.h @@ -10,4 +10,4 @@ #define AT_EXECFN 31 #define AT_SYSINFO_EHDR 33 -#endif // _ABIBITS_AUXV_H +#endif /* _ABIBITS_AUXV_H */ diff --git a/abis/linux/blkcnt_t.h b/abis/linux/blkcnt_t.h index c4b45051e..fbbb9b8b5 100644 --- a/abis/linux/blkcnt_t.h +++ b/abis/linux/blkcnt_t.h @@ -5,4 +5,4 @@ typedef __mlibc_int64 blkcnt_t; -#endif // _ABIBITS_BLKCNT_T_H +#endif /* _ABIBITS_BLKCNT_T_H */ diff --git a/abis/linux/blksize_t.h b/abis/linux/blksize_t.h index afabadb81..02b207a7f 100644 --- a/abis/linux/blksize_t.h +++ b/abis/linux/blksize_t.h @@ -4,5 +4,5 @@ typedef long blksize_t; -#endif // _ABIBITS_BLKSIZE_T_H +#endif /* _ABIBITS_BLKSIZE_T_H */ diff --git a/abis/linux/dev_t.h b/abis/linux/dev_t.h index 839a44578..c39ab67f4 100644 --- a/abis/linux/dev_t.h +++ b/abis/linux/dev_t.h @@ -6,5 +6,5 @@ typedef __mlibc_uint64 dev_t; -#endif // _ABIBITS_DEV_T_H +#endif /* _ABIBITS_DEV_T_H */ diff --git a/abis/linux/epoll.h b/abis/linux/epoll.h index 0b984b646..cc5609d7d 100644 --- a/abis/linux/epoll.h +++ b/abis/linux/epoll.h @@ -1,6 +1,6 @@ #ifndef _ABIBITS_EPOLL_H #define _ABIBITS_EPOLL_H -#define EPOLL_CLOEXEC 02000000 // Same as __MLIBC_O_CLOEXEC +#define EPOLL_CLOEXEC 02000000 /* Same as __MLIBC_O_CLOEXEC */ -#endif // _ABIBITS_EPOLL_H +#endif /* _ABIBITS_EPOLL_H */ diff --git a/abis/linux/errno.h b/abis/linux/errno.h index b2680e39b..bac314f0c 100644 --- a/abis/linux/errno.h +++ b/abis/linux/errno.h @@ -137,7 +137,7 @@ #define EHWPOISON 133 -// This is mlibc-specific. +/* This is mlibc-specific. */ #define EIEIO 4095 -#endif // _ABIBITS_ERRNO_H +#endif /* _ABIBITS_ERRNO_H */ diff --git a/abis/linux/fcntl.h b/abis/linux/fcntl.h index 9af24b0f5..9e56ed231 100644 --- a/abis/linux/fcntl.h +++ b/abis/linux/fcntl.h @@ -93,4 +93,4 @@ struct f_owner_ex { #define POSIX_FADV_DONTNEED 4 #define POSIX_FADV_NOREUSE 5 -#endif // _ABIBITS_FCNTL_H +#endif /* _ABIBITS_FCNTL_H */ diff --git a/abis/linux/gid_t.h b/abis/linux/gid_t.h index 65afa401f..f513e250d 100644 --- a/abis/linux/gid_t.h +++ b/abis/linux/gid_t.h @@ -4,5 +4,5 @@ typedef unsigned int gid_t; -#endif // _ABIBITS_GID_T_H +#endif /* _ABIBITS_GID_T_H */ diff --git a/abis/linux/in.h b/abis/linux/in.h index 87bc25f9b..53f4944c0 100644 --- a/abis/linux/in.h +++ b/abis/linux/in.h @@ -215,4 +215,4 @@ struct group_source_req { #define __UAPI_DEF_IN6_PKTINFO 0 #define __UAPI_DEF_IP6_MTUINFO 0 -#endif // _ABITBITS_IN_H +#endif /* _ABITBITS_IN_H */ diff --git a/abis/linux/ino_t.h b/abis/linux/ino_t.h index ba076f409..edf795dcc 100644 --- a/abis/linux/ino_t.h +++ b/abis/linux/ino_t.h @@ -6,5 +6,5 @@ typedef __mlibc_uint64 ino_t; -#endif // _ABIBITS_INO_T_H +#endif /* _ABIBITS_INO_T_H */ diff --git a/abis/linux/inotify.h b/abis/linux/inotify.h index 4a0bd4cbb..640339c3b 100644 --- a/abis/linux/inotify.h +++ b/abis/linux/inotify.h @@ -6,4 +6,4 @@ #define IN_CLOEXEC O_CLOEXEC #define IN_NONBLOCK O_NONBLOCK -#endif // _ABIBITS_INOTIFY_H +#endif /* _ABIBITS_INOTIFY_H */ diff --git a/abis/linux/limits.h b/abis/linux/limits.h index 07a52c1b7..1363bc0f5 100644 --- a/abis/linux/limits.h +++ b/abis/linux/limits.h @@ -7,4 +7,4 @@ #define NAME_MAX 255 #define OPEN_MAX 256 -#endif //_ABIBITS_LIMITS_H +#endif /*_ABIBITS_LIMITS_H */ diff --git a/abis/linux/mode_t.h b/abis/linux/mode_t.h index 8374c1250..8deed27f1 100644 --- a/abis/linux/mode_t.h +++ b/abis/linux/mode_t.h @@ -4,5 +4,5 @@ typedef unsigned int mode_t; -#endif // _ABIBITS_MODE_T_H +#endif /* _ABIBITS_MODE_T_H */ diff --git a/abis/linux/nlink_t.h b/abis/linux/nlink_t.h index e0d9322d9..eb15553cd 100644 --- a/abis/linux/nlink_t.h +++ b/abis/linux/nlink_t.h @@ -4,5 +4,5 @@ typedef unsigned long nlink_t; -#endif // _ABIBITS_NLINK_T_H +#endif /* _ABIBITS_NLINK_T_H */ diff --git a/abis/linux/packet.h b/abis/linux/packet.h index ee1a424f3..ae4b92eb2 100644 --- a/abis/linux/packet.h +++ b/abis/linux/packet.h @@ -3,4 +3,4 @@ #define PACKET_HOST 0 -#endif // _ABIBITS_PACKET_H +#endif /* _ABIBITS_PACKET_H */ diff --git a/abis/linux/pid_t.h b/abis/linux/pid_t.h index 323168e60..9591edb35 100644 --- a/abis/linux/pid_t.h +++ b/abis/linux/pid_t.h @@ -4,5 +4,5 @@ typedef int pid_t; -#endif // _ABIBITS_PID_T_H +#endif /* _ABIBITS_PID_T_H */ diff --git a/abis/linux/poll.h b/abis/linux/poll.h index 1585b46f9..780d4394e 100644 --- a/abis/linux/poll.h +++ b/abis/linux/poll.h @@ -13,4 +13,4 @@ #define POLLWRBAND 0x0200 #define POLLRDHUP 0x2000 -#endif // _ABIBITS_POLL_H +#endif /* _ABIBITS_POLL_H */ diff --git a/abis/linux/ptrace.h b/abis/linux/ptrace.h index 3d73aa173..f279e15d8 100644 --- a/abis/linux/ptrace.h +++ b/abis/linux/ptrace.h @@ -56,4 +56,4 @@ #define PTRACE_PEEKSIGINFO_SHARED 1 -#endif // _ABIBITS_PTRACE_H +#endif /* _ABIBITS_PTRACE_H */ diff --git a/abis/linux/reboot.h b/abis/linux/reboot.h index aadc18f2e..01bccec87 100644 --- a/abis/linux/reboot.h +++ b/abis/linux/reboot.h @@ -9,4 +9,4 @@ #define RB_SW_SUSPEND 0xd000fce2 #define RB_KEXEC 0x45584543 -#endif // _ABIBITS_REBOOT_H +#endif /* _ABIBITS_REBOOT_H */ diff --git a/abis/linux/resource.h b/abis/linux/resource.h index 8bc84b01c..57d2de4d4 100644 --- a/abis/linux/resource.h +++ b/abis/linux/resource.h @@ -51,4 +51,4 @@ struct rusage { } #endif -#endif // _ABIBITS_RESOURCE_H +#endif /* _ABIBITS_RESOURCE_H */ diff --git a/abis/linux/seek-whence.h b/abis/linux/seek-whence.h index 47a5b0e95..7add0a15c 100644 --- a/abis/linux/seek-whence.h +++ b/abis/linux/seek-whence.h @@ -7,4 +7,4 @@ #define SEEK_DATA 3 #define SEEK_HOLE 4 -#endif // _ABIBITS_SEEK_WHENCE_H +#endif /* _ABIBITS_SEEK_WHENCE_H */ diff --git a/abis/linux/signal.h b/abis/linux/signal.h index 3d0aa6ccf..0cf224129 100644 --- a/abis/linux/signal.h +++ b/abis/linux/signal.h @@ -19,7 +19,7 @@ union sigval { void *sival_ptr; }; -// struct taken from musl. +/* struct taken from musl. */ typedef struct { int si_signo, si_errno, si_code; @@ -87,7 +87,7 @@ typedef struct { #define si_syscall __si_fields.__sigsys.si_syscall #define si_arch __si_fields.__sigsys.si_arch -// Required for sys_sigaction sysdep. +/* Required for sys_sigaction sysdep. */ #define SA_NOCLDSTOP 1 #define SA_NOCLDWAIT 2 #define SA_SIGINFO 4 @@ -101,7 +101,7 @@ typedef struct { extern "C" { #endif -// Argument for signal() +/* Argument for signal() */ typedef void (*__sighandler) (int); #define SIG_ERR ((__sighandler)(void *)(-1)) @@ -124,7 +124,7 @@ typedef struct { unsigned long sig[1024 / (8 * sizeof(long))]; } sigset_t; -// constants for sigprocmask() +/* constants for sigprocmask() */ #define SIG_BLOCK 0 #define SIG_UNBLOCK 1 #define SIG_SETMASK 2 @@ -167,7 +167,7 @@ typedef struct __stack { size_t ss_size; } stack_t; -// constants for sigev_notify of struct sigevent +/* constants for sigev_notify of struct sigevent */ #define SIGEV_SIGNAL 0 #define SIGEV_NONE 1 #define SIGEV_THREAD 2 @@ -276,7 +276,7 @@ struct sigaction { #define sa_handler __sa_handler.sa_handler #define sa_sigaction __sa_handler.sa_sigaction -// Taken from the linux kernel headers +/* Taken from the linux kernel headers */ #if defined(__x86_64__) || defined(__i386__) @@ -320,7 +320,7 @@ struct _fpstate { uint16_t status; uint16_t magic; - // FXSR FPU + /* FXSR FPU */ uint32_t _fxsr_env[6]; uint32_t mxscr; @@ -347,7 +347,7 @@ typedef struct __ucontext { } ucontext_t; #elif defined(__riscv) && __riscv_xlen == 64 -// Definitions from Linux kernel headers. +/* Definitions from Linux kernel headers. */ #define NGREG 32 @@ -496,4 +496,4 @@ typedef struct __ucontext { } #endif -#endif // _ABIBITS_SIGNAL_H +#endif /* _ABIBITS_SIGNAL_H */ diff --git a/abis/linux/stat.h b/abis/linux/stat.h index 96b8e9848..1369d23b7 100644 --- a/abis/linux/stat.h +++ b/abis/linux/stat.h @@ -108,9 +108,9 @@ struct stat { } __st_atim32, __st_mtim32, __st_ctim32; ino_t st_ino; - // These fields are not in the ABI. Their values are - // copied from __st_atim32, __st_mtim32, __st_ctim32 - // accordingly. + /* These fields are not in the ABI. Their values are */ + /* copied from __st_atim32, __st_mtim32, __st_ctim32 */ + /* accordingly. */ struct timespec st_atim; struct timespec st_mtim; @@ -125,4 +125,4 @@ struct stat { } #endif -#endif // _ABIBITS_STAT_H +#endif /* _ABIBITS_STAT_H */ diff --git a/abis/linux/statvfs.h b/abis/linux/statvfs.h index 0fd011b41..03048e759 100644 --- a/abis/linux/statvfs.h +++ b/abis/linux/statvfs.h @@ -8,7 +8,7 @@ #define ST_NOSUID 2 #define ST_MANDLOCK 64 -// On Linux, this struct is not directly used by the kernel. +/* On Linux, this struct is not directly used by the kernel. */ /* WARNING: keep `statvfs` and `statvfs64` in sync or bad things will happen! */ struct statvfs { diff --git a/abis/linux/termios.h b/abis/linux/termios.h index 3ee43d03c..7cc387f18 100644 --- a/abis/linux/termios.h +++ b/abis/linux/termios.h @@ -5,7 +5,7 @@ typedef unsigned char cc_t; typedef unsigned int speed_t; typedef unsigned int tcflag_t; -// indices for the c_cc array in struct termios +/* indices for the c_cc array in struct termios */ #define NCCS 32 #define VINTR 0 #define VQUIT 1 @@ -25,7 +25,7 @@ typedef unsigned int tcflag_t; #define VLNEXT 15 #define VEOL2 16 -// bitwise flags for c_iflag in struct termios +/* bitwise flags for c_iflag in struct termios */ #define IGNBRK 0000001 #define BRKINT 0000002 #define IGNPAR 0000004 @@ -42,7 +42,7 @@ typedef unsigned int tcflag_t; #define IMAXBEL 0020000 #define IUTF8 0040000 -// bitwise flags for c_oflag in struct termios +/* bitwise flags for c_oflag in struct termios */ #define OPOST 0000001 #define OLCUC 0000002 #define ONLCR 0000004 @@ -84,7 +84,7 @@ typedef unsigned int tcflag_t; #define VT0 0000000 #define VT1 0040000 -// bitwise constants for c_cflag in struct termios +/* bitwise constants for c_cflag in struct termios */ #define CSIZE 0000060 #define CS5 0000000 #define CS6 0000020 @@ -98,7 +98,7 @@ typedef unsigned int tcflag_t; #define HUPCL 0002000 #define CLOCAL 0004000 -// bitwise constants for c_lflag in struct termios +/* bitwise constants for c_lflag in struct termios */ #define ISIG 0000001 #define ICANON 0000002 #define ECHO 0000010 diff --git a/abis/linux/time.h b/abis/linux/time.h index 3f49db3c4..dfc342ed2 100644 --- a/abis/linux/time.h +++ b/abis/linux/time.h @@ -12,4 +12,4 @@ struct itimerval { #define ITIMER_VIRTUAL 1 #define ITIMER_PROF 2 -#endif // _ABIBITS_TIME_H +#endif /* _ABIBITS_TIME_H */ diff --git a/abis/linux/uid_t.h b/abis/linux/uid_t.h index 5b53ca309..976540b12 100644 --- a/abis/linux/uid_t.h +++ b/abis/linux/uid_t.h @@ -4,5 +4,5 @@ typedef unsigned int uid_t; -#endif // _ABIBITS_UID_T_H +#endif /* _ABIBITS_UID_T_H */ diff --git a/abis/linux/utsname.h b/abis/linux/utsname.h index 9875a46eb..d0f9a6168 100644 --- a/abis/linux/utsname.h +++ b/abis/linux/utsname.h @@ -10,4 +10,4 @@ struct utsname { char domainname[65]; }; -#endif // _ABIBITS_UTSNAME_T_H +#endif /* _ABIBITS_UTSNAME_T_H */ diff --git a/abis/linux/vm-flags.h b/abis/linux/vm-flags.h index 3f8137c66..2e6275afc 100644 --- a/abis/linux/vm-flags.h +++ b/abis/linux/vm-flags.h @@ -67,4 +67,4 @@ #define MFD_ALLOW_SEALING 2U #define MFD_HUGETLB 4U -#endif // _ABIBITS_VM_FLAGS_H +#endif /* _ABIBITS_VM_FLAGS_H */ diff --git a/abis/linux/vt.h b/abis/linux/vt.h index 811933b69..8ad19ceb7 100644 --- a/abis/linux/vt.h +++ b/abis/linux/vt.h @@ -73,4 +73,4 @@ struct vt_setactivate { struct vt_mode mode; }; -#endif // _ABIBITS_VT_H +#endif /* _ABIBITS_VT_H */ diff --git a/abis/linux/wait.h b/abis/linux/wait.h index 58d146253..fb9a9aeba 100644 --- a/abis/linux/wait.h +++ b/abis/linux/wait.h @@ -25,4 +25,4 @@ /* glibc extension, but also useful for kernels */ #define W_EXITCODE(ret, sig) (((ret) << 8) | (sig)) -#endif //_ABIBITS_WAIT_H +#endif /*_ABIBITS_WAIT_H */ diff --git a/abis/lyre/statvfs.h b/abis/lyre/statvfs.h index 7f53fc00f..062896621 100644 --- a/abis/lyre/statvfs.h +++ b/abis/lyre/statvfs.h @@ -10,7 +10,7 @@ #define FSTYPSZ 16 -// On Linux, this struct is not directly used by the kernel. +/* On Linux, this struct is not directly used by the kernel. */ struct statvfs { unsigned long f_bsize; unsigned long f_frsize; diff --git a/abis/managarm/auxv.h b/abis/managarm/auxv.h index 5db7f036e..b6e7bfe76 100644 --- a/abis/managarm/auxv.h +++ b/abis/managarm/auxv.h @@ -6,11 +6,11 @@ #define AT_EXECFN 31 #define AT_SYSINFO_EHDR 33 -// managarm specific auxvector entries. +/* managarm specific auxvector entries. */ #define AT_XPIPE 0x1000 #define AT_OPENFILES 0x1001 #define AT_FS_SERVER 0x1102 #define AT_MBUS_SERVER 0x1103 -#endif // _ABIBITS_AUXV_H +#endif /* _ABIBITS_AUXV_H */ diff --git a/abis/mlibc/access.h b/abis/mlibc/access.h index bc19728c4..984bbed08 100644 --- a/abis/mlibc/access.h +++ b/abis/mlibc/access.h @@ -6,4 +6,4 @@ #define W_OK 4 #define X_OK 8 -#endif // _ABIBITS_ACCESS_H +#endif /* _ABIBITS_ACCESS_H */ diff --git a/abis/mlibc/blkcnt_t.h b/abis/mlibc/blkcnt_t.h index 51c151981..1222088fa 100644 --- a/abis/mlibc/blkcnt_t.h +++ b/abis/mlibc/blkcnt_t.h @@ -1,7 +1,7 @@ #ifndef _ABIBITS_BLKCNT_T_H #define _ABIBITS_BLKCNT_T_H -// TODO: use int64_t? +/* TODO: use int64_t? */ typedef long blkcnt_t; -#endif // _ABIBITS_BLKCNT_T_H +#endif /* _ABIBITS_BLKCNT_T_H */ diff --git a/abis/mlibc/blksize_t.h b/abis/mlibc/blksize_t.h index 9363a500a..e4c9f3f7a 100644 --- a/abis/mlibc/blksize_t.h +++ b/abis/mlibc/blksize_t.h @@ -2,8 +2,8 @@ #ifndef _ABIBITS_BLKSIZE_T_H #define _ABIBITS_BLKSIZE_T_H -// TODO: use int64_t? +/* TODO: use int64_t? */ typedef long blksize_t; -#endif // _ABIBITS_BLKSIZE_T_H +#endif /* _ABIBITS_BLKSIZE_T_H */ diff --git a/abis/mlibc/dev_t.h b/abis/mlibc/dev_t.h index 2481af347..16ccd6967 100644 --- a/abis/mlibc/dev_t.h +++ b/abis/mlibc/dev_t.h @@ -4,5 +4,5 @@ typedef unsigned long dev_t; -#endif // _ABIBITS_DEV_T_H +#endif /* _ABIBITS_DEV_T_H */ diff --git a/abis/mlibc/epoll.h b/abis/mlibc/epoll.h index 49969d5f7..71ec2d532 100644 --- a/abis/mlibc/epoll.h +++ b/abis/mlibc/epoll.h @@ -3,4 +3,4 @@ #define EPOLL_CLOEXEC 1 -#endif // _ABIBITS_EPOLL_H +#endif /* _ABIBITS_EPOLL_H */ diff --git a/abis/mlibc/errno.h b/abis/mlibc/errno.h index f8c720300..b62182864 100644 --- a/abis/mlibc/errno.h +++ b/abis/mlibc/errno.h @@ -123,4 +123,4 @@ #define EIEIO 1524152434 -#endif // _ABIBITS_ERRNO_H +#endif /* _ABIBITS_ERRNO_H */ diff --git a/abis/mlibc/fcntl.h b/abis/mlibc/fcntl.h index 359a338b9..1fb8ac6ca 100644 --- a/abis/mlibc/fcntl.h +++ b/abis/mlibc/fcntl.h @@ -1,7 +1,7 @@ #ifndef _ABIBITS_FCNTL_H #define _ABIBITS_FCNTL_H -// reserve 3 bits for the access mode +/* reserve 3 bits for the access mode */ #define O_ACCMODE 0x0007 #define O_EXEC 1 #define O_RDONLY 2 @@ -9,7 +9,7 @@ #define O_SEARCH 4 #define O_WRONLY 5 -// these flags get their own bit +/* these flags get their own bit */ #define O_APPEND 0x000008 #define O_CREAT 0x000010 #define O_DIRECTORY 0x000020 @@ -29,7 +29,7 @@ #define O_TMPFILE 0x080000 #define O_DIRECT 0x100000 -// constants for fcntl()'s command argument +/* constants for fcntl()'s command argument */ #define F_DUPFD 1 #define F_DUPFD_CLOEXEC 2 #define F_GETFD 3 @@ -44,15 +44,15 @@ #define F_GETOWN 10 #define F_SETOWN 11 -// constants for struct flock's l_type member +/* constants for struct flock's l_type member */ #define F_RDLCK 1 #define F_UNLCK 2 #define F_WRLCK 3 -// constants for fcntl()'s additional argument of F_GETFD and F_SETFD +/* constants for fcntl()'s additional argument of F_GETFD and F_SETFD */ #define FD_CLOEXEC 1 -// Used by mmap +/* Used by mmap */ #define F_SEAL_SHRINK 0x0002 #define F_SEAL_GROW 0x0004 #define F_SEAL_WRITE 0x0008 @@ -80,4 +80,4 @@ #define POSIX_FADV_WILLNEED 5 #define POSIX_FADV_RANDOM 6 -#endif // _ABITBITS_FCNTL_H +#endif /* _ABITBITS_FCNTL_H */ diff --git a/abis/mlibc/gid_t.h b/abis/mlibc/gid_t.h index 65afa401f..f513e250d 100644 --- a/abis/mlibc/gid_t.h +++ b/abis/mlibc/gid_t.h @@ -4,5 +4,5 @@ typedef unsigned int gid_t; -#endif // _ABIBITS_GID_T_H +#endif /* _ABIBITS_GID_T_H */ diff --git a/abis/mlibc/in.h b/abis/mlibc/in.h index 3c55ecd37..3b4df5b2a 100644 --- a/abis/mlibc/in.h +++ b/abis/mlibc/in.h @@ -166,4 +166,4 @@ struct group_source_req { #define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP #define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP -#endif // _ABIBITS_IN_H +#endif /* _ABIBITS_IN_H */ diff --git a/abis/mlibc/ino_t.h b/abis/mlibc/ino_t.h index a80249f3d..049e16ec7 100644 --- a/abis/mlibc/ino_t.h +++ b/abis/mlibc/ino_t.h @@ -2,8 +2,8 @@ #ifndef _ABIBITS_INO_T_H #define _ABIBITS_INO_T_H -// TODO: use (u)int64_t? +/* TODO: use (u)int64_t? */ typedef long ino_t; -#endif // _ABIBITS_INO_T_H +#endif /* _ABIBITS_INO_T_H */ diff --git a/abis/mlibc/inotify.h b/abis/mlibc/inotify.h index 38c9c77da..f30a0bce1 100644 --- a/abis/mlibc/inotify.h +++ b/abis/mlibc/inotify.h @@ -4,4 +4,4 @@ #define IN_CLOEXEC 1 #define IN_NONBLOCK 2 -#endif // _ABIBITS_INOTIFY_H +#endif /* _ABIBITS_INOTIFY_H */ diff --git a/abis/mlibc/limits.h b/abis/mlibc/limits.h index 6aac6221f..9c7bdf1fd 100644 --- a/abis/mlibc/limits.h +++ b/abis/mlibc/limits.h @@ -3,12 +3,12 @@ #define IOV_MAX 1024 -// Niceness related +/* Niceness related */ #define NZERO 20 -// Maximum hostname length, posix defines it as 255 +/* Maximum hostname length, posix defines it as 255 */ #define HOST_NAME_MAX 255 #define OPEN_MAX 256 -#endif //_ABIBITS_LIMITS_H +#endif /*_ABIBITS_LIMITS_H */ diff --git a/abis/mlibc/mode_t.h b/abis/mlibc/mode_t.h index c8332998f..b1a11f371 100644 --- a/abis/mlibc/mode_t.h +++ b/abis/mlibc/mode_t.h @@ -4,5 +4,5 @@ typedef int mode_t; -#endif // _ABIBITS_MODE_T_H +#endif /* _ABIBITS_MODE_T_H */ diff --git a/abis/mlibc/nlink_t.h b/abis/mlibc/nlink_t.h index cb1e76b4f..49c7e0f55 100644 --- a/abis/mlibc/nlink_t.h +++ b/abis/mlibc/nlink_t.h @@ -4,5 +4,5 @@ typedef int nlink_t; -#endif // _ABIBITS_NLINK_T_H +#endif /* _ABIBITS_NLINK_T_H */ diff --git a/abis/mlibc/packet.h b/abis/mlibc/packet.h index ee1a424f3..ae4b92eb2 100644 --- a/abis/mlibc/packet.h +++ b/abis/mlibc/packet.h @@ -3,4 +3,4 @@ #define PACKET_HOST 0 -#endif // _ABIBITS_PACKET_H +#endif /* _ABIBITS_PACKET_H */ diff --git a/abis/mlibc/pid_t.h b/abis/mlibc/pid_t.h index 323168e60..9591edb35 100644 --- a/abis/mlibc/pid_t.h +++ b/abis/mlibc/pid_t.h @@ -4,5 +4,5 @@ typedef int pid_t; -#endif // _ABIBITS_PID_T_H +#endif /* _ABIBITS_PID_T_H */ diff --git a/abis/mlibc/poll.h b/abis/mlibc/poll.h index e0fe1a57c..c2ef284ab 100644 --- a/abis/mlibc/poll.h +++ b/abis/mlibc/poll.h @@ -13,4 +13,4 @@ #define POLLWRBAND 0x200 #define POLLRDBAND 0x400 -#endif // _ABIBITS_POLL_H +#endif /* _ABIBITS_POLL_H */ diff --git a/abis/mlibc/ptrace.h b/abis/mlibc/ptrace.h index 6f35eacc5..158bf678b 100644 --- a/abis/mlibc/ptrace.h +++ b/abis/mlibc/ptrace.h @@ -53,4 +53,4 @@ #define PTRACE_PEEKSIGINFO_SHARED 1 -#endif // _ABIBITS_PTRACE_H +#endif /* _ABIBITS_PTRACE_H */ diff --git a/abis/mlibc/resource.h b/abis/mlibc/resource.h index 927588b4b..6cb82b262 100644 --- a/abis/mlibc/resource.h +++ b/abis/mlibc/resource.h @@ -50,4 +50,4 @@ struct rusage { } #endif -#endif // _ABIBITS_RESOURCE_H +#endif /* _ABIBITS_RESOURCE_H */ diff --git a/abis/mlibc/seek-whence.h b/abis/mlibc/seek-whence.h index 5af138b87..4d986e96e 100644 --- a/abis/mlibc/seek-whence.h +++ b/abis/mlibc/seek-whence.h @@ -7,4 +7,4 @@ #define SEEK_DATA 4 #define SEEK_HOLE 5 -#endif // _ABIBITS_SEEK_WHENCE_H +#endif /* _ABIBITS_SEEK_WHENCE_H */ diff --git a/abis/mlibc/signal.h b/abis/mlibc/signal.h index 320bea742..3997facf4 100644 --- a/abis/mlibc/signal.h +++ b/abis/mlibc/signal.h @@ -31,7 +31,7 @@ typedef struct { extern "C" { #endif -// Argument for signal() +/* Argument for signal() */ typedef void (*__sighandler) (int); #define SIG_ERR ((__sighandler)(void *)(-1)) @@ -74,13 +74,13 @@ typedef void (*__sighandler) (int); #define SIGRTMAX 33 #define SIGCANCEL 34 -// siginfo->si_info constants -// SIGBUS +/* siginfo->si_info constants */ +/* SIGBUS */ #define BUS_ADRALN 1 #define BUS_ADRERR 2 #define BUS_OBJERR 3 -// SIGILL +/* SIGILL */ #define ILL_ILLOPC 1 #define ILL_ILLOPN 2 #define ILL_ILLADR 3 @@ -91,7 +91,7 @@ typedef void (*__sighandler) (int); #define ILL_BADSTK 8 #define ILL_BADIADDR 9 -// SIGSEGV +/* SIGSEGV */ #define SEGV_MAPERR 1 #define SEGV_ACCERR 2 @@ -99,7 +99,7 @@ typedef __mlibc_uint64 sigset_t; #define SIGUNUSED SIGSYS -// constants for sigprocmask() +/* constants for sigprocmask() */ #define SIG_BLOCK 1 #define SIG_UNBLOCK 2 #define SIG_SETMASK 3 @@ -123,7 +123,7 @@ typedef struct __stack { int ss_flags; } stack_t; -// constants for sigev_notify of struct sigevent +/* constants for sigev_notify of struct sigevent */ #define SIGEV_NONE 1 #define SIGEV_SIGNAL 2 #define SIGEV_THREAD 3 @@ -153,7 +153,7 @@ struct sigevent { int sigev_signo; union sigval sigev_value; void (*sigev_notify_function)(union sigval); - // MISSING: sigev_notify_attributes + /* MISSING: sigev_notify_attributes */ }; struct sigaction { @@ -164,7 +164,7 @@ struct sigaction { }; #if defined(__x86_64__) || defined(__i386__) || defined(__aarch64__) -// TODO: This is wrong for AArch64. +/* TODO: This is wrong for AArch64. */ typedef struct { unsigned long oldmask; @@ -192,4 +192,4 @@ typedef struct __ucontext { } #endif -#endif // _ABIBITS_SIGNAL_H +#endif /* _ABIBITS_SIGNAL_H */ diff --git a/abis/mlibc/socket.h b/abis/mlibc/socket.h index 48b8178b9..d7754f456 100644 --- a/abis/mlibc/socket.h +++ b/abis/mlibc/socket.h @@ -44,7 +44,7 @@ struct cmsghdr { #define SCM_TIMESTAMP SO_TIMESTAMP #define SCM_TIMESTAMPNS SO_TIMESTAMPNS -//MISSING: CMSG_DATA, CMSG_NXTHDR, CMSG_FIRSTHDR +/*MISSING: CMSG_DATA, CMSG_NXTHDR, CMSG_FIRSTHDR */ #define SCM_CREDENTIALS 0x02 @@ -108,13 +108,13 @@ struct cmsghdr { #define MSG_FIN 0x200 #define MSG_CONFIRM 0x800 -// Linux extensions. +/* Linux extensions. */ #define MSG_DONTWAIT 0x1000 #define MSG_CMSG_CLOEXEC 0x2000 #define MSG_MORE 0x4000 #define MSG_FASTOPEN 0x20000000 -// GNU (?) extension: Protocol family constants. +/* GNU (?) extension: Protocol family constants. */ #define PF_INET 1 #define PF_INET6 2 diff --git a/abis/mlibc/stat.h b/abis/mlibc/stat.h index 3f55970e0..37f6aaa01 100644 --- a/abis/mlibc/stat.h +++ b/abis/mlibc/stat.h @@ -66,4 +66,4 @@ struct stat { } #endif -#endif // _ABIBITS_STAT_H +#endif /* _ABIBITS_STAT_H */ diff --git a/abis/mlibc/termios.h b/abis/mlibc/termios.h index 49af90848..eafec507a 100644 --- a/abis/mlibc/termios.h +++ b/abis/mlibc/termios.h @@ -10,7 +10,7 @@ typedef unsigned int cc_t; typedef unsigned int speed_t; typedef unsigned int tcflag_t; -// indices for the c_cc array in struct termios +/* indices for the c_cc array in struct termios */ #define NCCS 11 #define VEOF 0 #define VEOL 1 @@ -24,7 +24,7 @@ typedef unsigned int tcflag_t; #define VSUSP 9 #define VTIME 10 -// bitwise flags for c_iflag in struct termios +/* bitwise flags for c_iflag in struct termios */ #define BRKINT 0x0001 #define ICRNL 0x0002 #define IGNBRK 0x0004 @@ -38,7 +38,7 @@ typedef unsigned int tcflag_t; #define IXON 0x0400 #define PARMRK 0x0800 -// bitwise flags for c_oflag in struct termios +/* bitwise flags for c_oflag in struct termios */ #define OPOST 0x0001 #define ONLCR 0x0002 #define OCRNL 0x0004 @@ -75,7 +75,7 @@ typedef unsigned int tcflag_t; #define FF0 0x0000 #define FF1 0x4000 -// bitwise constants for c_cflag in struct termios +/* bitwise constants for c_cflag in struct termios */ #define CSIZE 0x0003 #define CS5 0x0000 #define CS6 0x0001 @@ -93,7 +93,7 @@ typedef unsigned int tcflag_t; #define CBAUD 0x100F #endif -// bitwise constants for c_lflag in struct termios +/* bitwise constants for c_lflag in struct termios */ #define ECHO 0x0001 #define ECHOE 0x0002 #define ECHOK 0x0004 diff --git a/abis/mlibc/time.h b/abis/mlibc/time.h index 3f49db3c4..dfc342ed2 100644 --- a/abis/mlibc/time.h +++ b/abis/mlibc/time.h @@ -12,4 +12,4 @@ struct itimerval { #define ITIMER_VIRTUAL 1 #define ITIMER_PROF 2 -#endif // _ABIBITS_TIME_H +#endif /* _ABIBITS_TIME_H */ diff --git a/abis/mlibc/uid_t.h b/abis/mlibc/uid_t.h index 5b53ca309..976540b12 100644 --- a/abis/mlibc/uid_t.h +++ b/abis/mlibc/uid_t.h @@ -4,5 +4,5 @@ typedef unsigned int uid_t; -#endif // _ABIBITS_UID_T_H +#endif /* _ABIBITS_UID_T_H */ diff --git a/abis/mlibc/utsname.h b/abis/mlibc/utsname.h index 4e212b3a8..06899414b 100644 --- a/abis/mlibc/utsname.h +++ b/abis/mlibc/utsname.h @@ -14,4 +14,4 @@ struct utsname { char machine[65]; }; -#endif // _ABIBITS_UTSNAME_T_H +#endif /* _ABIBITS_UTSNAME_T_H */ diff --git a/abis/mlibc/vm-flags.h b/abis/mlibc/vm-flags.h index 700d745c0..769275a99 100644 --- a/abis/mlibc/vm-flags.h +++ b/abis/mlibc/vm-flags.h @@ -36,11 +36,11 @@ #define MADV_DONTNEED 4 #define MADV_FREE 8 -// Linux extensions: +/* Linux extensions: */ #define MREMAP_MAYMOVE 1 #define MREMAP_FIXED 2 #define MFD_CLOEXEC 1U #define MFD_ALLOW_SEALING 2U -#endif // _ABIBITS_MMAP_FLAGS_H +#endif /* _ABIBITS_MMAP_FLAGS_H */ diff --git a/abis/mlibc/wait.h b/abis/mlibc/wait.h index ebc7ee6bc..4c148ad84 100644 --- a/abis/mlibc/wait.h +++ b/abis/mlibc/wait.h @@ -27,4 +27,4 @@ #define WTERMSIG(x) (((x) & 0xFF000000) >> 24) #define WCOREDUMP(x) ((x) & WCOREFLAG) -#endif //_ABIBITS_WAIT_H +#endif /*_ABIBITS_WAIT_H */ diff --git a/abis/vinix/signal.h b/abis/vinix/signal.h index 4dcea407c..80adcdf0b 100644 --- a/abis/vinix/signal.h +++ b/abis/vinix/signal.h @@ -25,7 +25,7 @@ typedef struct { extern "C" { #endif -// Argument for signal() +/* Argument for signal() */ typedef void (*__sighandler) (int); #define SIG_ERR ((__sighandler)(void *)(-1)) @@ -68,13 +68,13 @@ typedef void (*__sighandler) (int); #define SIGRTMAX 33 #define SIGCANCEL 34 -// siginfo->si_info constants -// SIGBUS +/* siginfo->si_info constants */ +/* SIGBUS */ #define BUS_ADRALN 1 #define BUS_ADRERR 2 #define BUS_OBJERR 3 -// SIGILL +/* SIGILL */ #define ILL_ILLOPC 1 #define ILL_ILLOPN 2 #define ILL_ILLADR 3 @@ -85,16 +85,16 @@ typedef void (*__sighandler) (int); #define ILL_BADSTK 8 #define ILL_BADIADDR 9 -// SIGSEGV +/* SIGSEGV */ #define SEGV_MAPERR 1 #define SEGV_ACCERR 2 -// TODO: replace this by uint64_t +/* TODO: replace this by uint64_t */ typedef long sigset_t; #define SIGUNUSED SIGSYS -// constants for sigprocmask() +/* constants for sigprocmask() */ #define SIG_BLOCK 1 #define SIG_UNBLOCK 2 #define SIG_SETMASK 3 @@ -118,7 +118,7 @@ typedef struct __stack { int ss_flags; } stack_t; -// constants for sigev_notify of struct sigevent +/* constants for sigev_notify of struct sigevent */ #define SIGEV_NONE 1 #define SIGEV_SIGNAL 2 #define SIGEV_THREAD 3 @@ -147,7 +147,7 @@ struct sigevent { int sigev_signo; union sigval sigev_value; void (*sigev_notify_function)(union sigval); - // MISSING: sigev_notify_attributes + /* MISSING: sigev_notify_attributes */ }; struct sigaction { @@ -160,7 +160,7 @@ struct sigaction { }; #if defined(__x86_64__) || defined(__aarch64__) -// TODO: This is wrong for AArch64. +/* TODO: This is wrong for AArch64. */ typedef struct { unsigned long oldmask; @@ -188,4 +188,4 @@ typedef struct __ucontext { } #endif -#endif // _ABIBITS_SIGNAL_H +#endif /* _ABIBITS_SIGNAL_H */ diff --git a/options/ansi/include/alloca.h b/options/ansi/include/alloca.h index 0cc6bcbb8..edfc80d33 100644 --- a/options/ansi/include/alloca.h +++ b/options/ansi/include/alloca.h @@ -4,5 +4,5 @@ #define alloca __builtin_alloca -#endif // _ALLOCA_H +#endif /* _ALLOCA_H */ diff --git a/options/ansi/include/assert.h b/options/ansi/include/assert.h index 7eccae0e2..dbad1f0ae 100644 --- a/options/ansi/include/assert.h +++ b/options/ansi/include/assert.h @@ -8,7 +8,7 @@ extern "C" { #ifndef __MLIBC_ABI_ONLY -// NOTE: This is not ISO C. Declared in LSB +/* NOTE: This is not ISO C. Declared in LSB */ __attribute__ ((__noreturn__)) void __assert_fail(const char *assertion, const char *file, unsigned int line, const char *function); @@ -18,7 +18,7 @@ __attribute__ ((__noreturn__)) void __assert_fail(const char *assertion, const c } #endif -#endif // _ASSERT_H +#endif /* _ASSERT_H */ #include @@ -26,19 +26,19 @@ __attribute__ ((__noreturn__)) void __assert_fail(const char *assertion, const c # include #endif -// NOTE: [7.2] requires this be outside the include guard +/* NOTE: [7.2] requires this be outside the include guard */ #ifdef NDEBUG #undef assert #define assert(ignore) ((void)0) -#else // NDEBUG +#else /* NDEBUG */ #undef assert #define assert(assertion) ((void)((assertion) \ || (__assert_fail(#assertion, __FILE__, __LINE__, __func__), 0))) -#endif // NDEBUG +#endif /* NDEBUG */ #ifndef __cplusplus #undef static_assert diff --git a/options/ansi/include/bits/ansi/fenv.h b/options/ansi/include/bits/ansi/fenv.h index 677ddaa09..3f9766e15 100644 --- a/options/ansi/include/bits/ansi/fenv.h +++ b/options/ansi/include/bits/ansi/fenv.h @@ -51,4 +51,4 @@ #error Unknown architecture #endif -#endif // MLIBC_FENV_H +#endif /* MLIBC_FENV_H */ diff --git a/options/ansi/include/bits/ansi/timespec.h b/options/ansi/include/bits/ansi/timespec.h index d34aa649e..e4ab91e89 100644 --- a/options/ansi/include/bits/ansi/timespec.h +++ b/options/ansi/include/bits/ansi/timespec.h @@ -9,5 +9,5 @@ struct timespec { long tv_nsec; }; -#endif // MLIBC_TIMESPEC_H +#endif /* MLIBC_TIMESPEC_H */ diff --git a/options/ansi/include/ctype.h b/options/ansi/include/ctype.h index 4c4420c27..151f1f882 100644 --- a/options/ansi/include/ctype.h +++ b/options/ansi/include/ctype.h @@ -9,7 +9,7 @@ extern "C" { #ifndef __MLIBC_ABI_ONLY -// Character classification function [7.4.1] +/* Character classification function [7.4.1] */ int isalnum(int __c); int isalpha(int __c); int isblank(int __c); @@ -23,16 +23,16 @@ int isspace(int __c); int isupper(int __c); int isxdigit(int __c); -// glibc extensions. +/* glibc extensions. */ int isascii(int __c); -// Character case mapping functions [7.4.2] +/* Character case mapping functions [7.4.2] */ int tolower(int __c); int toupper(int __c); #endif /* !__MLIBC_ABI_ONLY */ -// Borrowed from glibc +/* Borrowed from glibc */ #define toascii(c) ((c) & 0x7f) #ifdef __cplusplus @@ -43,4 +43,4 @@ int toupper(int __c); # include #endif -#endif // _CTYPE_H +#endif /* _CTYPE_H */ diff --git a/options/ansi/include/errno.h b/options/ansi/include/errno.h index 7730b169f..bbdaf2f2b 100644 --- a/options/ansi/include/errno.h +++ b/options/ansi/include/errno.h @@ -9,13 +9,13 @@ extern "C" { #ifndef __MLIBC_ABI_ONLY -// Some programs define their own errno as an "extern int" if it is not a macro. +/* Some programs define their own errno as an "extern int" if it is not a macro. */ #define errno __mlibc_errno extern __thread int __mlibc_errno; int *__errno_location(void); -// Linux extensions. +/* Linux extensions. */ extern char *program_invocation_name; extern char *program_invocation_short_name; @@ -28,4 +28,4 @@ extern char *__progname_full; } #endif -#endif // _ERRNO_H +#endif /* _ERRNO_H */ diff --git a/options/ansi/include/fenv.h b/options/ansi/include/fenv.h index 31b0acc0c..7366706fa 100644 --- a/options/ansi/include/fenv.h +++ b/options/ansi/include/fenv.h @@ -40,5 +40,5 @@ int feupdateenv(const fenv_t *__envp); #define FE_DFL_ENV ((const fenv_t *) -1) -#endif // _FENV_H +#endif /* _FENV_H */ diff --git a/options/ansi/include/inttypes.h b/options/ansi/include/inttypes.h index 42352dd07..45c5d2e43 100644 --- a/options/ansi/include/inttypes.h +++ b/options/ansi/include/inttypes.h @@ -16,7 +16,7 @@ # define __PRIPTR "" #endif -// TODO: This is extremly unelegant and fragile. +/* TODO: This is extremly unelegant and fragile. */ #define PRId8 "d" #define PRIi8 "i" #define PRIdLEAST8 "d" @@ -146,4 +146,4 @@ uintmax_t wcstoumax(const wchar_t *__restrict __string, wchar_t **__restrict __e } #endif -#endif // _STDINT_H +#endif /* _STDINT_H */ diff --git a/options/ansi/include/limits.h b/options/ansi/include/limits.h index 605f8761a..83057747d 100644 --- a/options/ansi/include/limits.h +++ b/options/ansi/include/limits.h @@ -11,14 +11,14 @@ # ifdef LONG_MAX == INT32_MAX # define LONG_BIT 32 # else -// Safe assumption +/* Safe assumption */ # define LONG_BIT 64 # endif #elif defined __LONG_MAX__ # if __LONG_MAX__ == INT32_MAX # define LONG_BIT 32 # else -// Safe assumption +/* Safe assumption */ # define LONG_BIT 64 # endif #else @@ -91,9 +91,9 @@ #define CHARCLASS_NAME_MAX 14 #define RE_DUP_MAX 255 -// This value is a guaranteed minimum, get the current maximum from sysconf +/* This value is a guaranteed minimum, get the current maximum from sysconf */ #define NGROUPS_MAX 8 -// POSIX states 9 is the minimum for NL_ARGMAX +/* POSIX states 9 is the minimum for NL_ARGMAX */ #define NL_ARGMAX 9 #if INTPTR_MAX == INT64_MAX @@ -114,4 +114,4 @@ #include -#endif // _LIMITS_H +#endif /* _LIMITS_H */ diff --git a/options/ansi/include/locale.h b/options/ansi/include/locale.h index 25fcc75f4..785115247 100644 --- a/options/ansi/include/locale.h +++ b/options/ansi/include/locale.h @@ -57,25 +57,25 @@ struct lconv { #ifndef __MLIBC_ABI_ONLY -// [C11/7.11.1] setlocale() function +/* [C11/7.11.1] setlocale() function */ char *setlocale(int __category, const char *__locale); -// [C11/7.11.2] Locale inquiry function +/* [C11/7.11.2] Locale inquiry function */ struct lconv *localeconv(void); #endif /* !__MLIBC_ABI_ONLY */ -// posix extension +/* posix extension */ #if __MLIBC_POSIX_OPTION # include -#endif // __MLIBC_POSIX_OPTION +#endif /* __MLIBC_POSIX_OPTION */ #ifdef __cplusplus } #endif -#endif // _LOCALE_H +#endif /* _LOCALE_H */ diff --git a/options/ansi/include/math.h b/options/ansi/include/math.h index f7e6d61d9..a4ffd3231 100644 --- a/options/ansi/include/math.h +++ b/options/ansi/include/math.h @@ -4,7 +4,7 @@ #include -// this is a posix extension +/* this is a posix extension */ #define M_E 2.7182818284590452354 #define M_LOG2E 1.4426950408889634074 #define M_LOG10E 0.43429448190325182765 @@ -20,7 +20,7 @@ #define M_SQRT1_2 0.70710678118654752440 #define M_PIl 3.141592653589793238462643383279502884L -// The following two definitions are from musl. +/* The following two definitions are from musl. */ #define FP_ILOGBNAN (-1 - (int)(((unsigned)-1) >> 1)) #define FP_ILOGB0 FP_ILOGBNAN @@ -37,16 +37,16 @@ typedef float float_t; #define INFINITY (__builtin_inff()) #define NAN (__builtin_nanf("")) -// [C11/7.12.1 Treatment of error conditions] +/* [C11/7.12.1 Treatment of error conditions] */ #define MATH_ERRNO 1 #define MATH_ERREXCEPT 2 #define math_errhandling 3 -// [C11/7.12.3 Classification macros] +/* [C11/7.12.3 Classification macros] */ -// NOTE: fpclassify always returns exactly one of those constants -// However making them bitwise disjoint simplifies isfinite() etc. +/* NOTE: fpclassify always returns exactly one of those constants */ +/* However making them bitwise disjoint simplifies isfinite() etc. */ #define FP_INFINITE 1 #define FP_NAN 2 #define FP_NORMAL 4 @@ -70,10 +70,10 @@ int __fpclassifyl(long double __x); #define isinf(x) (fpclassify(x) == FP_INFINITE) #define isnormal(x) (fpclassify(x) == FP_NORMAL) -// FIXME: this is gcc specific +/* FIXME: this is gcc specific */ #define signbit(x) (__builtin_signbit(x)) -// [C11/7.12.14 Comparison macros] +/* [C11/7.12.14 Comparison macros] */ #define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y))) __MLIBC_INLINE_DEFINITION int __mlibc_isless(double_t __x, double_t __y) { return !isunordered(__x, __y) && __x < __y; } @@ -92,7 +92,7 @@ __MLIBC_INLINE_DEFINITION int __mlibc_isgreaterequal(double_t __x, double_t __y) __MLIBC_INLINE_DEFINITION int __mlibc_isgreaterequalf(float_t __x, float_t __y) { return !isunordered(__x, __y) && __x >= __y; } __MLIBC_INLINE_DEFINITION int __mlibc_isgreaterequall(long double __x, long double __y) { return !isunordered(__x, __y) && __x >= __y; } -// TODO: We chould use _Generic here but that does not work in C++ code. +/* TODO: We chould use _Generic here but that does not work in C++ code. */ #define __MLIBC_CHOOSE_COMPARISON(x, y, p) ( \ sizeof((x)+(y)) == sizeof(float) ? p##f(x, y) : \ sizeof((x)+(y)) == sizeof(double) ? p(x, y) : \ @@ -104,7 +104,7 @@ __MLIBC_INLINE_DEFINITION int __mlibc_isgreaterequall(long double __x, long doub #define isgreater(x, y) __MLIBC_CHOOSE_COMPARISON(x, y, __mlibc_isgreater) #define isgreaterequal(x, y) __MLIBC_CHOOSE_COMPARISON(x, y, __mlibc_isgreaterequal) -// this is a gnu extension +/* this is a gnu extension */ void sincos(double __x, double *__sin, double *__cos); void sincosf(float __x, float *__sin, float *__cos); void sincosl(long double __x, long double *__sin, long double *__cos); @@ -117,7 +117,7 @@ double pow10(double __x); float pow10f(float __x); long double pow10l(long double __x); -// [C11/7.12.4 Trigonometric functions] +/* [C11/7.12.4 Trigonometric functions] */ double acos(double __x); float acosf(float __x); @@ -147,7 +147,7 @@ double tan(double __x); float tanf(float __x); long double tanl(long double __x); -// [C11/7.12.5 Hyperbolic functions] +/* [C11/7.12.5 Hyperbolic functions] */ double acosh(double __x); float acoshf(float __x); @@ -173,7 +173,7 @@ double tanh(double __x); float tanhf(float __x); long double tanhl(long double __x); -// [C11/7.12.6 Exponential and logarithmic functions] +/* [C11/7.12.6 Exponential and logarithmic functions] */ double exp(double __x); float expf(float __x); @@ -231,7 +231,7 @@ double scalbln(double __x, long __power); float scalblnf(float __x, long __power); long double scalblnl(long double __x, long __power); -// [C11/7.12.7 Power and absolute-value functions] +/* [C11/7.12.7 Power and absolute-value functions] */ double cbrt(double __x); float cbrtf(float __x); @@ -253,7 +253,7 @@ double sqrt(double __x); float sqrtf(float __x); long double sqrtl(long double __x); -// [C11/7.12.8 Error and gamma functions] +/* [C11/7.12.8 Error and gamma functions] */ double erf(double __x); float erff(float __x); @@ -271,7 +271,7 @@ double tgamma(double __x); float tgammaf(float __x); long double tgammal(long double __x); -// [C11/7.12.9 Nearest integer functions] +/* [C11/7.12.9 Nearest integer functions] */ double ceil(double __x); float ceilf(float __x); @@ -313,7 +313,7 @@ double trunc(double __x); float truncf(float __x); long double truncl(long double __x); -// [C11/7.12.10 Remainder functions] +/* [C11/7.12.10 Remainder functions] */ double fmod(double __x, double __y); float fmodf(float __x, float __y); @@ -327,7 +327,7 @@ double remquo(double __x, double __y, int *__quotient); float remquof(float __x, float __y, int *__quotient); long double remquol(long double __x, long double __y, int *__quotient); -// [C11/7.12.11 Manipulation functions] +/* [C11/7.12.11 Manipulation functions] */ double copysign(double __x, double __sign); float copysignf(float __x, float __sign); @@ -345,7 +345,7 @@ double nexttoward(double __x, long double __dir); float nexttowardf(float __x, long double __dir); long double nexttowardl(long double __x, long double __dir); -// [C11/7.12.12 Maximum, minimum and positive difference functions] +/* [C11/7.12.12 Maximum, minimum and positive difference functions] */ double fdim(double __x, double __y); float fdimf(float __x, float __y); @@ -359,7 +359,7 @@ double fmin(double __x, double __y); float fminf(float __x, float __y); long double fminl(long double __x, long double __y); -// [C11/7.12.13 Floating multiply-add] +/* [C11/7.12.13 Floating multiply-add] */ double fma(double __x, double __y, double __z); float fmaf(float __x, float __y, float __z); @@ -368,7 +368,7 @@ long double fmal(long double __x, long double __y, long double __z); extern int signgam; #define __signgam signgam -// BSD floating-point classification functions - obsolete +/* BSD floating-point classification functions - obsolete */ int finite(double __x); int finitef(float __x); @@ -379,5 +379,5 @@ int finitef(float __x); } #endif -#endif // _MATH_H +#endif /* _MATH_H */ diff --git a/options/ansi/include/setjmp.h b/options/ansi/include/setjmp.h index 963af967c..91c0ecabb 100644 --- a/options/ansi/include/setjmp.h +++ b/options/ansi/include/setjmp.h @@ -10,7 +10,7 @@ extern "C" { #endif -// [C11/7.13] Non-local jumps +/* [C11/7.13] Non-local jumps */ typedef struct __jmp_buf { struct __mlibc_jmpbuf_register_state __reg_state; @@ -23,7 +23,7 @@ __attribute__((__noreturn__)) void longjmp(jmp_buf __buffer, int __value); #endif /* !__MLIBC_ABI_ONLY */ -// POSIX Non-local jumps signal extensions +/* POSIX Non-local jumps signal extensions */ typedef struct __sigjmp_buf { struct __mlibc_jmpbuf_register_state __reg_state; @@ -36,7 +36,7 @@ typedef struct __sigjmp_buf { #if __MLIBC_POSIX_OPTION __attribute__((__returns_twice__)) int sigsetjmp(sigjmp_buf __buffer, int __savesigs); __attribute__((__noreturn__)) void siglongjmp(sigjmp_buf __buffer, int __value); -#endif // __MLIBC_POSIX_OPTION +#endif /* __MLIBC_POSIX_OPTION */ #endif /* !__MLIBC_ABI_ONLY */ @@ -44,5 +44,5 @@ __attribute__((__noreturn__)) void siglongjmp(sigjmp_buf __buffer, int __value); } #endif -#endif // _SETJMP_H +#endif /* _SETJMP_H */ diff --git a/options/ansi/include/signal.h b/options/ansi/include/signal.h index 87a59041e..69eee4ae9 100644 --- a/options/ansi/include/signal.h +++ b/options/ansi/include/signal.h @@ -8,7 +8,7 @@ extern "C" { #endif -// [7.14] Signal handling basics +/* [7.14] Signal handling basics */ typedef int sig_atomic_t; @@ -21,11 +21,11 @@ typedef int sig_atomic_t; #ifndef __MLIBC_ABI_ONLY -// [7.14.1] signal() function +/* [7.14.1] signal() function */ __sighandler signal(int __sig, __sighandler __handler); -// [7.14.2] raise() function +/* [7.14.2] raise() function */ int raise(int __sig); @@ -45,4 +45,4 @@ int raise(int __sig); # include #endif -#endif // _SIGNAL_H +#endif /* _SIGNAL_H */ diff --git a/options/ansi/include/stdio.h b/options/ansi/include/stdio.h index 4c955bc95..2ec9dcccd 100644 --- a/options/ansi/include/stdio.h +++ b/options/ansi/include/stdio.h @@ -7,7 +7,7 @@ #include #include -// Glibc extensions require ssize_t. +/* Glibc extensions require ssize_t. */ #include #include @@ -15,51 +15,51 @@ extern "C" { #endif -// [C11-7.21.1] I/O related types +/* [C11-7.21.1] I/O related types */ #define __MLIBC_EOF_BIT 1 #define __MLIBC_ERROR_BIT 2 struct __mlibc_file_base { - // Buffer for I/O operations. - // We reserve a few extra bytes for ungetc operations. This means - // that __buffer_ptr will point a few bytes *into* the allocation. + /* Buffer for I/O operations. */ + /* We reserve a few extra bytes for ungetc operations. This means */ + /* that __buffer_ptr will point a few bytes *into* the allocation. */ char *__buffer_ptr; - // Number of bytes the buffer can hold. + /* Number of bytes the buffer can hold. */ size_t __buffer_size; - // Current offset inside the buffer. + /* Current offset inside the buffer. */ size_t __offset; - // Position inside the buffer that matches the current file pointer. + /* Position inside the buffer that matches the current file pointer. */ size_t __io_offset; - // Valid region of the buffer. + /* Valid region of the buffer. */ size_t __valid_limit; - // Begin and end of the dirty region inside the buffer. + /* Begin and end of the dirty region inside the buffer. */ size_t __dirty_begin; size_t __dirty_end; - // This points to the same place as __buffer_ptr, or a few bytes earlier - // if there are bytes pushed by ungetc. If buffering is disabled, calls - // to ungetc will trigger an allocation. + /* This points to the same place as __buffer_ptr, or a few bytes earlier */ + /* if there are bytes pushed by ungetc. If buffering is disabled, calls */ + /* to ungetc will trigger an allocation. */ char *__unget_ptr; - // 0 if we are currently reading from the buffer. - // 1 if we are currently writing to the buffer. - // This is only really important for pipe-like streams. + /* 0 if we are currently reading from the buffer. */ + /* 1 if we are currently writing to the buffer. */ + /* This is only really important for pipe-like streams. */ int __io_mode; - // EOF and error bits. + /* EOF and error bits. */ int __status_bits; }; typedef struct __mlibc_file_base FILE; typedef off_t fpos_t; -// [C11-7.21.1] I/O related macros +/* [C11-7.21.1] I/O related macros */ #define _IOFBF 1 #define _IOLBF 2 @@ -81,7 +81,7 @@ extern FILE *stderr; extern FILE *stdin; extern FILE *stdout; -// [C11-7.21.4] Operations on files +/* [C11-7.21.4] Operations on files */ int remove(const char *__filename); int rename(const char *__old_path, const char *__new_path); @@ -89,7 +89,7 @@ int renameat(int __olddirfd, const char *__old_path, int __newdirfd, const char FILE *tmpfile(void); char *tmpnam(char *__buffer); -// [C11-7.21.5] File access functions +/* [C11-7.21.5] File access functions */ int fclose(FILE *__stream); int fflush(FILE *__stream); @@ -100,7 +100,7 @@ int setvbuf(FILE *__restrict __stream, char *__restrict __buffer, int __mode, si void setlinebuf(FILE *__stream); void setbuffer(FILE *__stream, char *__buffer, size_t __size); -// [C11-7.21.6] Formatted input/output functions +/* [C11-7.21.6] Formatted input/output functions */ __attribute__((__format__(__printf__, 2, 3))) int fprintf(FILE *__restrict __stream, const char *__restrict __format, ...); @@ -145,11 +145,11 @@ int vsprintf(char *__restrict __buffer, const char *__restrict __format, __built __attribute__((__format__(__scanf__, 2, 0))) int vsscanf(const char *__restrict __buffer, const char *__restrict __format, __builtin_va_list __args); -// this is a gnu extension +/* this is a gnu extension */ __attribute__((__format__(__printf__, 2, 0))) int vasprintf(char **__buffer, const char *__format, __builtin_va_list __args); -// [C11-7.21.7] Character input/output functions +/* [C11-7.21.7] Character input/output functions */ int fgetc(FILE *__stream); char *fgets(char *__restrict __buffer, int __max_size, FILE *__restrict __stream); @@ -163,12 +163,12 @@ int putchar(int __c); int puts(const char *__string); int ungetc(int __c, FILE *__stream); -// [C11-7.21.8] Direct input/output functions +/* [C11-7.21.8] Direct input/output functions */ size_t fread(void *__restrict __buffer, size_t __size, size_t __count, FILE *__restrict __stream); size_t fwrite(const void *__restrict __buffer, size_t __size, size_t __count, FILE *__restrict __stream); -// [C11-7.21.9] File positioning functions +/* [C11-7.21.9] File positioning functions */ int fgetpos(FILE *__restrict __stream, fpos_t *__restrict __position); int fseek(FILE *__stream, long __offset, int __whence); @@ -176,21 +176,21 @@ int fsetpos(FILE *__stream, const fpos_t *__position); long ftell(FILE *__stream); void rewind(FILE *__stream); -// [C11-7.21.10] Error handling functions +/* [C11-7.21.10] Error handling functions */ void clearerr(FILE *__stream); int feof(FILE *__stream); int ferror(FILE *__stream); void perror(const char *__string); -// POSIX unlocked I/O extensions. +/* POSIX unlocked I/O extensions. */ int getc_unlocked(FILE *__stream); int getchar_unlocked(void); int putc_unlocked(int __c, FILE *__stream); int putchar_unlocked(int __c); -// GLIBC extensions. +/* GLIBC extensions. */ ssize_t getline(char **__linep, size_t *__sizep, FILE *__stream); ssize_t getdelim(char **__linep, size_t *__sizep, int __delim, FILE *__stream); @@ -198,7 +198,7 @@ ssize_t getdelim(char **__linep, size_t *__sizep, int __delim, FILE *__stream); __attribute__((__format__(__printf__, 2, 3))) int asprintf(char **__buffer, const char *__format, ...); -// Linux unlocked I/O extensions. +/* Linux unlocked I/O extensions. */ void flockfile(FILE *__stream); void funlockfile(FILE *__stream); @@ -227,5 +227,5 @@ int fputs_unlocked(const char *__restrict __buffer, FILE *__restrict __stream); # include #endif -#endif // _STDIO_H +#endif /* _STDIO_H */ diff --git a/options/ansi/include/stdlib.h b/options/ansi/include/stdlib.h index 822ebdefe..7a8564ab4 100644 --- a/options/ansi/include/stdlib.h +++ b/options/ansi/include/stdlib.h @@ -12,7 +12,7 @@ extern "C" { #endif -// [7.22] General utilities +/* [7.22] General utilities */ typedef struct { int quot, rem; @@ -31,12 +31,12 @@ typedef struct { #define RAND_MAX 0x7FFFFFFF -// TODO: this should not be a compile-time constant +/* TODO: this should not be a compile-time constant */ #define MB_CUR_MAX ((size_t)4) #ifndef __MLIBC_ABI_ONLY -// [7.22.1] Numeric conversion functions +/* [7.22.1] Numeric conversion functions */ double atof(const char *__string); int atoi(const char *__string); @@ -50,13 +50,13 @@ long long strtoll(const char *__restrict __string, char **__restrict __end, int unsigned long strtoul(const char *__restrict __string, char **__restrict __end, int __base); unsigned long long strtoull(const char *__restrict __string, char **__restrict __end, int __base); -// [7.22.2] Pseudo-random sequence generation functions +/* [7.22.2] Pseudo-random sequence generation functions */ int rand(void); int rand_r(unsigned *__seed); void srand(unsigned int __seed); -// [7.22.3] Memory management functions +/* [7.22.3] Memory management functions */ void *aligned_alloc(size_t __alignment, size_t __size); void *calloc(size_t __count, size_t __size); @@ -66,7 +66,7 @@ void *realloc(void *__pointer, size_t __size); int posix_memalign(void **__out, size_t __alignment, size_t __size); -// [7.22.4] Communication with the environment +/* [7.22.4] Communication with the environment */ __attribute__((__noreturn__)) void abort(void); int atexit(void (*__func)(void)); @@ -77,10 +77,10 @@ char *getenv(const char *__name); __attribute__((__noreturn__)) void quick_exit(int __status); int system(const char *__string); -// GLIBC extension. +/* GLIBC extension. */ char *mktemp(char *__pattern); -// [7.22.5] Searching and sorting utilities +/* [7.22.5] Searching and sorting utilities */ void *bsearch(const void *__key, const void *__base, size_t __count, size_t __size, int (*__compare)(const void *__a, const void *__b)); @@ -90,7 +90,7 @@ void qsort_r(void *__base, size_t __nmemb, size_t __size, int (*__compar)(const void *__a, const void *__b, void *__arg), void *__arg); -// [7.22.6] Integer arithmetic functions +/* [7.22.6] Integer arithmetic functions */ int abs(int __number); long labs(long __number); @@ -100,13 +100,13 @@ div_t div(int __number, int __denom); ldiv_t ldiv(long __number, long __denom); lldiv_t lldiv(long long __number, long long __denom); -// [7.22.7] Multibyte character conversion functions +/* [7.22.7] Multibyte character conversion functions */ int mblen(const char *__mbs, size_t __limit); int mbtowc(wchar_t *__restrict __wc, const char *__restrict __mb_chr, size_t __max_size); int wctomb(char *__mb_chr, wchar_t __wc); -// [7.22.8] Multibyte string conversion functions +/* [7.22.8] Multibyte string conversion functions */ size_t mbstowcs(wchar_t *__restrict __wc_string, const char *__restrict __mb_string, size_t __max_size); size_t wcstombs(char *__restrict __mb_string, const wchar_t *__restrict __wc_string, size_t __max_size); @@ -125,5 +125,5 @@ typedef int (*comparison_fn_t) (const void *__a, const void *__b); # include #endif -#endif // _STDLIB_H +#endif /* _STDLIB_H */ diff --git a/options/ansi/include/string.h b/options/ansi/include/string.h index 9d18377de..00b15cd4d 100644 --- a/options/ansi/include/string.h +++ b/options/ansi/include/string.h @@ -11,19 +11,19 @@ extern "C" { #ifndef __MLIBC_ABI_ONLY -// [7.24.2] Copying functions +/* [7.24.2] Copying functions */ void *memcpy(void *__restrict __dest, const void *__restrict __src, size_t __size); void *memmove(void *__dest, const void *__src, size_t __size); char *strcpy(char *__restrict __dest, const char *src); char *strncpy(char *__restrict __dest, const char *__src, size_t __max_size); -// [7.24.3] Concatenation functions +/* [7.24.3] Concatenation functions */ char *strcat(char *__restrict __dest, const char *__restrict __src); char *strncat(char *__restrict __dest, const char *__restrict __src, size_t __max_size); -// [7.24.4] Comparison functions +/* [7.24.4] Comparison functions */ int memcmp(const void *__a, const void *__b, size_t __size); int strcmp(const char *__a, const char *__b); @@ -31,7 +31,7 @@ int strcoll(const char *__a, const char *__b); int strncmp(const char *__a, const char *__b, size_t __max_size); size_t strxfrm(char *__restrict __dest, const char *__restrict __src, size_t __max_size); -// [7.24.5] Search functions +/* [7.24.5] Search functions */ void *memchr(const void *__s, int __c, size_t __size); char *strchr(const char *__s, int __c); @@ -42,10 +42,10 @@ size_t strspn(const char *__s, const char *__chrs); char *strstr(const char *__pattern, const char *__s); char *strtok(char *__restrict __s, const char *__restrict __delimiter); -// This is a GNU extension. +/* This is a GNU extension. */ char *strchrnul(const char * __s, int __c); -// [7.24.6] Miscellaneous functions +/* [7.24.6] Miscellaneous functions */ void *memset(void *__dest, int __c, size_t __size); char *strerror(int __errnum); @@ -59,11 +59,11 @@ size_t strlen(const char *__s); #ifndef __MLIBC_ABI_ONLY -// POSIX extensions. +/* POSIX extensions. */ int strerror_r(int __errnum, char *__buffer, size_t __size); void *mempcpy(void *__dest, const void *__src, size_t __size); -// GNU extensions. +/* GNU extensions. */ int strverscmp(const char *__l0, const char *__r0); int ffsl(long __i); int ffsll(long long __i); @@ -104,4 +104,4 @@ static inline char *__mlibc_gnu_basename(char *__path) { # include #endif -#endif // _STRING_H +#endif /* _STRING_H */ diff --git a/options/ansi/include/time.h b/options/ansi/include/time.h index ccd3fa5d5..627dfc231 100644 --- a/options/ansi/include/time.h +++ b/options/ansi/include/time.h @@ -7,13 +7,13 @@ #include #include -// [7.27.1] Components of time +/* [7.27.1] Components of time */ #define CLOCKS_PER_SEC ((clock_t)1000000) #define TIME_UTC 1 -// POSIX extensions. +/* POSIX extensions. */ #define CLOCK_REALTIME 0 #define CLOCK_MONOTONIC 1 @@ -30,9 +30,9 @@ extern "C" { #endif -// [7.27.1] Components of time +/* [7.27.1] Components of time */ -typedef long clock_t; // Matches Linux' ABI. +typedef long clock_t; /* Matches Linux' ABI. */ struct tm { int tm_sec; @@ -50,7 +50,7 @@ struct tm { #ifndef __MLIBC_ABI_ONLY -// [7.27.2] Time manipulation functions +/* [7.27.2] Time manipulation functions */ clock_t clock(void); double difftime(time_t __a, time_t __b); @@ -58,7 +58,7 @@ time_t mktime(struct tm *__ptr); time_t time(time_t *__timer); int timespec_get(struct timespec *__ptr, int __base); -// [7.27.3] Time conversion functions +/* [7.27.3] Time conversion functions */ char *asctime(const struct tm *__ptr); char *ctime(const time_t *__timer); @@ -76,12 +76,12 @@ void tzset(void); } #endif -// POSIX extensions. +/* POSIX extensions. */ #if __MLIBC_POSIX_OPTION # include # include -#endif // __MLIBC_POSIX_OPTION +#endif /* __MLIBC_POSIX_OPTION */ #include @@ -119,7 +119,7 @@ char *strptime(const char *__restrict __buf, const char *__restrict __format, } #endif -// GNU extensions. +/* GNU extensions. */ #ifdef __cplusplus extern "C" { @@ -136,7 +136,7 @@ time_t timegm(struct tm *__tm); } #endif -// Linux extensions. +/* Linux extensions. */ #ifdef __cplusplus extern "C" { @@ -151,4 +151,4 @@ struct itimerspec { } #endif -#endif // _TIME_H +#endif /* _TIME_H */ diff --git a/options/ansi/include/wchar.h b/options/ansi/include/wchar.h index 66c890a52..8fe45d341 100644 --- a/options/ansi/include/wchar.h +++ b/options/ansi/include/wchar.h @@ -18,11 +18,11 @@ typedef struct __mlibc_file_base FILE; typedef struct __mlibc_mbstate mbstate_t; -// MISSING: struct tm +/* MISSING: struct tm */ #ifndef __MLIBC_ABI_ONLY -// [7.28.2] Wide formatted I/O functions +/* [7.28.2] Wide formatted I/O functions */ int fwprintf(FILE *__restrict __stream, const wchar_t *__restrict __format, ...); int fwscanf(FILE *__restrict __stream, const wchar_t *__restrict __format, ...); @@ -39,7 +39,7 @@ int wscanf(const wchar_t *__restrict __format, ...); int vwprintf(const wchar_t *__restrict __format, __builtin_va_list __args); int vwscanf(const wchar_t *__restrict __format, __builtin_va_list __args); -// [7.28.3] Wide character I/O functions +/* [7.28.3] Wide character I/O functions */ wint_t fgetwc(FILE *__stream); wchar_t *fgetws(wchar_t *__restrict __buffer, int __size, FILE *__restrict __stream); @@ -52,7 +52,7 @@ wint_t putwc(wchar_t __wc, FILE *__stream); wint_t putwchar(wchar_t __wc); wint_t ungetwc(wint_t __wc, FILE *__stream); -// [7.28.4] Wide string functions +/* [7.28.4] Wide string functions */ double wcstod(const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr); float wcstof(const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr); @@ -89,7 +89,7 @@ wchar_t *wmemchr(const wchar_t *__s, wchar_t __wc, size_t __size); size_t wcslen(const wchar_t *__s); wchar_t *wmemset(wchar_t *__dest, wchar_t __wc, size_t __size); -// [7.28.5] Wide date/time functions +/* [7.28.5] Wide date/time functions */ /* POSIX says: * The tag tm is declared as naming an incomplete structure type, the contents of which are @@ -98,7 +98,7 @@ struct tm; size_t wcsftime(wchar_t *__restrict __buffer, size_t __max_size, const wchar_t *__restrict __format, const struct tm *__restrict __time); -// [7.28.6] Wide conversion functions +/* [7.28.6] Wide conversion functions */ wint_t btowc(int __wc); int wctob(wint_t __wc); @@ -114,7 +114,7 @@ size_t wcsrtombs(char *__restrict __mbs, const wchar_t **__restrict __wcs, size_ size_t wcsnrtombs(char *__restrict __mbs, const wchar_t **__restrict __wcs, size_t __mb_limit, size_t __wc_limit, mbstate_t *__restrict __stp); -// POSIX extensions +/* POSIX extensions */ int wcwidth(wchar_t __wc); int wcswidth(const wchar_t *__s, size_t __size); wchar_t *wcsdup(const wchar_t *__s); @@ -127,4 +127,4 @@ int wcscasecmp(const wchar_t *__a, const wchar_t *__b); } #endif -#endif // _WCHAR_H +#endif /* _WCHAR_H */ diff --git a/options/ansi/include/wctype.h b/options/ansi/include/wctype.h index 2f071233c..4b12e5c69 100644 --- a/options/ansi/include/wctype.h +++ b/options/ansi/include/wctype.h @@ -13,7 +13,7 @@ typedef unsigned long wctrans_t; #ifndef __MLIBC_ABI_ONLY -// [C11/7.30.2.2] Extensible wide character classification functions. +/* [C11/7.30.2.2] Extensible wide character classification functions. */ int iswalnum(wint_t __wc); int iswalpha(wint_t __wc); @@ -31,7 +31,7 @@ int iswxdigit(wint_t __wc); wctype_t wctype(const char *__string); int iswctype(wint_t __wc, wctype_t __type); -// [C11/7.30.3] Wide character case mapping utilities. +/* [C11/7.30.3] Wide character case mapping utilities. */ wint_t towlower(wint_t __wc); wint_t towupper(wint_t __wc); @@ -49,4 +49,4 @@ wint_t towctrans(wint_t __wc, wctrans_t __trans); # include #endif -#endif // _WCTYPE_H +#endif /* _WCTYPE_H */ diff --git a/options/ansi/musl-generic-math/libm.h b/options/ansi/musl-generic-math/libm.h index 2022cc505..21ebd4589 100644 --- a/options/ansi/musl-generic-math/libm.h +++ b/options/ansi/musl-generic-math/libm.h @@ -174,14 +174,14 @@ double __sin(double,double,int); double __cos(double,double); double __tan(double,double,int); double __expo2(double); -//double complex __ldexp_cexp(double complex,int); +/*double complex __ldexp_cexp(double complex,int); */ int __rem_pio2f(float,double*); float __sindf(double); float __cosdf(double); float __tandf(double,int); float __expo2f(float); -//float complex __ldexp_cexpf(float complex,int); +/*float complex __ldexp_cexpf(float complex,int); */ int __rem_pio2l(long double, long double *); long double __sinl(long double, long double, int); diff --git a/options/bsd/include/arpa/nameser.h b/options/bsd/include/arpa/nameser.h index cb5d9c44d..7e2e9f191 100644 --- a/options/bsd/include/arpa/nameser.h +++ b/options/bsd/include/arpa/nameser.h @@ -263,4 +263,4 @@ typedef struct { } #endif -#endif // _ARPA_NAMESER_H +#endif /* _ARPA_NAMESER_H */ diff --git a/options/bsd/include/netinet/ether.h b/options/bsd/include/netinet/ether.h index d4022919c..c9add3120 100644 --- a/options/bsd/include/netinet/ether.h +++ b/options/bsd/include/netinet/ether.h @@ -21,4 +21,4 @@ struct ether_addr *ether_aton(const char *__asc); } #endif -#endif //_NETINET_ETHER_H +#endif /*_NETINET_ETHER_H */ diff --git a/options/bsd/include/sys/queue.h b/options/bsd/include/sys/queue.h index 7006b0561..219066bdd 100644 --- a/options/bsd/include/sys/queue.h +++ b/options/bsd/include/sys/queue.h @@ -571,4 +571,4 @@ struct { \ ? ((head)->cqh_last) \ : (elm->field.cqe_prev)) -#endif // _SYS_QUEUE_H_ +#endif /* _SYS_QUEUE_H_ */ diff --git a/options/crypt/include/crypt.h b/options/crypt/include/crypt.h index cdf714f08..c96294aa0 100644 --- a/options/crypt/include/crypt.h +++ b/options/crypt/include/crypt.h @@ -15,4 +15,4 @@ char *crypt(const char *__key, const char *__salt); } #endif -#endif // _CRYPT_H +#endif /* _CRYPT_H */ diff --git a/options/elf/include/elf.h b/options/elf/include/elf.h index 0690dbded..6972eb507 100644 --- a/options/elf/include/elf.h +++ b/options/elf/include/elf.h @@ -9,7 +9,7 @@ extern "C" { #endif -// TODO: Convert the enums to #defines so that they work with #ifdef. +/* TODO: Convert the enums to #defines so that they work with #ifdef. */ #define ELFCLASS64 2 #define ELFDATA2LSB 1 @@ -288,7 +288,7 @@ enum { R_RISCV_TLS_DTPREL64 = 9, R_RISCV_TLS_TPREL32 = 10, R_RISCV_TLS_TPREL64 = 11, - R_RISCV_TLSDESC = 12, // currently a draft but looking good + R_RISCV_TLSDESC = 12, /* currently a draft but looking good */ R_RISCV_IRELATIVE = 58 }; @@ -440,24 +440,24 @@ enum { }; enum { - // For DT_FLAGS. + /* For DT_FLAGS. */ DF_SYMBOLIC = 0x02, DF_TEXTREL = 0x04, DF_BIND_NOW = 0x08, DF_STATIC_TLS = 0x10, - // For DT_FLAGS_1. + /* For DT_FLAGS_1. */ DF_1_NOW = 0x00000001, DF_1_NODELETE = 0x00000008, DF_1_PIE = 0x08000000 }; -// Valid values for note segment descriptor files for core files +/* Valid values for note segment descriptor files for core files */ #define NT_PRSTATUS 1 #define NT_FPREGSET 2 #define NT_PRPSINFO 3 -// Build ID bits as generated by ld --build-id +/* Build ID bits as generated by ld --build-id */ #define NT_GNU_BUILD_ID 3 typedef struct { @@ -665,4 +665,4 @@ typedef struct { } #endif -#endif // _ELF_H +#endif /* _ELF_H */ diff --git a/options/elf/include/link.h b/options/elf/include/link.h index 874120eaa..34a06d183 100644 --- a/options/elf/include/link.h +++ b/options/elf/include/link.h @@ -55,4 +55,4 @@ extern ElfW(Dyn) _DYNAMIC[]; } #endif -#endif // _LINK_H +#endif /* _LINK_H */ diff --git a/options/elf/include/mlibc/elf/startup.h b/options/elf/include/mlibc/elf/startup.h index 7e8a8d79b..f3c286cd8 100644 --- a/options/elf/include/mlibc/elf/startup.h +++ b/options/elf/include/mlibc/elf/startup.h @@ -23,6 +23,6 @@ void set_startup_data(int argc, char **argv, char **envp); #endif /* !__MLIBC_ABI_ONLY */ -} // namespace mlibc +} /* namespace mlibc */ -#endif // MLIBC_ELF_STARTUP +#endif /* MLIBC_ELF_STARTUP */ diff --git a/options/glibc/include/bits/glibc/glibc_signal.h b/options/glibc/include/bits/glibc/glibc_signal.h index 593104cfe..4761aba0c 100644 --- a/options/glibc/include/bits/glibc/glibc_signal.h +++ b/options/glibc/include/bits/glibc/glibc_signal.h @@ -21,4 +21,4 @@ typedef void (*sighandler_t)(int __signo); } #endif -#endif // MLIBC_GLIBC_SIGNAL_H +#endif /* MLIBC_GLIBC_SIGNAL_H */ diff --git a/options/glibc/include/endian.h b/options/glibc/include/endian.h index 00d5ee13b..129af989d 100644 --- a/options/glibc/include/endian.h +++ b/options/glibc/include/endian.h @@ -10,7 +10,7 @@ # define PDP_ENDIAN __ORDER_PDP_ENDIAN__ # define __BYTE_ORDER __BYTE_ORDER__ -#ifndef __LITTLE_ENDIAN // Linux kernel headers define this already +#ifndef __LITTLE_ENDIAN /* Linux kernel headers define this already */ # define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__ #endif # define __BIG_ENDIAN __ORDER_BIG_ENDIAN__ @@ -51,4 +51,4 @@ # define le64toh(x) __bswap_64(x) #endif -#endif // _ENDIAN_H +#endif /* _ENDIAN_H */ diff --git a/options/glibc/include/err.h b/options/glibc/include/err.h index 5e116cd7b..88341e9f5 100644 --- a/options/glibc/include/err.h +++ b/options/glibc/include/err.h @@ -29,5 +29,5 @@ void verrx(int __errnum, const char *__format, va_list __args); } #endif -#endif // _ERR_H +#endif /* _ERR_H */ diff --git a/options/glibc/include/features.h b/options/glibc/include/features.h index 382b68441..d700f10a4 100644 --- a/options/glibc/include/features.h +++ b/options/glibc/include/features.h @@ -1,6 +1,6 @@ #ifndef FEATURES_H #define FEATURES_H -// This header is a stub +/* This header is a stub */ #endif diff --git a/options/glibc/include/getopt.h b/options/glibc/include/getopt.h index 6274e2aa3..10ca7be96 100644 --- a/options/glibc/include/getopt.h +++ b/options/glibc/include/getopt.h @@ -24,7 +24,7 @@ extern int opterr; extern int optopt; #if __MLIBC_BSD_OPTION extern int optreset; -#endif //__MLIBC_BSD_OPTION +#endif /*__MLIBC_BSD_OPTION */ int getopt(int __argc, char *const __argv[], const char *__optstring); int getopt_long(int __argc, char *const __argv[], const char *__optstring, @@ -42,5 +42,5 @@ int getopt_long_only(int __argc, char *const __argv[], const char *__optstring, } #endif -#endif // _GETOPT_H +#endif /* _GETOPT_H */ diff --git a/options/glibc/include/netinet/in_systm.h b/options/glibc/include/netinet/in_systm.h index c98298f2e..131de898f 100644 --- a/options/glibc/include/netinet/in_systm.h +++ b/options/glibc/include/netinet/in_systm.h @@ -4,4 +4,4 @@ -#endif // _NETINET_IN_SYSTM_H +#endif /* _NETINET_IN_SYSTM_H */ diff --git a/options/glibc/include/paths.h b/options/glibc/include/paths.h index 3d8a4a6a1..b5f3faea6 100644 --- a/options/glibc/include/paths.h +++ b/options/glibc/include/paths.h @@ -1,5 +1,5 @@ -// This file is taken from musl -// Path to original: include/paths.h +/* This file is taken from musl */ +/* Path to original: include/paths.h */ #ifndef _PATHS_H #define _PATHS_H @@ -38,4 +38,4 @@ #define _PATH_WTMPX _PATH_WTMP #endif -#endif // _PATHS_H +#endif /* _PATHS_H */ diff --git a/options/glibc/include/printf.h b/options/glibc/include/printf.h index d8b6b292e..b6b86b9c9 100644 --- a/options/glibc/include/printf.h +++ b/options/glibc/include/printf.h @@ -10,7 +10,7 @@ extern "C" { #ifndef __MLIBC_ABI_ONLY -// This seems to be a glibc thing, so constants are from glibc +/* This seems to be a glibc thing, so constants are from glibc */ size_t parse_printf_format(const char * __restrict __format, size_t __size, int * __restrict __argtypes); #endif /* !__MLIBC_ABI_ONLY */ diff --git a/options/glibc/include/resolv.h b/options/glibc/include/resolv.h index dca36d88d..cb97c9b81 100644 --- a/options/glibc/include/resolv.h +++ b/options/glibc/include/resolv.h @@ -73,4 +73,4 @@ void res_nclose(res_state __state); } #endif -#endif // _RESOLV_H +#endif /* _RESOLV_H */ diff --git a/options/glibc/include/stdio_ext.h b/options/glibc/include/stdio_ext.h index c430116eb..ad25c18bb 100644 --- a/options/glibc/include/stdio_ext.h +++ b/options/glibc/include/stdio_ext.h @@ -26,7 +26,7 @@ void __fpurge(FILE *__stream); void _flushlbf(void); -// The following functions are defined by musl. +/* The following functions are defined by musl. */ size_t __freadahead(FILE *__stream); const char *__freadptr(FILE *__stream, size_t *__size); @@ -38,4 +38,4 @@ void __fseterr(FILE *__stream); } #endif -#endif // _STDIO_EXT_H +#endif /* _STDIO_EXT_H */ diff --git a/options/glibc/include/sys/ioctl.h b/options/glibc/include/sys/ioctl.h index d60e7be57..3f5e0a473 100644 --- a/options/glibc/include/sys/ioctl.h +++ b/options/glibc/include/sys/ioctl.h @@ -4,7 +4,7 @@ #include #include -// On Linux, sys/ioctl.h includes the termios ioctls. +/* On Linux, sys/ioctl.h includes the termios ioctls. */ #if __MLIBC_LINUX_OPTION # include # include @@ -41,4 +41,4 @@ int ioctl(int __fd, unsigned long __request, ...); } #endif -#endif // _SYS_IOCTL_H +#endif /* _SYS_IOCTL_H */ diff --git a/options/glibc/include/sys/personality.h b/options/glibc/include/sys/personality.h index 390cbf64a..cbaff129e 100644 --- a/options/glibc/include/sys/personality.h +++ b/options/glibc/include/sys/personality.h @@ -55,4 +55,4 @@ int personality(unsigned long __persona); } #endif -#endif // _SYS_PERSONALITY_H +#endif /* _SYS_PERSONALITY_H */ diff --git a/options/glibc/include/sys/timeb.h b/options/glibc/include/sys/timeb.h index d27173b9b..bf6d71895 100644 --- a/options/glibc/include/sys/timeb.h +++ b/options/glibc/include/sys/timeb.h @@ -11,4 +11,4 @@ extern "C" { } #endif -#endif // _SYS_TIMEB_H +#endif /* _SYS_TIMEB_H */ diff --git a/options/glibc/include/sys/timex.h b/options/glibc/include/sys/timex.h index 90c8ef84e..fcba911b9 100644 --- a/options/glibc/include/sys/timex.h +++ b/options/glibc/include/sys/timex.h @@ -75,4 +75,4 @@ int ntp_adjtime(struct timex *__buf); } #endif -#endif // _SYS_TIMEX_H +#endif /* _SYS_TIMEX_H */ diff --git a/options/glibc/include/sys/ucontext.h b/options/glibc/include/sys/ucontext.h index b4798eefe..cae57f097 100644 --- a/options/glibc/include/sys/ucontext.h +++ b/options/glibc/include/sys/ucontext.h @@ -11,4 +11,4 @@ extern "C" { } #endif -#endif // _SYS_UCONTEXT_H +#endif /* _SYS_UCONTEXT_H */ diff --git a/options/glibc/include/sysexits.h b/options/glibc/include/sysexits.h index f3bde2592..b2969daa8 100644 --- a/options/glibc/include/sysexits.h +++ b/options/glibc/include/sysexits.h @@ -21,4 +21,4 @@ #define EX__BASE 64 #define EX__MAX 78 -#endif // _SYSEXITS_H +#endif /* _SYSEXITS_H */ diff --git a/options/internal/include/bits/ensure.h b/options/internal/include/bits/ensure.h index f75a2e9b7..17c96a867 100644 --- a/options/internal/include/bits/ensure.h +++ b/options/internal/include/bits/ensure.h @@ -41,5 +41,5 @@ void __ensure_warn(const char *assertion, const char *file, unsigned int line, } #endif -#endif // MLIBC_ENSURE_H +#endif /* MLIBC_ENSURE_H */ diff --git a/options/internal/include/bits/ether_addr.h b/options/internal/include/bits/ether_addr.h index 1631e98f8..3c8f595ba 100644 --- a/options/internal/include/bits/ether_addr.h +++ b/options/internal/include/bits/ether_addr.h @@ -7,4 +7,4 @@ struct ether_addr { uint8_t ether_addr_octet[6]; } __attribute__((__packed__)); -#endif // MLIBC_ETHER_ADDR_H +#endif /* MLIBC_ETHER_ADDR_H */ diff --git a/options/internal/include/bits/inline-definition.h b/options/internal/include/bits/inline-definition.h index ec4c4da4c..939059aac 100644 --- a/options/internal/include/bits/inline-definition.h +++ b/options/internal/include/bits/inline-definition.h @@ -15,5 +15,5 @@ extern "C" { } #endif -#endif // MLIBC_INLINE_DEFINITION_H +#endif /* MLIBC_INLINE_DEFINITION_H */ diff --git a/options/internal/include/bits/machine.h b/options/internal/include/bits/machine.h index 371a94b16..48821caf2 100644 --- a/options/internal/include/bits/machine.h +++ b/options/internal/include/bits/machine.h @@ -82,5 +82,5 @@ struct __mlibc_jmpbuf_register_state { # error "Missing architecture specific code" #endif -#endif // MLIBC_MACHINE_H +#endif /* MLIBC_MACHINE_H */ diff --git a/options/internal/include/bits/mbstate.h b/options/internal/include/bits/mbstate.h index 2bfb3eb63..31eb9f42d 100644 --- a/options/internal/include/bits/mbstate.h +++ b/options/internal/include/bits/mbstate.h @@ -9,4 +9,4 @@ struct __mlibc_mbstate { #define __MLIBC_MBSTATE_INITIALIZER {0, 0, 0} -#endif // MLIBC_MBSTATE_H +#endif /* MLIBC_MBSTATE_H */ diff --git a/options/internal/include/bits/nl_item.h b/options/internal/include/bits/nl_item.h index dc882dca5..762e61b0a 100644 --- a/options/internal/include/bits/nl_item.h +++ b/options/internal/include/bits/nl_item.h @@ -78,5 +78,5 @@ typedef int nl_item; } #endif -#endif // _NL_ITEM_H +#endif /* _NL_ITEM_H */ diff --git a/options/internal/include/bits/null.h b/options/internal/include/bits/null.h index 7d3fa7b10..176008f45 100644 --- a/options/internal/include/bits/null.h +++ b/options/internal/include/bits/null.h @@ -12,5 +12,5 @@ # define NULL 0 #endif -#endif // MLIBC_NULL_H +#endif /* MLIBC_NULL_H */ diff --git a/options/internal/include/bits/off_t.h b/options/internal/include/bits/off_t.h index 929fae9e2..43dcd9edb 100644 --- a/options/internal/include/bits/off_t.h +++ b/options/internal/include/bits/off_t.h @@ -1,8 +1,8 @@ #ifndef MLIBC_OFF_T_H #define MLIBC_OFF_T_H -// TODO: use something like int64_t instead? +/* TODO: use something like int64_t instead? */ typedef long off_t; typedef long off64_t; -#endif // MLIBC_OFF_T_H +#endif /* MLIBC_OFF_T_H */ diff --git a/options/internal/include/bits/sigset_t.h b/options/internal/include/bits/sigset_t.h index 56e07eb22..b3d18a381 100644 --- a/options/internal/include/bits/sigset_t.h +++ b/options/internal/include/bits/sigset_t.h @@ -9,7 +9,7 @@ extern "C" { #ifndef __MLIBC_ABI_ONLY -// functions to manage sigset_t +/* functions to manage sigset_t */ int sigemptyset(sigset_t *__sigset); int sigfillset(sigset_t *__sigset); int sigaddset(sigset_t *__sigset, int __sig); @@ -22,4 +22,4 @@ int sigismember(const sigset_t *__sigset, int __sig); } #endif -#endif //MLIBC_BITS_SIGSET_T_H +#endif /*MLIBC_BITS_SIGSET_T_H */ diff --git a/options/internal/include/bits/size_t.h b/options/internal/include/bits/size_t.h index 46d74869e..125875ca4 100644 --- a/options/internal/include/bits/size_t.h +++ b/options/internal/include/bits/size_t.h @@ -3,4 +3,4 @@ typedef __SIZE_TYPE__ size_t; -#endif // MLIBC_SIZE_T_H +#endif /* MLIBC_SIZE_T_H */ diff --git a/options/internal/include/bits/ssize_t.h b/options/internal/include/bits/ssize_t.h index c450233dc..a1a847179 100644 --- a/options/internal/include/bits/ssize_t.h +++ b/options/internal/include/bits/ssize_t.h @@ -2,7 +2,7 @@ #ifndef MLIBC_SSIZE_T_H #define MLIBC_SSIZE_T_H -// TODO: use ptrdiff_t instead? +/* TODO: use ptrdiff_t instead? */ #if __UINTPTR_MAX__ == __UINT64_MAX__ typedef long ssize_t; #elif __UINTPTR_MAX__ == __UINT32_MAX__ @@ -11,5 +11,5 @@ typedef int ssize_t; #error "unsupported architecture" #endif -#endif // MLIBC_SSIZE_T_H +#endif /* MLIBC_SSIZE_T_H */ diff --git a/options/internal/include/bits/threads.h b/options/internal/include/bits/threads.h index 3feb4c34b..6bd637934 100644 --- a/options/internal/include/bits/threads.h +++ b/options/internal/include/bits/threads.h @@ -6,25 +6,25 @@ #include #include -// values for pthread_attr_{get,set}detachstate(). +/* values for pthread_attr_{get,set}detachstate(). */ #define __MLIBC_THREAD_CREATE_JOINABLE 0 #define __MLIBC_THREAD_CREATE_DETACHED 1 -// values for pthread_mutexattr_{get,set}type(). +/* values for pthread_mutexattr_{get,set}type(). */ #define __MLIBC_THREAD_MUTEX_DEFAULT 0 #define __MLIBC_THREAD_MUTEX_NORMAL 0 #define __MLIBC_THREAD_MUTEX_ERRORCHECK 1 #define __MLIBC_THREAD_MUTEX_RECURSIVE 2 -// values for pthread_mutexattr_{get,set}pshared(). +/* values for pthread_mutexattr_{get,set}pshared(). */ #define __MLIBC_THREAD_PROCESS_PRIVATE 0 #define __MLIBC_THREAD_PROCESS_SHARED 1 -// values for pthread_mutexattr_{get,set}robust(). +/* values for pthread_mutexattr_{get,set}robust(). */ #define __MLIBC_THREAD_MUTEX_STALLED 0 #define __MLIBC_THREAD_MUTEX_ROBUST 1 -// Values for pthread_mutexattr_{get,set}protocol() +/* Values for pthread_mutexattr_{get,set}protocol() */ #define __MLIBC_THREAD_PRIO_NONE 0 #define __MLIBC_THREAD_PRIO_INHERIT 1 #define __MLIBC_THREAD_PRIO_PROTECT 2 diff --git a/options/internal/include/bits/types.h b/options/internal/include/bits/types.h index 935c5e0eb..312697031 100644 --- a/options/internal/include/bits/types.h +++ b/options/internal/include/bits/types.h @@ -11,7 +11,7 @@ typedef __INT16_TYPE__ __mlibc_int16; typedef __INT32_TYPE__ __mlibc_int32; typedef __INT64_TYPE__ __mlibc_int64; -// Clang and GCC have different mechanisms for INT32_C and friends. +/* Clang and GCC have different mechanisms for INT32_C and friends. */ #ifdef __clang__ # define __MLIBC_C_EXPAND_JOIN(x, suffix) x ## suffix # define __MLIBC_C_JOIN(x, suffix) __MLIBC_C_EXPAND_JOIN(x, suffix) @@ -58,7 +58,7 @@ typedef __INT64_TYPE__ __mlibc_int64; #define __MLIBC_UINT32_MAX __UINT32_MAX__ #define __MLIBC_UINT64_MAX __UINT64_MAX__ -// Fast types (signed). +/* Fast types (signed). */ #if defined (__i386__) @@ -152,7 +152,7 @@ typedef __mlibc_int64 __mlibc_int_fast64; # error "Missing architecture specific code" #endif -// Fast types (unsigned). +/* Fast types (unsigned). */ #if defined (__i386__) @@ -246,7 +246,7 @@ typedef __mlibc_uint64 __mlibc_uint_fast64; # error "Missing architecture specific code" #endif -// Special types. +/* Special types. */ typedef __INTMAX_TYPE__ __mlibc_intmax; typedef __INTPTR_TYPE__ __mlibc_intptr; @@ -265,7 +265,7 @@ typedef __SIZE_TYPE__ __mlibc_size; #define __MLIBC_UINTPTR_MAX __UINTPTR_MAX__ #define __MLIBC_SIZE_MAX __SIZE_MAX__ -// Other limits. +/* Other limits. */ #define __MLIBC_WCHAR_MAX __WCHAR_MAX__ #define __MLIBC_WCHAR_MIN __WCHAR_MIN__ @@ -276,9 +276,9 @@ typedef __SIZE_TYPE__ __mlibc_size; #define __MLIBC_SIG_ATOMIC_MAX __SIG_ATOMIC_MAX__ #define __MLIBC_SIG_ATOMIC_MIN __SIG_ATOMIC_MIN__ -// ---------------------------------------------------------------------------- -// Sanity checking. Make sure that we agree with the compiler's ABI. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* Sanity checking. Make sure that we agree with the compiler's ABI. */ +/* ---------------------------------------------------------------------------- */ #if defined(__cpp_static_assert) # define __MLIBC_STATIC_ASSERT(c, text) static_assert(c, text) @@ -291,7 +291,7 @@ typedef __SIZE_TYPE__ __mlibc_size; #define __MLIBC_CHECK_TYPE(T1, T2) __MLIBC_STATIC_ASSERT(sizeof(T1) == sizeof(T2),\ #T1 " != " #T2); -// Least-width. +/* Least-width. */ __MLIBC_CHECK_TYPE(__mlibc_int8, __INT_LEAST8_TYPE__); __MLIBC_CHECK_TYPE(__mlibc_int16, __INT_LEAST16_TYPE__); __MLIBC_CHECK_TYPE(__mlibc_int32, __INT_LEAST32_TYPE__); @@ -302,8 +302,8 @@ __MLIBC_CHECK_TYPE(__mlibc_uint16, __UINT_LEAST16_TYPE__); __MLIBC_CHECK_TYPE(__mlibc_uint32, __UINT_LEAST32_TYPE__); __MLIBC_CHECK_TYPE(__mlibc_uint64, __UINT_LEAST64_TYPE__); -// Fast-width. -// Unfortunately, GCC and Clang disagree about fast types. +/* Fast-width. */ +/* Unfortunately, GCC and Clang disagree about fast types. */ #ifndef __clang__ __MLIBC_CHECK_TYPE(__mlibc_int_fast8, __INT_FAST8_TYPE__); __MLIBC_CHECK_TYPE(__mlibc_int_fast16, __INT_FAST16_TYPE__); @@ -316,4 +316,4 @@ __MLIBC_CHECK_TYPE(__mlibc_uint64, __UINT_LEAST64_TYPE__); __MLIBC_CHECK_TYPE(__mlibc_uint_fast64, __UINT_FAST64_TYPE__); #endif -#endif // _MLIBC_INTERNAL_TYPES_H +#endif /* _MLIBC_INTERNAL_TYPES_H */ diff --git a/options/internal/include/bits/wchar.h b/options/internal/include/bits/wchar.h index a422ef74b..478eb9071 100644 --- a/options/internal/include/bits/wchar.h +++ b/options/internal/include/bits/wchar.h @@ -6,4 +6,4 @@ #define WCHAR_MAX __MLIBC_WCHAR_MAX #define WCHAR_MIN __MLIBC_WCHAR_MIN -#endif // MLIBC_WCHAR_H +#endif /* MLIBC_WCHAR_H */ diff --git a/options/internal/include/bits/wchar_t.h b/options/internal/include/bits/wchar_t.h index 4eb4e9cc3..83aa5e546 100644 --- a/options/internal/include/bits/wchar_t.h +++ b/options/internal/include/bits/wchar_t.h @@ -8,5 +8,5 @@ typedef __WCHAR_TYPE__ wchar_t; #endif -#endif // MLIBC_WCHAR_T_H +#endif /* MLIBC_WCHAR_T_H */ diff --git a/options/internal/include/bits/winsize.h b/options/internal/include/bits/winsize.h index 7b3006a71..3edbcd412 100644 --- a/options/internal/include/bits/winsize.h +++ b/options/internal/include/bits/winsize.h @@ -9,5 +9,5 @@ struct winsize { unsigned short ws_ypixel; }; -#endif // MLIBC_WINSIZE_H +#endif /* MLIBC_WINSIZE_H */ diff --git a/options/internal/include/bits/wint_t.h b/options/internal/include/bits/wint_t.h index b4f57bf29..f5aaea334 100644 --- a/options/internal/include/bits/wint_t.h +++ b/options/internal/include/bits/wint_t.h @@ -3,4 +3,4 @@ typedef __WINT_TYPE__ wint_t; -#endif // MLIBC_WINT_T_H +#endif /* MLIBC_WINT_T_H */ diff --git a/options/internal/include/stdint.h b/options/internal/include/stdint.h index 4d8df6609..36ec413d8 100644 --- a/options/internal/include/stdint.h +++ b/options/internal/include/stdint.h @@ -4,77 +4,77 @@ #include #include -// ---------------------------------------------------------------------------- -// Type definitions. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* Type definitions. */ +/* ---------------------------------------------------------------------------- */ -// Fixed-width (signed). +/* Fixed-width (signed). */ typedef __mlibc_int8 int8_t; typedef __mlibc_int16 int16_t; typedef __mlibc_int32 int32_t; typedef __mlibc_int64 int64_t; -// Fixed-width (unsigned). +/* Fixed-width (unsigned). */ typedef __mlibc_uint8 uint8_t; typedef __mlibc_uint16 uint16_t; typedef __mlibc_uint32 uint32_t; typedef __mlibc_uint64 uint64_t; -// Least-width (signed). +/* Least-width (signed). */ typedef __mlibc_int8 int_least8_t; typedef __mlibc_int16 int_least16_t; typedef __mlibc_int32 int_least32_t; typedef __mlibc_int64 int_least64_t; -// Least-width (unsigned). +/* Least-width (unsigned). */ typedef __mlibc_uint8 uint_least8_t; typedef __mlibc_uint16 uint_least16_t; typedef __mlibc_uint32 uint_least32_t; typedef __mlibc_uint64 uint_least64_t; -// Fast-width (signed). +/* Fast-width (signed). */ typedef __mlibc_int_fast8 int_fast8_t; typedef __mlibc_int_fast16 int_fast16_t; typedef __mlibc_int_fast32 int_fast32_t; typedef __mlibc_int_fast64 int_fast64_t; -// Fast-width (unsigned). +/* Fast-width (unsigned). */ typedef __mlibc_uint_fast8 uint_fast8_t; typedef __mlibc_uint_fast16 uint_fast16_t; typedef __mlibc_uint_fast32 uint_fast32_t; typedef __mlibc_uint_fast64 uint_fast64_t; -// Miscellaneous (signed). +/* Miscellaneous (signed). */ typedef __mlibc_intmax intmax_t; typedef __mlibc_intptr intptr_t; -// Miscellaneous (unsigned). +/* Miscellaneous (unsigned). */ typedef __mlibc_uintmax uintmax_t; typedef __mlibc_uintptr uintptr_t; -// ---------------------------------------------------------------------------- -// Constants. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* Constants. */ +/* ---------------------------------------------------------------------------- */ -// Fixed-width (signed). +/* Fixed-width (signed). */ #define INT8_C(x) __MLIBC_INT8_C(x) #define INT16_C(x) __MLIBC_INT16_C(x) #define INT32_C(x) __MLIBC_INT32_C(x) #define INT64_C(x) __MLIBC_INT64_C(x) #define INTMAX_C(x) __MLIBC_INTMAX_C(x) -// Fixed-width (unsigned). +/* Fixed-width (unsigned). */ #define UINT8_C(x) __MLIBC_UINT8_C(x) #define UINT16_C(x) __MLIBC_UINT16_C(x) #define UINT32_C(x) __MLIBC_UINT32_C(x) #define UINT64_C(x) __MLIBC_UINT64_C(x) #define UINTMAX_C(x) __MLIBC_UINTMAX_C(x) -// ---------------------------------------------------------------------------- -// Limits. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* Limits. */ +/* ---------------------------------------------------------------------------- */ -// Fixed-width (signed). +/* Fixed-width (signed). */ #define INT8_MAX __MLIBC_INT8_MAX #define INT16_MAX __MLIBC_INT16_MAX #define INT32_MAX __MLIBC_INT32_MAX @@ -85,13 +85,13 @@ typedef __mlibc_uintptr uintptr_t; #define INT32_MIN __MLIBC_INT32_MIN #define INT64_MIN __MLIBC_INT64_MIN -// Fixed-width (unsigned). +/* Fixed-width (unsigned). */ #define UINT8_MAX __MLIBC_UINT8_MAX #define UINT16_MAX __MLIBC_UINT16_MAX #define UINT32_MAX __MLIBC_UINT32_MAX #define UINT64_MAX __MLIBC_UINT64_MAX -// Least-width (signed). +/* Least-width (signed). */ #define INT_LEAST8_MAX __MLIBC_INT8_MAX #define INT_LEAST16_MAX __MLIBC_INT16_MAX #define INT_LEAST32_MAX __MLIBC_INT32_MAX @@ -102,13 +102,13 @@ typedef __mlibc_uintptr uintptr_t; #define INT_LEAST32_MIN __MLIBC_INT32_MIN #define INT_LEAST64_MIN __MLIBC_INT64_MIN -// Least-width (unsigned). +/* Least-width (unsigned). */ #define UINT_LEAST8_MAX __MLIBC_UINT8_MAX #define UINT_LEAST16_MAX __MLIBC_UINT16_MAX #define UINT_LEAST32_MAX __MLIBC_UINT32_MAX #define UINT_LEAST64_MAX __MLIBC_UINT64_MAX -// Fast-width (signed). +/* Fast-width (signed). */ #define INT_FAST8_MAX __MLIBC_INT_FAST8_MAX #define INT_FAST16_MAX __MLIBC_INT_FAST16_MAX #define INT_FAST32_MAX __MLIBC_INT_FAST32_MAX @@ -119,24 +119,24 @@ typedef __mlibc_uintptr uintptr_t; #define INT_FAST32_MIN __MLIBC_INT_FAST32_MIN #define INT_FAST64_MIN __MLIBC_INT_FAST64_MIN -// Fast-width (unsigned). +/* Fast-width (unsigned). */ #define UINT_FAST8_MAX __MLIBC_UINT_FAST8_MAX #define UINT_FAST16_MAX __MLIBC_UINT_FAST16_MAX #define UINT_FAST32_MAX __MLIBC_UINT_FAST32_MAX #define UINT_FAST64_MAX __MLIBC_UINT_FAST64_MAX -// Miscellaneous (signed). +/* Miscellaneous (signed). */ #define INTMAX_MAX __MLIBC_INTMAX_MAX #define INTPTR_MAX __MLIBC_INTPTR_MAX #define INTMAX_MIN __MLIBC_INTMAX_MIN #define INTPTR_MIN __MLIBC_INTPTR_MIN -// Miscellaneous (unsigned). +/* Miscellaneous (unsigned). */ #define UINTMAX_MAX __MLIBC_UINTMAX_MAX #define UINTPTR_MAX __MLIBC_UINTPTR_MAX -// Other limits (signed). +/* Other limits (signed). */ #define PTRDIFF_MAX __MLIBC_PTRDIFF_MAX #define PTRDIFF_MIN __MLIBC_PTRDIFF_MIN #define SIG_ATOMIC_MAX __MLIBC_SIG_ATOMIC_MAX @@ -144,7 +144,7 @@ typedef __mlibc_uintptr uintptr_t; #define WINT_MAX __MLIBC_WINT_MAX #define WINT_MIN __MLIBC_WINT_MIN -// Other limits (unsigned). +/* Other limits (unsigned). */ #define SIZE_MAX __MLIBC_SIZE_MAX -#endif // _MLIBC_STDINT_H +#endif /* _MLIBC_STDINT_H */ diff --git a/options/intl/include/libintl.h b/options/intl/include/libintl.h index 9daaa4b38..3e3746c5a 100644 --- a/options/intl/include/libintl.h +++ b/options/intl/include/libintl.h @@ -29,5 +29,5 @@ char *bind_textdomain_codeset(const char *__domainname, const char *__codeset); } #endif -#endif // _LIBINTL_H +#endif /* _LIBINTL_H */ diff --git a/options/linux/include/bits/linux/linux_unistd.h b/options/linux/include/bits/linux/linux_unistd.h index 46e35e1aa..0e17ba68e 100644 --- a/options/linux/include/bits/linux/linux_unistd.h +++ b/options/linux/include/bits/linux/linux_unistd.h @@ -18,4 +18,4 @@ int syncfs(int __fd); } #endif -#endif // _LINUX_UNISTD_H +#endif /* _LINUX_UNISTD_H */ diff --git a/options/linux/include/ifaddrs.h b/options/linux/include/ifaddrs.h index 6a46d646b..c57ff3d11 100644 --- a/options/linux/include/ifaddrs.h +++ b/options/linux/include/ifaddrs.h @@ -9,15 +9,15 @@ extern "C" { #include #include -// Struct definitions taken from musl +/* Struct definitions taken from musl */ struct ifaddrs { struct ifaddrs *ifa_next; char *ifa_name; unsigned ifa_flags; struct sockaddr *ifa_addr; struct sockaddr *ifa_netmask; - // the man page (and glibc) place `ifa_broadaddr` and `ifa_dstaddr` in a union - // TODO: decide whether we should do it, too + /* the man page (and glibc) place `ifa_broadaddr` and `ifa_dstaddr` in a union */ + /* TODO: decide whether we should do it, too */ struct sockaddr *ifa_broadaddr; struct sockaddr *ifa_dstaddr; void *ifa_data; @@ -34,4 +34,4 @@ void freeifaddrs(struct ifaddrs *__ifa); } #endif -#endif // _IFADDRS_H +#endif /* _IFADDRS_H */ diff --git a/options/linux/include/lastlog.h b/options/linux/include/lastlog.h index 0930aaf9f..a10b0bb9b 100644 --- a/options/linux/include/lastlog.h +++ b/options/linux/include/lastlog.h @@ -1,2 +1,2 @@ -// Maches glibc +/* Maches glibc */ #include \ No newline at end of file diff --git a/options/linux/include/linux/libc-compat.h b/options/linux/include/linux/libc-compat.h index 696f4afd1..bafc3a463 100644 --- a/options/linux/include/linux/libc-compat.h +++ b/options/linux/include/linux/libc-compat.h @@ -9,7 +9,7 @@ #define __UAPI_DEF_IF_IFREQ 0 #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0 -#else // _NET_IF_H +#else /* _NET_IF_H */ #define __UAPI_DEF_IF_IFCONF 1 #define __UAPI_DEF_IF_IFMAP 1 @@ -18,7 +18,7 @@ #define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1 #define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1 -#endif //_NET_IF_H +#endif /*_NET_IF_H */ #if defined(_NETINET_IN_H) @@ -58,4 +58,4 @@ #endif /* _NETINET_IN_H */ -#endif // _LINUX_LIBC_COMPAT_H +#endif /* _LINUX_LIBC_COMPAT_H */ diff --git a/options/linux/include/malloc.h b/options/linux/include/malloc.h index 0dcff2fc1..382dac2aa 100644 --- a/options/linux/include/malloc.h +++ b/options/linux/include/malloc.h @@ -11,7 +11,7 @@ extern "C" { #ifndef __MLIBC_ABI_ONLY -// [7.22.3] Memory management functions +/* [7.22.3] Memory management functions */ void *calloc(size_t __count, size_t __size); void free(void *__pointer); void *malloc(size_t __size); @@ -28,5 +28,5 @@ void *memalign(size_t __alignment, size_t __size); } #endif -#endif // _MALLOC_H +#endif /* _MALLOC_H */ diff --git a/options/linux/include/memory.h b/options/linux/include/memory.h index 586822b2c..296f8adaa 100644 --- a/options/linux/include/memory.h +++ b/options/linux/include/memory.h @@ -2,8 +2,8 @@ #ifndef _MEMORY_H #define _MEMORY_H -// This is a linux extension +/* This is a linux extension */ #include -#endif // _MEMORY_H +#endif /* _MEMORY_H */ diff --git a/options/linux/include/mntent.h b/options/linux/include/mntent.h index bda2f6215..284c4b69d 100644 --- a/options/linux/include/mntent.h +++ b/options/linux/include/mntent.h @@ -3,7 +3,7 @@ #include -// TODO: Refer to _PATH_MOUNTED +/* TODO: Refer to _PATH_MOUNTED */ #define MOUNTED "/etc/mtab" /* Generic mount options */ @@ -47,4 +47,4 @@ struct mntent *getmntent_r(FILE *__f, struct mntent *__mnt, char *__linebuf, int } #endif -#endif // _MNTENT_H +#endif /* _MNTENT_H */ diff --git a/options/linux/include/module.h b/options/linux/include/module.h index 61d2f5e96..5d84f7296 100644 --- a/options/linux/include/module.h +++ b/options/linux/include/module.h @@ -22,4 +22,4 @@ int delete_module(const char *__name, unsigned __flags); } #endif -#endif // _MODULE_H +#endif /* _MODULE_H */ diff --git a/options/linux/include/netpacket/packet.h b/options/linux/include/netpacket/packet.h index 1fa091700..495760f1d 100644 --- a/options/linux/include/netpacket/packet.h +++ b/options/linux/include/netpacket/packet.h @@ -37,4 +37,4 @@ struct packet_mreq { #define PACKET_MR_ALLMULTI 2 #define PACKET_MR_UNICAST 3 -#endif // _NETPACKET_PACKET_H +#endif /* _NETPACKET_PACKET_H */ diff --git a/options/linux/include/pty.h b/options/linux/include/pty.h index b8556595a..6379ae738 100644 --- a/options/linux/include/pty.h +++ b/options/linux/include/pty.h @@ -19,5 +19,5 @@ int forkpty(int *__mfd, char *__name, const struct termios *__ios, const struct } #endif -#endif // _PTY_H +#endif /* _PTY_H */ diff --git a/options/linux/include/scsi/scsi.h b/options/linux/include/scsi/scsi.h index f7f92d859..fd9cf82af 100644 --- a/options/linux/include/scsi/scsi.h +++ b/options/linux/include/scsi/scsi.h @@ -14,5 +14,5 @@ #define SCSI_IOCTL_TAGGED_DISABLE 0x5384 #define SCSI_IOCTL_PROBE_HOST 0x5385 -#endif // _LINUX_SCSI_SCSI_H +#endif /* _LINUX_SCSI_SCSI_H */ diff --git a/options/linux/include/scsi/scsi_ioctl.h b/options/linux/include/scsi/scsi_ioctl.h index 16c7cfa09..888ae398e 100644 --- a/options/linux/include/scsi/scsi_ioctl.h +++ b/options/linux/include/scsi/scsi_ioctl.h @@ -2,5 +2,5 @@ #ifndef _LINUX_SCSI_SCSI_IOCTL_H #define _LINUX_SCSI_SCSI_IOCTL_H -#endif // _LINUX_SCSI_SCSI_IOCTL_H +#endif /* _LINUX_SCSI_SCSI_IOCTL_H */ diff --git a/options/linux/include/scsi/sg.h b/options/linux/include/scsi/sg.h index a9dfc7a27..5b3d379ae 100644 --- a/options/linux/include/scsi/sg.h +++ b/options/linux/include/scsi/sg.h @@ -73,5 +73,5 @@ typedef struct sg_req_info { } #endif -#endif // _LINUX_SCSI_SG_H +#endif /* _LINUX_SCSI_SG_H */ diff --git a/options/linux/include/sys/epoll.h b/options/linux/include/sys/epoll.h index 5fcd96dda..aca9b131d 100644 --- a/options/linux/include/sys/epoll.h +++ b/options/linux/include/sys/epoll.h @@ -8,7 +8,7 @@ #define EPOLL_NONBLOCK O_NONBLOCK -// These constants match the Linux definitions. +/* These constants match the Linux definitions. */ #define EPOLLIN 0x001 #define EPOLLPRI 0x002 #define EPOLLOUT 0x004 @@ -63,4 +63,4 @@ int epoll_pwait(int __epfd, struct epoll_event *__events, int __maxevents, int _ } #endif -#endif // _SYS_EPOLL_H +#endif /* _SYS_EPOLL_H */ diff --git a/options/linux/include/sys/eventfd.h b/options/linux/include/sys/eventfd.h index 3c77aa56b..74b200d67 100644 --- a/options/linux/include/sys/eventfd.h +++ b/options/linux/include/sys/eventfd.h @@ -26,4 +26,4 @@ int eventfd_write(int __fd, eventfd_t __value); } #endif -#endif // _SYS_EVENTFD_H +#endif /* _SYS_EVENTFD_H */ diff --git a/options/linux/include/sys/fsuid.h b/options/linux/include/sys/fsuid.h index 95893f451..0fa0fb347 100644 --- a/options/linux/include/sys/fsuid.h +++ b/options/linux/include/sys/fsuid.h @@ -19,4 +19,4 @@ int setfsgid(gid_t __gid); } #endif -#endif // _SYS_FSUID_H +#endif /* _SYS_FSUID_H */ diff --git a/options/linux/include/sys/inotify.h b/options/linux/include/sys/inotify.h index f2f7d29b3..02f4b3601 100644 --- a/options/linux/include/sys/inotify.h +++ b/options/linux/include/sys/inotify.h @@ -59,5 +59,5 @@ int inotify_rm_watch(int __ifd, int __wd); } #endif -#endif //_SYS_INOTIFY_H +#endif /*_SYS_INOTIFY_H */ diff --git a/options/linux/include/sys/mount.h b/options/linux/include/sys/mount.h index 4af48a08d..4094c61f7 100644 --- a/options/linux/include/sys/mount.h +++ b/options/linux/include/sys/mount.h @@ -87,4 +87,4 @@ int umount2(const char *__target, int __flags); } #endif -#endif // _SYS_MOUNT_H +#endif /* _SYS_MOUNT_H */ diff --git a/options/linux/include/sys/prctl.h b/options/linux/include/sys/prctl.h index a4d0c61d2..61e9eb5aa 100644 --- a/options/linux/include/sys/prctl.h +++ b/options/linux/include/sys/prctl.h @@ -124,5 +124,5 @@ int prctl(int __op, ...); #endif /* !__MLIBC_ABI_ONLY */ -#endif // _SYS_PRCTL_H +#endif /* _SYS_PRCTL_H */ diff --git a/options/linux/include/sys/ptrace.h b/options/linux/include/sys/ptrace.h index 1db188996..915b01df7 100644 --- a/options/linux/include/sys/ptrace.h +++ b/options/linux/include/sys/ptrace.h @@ -51,5 +51,5 @@ long ptrace(int __op, ...); } #endif -#endif // _SYS_PTRACE_H +#endif /* _SYS_PTRACE_H */ diff --git a/options/linux/include/sys/quota.h b/options/linux/include/sys/quota.h index 2b221cc0c..8f6ea0533 100644 --- a/options/linux/include/sys/quota.h +++ b/options/linux/include/sys/quota.h @@ -21,4 +21,4 @@ int quotactl(int __cmd, const char *__special, int __id, caddr_t __addr); } #endif -#endif // _SYS_QUOTA_H +#endif /* _SYS_QUOTA_H */ diff --git a/options/linux/include/sys/random.h b/options/linux/include/sys/random.h index 15be40ac8..51b0b1b8f 100644 --- a/options/linux/include/sys/random.h +++ b/options/linux/include/sys/random.h @@ -22,5 +22,5 @@ ssize_t getrandom(void *__buffer, size_t __max_size, unsigned int __flags); } #endif -#endif //_SYS_RANDOM_H +#endif /*_SYS_RANDOM_H */ diff --git a/options/linux/include/sys/reboot.h b/options/linux/include/sys/reboot.h index 613448411..598388292 100644 --- a/options/linux/include/sys/reboot.h +++ b/options/linux/include/sys/reboot.h @@ -17,4 +17,4 @@ int reboot(int __arg); } #endif -#endif // MLIBC_SYS_REBOOT_H +#endif /* MLIBC_SYS_REBOOT_H */ diff --git a/options/linux/include/sys/sendfile.h b/options/linux/include/sys/sendfile.h index 41a1936b0..4a0c359a9 100644 --- a/options/linux/include/sys/sendfile.h +++ b/options/linux/include/sys/sendfile.h @@ -18,5 +18,5 @@ ssize_t sendfile(int __out_fd, int __in_fd, off_t *__offset, size_t __size); } #endif -#endif // _SYS_SENDFILE_H_ +#endif /* _SYS_SENDFILE_H_ */ diff --git a/options/linux/include/sys/signalfd.h b/options/linux/include/sys/signalfd.h index c79799492..13327c12b 100644 --- a/options/linux/include/sys/signalfd.h +++ b/options/linux/include/sys/signalfd.h @@ -1,9 +1,9 @@ #ifndef _SYS_SIGNALFD_H #define _SYS_SIGNALFD_H -// TODO: Define sigset separately and remove this include. +/* TODO: Define sigset separately and remove this include. */ #include -// musl includes those. Restructure this so we do not need them? +/* musl includes those. Restructure this so we do not need them? */ #include #include @@ -45,4 +45,4 @@ int signalfd(int __fd, const sigset_t *__mask, int __flags); } #endif -#endif // _SYS_SIGNALFD_H +#endif /* _SYS_SIGNALFD_H */ diff --git a/options/linux/include/sys/statfs.h b/options/linux/include/sys/statfs.h index f5d074745..c44630754 100644 --- a/options/linux/include/sys/statfs.h +++ b/options/linux/include/sys/statfs.h @@ -19,5 +19,5 @@ int fstatfs64(int __fd, struct statfs64 *__buf); } #endif -#endif // _SYS_STATFS_H +#endif /* _SYS_STATFS_H */ diff --git a/options/linux/include/sys/sysinfo.h b/options/linux/include/sys/sysinfo.h index 6c5e26db8..6d4b20349 100644 --- a/options/linux/include/sys/sysinfo.h +++ b/options/linux/include/sys/sysinfo.h @@ -18,7 +18,7 @@ struct sysinfo { unsigned long totalhigh; unsigned long freehigh; unsigned int mem_unit; - char _f[20 - 2 * sizeof(long) - sizeof(int)]; // Padding to 64 bytes according to my man page + char _f[20 - 2 * sizeof(long) - sizeof(int)]; /* Padding to 64 bytes according to my man page */ }; #ifndef __MLIBC_ABI_ONLY @@ -31,4 +31,4 @@ int sysinfo(struct sysinfo *__info); } #endif -#endif // _SYS_SYSINFO_H +#endif /* _SYS_SYSINFO_H */ diff --git a/options/linux/include/sys/sysmacros.h b/options/linux/include/sys/sysmacros.h index 230858b60..98b658084 100644 --- a/options/linux/include/sys/sysmacros.h +++ b/options/linux/include/sys/sysmacros.h @@ -32,4 +32,4 @@ __MLIBC_INLINE_DEFINITION unsigned long long int __mlibc_dev_makedev( } #endif -#endif // _SYS_SYSMACROS_H +#endif /* _SYS_SYSMACROS_H */ diff --git a/options/linux/include/sys/timerfd.h b/options/linux/include/sys/timerfd.h index d9f671655..5caac5d89 100644 --- a/options/linux/include/sys/timerfd.h +++ b/options/linux/include/sys/timerfd.h @@ -1,7 +1,7 @@ #ifndef _SYS_TIMERFD_H #define _SYS_TIMERFD_H -// musl includes those. Refactor and remove them? +/* musl includes those. Refactor and remove them? */ #include #include @@ -29,4 +29,4 @@ int timerfd_gettime(int __fd, struct itimerspec *__value); } #endif -#endif // _SYS_TIMERFD_H +#endif /* _SYS_TIMERFD_H */ diff --git a/options/linux/include/sys/vfs.h b/options/linux/include/sys/vfs.h index 61a6aa34e..7e7e60d69 100644 --- a/options/linux/include/sys/vfs.h +++ b/options/linux/include/sys/vfs.h @@ -12,5 +12,5 @@ extern "C" { } #endif -#endif // _SYS_VFS_H +#endif /* _SYS_VFS_H */ diff --git a/options/linux/include/sys/vt.h b/options/linux/include/sys/vt.h index d9dfbd9cc..b0518edb4 100644 --- a/options/linux/include/sys/vt.h +++ b/options/linux/include/sys/vt.h @@ -3,4 +3,4 @@ #include -#endif // _SYS_VT_H +#endif /* _SYS_VT_H */ diff --git a/options/linux/include/utmp.h b/options/linux/include/utmp.h index e52331928..3b228c3bc 100644 --- a/options/linux/include/utmp.h +++ b/options/linux/include/utmp.h @@ -82,4 +82,4 @@ int login_tty(int __fd); } #endif -#endif // _UTMP_H +#endif /* _UTMP_H */ diff --git a/options/linux/include/utmpx.h b/options/linux/include/utmpx.h index b8d407aaa..cfcc9cd8f 100644 --- a/options/linux/include/utmpx.h +++ b/options/linux/include/utmpx.h @@ -9,7 +9,7 @@ extern "C" { #include #include -// Struct definition taken from musl +/* Struct definition taken from musl */ struct utmpx { short ut_type; short __ut_pad1; @@ -65,4 +65,4 @@ void endutxent(void); } #endif -#endif // _UTMPX_H +#endif /* _UTMPX_H */ diff --git a/options/linux/include/values.h b/options/linux/include/values.h index 55a50cda4..75a4345b9 100644 --- a/options/linux/include/values.h +++ b/options/linux/include/values.h @@ -35,5 +35,5 @@ #define BITSPERBYTE CHAR_BIT -#endif // _VALUES_H +#endif /* _VALUES_H */ diff --git a/options/lsb/include/sys/auxv.h b/options/lsb/include/sys/auxv.h index f84f715fb..e7e587771 100644 --- a/options/lsb/include/sys/auxv.h +++ b/options/lsb/include/sys/auxv.h @@ -10,9 +10,9 @@ extern "C" { #ifndef __MLIBC_ABI_ONLY -// mlibc extension: Like getauxval but handles errors in a sane way. -// Success: Return 0. -// Failure: Return -1 and set errno. +/* mlibc extension: Like getauxval but handles errors in a sane way. */ +/* Success: Return 0. */ +/* Failure: Return -1 and set errno. */ int peekauxval(unsigned long __type, unsigned long *__value); unsigned long getauxval(unsigned long __type); @@ -20,7 +20,7 @@ unsigned long getauxval(unsigned long __type); #endif /* !__MLIBC_ABI_ONLY */ #ifdef __cplusplus -} // extern "C" +} /* extern "C" */ #endif #endif diff --git a/options/posix/include/arpa/inet.h b/options/posix/include/arpa/inet.h index dbf038bec..1ea035ca9 100644 --- a/options/posix/include/arpa/inet.h +++ b/options/posix/include/arpa/inet.h @@ -16,19 +16,19 @@ uint16_t htons(uint16_t __x); uint32_t ntohl(uint32_t __x); uint16_t ntohs(uint16_t __x); -// ---------------------------------------------------------------------------- -// IPv4 address manipulation. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* IPv4 address manipulation. */ +/* ---------------------------------------------------------------------------- */ in_addr_t inet_addr(const char *__cp); char *inet_ntoa(struct in_addr __in); -// GLIBC replacement for inet_addr(). +/* GLIBC replacement for inet_addr(). */ int inet_aton(const char *__cp, struct in_addr *__dest); -// ---------------------------------------------------------------------------- -// Generic IP address manipulation. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* Generic IP address manipulation. */ +/* ---------------------------------------------------------------------------- */ const char *inet_ntop(int __af, const void *__restrict __src, char *__restrict __dst, socklen_t __size) __attribute__((__nonnull__(3))); int inet_pton(int __af, const char *__restrict __src, void *__restrict __dst); @@ -42,5 +42,5 @@ in_addr_t inet_netof(struct in_addr __in); } #endif -#endif // _ARPA_INET_H +#endif /* _ARPA_INET_H */ diff --git a/options/posix/include/bits/posix/fd_set.h b/options/posix/include/bits/posix/fd_set.h index 554738ee9..6e5c13db0 100644 --- a/options/posix/include/bits/posix/fd_set.h +++ b/options/posix/include/bits/posix/fd_set.h @@ -6,9 +6,9 @@ typedef struct { union { __mlibc_uint8 __mlibc_elems[128]; - // Some programs require the fds_bits field to be present + /* Some programs require the fds_bits field to be present */ __mlibc_uint8 fds_bits[128]; }; } fd_set; -#endif // MLIBC_FD_SET_H +#endif /* MLIBC_FD_SET_H */ diff --git a/options/posix/include/bits/posix/id_t.h b/options/posix/include/bits/posix/id_t.h index f222bc1d4..6cba84895 100644 --- a/options/posix/include/bits/posix/id_t.h +++ b/options/posix/include/bits/posix/id_t.h @@ -3,4 +3,4 @@ typedef unsigned int id_t; -#endif // _MLIBC_ID_T_H +#endif /* _MLIBC_ID_T_H */ diff --git a/options/posix/include/bits/posix/in_addr_t.h b/options/posix/include/bits/posix/in_addr_t.h index bac9ff271..014e3842d 100644 --- a/options/posix/include/bits/posix/in_addr_t.h +++ b/options/posix/include/bits/posix/in_addr_t.h @@ -5,4 +5,4 @@ typedef uint32_t in_addr_t; -#endif // MLIBC_IN_ADDR_H +#endif /* MLIBC_IN_ADDR_H */ diff --git a/options/posix/include/bits/posix/in_port_t.h b/options/posix/include/bits/posix/in_port_t.h index 0368159c1..537828a08 100644 --- a/options/posix/include/bits/posix/in_port_t.h +++ b/options/posix/include/bits/posix/in_port_t.h @@ -5,4 +5,4 @@ typedef uint16_t in_port_t; -#endif // MLIBC_IN_PORT_H +#endif /* MLIBC_IN_PORT_H */ diff --git a/options/posix/include/bits/posix/iovec.h b/options/posix/include/bits/posix/iovec.h index c004f1c9f..62a35803e 100644 --- a/options/posix/include/bits/posix/iovec.h +++ b/options/posix/include/bits/posix/iovec.h @@ -8,4 +8,4 @@ struct iovec { __mlibc_size iov_len; }; -#endif // MLIBC_IOVEC_H +#endif /* MLIBC_IOVEC_H */ diff --git a/options/posix/include/bits/posix/locale_t.h b/options/posix/include/bits/posix/locale_t.h index c128d5814..171e298d2 100644 --- a/options/posix/include/bits/posix/locale_t.h +++ b/options/posix/include/bits/posix/locale_t.h @@ -11,4 +11,4 @@ typedef void *locale_t; } #endif -#endif // _LOCALE_T_H +#endif /* _LOCALE_T_H */ diff --git a/options/posix/include/bits/posix/posix_ctype.h b/options/posix/include/bits/posix/posix_ctype.h index 44447de1d..4e715fbf7 100644 --- a/options/posix/include/bits/posix/posix_ctype.h +++ b/options/posix/include/bits/posix/posix_ctype.h @@ -33,4 +33,4 @@ int toupper_l(int __c, locale_t __loc); } #endif -#endif // _POSIX_CTYPE_H +#endif /* _POSIX_CTYPE_H */ diff --git a/options/posix/include/bits/posix/posix_locale.h b/options/posix/include/bits/posix/posix_locale.h index d623fc0dc..2ba2c77bf 100644 --- a/options/posix/include/bits/posix/posix_locale.h +++ b/options/posix/include/bits/posix/posix_locale.h @@ -20,4 +20,4 @@ locale_t duplocale(locale_t __locobj); } #endif -#endif // MLIBC_POSIX_LOCALE_H +#endif /* MLIBC_POSIX_LOCALE_H */ diff --git a/options/posix/include/bits/posix/posix_signal.h b/options/posix/include/bits/posix/posix_signal.h index 54682c6b0..2d67a8436 100644 --- a/options/posix/include/bits/posix/posix_signal.h +++ b/options/posix/include/bits/posix/posix_signal.h @@ -27,7 +27,7 @@ extern "C" { #define TRAP_TRACE 2 /* process trace trap */ #if defined(__x86_64__) -// Start Glibc stuff +/* Start Glibc stuff */ struct _libc_fpxreg { unsigned short int significand[4]; @@ -54,7 +54,7 @@ struct _libc_fpstate { }; typedef struct _libc_fpstate *fpregset_t; -// End Glibc stuff +/* End Glibc stuff */ typedef unsigned long int greg_t; #endif @@ -73,14 +73,14 @@ typedef unsigned long int greg_t; #ifndef __MLIBC_ABI_ONLY -// functions to block / wait for signals +/* functions to block / wait for signals */ int sigsuspend(const sigset_t *__sigmask); int sigprocmask(int __how, const sigset_t *__restrict __sigmask, sigset_t *__restrict __oldmask); int pthread_sigmask(int __how, const sigset_t *__restrict __sigmask, sigset_t *__restrict __oldmask); int pthread_kill(pthread_t __thrd, int __sig); -// functions to handle signals +/* functions to handle signals */ int sigaction(int __signum, const struct sigaction *__restrict __act, struct sigaction *__restrict __oldact); int sigpending(sigset_t *__set); @@ -88,7 +88,7 @@ int siginterrupt(int __sig, int __flag); int sigaltstack(const stack_t *__restrict __ss, stack_t *__restrict __oss); -// functions to raise signals +/* functions to raise signals */ int kill(pid_t __pid, int __number); int killpg(int __pgrp, int __sig); @@ -96,10 +96,10 @@ int sigtimedwait(const sigset_t *__restrict __set, siginfo_t *__restrict __info, int sigwait(const sigset_t *__restrict __set, int *__restrict __sig); int sigwaitinfo(const sigset_t *__restrict __set, siginfo_t *__restrict __info); -// Glibc extension +/* Glibc extension */ #if __MLIBC_GLIBC_OPTION int sigisemptyset(const sigset_t *__set); -#endif // __MLIBC_GLIBC_OPTION +#endif /* __MLIBC_GLIBC_OPTION */ int sigqueue(pid_t __pid, int __sig, const union sigval __value); @@ -109,5 +109,5 @@ int sigqueue(pid_t __pid, int __sig, const union sigval __value); } #endif -#endif // MLIBC_POSIX_SIGNAL_H +#endif /* MLIBC_POSIX_SIGNAL_H */ diff --git a/options/posix/include/bits/posix/posix_stdio.h b/options/posix/include/bits/posix/posix_stdio.h index 108a1a70f..302b1a458 100644 --- a/options/posix/include/bits/posix/posix_stdio.h +++ b/options/posix/include/bits/posix/posix_stdio.h @@ -6,7 +6,7 @@ #include #include -// MISSING: var_list +/* MISSING: var_list */ #ifdef __cplusplus extern "C" { @@ -43,7 +43,7 @@ char *tempnam(const char *__dir, const char *__pfx); #define RENAME_EXCHANGE (1 << 1) -// GNU extensions +/* GNU extensions */ typedef ssize_t (cookie_read_function_t)(void *__cookie, char *__buffer, size_t __size); typedef ssize_t (cookie_write_function_t)(void *__cookie, const char *__buffer, size_t __size); typedef int (cookie_seek_function_t)(void *__cookie, off_t *, int); @@ -62,7 +62,7 @@ typedef struct _IO_cookie_io_functions_t { FILE *fopencookie(void *__restrict __cookie, const char *__restrict __mode, cookie_io_functions_t __io_funcs); -#endif // defined(_GNU_SOURCE) +#endif /* defined(_GNU_SOURCE) */ #endif /* !__MLIBC_ABI_ONLY */ @@ -70,7 +70,7 @@ FILE *fopencookie(void *__restrict __cookie, const char *__restrict __mode, cook } #endif -// MISSING: various functions and macros +/* MISSING: various functions and macros */ #endif /* MLIBC_POSIX_STDIO_H */ diff --git a/options/posix/include/bits/posix/posix_stdlib.h b/options/posix/include/bits/posix/posix_stdlib.h index f2e3e1041..f124c043b 100644 --- a/options/posix/include/bits/posix/posix_stdlib.h +++ b/options/posix/include/bits/posix/posix_stdlib.h @@ -21,17 +21,17 @@ char *initstate(unsigned int __seed, char *__state, size_t __size); char *setstate(char *__state); void srandom(unsigned int __seed); -// ---------------------------------------------------------------------------- -// Environment. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* Environment. */ +/* ---------------------------------------------------------------------------- */ int putenv(char *__string); int setenv(const char *__name, const char *__value, int __overwrite); int unsetenv(const char *__name); -// ---------------------------------------------------------------------------- -// Path handling. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* Path handling. */ +/* ---------------------------------------------------------------------------- */ int mkstemp(char *__pattern); int mkstemps(char *__pattern, int __suffixlen); @@ -41,9 +41,9 @@ char *mkdtemp(char *__path); char *realpath(const char *__restrict __path, char *__restrict __out); -// ---------------------------------------------------------------------------- -// Pseudoterminals -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* Pseudoterminals */ +/* ---------------------------------------------------------------------------- */ int posix_openpt(int __flags); int grantpt(int __fd); @@ -59,11 +59,11 @@ int getloadavg(double *__loadavg, int __count); int getsubopt(char **__restrict__ __optionp, char *const *__restrict__ __tokens, char **__restrict__ __valuep); -// GNU extension +/* GNU extension */ char *secure_getenv(const char *__name); char *canonicalize_file_name(const char *__name); -// BSD extension +/* BSD extension */ void *reallocarray(void *__ptr, size_t __count, size_t __size); int clearenv(void); @@ -74,5 +74,5 @@ int clearenv(void); } #endif -#endif // MLIBC_POSIX_STDLIB_H +#endif /* MLIBC_POSIX_STDLIB_H */ diff --git a/options/posix/include/bits/posix/posix_string.h b/options/posix/include/bits/posix/posix_string.h index 88a072bce..1e2096ae1 100644 --- a/options/posix/include/bits/posix/posix_string.h +++ b/options/posix/include/bits/posix/posix_string.h @@ -26,7 +26,7 @@ int strcoll_l(const char *__s1, const char *__s2, locale_t __locale); char *strerror_l(int __errnum, locale_t __locale); -// GNU extensions. +/* GNU extensions. */ #if defined(_GNU_SOURCE) char *strcasestr(const char *__s1, const char *__s2); #define strdupa(x) ({ \ @@ -45,7 +45,7 @@ char *strcasestr(const char *__s1, const char *__s2); void *memrchr(const void *__m, int __c, size_t __n); #endif /* defined(_GNU_SOURCE) */ -// BSD extensions +/* BSD extensions */ size_t strlcpy(char *__d, const char *__s, size_t __n); size_t strlcat(char *__d, const char *__s, size_t __n); @@ -55,5 +55,5 @@ size_t strlcat(char *__d, const char *__s, size_t __n); } #endif -#endif // MLIBC_POSIX_STRING_H +#endif /* MLIBC_POSIX_STRING_H */ diff --git a/options/posix/include/bits/posix/posix_time.h b/options/posix/include/bits/posix/posix_time.h index 43a9259aa..05408eeff 100644 --- a/options/posix/include/bits/posix/posix_time.h +++ b/options/posix/include/bits/posix/posix_time.h @@ -16,7 +16,7 @@ int timer_getoverrun(timer_t __timerid); int utimes(const char *__filename, const struct timeval __tv[2]); -// Not standardized, Linux and BSDs have it +/* Not standardized, Linux and BSDs have it */ int futimes(int __fd, const struct timeval __tv[2]); int lutimes(const char *__filename, const struct timeval __tv[2]); @@ -26,4 +26,4 @@ int lutimes(const char *__filename, const struct timeval __tv[2]); } #endif -#endif // MLIBC_POSIX_TIME_H +#endif /* MLIBC_POSIX_TIME_H */ diff --git a/options/posix/include/bits/posix/posix_wctype.h b/options/posix/include/bits/posix/posix_wctype.h index bc7703630..ffc8d41b2 100644 --- a/options/posix/include/bits/posix/posix_wctype.h +++ b/options/posix/include/bits/posix/posix_wctype.h @@ -41,4 +41,4 @@ wint_t towctrans_l(wint_t __wc, wctrans_t __trans, locale_t __loc); } #endif -#endif // _POSIX_WCTYPE_H +#endif /* _POSIX_WCTYPE_H */ diff --git a/options/posix/include/bits/posix/pthread_t.h b/options/posix/include/bits/posix/pthread_t.h index 1310c40c0..f5e6b7066 100644 --- a/options/posix/include/bits/posix/pthread_t.h +++ b/options/posix/include/bits/posix/pthread_t.h @@ -5,4 +5,4 @@ typedef struct __mlibc_thread_data *pthread_t; -#endif // _MLIBC_BITS_PTHREAD_T_HPP +#endif /* _MLIBC_BITS_PTHREAD_T_HPP */ diff --git a/options/posix/include/bits/posix/stat.h b/options/posix/include/bits/posix/stat.h index 4dd081daa..f08b760cf 100644 --- a/options/posix/include/bits/posix/stat.h +++ b/options/posix/include/bits/posix/stat.h @@ -3,7 +3,7 @@ #include -// Used by utimensat and friends +/* Used by utimensat and friends */ #define UTIME_NOW ((1l << 30) - 1l) #define UTIME_OMIT ((1l << 30) - 2l) @@ -15,10 +15,10 @@ #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) -// POSIX compatibility macros +/* POSIX compatibility macros */ #define st_atime st_atim.tv_sec #define st_mtime st_mtim.tv_sec #define st_ctime st_ctim.tv_sec -#endif // MLIBC_STAT_H +#endif /* MLIBC_STAT_H */ diff --git a/options/posix/include/bits/posix/timer_t.h b/options/posix/include/bits/posix/timer_t.h index b23050199..b965f373d 100644 --- a/options/posix/include/bits/posix/timer_t.h +++ b/options/posix/include/bits/posix/timer_t.h @@ -3,4 +3,4 @@ typedef void * timer_t; -#endif // _MLIBC_TIMER_T_H +#endif /* _MLIBC_TIMER_T_H */ diff --git a/options/posix/include/bits/posix/timeval.h b/options/posix/include/bits/posix/timeval.h index 445ee7f61..22670a2eb 100644 --- a/options/posix/include/bits/posix/timeval.h +++ b/options/posix/include/bits/posix/timeval.h @@ -9,4 +9,4 @@ struct timeval { suseconds_t tv_usec; }; -#endif // MLIBC_TIMEVAL_H +#endif /* MLIBC_TIMEVAL_H */ diff --git a/options/posix/include/byteswap.h b/options/posix/include/byteswap.h index 74b9fe2a9..29b28382d 100644 --- a/options/posix/include/byteswap.h +++ b/options/posix/include/byteswap.h @@ -10,7 +10,7 @@ extern "C" { #define bswap_32(x) __builtin_bswap32(x) #define bswap_64(x) __builtin_bswap64(x) -// Some programs like eudev call these functions instead +/* Some programs like eudev call these functions instead */ #define __bswap_16(x) __builtin_bswap16(x) #define __bswap_32(x) __builtin_bswap32(x) #define __bswap_64(x) __builtin_bswap64(x) @@ -19,5 +19,5 @@ extern "C" { } #endif -#endif // _BYTESWAP_H +#endif /* _BYTESWAP_H */ diff --git a/options/posix/include/dirent.h b/options/posix/include/dirent.h index f9470dde2..95d609a98 100644 --- a/options/posix/include/dirent.h +++ b/options/posix/include/dirent.h @@ -73,5 +73,5 @@ int versionsort(const struct dirent **__a, const struct dirent **__b); } #endif -#endif // _DIRENT_H +#endif /* _DIRENT_H */ diff --git a/options/posix/include/dlfcn.h b/options/posix/include/dlfcn.h index ee2fdd466..4e6327993 100644 --- a/options/posix/include/dlfcn.h +++ b/options/posix/include/dlfcn.h @@ -36,7 +36,7 @@ void *dlvsym(void *__restrict __handle, const char *__restrict __name, const cha #if defined(_GNU_SOURCE) && __MLIBC_GLIBC_OPTION -//gnu extension +/*gnu extension */ typedef struct { const char *dli_fname; void *dli_fbase; @@ -92,5 +92,5 @@ int _dl_find_object(void *__address, struct dl_find_object *__result); } #endif -#endif // _DLFCN_H +#endif /* _DLFCN_H */ diff --git a/options/posix/include/fcntl.h b/options/posix/include/fcntl.h index c55098b42..bb0f47d8a 100644 --- a/options/posix/include/fcntl.h +++ b/options/posix/include/fcntl.h @@ -48,7 +48,7 @@ int posix_fallocate(int __fd, off_t __offset, off_t __size); #endif /* !__MLIBC_ABI_ONLY */ -// This is a linux extension +/* This is a linux extension */ struct file_handle { unsigned int handle_bytes; @@ -81,5 +81,5 @@ ssize_t vmsplice(int __fd, const struct iovec *__iov, size_t __nr_segs, unsigned } #endif -#endif // _FCNTL_H +#endif /* _FCNTL_H */ diff --git a/options/posix/include/fnmatch.h b/options/posix/include/fnmatch.h index 747fe9efe..5c5dda0dd 100644 --- a/options/posix/include/fnmatch.h +++ b/options/posix/include/fnmatch.h @@ -6,17 +6,17 @@ extern "C" { #endif -// POSIX-defined fnmatch() flags. +/* POSIX-defined fnmatch() flags. */ #define FNM_PATHNAME 0x1 #define FNM_NOESCAPE 0x2 #define FNM_PERIOD 0x4 -// GNU extensions for fnmatch() flags. +/* GNU extensions for fnmatch() flags. */ #define FNM_LEADING_DIR 0x8 #define FNM_CASEFOLD 0x10 #define FNM_EXTMATCH 0x20 -// fnmatch() return values. +/* fnmatch() return values. */ #define FNM_NOMATCH 1 #ifndef __MLIBC_ABI_ONLY @@ -29,5 +29,5 @@ int fnmatch(const char *__pattern, const char *__string, int __flags); } #endif -#endif // _FNMATCH_H +#endif /* _FNMATCH_H */ diff --git a/options/posix/include/ftw.h b/options/posix/include/ftw.h index 4a7f38c0e..169fa2a07 100644 --- a/options/posix/include/ftw.h +++ b/options/posix/include/ftw.h @@ -41,5 +41,5 @@ int nftw(const char *__dirpath, int (*__fn)(const char *__fpath, const struct st } #endif -#endif // _FTW_H +#endif /* _FTW_H */ diff --git a/options/posix/include/glob.h b/options/posix/include/glob.h index ce0ba4401..57e321906 100644 --- a/options/posix/include/glob.h +++ b/options/posix/include/glob.h @@ -54,6 +54,6 @@ void globfree(struct glob_t *__pglog); } #endif -#endif // _GLOB_H +#endif /* _GLOB_H */ diff --git a/options/posix/include/grp.h b/options/posix/include/grp.h index 116909fd8..6b16d7117 100644 --- a/options/posix/include/grp.h +++ b/options/posix/include/grp.h @@ -31,7 +31,7 @@ struct group *fgetgrent(FILE *__stream); int setgroups(size_t __size, const gid_t *__list); int initgroups(const char *__user, gid_t __group); -// Non standard extension +/* Non standard extension */ int getgrouplist(const char *__user, gid_t __group, gid_t *__groups, int *__ngroups); #endif /* !__MLIBC_ABI_ONLY */ @@ -40,4 +40,4 @@ int getgrouplist(const char *__user, gid_t __group, gid_t *__groups, int *__ngro } #endif -#endif // _GRP_H +#endif /* _GRP_H */ diff --git a/options/posix/include/langinfo.h b/options/posix/include/langinfo.h index 7d10f6a34..2a5bf0feb 100644 --- a/options/posix/include/langinfo.h +++ b/options/posix/include/langinfo.h @@ -20,5 +20,5 @@ char *nl_langinfo_l(nl_item __item, locale_t __loc); } #endif -#endif // _LANGINFO_H +#endif /* _LANGINFO_H */ diff --git a/options/posix/include/libgen.h b/options/posix/include/libgen.h index 875df1be0..69ece1d09 100644 --- a/options/posix/include/libgen.h +++ b/options/posix/include/libgen.h @@ -23,6 +23,6 @@ char *dirname(char *__path); } #endif -#endif // _LIBGEN_H +#endif /* _LIBGEN_H */ diff --git a/options/posix/include/net/if.h b/options/posix/include/net/if.h index 1d0ddab2a..db74c35b0 100644 --- a/options/posix/include/net/if.h +++ b/options/posix/include/net/if.h @@ -113,6 +113,6 @@ unsigned int if_nametoindex(const char *__name); } #endif -#endif // _NET_IF_H +#endif /* _NET_IF_H */ diff --git a/options/posix/include/net/if_arp.h b/options/posix/include/net/if_arp.h index 7a56c234d..870113702 100644 --- a/options/posix/include/net/if_arp.h +++ b/options/posix/include/net/if_arp.h @@ -101,5 +101,5 @@ struct arpreq { char arp_dev[16]; }; -#endif // _NET_IF_ARP_H +#endif /* _NET_IF_ARP_H */ diff --git a/options/posix/include/netdb.h b/options/posix/include/netdb.h index 2ded366df..9f187fa73 100644 --- a/options/posix/include/netdb.h +++ b/options/posix/include/netdb.h @@ -70,7 +70,7 @@ struct hostent { char **h_addr_list; }; -#define h_addr h_addr_list[0] // Required by some programs +#define h_addr h_addr_list[0] /* Required by some programs */ struct netent { char *n_name; @@ -137,7 +137,7 @@ void setnetent(int __stayopen); void setprotoent(int __stayopen); void setservent(int __stayopen); -// Deprecated GNU extension +/* Deprecated GNU extension */ const char *hstrerror(int __err); #endif /* !__MLIBC_ABI_ONLY */ @@ -146,4 +146,4 @@ const char *hstrerror(int __err); } #endif -#endif // _NETDB_H +#endif /* _NETDB_H */ diff --git a/options/posix/include/netinet/icmp6.h b/options/posix/include/netinet/icmp6.h index c2ec78fc4..91ae368b0 100644 --- a/options/posix/include/netinet/icmp6.h +++ b/options/posix/include/netinet/icmp6.h @@ -11,7 +11,7 @@ extern "C" { #if __MLIBC_GLIBC_OPTION #include -#endif // __MLIBC_GLIBC_OPTION +#endif /* __MLIBC_GLIBC_OPTION */ #define ICMP6_FILTER 1 @@ -160,5 +160,5 @@ struct nd_redirect { } #endif -#endif // _NETINET_ICMP6_H +#endif /* _NETINET_ICMP6_H */ diff --git a/options/posix/include/netinet/if_ether.h b/options/posix/include/netinet/if_ether.h index 025e2c5ac..e79abc3d6 100644 --- a/options/posix/include/netinet/if_ether.h +++ b/options/posix/include/netinet/if_ether.h @@ -107,4 +107,4 @@ struct ether_arp { #define arp_pln ea_hdr.ar_pln #define arp_op ea_hdr.ar_op -#endif //_NETINET_IF_ETHER_H +#endif /*_NETINET_IF_ETHER_H */ diff --git a/options/posix/include/netinet/in.h b/options/posix/include/netinet/in.h index 2ca2bdf38..5dee2bd51 100644 --- a/options/posix/include/netinet/in.h +++ b/options/posix/include/netinet/in.h @@ -3,7 +3,7 @@ #define _NETINET_IN_H #include -#include // struct sockaddr +#include /* struct sockaddr */ #include #include #include @@ -11,7 +11,7 @@ #if __MLIBC_GLIBC_OPTION #include -#endif //__MLIBC_GLIBC_OPTION +#endif /*__MLIBC_GLIBC_OPTION */ #ifdef __cplusplus extern "C" { @@ -118,5 +118,5 @@ uint16_t ntohs(uint16_t __x); } #endif -#endif // _NETINET_IN_H +#endif /* _NETINET_IN_H */ diff --git a/options/posix/include/netinet/ip.h b/options/posix/include/netinet/ip.h index 2cade310f..fcb11f6c6 100644 --- a/options/posix/include/netinet/ip.h +++ b/options/posix/include/netinet/ip.h @@ -72,5 +72,5 @@ struct iphdr { } #endif -#endif // _NETINET_IP_H +#endif /* _NETINET_IP_H */ diff --git a/options/posix/include/netinet/ip6.h b/options/posix/include/netinet/ip6.h index 88f0cb662..e097acae3 100644 --- a/options/posix/include/netinet/ip6.h +++ b/options/posix/include/netinet/ip6.h @@ -25,4 +25,4 @@ struct ip6_hdr { } #endif -#endif // _NETINET_IP6_H +#endif /* _NETINET_IP6_H */ diff --git a/options/posix/include/netinet/ip_icmp.h b/options/posix/include/netinet/ip_icmp.h index 56615e4cf..efffda1e9 100644 --- a/options/posix/include/netinet/ip_icmp.h +++ b/options/posix/include/netinet/ip_icmp.h @@ -81,4 +81,4 @@ struct icmp { } #endif -#endif // _NETINET_ICMP_H +#endif /* _NETINET_ICMP_H */ diff --git a/options/posix/include/netinet/tcp.h b/options/posix/include/netinet/tcp.h index a91cf3f6e..0034aa22b 100644 --- a/options/posix/include/netinet/tcp.h +++ b/options/posix/include/netinet/tcp.h @@ -7,7 +7,7 @@ extern "C" { #endif -// Define some macros using same ABI as Linux +/* Define some macros using same ABI as Linux */ #define TCP_NODELAY 1 #define TCP_MAXSEG 2 #define TCP_KEEPIDLE 4 @@ -91,4 +91,4 @@ struct tcp_info { } #endif -#endif // _NETINET_TCP_H +#endif /* _NETINET_TCP_H */ diff --git a/options/posix/include/netinet/udp.h b/options/posix/include/netinet/udp.h index 5cc887de2..1d107407d 100644 --- a/options/posix/include/netinet/udp.h +++ b/options/posix/include/netinet/udp.h @@ -28,4 +28,4 @@ struct udphdr { } #endif -#endif // _NETINET_UDP_H +#endif /* _NETINET_UDP_H */ diff --git a/options/posix/include/nl_types.h b/options/posix/include/nl_types.h index f0099ba48..887862955 100644 --- a/options/posix/include/nl_types.h +++ b/options/posix/include/nl_types.h @@ -3,4 +3,4 @@ -#endif // NL_TYPES_H \ No newline at end of file +#endif /* NL_TYPES_H */ diff --git a/options/posix/include/poll.h b/options/posix/include/poll.h index 7550015c9..2611296b8 100644 --- a/options/posix/include/poll.h +++ b/options/posix/include/poll.h @@ -3,4 +3,4 @@ #include -#endif // _POLL_H +#endif /* _POLL_H */ diff --git a/options/posix/include/pthread.h b/options/posix/include/pthread.h index b2cc6703e..080eb6abc 100644 --- a/options/posix/include/pthread.h +++ b/options/posix/include/pthread.h @@ -4,7 +4,7 @@ #include #include -// TODO: pthread is not required to define size_t. +/* TODO: pthread is not required to define size_t. */ #include #include #include @@ -13,7 +13,7 @@ #include #include -// pthread.h is required to include sched.h and time.h +/* pthread.h is required to include sched.h and time.h */ #include #include @@ -24,37 +24,37 @@ extern "C" { #define PTHREAD_CREATE_JOINABLE __MLIBC_THREAD_CREATE_JOINABLE #define PTHREAD_CREATE_DETACHED __MLIBC_THREAD_CREATE_DETACHED -// Values for pthread_attr_{get,set}scope +/* Values for pthread_attr_{get,set}scope */ #define PTHREAD_SCOPE_SYSTEM 0 #define PTHREAD_SCOPE_PROCESS 1 -// Values for pthread_attr_{get,set}inheritsched +/* Values for pthread_attr_{get,set}inheritsched */ #define PTHREAD_INHERIT_SCHED 0 #define PTHREAD_EXPLICIT_SCHED 1 -// values for pthread_{get,set}canceltype(). +/* values for pthread_{get,set}canceltype(). */ #define PTHREAD_CANCEL_DEFERRED 0 #define PTHREAD_CANCEL_ASYNCHRONOUS 1 -// values for pthread_{get,set}cancelstate(). +/* values for pthread_{get,set}cancelstate(). */ #define PTHREAD_CANCEL_ENABLE 0 #define PTHREAD_CANCEL_DISABLE 1 -// values for pthread_mutexattr_{get,set}type(). +/* values for pthread_mutexattr_{get,set}type(). */ #define PTHREAD_MUTEX_DEFAULT __MLIBC_THREAD_MUTEX_DEFAULT #define PTHREAD_MUTEX_NORMAL __MLIBC_THREAD_MUTEX_NORMAL #define PTHREAD_MUTEX_ERRORCHECK __MLIBC_THREAD_MUTEX_ERRORCHECK #define PTHREAD_MUTEX_RECURSIVE __MLIBC_THREAD_MUTEX_RECURSIVE -// values for pthread_mutexattr_{get,set}robust(). +/* values for pthread_mutexattr_{get,set}robust(). */ #define PTHREAD_MUTEX_STALLED __MLIBC_THREAD_MUTEX_STALLED #define PTHREAD_MUTEX_ROBUST __MLIBC_THREAD_MUTEX_ROBUST -// values for pthread_mutexattr_{get,set}pshared(). +/* values for pthread_mutexattr_{get,set}pshared(). */ #define PTHREAD_PROCESS_PRIVATE __MLIBC_THREAD_PROCESS_PRIVATE #define PTHREAD_PROCESS_SHARED __MLIBC_THREAD_PROCESS_SHARED -// Values for pthread_mutexattr_{get,set}protocol() +/* Values for pthread_mutexattr_{get,set}protocol() */ #define PTHREAD_PRIO_NONE __MLIBC_THREAD_PRIO_NONE #define PTHREAD_PRIO_INHERIT __MLIBC_THREAD_PRIO_INHERIT #define PTHREAD_PRIO_PROTECT __MLIBC_THREAD_PRIO_PROTECT @@ -68,7 +68,7 @@ extern "C" { #define PTHREAD_BARRIER_SERIAL_THREAD -1 -// values for pthread_key +/* values for pthread_key */ #define PTHREAD_DESTRUCTOR_ITERATIONS 8 #define PTHREAD_INHERIT_SCHED 0 @@ -78,7 +78,7 @@ extern "C" { #define PTHREAD_ATTR_NO_SIGMASK_NP (-1) -// TODO: move to own file and include in sys/types.h +/* TODO: move to own file and include in sys/types.h */ typedef struct __mlibc_threadattr pthread_attr_t; typedef uintptr_t pthread_key_t; @@ -111,8 +111,8 @@ struct __mlibc_barrier { typedef struct __mlibc_barrier pthread_barrier_t; struct __mlibc_fair_rwlock { - unsigned int __mlibc_m; // Mutex. - unsigned int __mlibc_rc; // Reader count (not reference count). + unsigned int __mlibc_m; /* Mutex. */ + unsigned int __mlibc_rc; /* Reader count (not reference count). */ unsigned int __mlibc_flags; }; typedef struct __mlibc_fair_rwlock pthread_rwlock_t; @@ -124,11 +124,11 @@ typedef struct __mlibc_rwlockattr pthread_rwlockattr_t; #ifndef __MLIBC_ABI_ONLY -// ---------------------------------------------------------------------------- -// pthread_attr and pthread functions. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* pthread_attr and pthread functions. */ +/* ---------------------------------------------------------------------------- */ -// pthread_attr functions. +/* pthread_attr functions. */ int pthread_attr_init(pthread_attr_t *__attr); int pthread_attr_destroy(pthread_attr_t *__attr); @@ -172,7 +172,7 @@ int pthread_getaffinity_np(pthread_t __thrd, size_t __cpusetsize, cpu_set_t *__c int pthread_setaffinity_np(pthread_t __thrd, size_t __cpusetsize, const cpu_set_t *__cpuset); #endif /* __MLIBC_LINUX_OPTION */ -// pthread functions. +/* pthread functions. */ int pthread_create(pthread_t *__restrict __thrd, const pthread_attr_t *__restrict __attr, void *(*__fn) (void *__arg), void *__restrict __arg); pthread_t pthread_self(void); @@ -203,9 +203,9 @@ int pthread_cancel(pthread_t __thrd); int pthread_atfork(void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)); -// ---------------------------------------------------------------------------- -// pthread_key functions. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* pthread_key functions. */ +/* ---------------------------------------------------------------------------- */ int pthread_key_create(pthread_key_t *__key, void (*__destructor) (void *__data)); int pthread_key_delete(pthread_key_t __key); @@ -213,17 +213,17 @@ int pthread_key_delete(pthread_key_t __key); void *pthread_getspecific(pthread_key_t __key); int pthread_setspecific(pthread_key_t __key, const void *__data); -// ---------------------------------------------------------------------------- -// pthread_once functions. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* pthread_once functions. */ +/* ---------------------------------------------------------------------------- */ int pthread_once(pthread_once_t *__once, void (*__fn) (void)); -// ---------------------------------------------------------------------------- -// pthread_mutexattr and pthread_mutex functions. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* pthread_mutexattr and pthread_mutex functions. */ +/* ---------------------------------------------------------------------------- */ -// pthread_mutexattr functions +/* pthread_mutexattr functions */ int pthread_mutexattr_init(pthread_mutexattr_t *__attr); int pthread_mutexattr_destroy(pthread_mutexattr_t *__attr); @@ -242,7 +242,7 @@ int pthread_mutexattr_setprotocol(pthread_mutexattr_t *__attr, int __protocol); int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *__attr, int *__prioceiling); int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *__attr, int __prioceiling); -// pthread_mutex functions +/* pthread_mutex functions */ int pthread_mutex_init(pthread_mutex_t *__restrict __mtx, const pthread_mutexattr_t *__restrict __attr); int pthread_mutex_destroy(pthread_mutex_t *__mtx); @@ -254,9 +254,9 @@ int pthread_mutex_unlock(pthread_mutex_t *__mtx); int pthread_mutex_consistent(pthread_mutex_t *__mtx); -// ---------------------------------------------------------------------------- -// pthread_condattr and pthread_cond functions. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* pthread_condattr and pthread_cond functions. */ +/* ---------------------------------------------------------------------------- */ int pthread_condattr_init(pthread_condattr_t *__attr); int pthread_condattr_destroy(pthread_condattr_t *__attr); @@ -276,9 +276,9 @@ int pthread_cond_timedwait(pthread_cond_t *__restrict __cond, pthread_mutex_t *_ int pthread_cond_signal(pthread_cond_t *__cond); int pthread_cond_broadcast(pthread_cond_t *__cond); -// ---------------------------------------------------------------------------- -// pthread_barrierattr and pthread_barrier functions. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* pthread_barrierattr and pthread_barrier functions. */ +/* ---------------------------------------------------------------------------- */ int pthread_barrierattr_init(pthread_barrierattr_t *__attr); int pthread_barrierattr_destroy(pthread_barrierattr_t *__attr); @@ -292,9 +292,9 @@ int pthread_barrier_destroy(pthread_barrier_t *__barrier); int pthread_barrier_wait(pthread_barrier_t *__barrier); -// ---------------------------------------------------------------------------- -// pthread_wrlockattr and pthread_rwlock functions. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- */ +/* pthread_wrlockattr and pthread_rwlock functions. */ +/* ---------------------------------------------------------------------------- */ int pthread_rwlockattr_init(pthread_rwlockattr_t *__attr); int pthread_rwlockattr_destroy(pthread_rwlockattr_t *__attr); @@ -318,5 +318,5 @@ int pthread_getcpuclockid(pthread_t __thrd, clockid_t *__clockid); } #endif -#endif // _PTHREAD_H +#endif /* _PTHREAD_H */ diff --git a/options/posix/include/pwd.h b/options/posix/include/pwd.h index 5829269f4..fd4f9c4bf 100644 --- a/options/posix/include/pwd.h +++ b/options/posix/include/pwd.h @@ -41,5 +41,5 @@ struct passwd *fgetpwent(FILE *__f); } #endif -#endif // _PWD_H +#endif /* _PWD_H */ diff --git a/options/posix/include/regex.h b/options/posix/include/regex.h index 1eeab08de..8a2c827ce 100644 --- a/options/posix/include/regex.h +++ b/options/posix/include/regex.h @@ -21,17 +21,17 @@ typedef struct { regoff_t rm_eo; } regmatch_t; -// Flags for regcomp(). +/* Flags for regcomp(). */ #define REG_EXTENDED 1 #define REG_ICASE 2 #define REG_NEWLINE 4 #define REG_NOSUB 8 -// Flags for regexec(). +/* Flags for regexec(). */ #define REG_NOTBOL 1 #define REG_NOTEOL 2 -// Errors for regcomp() and regexec(). +/* Errors for regcomp() and regexec(). */ #define REG_OK 0 #define REG_NOMATCH 1 #define REG_BADPAT 2 @@ -47,7 +47,7 @@ typedef struct { #define REG_ESPACE 12 #define REG_BADRPT 13 -// Obsolete in POSIX. +/* Obsolete in POSIX. */ #define REG_ENOSYS -1 #ifndef __MLIBC_ABI_ONLY diff --git a/options/posix/include/sched.h b/options/posix/include/sched.h index f11465064..5d745dda2 100644 --- a/options/posix/include/sched.h +++ b/options/posix/include/sched.h @@ -7,9 +7,9 @@ #include #include -// MISSING: time_t, struct timespec +/* MISSING: time_t, struct timespec */ -// MISSING: POSIX [PS], [SS] and [TSP] options +/* MISSING: POSIX [PS], [SS] and [TSP] options */ #ifdef __cplusplus extern "C" { @@ -45,5 +45,5 @@ int sched_getparam(pid_t __pid, struct sched_param *__param); } #endif -#endif // _SCHED_H +#endif /* _SCHED_H */ diff --git a/options/posix/include/search.h b/options/posix/include/search.h index 01a9aabee..39174b525 100644 --- a/options/posix/include/search.h +++ b/options/posix/include/search.h @@ -44,4 +44,4 @@ ENTRY *hsearch(ENTRY __item, ACTION __action); } #endif -#endif // _SEARCH_H +#endif /* _SEARCH_H */ diff --git a/options/posix/include/semaphore.h b/options/posix/include/semaphore.h index a1cfea830..89601505a 100644 --- a/options/posix/include/semaphore.h +++ b/options/posix/include/semaphore.h @@ -34,4 +34,4 @@ int sem_getvalue(sem_t *__sem, int *__sval); } #endif -#endif //_SEMAPHORE_H +#endif /*_SEMAPHORE_H */ diff --git a/options/posix/include/spawn.h b/options/posix/include/spawn.h index 280fb877e..ec5d938fa 100644 --- a/options/posix/include/spawn.h +++ b/options/posix/include/spawn.h @@ -26,7 +26,7 @@ typedef struct { int __pad[16]; } posix_spawn_file_actions_t; -// MISSIG: sigset_t +/* MISSIG: sigset_t */ struct sched_param; @@ -70,7 +70,7 @@ int posix_spawnp(pid_t *__restrict __pid, const char *__restrict __file, const posix_spawnattr_t *__restrict __attrp, char *const __argv[], char *const __envp[]); -// MISSING: all other functions +/* MISSING: all other functions */ #endif /* !__MLIBC_ABI_ONLY */ @@ -78,5 +78,5 @@ int posix_spawnp(pid_t *__restrict __pid, const char *__restrict __file, } #endif -#endif // SPAWN_H +#endif /* SPAWN_H */ diff --git a/options/posix/include/strings.h b/options/posix/include/strings.h index 16f404d02..071f3fa9f 100644 --- a/options/posix/include/strings.h +++ b/options/posix/include/strings.h @@ -28,5 +28,5 @@ void bzero(void *__s, size_t __n); } #endif -#endif // _STRINGS_H +#endif /* _STRINGS_H */ diff --git a/options/posix/include/sys/file.h b/options/posix/include/sys/file.h index 5f8ec8ad1..11dff16a6 100644 --- a/options/posix/include/sys/file.h +++ b/options/posix/include/sys/file.h @@ -22,5 +22,5 @@ int flock64(int __fd, int __op); } #endif -#endif // _SYS_FILE_H +#endif /* _SYS_FILE_H */ diff --git a/options/posix/include/sys/mman.h b/options/posix/include/sys/mman.h index 4d54349d7..5c48465bb 100644 --- a/options/posix/include/sys/mman.h +++ b/options/posix/include/sys/mman.h @@ -29,7 +29,7 @@ int msync(void *__addr, size_t __size, int __flags); int shm_open(const char *__name, int __oflag, mode_t __mode); int shm_unlink(const char *__name); -// Linux extension: +/* Linux extension: */ void *mremap(void *__old_address, size_t __old_size, size_t __new_size, int __flags, ...); int remap_file_pages(void *__addr, size_t __size, int __prot, size_t __pgoff, int __flags); @@ -45,4 +45,4 @@ int mincore(void *__addr, size_t __size, unsigned char *__vec); } #endif -#endif // _SYS_MMAN_H +#endif /* _SYS_MMAN_H */ diff --git a/options/posix/include/sys/msg.h b/options/posix/include/sys/msg.h index ea39df8af..f62220ac6 100644 --- a/options/posix/include/sys/msg.h +++ b/options/posix/include/sys/msg.h @@ -24,4 +24,4 @@ int msgsnd(int __msqid, const void *__msgp, size_t __size, int __msgflg); } #endif -#endif // _SYS_MSG_H +#endif /* _SYS_MSG_H */ diff --git a/options/posix/include/sys/param.h b/options/posix/include/sys/param.h index a0522e747..b2c7d7134 100644 --- a/options/posix/include/sys/param.h +++ b/options/posix/include/sys/param.h @@ -8,7 +8,7 @@ #define NBBY CHAR_BIT #define NGROUPS NGROUPS_MAX -// Report the same value as Linux here. +/* Report the same value as Linux here. */ #define MAXNAMLEN 255 #define MAXPATHLEN 4096 #define MAXSYMLINKS 20 @@ -31,5 +31,5 @@ extern "C" { } #endif -#endif // _SYS_PARAM_H +#endif /* _SYS_PARAM_H */ diff --git a/options/posix/include/sys/poll.h b/options/posix/include/sys/poll.h index 5965e3a21..bebe62724 100644 --- a/options/posix/include/sys/poll.h +++ b/options/posix/include/sys/poll.h @@ -27,7 +27,7 @@ int poll(struct pollfd *__fds, nfds_t __nfds, int __timeout); #if __MLIBC_LINUX_OPTION int ppoll(struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout_ts, const sigset_t *__sigmask); -#endif // __MLIBC_LINUX_OPTION +#endif /* __MLIBC_LINUX_OPTION */ #endif /* !__MLIBC_ABI_ONLY */ @@ -35,4 +35,4 @@ int ppoll(struct pollfd *__fds, nfds_t __nfds, } #endif -#endif // _SYS_POLL_H +#endif /* _SYS_POLL_H */ diff --git a/options/posix/include/sys/resource.h b/options/posix/include/sys/resource.h index 1018e23be..145c65286 100644 --- a/options/posix/include/sys/resource.h +++ b/options/posix/include/sys/resource.h @@ -51,4 +51,4 @@ int prlimit(pid_t __pid, int __resource, const struct rlimit *__new_limits, stru } #endif -#endif // _SYS_RESOURCE_H +#endif /* _SYS_RESOURCE_H */ diff --git a/options/posix/include/sys/select.h b/options/posix/include/sys/select.h index a156d14cc..10d1a3422 100644 --- a/options/posix/include/sys/select.h +++ b/options/posix/include/sys/select.h @@ -45,5 +45,5 @@ int pselect(int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __write } #endif -#endif // _SYS_SELECT_H +#endif /* _SYS_SELECT_H */ diff --git a/options/posix/include/sys/sem.h b/options/posix/include/sys/sem.h index 87241a92a..d98f91f3f 100644 --- a/options/posix/include/sys/sem.h +++ b/options/posix/include/sys/sem.h @@ -43,4 +43,4 @@ int semctl(int __semid, int __semnum, int __op, ...); } #endif -#endif // _SYS_SEM_H +#endif /* _SYS_SEM_H */ diff --git a/options/posix/include/sys/shm.h b/options/posix/include/sys/shm.h index 6bd6cd219..4ac766411 100644 --- a/options/posix/include/sys/shm.h +++ b/options/posix/include/sys/shm.h @@ -80,4 +80,4 @@ int shmget(key_t __key, size_t __size, int __shmflg); } #endif -#endif // _SYS_SHM_H +#endif /* _SYS_SHM_H */ diff --git a/options/posix/include/sys/socket.h b/options/posix/include/sys/socket.h index 4218a5b84..69871eea6 100644 --- a/options/posix/include/sys/socket.h +++ b/options/posix/include/sys/socket.h @@ -24,36 +24,36 @@ struct sockaddr { char sa_data[14]; }; -// Control message format: -// The offsets marked with ^ are aligned to alignof(size_t). -// -// |---HEADER---|---DATA---|---PADDING---|---HEADER---|... -// ^ ^ ^ -// |---------CMSG_LEN------| -// |---------------CMSG_SPACE------------| - -// Auxiliary macro. While there is basically no reason for applications -// to use this, it is exported by glibc. +/* Control message format: */ +/* The offsets marked with ^ are aligned to alignof(size_t). */ +/* */ +/* |---HEADER---|---DATA---|---PADDING---|---HEADER---|... */ +/* ^ ^ ^ */ +/* |---------CMSG_LEN------| */ +/* |---------------CMSG_SPACE------------| */ + +/* Auxiliary macro. While there is basically no reason for applications */ +/* to use this, it is exported by glibc. */ #define CMSG_ALIGN(s) (((s) + __alignof__(size_t) - 1) & \ ~(__alignof__(size_t) - 1)) -// Basic macros to return content and padding size of a control message. +/* Basic macros to return content and padding size of a control message. */ #define CMSG_LEN(s) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (s)) #define CMSG_SPACE(s) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(s)) -// Provides access to the data of a control message. +/* Provides access to the data of a control message. */ #define CMSG_DATA(c) ((char *)(c) + CMSG_ALIGN(sizeof(struct cmsghdr))) #define __MLIBC_CMSG_NEXT(c) ((char *)(c) + CMSG_ALIGN((c)->cmsg_len)) #define __MLIBC_MHDR_LIMIT(m) ((char *)(m)->msg_control + (m)->msg_controllen) -// For parsing control messages only. -// Returns a pointer to the first header or nullptr if there is none. +/* For parsing control messages only. */ +/* Returns a pointer to the first header or nullptr if there is none. */ #define CMSG_FIRSTHDR(m) ((size_t)(m)->msg_controllen <= sizeof(struct cmsghdr) \ ? (struct cmsghdr *)0 : (struct cmsghdr *) (m)->msg_control) -// For parsing control messages only. -// Returns a pointer to the next header or nullptr if there is none. +/* For parsing control messages only. */ +/* Returns a pointer to the next header or nullptr if there is none. */ #define CMSG_NXTHDR(m, c) \ ((c)->cmsg_len < sizeof(struct cmsghdr) || \ (ptrdiff_t)(sizeof(struct cmsghdr) + CMSG_ALIGN((c)->cmsg_len)) \ @@ -103,5 +103,5 @@ int socketpair(int __domain, int __type, int __protocol, int __sv[2]); } #endif -#endif // _UNISTD_H +#endif /* _UNISTD_H */ diff --git a/options/posix/include/sys/stat.h b/options/posix/include/sys/stat.h index 60b277c38..98f1d2a49 100644 --- a/options/posix/include/sys/stat.h +++ b/options/posix/include/sys/stat.h @@ -40,5 +40,5 @@ int utimensat(int __dirfd, const char *__pathname, const struct timespec __times } #endif -#endif // _SYS_STAT_H +#endif /* _SYS_STAT_H */ diff --git a/options/posix/include/sys/statvfs.h b/options/posix/include/sys/statvfs.h index db9d13aa4..03e65a339 100644 --- a/options/posix/include/sys/statvfs.h +++ b/options/posix/include/sys/statvfs.h @@ -20,5 +20,5 @@ int fstatvfs64(int __fd, struct statvfs64 *__buf); } #endif -#endif // _SYS_STATVFS_H +#endif /* _SYS_STATVFS_H */ diff --git a/options/posix/include/sys/termios.h b/options/posix/include/sys/termios.h index b23f171b0..21767807b 100644 --- a/options/posix/include/sys/termios.h +++ b/options/posix/include/sys/termios.h @@ -2,5 +2,5 @@ #ifndef _SYS_TERMIOS_H #define _SYS_TERMIOS_H #include -#endif // _SYS_TERMIOS_H +#endif /* _SYS_TERMIOS_H */ diff --git a/options/posix/include/sys/time.h b/options/posix/include/sys/time.h index 99fd111e9..0debecfa5 100644 --- a/options/posix/include/sys/time.h +++ b/options/posix/include/sys/time.h @@ -22,7 +22,7 @@ struct timezone { #ifndef __MLIBC_ABI_ONLY -// TODO: this function is [OB]. disable it by default and add a macro to enable it +/* TODO: this function is [OB]. disable it by default and add a macro to enable it */ int gettimeofday(struct timeval *__restrict __result, void *__restrict __unused); int settimeofday(const struct timeval *__result, const struct timezone *__zone); @@ -33,7 +33,7 @@ int timerisset(struct timeval *__tvp); #endif /* !__MLIBC_ABI_ONLY */ -// timercmp taken from musl +/* timercmp taken from musl */ #define timercmp(s,t,op) ((s)->tv_sec == (t)->tv_sec ? \ (s)->tv_usec op (t)->tv_usec : (s)->tv_sec op (t)->tv_sec) @@ -51,7 +51,7 @@ int timer_delete(timer_t __timerid); #endif /* !__MLIBC_ABI_ONLY */ -// The following 2 macros are taken from musl +/* The following 2 macros are taken from musl */ #define TIMEVAL_TO_TIMESPEC(tv, ts) ( \ (ts)->tv_sec = (tv)->tv_sec, \ (ts)->tv_nsec = (tv)->tv_usec * 1000, \ @@ -65,4 +65,4 @@ int timer_delete(timer_t __timerid); } #endif -#endif // _SYS_TIME_H +#endif /* _SYS_TIME_H */ diff --git a/options/posix/include/sys/times.h b/options/posix/include/sys/times.h index 5cab3565a..96556bc43 100644 --- a/options/posix/include/sys/times.h +++ b/options/posix/include/sys/times.h @@ -1,7 +1,7 @@ #ifndef _SYS_TIMES_H #define _SYS_TIMES_H -// TODO: Only define the clock_t type. +/* TODO: Only define the clock_t type. */ #include #ifdef __cplusplus @@ -25,4 +25,4 @@ clock_t times(struct tms *__tms); } #endif -#endif // _SYS_TIMES_H +#endif /* _SYS_TIMES_H */ diff --git a/options/posix/include/sys/ttydefaults.h b/options/posix/include/sys/ttydefaults.h index c6d04f6f1..8ed811f30 100644 --- a/options/posix/include/sys/ttydefaults.h +++ b/options/posix/include/sys/ttydefaults.h @@ -2,7 +2,7 @@ #ifndef _SYS_TTYDEFAULTS_H #define _SYS_TTYDEFAULTS_H -// Values taken from musl +/* Values taken from musl */ #define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY) #define TTYDEF_OFLAG (OPOST | ONLCR | XTABS) @@ -36,4 +36,4 @@ #define CRPRNT CREPRINT #define CFLUSH CDISCARD -#endif // _SYS_TTYDEFAULTS_H +#endif /* _SYS_TTYDEFAULTS_H */ diff --git a/options/posix/include/sys/types.h b/options/posix/include/sys/types.h index ad837fc01..41f6ebca8 100644 --- a/options/posix/include/sys/types.h +++ b/options/posix/include/sys/types.h @@ -45,9 +45,9 @@ typedef uint16_t u_int16_t; typedef uint32_t u_int32_t; typedef uint64_t u_int64_t; -// BSD extensions +/* BSD extensions */ typedef int64_t quad_t; typedef uint64_t u_quad_t; -#endif // _SYS_TYPES_H +#endif /* _SYS_TYPES_H */ diff --git a/options/posix/include/sys/uio.h b/options/posix/include/sys/uio.h index c46052477..1547036d8 100644 --- a/options/posix/include/sys/uio.h +++ b/options/posix/include/sys/uio.h @@ -18,7 +18,7 @@ extern "C" { ssize_t readv(int __fd, const struct iovec *__iov, int __iovcnt); ssize_t writev(int __fd, const struct iovec *__iov, int __iovcnt); -// Non standard extensions, also found on modern BSD's +/* Non standard extensions, also found on modern BSD's */ ssize_t preadv(int __fd, const struct iovec *__iov, int __iovcnt, off_t __offset); ssize_t pwritev(int __fd, const struct iovec *__iov, int __iovcnt, off_t __offset); @@ -28,4 +28,4 @@ ssize_t pwritev(int __fd, const struct iovec *__iov, int __iovcnt, off_t __offse } #endif -#endif // _SYS_UIO_H +#endif /* _SYS_UIO_H */ diff --git a/options/posix/include/sys/un.h b/options/posix/include/sys/un.h index bb9b5adb4..7a0093e69 100644 --- a/options/posix/include/sys/un.h +++ b/options/posix/include/sys/un.h @@ -13,12 +13,12 @@ struct sockaddr_un { char sun_path[108]; }; -// Evaluate to actual length of the `sockaddr_un' structure. +/* Evaluate to actual length of the `sockaddr_un' structure. */ #define SUN_LEN(ptr) ((size_t) offsetof(struct sockaddr_un, sun_path) + strlen((ptr)->sun_path)) #ifdef __cplusplus } #endif -#endif // _SYS_UN_H +#endif /* _SYS_UN_H */ diff --git a/options/posix/include/sys/utsname.h b/options/posix/include/sys/utsname.h index 78116c9cd..5ae31dec1 100644 --- a/options/posix/include/sys/utsname.h +++ b/options/posix/include/sys/utsname.h @@ -18,5 +18,5 @@ int uname(struct utsname *__name); } #endif -#endif // _SYS_UTSNAME_H +#endif /* _SYS_UTSNAME_H */ diff --git a/options/posix/include/sys/wait.h b/options/posix/include/sys/wait.h index f99ba0c07..5143086bf 100644 --- a/options/posix/include/sys/wait.h +++ b/options/posix/include/sys/wait.h @@ -4,7 +4,7 @@ #include #include -// for siginfo_t +/* for siginfo_t */ #include #include @@ -12,10 +12,10 @@ extern "C" { #endif -// According to POSIX, does not make rusage available. +/* According to POSIX, does not make rusage available. */ struct rusage; -// TODO: move to own file and include in sys/types.h +/* TODO: move to own file and include in sys/types.h */ typedef enum { P_ALL, P_PID, P_PGID } idtype_t; @@ -26,7 +26,7 @@ pid_t wait(int *__status); int waitid(idtype_t __idtype, id_t __id, siginfo_t *__siginfo, int __flags); pid_t waitpid(pid_t __pid, int *__status, int __flags); -// GNU extensions. +/* GNU extensions. */ pid_t wait3(int *__status, int __options, struct rusage *__ru); pid_t wait4(pid_t __pid, int *__status, int __options, struct rusage *__ru); @@ -36,5 +36,5 @@ pid_t wait4(pid_t __pid, int *__status, int __options, struct rusage *__ru); } #endif -#endif // _SYS_WAIT_H +#endif /* _SYS_WAIT_H */ diff --git a/options/posix/include/syslog.h b/options/posix/include/syslog.h index 9318f006b..c984be169 100644 --- a/options/posix/include/syslog.h +++ b/options/posix/include/syslog.h @@ -63,7 +63,7 @@ int setlogmask(int __mask); __attribute__((__format__(__printf__, 2, 3))) void syslog(int __priority, const char *__format, ...); -// This is a linux extension +/* This is a linux extension */ __attribute__((__format__(__printf__, 2, 0))) void vsyslog(int __priority, const char *__format, va_list __args); @@ -73,5 +73,5 @@ void vsyslog(int __priority, const char *__format, va_list __args); } #endif -#endif // _SYSLOG_H +#endif /* _SYSLOG_H */ diff --git a/options/posix/include/termios.h b/options/posix/include/termios.h index 5a2f5aefb..7f62142e4 100644 --- a/options/posix/include/termios.h +++ b/options/posix/include/termios.h @@ -15,7 +15,7 @@ extern "C" { #include #endif -// baud rate constants for speed_t +/* baud rate constants for speed_t */ #define B0 0 #define B50 1 #define B75 2 @@ -48,17 +48,17 @@ extern "C" { #define B3500000 0010016 #define B4000000 0010017 -// constants for tcsetattr() +/* constants for tcsetattr() */ #define TCSANOW 0 #define TCSADRAIN 1 #define TCSAFLUSH 2 -// constants for tcflush() +/* constants for tcflush() */ #define TCIFLUSH 0 #define TCOFLUSH 1 #define TCIOFLUSH 2 -// constants for tcflow() +/* constants for tcflow() */ #define TCOOFF 0 #define TCOON 1 #define TCIOFF 2 @@ -84,7 +84,7 @@ int tcsetattr(int __fd, int __optional_actions, const struct termios *__attr); #endif /* !__MLIBC_ABI_ONLY */ -// This is a linux extension +/* This is a linux extension */ #define TIOCSCTTY 0x540E #define TIOCGPGRP 0x540F @@ -97,5 +97,5 @@ int tcsetattr(int __fd, int __optional_actions, const struct termios *__attr); } #endif -#endif // _TERMIOS_H +#endif /* _TERMIOS_H */ diff --git a/options/posix/include/ucontext.h b/options/posix/include/ucontext.h index fd0bcfc2c..6b539067a 100644 --- a/options/posix/include/ucontext.h +++ b/options/posix/include/ucontext.h @@ -5,7 +5,7 @@ #ifdef __cplusplus extern "C" { -#endif // __cplusplus +#endif /* __cplusplus */ #ifndef __MLIBC_ABI_ONLY @@ -18,6 +18,6 @@ int swapcontext(ucontext_t *__uctx, const ucontext_t *__newctx); #ifdef __cplusplus } -#endif // __cplusplus +#endif /* __cplusplus */ -#endif // _UCONTEXT_H +#endif /* _UCONTEXT_H */ diff --git a/options/posix/include/unistd.h b/options/posix/include/unistd.h index bfeb33b68..3f4ef12d1 100644 --- a/options/posix/include/unistd.h +++ b/options/posix/include/unistd.h @@ -40,8 +40,8 @@ extern "C" { #define _XOPEN_CRYPT 1 #endif -// MISSING: additional _POSIX and _XOPEN feature macros -// MISSING: _POSIX_TIMESTAMP_RESOLUTION and _POSIX2_SYMLINKS +/* MISSING: additional _POSIX and _XOPEN feature macros */ +/* MISSING: _POSIX_TIMESTAMP_RESOLUTION and _POSIX2_SYMLINKS */ #define _CS_PATH 0 #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 1 @@ -85,15 +85,15 @@ extern "C" { #define _CS_V6_ENV 1148 #define _CS_V7_ENV 1149 -// MISSING: SEEK macros from stdio.h +/* MISSING: SEEK macros from stdio.h */ #define F_LOCK 1 #define F_TEST 2 #define F_TLOCK 3 #define F_ULOCK 4 -// MISSING: _PC macros -// For now, use the Linux ABI for _PC constants. +/* MISSING: _PC macros */ +/* For now, use the Linux ABI for _PC constants. */ #define _PC_LINK_MAX 0 #define _PC_MAX_CANON 1 #define _PC_MAX_INPUT 2 @@ -107,7 +107,7 @@ extern "C" { #define _PC_FILESIZEBITS 9 #define _PC_SYMLINK_MAX 10 -// MISSING: remaining _SC_macros +/* MISSING: remaining _SC_macros */ #define _SC_ARG_MAX 0 #define _SC_CHILD_MAX 1 #define _SC_CLK_TCK 2 @@ -353,7 +353,7 @@ extern int optopt; #endif /* !__MLIBC_ABI_ONLY */ -// Non-POSIX functions supported by Linux. +/* Non-POSIX functions supported by Linux. */ #if UINTPTR_MAX == UINT64_MAX typedef __mlibc_uint64 useconds_t; #else @@ -368,7 +368,7 @@ int usleep(useconds_t __usec); int chroot(const char *__path); int daemon(int __nochdir, int __noclose); -// This is a Linux extension +/* This is a Linux extension */ pid_t gettid(void); int getentropy(void *__buffer, size_t __size); @@ -384,7 +384,7 @@ int setdomainname(const char *__name, size_t __len); int getresuid(uid_t *__ruid, uid_t *__euid, uid_t *__suid); int getresgid(gid_t *__rgid, gid_t *__egid, gid_t *__sgid); -// Glibc doesn't provide them by default anymore, lock behind an option +/* Glibc doesn't provide them by default anymore, lock behind an option */ #if __MLIBC_CRYPT_OPTION char *crypt(const char *__key, const char *__salt); void encrypt(char __block[64], int __flags); @@ -404,5 +404,5 @@ void encrypt(char __block[64], int __flags); # include #endif -#endif // _UNISTD_H +#endif /* _UNISTD_H */ diff --git a/options/posix/include/utime.h b/options/posix/include/utime.h index fd1fa29cd..0d5a2b2e0 100644 --- a/options/posix/include/utime.h +++ b/options/posix/include/utime.h @@ -22,4 +22,4 @@ int utime(const char *__filename, const struct utimbuf *__times); } #endif -#endif // _UTIME_H +#endif /* _UTIME_H */ diff --git a/options/posix/musl-generic-regex/tre.h b/options/posix/musl-generic-regex/tre.h index 5891f752b..030ad54fd 100644 --- a/options/posix/musl-generic-regex/tre.h +++ b/options/posix/musl-generic-regex/tre.h @@ -1,4 +1,4 @@ -// Taken from musl tre.h +/* Taken from musl tre.h */ /* tre-internal.h - TRE internal definitions @@ -36,7 +36,7 @@ #define hidden __attribute__((__visibility__("hidden"))) -// TODO: These should probably go in limits.h +/* TODO: These should probably go in limits.h */ #define CHARCLASS_NAME_MAX 14 #define RE_DUP_MAX 255 diff --git a/sysdeps/aero/include/aero/syscall.h b/sysdeps/aero/include/aero/syscall.h index 49533cc28..197b57494 100644 --- a/sysdeps/aero/include/aero/syscall.h +++ b/sysdeps/aero/include/aero/syscall.h @@ -87,8 +87,8 @@ #define SYS_GETSOCKOPT 80 #define SYS_SYMLINK_AT 81 -// Invalid syscall used to trigger a log error in the kernel (as a hint) -// so, that we can implement the syscall in the kernel. +/* Invalid syscall used to trigger a log error in the kernel (as a hint) */ +/* so, that we can implement the syscall in the kernel. */ #define UNIMPLEMENTED(FUNCTION_NAME) \ { \ sys_libc_log("Unimplemented syscall: " FUNCTION_NAME); \ @@ -177,15 +177,15 @@ static sc_word_t syscall6(int sc, sc_word_t arg1, sc_word_t arg2, : "rcx", "r11", "memory"); return ret; } -} // extern "C" +} /* extern "C" */ -// Cast to the argument type of the extern "C" functions. +/* Cast to the argument type of the extern "C" functions. */ __attribute__((__always_inline__)) inline sc_word_t sc_cast(long x) { return x; } __attribute__((__always_inline__)) inline sc_word_t sc_cast(const void *x) { return reinterpret_cast(x); } -// C++ wrappers for the extern "C" functions. +/* C++ wrappers for the extern "C" functions. */ __attribute__((__always_inline__)) static inline long _syscall(int call) { return syscall0(call); } @@ -234,4 +234,4 @@ inline int sc_error(long ret) { return -ret; return 0; } -#endif // SYSCALL_H +#endif /* SYSCALL_H */ diff --git a/sysdeps/ironclad/include/asm/ioctls.h b/sysdeps/ironclad/include/asm/ioctls.h index aa9f0b4ed..54f781490 100644 --- a/sysdeps/ironclad/include/asm/ioctls.h +++ b/sysdeps/ironclad/include/asm/ioctls.h @@ -1,10 +1,10 @@ #ifndef _ASM_IOCTLS_H #define _ASM_IOCTLS_H -// List of all the IOCTLs supported, for further explanation on the meanings -// please refer to documentation. If you did not get any, good luck! -// Some IOCTL codes may be the same, in which case the device they are used in -// gives them meaning. Cross-device IOCTLs have more distinct values. +/* List of all the IOCTLs supported, for further explanation on the meanings */ +/* please refer to documentation. If you did not get any, good luck! */ +/* Some IOCTL codes may be the same, in which case the device they are used in */ +/* gives them meaning. Cross-device IOCTLs have more distinct values. */ #define PS2MOUSE_2_1_SCALING 1 #define PS2MOUSE_1_1_SCALING 2 diff --git a/sysdeps/ironclad/include/mntent.h b/sysdeps/ironclad/include/mntent.h index e5e49e71e..67a12ec37 100644 --- a/sysdeps/ironclad/include/mntent.h +++ b/sysdeps/ironclad/include/mntent.h @@ -3,7 +3,7 @@ #include -// TODO: Refer to _PATH_MOUNTED +/* TODO: Refer to _PATH_MOUNTED */ #define MOUNTED "/etc/mtab" /* Generic mount options */ @@ -43,4 +43,4 @@ struct mntent *getmntent_r(FILE *, struct mntent *, char *, int); } #endif -#endif // _MNTENT_H +#endif /* _MNTENT_H */ diff --git a/sysdeps/ironclad/include/pty.h b/sysdeps/ironclad/include/pty.h index 0468b4661..a4d0ffc5e 100644 --- a/sysdeps/ironclad/include/pty.h +++ b/sysdeps/ironclad/include/pty.h @@ -13,4 +13,4 @@ int openpty(int *mfd, int *sfd, char *name, const struct termios *ios, const str } #endif -#endif // _PTY_H +#endif /* _PTY_H */ diff --git a/sysdeps/ironclad/include/sys/ironclad_devices.h b/sysdeps/ironclad/include/sys/ironclad_devices.h index 74f47f812..f0efc8cb6 100644 --- a/sysdeps/ironclad/include/sys/ironclad_devices.h +++ b/sysdeps/ironclad/include/sys/ironclad_devices.h @@ -41,4 +41,4 @@ struct rtc_time { } #endif -#endif // _SYS_IRONCLAD_DEVICES_H +#endif /* _SYS_IRONCLAD_DEVICES_H */ diff --git a/sysdeps/ironclad/include/sys/mac.h b/sysdeps/ironclad/include/sys/mac.h index d4cf76d65..4bf3d28fa 100644 --- a/sysdeps/ironclad/include/sys/mac.h +++ b/sysdeps/ironclad/include/sys/mac.h @@ -43,4 +43,4 @@ int set_mac_enforcement(unsigned long enforcement); } #endif -#endif // _SYS_MAC_H +#endif /* _SYS_MAC_H */ diff --git a/sysdeps/ironclad/include/sys/mount.h b/sysdeps/ironclad/include/sys/mount.h index 51263fa11..cce83e687 100644 --- a/sysdeps/ironclad/include/sys/mount.h +++ b/sysdeps/ironclad/include/sys/mount.h @@ -21,4 +21,4 @@ int umount(const char *target, int flags); } #endif -#endif // _SYS_MOUNT_H +#endif /* _SYS_MOUNT_H */ diff --git a/sysdeps/ironclad/include/sys/ptrace.h b/sysdeps/ironclad/include/sys/ptrace.h index 3993753f1..ece63b865 100644 --- a/sysdeps/ironclad/include/sys/ptrace.h +++ b/sysdeps/ironclad/include/sys/ptrace.h @@ -20,4 +20,4 @@ int ptrace(int request, pid_t pid, void *addr, void *data); } #endif -#endif // _SYS_PTRACE_H +#endif /* _SYS_PTRACE_H */ diff --git a/sysdeps/ironclad/include/sys/reboot.h b/sysdeps/ironclad/include/sys/reboot.h index c2dbbf2b6..ffc73dcf5 100644 --- a/sysdeps/ironclad/include/sys/reboot.h +++ b/sysdeps/ironclad/include/sys/reboot.h @@ -13,4 +13,4 @@ int reboot(int arg); } #endif -#endif // _SYS_REBOOT_H +#endif /* _SYS_REBOOT_H */ diff --git a/sysdeps/ironclad/include/sys/sched2.h b/sysdeps/ironclad/include/sys/sched2.h index caeb86a26..52ca304c5 100644 --- a/sysdeps/ironclad/include/sys/sched2.h +++ b/sysdeps/ironclad/include/sys/sched2.h @@ -21,4 +21,4 @@ int set_deadlines(int runtime, int period); } #endif -#endif // _SYS_SCHED2_H +#endif /* _SYS_SCHED2_H */ diff --git a/sysdeps/ironclad/include/sys/syscall.h b/sysdeps/ironclad/include/sys/syscall.h index 01ab0161e..150a59cc6 100644 --- a/sysdeps/ironclad/include/sys/syscall.h +++ b/sysdeps/ironclad/include/sys/syscall.h @@ -184,4 +184,4 @@ #define SYSCALL_GETTIDID 97 #define SYSCALL_SETTIDID 98 -#endif // _SYS_SYSCALL_H +#endif /* _SYS_SYSCALL_H */ diff --git a/sysdeps/ironclad/include/utmpx.h b/sysdeps/ironclad/include/utmpx.h index 2d7d3e184..d479f6dd4 100644 --- a/sysdeps/ironclad/include/utmpx.h +++ b/sysdeps/ironclad/include/utmpx.h @@ -12,7 +12,7 @@ extern "C" { #define UTMPX_FILE "/var/run/utmp" #define WTMPX_FILE "/var/run/wtmp" -// Struct definition taken from musl +/* Struct definition taken from musl */ struct utmpx { short ut_type; short __ut_pad1; @@ -60,4 +60,4 @@ void endutxent(void); } #endif -#endif // _UTMPX_H +#endif /* _UTMPX_H */ diff --git a/sysdeps/lemon/include/lemon/syscall.h b/sysdeps/lemon/include/lemon/syscall.h old mode 100755 new mode 100644 index 9fa9eaafb..495dbe803 --- a/sysdeps/lemon/include/lemon/syscall.h +++ b/sysdeps/lemon/include/lemon/syscall.h @@ -148,7 +148,7 @@ static long syscalln3(uint64_t call, uint64_t arg0, uint64_t arg1, uint64_t arg2 __attribute__((__always_inline__)) static long syscalln4(uint64_t call, uint64_t arg0, uint64_t arg1, uint64_t arg2, uint64_t arg3) { volatile long ret; - register uint64_t arg3r asm("r10") = arg3; // put arg3 in r10 + register uint64_t arg3r asm("r10") = arg3; /* put arg3 in r10 */ asm volatile("int $0x69" : "=a"(ret) : "a"(call), "D"(arg0), "S"(arg1), "d"(arg2), "r"(arg3r) : "memory"); return ret; } @@ -156,8 +156,8 @@ static long syscalln4(uint64_t call, uint64_t arg0, uint64_t arg1, uint64_t arg2 __attribute__((__always_inline__)) static long syscalln5(uint64_t call, uint64_t arg0, uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t arg4) { volatile long ret; - register uint64_t arg3r asm("r10") = arg3; // put arg3 in r10 - register uint64_t arg4r asm("r9") = arg4; // put arg4 in r9 + register uint64_t arg3r asm("r10") = arg3; /* put arg3 in r10 */ + register uint64_t arg4r asm("r9") = arg4; /* put arg4 in r9 */ asm volatile("int $0x69" : "=a"(ret) : "a"(call), "D"(arg0), "S"(arg1), "d"(arg2), "r"(arg3r), "r"(arg4r) : "memory"); return ret; } @@ -165,9 +165,9 @@ static long syscalln5(uint64_t call, uint64_t arg0, uint64_t arg1, uint64_t arg2 __attribute__((__always_inline__)) static long syscalln6(uint64_t call, uint64_t arg0, uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t arg4, uint64_t arg5) { volatile long ret; - register uint64_t arg3r asm("r10") = arg3; // put arg3 in r10 - register uint64_t arg4r asm("r9") = arg4; // put arg4 in r9 - register uint64_t arg5r asm("r8") = arg5; // put arg5 in r8 + register uint64_t arg3r asm("r10") = arg3; /* put arg3 in r10 */ + register uint64_t arg4r asm("r9") = arg4; /* put arg4 in r9 */ + register uint64_t arg5r asm("r8") = arg5; /* put arg5 in r8 */ asm volatile("int $0x69" : "=a"(ret) : "a"(call), "D"(arg0), "S"(arg1), "d"(arg2), "r"(arg3r), "r"(arg4r), "r"(arg5r) : "memory"); return ret; } diff --git a/sysdeps/linux/include/bits/syscall.h b/sysdeps/linux/include/bits/syscall.h index 770868b61..34adfad14 100644 --- a/sysdeps/linux/include/bits/syscall.h +++ b/sysdeps/linux/include/bits/syscall.h @@ -86,4 +86,4 @@ long syscall(long n, Arg0 a0, Arg1 a1, Arg2 a2, Arg3 a3, Arg4 a4, Arg5 a5, Arg6 } #endif -#endif // _MLIBC_SYSCALL_H +#endif /* _MLIBC_SYSCALL_H */ diff --git a/sysdeps/linux/include/sys/syscall.h b/sysdeps/linux/include/sys/syscall.h index 20841030f..073ff6631 100644 --- a/sysdeps/linux/include/sys/syscall.h +++ b/sysdeps/linux/include/sys/syscall.h @@ -9,4 +9,4 @@ #include #include -#endif // _SYS_SYSCALL_H +#endif /* _SYS_SYSCALL_H */ diff --git a/sysdeps/lyre/include/mntent.h b/sysdeps/lyre/include/mntent.h index bafd289ed..42f018425 100644 --- a/sysdeps/lyre/include/mntent.h +++ b/sysdeps/lyre/include/mntent.h @@ -3,7 +3,7 @@ #include -// TODO: Refer to _PATH_MOUNTED +/* TODO: Refer to _PATH_MOUNTED */ #define MOUNTED "/etc/mtab" /* Generic mount options */ @@ -47,4 +47,4 @@ struct mntent *getmntent_r(FILE *, struct mntent *, char *, int); } #endif -#endif // _MNTENT_H +#endif /* _MNTENT_H */ diff --git a/sysdeps/lyre/include/sys/mount.h b/sysdeps/lyre/include/sys/mount.h index b19f3d7e5..844abdbd1 100644 --- a/sysdeps/lyre/include/sys/mount.h +++ b/sysdeps/lyre/include/sys/mount.h @@ -51,4 +51,4 @@ int umount2(const char *target, int flags); } #endif -#endif // _SYS_MOUNT_H +#endif /* _SYS_MOUNT_H */ diff --git a/sysdeps/lyre/include/sys/reboot.h b/sysdeps/lyre/include/sys/reboot.h index 6c4e4959d..0628ae404 100644 --- a/sysdeps/lyre/include/sys/reboot.h +++ b/sysdeps/lyre/include/sys/reboot.h @@ -17,4 +17,4 @@ int reboot(int arg); } #endif -#endif // MLIBC_SYS_REBOOT_H +#endif /* MLIBC_SYS_REBOOT_H */ diff --git a/sysdeps/lyre/include/sys/sysmacros.h b/sysdeps/lyre/include/sys/sysmacros.h index 2d696e31e..9682d01d2 100644 --- a/sysdeps/lyre/include/sys/sysmacros.h +++ b/sysdeps/lyre/include/sys/sysmacros.h @@ -30,4 +30,4 @@ static unsigned long long int __mlibc_dev_makedev( } #endif -#endif // _SYS_SYSMACROS_H +#endif /* _SYS_SYSMACROS_H */ diff --git a/sysdeps/vinix/include/mntent.h b/sysdeps/vinix/include/mntent.h index bafd289ed..42f018425 100644 --- a/sysdeps/vinix/include/mntent.h +++ b/sysdeps/vinix/include/mntent.h @@ -3,7 +3,7 @@ #include -// TODO: Refer to _PATH_MOUNTED +/* TODO: Refer to _PATH_MOUNTED */ #define MOUNTED "/etc/mtab" /* Generic mount options */ @@ -47,4 +47,4 @@ struct mntent *getmntent_r(FILE *, struct mntent *, char *, int); } #endif -#endif // _MNTENT_H +#endif /* _MNTENT_H */ diff --git a/sysdeps/vinix/include/sys/mount.h b/sysdeps/vinix/include/sys/mount.h index b19f3d7e5..844abdbd1 100644 --- a/sysdeps/vinix/include/sys/mount.h +++ b/sysdeps/vinix/include/sys/mount.h @@ -51,4 +51,4 @@ int umount2(const char *target, int flags); } #endif -#endif // _SYS_MOUNT_H +#endif /* _SYS_MOUNT_H */ diff --git a/sysdeps/vinix/include/sys/reboot.h b/sysdeps/vinix/include/sys/reboot.h index 6c4e4959d..0628ae404 100644 --- a/sysdeps/vinix/include/sys/reboot.h +++ b/sysdeps/vinix/include/sys/reboot.h @@ -17,4 +17,4 @@ int reboot(int arg); } #endif -#endif // MLIBC_SYS_REBOOT_H +#endif /* MLIBC_SYS_REBOOT_H */ diff --git a/sysdeps/vinix/include/sys/sysmacros.h b/sysdeps/vinix/include/sys/sysmacros.h index 2d696e31e..9682d01d2 100644 --- a/sysdeps/vinix/include/sys/sysmacros.h +++ b/sysdeps/vinix/include/sys/sysmacros.h @@ -30,4 +30,4 @@ static unsigned long long int __mlibc_dev_makedev( } #endif -#endif // _SYS_SYSMACROS_H +#endif /* _SYS_SYSMACROS_H */ diff --git a/sysdeps/vinix/include/utmpx.h b/sysdeps/vinix/include/utmpx.h index 2d7d3e184..d479f6dd4 100644 --- a/sysdeps/vinix/include/utmpx.h +++ b/sysdeps/vinix/include/utmpx.h @@ -12,7 +12,7 @@ extern "C" { #define UTMPX_FILE "/var/run/utmp" #define WTMPX_FILE "/var/run/wtmp" -// Struct definition taken from musl +/* Struct definition taken from musl */ struct utmpx { short ut_type; short __ut_pad1; @@ -60,4 +60,4 @@ void endutxent(void); } #endif -#endif // _UTMPX_H +#endif /* _UTMPX_H */