Skip to content

Commit 9f1e778

Browse files
authored
Merge pull request swiftlang#84 from dgrove-oss/gitignore_config.h
Avoid overwriting config.h with generated header
2 parents 5ad4d2b + 3d22f52 commit 9f1e778

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ AC_PREREQ(2.69)
66
AC_INIT([libdispatch], [1.3], [[email protected]], [libdispatch], [http://libdispatch.macosforge.org])
77
AC_REVISION([$$])
88
AC_CONFIG_AUX_DIR(config)
9-
AC_CONFIG_HEADER([config/config.h])
9+
AC_CONFIG_HEADER([config/config_ac.h])
1010
AC_CONFIG_MACRO_DIR([m4])
1111
ac_clean_files=a.out.dSYM
1212
AM_MAINTAINER_MODE

src/internal.h

+4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@
2727
#ifndef __DISPATCH_INTERNAL__
2828
#define __DISPATCH_INTERNAL__
2929

30+
#if __has_include(<config/config_ac.h>)
31+
#include <config/config_ac.h>
32+
#else
3033
#include <config/config.h>
34+
#endif
3135

3236
#define __DISPATCH_BUILDING_DISPATCH__
3337
#define __DISPATCH_INDIRECT__

src/shims/linux_stubs.c

+5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@
1818

1919
#include <stdint.h>
2020
#include <syscall.h>
21+
22+
#if __has_include(<config/config_ac.h>)
23+
#include <config/config_ac.h>
24+
#else
2125
#include <config/config.h>
26+
#endif
2227

2328
#include "pthread.h"
2429
#include "os/linux_base.h"

0 commit comments

Comments
 (0)