mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-28 16:43:09 +00:00
Made the kernel compile cleanly with gcc 2.6.0. Thanks go to Bruce
Evans for suggesting a method to detect various versions of gcc.
This commit is contained in:
parent
c501fb74cf
commit
0e42760866
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2059
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.50 1994/08/10 23:28:26 wollman Exp $
|
||||
* $Id: machdep.c,v 1.51 1994/08/13 03:49:42 wollman Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -669,7 +669,7 @@ void diediedie()
|
||||
int waittime = -1;
|
||||
struct pcb dumppcb;
|
||||
|
||||
void
|
||||
__dead void
|
||||
boot(arghowto)
|
||||
int arghowto;
|
||||
{
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.50 1994/08/10 23:28:26 wollman Exp $
|
||||
* $Id: machdep.c,v 1.51 1994/08/13 03:49:42 wollman Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -669,7 +669,7 @@ void diediedie()
|
||||
int waittime = -1;
|
||||
struct pcb dumppcb;
|
||||
|
||||
void
|
||||
__dead void
|
||||
boot(arghowto)
|
||||
int arghowto;
|
||||
{
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)subr_prf.c 8.3 (Berkeley) 1/21/94
|
||||
* $Id$
|
||||
* $Id: subr_prf.c,v 1.3 1994/08/02 07:42:30 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -92,8 +92,7 @@ const char *panicstr;
|
||||
* the disks as this often leads to recursive panics.
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
volatile void boot(int flags); /* boot() does not return */
|
||||
volatile /* panic() does not return */
|
||||
__dead /* panic() does not return */
|
||||
#endif
|
||||
void
|
||||
#ifdef __STDC__
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_nqlease.c 8.3 (Berkeley) 1/4/94
|
||||
* $Id$
|
||||
* $Id: nfs_nqlease.c,v 1.3 1994/08/02 07:52:08 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -389,8 +389,9 @@ nqsrv_instimeq(lp, duration)
|
||||
tlp = nqthead.th_chain[1];
|
||||
while (tlp->lc_expiry > newexpiry && tlp != (struct nqlease *)&nqthead)
|
||||
tlp = tlp->lc_chain1[1];
|
||||
if (tlp == nqthead.th_chain[1])
|
||||
if (tlp == nqthead.th_chain[1]) {
|
||||
NQSTORENOVRAM(newexpiry);
|
||||
}
|
||||
insque(lp, tlp);
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
* $Id$
|
||||
* $Id: cdefs.h,v 1.3 1994/08/02 07:52:41 davidg Exp $
|
||||
*/
|
||||
|
||||
#ifndef _CDEFS_H_
|
||||
@ -102,22 +102,28 @@
|
||||
* GCC1 and some versions of GCC2 declare dead (non-returning) and
|
||||
* pure (no side effects) functions using "volatile" and "const";
|
||||
* unfortunately, these then cause warnings under "-ansi -pedantic".
|
||||
* GCC2 uses a new, peculiar __attribute__((attrs)) style. All of
|
||||
* GCC2.5 uses a new, peculiar __attribute__((attrs)) style. All of
|
||||
* these work for GNU C++ (modulo a slight glitch in the C++ grammar
|
||||
* in the distribution version of 2.5.5).
|
||||
*/
|
||||
#if !defined(__GNUC__) || __GNUC__ < 2
|
||||
#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */
|
||||
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
#if __GNUC__ < 2
|
||||
#define __dead
|
||||
#define __dead2
|
||||
#define __pure
|
||||
#define __pure2
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
#if __GNUC__ == 2 && __GNUC_MINOR__ < 5
|
||||
#define __dead __volatile
|
||||
#define __dead2
|
||||
#define __pure __const
|
||||
#define __pure2
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Delete pseudo-keywords wherever they are not available or needed. */
|
||||
#ifndef __dead
|
||||
#define __dead
|
||||
#define __pure
|
||||
#if __GNUC__ == 2 && __GNUC_MINOR__ > 5 || __GNUC__ >= 3
|
||||
#define __dead
|
||||
#define __dead2 __attribute__((noreturn))
|
||||
#define __pure
|
||||
#define __pure2 __attribute__((noreturn))
|
||||
#endif
|
||||
|
||||
#endif /* !_CDEFS_H_ */
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)systm.h 8.4 (Berkeley) 2/23/94
|
||||
* $Id: systm.h,v 1.4 1994/08/04 06:15:10 davidg Exp $
|
||||
* $Id: systm.h,v 1.5 1994/08/05 09:28:55 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <machine/cpufunc.h>
|
||||
@ -113,9 +113,11 @@ int seltrue __P((dev_t dev, int which, struct proc *p));
|
||||
void *hashinit __P((int count, int type, u_long *hashmask));
|
||||
|
||||
#ifdef __GNUC__
|
||||
volatile void panic __P((const char *, ...));
|
||||
__dead void panic __P((const char *, ...)) __dead2;
|
||||
__dead void boot __P((int)) __dead2;
|
||||
#else
|
||||
void panic __P((const char *, ...));
|
||||
void boot __P((int));
|
||||
#endif
|
||||
void tablefull __P((const char *));
|
||||
void addlog __P((const char *, ...));
|
||||
|
Loading…
Reference in New Issue
Block a user