public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: target/1538: cannot compile with #include <sys/varargs.h>
@ 2002-03-29  1:06 Richard Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2002-03-29  1:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR target/1538; it has been noted by GNATS.

From: Richard Henderson <rth@redhat.com>
To: "Garrett D'Amore" <garrett@damore.org>
Cc: rth@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
   nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: Re: target/1538: cannot compile with #include <sys/varargs.h>
Date: Fri, 29 Mar 2002 01:00:22 -0800

 On Fri, Mar 29, 2002 at 12:37:30AM -0800, Garrett D'Amore wrote:
 > The "standard" to which you refer is for *USERLAND* code only.  When you
 > compile kernel code for Solaris, you are not supposed to use this header
 > since it might introduce other (conflicting) symbols.  The Solaris DDI
 > specifies the use of <sys/varargs.h> for builing devices drivers and other
 > kernel code.
 
 That certainly was not clear to me from your report.  It certainly
 looked like someone being fresh with the internals of Solaris varargs.
 
 > It would be very nice if gcc knew that on Solaris <sys/varargs.h> is
 > basically the same as <stdarg.h> and fixincludes automagically took care
 > of this.  Which is why I filed the request.
 
 Ok.  If you're still interested, please try the following vs
 a gcc 3.1 snapshot.
 
 
 r~
 
 
 	* fixinc/inclhack.def (solaris_sys_varargs_h): New.
 	* fixinc/fixincl.x: Regenerate.
 
 Index: fixincl.x
 ===================================================================
 RCS file: /cvs/gcc/gcc/gcc/fixinc/fixincl.x,v
 retrieving revision 1.119
 diff -c -p -d -r1.119 fixincl.x
 *** fixincl.x	2002/03/22 02:24:51	1.119
 --- fixincl.x	2002/03/29 08:57:49
 ***************
 *** 5,11 ****
    * files which are fixed to work correctly with ANSI C and placed in a
    * directory that GNU C will search.
    *
 !  * This file contains 140 fixup descriptions.
    *
    * See README for more information.
    *
 --- 5,11 ----
    * files which are fixed to work correctly with ANSI C and placed in a
    * directory that GNU C will search.
    *
 !  * This file contains 141 fixup descriptions.
    *
    * See README for more information.
    *
 *************** static const char* apzSolaris_Stdio_TagP
 *** 3696,3701 ****
 --- 3696,3729 ----
   
   /* * * * * * * * * * * * * * * * * * * * * * * * * *
    *
 +  *  Description of Solaris_Sys_Varargs_H fix
 +  */
 + tSCC zSolaris_Sys_Varargs_HName[] =
 +      "solaris_sys_varargs_h";
 + 
 + /*
 +  *  File name selection pattern
 +  */
 + tSCC zSolaris_Sys_Varargs_HList[] =
 +   "|sys/varargs.h|";
 + /*
 +  *  Machine/OS name selection pattern
 +  */
 + tSCC* apzSolaris_Sys_Varargs_HMachs[] = {
 +         "*-*-solaris*",
 +         (const char*)NULL };
 + #define SOLARIS_SYS_VARARGS_H_TEST_CT  0
 + #define aSolaris_Sys_Varargs_HTests   (tTestDesc*)NULL
 + 
 + /*
 +  *  Fix Command Arguments for Solaris_Sys_Varargs_H
 +  */
 + static const char* apzSolaris_Sys_Varargs_HPatch[] = {
 + "#include <stdarg.h>",
 +     (char*)NULL };
 + 
 + /* * * * * * * * * * * * * * * * * * * * * * * * * *
 +  *
    *  Description of Statsswtch fix
    */
   tSCC zStatsswtchName[] =
 *************** static const char* apzX11_SprintfPatch[]
 *** 5506,5512 ****
    */
   #define REGEX_COUNT          149
   #define MACH_LIST_SIZE_LIMIT 279
 ! #define FIX_COUNT            140
   
   /*
    *  Enumerate the fixes
 --- 5534,5540 ----
    */
   #define REGEX_COUNT          149
   #define MACH_LIST_SIZE_LIMIT 279
 ! #define FIX_COUNT            141
   
   /*
    *  Enumerate the fixes
 *************** typedef enum {
 *** 5605,5610 ****
 --- 5633,5639 ----
       SCO_UTIME_FIXIDX,
       SOLARIS_MUTEX_INIT_FIXIDX,
       SOLARIS_STDIO_TAG_FIXIDX,
 +     SOLARIS_SYS_VARARGS_H_FIXIDX,
       STATSSWTCH_FIXIDX,
       STDIO_STDARG_H_FIXIDX,
       STDIO_VA_LIST_FIXIDX,
 *************** tFixDesc fixDescList[ FIX_COUNT ] = {
 *** 6119,6124 ****
 --- 6148,6158 ----
        apzSolaris_Stdio_TagMachs,
        SOLARIS_STDIO_TAG_TEST_CT, FD_MACH_ONLY,
        aSolaris_Stdio_TagTests,   apzSolaris_Stdio_TagPatch, 0 },
 + 
 +   {  zSolaris_Sys_Varargs_HName,    zSolaris_Sys_Varargs_HList,
 +      apzSolaris_Sys_Varargs_HMachs,
 +      SOLARIS_SYS_VARARGS_H_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
 +      aSolaris_Sys_Varargs_HTests,   apzSolaris_Sys_Varargs_HPatch, 0 },
   
     {  zStatsswtchName,    zStatsswtchList,
        apzStatsswtchMachs,
 Index: inclhack.def
 ===================================================================
 RCS file: /cvs/gcc/gcc/gcc/fixinc/inclhack.def,v
 retrieving revision 1.122
 diff -c -p -d -r1.122 inclhack.def
 *** inclhack.def	2002/03/22 02:24:52	1.122
 --- inclhack.def	2002/03/29 08:57:49
 *************** fix = {
 *** 2077,2082 ****
 --- 2077,2094 ----
   
   
   /*
 +  * Solaris <sys/varargs.h> is a DDK (aka kernel-land) header providing
 +  * the same interface as <stdarg.h>.  No idea why they couldn't have just
 +  * used the standard header.
 +  */
 + fix = {
 +     hackname = solaris_sys_varargs_h;
 +     files    = "sys/varargs.h";
 +     mach     = '*-*-solaris*';
 +     replace  = "#include <stdarg.h>";
 + };
 + 
 + /*
    *  Sony NEWSOS 5.0 does not support the complete ANSI C standard.
    */
   #ifdef SONY


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: target/1538: cannot compile with #include <sys/varargs.h>
@ 2002-04-01 17:47 rth
  0 siblings, 0 replies; 5+ messages in thread
From: rth @ 2002-04-01 17:47 UTC (permalink / raw)
  To: garrett, gcc-bugs, gcc-prs, nobody, rth

Synopsis: cannot compile with #include <sys/varargs.h>

Responsible-Changed-From-To: unassigned->rth
Responsible-Changed-By: rth
Responsible-Changed-When: Mon Apr  1 17:47:11 2002
Responsible-Changed-Why:
    .
State-Changed-From-To: feedback->closed
State-Changed-By: rth
State-Changed-When: Mon Apr  1 17:47:11 2002
State-Changed-Why:
    http://gcc.gnu.org/ml/gcc-patches/2002-04/msg00032.html

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=1538


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: target/1538: cannot compile with #include <sys/varargs.h>
@ 2002-03-29  1:06 rth
  0 siblings, 0 replies; 5+ messages in thread
From: rth @ 2002-03-29  1:06 UTC (permalink / raw)
  To: garrett, gcc-bugs, gcc-prs, nobody

Synopsis: cannot compile with #include <sys/varargs.h>

State-Changed-From-To: closed->feedback
State-Changed-By: rth
State-Changed-When: Fri Mar 29 01:06:45 2002
State-Changed-Why:
    Patch sent.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=1538


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: target/1538: cannot compile with #include <sys/varargs.h>
@ 2002-03-29  0:46 Garrett D'Amore
  0 siblings, 0 replies; 5+ messages in thread
From: Garrett D'Amore @ 2002-03-29  0:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR target/1538; it has been noted by GNATS.

From: "Garrett D'Amore" <garrett@damore.org>
To: rth@gcc.gnu.org, garrett@damore.org, gcc-bugs@gcc.gnu.org,
   gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc: garrett@damore.org
Subject: Re: target/1538: cannot compile with #include <sys/varargs.h> 
Date: Fri, 29 Mar 2002 00:37:30 -0800

 The "standard" to which you refer is for *USERLAND* code only.  When you
 compile kernel code for Solaris, you are not supposed to use this header
 since it might introduce other (conflicting) symbols.  The Solaris DDI
 specifies the use of <sys/varargs.h> for builing devices drivers and other
 kernel code.
 
 It would be very nice if gcc knew that on Solaris <sys/varargs.h> is
 basically the same as <stdarg.h> and fixincludes automagically took care
 of this.  Which is why I filed the request.
 
 I don't consider the item "closed" in the sense that it is resolved.
 It may be that the gcc team isn't interested in assisting Solaris kernel
 developers -- but the answer "use the standard" is wrong -- the "standard"
 simply doesn't apply here (i.e. to the Solaris kernel).
 
 	-- Garrett
 
 > Synopsis: cannot compile with #include <sys/varargs.h>
 > 
 > State-Changed-From-To: open->closed
 > State-Changed-By: rth
 > State-Changed-When: Thu Mar 28 23:59:24 2002
 > State-Changed-Why:
 >     Use <stdarg.h> which is what the standard specifies.
 > 
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr
 > =1538


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: target/1538: cannot compile with #include <sys/varargs.h>
@ 2002-03-28 23:59 rth
  0 siblings, 0 replies; 5+ messages in thread
From: rth @ 2002-03-28 23:59 UTC (permalink / raw)
  To: garrett, gcc-bugs, gcc-prs, nobody

Synopsis: cannot compile with #include <sys/varargs.h>

State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Thu Mar 28 23:59:24 2002
State-Changed-Why:
    Use <stdarg.h> which is what the standard specifies.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=1538


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-04-02  1:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-29  1:06 target/1538: cannot compile with #include <sys/varargs.h> Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2002-04-01 17:47 rth
2002-03-29  1:06 rth
2002-03-29  0:46 Garrett D'Amore
2002-03-28 23:59 rth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).