diff options
author | H. Peter Anvin <hpa@zytor.com> | 2006-06-07 16:43:40 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2006-06-07 16:43:40 -0700 |
commit | 517d9c2765ebae85dff81ad0b985b5df5386b0d1 (patch) | |
tree | 8b01125078f03d401f3c2cb524788d1d1bc6e219 | |
parent | 813826873509e67d94a4a3166d049e76df74356c (diff) | |
download | klibc-517d9c2765ebae85dff81ad0b985b5df5386b0d1.tar.gz |
[klibc] Change the syntax of the *.def file to be more C-like.klibc-1.3.34
We have already had one build breakage due to quotes in comments
confusing cpp on *some*, but not *all*, platforms, due to the use of
-x assembler-with-cpp. Go to using C++-style comments, and use -x c++
(-x c should work too on gcc 3 and above; if this becomes an issue we
can change it.)
While we're add it, add back the final semicolon, to make the declarations
look more like C prototypes.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | usr/klibc/SOCKETCALLS.def | 42 | ||||
-rw-r--r-- | usr/klibc/SYSCALLS.def | 440 | ||||
-rw-r--r-- | usr/klibc/socketcalls.pl | 4 | ||||
-rw-r--r-- | usr/klibc/syscalls.pl | 4 | ||||
-rw-r--r-- | usr/klibc/syscalls/Kbuild | 2 |
5 files changed, 246 insertions, 246 deletions
diff --git a/usr/klibc/SOCKETCALLS.def b/usr/klibc/SOCKETCALLS.def index e70b3fc16eb3b..06a8e0f146c68 100644 --- a/usr/klibc/SOCKETCALLS.def +++ b/usr/klibc/SOCKETCALLS.def @@ -1,21 +1,21 @@ -; -*- fundamental -*- -; -; These are calls that are invoked via the socketcall mechanism -; Note that on most architectures this is simply #included into -; SYSCALLS.def. -; -<?> int socket(int, int, int) -<?> int bind(int, struct sockaddr *, int) -<?> int connect(int, struct sockaddr *, socklen_t) -<?> int listen(int, int) -<?> int accept(int, struct sockaddr *, socklen_t *) -<?> int getsockname(int, struct sockaddr *, socklen_t *) -<?> int getpeername(int, struct sockaddr *, socklen_t *) -<?> int socketpair(int, int, int, int *) -<?> int sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t) -<?> int recvfrom(int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *) -<?> int shutdown(int, int) -<?> int setsockopt(int, int, int, const void *, socklen_t) -<?> int getsockopt(int, int, int, void *, socklen_t *) -<?> int sendmsg(int, const struct msghdr *, unsigned int) -<?> int recvmsg(int, struct msghdr *, unsigned int) +// -*- c -*- +// +// These are calls that are invoked via the socketcall mechanism +// Note that on most architectures this is simply #included into +// SYSCALLS.def. +// +<?> int socket(int, int, int); +<?> int bind(int, struct sockaddr *, int); +<?> int connect(int, struct sockaddr *, socklen_t); +<?> int listen(int, int); +<?> int accept(int, struct sockaddr *, socklen_t *); +<?> int getsockname(int, struct sockaddr *, socklen_t *); +<?> int getpeername(int, struct sockaddr *, socklen_t *); +<?> int socketpair(int, int, int, int *); +<?> int sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t); +<?> int recvfrom(int, void *, size_t, unsigned int, struct sockaddr *, socklen_t *); +<?> int shutdown(int, int); +<?> int setsockopt(int, int, int, const void *, socklen_t); +<?> int getsockopt(int, int, int, void *, socklen_t *); +<?> int sendmsg(int, const struct msghdr *, unsigned int); +<?> int recvmsg(int, struct msghdr *, unsigned int); diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def index a9dd006e473f2..468c73c7e15ee 100644 --- a/usr/klibc/SYSCALLS.def +++ b/usr/klibc/SYSCALLS.def @@ -1,256 +1,256 @@ -; -*- fundamental -*- -; -; This is a list of system calls we invoke "directly". These -; are generated into syscall stubs in their own files, so the -; linker can do its job properly. -; -; The full description of a line is: -; [<[?][!]arch,...>] type [sysname,...][@systype][::funcname](args) -; -; ? means only instantiate this system call if present in asm/unistd.h -; +// -*- c -*- +// +// This is a list of system calls we invoke "directly". These +// are generated into syscall stubs in their own files, so the +// linker can do its job properly. +// +// The full description of a line is: +// [<[?][!]arch,...>] type [sysname,...][@systype][::funcname](args); +// +// ? means only instantiate this system call if present in asm/unistd.h +// #include <asm/unistd.h> #include <klibc/sysconfig.h> #include <bitsize.h> -; -; Process-related syscalls -; -void _exit,exit::_exit(int) -<?!ia64> pid_t clone::__clone(unsigned long, void *) -<?ia64> pid_t clone::__clone2(unsigned long, void *, void *) +// +// Process-related 'syscalls +// +void _exit,exit::_exit(int); +<?!ia64> pid_t clone::__clone(unsigned long, void *); +<?ia64> pid_t clone::__clone2(unsigned long, void *, void *); # if ! _KLIBC_NO_MMU -<!sparc,sparc64,ia64> pid_t fork() -<sparc,sparc64> pid_t fork@forkish() +<!sparc,sparc64,ia64> pid_t fork(); +<sparc,sparc64> pid_t fork@forkish(); #endif #if _KLIBC_REAL_VFORK -; A lot of architectures need architecture-specific vfork -; stubs, due to the no-stack requirement. These are the -; architectures which do not. -<alpha,m32r,ppc,ppc64,sh,s390,s390x> pid_t vfork() -<sparc,sparc64> pid_t vfork@forkish() +// A lot of architectures need architecture-specific vfork +// stubs, due to the no-stack requirement. These are the +// architectures which do not. +<alpha,m32r,ppc,ppc64,sh,s390,s390x> pid_t vfork(); +<sparc,sparc64> pid_t vfork@forkish(); #endif -<!alpha> pid_t getpid() -<alpha> pid_t getxpid@dual0::getpid() -int setpgid(pid_t, pid_t) -pid_t getpgid(pid_t) -<!alpha> pid_t getppid() -<alpha> pid_t getxpid@dual1::getppid() -pid_t setsid() -pid_t getsid(pid_t) -pid_t wait4(pid_t, int *, int, struct rusage *) -int execve(const char *, char * const *, char * const *) -<?> int nice(int) -<alpha,ia64> int getpriority(int, int) -<!alpha,ia64> int getpriority::__getpriority(int, int) -int setpriority(int, int, int) -int sched_setscheduler(pid_t, int, const struct sched_param *) -int sched_yield() +<!alpha> pid_t getpid(); +<alpha> pid_t getxpid@dual0::getpid(); +int setpgid(pid_t, pid_t); +pid_t getpgid(pid_t); +<!alpha> pid_t getppid(); +<alpha> pid_t getxpid@dual1::getppid(); +pid_t setsid(); +pid_t getsid(pid_t); +pid_t wait4(pid_t, int *, int, struct rusage *); +int execve(const char *, char * const *, char * const *); +<?> int nice(int); +<alpha,ia64> int getpriority(int, int); +<!alpha,ia64> int getpriority::__getpriority(int, int); +int setpriority(int, int, int); +int sched_setscheduler(pid_t, int, const struct sched_param *); +int sched_yield(); -; -; User and group IDs -; -int setuid32,setuid::setuid(uid_t) -int setgid32,setgid::setgid(gid_t) -<!alpha> uid_t getuid32,getuid::getuid() -<alpha> uid_t getxuid@dual0::getuid() -<!alpha> gid_t getgid32,getgid::getgid() -<alpha> gid_t getxgid@dual0::getgid() -<!alpha> uid_t geteuid32,geteuid::geteuid() -<alpha> uid_t getxuid@dual1::geteuid() -<!alpha> gid_t getegid32,getegid::getegid() -<alpha> gid_t getxgid@dual1::getegid() -int getgroups32,getgroups::getgroups(int, gid_t *) -int setgroups32,setgroups::setgroups(size_t, const gid_t *) -int setreuid32,setreuid::setreuid(uid_t, uid_t) -int setregid32,setregid::setregid(gid_t, gid_t) -int setfsuid32,setfsuid::setfsuid(uid_t) -int setfsgid32,setfsgid::setfsgid(gid_t) -int setresuid32,setresuid::setresuid(int, uid_t, uid, uid_t) +// +// User and group IDs +// +int setuid32,setuid::setuid(uid_t); +int setgid32,setgid::setgid(gid_t); +<!alpha> uid_t getuid32,getuid::getuid(); +<alpha> uid_t getxuid@dual0::getuid(); +<!alpha> gid_t getgid32,getgid::getgid(); +<alpha> gid_t getxgid@dual0::getgid(); +<!alpha> uid_t geteuid32,geteuid::geteuid(); +<alpha> uid_t getxuid@dual1::geteuid(); +<!alpha> gid_t getegid32,getegid::getegid(); +<alpha> gid_t getxgid@dual1::getegid(); +int getgroups32,getgroups::getgroups(int, gid_t *); +int setgroups32,setgroups::setgroups(size_t, const gid_t *); +int setreuid32,setreuid::setreuid(uid_t, uid_t); +int setregid32,setregid::setregid(gid_t, gid_t); +int setfsuid32,setfsuid::setfsuid(uid_t); +int setfsgid32,setfsgid::setfsgid(gid_t); +int setresuid32,setresuid::setresuid(int, uid_t, uid, uid_t); -; -; Filesystem-related system calls -; -int mount(const char *, const char *, const char *, unsigned long, const void *) -<!alpha,ia64> int umount2(const char *, int) -<alpha,ia64> int umount::umount2(const char *, int) -<?> int pivot_root(const char *, const char *) -int sync() +// +// Filesystem-related system calls +// +int mount(const char *, const char *, const char *, unsigned long, const void *); +<!alpha,ia64> int umount2(const char *, int); +<alpha,ia64> int umount::umount2(const char *, int); +<?> int pivot_root(const char *, const char *); +int sync(); #ifdef __NR_statfs64 -int statfs64::__statfs64(const char *, size_t, struct statfs *) +int statfs64::__statfs64(const char *, size_t, struct statfs *); #else -int statfs(const char *, struct statfs *) +int statfs(const char *, struct statfs *); #endif #ifdef __NR_fstatfs64 -int fstatfs64::__fstatfs64(int, size_t, struct statfs *) +int fstatfs64::__fstatfs64(int, size_t, struct statfs *); #else -int fstatfs(int, struct statfs *) +int fstatfs(int, struct statfs *); #endif -int swapon(const char *, int) -int swapoff(const char *) +int swapon(const char *, int); +int swapoff(const char *); -; -; Inode-related system calls -; -int access(const char *, int) -<?> int faccessat(int, const char *, int) -int link(const char *, const char *) -<?> int linkat(int, const char *, int, const char *) -int unlink(const char *) -<?> int unlinkat(int, const char *) -int chdir(const char *) -int fchdir(int) -int rename(const char *, const char *) -<?> int renameat(int, const char *, int, const char *) -int mknod(const char *, mode_t, dev_t) -<?> int mknodat(int, const char *, const char *, mode_t, dev_t) -int chmod(const char *, mode_t) -int fchmod(int, mode_t) -<?> int fchmodat(int, const char *, mode_t) -int mkdir(const char *, mode_t) -<?> int mkdirat(int, const char *, const char *, mode_t) -int rmdir(const char *) -<!alpha,ia64,mips,mips64,sparc,sparc64> int pipe(int *) -mode_t umask(mode_t) -int chroot(const char *) -int symlink(const char *, const char *) -<?> int symlinkat(const char *, int, const char *) -int readlink(const char *, char *, size_t) -<?> int readlinkat(int, const char *, char *, int) -<!ppc64> int stat64,stat::stat(const char *, struct stat *) -<!ppc64> int lstat64,lstat::lstat(const char *, struct stat *) -<!ppc64> int fstat64,fstat::fstat(int, struct stat *) -<ppc64> int stat::stat(const char *, struct stat *) -<ppc64> int lstat::lstat(const char *, struct stat *) -<ppc64> int fstat::fstat(int, struct stat *) -; XXX: Is this right?! -<?> int fstatat64,newstatat,fstatat::fstatat(int, const char *, struct stat *, int) -int getdents64,getdents::getdents(unsigned int, struct dirent *, unsigned int) -int chown32,chown::chown(const char *, uid_t, gid_t) -int fchown32,fchown::fchown(int, uid_t, gid_t) -<?> int fchownat(int, const char *, uid_t, gid_t, int) -int lchown32,lchown::lchown(const char *, uid_t, gid_t) -int getcwd::__getcwd(char *, size_t) -<?> int utime(const char *, const struct utimbuf *) -<?> int utimes(const char *, const struct timeval *) -<?> int futimesat(int, const char *, const struct timeval *) -<?> int inotify_init(void) -<?> int inotify_add_watch(int, const char *, __u32) -<?> int inotify_rm_watch(int, __u32) +// +// Inode-related system calls +// +int access(const char *, int); +<?> int faccessat(int, const char *, int); +int link(const char *, const char *); +<?> int linkat(int, const char *, int, const char *); +int unlink(const char *); +<?> int unlinkat(int, const char *); +int chdir(const char *); +int fchdir(int); +int rename(const char *, const char *); +<?> int renameat(int, const char *, int, const char *); +int mknod(const char *, mode_t, dev_t); +<?> int mknodat(int, const char *, const char *, mode_t, dev_t); +int chmod(const char *, mode_t); +int fchmod(int, mode_t); +<?> int fchmodat(int, const char *, mode_t); +int mkdir(const char *, mode_t); +<?> int mkdirat(int, const char *, const char *, mode_t); +int rmdir(const char *); +<!alpha,ia64,mips,mips64,sparc,sparc64> int pipe(int *); +mode_t umask(mode_t); +int chroot(const char *); +int symlink(const char *, const char *); +<?> int symlinkat(const char *, int, const char *); +int readlink(const char *, char *, size_t); +<?> int readlinkat(int, const char *, char *, int); +<!ppc64> int stat64,stat::stat(const char *, struct stat *); +<!ppc64> int lstat64,lstat::lstat(const char *, struct stat *); +<!ppc64> int fstat64,fstat::fstat(int, struct stat *); +<ppc64> int stat::stat(const char *, struct stat *); +<ppc64> int lstat::lstat(const char *, struct stat *); +<ppc64> int fstat::fstat(int, struct stat *); +// XXX: Is this right?! +<?> int fstatat64,newstatat,fstatat::fstatat(int, const char *, struct stat *, int); +int getdents64,getdents::getdents(unsigned int, struct dirent *, unsigned int); +int chown32,chown::chown(const char *, uid_t, gid_t); +int fchown32,fchown::fchown(int, uid_t, gid_t); +<?> int fchownat(int, const char *, uid_t, gid_t, int); +int lchown32,lchown::lchown(const char *, uid_t, gid_t); +int getcwd::__getcwd(char *, size_t); +<?> int utime(const char *, const struct utimbuf *); +<?> int utimes(const char *, const struct timeval *); +<?> int futimesat(int, const char *, const struct timeval *); +<?> int inotify_init(void); +<?> int inotify_add_watch(int, const char *, __u32); +<?> int inotify_rm_watch(int, __u32); -; -; I/O operations -; -<!i386,64> int open::__open(const char *, int, mode_t) -<?!i386,64> int openat::__openat(int, const char *, int, mode_t) -<64> int open(const char *, int, mode_t) -ssize_t read(int, void *, size_t) -ssize_t write(int, const void *, size_t) -int close(int) -<64> off_t lseek(int, off_t, int) -<32> int _llseek::__llseek(int, unsigned long, unsigned long, off_t *, int) -int dup(int) -int dup2(int, int) -<i386> int fcntl64@varadic::fcntl(int, int, unsigned long) -<ppc64> int fcntl(int, int, unsigned long) -<!i386,ppc64> int fcntl64,fcntl::fcntl(int, int, unsigned long) -int ioctl(int, int, void *) -int flock(int, int) -int _newselect,select::select(int, fd_set *, fd_set *, fd_set *, struct timeval *) +// +// I/O operations +// +<!i386,64> int open::__open(const char *, int, mode_t); +<?!i386,64> int openat::__openat(int, const char *, int, mode_t); +<64> int open(const char *, int, mode_t); +ssize_t read(int, void *, size_t); +ssize_t write(int, const void *, size_t); +int close(int); +<64> off_t lseek(int, off_t, int); +<32> int _llseek::__llseek(int, unsigned long, unsigned long, off_t *, int); +int dup(int); +int dup2(int, int); +<i386> int fcntl64@varadic::fcntl(int, int, unsigned long); +<ppc64> int fcntl(int, int, unsigned long); +<!i386,ppc64> int fcntl64,fcntl::fcntl(int, int, unsigned long); +int ioctl(int, int, void *); +int flock(int, int); +int _newselect,select::select(int, fd_set *, fd_set *, fd_set *, struct timeval *); #if defined(__NR_pselect) && !_KLIBC_USE_RT_SIG -int pselect(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *) +int pselect(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *); #elif defined(__NR_pselect7) -int pselect7::__pselect7(int, fd_set *, fd_set *, fd_set *, struct timespec *, const sigset_t *, size_t) +int pselect7::__pselect7(int, fd_set *, fd_set *, fd_set *, struct timespec *, const sigset_t *, size_t); #elif defined(__NR_pselect6) -int pselect6::__pselect6(int, fd_set *, fd_set *, fd_set *, struct timespec *, const struct __pselect6 *) +int pselect6::__pselect6(int, fd_set *, fd_set *, fd_set *, struct timespec *, const struct __pselect6 *); #endif -int poll(struct pollfd *, nfds_t, long) -<?> int ppoll::__ppoll(struct pollfd *, nfds_t, struct timespec *, const sigset_t *, size_t) -int fsync(int) -int fdatasync,fsync::fdatasync(int) -int readv(int, const struct iovec *, int) -int writev(int, const struct iovec *, int) -int ftruncate64,ftruncate::ftruncate(int, off_t) -ssize_t pread64,pread::pread(int, void *, size_t, off_t) -ssize_t pwrite64,pwrite::pwrite(int, void *, size_t, off_t) -int sync_file_range,fdatasync,fsync::sync_file_range(int, off_t, off_t, unsigned int) -<?> int splice(int, off_t *, int, off_t *, size_t, unsigned int) -<?> int tee(int, int, size_t, unsigned int) +int poll(struct pollfd *, nfds_t, long); +<?> int ppoll::__ppoll(struct pollfd *, nfds_t, struct timespec *, const sigset_t *, size_t); +int fsync(int); +int fdatasync,fsync::fdatasync(int); +int readv(int, const struct iovec *, int); +int writev(int, const struct iovec *, int); +int ftruncate64,ftruncate::ftruncate(int, off_t); +ssize_t pread64,pread::pread(int, void *, size_t, off_t); +ssize_t pwrite64,pwrite::pwrite(int, void *, size_t, off_t); +int sync_file_range,fdatasync,fsync::sync_file_range(int, off_t, off_t, unsigned int); +<?> int splice(int, off_t *, int, off_t *, size_t, unsigned int); +<?> int tee(int, int, size_t, unsigned int); -; -; Signal operations -; -; We really should get rid of the non-rt_* of these, but that takes -; sanitizing <signal.h> for all architectures, sigh. See <klibc/config.h>. +// +// Signal operations +// +// We really should get rid of the non-rt_* of these, but that takes +// sanitizing <signal.h> for all architectures, sigh. See <klibc/config.h>. #if _KLIBC_USE_RT_SIG -<!sparc,sparc64> int rt_sigaction::__rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t) -<sparc,sparc64> int rt_sigaction::__rt_sigaction(int, const struct sigaction *, struct sigaction *, void *, size_t) -int rt_sigsuspend::__rt_sigsuspend(const sigset_t *, size_t) -int rt_sigpending::__rt_sigpending(sigset_t *, size_t) -int rt_sigprocmask::__rt_sigprocmask(int, const sigset_t *, sigset_t *, size_t) -<sparc64> void rt_sigreturn::__sigreturn(void) +<!sparc,sparc64> int rt_sigaction::__rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t); +<sparc,sparc64> int rt_sigaction::__rt_sigaction(int, const struct sigaction *, struct sigaction *, void *, size_t); +int rt_sigsuspend::__rt_sigsuspend(const sigset_t *, size_t); +int rt_sigpending::__rt_sigpending(sigset_t *, size_t); +int rt_sigprocmask::__rt_sigprocmask(int, const sigset_t *, sigset_t *, size_t); +<sparc64> void rt_sigreturn::__sigreturn(void); #else -int sigaction::__sigaction(int, const struct sigaction *, struct sigaction *) -int sigsuspend(const sigset_t *) -int sigpending(sigset_t *) -int sigprocmask(int, const sigset_t *, sigset_t *) +int sigaction::__sigaction(int, const struct sigaction *, struct sigaction *); +int sigsuspend(const sigset_t *); +int sigpending(sigset_t *); +int sigprocmask(int, const sigset_t *, sigset_t *); #endif -int kill(pid_t, int) -<?> unsigned int alarm(unsigned int) -int getitimer(int, struct itimerval *) -int setitimer(int, const struct itimerval *, struct itimerval *) +int kill(pid_t, int); +<?> unsigned int alarm(unsigned int); +int getitimer(int, struct itimerval *); +int setitimer(int, const struct itimerval *, struct itimerval *); -; -; Time-related system calls -; -<?> time_t time(time_t *) -clock_t times(struct tms *) -int gettimeofday(struct timeval *, struct timezone *) -int settimeofday(const struct timeval *, const struct timezone *) -int nanosleep(const struct timespec *, struct timespec *) -<?> int pause() +// +// Time-related system calls +// +<?> time_t time(time_t *); +clock_t times(struct tms *); +int gettimeofday(struct timeval *, struct timezone *); +int settimeofday(const struct timeval *, const struct timezone *); +int nanosleep(const struct timespec *, struct timespec *); +<?> int pause(); -; -; Memory -; -<?> void * brk::__brk(void *) -int munmap(void *, size_t) -void * mremap(void *, size_t, size_t, unsigned long) -int msync(const void *, size_t, int) -int mprotect(const void *, size_t, int) +// +// Memory +// +<?> void * brk::__brk(void *); +int munmap(void *, size_t); +void * mremap(void *, size_t, size_t, unsigned long); +int msync(const void *, size_t, int); +int mprotect(const void *, size_t, int); # if _KLIBC_USE_MMAP2 -<!s390> void * mmap2::__mmap2(void *, size_t, int, int, int, long) +<!s390> void * mmap2::__mmap2(void *, size_t, int, int, int, long); # else -<!s390x> void * mmap(void *, size_t, int, int, int, long) -int mlockall(int) -int munlockall() -int mlock(const void *, size_t) -int munlock(const void *, size_t) +<!s390x> void * mmap(void *, size_t, int, int, int, long); +int mlockall(int); +int munlockall(); +int mlock(const void *, size_t); +int munlock(const void *, size_t); #endif -; -; System stuff -; -int uname(struct utsname *) -int setdomainname(const char *, size_t) -int sethostname(const char *, size_t) -long init_module(void *, unsigned long, const char *) -long delete_module(const char *, unsigned int) -int reboot::__reboot(int, int, int, void *) -int syslog::klogctl(int, char *, int) -int sysinfo(struct sysinfo *) +// +// System stuff +// +int uname(struct utsname *); +int setdomainname(const char *, size_t); +int sethostname(const char *, size_t); +long init_module(void *, unsigned long, const char *); +long delete_module(const char *, unsigned int); +int reboot::__reboot(int, int, int, void *); +int syslog::klogctl(int, char *, int); +int sysinfo(struct sysinfo *); -; -; Low-level I/O (generally architecture-specific) -; -<i386,x86_64> int iopl(int) -<i386,x86_64> int ioperm(unsigned long, unsigned long, int) -<i386> int vm86(struct vm86_struct *) +// +// Low-level I/O (generally architecture-specific); +// +<i386,x86_64> int iopl(int); +<i386,x86_64> int ioperm(unsigned long, unsigned long, int); +<i386> int vm86(struct vm86_struct *); -; -; Most architectures have the socket interfaces using regular -; system calls. -; -<?!i386> long socketcall::__socketcall(int, const unsigned long *) +// +// Most architectures have the socket interfaces using regular +// system calls. +// +<?!i386> long socketcall::__socketcall(int, const unsigned long *); #include "SOCKETCALLS.def" diff --git a/usr/klibc/socketcalls.pl b/usr/klibc/socketcalls.pl index 0f3a523cad269..d42e56933f202 100644 --- a/usr/klibc/socketcalls.pl +++ b/usr/klibc/socketcalls.pl @@ -24,10 +24,10 @@ if (!open(FILE, "< $file")) { print "socketcall-objs := "; while ( defined($line = <FILE>) ) { chomp $line; - $line =~ s/\s*[\#\;].*$//; # Strip comments and trailing blanks + $line =~ s/\s*(|\#.*]|\/\/.*)$//; # Strip comments and trailing blanks next unless $line; - if ( $line =~ /^\s*\<\?\>\s*(.*)\s+([_a-zA-Z][_a-zA-Z0-9]+)\s*\((.*)\)$/ ) { + if ( $line =~ /^\s*\<\?\>\s*(.*)\s+([_a-zA-Z][_a-zA-Z0-9]+)\s*\((.*)\)\s*\;$/ ) { $type = $1; $name = $2; $argv = $3; diff --git a/usr/klibc/syscalls.pl b/usr/klibc/syscalls.pl index 0575fa6648104..c425137c24850 100644 --- a/usr/klibc/syscalls.pl +++ b/usr/klibc/syscalls.pl @@ -51,10 +51,10 @@ print "syscall-objs := "; while ( defined($line = <FILE>) ) { chomp $line; - $line =~ s/\s*(|[\#;].*)$//; # Strip comments and trailing blanks + $line =~ s/\s*(|\#.*|\/\/.*)$//; # Strip comments and trailing blanks next unless $line; - if ( $line =~ /^\s*(\<[^\>]+\>\s+|)([A-Za-z0-9_\*\s]+)\s+([A-Za-z0-9_,]+)(|\@[A-Za-z0-9_]+)(|\:\:[A-Za-z0-9_]+)\s*\(([^\:\)]*)\)\s*$/ ) { + if ( $line =~ /^\s*(\<[^\>]+\>\s+|)([A-Za-z0-9_\*\s]+)\s+([A-Za-z0-9_,]+)(|\@[A-Za-z0-9_]+)(|\:\:[A-Za-z0-9_]+)\s*\(([^\:\)]*)\)\s*\;$/ ) { $archs = $1; $type = $2; $snames = $3; diff --git a/usr/klibc/syscalls/Kbuild b/usr/klibc/syscalls/Kbuild index ba71aa194605f..f5468a382e5fa 100644 --- a/usr/klibc/syscalls/Kbuild +++ b/usr/klibc/syscalls/Kbuild @@ -38,7 +38,7 @@ $(obj)/syscalls.list: $(call objectify,$(syscall-objs)) FORCE # We pass -ansi to keep cpp from define e.g. "i386" as well as "__i386__" quiet_cmd_syscall.i = GEN $@ cmd_syscall.i = $(KLIBCCC) $(klibccflags) -D__ASSEMBLY__ \ - -ansi -x assembler-with-cpp -E -o $@ $< + -ansi -x c++ -E -o $@ $< $(obj)/SYSCALLS.i: $(KLIBCSRC)/SYSCALLS.def FORCE $(call if_changed_dep,syscall.i) |