diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-12-10 01:30:15 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-12-10 01:30:15 +0000 |
commit | f26da235e6a0ca2106e5ff5799c3bb5ad2b99df0 (patch) | |
tree | 3ecc163b28c5e40d2d2210c4ed75fdb7c8c6db5d | |
parent | d9b6f40b70fb5c0404562bc91caf51be5bc9002b (diff) |
in ansi c, bitfields must be done against int, unsigned int, or _Bool.
so we must start to use u_int; ok cloder
-rw-r--r-- | sys/netinet/in_pcb.h | 4 | ||||
-rw-r--r-- | sys/netinet/ip.h | 10 | ||||
-rw-r--r-- | sys/netinet/ip_carp.h | 6 | ||||
-rw-r--r-- | sys/netinet/tcp.h | 6 | ||||
-rw-r--r-- | sys/netinet6/pim6.h | 6 | ||||
-rw-r--r-- | sys/scsi/scsi_scanner.h | 22 | ||||
-rw-r--r-- | sys/sys/cdio.h | 58 |
7 files changed, 56 insertions, 56 deletions
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index eda8ddba5aa..e6a12d0c55e 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in_pcb.h,v 1.51 2004/08/10 20:12:15 markus Exp $ */ +/* $OpenBSD: in_pcb.h,v 1.52 2005/12/10 01:30:14 deraadt Exp $ */ /* $NetBSD: in_pcb.h,v 1.14 1996/02/13 23:42:00 christos Exp $ */ /* @@ -127,7 +127,7 @@ struct inpcb { #define SL_ESP_TRANS 1 /* ESP transport level */ #define SL_ESP_NETWORK 2 /* ESP network (encapsulation) level */ #define SL_IPCOMP 3 /* Compression level */ - u_int8_t inp_secrequire:4, /* Condensed State from above */ + u_int inp_secrequire:4, /* Condensed State from above */ inp_secresult:4; /* Result from Key Management */ #define SR_FAILED 1 /* Negotiation failed permanently */ #define SR_SUCCESS 2 /* SA successfully established */ diff --git a/sys/netinet/ip.h b/sys/netinet/ip.h index 3de41a69c25..2d50aea2419 100644 --- a/sys/netinet/ip.h +++ b/sys/netinet/ip.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip.h,v 1.10 2003/06/02 23:28:14 millert Exp $ */ +/* $OpenBSD: ip.h,v 1.11 2005/12/10 01:30:14 deraadt Exp $ */ /* $NetBSD: ip.h,v 1.9 1995/05/15 01:22:44 cgd Exp $ */ /* @@ -46,11 +46,11 @@ */ struct ip { #if BYTE_ORDER == LITTLE_ENDIAN - u_int8_t ip_hl:4, /* header length */ + u_int ip_hl:4, /* header length */ ip_v:4; /* version */ #endif #if BYTE_ORDER == BIG_ENDIAN - u_int8_t ip_v:4, /* version */ + u_int ip_v:4, /* version */ ip_hl:4; /* header length */ #endif u_int8_t ip_tos; /* type of service */ @@ -142,11 +142,11 @@ struct ip_timestamp { u_int8_t ipt_len; /* size of structure (variable) */ u_int8_t ipt_ptr; /* index of current entry */ #if BYTE_ORDER == LITTLE_ENDIAN - u_int8_t ipt_flg:4, /* flags, see below */ + u_int ipt_flg:4, /* flags, see below */ ipt_oflw:4; /* overflow counter */ #endif #if BYTE_ORDER == BIG_ENDIAN - u_int8_t ipt_oflw:4, /* overflow counter */ + u_int ipt_oflw:4, /* overflow counter */ ipt_flg:4; /* flags, see below */ #endif union ipt_timestamp { diff --git a/sys/netinet/ip_carp.h b/sys/netinet/ip_carp.h index a16981fec41..34c9f79020b 100644 --- a/sys/netinet/ip_carp.h +++ b/sys/netinet/ip_carp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.h,v 1.18 2005/04/20 23:00:41 mpf Exp $ */ +/* $OpenBSD: ip_carp.h,v 1.19 2005/12/10 01:30:14 deraadt Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -58,11 +58,11 @@ struct carp_header { #if BYTE_ORDER == LITTLE_ENDIAN - u_int8_t carp_type:4, + u_int carp_type:4, carp_version:4; #endif #if BYTE_ORDER == BIG_ENDIAN - u_int8_t carp_version:4, + u_int carp_version:4, carp_type:4; #endif u_int8_t carp_vhid; /* virtual host id */ diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h index 22e836e957c..bc2f224928f 100644 --- a/sys/netinet/tcp.h +++ b/sys/netinet/tcp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp.h,v 1.15 2004/02/10 10:30:24 markus Exp $ */ +/* $OpenBSD: tcp.h,v 1.16 2005/12/10 01:30:14 deraadt Exp $ */ /* $NetBSD: tcp.h,v 1.8 1995/04/17 05:32:58 cgd Exp $ */ /* @@ -47,11 +47,11 @@ struct tcphdr { tcp_seq th_seq; /* sequence number */ tcp_seq th_ack; /* acknowledgement number */ #if BYTE_ORDER == LITTLE_ENDIAN - u_int8_t th_x2:4, /* (unused) */ + u_int th_x2:4, /* (unused) */ th_off:4; /* data offset */ #endif #if BYTE_ORDER == BIG_ENDIAN - u_int8_t th_off:4, /* data offset */ + u_int th_off:4, /* data offset */ th_x2:4; /* (unused) */ #endif u_int8_t th_flags; diff --git a/sys/netinet6/pim6.h b/sys/netinet6/pim6.h index 41d5f4cffb5..d8cd61a3063 100644 --- a/sys/netinet6/pim6.h +++ b/sys/netinet6/pim6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pim6.h,v 1.2 2001/02/16 08:48:06 itojun Exp $ */ +/* $OpenBSD: pim6.h,v 1.3 2005/12/10 01:30:14 deraadt Exp $ */ /* $KAME: pim6.h,v 1.3 2000/03/25 07:23:58 sumikawa Exp $ */ /* @@ -43,14 +43,14 @@ #define PIM_VERSION 2 struct pim { #if defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN) - u_char pim_type:4, /* the PIM message type, currently they are: + u_int pim_type:4, /* the PIM message type, currently they are: * Hello, Register, Register-Stop, Join/Prune, * Bootstrap, Assert, Graft (PIM-DM only), * Graft-Ack (PIM-DM only), C-RP-Adv */ pim_ver:4; /* PIM version number; 2 for PIMv2 */ #else - u_char pim_ver:4, /* PIM version */ + u_int pim_ver:4, /* PIM version */ pim_type:4; /* PIM type */ #endif u_char pim_rsv; /* Reserved */ diff --git a/sys/scsi/scsi_scanner.h b/sys/scsi/scsi_scanner.h index 853adc38c8c..d1ed7d7cd64 100644 --- a/sys/scsi/scsi_scanner.h +++ b/sys/scsi/scsi_scanner.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_scanner.h,v 1.9 2001/06/22 14:35:43 deraadt Exp $ */ +/* $OpenBSD: scsi_scanner.h,v 1.10 2005/12/10 01:30:13 deraadt Exp $ */ /* * Copyright (c) 1995 Kenneth Stailey. All rights reserved. @@ -47,8 +47,8 @@ struct scsi_r_scanner { #define READ_BIG 0x28 u_int8_t opcode; - u_int8_t lun:3; - u_int8_t res1:5; + u_int lun:3; + u_int res1:5; u_int8_t code; u_int8_t res2; u_int8_t qualifier; @@ -59,9 +59,9 @@ struct scsi_r_scanner { struct scsi_get_buffer_status { #define GET_BUFFER_STATUS 0x34 u_int8_t opcode; - u_int8_t lun:3; - u_int8_t res1:4; - u_int8_t wait:1; + u_int lun:3; + u_int res1:4; + u_int wait:1; u_int8_t res2[5]; u_int8_t len[2]; u_int8_t control; @@ -103,8 +103,8 @@ struct scsi_window_data { u_int8_t reserved[6]; /* window header */ u_int8_t window_desc_len[2]; /* ditto */ u_int8_t window_id; /* must be zero */ - u_int8_t res1:7; - u_int8_t auto_bit:1; + u_int res1:7; + u_int auto_bit:1; u_int8_t x_res[2]; u_int8_t y_res[2]; u_int8_t x_org[4]; @@ -117,9 +117,9 @@ struct scsi_window_data { u_int8_t image_comp; /* image composition (data type) */ u_int8_t bits_per_pixel; u_int8_t halftone_pattern[2]; - u_int8_t rif:1; /* reverse image format (mono negative) */ - u_int8_t res2:4; - u_int8_t pad_type:3; + u_int rif:1; /* reverse image format (mono negative) */ + u_int res2:4; + u_int pad_type:3; u_int8_t bit_ordering[2]; u_int8_t compression_type; u_int8_t compression_arg; diff --git a/sys/sys/cdio.h b/sys/sys/cdio.h index 971ede2b482..f77c97f2fa1 100644 --- a/sys/sys/cdio.h +++ b/sys/sys/cdio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cdio.h,v 1.12 2002/10/17 17:11:12 mickey Exp $ */ +/* $OpenBSD: cdio.h,v 1.13 2005/12/10 01:30:14 deraadt Exp $ */ /* $NetBSD: cdio.h,v 1.11 1996/02/19 18:29:04 scottr Exp $ */ #ifndef _SYS_CDIO_H_ @@ -23,12 +23,12 @@ union msf_lba { struct cd_toc_entry { u_char nothing1; #if BYTE_ORDER == LITTLE_ENDIAN - u_char control:4; - u_char addr_type:4; + u_int control:4; + u_int addr_type:4; #endif #if BYTE_ORDER == BIG_ENDIAN - u_char addr_type:4; - u_char control:4; + u_int addr_type:4; + u_int control:4; #endif u_char track; u_char nothing2; @@ -50,33 +50,33 @@ struct cd_sub_channel_header { struct cd_sub_channel_q_data { u_char data_format; #if BYTE_ORDER == LITTLE_ENDIAN - u_char control:4; - u_char addr_type:4; + u_int control:4; + u_int addr_type:4; #endif #if BYTE_ORDER == BIG_ENDIAN - u_char addr_type:4; - u_char control:4; + u_int addr_type:4; + u_int control:4; #endif u_char track_number; u_char index_number; u_char absaddr[4]; u_char reladdr[4]; #if BYTE_ORDER == LITTLE_ENDIAN - u_char :7; - u_char mc_valid:1; + u_int :7; + u_int mc_valid:1; #endif #if BYTE_ORDER == BIG_ENDIAN - u_char mc_valid:1; - u_char :7; + u_int mc_valid:1; + u_int :7; #endif u_char mc_number[15]; #if BYTE_ORDER == LITTLE_ENDIAN - u_char :7; - u_char ti_valid:1; + u_int :7; + u_int ti_valid:1; #endif #if BYTE_ORDER == BIG_ENDIAN - u_char ti_valid:1; - u_char :7; + u_int ti_valid:1; + u_int :7; #endif u_char ti_number[15]; }; @@ -84,12 +84,12 @@ struct cd_sub_channel_q_data { struct cd_sub_channel_position_data { u_char data_format; #if BYTE_ORDER == LITTLE_ENDIAN - u_char control:4; - u_char addr_type:4; + u_int control:4; + u_int addr_type:4; #endif #if BYTE_ORDER == BIG_ENDIAN - u_char addr_type:4; - u_char control:4; + u_int addr_type:4; + u_int control:4; #endif u_char track_number; u_char index_number; @@ -103,12 +103,12 @@ struct cd_sub_channel_media_catalog { u_char nothing2; u_char nothing3; #if BYTE_ORDER == LITTLE_ENDIAN - u_char :7; - u_char mc_valid:1; + u_int :7; + u_int mc_valid:1; #endif #if BYTE_ORDER == BIG_ENDIAN - u_char mc_valid:1; - u_char :7; + u_int mc_valid:1; + u_int :7; #endif u_char mc_number[15]; }; @@ -119,12 +119,12 @@ struct cd_sub_channel_track_info { u_char track_number; u_char nothing2; #if BYTE_ORDER == LITTLE_ENDIAN - u_char :7; - u_char ti_valid:1; + u_int :7; + u_int ti_valid:1; #endif #if BYTE_ORDER == BIG_ENDIAN - u_char ti_valid:1; - u_char :7; + u_int ti_valid:1; + u_int :7; #endif u_char ti_number[15]; }; |