Re: [PATCH] All C files MUST include config.h before any other file

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

 



Hi Cristian,

On Fri, Dec 16, 2011 at 3:56 AM, Cristian Rodríguez
<crrodriguez@xxxxxxxxxxxx> wrote:
>
> Signed-off-by: Cristian Rodríguez <crrodriguez@xxxxxxxxxxxx>
> ---
>  libkmod/libkmod-config.c     |    4 ++++
>  libkmod/libkmod-hash.c       |    4 ++++
>  libkmod/libkmod-index.c      |    4 ++++
>  libkmod/libkmod-list.c       |    4 ++++
>  libkmod/libkmod-module.c     |    4 ++++
>  libkmod/libkmod-util.c       |    4 ++++
>  libkmod/libkmod.c            |    4 ++++
>  test/test-blacklist.c        |    4 ++++
>  test/test-get-dependencies.c |    4 ++++
>  test/test-init.c             |    4 ++++
>  test/test-insmod.c           |    4 ++++
>  test/test-loaded.c           |    4 ++++
>  test/test-lookup.c           |    4 ++++
>  test/test-mod-double-ref.c   |    4 ++++
>  test/test-path-from-name.c   |    4 ++++
>  test/test-rmmod.c            |    4 ++++
>  test/test-rmmod2.c           |    4 ++++
>  tools/kmod-insmod.c          |    4 ++++
>  tools/kmod-lsmod.c           |    4 ++++
>  tools/kmod-modprobe.c        |    4 ++++
>  tools/kmod-rmmod.c           |    4 ++++
>  21 files changed, 84 insertions(+), 0 deletions(-)


Are you really having any problem? This is automatically done by
autotools. Try compiling with 'make V=1', you'll see things like:

libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -include
./config.h -I./libkmod -DSYSCONFDIR=\"/etc\"
-DLIBEXECDIR=\"/usr/libexec\" -fvisibility=hidden -ffunction-sections
-fdata-sections -g -O2 -Werror -pipe -Wall -W -Wextra -Wno-inline
-Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security
-Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition
-Wpointer-arith -Winit-self -Wdeclaration-after-statement
-Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes
-Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow
-Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings
-Wno-long-long -Wno-overlength-strings -Wno-unused-parameter
-Wno-missing-field-initializers -Wno-unused-result -Wnested-externs
-Wchar-subscripts -Wtype-limits -Wuninitialized
-Wp,-D_FORTIFY_SOURCE=2 -ffast-math -fno-common
-fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden
-ffunction-sections -fdata-sections -Wl,--as-needed -Wl,--gc-sections
-MT libkmod/libkmod-list.lo -MD -MP -MF libkmod/.deps/libkmod-list.Tpo
-c libkmod/libkmod-list.c  -fPIC -DPIC -o libkmod/.libs/libkmod-list.o

Note the -include ./config.h, it's already before everything else.

Anyway, thanks for the patch. If you are having any problem, let us know.

Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux