public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* swsusp: fix compilation for other architectures
@ 2002-05-27 17:21 Pavel Machek
  2002-05-28  5:33 ` David Weinehall
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2002-05-27 17:21 UTC (permalink / raw)
  To: torvalds, kernel list

Hi!

Currently, on machine where suspend is not yet supported, compilation
fails even in case user did not actually requested suspend. This
"fixes" it -- compilation only fails when suspend is needed and not
supported. Please apply,
								Pavel

--- clean/include/asm-i386/suspend.h	Sun May 26 19:32:03 2002
+++ linux-swsusp/include/asm-i386/suspend.h	Mon May 27 19:11:25 2002
@@ -1,13 +1,8 @@
-#ifndef __ASM_I386_SUSPEND_H
-#define __ASM_I386_SUSPEND_H
-#endif
-
 /*
  * Copyright 2001-2002 Pavel Machek <pavel@suse.cz>
  * Based on code
  * Copyright 2001 Patrick Mochel <mochel@osdl.org>
  */
-#if defined(SUSPEND_C) || defined(ACPI_C)
 #include <asm/desc.h>
 #include <asm/i387.h>
 
@@ -225,7 +220,6 @@
 	do_fpu_end();
 }
 
-#endif
 #ifdef SUSPEND_C
 /* Local variables for do_magic */
 static int loop __nosavedata = 0;
--- clean/include/linux/suspend.h	Sun May 26 19:32:04 2002
+++ linux-swsusp/include/linux/suspend.h	Mon May 27 19:11:45 2002
@@ -1,7 +1,9 @@
 #ifndef _LINUX_SWSUSP_H
 #define _LINUX_SWSUSP_H
 
+#if defined(SUSPEND_C) || defined(ACPI_C)
 #include <asm/suspend.h>
+#endif
 #include <linux/swap.h>
 #include <linux/notifier.h>
 #include <linux/config.h>

-- 
(about SSSCA) "I don't say this lightly.  However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa

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

* Re: swsusp: fix compilation for other architectures
  2002-05-27 17:21 swsusp: fix compilation for other architectures Pavel Machek
@ 2002-05-28  5:33 ` David Weinehall
  2002-05-28  8:29   ` Pavel Machek
  0 siblings, 1 reply; 3+ messages in thread
From: David Weinehall @ 2002-05-28  5:33 UTC (permalink / raw)
  To: Pavel Machek; +Cc: torvalds, kernel list

On Mon, May 27, 2002 at 07:21:56PM +0200, Pavel Machek wrote:
> Hi!
> 
> Currently, on machine where suspend is not yet supported, compilation
> fails even in case user did not actually requested suspend. This
> "fixes" it -- compilation only fails when suspend is needed and not
> supported. Please apply,
> 								Pavel
> 
> --- clean/include/asm-i386/suspend.h	Sun May 26 19:32:03 2002
> +++ linux-swsusp/include/asm-i386/suspend.h	Mon May 27 19:11:25 2002
> @@ -1,13 +1,8 @@
> -#ifndef __ASM_I386_SUSPEND_H
> -#define __ASM_I386_SUSPEND_H
> -#endif

You probably want to move the #endif to the end of the file instead of
removing it; having #ifndef/#define/#endif-traps for all header-files is
good practice.


/David Weinehall
  _                                                                 _
 // David Weinehall <tao@acc.umu.se> /> Northern lights wander      \\
//  Maintainer of the v2.0 kernel   //  Dance across the winter sky //
\>  http://www.acc.umu.se/~tao/    </   Full colour fire           </

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

* Re: swsusp: fix compilation for other architectures
  2002-05-28  5:33 ` David Weinehall
@ 2002-05-28  8:29   ` Pavel Machek
  0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2002-05-28  8:29 UTC (permalink / raw)
  To: David Weinehall; +Cc: Pavel Machek, torvalds, kernel list

Hi!

> > Currently, on machine where suspend is not yet supported, compilation
> > fails even in case user did not actually requested suspend. This
> > "fixes" it -- compilation only fails when suspend is needed and not
> > supported. Please apply,
> > 								Pavel
> > 
> > --- clean/include/asm-i386/suspend.h	Sun May 26 19:32:03 2002
> > +++ linux-swsusp/include/asm-i386/suspend.h	Mon May 27 19:11:25 2002
> > @@ -1,13 +1,8 @@
> > -#ifndef __ASM_I386_SUSPEND_H
> > -#define __ASM_I386_SUSPEND_H
> > -#endif
> 
> You probably want to move the #endif to the end of the file instead of
> removing it; having #ifndef/#define/#endif-traps for all header-files is
> good practice.

Actually, I do not want to. This header file is somehow special, and
suspend.c needs special "private" part of it, too. I'll clean that up
later.

								Pavel
-- 
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.

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

end of thread, other threads:[~2002-05-28 11:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-27 17:21 swsusp: fix compilation for other architectures Pavel Machek
2002-05-28  5:33 ` David Weinehall
2002-05-28  8:29   ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox