From 8de6d9ffa23e057092dd326ba3a528ec5c4ef904 Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Fri, 7 Apr 2017 17:09:26 -0700 Subject: [PATCH] libdispatch: Avoid submodules for headers that should not be included libdispatch has an umbrella header, dispatch.h, that should be used for including all of the other headers. This is enforced via __DISPATCH_INDIRECT__. Since it isn't legal to include one of the other headers on their own, it isn't logical to have submodules for them. Moreover, submodules *should* have local visibility (be unaware of the context they're included from); meaning that __DISPATCH_INDIRECT__ will never be defined. Logically, all of the headers are part of a single module/interface. Patch by me & Duncan P. Exon Smith --- dispatch/darwin/module.modulemap | 1 - dispatch/generic/module.modulemap | 1 - private/darwin/module.modulemap | 1 - private/generic/module.modulemap | 1 - 4 files changed, 4 deletions(-) diff --git a/dispatch/darwin/module.modulemap b/dispatch/darwin/module.modulemap index addaae436..e30807f91 100644 --- a/dispatch/darwin/module.modulemap +++ b/dispatch/darwin/module.modulemap @@ -1,6 +1,5 @@ module Dispatch [system] [extern_c] { umbrella header "dispatch.h" - module * { export * } export * } diff --git a/dispatch/generic/module.modulemap b/dispatch/generic/module.modulemap index 5c248e5c8..8c3e7d016 100644 --- a/dispatch/generic/module.modulemap +++ b/dispatch/generic/module.modulemap @@ -11,7 +11,6 @@ module DispatchIntrospection [system] [extern_c] { module CDispatch [system] [extern_c] { umbrella header "dispatch.h" - module * { export * } export * requires blocks link "dispatch" diff --git a/private/darwin/module.modulemap b/private/darwin/module.modulemap index 62975a59b..ceb963a1f 100644 --- a/private/darwin/module.modulemap +++ b/private/darwin/module.modulemap @@ -1,7 +1,6 @@ module DispatchPrivate [system] [extern_c] { umbrella header "private.h" exclude header "mach_private.h" - module * { export * } export * } diff --git a/private/generic/module.modulemap b/private/generic/module.modulemap index 62975a59b..ceb963a1f 100644 --- a/private/generic/module.modulemap +++ b/private/generic/module.modulemap @@ -1,7 +1,6 @@ module DispatchPrivate [system] [extern_c] { umbrella header "private.h" exclude header "mach_private.h" - module * { export * } export * }