Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Workaround for gcc 2.95.3 failing to initialize structures



details:   https://anonhg.NetBSD.org/src/rev/468a2b157429
branches:  trunk
changeset: 566595:468a2b157429
user:      cl <cl%NetBSD.org@localhost>
date:      Thu May 13 15:44:04 2004 +0000

description:
Workaround for gcc 2.95.3 failing to initialize structures
and/or unions inside structures using nested designators.
Should be reverted when gcc >=3.3.3 is ready for vax.

diffstat:

 doc/HACKS                        |  11 ++++++++++-
 sys/miscfs/kernfs/kernfs_vnops.c |   8 ++++----
 2 files changed, 14 insertions(+), 5 deletions(-)

diffs (57 lines):

diff -r 9579c6cd79be -r 468a2b157429 doc/HACKS
--- a/doc/HACKS Thu May 13 15:25:58 2004 +0000
+++ b/doc/HACKS Thu May 13 15:44:04 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.33 2004/04/26 09:17:16 uwe Exp $
+# $NetBSD: HACKS,v 1.34 2004/05/13 15:44:04 cl Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -149,6 +149,15 @@
                reverted when gcc 3.3.2 is ready for vax.
        kcah
 
+       hack    vax gcc 2.95.3 structure initialization
+       cdat    13 May 2004
+       who     cl
+       file    sys/miscfs/kernfs/kernfs_vnops.c : 1.104
+       descr
+               Workaround for gcc 2.95.3 failing to initialize structures
+               and/or unions inside structures using nested designators.
+               Should be reverted when gcc >=3.3.3 is ready for vax.
+       kcah
 
 port   sparc64
 
diff -r 9579c6cd79be -r 468a2b157429 sys/miscfs/kernfs/kernfs_vnops.c
--- a/sys/miscfs/kernfs/kernfs_vnops.c  Thu May 13 15:25:58 2004 +0000
+++ b/sys/miscfs/kernfs/kernfs_vnops.c  Thu May 13 15:44:04 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kernfs_vnops.c,v 1.103 2004/05/12 02:07:37 jrf Exp $   */
+/*     $NetBSD: kernfs_vnops.c,v 1.104 2004/05/13 15:44:04 cl Exp $    */
 
 /*
  * Copyright (c) 1992, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.103 2004/05/12 02:07:37 jrf Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kernfs_vnops.c,v 1.104 2004/05/13 15:44:04 cl Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ipsec.h"
@@ -162,11 +162,11 @@
   { .kf_fileop = KERNFS_XWRITE },
   { .kf_fileop = KERNFS_FILEOP_OPEN },
   { .kf_fileop = KERNFS_FILEOP_GETATTR,
-    .kf_vop = kernfs_default_fileop_getattr },
+    .kf_genop = {kernfs_default_fileop_getattr} },
   { .kf_fileop = KERNFS_FILEOP_IOCTL },
   { .kf_fileop = KERNFS_FILEOP_MMAP },
   { .kf_fileop = KERNFS_FILEOP_CLOSE },
-  { .kf_fileop = KERNFS_FILEOP_WRITE, .kf_vop = kernfs_default_xwrite },
+  { .kf_fileop = KERNFS_FILEOP_WRITE, .kf_genop = {kernfs_default_xwrite} },
 };
 
 int    kernfs_lookup   __P((void *));



Home | Main Index | Thread Index | Old Index