Bug 1222319 - Remove all occurrences of #include "config.h"
Summary: Remove all occurrences of #include "config.h"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: build
Version: mainline
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Niels de Vos
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-17 15:33 UTC by Niels de Vos
Modified: 2016-06-16 13:03 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.8rc2
Clone Of:
Environment:
Last Closed: 2016-06-16 13:03:00 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Niels de Vos 2015-05-17 15:33:37 UTC
Description of problem:

Almost all .c files start with

    #include "config.h"

This should not be needed, we can pass "-include $(top_srcdir)/config.h" in GF_CFLAGS. This reduces about 400 lines of code, and the order of including config.h can never be done incorrectly again.


Version-Release number of selected component (if applicable):

master

Comment 1 Anand Avati 2015-05-18 14:29:53 UTC
REVIEW: http://review.gluster.org/10808 (build: do not #include "config.h" in each file) posted (#1) for review on master by Niels de Vos (ndevos)

Comment 2 Anand Avati 2015-05-18 15:20:53 UTC
REVIEW: http://review.gluster.org/10808 (build: do not #include "config.h" in each file) posted (#2) for review on master by Niels de Vos (ndevos)

Comment 3 Anand Avati 2015-05-28 13:39:41 UTC
REVIEW: http://review.gluster.org/10808 (build: do not #include "config.h" in each file) posted (#3) for review on master by Niels de Vos (ndevos)

Comment 4 Anand Avati 2015-05-29 12:43:32 UTC
COMMIT: http://review.gluster.org/10808 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit 8a9328e37b8c63d60583184dc8dab12f85810682
Author: Niels de Vos <ndevos>
Date:   Mon May 18 16:26:02 2015 +0200

    build: do not #include "config.h" in each file
    
    Instead of including config.h in each file, and have the additional
    config.h included from the compiler commandline (-include option).
    
    When a .c file tests for a certain #define, and config.h was not
    included, incorrect assumtions were made. With this change, it can not
    happen again.
    
    BUG: 1222319
    Change-Id: I4f9097b8740b81ecfe8b218d52ca50361f74cb64
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/10808
    Tested-by: Gluster Build System <jenkins.com>
    Tested-by: NetBSD Build System
    Reviewed-by: Kaleb KEITHLEY <kkeithle>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>

Comment 5 Niels de Vos 2016-06-16 13:03:00 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


Note You need to log in before you can comment on or make changes to this bug.