From ff03969003f46d96286e6439be30b09abca28214 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 21 Dec 1995 15:04:16 +0000 Subject: from netbsd; use __attribute__((packed)) if it is available --- sys/arch/i386/include/segments.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sys/arch/i386/include') diff --git a/sys/arch/i386/include/segments.h b/sys/arch/i386/include/segments.h index a8fbb02c993..a33824797cd 100644 --- a/sys/arch/i386/include/segments.h +++ b/sys/arch/i386/include/segments.h @@ -1,4 +1,4 @@ -/* $NetBSD: segments.h,v 1.20 1995/10/12 17:57:01 mycroft Exp $ */ +/* $NetBSD: segments.h,v 1.22 1995/12/20 18:09:24 mycroft Exp $ */ /*- * Copyright (c) 1995 Charles M. Hannum. All rights reserved. @@ -72,7 +72,7 @@ #ifndef LOCORE -#if __GNUC__ >= 2 +#if __GNUC__ == 2 && __GNUC_MINOR__ < 7 #pragma pack(1) #endif @@ -90,7 +90,7 @@ struct segment_descriptor { unsigned sd_def32:1; /* default 32 vs 16 bit size */ unsigned sd_gran:1; /* limit granularity (byte/page) */ unsigned sd_hibase:8; /* segment base address (msb) */ -}; +} __attribute__((packed)); /* * Gate descriptors (e.g. indirect descriptors) @@ -104,7 +104,7 @@ struct gate_descriptor { unsigned gd_dpl:2; /* segment descriptor priority level */ unsigned gd_p:1; /* segment descriptor present */ unsigned gd_hioffset:16; /* gate offset (msb) */ -}; +} __attribute__((packed)); /* * Generic descriptor @@ -112,7 +112,7 @@ struct gate_descriptor { union descriptor { struct segment_descriptor sd; struct gate_descriptor gd; -}; +} __attribute__((packed)); /* * region descriptors, used to load gdt/idt tables before segments yet exist. @@ -120,9 +120,9 @@ union descriptor { struct region_descriptor { unsigned rd_limit:16; /* segment extent */ unsigned rd_base:32; /* base address */ -}; +} __attribute__((packed)); -#if __GNUC__ >= 2 +#if __GNUC__ == 2 && __GNUC_MINOR__ < 7 #pragma pack(4) #endif -- cgit v1.2.3