From: Denys Vlasenko Date: Fri, 16 Mar 2012 11:02:22 +0000 (+0100) Subject: Tidy up includes and copyright notices, fix indentation X-Git-Tag: v4.7~80 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6d91ded3f2d5401e09a9c2fa442aabfbfe593a8;p=strace Tidy up includes and copyright notices, fix indentation The files not mentioned in changelog below had only copyright notices fixes and indentation fixes. * defs.h: Include and . * file.c: Do not include . Move struct kernel_dirent declaration below top include block. * block.c: Do not include and . * quota.c: Likewise. * desc.c: Likewise. * signal.c: Likewise. Signed-off-by: Denys Vlasenko --- diff --git a/COPYRIGHT b/COPYRIGHT index faaa2d82..e9078d3e 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -27,5 +27,3 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -$Id$ diff --git a/bjm.c b/bjm.c index b5e21f99..6ae37587 100644 --- a/bjm.c +++ b/bjm.c @@ -26,11 +26,9 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ -#include "defs.h" +#include "defs.h" #include #include #include diff --git a/block.c b/block.c index 599e5840..1dee8bf3 100644 --- a/block.c +++ b/block.c @@ -26,8 +26,6 @@ */ #include "defs.h" -#include -#include #include #include #include diff --git a/count.c b/count.c index 673c3540..29773537 100644 --- a/count.c +++ b/count.c @@ -31,8 +31,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" diff --git a/debian/copyright b/debian/copyright index 59e7b1be..fd355077 100644 --- a/debian/copyright +++ b/debian/copyright @@ -37,5 +37,3 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -$Id$ diff --git a/defs.h b/defs.h index b09b40fb..2c8814b8 100644 --- a/defs.h +++ b/defs.h @@ -25,8 +25,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #ifdef HAVE_CONFIG_H @@ -42,23 +40,25 @@ # include #endif #include +#ifdef HAVE_STDBOOL_H +# include +#endif +#include +#include #include +#ifdef STDC_HEADERS +# include +#endif #include #include #include #include #include +#include +#include #include #include -#include #include -#ifdef HAVE_STDBOOL_H -# include -#endif -#ifdef STDC_HEADERS -# include -#endif -#include #ifndef HAVE_STRERROR const char *strerror(int); diff --git a/desc.c b/desc.c index 932c66f2..b18951f6 100644 --- a/desc.c +++ b/desc.c @@ -26,28 +26,24 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - #include #include -#include #ifdef HAVE_SYS_EPOLL_H -#include +# include #endif #ifdef HAVE_LIBAIO_H -#include +# include #endif #if HAVE_LONG_LONG_OFF_T /* * Hacks for systems that have a long long off_t */ -#define flock64 flock /* Horrid hack */ -#define printflock printflock64 /* Horrider hack */ +# define flock64 flock /* Horrid hack */ +# define printflock printflock64 /* Horrider hack */ #endif static const struct xlat fcntlcmds[] = { diff --git a/errnoent.sh b/errnoent.sh index 3a709ae5..a82fc04c 100755 --- a/errnoent.sh +++ b/errnoent.sh @@ -23,8 +23,6 @@ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# $Id$ awk ' /^#define[ ]+E[A-Z0-9_]+[ ]+[0-9]+/ { diff --git a/file.c b/file.c index 3e3a857b..7d20a72b 100644 --- a/file.c +++ b/file.c @@ -26,22 +26,12 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - #include #include -struct kernel_dirent { - unsigned long d_ino; - unsigned long d_off; - unsigned short d_reclen; - char d_name[1]; -}; - #ifdef LINUXSPARC struct stat { unsigned short st_dev; @@ -92,7 +82,6 @@ struct stat_sparc64 { # undef gid_t # undef off_t # undef loff_t - # define dev_t __kernel_dev_t # define ino_t __kernel_ino_t # define mode_t __kernel_mode_t @@ -112,7 +101,6 @@ struct stat_sparc64 { # undef gid_t # undef off_t # undef loff_t - # define dev_t dev_t # define ino_t ino_t # define mode_t mode_t @@ -131,7 +119,7 @@ struct stat_sparc64 { #include #undef stat #undef stat64 - /* These might be macros. */ +/* These might be macros. */ #undef st_atime #undef st_mtime #undef st_ctime @@ -140,11 +128,9 @@ struct stat_sparc64 { #endif #include - #ifdef HAVE_SYS_VFS_H # include #endif - #ifdef HAVE_LINUX_XATTR_H # include #else @@ -152,23 +138,12 @@ struct stat_sparc64 { # define XATTR_REPLACE 2 #endif -#if _LFS64_LARGEFILE -# ifdef HAVE_INTTYPES_H -# include -# else -# define PRId64 "lld" -# define PRIu64 "llu" -# endif -#endif - #if HAVE_LONG_LONG_OFF_T /* * Ugly hacks for systems that have typedef long long off_t */ - # define stat64 stat # define HAVE_STAT64 1 /* Ugly hack */ - # define sys_stat64 sys_stat # define sys_fstat64 sys_fstat # define sys_lstat64 sys_lstat @@ -189,6 +164,13 @@ struct stat_sparc64 { # include #endif +struct kernel_dirent { + unsigned long d_ino; + unsigned long d_off; + unsigned short d_reclen; + char d_name[1]; +}; + const struct xlat open_access_modes[] = { { O_RDONLY, "O_RDONLY" }, { O_WRONLY, "O_WRONLY" }, diff --git a/io.c b/io.c index 9dd869a4..b483c493 100644 --- a/io.c +++ b/io.c @@ -26,15 +26,12 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - #include #if HAVE_SYS_UIO_H -#include +# include #endif int diff --git a/ioctl.c b/ioctl.c index 0ea6b2e5..630a335e 100644 --- a/ioctl.c +++ b/ioctl.c @@ -26,12 +26,9 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - #include static int diff --git a/ioctlsort.c b/ioctlsort.c index 50f47603..0e6608ea 100644 --- a/ioctlsort.c +++ b/ioctlsort.c @@ -24,14 +24,11 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include - #ifdef STDC_HEADERS -#include +# include #endif struct ioctlent { @@ -45,9 +42,7 @@ struct ioctlent { int nioctlents = sizeof ioctlent / sizeof ioctlent[0]; int -compare(a, b) -const void *a; -const void *b; +compare(const void *a, const void *b) { unsigned long code1 = ((struct ioctlent *) a)->code; unsigned long code2 = ((struct ioctlent *) b)->code; diff --git a/ipc.c b/ipc.c index 00dc9461..34e32a37 100644 --- a/ipc.c +++ b/ipc.c @@ -26,16 +26,12 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - -# ifdef HAVE_MQUEUE_H -# include -# endif - +#ifdef HAVE_MQUEUE_H +# include +#endif #include #include #include diff --git a/linux/alpha/syscallent.h b/linux/alpha/syscallent.h index 85c341a4..b50a48c5 100644 --- a/linux/alpha/syscallent.h +++ b/linux/alpha/syscallent.h @@ -24,8 +24,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ { 6, 0, printargs, "osf_syscall" }, /* 0, not implemented */ diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h index 6f16a807..a72c2ab7 100644 --- a/linux/arm/syscallent.h +++ b/linux/arm/syscallent.h @@ -24,8 +24,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 0 */ diff --git a/linux/avr32/syscallent.h b/linux/avr32/syscallent.h index baba008d..8320f9ae 100644 --- a/linux/avr32/syscallent.h +++ b/linux/avr32/syscallent.h @@ -23,8 +23,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ { 0, 0, sys_setup, "setup" }, /* 0 */ diff --git a/linux/bfin/syscallent.h b/linux/bfin/syscallent.h index 24f57c4a..2ea529ea 100644 --- a/linux/bfin/syscallent.h +++ b/linux/bfin/syscallent.h @@ -24,8 +24,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */ diff --git a/linux/dummy.h b/linux/dummy.h index 3c5f901a..d373cad8 100644 --- a/linux/dummy.h +++ b/linux/dummy.h @@ -24,8 +24,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ /* still unfinished */ diff --git a/linux/hppa/syscallent.h b/linux/hppa/syscallent.h index 851898aa..61febc69 100644 --- a/linux/hppa/syscallent.h +++ b/linux/hppa/syscallent.h @@ -1,8 +1,5 @@ /* * Copyright (c) 2001 Hewlett-Packard, Matthew Wilcox - * - * $Id$ - * */ { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */ diff --git a/linux/i386/syscallent.h b/linux/i386/syscallent.h index 77004473..8e797bd1 100644 --- a/linux/i386/syscallent.h +++ b/linux/i386/syscallent.h @@ -24,8 +24,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */ diff --git a/linux/ia64/syscallent.h b/linux/ia64/syscallent.h index 2cee60fa..a6b47fe0 100644 --- a/linux/ia64/syscallent.h +++ b/linux/ia64/syscallent.h @@ -24,8 +24,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ /* diff --git a/linux/ioctlent.sh b/linux/ioctlent.sh index 985deff6..9bcff5f8 100755 --- a/linux/ioctlent.sh +++ b/linux/ioctlent.sh @@ -1,5 +1,4 @@ #! /bin/sh -# # Copyright (c) 2001 Wichert Akkerman # All rights reserved. # @@ -24,9 +23,6 @@ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# $Id$ -# # Validate arg count. case $# in diff --git a/linux/m68k/syscallent.h b/linux/m68k/syscallent.h index 947937ad..5853eff3 100644 --- a/linux/m68k/syscallent.h +++ b/linux/m68k/syscallent.h @@ -24,8 +24,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */ diff --git a/linux/mips/ioctlent.sh b/linux/mips/ioctlent.sh index dd5fd9da..52d8df5b 100755 --- a/linux/mips/ioctlent.sh +++ b/linux/mips/ioctlent.sh @@ -26,8 +26,6 @@ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# $Id$ # Files to find. file_find='asm/*.h linux/*.h scsi/*.h' diff --git a/linux/powerpc/syscallent.h b/linux/powerpc/syscallent.h index b859cc32..e485b3a5 100644 --- a/linux/powerpc/syscallent.h +++ b/linux/powerpc/syscallent.h @@ -24,8 +24,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 0 */ diff --git a/linux/sh/syscallent.h b/linux/sh/syscallent.h index 9b068aa1..62234f9b 100644 --- a/linux/sh/syscallent.h +++ b/linux/sh/syscallent.h @@ -26,8 +26,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 0 */ diff --git a/linux/sh64/syscallent.h b/linux/sh64/syscallent.h index 4e50771f..69b9972d 100644 --- a/linux/sh64/syscallent.h +++ b/linux/sh64/syscallent.h @@ -24,8 +24,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ { 0, 0, sys_setup, "setup" }, /* 0 */ diff --git a/linux/sparc/dummy2.h b/linux/sparc/dummy2.h index 45275854..39552a27 100644 --- a/linux/sparc/dummy2.h +++ b/linux/sparc/dummy2.h @@ -23,8 +23,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ /* still unfinished */ diff --git a/linux/sparc/syscall1.h b/linux/sparc/syscall1.h index a4d7af33..6f30b742 100644 --- a/linux/sparc/syscall1.h +++ b/linux/sparc/syscall1.h @@ -23,8 +23,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #define SOLARIS_syscall 0 diff --git a/linux/sparc/syscallent1.h b/linux/sparc/syscallent1.h index ff3c4c41..3f11dd8e 100644 --- a/linux/sparc/syscallent1.h +++ b/linux/sparc/syscallent1.h @@ -23,8 +23,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ { 6, 0, solaris_syscall, "syscall" }, /* 0 */ diff --git a/linux/sparc64/dummy2.h b/linux/sparc64/dummy2.h index 45275854..39552a27 100644 --- a/linux/sparc64/dummy2.h +++ b/linux/sparc64/dummy2.h @@ -23,8 +23,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ /* still unfinished */ diff --git a/linux/sparc64/syscall1.h b/linux/sparc64/syscall1.h index a4d7af33..6f30b742 100644 --- a/linux/sparc64/syscall1.h +++ b/linux/sparc64/syscall1.h @@ -23,8 +23,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #define SOLARIS_syscall 0 diff --git a/linux/syscall.h b/linux/syscall.h index fb135661..5b47d8dd 100644 --- a/linux/syscall.h +++ b/linux/syscall.h @@ -24,8 +24,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "dummy.h" diff --git a/mem.c b/mem.c index 88b3a2b4..634b09d1 100644 --- a/mem.c +++ b/mem.c @@ -28,15 +28,11 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - #include #include - #if defined(I386) # include # ifdef HAVE_STRUCT_USER_DESC @@ -51,7 +47,7 @@ /* * Ugly hacks for systems that have a long long off_t */ -#define sys_mmap64 sys_mmap +# define sys_mmap64 sys_mmap #endif int diff --git a/net.c b/net.c index 8703b8be..5a79381b 100644 --- a/net.c +++ b/net.c @@ -26,81 +26,72 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - #include #include #include - #if defined(HAVE_SIN6_SCOPE_ID_LINUX) -#define in6_addr in6_addr_libc -#define ipv6_mreq ipv6_mreq_libc -#define sockaddr_in6 sockaddr_in6_libc +# define in6_addr in6_addr_libc +# define ipv6_mreq ipv6_mreq_libc +# define sockaddr_in6 sockaddr_in6_libc #endif - #include #ifdef HAVE_NETINET_TCP_H -#include +# include #endif #ifdef HAVE_NETINET_UDP_H -#include +# include #endif #ifdef HAVE_NETINET_SCTP_H -#include +# include #endif #include #include #include #if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC__ + __GLIBC_MINOR__ >= 3) -# include +# include #else -# include +# include #endif #if defined(__GLIBC__) && (((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1)) || defined(HAVE_SIN6_SCOPE_ID_LINUX)) -#if defined(HAVE_LINUX_IN6_H) -#if defined(HAVE_SIN6_SCOPE_ID_LINUX) -#undef in6_addr -#undef ipv6_mreq -#undef sockaddr_in6 -#define in6_addr in6_addr_kernel -#define ipv6_mreq ipv6_mreq_kernel -#define sockaddr_in6 sockaddr_in6_kernel -#endif -#include -#if defined(HAVE_SIN6_SCOPE_ID_LINUX) -#undef in6_addr -#undef ipv6_mreq -#undef sockaddr_in6 -#define in6_addr in6_addr_libc -#define ipv6_mreq ipv6_mreq_libc -#define sockaddr_in6 sockaddr_in6_kernel -#endif -#endif +# if defined(HAVE_LINUX_IN6_H) +# if defined(HAVE_SIN6_SCOPE_ID_LINUX) +# undef in6_addr +# undef ipv6_mreq +# undef sockaddr_in6 +# define in6_addr in6_addr_kernel +# define ipv6_mreq ipv6_mreq_kernel +# define sockaddr_in6 sockaddr_in6_kernel +# endif +# include +# if defined(HAVE_SIN6_SCOPE_ID_LINUX) +# undef in6_addr +# undef ipv6_mreq +# undef sockaddr_in6 +# define in6_addr in6_addr_libc +# define ipv6_mreq ipv6_mreq_libc +# define sockaddr_in6 sockaddr_in6_kernel +# endif +# endif #endif #if defined(HAVE_SYS_UIO_H) -#include +# include #endif - #if defined(HAVE_LINUX_NETLINK_H) -#include +# include #endif - #if defined(HAVE_LINUX_IF_PACKET_H) -#include +# include #endif - #if defined(HAVE_LINUX_ICMP_H) -#include +# include #endif - #ifndef PF_UNSPEC -#define PF_UNSPEC AF_UNSPEC +# define PF_UNSPEC AF_UNSPEC #endif /* Under Linux these are enums so we can't test for them with ifdef. */ diff --git a/pathtrace.c b/pathtrace.c index d50b268f..87d98278 100644 --- a/pathtrace.c +++ b/pathtrace.c @@ -27,14 +27,12 @@ */ #include "defs.h" - #include - #ifdef HAVE_POLL_H -#include +# include #endif #ifdef HAVE_SYS_POLL_H -#include +# include #endif #include "syscall.h" diff --git a/process.c b/process.c index 41179cd1..d4aa3524 100644 --- a/process.c +++ b/process.c @@ -8,7 +8,6 @@ * * Copyright (c) 2000 PocketPenguins Inc. Linux for Hitachi SuperH * port by Greg Banks - * * All rights reserved. * @@ -33,12 +32,9 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - #include #include #include @@ -448,40 +444,40 @@ static const struct xlat clone_flags[] = { { 0, NULL }, }; -# ifdef I386 -# include -# ifdef HAVE_STRUCT_USER_DESC -# define modify_ldt_ldt_s user_desc -# endif +#ifdef I386 +# include +# ifdef HAVE_STRUCT_USER_DESC +# define modify_ldt_ldt_s user_desc +# endif extern void print_ldt_entry(); -# endif +#endif -# if defined IA64 -# define ARG_FLAGS 0 -# define ARG_STACK 1 -# define ARG_STACKSIZE (tcp->scno == SYS_clone2 ? 2 : -1) -# define ARG_PTID (tcp->scno == SYS_clone2 ? 3 : 2) -# define ARG_CTID (tcp->scno == SYS_clone2 ? 4 : 3) -# define ARG_TLS (tcp->scno == SYS_clone2 ? 5 : 4) -# elif defined S390 || defined S390X || defined CRISV10 || defined CRISV32 -# define ARG_STACK 0 -# define ARG_FLAGS 1 -# define ARG_PTID 2 -# define ARG_CTID 3 -# define ARG_TLS 4 -# elif defined X86_64 || defined ALPHA -# define ARG_FLAGS 0 -# define ARG_STACK 1 -# define ARG_PTID 2 -# define ARG_CTID 3 -# define ARG_TLS 4 -# else -# define ARG_FLAGS 0 -# define ARG_STACK 1 -# define ARG_PTID 2 -# define ARG_TLS 3 -# define ARG_CTID 4 -# endif +#if defined IA64 +# define ARG_FLAGS 0 +# define ARG_STACK 1 +# define ARG_STACKSIZE (tcp->scno == SYS_clone2 ? 2 : -1) +# define ARG_PTID (tcp->scno == SYS_clone2 ? 3 : 2) +# define ARG_CTID (tcp->scno == SYS_clone2 ? 4 : 3) +# define ARG_TLS (tcp->scno == SYS_clone2 ? 5 : 4) +#elif defined S390 || defined S390X || defined CRISV10 || defined CRISV32 +# define ARG_STACK 0 +# define ARG_FLAGS 1 +# define ARG_PTID 2 +# define ARG_CTID 3 +# define ARG_TLS 4 +#elif defined X86_64 || defined ALPHA +# define ARG_FLAGS 0 +# define ARG_STACK 1 +# define ARG_PTID 2 +# define ARG_CTID 3 +# define ARG_TLS 4 +#else +# define ARG_FLAGS 0 +# define ARG_STACK 1 +# define ARG_PTID 2 +# define ARG_TLS 3 +# define ARG_CTID 4 +#endif int sys_clone(struct tcb *tcp) @@ -490,11 +486,11 @@ sys_clone(struct tcb *tcp) const char *sep = "|"; unsigned long flags = tcp->u_arg[ARG_FLAGS]; tprintf("child_stack=%#lx, ", tcp->u_arg[ARG_STACK]); -# ifdef ARG_STACKSIZE +#ifdef ARG_STACKSIZE if (ARG_STACKSIZE != -1) tprintf("stack_size=%#lx, ", tcp->u_arg[ARG_STACKSIZE]); -# endif +#endif tprints("flags="); if (!printflags(clone_flags, flags &~ CSIGNAL, NULL)) sep = ""; @@ -506,7 +502,7 @@ sys_clone(struct tcb *tcp) if (flags & CLONE_PARENT_SETTID) tprintf(", parent_tidptr=%#lx", tcp->u_arg[ARG_PTID]); if (flags & CLONE_SETTLS) { -# ifdef I386 +#ifdef I386 struct modify_ldt_ldt_s copy; if (umove(tcp, tcp->u_arg[ARG_TLS], ©) != -1) { tprintf(", {entry_number:%d, ", @@ -517,7 +513,7 @@ sys_clone(struct tcb *tcp) print_ldt_entry(©); } else -# endif +#endif tprintf(", tls=%#lx", tcp->u_arg[ARG_TLS]); } if (flags & (CLONE_CHILD_SETTID|CLONE_CHILD_CLEARTID)) @@ -2729,7 +2725,7 @@ sys_sched_rr_get_interval(struct tcb *tcp) } # ifdef X86_64 -# include +# include static const struct xlat archvals[] = { { ARCH_SET_GS, "ARCH_SET_GS" }, diff --git a/quota.c b/quota.c index 638beb60..a1fd92d3 100644 --- a/quota.c +++ b/quota.c @@ -27,14 +27,10 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" -#include - #define SUBCMDMASK 0x00ff #define SUBCMDSHIFT 8 #define QCMD_CMD(cmd) ((u_int32_t)(cmd) >> SUBCMDSHIFT) diff --git a/resource.c b/resource.c index f5cec215..631aa4a0 100644 --- a/resource.c +++ b/resource.c @@ -26,12 +26,9 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - #include #include #include @@ -40,15 +37,13 @@ /* * Hacks for systems that have a long long rlim_t */ - -#define rlimit64 rlimit /* Ugly hack */ -#define rlim64_t rlim_t /* Ugly hack */ -#ifndef RLIM64_INFINITY -#define RLIM64_INFINITY RLIM_INFINITY /* You guessed it */ -#endif - -#define sys_getrlimit64 sys_getrlimit -#define sys_setrlimit64 sys_setrlimit +# define rlimit64 rlimit /* Ugly hack */ +# define rlim64_t rlim_t /* Ugly hack */ +# ifndef RLIM64_INFINITY +# define RLIM64_INFINITY RLIM_INFINITY /* You guessed it */ +# endif +# define sys_getrlimit64 sys_getrlimit +# define sys_setrlimit64 sys_setrlimit #endif static const struct xlat resources[] = { diff --git a/scsi.c b/scsi.c index f0d4c2d7..682016e5 100644 --- a/scsi.c +++ b/scsi.c @@ -27,7 +27,6 @@ */ #include "defs.h" - #include #include diff --git a/signal.c b/signal.c index 8bff1465..7e620046 100644 --- a/signal.c +++ b/signal.c @@ -29,13 +29,9 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - -#include #include #include @@ -79,7 +75,7 @@ typedef struct { #elif defined HAVE_ASM_SIGCONTEXT_H # if !defined(IA64) && !defined(X86_64) # include -# endif /* !IA64 && !X86_64 */ +# endif #else /* !HAVE_ASM_SIGCONTEXT_H */ # if defined I386 && !defined HAVE_STRUCT_SIGCONTEXT_STRUCT struct sigcontext_struct { @@ -417,7 +413,6 @@ print_sigset(struct tcb *tcp, long addr, int rt) #define SI_SIGIO -5 /* sent by SIGIO */ #define SI_TKILL -6 /* sent by tkill */ #define SI_ASYNCNL -60 /* sent by asynch name lookup completion */ - #endif #ifndef SI_FROMUSER diff --git a/signalent.sh b/signalent.sh index 9a346ddb..62ae7862 100755 --- a/signalent.sh +++ b/signalent.sh @@ -23,8 +23,6 @@ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# $Id$ cat $* | sed -n -e 's/\/\*.*\*\// /' -e 's/^#[ ]*define[ ][ ]*SIG\([^_ ]*\)[ ][ ]*\([0-9][0-9]*\)[ ]*$/\1 \2/p' | diff --git a/sock.c b/sock.c index ec202238..9c6fe96e 100644 --- a/sock.c +++ b/sock.c @@ -23,18 +23,14 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - #include #include #include - #if defined(ALPHA) || defined(SH) || defined(SH64) -# ifdef HAVE_SYS_IOCTL_H +# if defined(HAVE_SYS_IOCTL_H) # include # elif defined(HAVE_IOCTLS_H) # include diff --git a/strace-graph b/strace-graph index 6a04ac2f..d57e7686 100755 --- a/strace-graph +++ b/strace-graph @@ -32,8 +32,6 @@ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# $Id$ my %unfinished; diff --git a/strace.1 b/strace.1 index bbb2de82..2790414f 100644 --- a/strace.1 +++ b/strace.1 @@ -24,9 +24,6 @@ .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.\" $Id$ -.\" .de CW .sp .nf diff --git a/strace.c b/strace.c index f452254e..6e22e8b0 100644 --- a/strace.c +++ b/strace.c @@ -26,12 +26,9 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - #include #include #include @@ -163,7 +160,7 @@ static volatile int interrupted; #if !HAVE_DECL_SYS_ERRLIST extern int sys_nerr; extern char *sys_errlist[]; -#endif /* HAVE_DECL_SYS_ERRLIST */ +#endif const char * strerror(int err_no) diff --git a/stream.c b/stream.c index c5d7f650..8656fc03 100644 --- a/stream.c +++ b/stream.c @@ -24,23 +24,20 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - #ifdef HAVE_POLL_H -#include +# include #endif #ifdef HAVE_SYS_POLL_H -#include +# include #endif #ifdef HAVE_STROPTS_H -#include +# include #endif #ifdef HAVE_SYS_CONF_H -#include +# include #endif #ifndef HAVE_STROPTS_H diff --git a/syscall.c b/syscall.c index 8eedb12e..015b35c8 100644 --- a/syscall.c +++ b/syscall.c @@ -29,12 +29,9 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - #include #include diff --git a/syscallent.sh b/syscallent.sh index 58107d5f..16dd77f6 100755 --- a/syscallent.sh +++ b/syscallent.sh @@ -23,8 +23,6 @@ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# $Id$ cat ${1+"$@"} | sed -n 's/^#[ ]*define[ ][ ]*SYS_\([^ ]*\)[ ]*[^0-9]*\([0-9]*\).*$/\1 \2/p diff --git a/system.c b/system.c index cf66b13e..a7764927 100644 --- a/system.c +++ b/system.c @@ -26,8 +26,6 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" @@ -67,24 +65,18 @@ #include #include #include - - #ifdef HAVE_LINUX_CAPABILITY_H -#include +# include #endif - #ifdef HAVE_ASM_CACHECTL_H -#include +# include #endif - #ifdef HAVE_LINUX_USTNAME_H -#include +# include #endif - #ifdef HAVE_ASM_SYSMIPS_H -#include +# include #endif - #include static const struct xlat mount_flags[] = { diff --git a/term.c b/term.c index 0e8bb132..7b7de740 100644 --- a/term.c +++ b/term.c @@ -23,20 +23,16 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - /* * The C library's definition of struct termios might differ from * the kernel one, and we need to use the kernel layout. */ #include - #ifdef HAVE_SYS_FILIO_H -#include +# include #endif static const struct xlat tcxonc_options[] = { diff --git a/test/Makefile b/test/Makefile index 8d2400cf..c6ce99cd 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,7 +1,3 @@ -# -# $Id$ -# - all: \ vfork fork sig skodic clone leaderkill childthread \ sigkill_rain wait_must_be_interruptible threaded_execve diff --git a/time.c b/time.c index 5662455d..52188082 100644 --- a/time.c +++ b/time.c @@ -25,12 +25,9 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - #include #include #include diff --git a/util.c b/util.c index 33e4288f..9173b48f 100644 --- a/util.c +++ b/util.c @@ -29,12 +29,9 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ */ #include "defs.h" - #include #include #include @@ -43,7 +40,7 @@ #endif #if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1) -#include +# include #endif #if defined(IA64) diff --git a/xlate.el b/xlate.el index cd083a1b..d1645e7e 100644 --- a/xlate.el +++ b/xlate.el @@ -22,8 +22,6 @@ ;; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ;; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -;; -;; $Id$ ;; Description: Automate the construction of strace xlat tables.