Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1222319

Summary: Remove all occurrences of #include "config.h"
Product: [Community] GlusterFS Reporter: Niels de Vos <ndevos>
Component: buildAssignee: Niels de Vos <ndevos>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: mainlineCC: bugs
Target Milestone: ---Keywords: EasyFix, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.8rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-16 13:03:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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