diff options
| author | christos <christos@NetBSD.org> | 2009-01-11 19:09:29 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2009-01-11 19:09:29 +0000 |
| commit | 7fc37d6329a8e366bcf16766c913d768751de18e (patch) | |
| tree | d2324984a9e254554609216b616a2465701a9a03 /include | |
| parent | 345fb25dfd1088db8bcfb765fdd9c0b0224cac7e (diff) | |
don't do size computations because g++ does not like it.
Diffstat (limited to 'include')
| -rw-r--r-- | include/utmpx.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/utmpx.h b/include/utmpx.h index 2f5406f9a41..2217f471b4e 100644 --- a/include/utmpx.h +++ b/include/utmpx.h @@ -1,4 +1,4 @@ -/* $NetBSD: utmpx.h,v 1.16 2009/01/11 03:04:12 christos Exp $ */ +/* $NetBSD: utmpx.h,v 1.17 2009/01/11 19:09:29 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -88,8 +88,18 @@ #define ut_user ut_name #define ut_xtime ut_tv.tv_sec -#define _UTX_PADSIZE (40 - \ - (sizeof(struct timeval) - sizeof(struct { long s; long u; }))) +/* + * This should be: + * 40 - (sizeof(struct timeval) - sizeof(struct { long s; long u; }))) + * but g++ does not like it, to retain size compatibility with v1.00, + * so we do it manually. + */ +#ifdef _LP64 +#define _UTX_PADSIZE 36 +#else +#define _UTX_PADSIZE 40 +#endif + struct utmpx { char ut_name[_UTX_USERSIZE]; /* login name */ char ut_id[_UTX_IDSIZE]; /* inittab id */ |
