Skip to content

Commit

Permalink
misc: Remove C99+ style single line comments from headers
Browse files Browse the repository at this point in the history
This should in part address issue #1150, other than for the fact that it has no CI check
  • Loading branch information
mintsuki committed Oct 13, 2024
1 parent 2f19345 commit 6dff15d
Show file tree
Hide file tree
Showing 294 changed files with 731 additions and 731 deletions.
2 changes: 1 addition & 1 deletion abis/aero/auxv.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
#define AT_RANDOM 25
#define AT_EXECFN 31

#endif // _ABIBITS_AUXV_H
#endif /* _ABIBITS_AUXV_H */
2 changes: 1 addition & 1 deletion abis/ironclad/access.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
#define W_OK 4
#define X_OK 8

#endif // _ABIBITS_ACCESS_H
#endif /* _ABIBITS_ACCESS_H */
4 changes: 2 additions & 2 deletions abis/ironclad/blkcnt_t.h
Original file line number Diff line number Diff line change
@@ -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 */
4 changes: 2 additions & 2 deletions abis/ironclad/blksize_t.h
Original file line number Diff line number Diff line change
@@ -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 */

2 changes: 1 addition & 1 deletion abis/ironclad/dev_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

typedef unsigned long dev_t;

#endif // _ABIBITS_DEV_T_H
#endif /* _ABIBITS_DEV_T_H */
2 changes: 1 addition & 1 deletion abis/ironclad/epoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

#define EPOLL_CLOEXEC 1

#endif // _ABIBITS_EPOLL_H
#endif /* _ABIBITS_EPOLL_H */
2 changes: 1 addition & 1 deletion abis/ironclad/errno.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,4 @@

#define EIEIO 1524152434

#endif // _ABIBITS_ERRNO_H
#endif /* _ABIBITS_ERRNO_H */
20 changes: 10 additions & 10 deletions abis/ironclad/fcntl.h
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -76,4 +76,4 @@
#define POSIX_FADV_WILLNEED 5
#define POSIX_FADV_RANDOM 6

#endif // _ABIBITS_FCNTL_H
#endif /* _ABIBITS_FCNTL_H */
2 changes: 1 addition & 1 deletion abis/ironclad/gid_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

typedef unsigned int gid_t;

#endif // _ABIBITS_GID_T_H
#endif /* _ABIBITS_GID_T_H */
2 changes: 1 addition & 1 deletion abis/ironclad/in.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
4 changes: 2 additions & 2 deletions abis/ironclad/ino_t.h
Original file line number Diff line number Diff line change
@@ -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 */
2 changes: 1 addition & 1 deletion abis/ironclad/inotify.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
#define IN_CLOEXEC 1
#define IN_NONBLOCK 2

#endif // _ABIBITS_INOTIFY_H
#endif /* _ABIBITS_INOTIFY_H */
6 changes: 3 additions & 3 deletions abis/ironclad/limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 1 addition & 1 deletion abis/ironclad/mode_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

typedef int mode_t;

#endif // _ABIBITS_MODE_T_H
#endif /* _ABIBITS_MODE_T_H */
2 changes: 1 addition & 1 deletion abis/ironclad/nlink_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

typedef int nlink_t;

#endif // _ABIBITS_NLINK_T_H
#endif /* _ABIBITS_NLINK_T_H */
2 changes: 1 addition & 1 deletion abis/ironclad/packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

#define PACKET_HOST 0

#endif // _ABIBITS_PACKET_H
#endif /* _ABIBITS_PACKET_H */
2 changes: 1 addition & 1 deletion abis/ironclad/pid_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

typedef int pid_t;

#endif // _ABIBITS_PID_T_H
#endif /* _ABIBITS_PID_T_H */
2 changes: 1 addition & 1 deletion abis/ironclad/poll.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
#define POLLWRBAND 0x200
#define POLLRDBAND 0x400

#endif // _ABIBITS_POLL_H
#endif /* _ABIBITS_POLL_H */
2 changes: 1 addition & 1 deletion abis/ironclad/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@

#define PTRACE_PEEKSIGINFO_SHARED 1

#endif // _ABIBITS_PTRACE_H
#endif /* _ABIBITS_PTRACE_H */
2 changes: 1 addition & 1 deletion abis/ironclad/reboot.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
#define RB_SW_SUSPEND 0xd000fce2
#define RB_KEXEC 0x45584543

#endif // _ABIBITS_REBOOT_H
#endif /* _ABIBITS_REBOOT_H */
2 changes: 1 addition & 1 deletion abis/ironclad/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ struct rusage {
}
#endif

#endif // _ABIBITS_RESOURCE_H
#endif /* _ABIBITS_RESOURCE_H */
2 changes: 1 addition & 1 deletion abis/ironclad/seek-whence.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
#define SEEK_CUR 2
#define SEEK_END 4

#endif // _ABIBITS_SEEK_WHENCE_H
#endif /* _ABIBITS_SEEK_WHENCE_H */
22 changes: 11 additions & 11 deletions abis/ironclad/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 {
Expand All @@ -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;
Expand Down Expand Up @@ -189,4 +189,4 @@ typedef struct __ucontext {
}
#endif

#endif // _ABIBITS_SIGNAL_H
#endif /* _ABIBITS_SIGNAL_H */
6 changes: 3 additions & 3 deletions abis/ironclad/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion abis/ironclad/stat.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ struct stat {
}
#endif

#endif // _ABIBITS_STAT_H
#endif /* _ABIBITS_STAT_H */
2 changes: 1 addition & 1 deletion abis/ironclad/statvfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions abis/ironclad/termios.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion abis/ironclad/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ struct itimerval {
#define ITIMER_VIRTUAL 1
#define ITIMER_PROF 2

#endif // _ABIBITS_TIME_H
#endif /* _ABIBITS_TIME_H */
2 changes: 1 addition & 1 deletion abis/ironclad/uid_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

typedef unsigned int uid_t;

#endif // _ABIBITS_UID_T_H
#endif /* _ABIBITS_UID_T_H */
2 changes: 1 addition & 1 deletion abis/ironclad/utsname.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ struct utsname {
char machine[65];
};

#endif // _ABIBITS_UTSNAME_T_H
#endif /* _ABIBITS_UTSNAME_T_H */
Loading

0 comments on commit 6dff15d

Please sign in to comment.