RE: [PATCH] fixes for kernel with no procfs.

From: Jones D (ISaCS) (djones2@glam.ac.uk)
Date: Wed Apr 05 2000 - 03:00:01 EST


> What I should have pointed out here is that most of the /proc
> support functions are already wrapped in #ifdef CONFIG_PROC_FS,
> and this does indeed cause them to disappear when built without
> /proc. It relies on the authors to manually
> insert the #ifdef's though, it's not automatic in this sense.

So should I continue to add the ifdefs for those that don't ?
I've a 15kb patch already waiting that does this for a majority
of the codebase.

> It would be nicer to have the compiler do this automatically, as you
> believed it had been doing all along. Doing this requires the use of
> -ffunction-sections,-fdata-sections and --gc-sections, and some
> non-trivial mods to the uaccess.h and .lds files.

Whilst I'm opposed to the usage of ifdef, some of the patches I've
got ready actually improve readability, as I've reversed the logic
somewhat to look like..

- #ifndef VARIABLE
- #define function() {}
- #else
+ #ifdef VARIABLE
function

..

+ #ifdef VARIABLE
function();
+ #endif

regards,

Dave.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:14 EST